@zhivex-ai/harness 1.2.0 → 1.3.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/README.md +9 -10
- package/contracts/engine-api.json +2921 -0
- package/contracts/public-api.json +267 -1
- package/contracts/stable-api-signatures.json +43 -43
- package/dist/acp-cli.js +137 -15002
- package/dist/approvals/approval-history.d.ts +22 -0
- package/dist/approvals/explicit-review.d.ts +24 -0
- package/dist/approvals/host-policy-identity.d.ts +3 -0
- package/dist/cli/arguments.d.ts +6 -2
- package/dist/cli/checkpoints.d.ts +230 -0
- package/dist/cli/cli-options.d.ts +2 -41
- package/dist/cli/cli-profiles.d.ts +4 -2
- package/dist/cli/cli-stream.d.ts +2 -167
- package/dist/cli/governance-report.d.ts +5 -0
- package/dist/cli/policy-decisions.d.ts +9 -0
- package/dist/cli/policy.d.ts +5 -0
- package/dist/cli/presentation.d.ts +3 -1
- package/dist/cli/run-document.d.ts +2 -91
- package/dist/cli/terminal/terminal-continuation.d.ts +2 -3
- package/dist/cli/terminal/terminal-ui.d.ts +4 -0
- package/dist/{cli-entry-c2f58zj2.js → cli-entry-ae7x44d4.js} +14969 -10731
- package/dist/{cli-entry-427869g9.js → cli-entry-d5788aay.js} +388 -47
- package/dist/cli-entry-ev76ezcd.js +656 -0
- package/dist/{cli-3jmy4h5h.js → cli-t7hrhayq.js} +918 -2223
- package/dist/cli.js +3 -5
- package/dist/client/acp-mcp-admission.d.ts +32 -0
- package/dist/client/acp-mcp-host.d.ts +19 -0
- package/dist/client/acp-mcp-session.d.ts +14 -0
- package/dist/client/acp-stdio.d.ts +2 -0
- package/dist/client/acp.d.ts +4 -1
- package/dist/client/adapter.d.ts +13 -1
- package/dist/client/continuation.d.ts +3 -0
- package/dist/client/json-contracts.d.ts +107 -4
- package/dist/client/local-service.d.ts +2 -0
- package/dist/client/protocol.d.ts +127 -1
- package/dist/client/run-document.d.ts +91 -0
- package/dist/client/service-events.d.ts +4 -0
- package/dist/client/stream.d.ts +167 -0
- package/dist/compat/cli-options.d.ts +53 -0
- package/dist/compat/code-support.d.ts +22 -0
- package/dist/compat/code-support.js +74 -0
- package/dist/{config-1k9t4jhh.js → config-c002f06f.js} +1 -1
- package/dist/config-j3jga5wh.js +61 -0
- package/dist/context/adaptive-compaction.d.ts +1 -0
- package/dist/context/compaction.d.ts +1 -1
- package/dist/context/request-measurements.d.ts +17 -0
- package/dist/context/request-projection.d.ts +10 -0
- package/dist/context/task-memory.d.ts +1 -0
- package/dist/engine/acp.d.ts +6 -0
- package/dist/engine/acp.js +205 -0
- package/dist/engine/client.d.ts +6 -0
- package/dist/engine/client.js +28 -0
- package/dist/engine/desktop-providers-v1.d.ts +4 -0
- package/dist/engine/desktop-providers-v1.js +18 -0
- package/dist/engine/desktop-state-v1.d.ts +10 -0
- package/dist/engine/desktop-state-v1.js +168 -0
- package/dist/engine/index.d.ts +73 -0
- package/dist/engine/index.js +977 -0
- package/dist/engine/mcp-stdio-v1.d.ts +11 -0
- package/dist/engine/mcp-stdio-v1.js +108 -0
- package/dist/engine/models.d.ts +3 -0
- package/dist/engine/models.js +894 -0
- package/dist/engine/protocol.d.ts +7 -0
- package/dist/engine/protocol.js +182 -0
- package/dist/engine/service.d.ts +5 -0
- package/dist/engine/service.js +28 -0
- package/dist/execution/acceptance-snapshot.d.ts +2 -0
- package/dist/execution/execution-environment.d.ts +10 -0
- package/dist/execution/mcp-oci-channel.d.ts +11 -0
- package/dist/execution/mcp-oci-server.d.ts +38 -0
- package/dist/execution/mcp-oci-workspace.d.ts +23 -0
- package/dist/execution/mcp-resource-recovery.d.ts +19 -0
- package/dist/execution/mcp-workspace-snapshot.d.ts +20 -0
- package/dist/hostile-repository-demo.js +3368 -1304
- package/dist/index-1bx83sw4.js +4 -0
- package/dist/index-2gz7jv7g.js +549 -0
- package/dist/{cli-entry-b1mfvmxe.js → index-2jrdcj6b.js} +72 -115
- package/dist/index-3ah1f369.js +356 -0
- package/dist/index-42gp2hy8.js +1555 -0
- package/dist/index-4jw3tvy8.js +301 -0
- package/dist/index-8705zxpr.js +145 -0
- package/dist/index-8vm2m34s.js +2080 -0
- package/dist/index-8zzhggxv.js +477 -0
- package/dist/index-a97bezbz.js +1073 -0
- package/dist/index-gq9xagx2.js +1343 -0
- package/dist/index-h0mqx2ed.js +1373 -0
- package/dist/index-jgrx804e.js +5589 -0
- package/dist/index-qfpz5y2v.js +174 -0
- package/dist/index-t60rva31.js +1004 -0
- package/dist/index-wg1sd3at.js +80 -0
- package/dist/index-xqxeypt5.js +888 -0
- package/dist/index-yb239ghk.js +961 -0
- package/dist/index-z0qxmkm2.js +3389 -0
- package/dist/index-z4e8d0ph.js +1768 -0
- package/dist/index.js +251 -18649
- package/dist/integrations/mcp-host-session.d.ts +26 -0
- package/dist/integrations/mcp-stdio-admission.d.ts +54 -0
- package/dist/integrations/mcp-stdio-client.d.ts +44 -0
- package/dist/integrations/mcp-stdio-framing.d.ts +18 -0
- package/dist/integrations/mcp-stdio-launch.d.ts +20 -0
- package/dist/integrations/mcp-stdio-session.d.ts +7 -0
- package/dist/integrations/mcp-stdio-tools.d.ts +12 -0
- package/dist/internal/desktop/catalog.d.ts +2 -0
- package/dist/internal/desktop/persistence.d.ts +2 -3
- package/dist/internal/desktop/providers.d.ts +1 -0
- package/dist/models/catalog.d.ts +2 -0
- package/dist/persistence/governance-context.d.ts +126 -0
- package/dist/persistence/governance-report.d.ts +299 -0
- package/dist/persistence/host-database-backup.d.ts +28 -0
- package/dist/persistence/mcp-execution-journal.d.ts +19 -0
- package/dist/persistence/mcp-reconciliation.d.ts +33 -0
- package/dist/persistence/mcp-resource-journal.d.ts +54 -0
- package/dist/persistence/workspace-checkpoints.d.ts +138 -0
- package/dist/providers/anthropic-continuation.d.ts +5 -0
- package/dist/providers/providers.d.ts +1 -1
- package/dist/providers/vertex-auth.d.ts +27 -0
- package/dist/runtime/delegation-contracts.d.ts +9 -0
- package/dist/runtime/delegation-correction.d.ts +9 -0
- package/dist/runtime/delegation-result.d.ts +73 -0
- package/dist/runtime/error-diagnostics.d.ts +86 -0
- package/dist/runtime/harness.d.ts +11 -1
- package/dist/runtime/policy-decisions.d.ts +66 -0
- package/dist/runtime/policy-inspection.d.ts +52 -0
- package/dist/runtime/provider-diagnostics.d.ts +1 -0
- package/dist/runtime/runtime-instructions.d.ts +8 -0
- package/dist/runtime/task-acceptance-checks.d.ts +103 -0
- package/dist/runtime/task-acceptance-delivery.d.ts +107 -0
- package/dist/runtime/task-acceptance-host.d.ts +20 -0
- package/dist/runtime/task-acceptance-record.d.ts +107 -0
- package/dist/runtime/task-acceptance-validation.d.ts +25 -0
- package/dist/runtime/task-acceptance.d.ts +47 -0
- package/dist/runtime/time-to-safe-fix.d.ts +83 -0
- package/dist/runtime/tool-policy-file.d.ts +23 -0
- package/dist/runtime/tool-policy-paths.d.ts +5 -0
- package/dist/runtime/tool-policy.d.ts +6 -0
- package/dist/service-cli.js +19 -14504
- package/dist/{service-client-cli-yx56n0hc.js → service-client-cli-kns4mf57.js} +307 -248
- package/dist/verify-historical-migrations.js +3314 -1251
- package/dist/workspace/path-policy.d.ts +4 -0
- package/dist/zhx.js +3 -5
- package/docs/ACP.md +14 -2
- package/docs/ANTHROPIC.md +33 -0
- package/docs/CLI.md +132 -0
- package/docs/CLIENT_PROTOCOL.md +45 -0
- package/docs/CODE_RELEASE.md +93 -0
- package/docs/ENGINE_API.md +319 -0
- package/docs/EXTENSIBILITY.md +46 -3
- package/docs/FIRST_USE.md +6 -6
- package/docs/LOCAL_SERVICE.md +13 -0
- package/docs/MCP_STDIO.md +20 -0
- package/docs/README.md +6 -0
- package/docs/STABILITY.md +9 -1
- package/docs/SUPPORT_MATRIX.md +1 -1
- package/docs/TOOL_POLICY.md +81 -0
- package/docs/VERTEX.md +50 -0
- package/docs/adr/0002-isolated-mcp-stdio.md +135 -0
- package/docs/fixtures/mcp-stdio-contract-v1.json +189 -0
- package/docs/support-matrix.json +2 -0
- package/evaluations/representative-assembly-matrix.json +64 -1
- package/evaluations/task-acceptance-routes.json +7 -0
- package/examples/README.md +1 -1
- package/package.json +74 -12
- package/dist/cli-entry-64pdp3k5.js +0 -17
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AgentRunStore, AgentStoreScope, ToolSet } from '@zhivex-ai/core';
|
|
2
|
+
import type { McpStdioLaunchProposal } from './mcp-stdio-admission.js';
|
|
3
|
+
/** Opaque capability issued only after the host's admitted OCI launch succeeds. */
|
|
4
|
+
export type HarnessIsolatedMcpSession = Readonly<Record<never, never>>;
|
|
5
|
+
/** Internal issuer; this module is not a package entry point. */
|
|
6
|
+
export declare function issueMcpHostSession(options: {
|
|
7
|
+
tools: ToolSet;
|
|
8
|
+
store: AgentRunStore;
|
|
9
|
+
scope: AgentStoreScope;
|
|
10
|
+
runId: string;
|
|
11
|
+
proposal: Readonly<McpStdioLaunchProposal>;
|
|
12
|
+
close(): Promise<void>;
|
|
13
|
+
}): HarnessIsolatedMcpSession;
|
|
14
|
+
export declare function resolveMcpHostSession(token: HarnessIsolatedMcpSession): {
|
|
15
|
+
tools: ToolSet;
|
|
16
|
+
store: AgentRunStore;
|
|
17
|
+
scope: AgentStoreScope;
|
|
18
|
+
runId: string;
|
|
19
|
+
workspace: string;
|
|
20
|
+
fingerprint: string;
|
|
21
|
+
close(): Promise<void>;
|
|
22
|
+
active: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare function closeMcpHostSession(token: HarnessIsolatedMcpSession): Promise<void>;
|
|
25
|
+
/** Internal composition of already admitted sessions; never accepts raw tools. */
|
|
26
|
+
export declare function combineMcpHostSessions(tokens: readonly HarnessIsolatedMcpSession[]): HarnessIsolatedMcpSession;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const proposalSchema: z.ZodObject<{
|
|
3
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
4
|
+
serverId: z.ZodString;
|
|
5
|
+
boundary: z.ZodLiteral<"oci">;
|
|
6
|
+
image: z.ZodString;
|
|
7
|
+
executable: z.ZodString;
|
|
8
|
+
args: z.ZodArray<z.ZodString>;
|
|
9
|
+
protocolVersion: z.ZodLiteral<"2025-11-25">;
|
|
10
|
+
workingDirectory: z.ZodString;
|
|
11
|
+
snapshotDigest: z.ZodString;
|
|
12
|
+
scope: z.ZodObject<{
|
|
13
|
+
principal: z.ZodString;
|
|
14
|
+
tenant: z.ZodString;
|
|
15
|
+
session: z.ZodString;
|
|
16
|
+
workspace: z.ZodString;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
includeTools: z.ZodArray<z.ZodString>;
|
|
19
|
+
permissions: z.ZodArray<z.ZodEnum<{
|
|
20
|
+
read: "read";
|
|
21
|
+
write: "write";
|
|
22
|
+
}>>;
|
|
23
|
+
environment: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
24
|
+
secretReferences: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
25
|
+
limits: z.ZodObject<{
|
|
26
|
+
sessionMs: z.ZodNumber;
|
|
27
|
+
callMs: z.ZodNumber;
|
|
28
|
+
memoryMb: z.ZodNumber;
|
|
29
|
+
maxCpus: z.ZodNumber;
|
|
30
|
+
maxPids: z.ZodNumber;
|
|
31
|
+
maxWorkspaceBytes: z.ZodNumber;
|
|
32
|
+
maxFileWriteBytes: z.ZodNumber;
|
|
33
|
+
tmpfsMb: z.ZodNumber;
|
|
34
|
+
maxOutputBytes: z.ZodNumber;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
export type McpStdioLaunchProposal = z.infer<typeof proposalSchema>;
|
|
38
|
+
export type McpStdioLaunchReceipt = Readonly<Record<never, never>>;
|
|
39
|
+
export declare class McpStdioAdmissionError extends Error {
|
|
40
|
+
constructor(message: string);
|
|
41
|
+
}
|
|
42
|
+
/** Owned by the trusted host, never constructed from client/workspace configuration. */
|
|
43
|
+
export declare function createMcpStdioAdmissionAuthority(options: {
|
|
44
|
+
policyVersion: string;
|
|
45
|
+
maximumLimits: McpStdioLaunchProposal['limits'];
|
|
46
|
+
authorize: (proposal: Readonly<McpStdioLaunchProposal>) => Promise<boolean>;
|
|
47
|
+
receiptTtlMs?: number;
|
|
48
|
+
reviewTimeoutMs?: number;
|
|
49
|
+
now?: () => number;
|
|
50
|
+
}): {
|
|
51
|
+
admit(input: unknown): Promise<McpStdioLaunchReceipt>;
|
|
52
|
+
consume(receipt: McpStdioLaunchReceipt, input: unknown): Readonly<McpStdioLaunchProposal>;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { McpCallToolOptions, McpCallToolRequest, McpCallToolResponse, McpClient, McpListToolsRequest, McpListToolsResponse } from '@zhivex-ai/core';
|
|
2
|
+
/** Supplied only by the admitted isolated-process owner. No executable or spawn API. */
|
|
3
|
+
export interface IsolatedMcpChannel {
|
|
4
|
+
stdout: AsyncIterable<Uint8Array>;
|
|
5
|
+
write(frame: Uint8Array): Promise<void>;
|
|
6
|
+
/** Resolves only after the entire boundary/process tree has been removed. */
|
|
7
|
+
close(): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare class McpStdioClientError extends Error {
|
|
10
|
+
readonly code: 'closed' | 'busy' | 'timeout' | 'cancelled' | 'protocol' | 'remote' | 'cleanup_required';
|
|
11
|
+
readonly outcomeUnknown: boolean;
|
|
12
|
+
constructor(code: 'closed' | 'busy' | 'timeout' | 'cancelled' | 'protocol' | 'remote' | 'cleanup_required', message: string, outcomeUnknown?: boolean);
|
|
13
|
+
}
|
|
14
|
+
/** Internal protocol client. Admission, isolated launch and per-tool approval belong to the host. */
|
|
15
|
+
export declare class IsolatedMcpStdioClient implements McpClient {
|
|
16
|
+
private readonly channel;
|
|
17
|
+
private readonly limits;
|
|
18
|
+
private nextId;
|
|
19
|
+
private pending;
|
|
20
|
+
private stopped;
|
|
21
|
+
private ready;
|
|
22
|
+
private initializing;
|
|
23
|
+
private closing;
|
|
24
|
+
private readonly decoder;
|
|
25
|
+
private readonly reading;
|
|
26
|
+
constructor(channel: IsolatedMcpChannel, limits: {
|
|
27
|
+
callMs: number;
|
|
28
|
+
initializeMs: number;
|
|
29
|
+
sessionMs: number;
|
|
30
|
+
maxFrameBytes: number;
|
|
31
|
+
closeMs?: number;
|
|
32
|
+
});
|
|
33
|
+
private readonly sessionTimer;
|
|
34
|
+
private receive;
|
|
35
|
+
private read;
|
|
36
|
+
private fail;
|
|
37
|
+
private request;
|
|
38
|
+
initialize(): Promise<void>;
|
|
39
|
+
private initializeInternal;
|
|
40
|
+
listTools(input?: McpListToolsRequest, options?: McpCallToolOptions): Promise<McpListToolsResponse>;
|
|
41
|
+
callTool(input: McpCallToolRequest, options?: McpCallToolOptions): Promise<McpCallToolResponse>;
|
|
42
|
+
private boundedCleanup;
|
|
43
|
+
close(): Promise<void>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Internal codec only. It does not spawn processes, admit servers or grant tools. */
|
|
2
|
+
export type McpStdioMessage = Record<string, unknown> & {
|
|
3
|
+
jsonrpc: '2.0';
|
|
4
|
+
};
|
|
5
|
+
export declare class McpStdioProtocolError extends Error {
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
/** Byte limits apply before UTF-8 decoding, including an unfinished line. */
|
|
9
|
+
export declare class McpStdioFrameDecoder {
|
|
10
|
+
private readonly maxFrameBytes;
|
|
11
|
+
private readonly onMessage;
|
|
12
|
+
private readonly frame;
|
|
13
|
+
private size;
|
|
14
|
+
private ended;
|
|
15
|
+
constructor(maxFrameBytes: number, onMessage: (message: McpStdioMessage) => void);
|
|
16
|
+
push(chunk: Uint8Array): void;
|
|
17
|
+
finish(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { consumeMcpWorkspaceSnapshot, type McpWorkspaceSnapshot } from '../execution/mcp-workspace-snapshot.js';
|
|
2
|
+
import { type createMcpStdioAdmissionAuthority, type McpStdioLaunchProposal, type McpStdioLaunchReceipt } from './mcp-stdio-admission.js';
|
|
3
|
+
type Authority = ReturnType<typeof createMcpStdioAdmissionAuthority>;
|
|
4
|
+
type SnapshotFiles = Parameters<Parameters<typeof consumeMcpWorkspaceSnapshot>[2]>[0];
|
|
5
|
+
/** Trusted host handoff only. The seeder owns creation, OCI attestation and cleanup. */
|
|
6
|
+
export declare function withAdmittedMcpLaunch<T>(options: {
|
|
7
|
+
authority: Authority;
|
|
8
|
+
receipt: McpStdioLaunchReceipt;
|
|
9
|
+
proposal: unknown;
|
|
10
|
+
snapshot: McpWorkspaceSnapshot;
|
|
11
|
+
/** Supplied by the authenticated host session, never copied from proposal input. */
|
|
12
|
+
scope: McpStdioLaunchProposal['scope'];
|
|
13
|
+
resolveSecret: (reference: string, signal: AbortSignal) => Promise<string | undefined>;
|
|
14
|
+
seed: (launch: {
|
|
15
|
+
proposal: Readonly<McpStdioLaunchProposal>;
|
|
16
|
+
environment: Readonly<Record<string, string>>;
|
|
17
|
+
files: SnapshotFiles;
|
|
18
|
+
}) => Promise<T>;
|
|
19
|
+
}): Promise<T>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { launchDockerMcpTools } from '../execution/mcp-oci-server.js';
|
|
2
|
+
export type IsolatedMcpLaunchOptions = Omit<Parameters<typeof launchDockerMcpTools>[0], 'resourceJournal'>;
|
|
3
|
+
/** Returns only the opaque harness capability and lifecycle control, not raw tools. */
|
|
4
|
+
export declare function launchIsolatedMcpSession(options: IsolatedMcpLaunchOptions): Promise<Readonly<{
|
|
5
|
+
hostSession: Readonly<Record<never, never>>;
|
|
6
|
+
close: () => Promise<void>;
|
|
7
|
+
}>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type McpClient, type ToolSet } from '@zhivex-ai/core';
|
|
2
|
+
import type { McpStdioLaunchProposal } from './mcp-stdio-admission.js';
|
|
3
|
+
import { createJournaledMcpClient } from '../persistence/mcp-execution-journal.js';
|
|
4
|
+
/** Host tool bridge. Existing agent execution supplies durable interrupt approvals. */
|
|
5
|
+
export declare function createIsolatedMcpTools(options: {
|
|
6
|
+
client: McpClient & {
|
|
7
|
+
close(): Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
proposal: Readonly<McpStdioLaunchProposal>;
|
|
10
|
+
sensitiveValues?: readonly string[];
|
|
11
|
+
journal?: Pick<Parameters<typeof createJournaledMcpClient>[0], 'store' | 'runId' | 'scope'>;
|
|
12
|
+
}): Promise<ToolSet>;
|
|
@@ -8,7 +8,6 @@ export { acquireSqliteAccess } from "../../persistence/sqlite-access.js";
|
|
|
8
8
|
export { adoptExclusiveSqliteAccess } from "../../persistence/sqlite-access.js";
|
|
9
9
|
export { exclusiveSqliteAccessDescriptor } from "../../persistence/sqlite-access.js";
|
|
10
10
|
export type { SqliteAccessLease } from "../../persistence/sqlite-access.js";
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export { createHarnessStateBackup } from "../../persistence/state-backup.js";
|
|
11
|
+
export { DESKTOP_DATABASE_BACKUP_LIMIT, createDesktopDatabaseBackup, verifyDesktopDatabaseBackup, verifyDesktopDatabaseState } from "../../persistence/host-database-backup.js";
|
|
12
|
+
export type { DesktopDatabaseBackup, DesktopBackupConfig } from "../../persistence/host-database-backup.js";
|
|
14
13
|
export { validateStateDirectory } from "../../persistence/state-directory.js";
|
|
@@ -4,6 +4,7 @@ export type { HarnessConfig } from "../../runtime/config.js";
|
|
|
4
4
|
export { resolveHarnessConfig } from "../../runtime/config.js";
|
|
5
5
|
export { DEFAULT_PROVIDER_REGISTRY } from "../../providers/providers.js";
|
|
6
6
|
export { PROVIDERS } from "../../providers/providers.js";
|
|
7
|
+
export { vertexConfigured, vertexEnvironment, vertexTokenSource, vertexRoute } from "../../providers/vertex-auth.js";
|
|
7
8
|
export { bundledModelCatalog, catalogModels, modelDescription } from "../../models/catalog.js";
|
|
8
9
|
export type { CatalogModel, ModelCatalog } from "../../models/catalog.js";
|
|
9
10
|
export { loadModelCatalog } from "../../models/catalog-store.js";
|
package/dist/models/catalog.d.ts
CHANGED
|
@@ -69,10 +69,12 @@ export declare const modelCatalogSchema: z.ZodObject<{
|
|
|
69
69
|
revision: z.ZodString;
|
|
70
70
|
providers: z.ZodArray<z.ZodObject<{
|
|
71
71
|
id: z.ZodEnum<{
|
|
72
|
+
anthropic: "anthropic";
|
|
72
73
|
gemini: "gemini";
|
|
73
74
|
meta: "meta";
|
|
74
75
|
openai: "openai";
|
|
75
76
|
qwen: "qwen";
|
|
77
|
+
vertex: "vertex";
|
|
76
78
|
}>;
|
|
77
79
|
defaultModel: z.ZodString;
|
|
78
80
|
models: z.ZodArray<z.ZodObject<{
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { CliSessionStore } from './sessions.js';
|
|
3
|
+
export declare const governanceReference: (kind: string, value: string) => string;
|
|
4
|
+
export declare const governanceSessionSchema: z.ZodObject<{
|
|
5
|
+
availability: z.ZodEnum<{
|
|
6
|
+
recorded: "recorded";
|
|
7
|
+
unavailable: "unavailable";
|
|
8
|
+
}>;
|
|
9
|
+
reference: z.ZodNullable<z.ZodString>;
|
|
10
|
+
revision: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export declare const governanceHistorySchema: z.ZodObject<{
|
|
13
|
+
availability: z.ZodEnum<{
|
|
14
|
+
recorded: "recorded";
|
|
15
|
+
unavailable: "unavailable";
|
|
16
|
+
}>;
|
|
17
|
+
retention: z.ZodEnum<{
|
|
18
|
+
expired: "expired";
|
|
19
|
+
retained: "retained";
|
|
20
|
+
unknown: "unknown";
|
|
21
|
+
}>;
|
|
22
|
+
incomplete: z.ZodBoolean;
|
|
23
|
+
policyDecisions: z.ZodArray<z.ZodObject<{
|
|
24
|
+
runReference: z.ZodString;
|
|
25
|
+
sequence: z.ZodNumber;
|
|
26
|
+
toolReference: z.ZodString;
|
|
27
|
+
phase: z.ZodEnum<{
|
|
28
|
+
"approval-request": "approval-request";
|
|
29
|
+
"tool-entry": "tool-entry";
|
|
30
|
+
}>;
|
|
31
|
+
decision: z.ZodEnum<{
|
|
32
|
+
allow: "allow";
|
|
33
|
+
ask_user: "ask_user";
|
|
34
|
+
deny: "deny";
|
|
35
|
+
}>;
|
|
36
|
+
policyDigest: z.ZodNullable<z.ZodString>;
|
|
37
|
+
source: z.ZodEnum<{
|
|
38
|
+
application: "application";
|
|
39
|
+
baseline: "baseline";
|
|
40
|
+
"operator-file": "operator-file";
|
|
41
|
+
}>;
|
|
42
|
+
ruleReferences: z.ZodArray<z.ZodString>;
|
|
43
|
+
explicitReviewRequired: z.ZodBoolean;
|
|
44
|
+
}, z.core.$strict>>;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
export declare const governanceEnvelopeSchema: z.ZodObject<{
|
|
47
|
+
source: z.ZodLiteral<"caller-supplied">;
|
|
48
|
+
envelopeId: z.ZodNullable<z.ZodString>;
|
|
49
|
+
patchReference: z.ZodNullable<z.ZodString>;
|
|
50
|
+
patchDigest: z.ZodNullable<z.ZodString>;
|
|
51
|
+
linkedRunReferences: z.ZodArray<z.ZodString>;
|
|
52
|
+
schemaValid: z.ZodBoolean;
|
|
53
|
+
integrity: z.ZodEnum<{
|
|
54
|
+
invalid: "invalid";
|
|
55
|
+
valid: "valid";
|
|
56
|
+
}>;
|
|
57
|
+
expiration: z.ZodEnum<{
|
|
58
|
+
current: "current";
|
|
59
|
+
expired: "expired";
|
|
60
|
+
"not-yet-valid": "not-yet-valid";
|
|
61
|
+
unknown: "unknown";
|
|
62
|
+
}>;
|
|
63
|
+
checkedAt: z.ZodISODateTime;
|
|
64
|
+
expiredApprovals: z.ZodNumber;
|
|
65
|
+
authenticity: z.ZodLiteral<"not-verified">;
|
|
66
|
+
patchBytes: z.ZodLiteral<"not-verified">;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
/** Both readers must already be bound to the same workspace and scope as the run store. */
|
|
69
|
+
export interface GovernanceSessionSource {
|
|
70
|
+
id: string;
|
|
71
|
+
index: Pick<CliSessionStore, 'get'>;
|
|
72
|
+
history?: {
|
|
73
|
+
replay(sessionId: string, after?: number): {
|
|
74
|
+
schemaVersion: 1;
|
|
75
|
+
cursorExpired: boolean;
|
|
76
|
+
hasMore?: boolean;
|
|
77
|
+
policyEvidenceIncomplete?: boolean;
|
|
78
|
+
nextCursor: number;
|
|
79
|
+
events: Array<{
|
|
80
|
+
sessionId: string;
|
|
81
|
+
runId: string;
|
|
82
|
+
sequence: number;
|
|
83
|
+
activity: Record<string, unknown>;
|
|
84
|
+
}>;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export declare function readGovernanceSession(source: GovernanceSessionSource | undefined, rootRunId: string, runIds: ReadonlySet<string>): Promise<{
|
|
89
|
+
session: {
|
|
90
|
+
availability: "recorded" | "unavailable";
|
|
91
|
+
reference: string | null;
|
|
92
|
+
revision: number | null;
|
|
93
|
+
};
|
|
94
|
+
history: {
|
|
95
|
+
availability: "recorded" | "unavailable";
|
|
96
|
+
retention: "expired" | "retained" | "unknown";
|
|
97
|
+
incomplete: boolean;
|
|
98
|
+
policyDecisions: {
|
|
99
|
+
runReference: string;
|
|
100
|
+
sequence: number;
|
|
101
|
+
toolReference: string;
|
|
102
|
+
phase: "approval-request" | "tool-entry";
|
|
103
|
+
decision: "allow" | "ask_user" | "deny";
|
|
104
|
+
policyDigest: string | null;
|
|
105
|
+
source: "application" | "baseline" | "operator-file";
|
|
106
|
+
ruleReferences: string[];
|
|
107
|
+
explicitReviewRequired: boolean;
|
|
108
|
+
}[];
|
|
109
|
+
};
|
|
110
|
+
verify: () => Promise<void>;
|
|
111
|
+
}>;
|
|
112
|
+
/** Envelopes are references supplied by the caller, never inferred signatures or executed checks. */
|
|
113
|
+
export declare function projectGovernanceEnvelopes(envelopes: readonly unknown[], patches: ReadonlyMap<string, readonly string[]>, now: number): {
|
|
114
|
+
source: "caller-supplied";
|
|
115
|
+
envelopeId: string | null;
|
|
116
|
+
patchReference: string | null;
|
|
117
|
+
patchDigest: string | null;
|
|
118
|
+
linkedRunReferences: string[];
|
|
119
|
+
schemaValid: boolean;
|
|
120
|
+
integrity: "invalid" | "valid";
|
|
121
|
+
expiration: "current" | "expired" | "not-yet-valid" | "unknown";
|
|
122
|
+
checkedAt: string;
|
|
123
|
+
expiredApprovals: number;
|
|
124
|
+
authenticity: "not-verified";
|
|
125
|
+
patchBytes: "not-verified";
|
|
126
|
+
}[];
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { AgentRunStore, AgentStoreScope } from '@zhivex-ai/core';
|
|
3
|
+
import { type GovernanceSessionSource } from './governance-context.js';
|
|
4
|
+
/** Experimental v1 projection. No messages, arguments, outputs or arbitrary metadata fields. */
|
|
5
|
+
export declare const harnessGovernanceReportSchema: z.ZodObject<{
|
|
6
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
7
|
+
kind: z.ZodLiteral<"harness-governance-report">;
|
|
8
|
+
exporterVersion: z.ZodString;
|
|
9
|
+
executionArtifact: z.ZodObject<{
|
|
10
|
+
version: z.ZodNullable<z.ZodString>;
|
|
11
|
+
digest: z.ZodNull;
|
|
12
|
+
availability: z.ZodEnum<{
|
|
13
|
+
"recorded-version": "recorded-version";
|
|
14
|
+
unavailable: "unavailable";
|
|
15
|
+
}>;
|
|
16
|
+
configurationFingerprint: z.ZodNullable<z.ZodString>;
|
|
17
|
+
authenticity: z.ZodLiteral<"not-verified">;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
rootReference: z.ZodString;
|
|
20
|
+
identity: z.ZodLiteral<"not-verified">;
|
|
21
|
+
referencePolicy: z.ZodLiteral<"sha256-domain-separated-pseudonyms-not-anonymity">;
|
|
22
|
+
session: z.ZodObject<{
|
|
23
|
+
availability: z.ZodEnum<{
|
|
24
|
+
recorded: "recorded";
|
|
25
|
+
unavailable: "unavailable";
|
|
26
|
+
}>;
|
|
27
|
+
reference: z.ZodNullable<z.ZodString>;
|
|
28
|
+
revision: z.ZodNullable<z.ZodNumber>;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
eventHistory: z.ZodObject<{
|
|
31
|
+
availability: z.ZodEnum<{
|
|
32
|
+
recorded: "recorded";
|
|
33
|
+
unavailable: "unavailable";
|
|
34
|
+
}>;
|
|
35
|
+
retention: z.ZodEnum<{
|
|
36
|
+
expired: "expired";
|
|
37
|
+
retained: "retained";
|
|
38
|
+
unknown: "unknown";
|
|
39
|
+
}>;
|
|
40
|
+
incomplete: z.ZodBoolean;
|
|
41
|
+
policyDecisions: z.ZodArray<z.ZodObject<{
|
|
42
|
+
runReference: z.ZodString;
|
|
43
|
+
sequence: z.ZodNumber;
|
|
44
|
+
toolReference: z.ZodString;
|
|
45
|
+
phase: z.ZodEnum<{
|
|
46
|
+
"approval-request": "approval-request";
|
|
47
|
+
"tool-entry": "tool-entry";
|
|
48
|
+
}>;
|
|
49
|
+
decision: z.ZodEnum<{
|
|
50
|
+
allow: "allow";
|
|
51
|
+
ask_user: "ask_user";
|
|
52
|
+
deny: "deny";
|
|
53
|
+
}>;
|
|
54
|
+
policyDigest: z.ZodNullable<z.ZodString>;
|
|
55
|
+
source: z.ZodEnum<{
|
|
56
|
+
application: "application";
|
|
57
|
+
baseline: "baseline";
|
|
58
|
+
"operator-file": "operator-file";
|
|
59
|
+
}>;
|
|
60
|
+
ruleReferences: z.ZodArray<z.ZodString>;
|
|
61
|
+
explicitReviewRequired: z.ZodBoolean;
|
|
62
|
+
}, z.core.$strict>>;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
changeEnvelopes: z.ZodArray<z.ZodObject<{
|
|
65
|
+
source: z.ZodLiteral<"caller-supplied">;
|
|
66
|
+
envelopeId: z.ZodNullable<z.ZodString>;
|
|
67
|
+
patchReference: z.ZodNullable<z.ZodString>;
|
|
68
|
+
patchDigest: z.ZodNullable<z.ZodString>;
|
|
69
|
+
linkedRunReferences: z.ZodArray<z.ZodString>;
|
|
70
|
+
schemaValid: z.ZodBoolean;
|
|
71
|
+
integrity: z.ZodEnum<{
|
|
72
|
+
invalid: "invalid";
|
|
73
|
+
valid: "valid";
|
|
74
|
+
}>;
|
|
75
|
+
expiration: z.ZodEnum<{
|
|
76
|
+
current: "current";
|
|
77
|
+
expired: "expired";
|
|
78
|
+
"not-yet-valid": "not-yet-valid";
|
|
79
|
+
unknown: "unknown";
|
|
80
|
+
}>;
|
|
81
|
+
checkedAt: z.ZodISODateTime;
|
|
82
|
+
expiredApprovals: z.ZodNumber;
|
|
83
|
+
authenticity: z.ZodLiteral<"not-verified">;
|
|
84
|
+
patchBytes: z.ZodLiteral<"not-verified">;
|
|
85
|
+
}, z.core.$strict>>;
|
|
86
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
87
|
+
reference: z.ZodString;
|
|
88
|
+
parentReference: z.ZodNullable<z.ZodString>;
|
|
89
|
+
revision: z.ZodNullable<z.ZodNumber>;
|
|
90
|
+
status: z.ZodEnum<{
|
|
91
|
+
cancel_requested: "cancel_requested";
|
|
92
|
+
cancelled: "cancelled";
|
|
93
|
+
completed: "completed";
|
|
94
|
+
created: "created";
|
|
95
|
+
failed: "failed";
|
|
96
|
+
running: "running";
|
|
97
|
+
timed_out: "timed_out";
|
|
98
|
+
unknown: "unknown";
|
|
99
|
+
waiting_approval: "waiting_approval";
|
|
100
|
+
}>;
|
|
101
|
+
finalized: z.ZodBoolean;
|
|
102
|
+
failure: z.ZodNullable<z.ZodEnum<{
|
|
103
|
+
cancelled: "cancelled";
|
|
104
|
+
not_reported: "not_reported";
|
|
105
|
+
run_failed: "run_failed";
|
|
106
|
+
timed_out: "timed_out";
|
|
107
|
+
}>>;
|
|
108
|
+
failureDetails: z.ZodObject<{
|
|
109
|
+
providerToolReason: z.ZodNullable<z.ZodEnum<{
|
|
110
|
+
arguments_too_large: "arguments_too_large";
|
|
111
|
+
empty_arguments: "empty_arguments";
|
|
112
|
+
incomplete_arguments: "incomplete_arguments";
|
|
113
|
+
inconsistent_metadata: "inconsistent_metadata";
|
|
114
|
+
invalid_json: "invalid_json";
|
|
115
|
+
response_failed: "response_failed";
|
|
116
|
+
response_incomplete: "response_incomplete";
|
|
117
|
+
stream_truncated: "stream_truncated";
|
|
118
|
+
}>>;
|
|
119
|
+
diagnosticReference: z.ZodNullable<z.ZodString>;
|
|
120
|
+
deliveryReason: z.ZodNullable<z.ZodEnum<{
|
|
121
|
+
TASK_ACCEPTANCE_CHECKS_MISSING: "TASK_ACCEPTANCE_CHECKS_MISSING";
|
|
122
|
+
TASK_ACCEPTANCE_DELIVERY_DRIFT: "TASK_ACCEPTANCE_DELIVERY_DRIFT";
|
|
123
|
+
TASK_ACCEPTANCE_DELIVERY_INSPECTION_FAILED: "TASK_ACCEPTANCE_DELIVERY_INSPECTION_FAILED";
|
|
124
|
+
TASK_ACCEPTANCE_HUMAN_REVIEW_REQUIRED: "TASK_ACCEPTANCE_HUMAN_REVIEW_REQUIRED";
|
|
125
|
+
TASK_ACCEPTANCE_IMPORT_UNCONFIRMED: "TASK_ACCEPTANCE_IMPORT_UNCONFIRMED";
|
|
126
|
+
TASK_ACCEPTANCE_NO_DELIVERY_EVIDENCE: "TASK_ACCEPTANCE_NO_DELIVERY_EVIDENCE";
|
|
127
|
+
TASK_ACCEPTANCE_RUN_NOT_COMPLETED: "TASK_ACCEPTANCE_RUN_NOT_COMPLETED";
|
|
128
|
+
TASK_ACCEPTANCE_RUN_NOT_FINISHED: "TASK_ACCEPTANCE_RUN_NOT_FINISHED";
|
|
129
|
+
TASK_ACCEPTANCE_SCOPE_VIOLATION: "TASK_ACCEPTANCE_SCOPE_VIOLATION";
|
|
130
|
+
TASK_ACCEPTANCE_VERIFIED: "TASK_ACCEPTANCE_VERIFIED";
|
|
131
|
+
}>>;
|
|
132
|
+
}, z.core.$strict>;
|
|
133
|
+
identity: z.ZodLiteral<"not-verified">;
|
|
134
|
+
runtimePolicy: z.ZodNullable<z.ZodEnum<{
|
|
135
|
+
"assistant-v3-durable-closure": "assistant-v3-durable-closure";
|
|
136
|
+
}>>;
|
|
137
|
+
contract: z.ZodObject<{
|
|
138
|
+
availability: z.ZodEnum<{
|
|
139
|
+
invalid: "invalid";
|
|
140
|
+
recorded: "recorded";
|
|
141
|
+
unavailable: "unavailable";
|
|
142
|
+
}>;
|
|
143
|
+
digest: z.ZodNullable<z.ZodString>;
|
|
144
|
+
revision: z.ZodNullable<z.ZodNumber>;
|
|
145
|
+
requiredChecks: z.ZodNullable<z.ZodNumber>;
|
|
146
|
+
humanReviewsPending: z.ZodNullable<z.ZodNumber>;
|
|
147
|
+
allowedWritePathReferences: z.ZodArray<z.ZodString>;
|
|
148
|
+
protectedPathReferences: z.ZodArray<z.ZodString>;
|
|
149
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
150
|
+
reference: z.ZodString;
|
|
151
|
+
argvDigest: z.ZodString;
|
|
152
|
+
kind: z.ZodEnum<{
|
|
153
|
+
argv: "argv";
|
|
154
|
+
"package-script": "package-script";
|
|
155
|
+
}>;
|
|
156
|
+
backend: z.ZodEnum<{
|
|
157
|
+
none: "none";
|
|
158
|
+
oci: "oci";
|
|
159
|
+
}>;
|
|
160
|
+
approval: z.ZodLiteral<"required">;
|
|
161
|
+
}, z.core.$strict>>;
|
|
162
|
+
humanReviewReferences: z.ZodArray<z.ZodString>;
|
|
163
|
+
}, z.core.$strict>;
|
|
164
|
+
delivery: z.ZodObject<{
|
|
165
|
+
availability: z.ZodEnum<{
|
|
166
|
+
invalid: "invalid";
|
|
167
|
+
recorded: "recorded";
|
|
168
|
+
unavailable: "unavailable";
|
|
169
|
+
}>;
|
|
170
|
+
status: z.ZodEnum<{
|
|
171
|
+
failed: "failed";
|
|
172
|
+
incomplete: "incomplete";
|
|
173
|
+
pending: "pending";
|
|
174
|
+
pending_review: "pending_review";
|
|
175
|
+
unknown: "unknown";
|
|
176
|
+
verified: "verified";
|
|
177
|
+
}>;
|
|
178
|
+
patchId: z.ZodNullable<z.ZodString>;
|
|
179
|
+
snapshotDigest: z.ZodNullable<z.ZodString>;
|
|
180
|
+
interpretation: z.ZodLiteral<"recorded-checkpoint-not-current-workspace-verification">;
|
|
181
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
182
|
+
reference: z.ZodString;
|
|
183
|
+
argvDigest: z.ZodString;
|
|
184
|
+
patchId: z.ZodString;
|
|
185
|
+
snapshotDigest: z.ZodString;
|
|
186
|
+
exitCode: z.ZodNumber;
|
|
187
|
+
timedOut: z.ZodBoolean;
|
|
188
|
+
unchanged: z.ZodBoolean;
|
|
189
|
+
}, z.core.$strict>>;
|
|
190
|
+
}, z.core.$strict>;
|
|
191
|
+
approvals: z.ZodObject<{
|
|
192
|
+
availability: z.ZodEnum<{
|
|
193
|
+
invalid: "invalid";
|
|
194
|
+
recorded: "recorded";
|
|
195
|
+
unavailable: "unavailable";
|
|
196
|
+
}>;
|
|
197
|
+
items: z.ZodArray<z.ZodObject<{
|
|
198
|
+
reference: z.ZodString;
|
|
199
|
+
toolReference: z.ZodString;
|
|
200
|
+
approved: z.ZodBoolean;
|
|
201
|
+
origin: z.ZodEnum<{
|
|
202
|
+
application: "application";
|
|
203
|
+
automatic: "automatic";
|
|
204
|
+
interactive: "interactive";
|
|
205
|
+
unknown: "unknown";
|
|
206
|
+
}>;
|
|
207
|
+
channelReference: z.ZodString;
|
|
208
|
+
policyDigest: z.ZodNullable<z.ZodString>;
|
|
209
|
+
status: z.ZodEnum<{
|
|
210
|
+
applied: "applied";
|
|
211
|
+
approved: "approved";
|
|
212
|
+
failed: "failed";
|
|
213
|
+
rejected: "rejected";
|
|
214
|
+
succeeded: "succeeded";
|
|
215
|
+
unknown: "unknown";
|
|
216
|
+
}>;
|
|
217
|
+
proposalId: z.ZodNullable<z.ZodString>;
|
|
218
|
+
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
219
|
+
timedOut: z.ZodNullable<z.ZodBoolean>;
|
|
220
|
+
effects: z.ZodArray<z.ZodObject<{
|
|
221
|
+
pathReference: z.ZodString;
|
|
222
|
+
beforeDigest: z.ZodNullable<z.ZodString>;
|
|
223
|
+
afterDigest: z.ZodNullable<z.ZodString>;
|
|
224
|
+
}, z.core.$strict>>;
|
|
225
|
+
}, z.core.$strict>>;
|
|
226
|
+
}, z.core.$strict>;
|
|
227
|
+
usage: z.ZodObject<{
|
|
228
|
+
availability: z.ZodEnum<{
|
|
229
|
+
recorded: "recorded";
|
|
230
|
+
unavailable: "unavailable";
|
|
231
|
+
}>;
|
|
232
|
+
calls: z.ZodNullable<z.ZodNumber>;
|
|
233
|
+
inputTokens: z.ZodNullable<z.ZodNumber>;
|
|
234
|
+
outputTokens: z.ZodNullable<z.ZodNumber>;
|
|
235
|
+
complete: z.ZodNullable<z.ZodBoolean>;
|
|
236
|
+
estimatedUsd: z.ZodNullable<z.ZodNumber>;
|
|
237
|
+
costKind: z.ZodLiteral<"estimate-not-invoice">;
|
|
238
|
+
}, z.core.$strict>;
|
|
239
|
+
journal: z.ZodObject<{
|
|
240
|
+
availability: z.ZodEnum<{
|
|
241
|
+
recorded: "recorded";
|
|
242
|
+
unavailable: "unavailable";
|
|
243
|
+
}>;
|
|
244
|
+
entries: z.ZodNumber;
|
|
245
|
+
failed: z.ZodNumber;
|
|
246
|
+
unfinished: z.ZodNumber;
|
|
247
|
+
}, z.core.$strict>;
|
|
248
|
+
delegations: z.ZodObject<{
|
|
249
|
+
availability: z.ZodEnum<{
|
|
250
|
+
invalid: "invalid";
|
|
251
|
+
recorded: "recorded";
|
|
252
|
+
unavailable: "unavailable";
|
|
253
|
+
}>;
|
|
254
|
+
interpretation: z.ZodLiteral<"recorded-checkpoint-not-semantic-review">;
|
|
255
|
+
items: z.ZodArray<z.ZodObject<{
|
|
256
|
+
taskReference: z.ZodString;
|
|
257
|
+
childReference: z.ZodNullable<z.ZodString>;
|
|
258
|
+
recordedAcceptance: z.ZodBoolean;
|
|
259
|
+
reason: z.ZodEnum<{
|
|
260
|
+
child_identity_unavailable: "child_identity_unavailable";
|
|
261
|
+
coverage_missing: "coverage_missing";
|
|
262
|
+
duplicate_claim: "duplicate_claim";
|
|
263
|
+
evidence_missing: "evidence_missing";
|
|
264
|
+
incomplete: "incomplete";
|
|
265
|
+
invalid_json: "invalid_json";
|
|
266
|
+
invalid_schema: "invalid_schema";
|
|
267
|
+
missing_child: "missing_child";
|
|
268
|
+
path_denied: "path_denied";
|
|
269
|
+
task_mismatch: "task_mismatch";
|
|
270
|
+
valid: "valid";
|
|
271
|
+
}>;
|
|
272
|
+
semanticReview: z.ZodEnum<{
|
|
273
|
+
not_requested: "not_requested";
|
|
274
|
+
pending: "pending";
|
|
275
|
+
}>;
|
|
276
|
+
correctionsUsed: z.ZodNullable<z.ZodNumber>;
|
|
277
|
+
}, z.core.$strict>>;
|
|
278
|
+
}, z.core.$strict>;
|
|
279
|
+
children: z.ZodArray<z.ZodString>;
|
|
280
|
+
}, z.core.$strict>>;
|
|
281
|
+
missingChildren: z.ZodArray<z.ZodString>;
|
|
282
|
+
limitations: z.ZodArray<z.ZodEnum<{
|
|
283
|
+
invalid_approvals: "invalid_approvals";
|
|
284
|
+
invalid_contract: "invalid_contract";
|
|
285
|
+
invalid_delivery: "invalid_delivery";
|
|
286
|
+
journal_unavailable: "journal_unavailable";
|
|
287
|
+
missing_child: "missing_child";
|
|
288
|
+
tree_limit: "tree_limit";
|
|
289
|
+
}>>;
|
|
290
|
+
}, z.core.$strict>;
|
|
291
|
+
export type HarnessGovernanceReport = z.infer<typeof harnessGovernanceReportSchema>;
|
|
292
|
+
export interface HarnessGovernanceOptions {
|
|
293
|
+
session?: GovernanceSessionSource;
|
|
294
|
+
changeEnvelopes?: readonly unknown[];
|
|
295
|
+
now?: number;
|
|
296
|
+
}
|
|
297
|
+
/** Read-only store projection. Refuses concurrent revision changes and excessive journals. */
|
|
298
|
+
export declare function exportHarnessGovernanceReport(store: AgentRunStore, scope: AgentStoreScope | undefined, runId: string, options?: HarnessGovernanceOptions): Promise<HarnessGovernanceReport>;
|
|
299
|
+
export declare function renderHarnessGovernanceMarkdown(input: unknown): string;
|