refactor(mcp): make analysis states unrepresentable (#468)

* refactor(config): parse capability settings into exact states

* refactor(runtime): encode replay and process outcomes exactly

* refactor: make analysis states unrepresentable

* refactor(mcp): register canonical schemas with SDK

* fix: preserve capability and catalog invariants

* fix(build): remove stale compiled modules

* fix(replay): update real verifier policy dependency

* fix(package): verify the complete MCP catalog

* fix(test): supply complete replay reload policy

* refactor(contracts): centralize output schema lookup

* refactor(mcp): delegate protocol boundaries to SDK

* fix(browser): approve real source capture

* fix(mcp): preserve catalog guidance
This commit is contained in:
morluto
2026-08-10 02:28:11 +08:00
committed by GitHub
parent 6901edc05d
commit b8a9da0c0f
271 changed files with 5970 additions and 5699 deletions
+13 -1
View File
@@ -1,8 +1,8 @@
import { z } from "zod";
import { isAbsolute } from "node:path";
import { ConfigurationError } from "../domain/errors.js";
import { err, ok, type Result } from "../domain/result.js";
import {} from "../domain/browserObservation.js";
import { electronFileRootsSchema } from "../domain/electronObservation.js";
export const parseStringArray = (
@@ -29,6 +29,18 @@ export const parseStringArray = (
}
};
/** Parse a JSON string array whose members must all be absolute paths. */
export const parseAbsoluteRoots = (
encoded: string,
name: string,
): Result<readonly string[], ConfigurationError> => {
const parsed = parseStringArray(encoded, name);
if (!parsed.ok) return parsed;
return parsed.value.some((root) => !isAbsolute(root))
? err(new ConfigurationError(`${name} must encode absolute roots`))
: parsed;
};
export const parseBrowserArray = (
encoded: string,
name: string,