示例工程 58-agent-app-architecture
58-agent-app-architecture/app/shared/ipc.ts
import type {
ApprovalMode,
Decision,
Edge,
Failure,
Layer,
Tool,
} from "./arch";
export const CH = {
snapshot: "arch:snapshot",
refresh: "arch:refresh",
} as const;
export type EventRow = { at: number; kind: string; detail: string };
export type Check = {
id: string;
label: string;
pass: boolean;
detail: string;
};
export type MatrixRow = {
tool: Tool;
decisions: Record<ApprovalMode, Decision>;
};
export type Snapshot = {
platform: string;
electronVersion: string;
nodeVersion: string;
layers: Layer[];
edges: Edge[];
tools: Tool[];
matrix: MatrixRow[];
failures: Failure[];
violations: string[];
checks: Check[];
score: number;
events: EventRow[];
};