refactor(app): split session and CLI workflows

This commit is contained in:
morluto
2026-07-18 05:49:14 +00:00
parent 3e61a63a10
commit c6ee0049c4
88 changed files with 7428 additions and 6024 deletions
+14 -8
View File
@@ -12,21 +12,27 @@ import { buildCapabilityInventory } from "../application/CapabilityInventory.js"
import { toolRegistrationOptions } from "./toolRegistrationOptions.js";
import { safeParseToolInput } from "./toolInputValidation.js";
/** Register the read-only provider and target status operation. */
export const registerSessionStatusTool = (
server: McpServer,
session: BinarySessionPort,
contract: (typeof SESSION_TOOL_CONTRACTS)[2],
startedAt: string,
availabilityPolicy: () => {
/** Inputs required to register the binary session status tool. */
export interface SessionStatusToolOptions {
readonly server: McpServer;
readonly session: BinarySessionPort;
readonly contract: (typeof SESSION_TOOL_CONTRACTS)[2];
readonly startedAt: string;
readonly availabilityPolicy: () => {
readonly processCaptureEnabled: boolean;
readonly evidenceFileRoots: number;
readonly browserObservationEnabled?: boolean;
readonly electronObservationEnabled?: boolean;
readonly javascriptReplayEnabled?: boolean;
readonly managedRuntimeEnabled?: boolean;
},
};
}
/** Register the read-only provider and target status operation. */
export const registerSessionStatusTool = (
options: SessionStatusToolOptions,
): void => {
const { server, session, contract, startedAt, availabilityPolicy } = options;
server.registerTool(
contract.name,
toolRegistrationOptions(contract),