open-multi-agent-kit 0.90.7 → 0.90.9
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 +52 -0
- package/README.md +17 -10
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +5 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/commands/doctor-provider-cli.d.ts +33 -0
- package/dist/commands/doctor-provider-cli.d.ts.map +1 -0
- package/dist/commands/doctor-provider-cli.js +215 -0
- package/dist/commands/doctor-provider-cli.js.map +1 -0
- package/dist/commands/doctor-provider-transport.d.ts +35 -0
- package/dist/commands/doctor-provider-transport.d.ts.map +1 -0
- package/dist/commands/doctor-provider-transport.js +185 -0
- package/dist/commands/doctor-provider-transport.js.map +1 -0
- package/dist/commands/doctor-provider.d.ts +121 -7
- package/dist/commands/doctor-provider.d.ts.map +1 -1
- package/dist/commands/doctor-provider.js +1295 -102
- package/dist/commands/doctor-provider.js.map +1 -1
- package/dist/commands/session-doctor-cli.d.ts +43 -0
- package/dist/commands/session-doctor-cli.d.ts.map +1 -0
- package/dist/commands/session-doctor-cli.js +494 -0
- package/dist/commands/session-doctor-cli.js.map +1 -0
- package/dist/commands/verify-ci.d.ts +21 -0
- package/dist/commands/verify-ci.d.ts.map +1 -0
- package/dist/commands/verify-ci.js +66 -0
- package/dist/commands/verify-ci.js.map +1 -0
- package/dist/core/agent-session-services.d.ts +3 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +3 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +116 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +1015 -71
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/agent-tool-settings.d.ts +35 -0
- package/dist/core/agent-tool-settings.d.ts.map +1 -0
- package/dist/core/agent-tool-settings.js +155 -0
- package/dist/core/agent-tool-settings.js.map +1 -0
- package/dist/core/atomic-session-file.d.ts +14 -0
- package/dist/core/atomic-session-file.d.ts.map +1 -0
- package/dist/core/atomic-session-file.js +104 -0
- package/dist/core/atomic-session-file.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +6 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +12 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/hysteresis.d.ts +27 -0
- package/dist/core/compaction/hysteresis.d.ts.map +1 -0
- package/dist/core/compaction/hysteresis.js +84 -0
- package/dist/core/compaction/hysteresis.js.map +1 -0
- package/dist/core/compaction/index.d.ts +2 -0
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +2 -0
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/compaction/transaction.d.ts +172 -0
- package/dist/core/compaction/transaction.d.ts.map +1 -0
- package/dist/core/compaction/transaction.js +824 -0
- package/dist/core/compaction/transaction.js.map +1 -0
- package/dist/core/context-budget-governor-v2.d.ts +2 -1
- package/dist/core/context-budget-governor-v2.d.ts.map +1 -1
- package/dist/core/context-budget-governor-v2.js +2 -1
- package/dist/core/context-budget-governor-v2.js.map +1 -1
- package/dist/core/context-budget-headroom.d.ts.map +1 -1
- package/dist/core/context-budget-headroom.js +5 -1
- package/dist/core/context-budget-headroom.js.map +1 -1
- package/dist/core/context-budget-reserved-tokens.d.ts +110 -0
- package/dist/core/context-budget-reserved-tokens.d.ts.map +1 -0
- package/dist/core/context-budget-reserved-tokens.js +188 -0
- package/dist/core/context-budget-reserved-tokens.js.map +1 -0
- package/dist/core/context-budget-v2-cache-invalidation.d.ts +133 -0
- package/dist/core/context-budget-v2-cache-invalidation.d.ts.map +1 -0
- package/dist/core/context-budget-v2-cache-invalidation.js +452 -0
- package/dist/core/context-budget-v2-cache-invalidation.js.map +1 -0
- package/dist/core/context-budget-v2-cache-keys.d.ts +3 -0
- package/dist/core/context-budget-v2-cache-keys.d.ts.map +1 -1
- package/dist/core/context-budget-v2-cache-keys.js +6 -0
- package/dist/core/context-budget-v2-cache-keys.js.map +1 -1
- package/dist/core/context-budget-v2-cache-provider.d.ts +8 -2
- package/dist/core/context-budget-v2-cache-provider.d.ts.map +1 -1
- package/dist/core/context-budget-v2-cache-provider.js +28 -5
- package/dist/core/context-budget-v2-cache-provider.js.map +1 -1
- package/dist/core/context-budget-v2-plan-cache-keys.d.ts.map +1 -1
- package/dist/core/context-budget-v2-plan-cache-keys.js +1 -0
- package/dist/core/context-budget-v2-plan-cache-keys.js.map +1 -1
- package/dist/core/context-budget-v2-planner.d.ts.map +1 -1
- package/dist/core/context-budget-v2-planner.js +1 -0
- package/dist/core/context-budget-v2-planner.js.map +1 -1
- package/dist/core/context-budget-v2-selection.d.ts.map +1 -1
- package/dist/core/context-budget-v2-selection.js +9 -0
- package/dist/core/context-budget-v2-selection.js.map +1 -1
- package/dist/core/context-budget-v2-types.d.ts +4 -0
- package/dist/core/context-budget-v2-types.d.ts.map +1 -1
- package/dist/core/context-budget-v2-types.js.map +1 -1
- package/dist/core/durable-file-directory.d.ts +4 -0
- package/dist/core/durable-file-directory.d.ts.map +1 -0
- package/dist/core/durable-file-directory.js +76 -0
- package/dist/core/durable-file-directory.js.map +1 -0
- package/dist/core/durable-file-identity.d.ts +26 -0
- package/dist/core/durable-file-identity.d.ts.map +1 -0
- package/dist/core/durable-file-identity.js +118 -0
- package/dist/core/durable-file-identity.js.map +1 -0
- package/dist/core/durable-file-io.d.ts +29 -0
- package/dist/core/durable-file-io.d.ts.map +1 -0
- package/dist/core/durable-file-io.js +179 -0
- package/dist/core/durable-file-io.js.map +1 -0
- package/dist/core/durable-file-lock-cleanup.d.ts +12 -0
- package/dist/core/durable-file-lock-cleanup.d.ts.map +1 -0
- package/dist/core/durable-file-lock-cleanup.js +39 -0
- package/dist/core/durable-file-lock-cleanup.js.map +1 -0
- package/dist/core/durable-file-lock-owner.d.ts +18 -0
- package/dist/core/durable-file-lock-owner.d.ts.map +1 -0
- package/dist/core/durable-file-lock-owner.js +78 -0
- package/dist/core/durable-file-lock-owner.js.map +1 -0
- package/dist/core/durable-file-lock-storage.d.ts +35 -0
- package/dist/core/durable-file-lock-storage.d.ts.map +1 -0
- package/dist/core/durable-file-lock-storage.js +263 -0
- package/dist/core/durable-file-lock-storage.js.map +1 -0
- package/dist/core/durable-file-mode.d.ts +8 -0
- package/dist/core/durable-file-mode.d.ts.map +1 -0
- package/dist/core/durable-file-mode.js +41 -0
- package/dist/core/durable-file-mode.js.map +1 -0
- package/dist/core/extensions/loader.d.ts +12 -0
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +50 -37
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/index.d.ts +6 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +5 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/loop-gates.d.ts.map +1 -1
- package/dist/core/loop-gates.js +25 -1
- package/dist/core/loop-gates.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/pi-package-intake.d.ts +1 -0
- package/dist/core/pi-package-intake.d.ts.map +1 -1
- package/dist/core/pi-package-intake.js +7 -0
- package/dist/core/pi-package-intake.js.map +1 -1
- package/dist/core/redaction.d.ts +8 -0
- package/dist/core/redaction.d.ts.map +1 -0
- package/dist/core/redaction.js +31 -0
- package/dist/core/redaction.js.map +1 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +36 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/run-journal-store.d.ts +53 -0
- package/dist/core/run-journal-store.d.ts.map +1 -0
- package/dist/core/run-journal-store.js +278 -0
- package/dist/core/run-journal-store.js.map +1 -0
- package/dist/core/run-journal.d.ts +172 -0
- package/dist/core/run-journal.d.ts.map +1 -0
- package/dist/core/run-journal.js +1053 -0
- package/dist/core/run-journal.js.map +1 -0
- package/dist/core/sdk.d.ts +7 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +94 -3
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-doctor-plan.d.ts +128 -0
- package/dist/core/session-doctor-plan.d.ts.map +1 -0
- package/dist/core/session-doctor-plan.js +833 -0
- package/dist/core/session-doctor-plan.js.map +1 -0
- package/dist/core/session-file-compaction.d.ts +6 -0
- package/dist/core/session-file-compaction.d.ts.map +1 -0
- package/dist/core/session-file-compaction.js +169 -0
- package/dist/core/session-file-compaction.js.map +1 -0
- package/dist/core/session-file-head.d.ts +10 -0
- package/dist/core/session-file-head.d.ts.map +1 -0
- package/dist/core/session-file-head.js +78 -0
- package/dist/core/session-file-head.js.map +1 -0
- package/dist/core/session-file-persistence.d.ts +30 -0
- package/dist/core/session-file-persistence.d.ts.map +1 -0
- package/dist/core/session-file-persistence.js +106 -0
- package/dist/core/session-file-persistence.js.map +1 -0
- package/dist/core/session-integrity.d.ts +43 -0
- package/dist/core/session-integrity.d.ts.map +1 -0
- package/dist/core/session-integrity.js +420 -0
- package/dist/core/session-integrity.js.map +1 -0
- package/dist/core/session-manager.d.ts +24 -4
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +242 -125
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-owner-lease.d.ts +22 -0
- package/dist/core/session-owner-lease.d.ts.map +1 -0
- package/dist/core/session-owner-lease.js +176 -0
- package/dist/core/session-owner-lease.js.map +1 -0
- package/dist/core/session-path-policy.d.ts +132 -0
- package/dist/core/session-path-policy.d.ts.map +1 -0
- package/dist/core/session-path-policy.js +780 -0
- package/dist/core/session-path-policy.js.map +1 -0
- package/dist/core/session-repair-plan.d.ts +49 -0
- package/dist/core/session-repair-plan.d.ts.map +1 -0
- package/dist/core/session-repair-plan.js +202 -0
- package/dist/core/session-repair-plan.js.map +1 -0
- package/dist/core/session-termination.d.ts +100 -0
- package/dist/core/session-termination.d.ts.map +1 -0
- package/dist/core/session-termination.js +403 -0
- package/dist/core/session-termination.js.map +1 -0
- package/dist/core/settings-manager.d.ts +32 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +52 -5
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/verified-bash-adapter.d.ts +36 -0
- package/dist/core/verified-bash-adapter.d.ts.map +1 -0
- package/dist/core/verified-bash-adapter.js +90 -0
- package/dist/core/verified-bash-adapter.js.map +1 -0
- package/dist/guardrails/command-redaction.d.ts +32 -0
- package/dist/guardrails/command-redaction.d.ts.map +1 -0
- package/dist/guardrails/command-redaction.js +776 -0
- package/dist/guardrails/command-redaction.js.map +1 -0
- package/dist/guardrails/evidence-attestation.d.ts +31 -0
- package/dist/guardrails/evidence-attestation.d.ts.map +1 -0
- package/dist/guardrails/evidence-attestation.js +178 -0
- package/dist/guardrails/evidence-attestation.js.map +1 -0
- package/dist/guardrails/evidence-receipt-store.d.ts +33 -0
- package/dist/guardrails/evidence-receipt-store.d.ts.map +1 -0
- package/dist/guardrails/evidence-receipt-store.js +446 -0
- package/dist/guardrails/evidence-receipt-store.js.map +1 -0
- package/dist/guardrails/evidence-receipt.d.ts +58 -0
- package/dist/guardrails/evidence-receipt.d.ts.map +1 -0
- package/dist/guardrails/evidence-receipt.js +389 -0
- package/dist/guardrails/evidence-receipt.js.map +1 -0
- package/dist/guardrails/evidence-system.d.ts +40 -9
- package/dist/guardrails/evidence-system.d.ts.map +1 -1
- package/dist/guardrails/evidence-system.js +379 -83
- package/dist/guardrails/evidence-system.js.map +1 -1
- package/dist/guardrails/replay-ledger-io.d.ts +6 -0
- package/dist/guardrails/replay-ledger-io.d.ts.map +1 -0
- package/dist/guardrails/replay-ledger-io.js +42 -0
- package/dist/guardrails/replay-ledger-io.js.map +1 -0
- package/dist/guardrails/replay-ledger-lock-owner.d.ts +32 -0
- package/dist/guardrails/replay-ledger-lock-owner.d.ts.map +1 -0
- package/dist/guardrails/replay-ledger-lock-owner.js +138 -0
- package/dist/guardrails/replay-ledger-lock-owner.js.map +1 -0
- package/dist/guardrails/replay-ledger-lock.d.ts +24 -0
- package/dist/guardrails/replay-ledger-lock.d.ts.map +1 -0
- package/dist/guardrails/replay-ledger-lock.js +135 -0
- package/dist/guardrails/replay-ledger-lock.js.map +1 -0
- package/dist/guardrails/replay-ledger-mutation-gate.d.ts +24 -0
- package/dist/guardrails/replay-ledger-mutation-gate.d.ts.map +1 -0
- package/dist/guardrails/replay-ledger-mutation-gate.js +205 -0
- package/dist/guardrails/replay-ledger-mutation-gate.js.map +1 -0
- package/dist/guardrails/replay-ledger-quarantine.d.ts +2 -0
- package/dist/guardrails/replay-ledger-quarantine.d.ts.map +1 -0
- package/dist/guardrails/replay-ledger-quarantine.js +19 -0
- package/dist/guardrails/replay-ledger-quarantine.js.map +1 -0
- package/dist/guardrails/replay-ledger-store.d.ts +32 -0
- package/dist/guardrails/replay-ledger-store.d.ts.map +1 -0
- package/dist/guardrails/replay-ledger-store.js +211 -0
- package/dist/guardrails/replay-ledger-store.js.map +1 -0
- package/dist/guardrails/shell-command-name-glob.d.ts +3 -0
- package/dist/guardrails/shell-command-name-glob.d.ts.map +1 -0
- package/dist/guardrails/shell-command-name-glob.js +233 -0
- package/dist/guardrails/shell-command-name-glob.js.map +1 -0
- package/dist/guardrails/shell-command-option.d.ts +7 -0
- package/dist/guardrails/shell-command-option.d.ts.map +1 -0
- package/dist/guardrails/shell-command-option.js +24 -0
- package/dist/guardrails/shell-command-option.js.map +1 -0
- package/dist/guardrails/shell-command-tokenizer.d.ts +29 -0
- package/dist/guardrails/shell-command-tokenizer.d.ts.map +1 -0
- package/dist/guardrails/shell-command-tokenizer.js +145 -0
- package/dist/guardrails/shell-command-tokenizer.js.map +1 -0
- package/dist/guardrails/shell-command-wrapper.d.ts +18 -0
- package/dist/guardrails/shell-command-wrapper.d.ts.map +1 -0
- package/dist/guardrails/shell-command-wrapper.js +42 -0
- package/dist/guardrails/shell-command-wrapper.js.map +1 -0
- package/dist/guardrails/verified-executor.d.ts +65 -0
- package/dist/guardrails/verified-executor.d.ts.map +1 -0
- package/dist/guardrails/verified-executor.js +171 -0
- package/dist/guardrails/verified-executor.js.map +1 -0
- package/dist/guardrails/workspace-fingerprint.d.ts +23 -0
- package/dist/guardrails/workspace-fingerprint.d.ts.map +1 -0
- package/dist/guardrails/workspace-fingerprint.js +634 -0
- package/dist/guardrails/workspace-fingerprint.js.map +1 -0
- package/dist/index.d.ts +15 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +12 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-layout.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-layout.js +1 -1
- package/dist/modes/interactive/components/control-panel-layout.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +1 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +59 -9
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +43 -2
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +23 -5
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +3 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/types/evidence.d.ts +215 -1
- package/dist/types/evidence.d.ts.map +1 -1
- package/dist/types/evidence.js.map +1 -1
- package/dist/verify-ci.d.ts +3 -0
- package/dist/verify-ci.d.ts.map +1 -0
- package/dist/verify-ci.js +30 -0
- package/dist/verify-ci.js.map +1 -0
- package/docs/compaction.md +44 -4
- package/docs/extensions.md +2 -0
- package/docs/providers.md +6 -0
- package/docs/sdk.md +238 -1
- package/docs/settings.md +67 -4
- package/docs/usage.md +38 -0
- package/examples/extensions/correctness-wall/README.md +6 -6
- package/examples/extensions/correctness-wall/index.ts +37 -11
- package/examples/extensions/custom-provider-anthropic/package-lock.json +5 -5
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +4 -4
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
package/dist/types/evidence.d.ts
CHANGED
|
@@ -21,6 +21,13 @@ export interface EvidenceItem {
|
|
|
21
21
|
timestamp: string;
|
|
22
22
|
/** Whether the evidence is available. */
|
|
23
23
|
status: EvidenceStatus;
|
|
24
|
+
/** Receipt v3 metadata consumed by receipt-aware evidence gates. */
|
|
25
|
+
receiptId?: string;
|
|
26
|
+
receiptSchemaVersion?: 3;
|
|
27
|
+
/** Domain-separated digest of the exact structured command descriptor. */
|
|
28
|
+
receiptCommandSha256?: Sha256Hex;
|
|
29
|
+
/** Lane that executed the verification command, when lane-scoped. */
|
|
30
|
+
receiptLaneId?: string;
|
|
24
31
|
/** Reason if evidence is missing or waived. */
|
|
25
32
|
gapReason?: string;
|
|
26
33
|
}
|
|
@@ -40,7 +47,191 @@ export interface TaskContract {
|
|
|
40
47
|
/** ISO-8601 timestamp of last update. */
|
|
41
48
|
updatedAt: string;
|
|
42
49
|
}
|
|
43
|
-
export type ReplayEventType = "session_start" | "tool_call" | "tool_result" | "message" | "guardrail_decision" | "lane_grant" | "merge_attempt" | "merge_blocked" | "evidence_gathered" | "contract_created" | "contract_updated" | "checkpoint" | "error";
|
|
50
|
+
export type ReplayEventType = "session_start" | "tool_call" | "tool_result" | "message" | "guardrail_decision" | "lane_grant" | "merge_attempt" | "merge_blocked" | "evidence_gathered" | "evidence_receipt" | "contract_created" | "contract_updated" | "checkpoint" | "error" | "transcript_repaired" | "tool_timeout" | "tool_late_settlement" | "workspace_mutation";
|
|
51
|
+
/**
|
|
52
|
+
* Payload contract for `workspace_mutation` replay events. Emitters live in the
|
|
53
|
+
* agent runtime; evidence gates consume these fail-closed: an event whose payload
|
|
54
|
+
* does not provably target other paths in the same workspace root is treated as
|
|
55
|
+
* relevant to every scope.
|
|
56
|
+
*/
|
|
57
|
+
export interface WorkspaceMutationReplayPayload {
|
|
58
|
+
/** Absolute workspace root the mutation applies to. */
|
|
59
|
+
readonly root: string;
|
|
60
|
+
/** Root-relative normalized paths that were mutated; empty means unknown/whole workspace. */
|
|
61
|
+
readonly paths: readonly string[];
|
|
62
|
+
}
|
|
63
|
+
declare const SHA256_HEX_BRAND: unique symbol;
|
|
64
|
+
/** A validated lowercase SHA-256 digest encoded as exactly 64 hexadecimal characters. */
|
|
65
|
+
export type Sha256Hex = string & {
|
|
66
|
+
readonly [SHA256_HEX_BRAND]: "sha256-hex";
|
|
67
|
+
};
|
|
68
|
+
export interface ArgvCommandDescriptor {
|
|
69
|
+
readonly kind: "argv";
|
|
70
|
+
/** Exact executable identity supplied by the caller. */
|
|
71
|
+
readonly executable: string;
|
|
72
|
+
/** Exact argument boundaries; values are never joined or whitespace-normalized. */
|
|
73
|
+
readonly argv: readonly string[];
|
|
74
|
+
}
|
|
75
|
+
export interface ShellCommandDescriptor {
|
|
76
|
+
readonly kind: "shell";
|
|
77
|
+
/** Exact shell identity supplied by the caller. */
|
|
78
|
+
readonly shell: string;
|
|
79
|
+
/** Exact script bytes decoded as a string; whitespace is significant. */
|
|
80
|
+
readonly script: string;
|
|
81
|
+
}
|
|
82
|
+
export type EvidenceCommandDescriptor = ArgvCommandDescriptor | ShellCommandDescriptor;
|
|
83
|
+
export interface MissingArtifactState {
|
|
84
|
+
readonly path: string;
|
|
85
|
+
readonly state: "missing";
|
|
86
|
+
}
|
|
87
|
+
export interface FileArtifactState {
|
|
88
|
+
readonly path: string;
|
|
89
|
+
readonly state: "file";
|
|
90
|
+
readonly sha256: Sha256Hex;
|
|
91
|
+
readonly size: number;
|
|
92
|
+
}
|
|
93
|
+
export type ArtifactState = MissingArtifactState | FileArtifactState;
|
|
94
|
+
/** Trusted caller-selected workspace root and root-relative artifact set. */
|
|
95
|
+
export interface WorkspaceScope {
|
|
96
|
+
readonly root: string;
|
|
97
|
+
readonly artifactPaths: readonly string[];
|
|
98
|
+
}
|
|
99
|
+
/** A point-in-time digest of only the selected artifact set; not an immutable-workspace proof. */
|
|
100
|
+
export interface ArtifactSetWorkspaceFingerprint {
|
|
101
|
+
readonly kind: "artifact-set";
|
|
102
|
+
readonly scope: WorkspaceScope;
|
|
103
|
+
readonly artifacts: readonly ArtifactState[];
|
|
104
|
+
readonly manifestSha256: Sha256Hex;
|
|
105
|
+
}
|
|
106
|
+
/** Scope-limited Git workspace facts committed by a git-kind fingerprint. */
|
|
107
|
+
export interface GitWorkspaceState {
|
|
108
|
+
/** Full hex object name of HEAD, or null while HEAD is unborn. */
|
|
109
|
+
readonly headCommit: string | null;
|
|
110
|
+
/** Sorted root-relative paths git reports changed (staged, unstaged, or untracked) within scope. */
|
|
111
|
+
readonly changedPaths: readonly string[];
|
|
112
|
+
/** SHA-256 of the scope-limited staged diff bytes (index vs HEAD). */
|
|
113
|
+
readonly stagedDiffSha256: Sha256Hex;
|
|
114
|
+
/** SHA-256 of the scope-limited unstaged diff bytes (work tree vs index). */
|
|
115
|
+
readonly unstagedDiffSha256: Sha256Hex;
|
|
116
|
+
/** Canonical digest committing changed paths, both diff digests, and every selected artifact state. */
|
|
117
|
+
readonly dirtySha256: Sha256Hex;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* A point-in-time digest of a Git work-tree root: HEAD, scope-limited staged and
|
|
121
|
+
* unstaged diffs, and direct states for every selected path. Direct states keep
|
|
122
|
+
* ignored and index-flagged work-tree bytes content-bound independently of Git.
|
|
123
|
+
*/
|
|
124
|
+
export interface GitWorkspaceFingerprint {
|
|
125
|
+
readonly kind: "git";
|
|
126
|
+
readonly scope: WorkspaceScope;
|
|
127
|
+
readonly artifacts: readonly ArtifactState[];
|
|
128
|
+
readonly git: GitWorkspaceState;
|
|
129
|
+
readonly manifestSha256: Sha256Hex;
|
|
130
|
+
}
|
|
131
|
+
export type WorkspaceFingerprint = ArtifactSetWorkspaceFingerprint | GitWorkspaceFingerprint;
|
|
132
|
+
export interface EvidenceOutputDigest {
|
|
133
|
+
readonly sha256: Sha256Hex;
|
|
134
|
+
readonly byteCount: number;
|
|
135
|
+
}
|
|
136
|
+
/** Digests only; receipt v3 never carries raw output or excerpts. */
|
|
137
|
+
export interface EvidenceOutputCapture {
|
|
138
|
+
readonly redactionPolicyId: string;
|
|
139
|
+
readonly stdout: EvidenceOutputDigest;
|
|
140
|
+
readonly stderr: EvidenceOutputDigest;
|
|
141
|
+
}
|
|
142
|
+
/** CLI form that produced one or more `[REDACTED]` placeholders in a persisted command. */
|
|
143
|
+
export type CommandRedactionPlaceholderType = "api-key-header" | "authorization-header" | "basic-auth" | "bearer-token" | "cli-option-inline" | "cli-option-value" | "cookie-header" | "env-assignment" | "known-token" | "url-credential" | "url-query";
|
|
144
|
+
export interface CommandRedactionPlaceholder {
|
|
145
|
+
readonly type: CommandRedactionPlaceholderType;
|
|
146
|
+
readonly count: number;
|
|
147
|
+
}
|
|
148
|
+
/** Bounded description of the placeholders applied to a persisted redacted command. */
|
|
149
|
+
export interface CommandRedactionSummary {
|
|
150
|
+
readonly policyId: string;
|
|
151
|
+
/** Unique types in ascending order; empty when nothing was redacted. */
|
|
152
|
+
readonly placeholders: readonly CommandRedactionPlaceholder[];
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Keyed commitment to the original (pre-redaction) command. The HMAC key is
|
|
156
|
+
* process-internal and never persisted or exported, so this value is not
|
|
157
|
+
* verifiable (and not brute-forceable) outside the executing trust boundary.
|
|
158
|
+
*/
|
|
159
|
+
export interface CommandHmacBinding {
|
|
160
|
+
readonly algorithm: "hmac-sha256";
|
|
161
|
+
/** Identifies the ephemeral process key generation, not the key itself. */
|
|
162
|
+
readonly keyId: string;
|
|
163
|
+
/** Per-binding random nonce; makes persisted MACs non-comparable. */
|
|
164
|
+
readonly nonce: string;
|
|
165
|
+
readonly mac: Sha256Hex;
|
|
166
|
+
}
|
|
167
|
+
export type EvidenceReceiptStatus = "passed" | "failed" | "timeout" | "aborted";
|
|
168
|
+
export type EvidenceReceiptDisposition = {
|
|
169
|
+
readonly status: "passed";
|
|
170
|
+
readonly exitCode: 0;
|
|
171
|
+
} | {
|
|
172
|
+
readonly status: "failed";
|
|
173
|
+
readonly exitCode: number;
|
|
174
|
+
} | {
|
|
175
|
+
readonly status: "timeout";
|
|
176
|
+
readonly exitCode: null;
|
|
177
|
+
} | {
|
|
178
|
+
readonly status: "aborted";
|
|
179
|
+
readonly exitCode: null;
|
|
180
|
+
};
|
|
181
|
+
export type EvidenceExecutor = "bash-tool" | "ci-runner" | "mcp" | "internal";
|
|
182
|
+
export interface EvidenceReceiptCoreFields {
|
|
183
|
+
readonly schemaVersion: 3;
|
|
184
|
+
readonly receiptId: string;
|
|
185
|
+
readonly goalId: string;
|
|
186
|
+
readonly laneId?: string;
|
|
187
|
+
readonly claim: string;
|
|
188
|
+
readonly command: EvidenceCommandDescriptor;
|
|
189
|
+
readonly cwd: string;
|
|
190
|
+
readonly timeoutMs: number | null;
|
|
191
|
+
readonly startedAt: string;
|
|
192
|
+
readonly finishedAt: string;
|
|
193
|
+
readonly durationMs: number;
|
|
194
|
+
readonly workspaceBefore: WorkspaceFingerprint;
|
|
195
|
+
readonly workspaceAfter: WorkspaceFingerprint;
|
|
196
|
+
readonly output: EvidenceOutputCapture;
|
|
197
|
+
readonly executor: EvidenceExecutor;
|
|
198
|
+
readonly toolCallId?: string;
|
|
199
|
+
/** Redaction metadata for the persisted `command` representation. */
|
|
200
|
+
readonly commandRedaction?: CommandRedactionSummary;
|
|
201
|
+
/** Keyed binding of the ORIGINAL command; required when placeholders were applied. */
|
|
202
|
+
readonly commandBinding?: CommandHmacBinding;
|
|
203
|
+
}
|
|
204
|
+
/** Immutable execution facts. Envelope metadata is deliberately excluded from this core. */
|
|
205
|
+
export type EvidenceReceiptCore = EvidenceReceiptCoreFields & EvidenceReceiptDisposition;
|
|
206
|
+
export interface EvidenceReceiptLedgerBinding {
|
|
207
|
+
readonly seq: number;
|
|
208
|
+
readonly eventHash: Sha256Hex;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Opaque metadata for an attestation verified by a separately configured trust anchor.
|
|
212
|
+
* Its presence alone does not make a receipt trusted proof.
|
|
213
|
+
*/
|
|
214
|
+
export interface TrustedEvidenceAttestation {
|
|
215
|
+
readonly attesterId: string;
|
|
216
|
+
readonly keyId: string;
|
|
217
|
+
readonly algorithm: "ed25519";
|
|
218
|
+
readonly signature: string;
|
|
219
|
+
readonly issuedAt: string;
|
|
220
|
+
}
|
|
221
|
+
export interface EvidenceReceiptEnvelope {
|
|
222
|
+
readonly coreSha256: Sha256Hex;
|
|
223
|
+
readonly ledgerBinding?: EvidenceReceiptLedgerBinding;
|
|
224
|
+
readonly trustedAttestation?: TrustedEvidenceAttestation;
|
|
225
|
+
}
|
|
226
|
+
export interface EvidenceReceipt {
|
|
227
|
+
readonly core: EvidenceReceiptCore;
|
|
228
|
+
readonly envelope: EvidenceReceiptEnvelope;
|
|
229
|
+
}
|
|
230
|
+
/** Replay payload intentionally commits only the immutable core, avoiding a ledger/hash cycle. */
|
|
231
|
+
export interface EvidenceReceiptReplayPayload {
|
|
232
|
+
readonly receiptId: string;
|
|
233
|
+
readonly coreSha256: Sha256Hex;
|
|
234
|
+
}
|
|
44
235
|
export interface ReplayEvent {
|
|
45
236
|
/** Monotonic sequence number within a session. */
|
|
46
237
|
seq: number;
|
|
@@ -56,6 +247,26 @@ export interface ReplayEvent {
|
|
|
56
247
|
payload: unknown;
|
|
57
248
|
/** SHA-256 of the serialized payload for integrity. */
|
|
58
249
|
payloadHash: string;
|
|
250
|
+
/** eventHash of the previous event in the chain ("genesis" for the first event). */
|
|
251
|
+
prevHash: string;
|
|
252
|
+
/** SHA-256 over [seq, type, timestamp, goalId, laneId, payloadHash, prevHash]. */
|
|
253
|
+
eventHash: string;
|
|
254
|
+
}
|
|
255
|
+
export interface ReplayLedgerFileIdentity {
|
|
256
|
+
readonly dev: string;
|
|
257
|
+
readonly ino: string;
|
|
258
|
+
}
|
|
259
|
+
/** Durable CAS tuple published atomically beside the replay JSONL. */
|
|
260
|
+
export interface ReplayLedgerHead {
|
|
261
|
+
readonly fileIdentity: ReplayLedgerFileIdentity | null;
|
|
262
|
+
readonly size: number;
|
|
263
|
+
readonly lastSeq: number;
|
|
264
|
+
readonly lastHash: string;
|
|
265
|
+
}
|
|
266
|
+
/** One chain- and committed-head-verified point-in-time ledger source. */
|
|
267
|
+
export interface VerifiedReplayLedgerSnapshot {
|
|
268
|
+
readonly events: readonly ReplayEvent[];
|
|
269
|
+
readonly head: ReplayLedgerHead;
|
|
59
270
|
}
|
|
60
271
|
export interface ReplayLedger {
|
|
61
272
|
/** Session / goal this ledger belongs to. */
|
|
@@ -68,6 +279,8 @@ export interface ReplayLedger {
|
|
|
68
279
|
lastPersistedSeq: number;
|
|
69
280
|
}
|
|
70
281
|
export type MergeGateStatus = "open" | "blocked" | "conditional";
|
|
282
|
+
/** Compatibility policy for execution-bound evidence receipts. */
|
|
283
|
+
export type EvidenceReceiptMode = "strict" | "prefer" | "legacy";
|
|
71
284
|
export interface MergeGateResult {
|
|
72
285
|
/** Gate identifier. */
|
|
73
286
|
gateId: string;
|
|
@@ -114,4 +327,5 @@ export interface CiReportV2 {
|
|
|
114
327
|
contractVerdict?: string;
|
|
115
328
|
mergeGateStatus?: string;
|
|
116
329
|
}
|
|
330
|
+
export {};
|
|
117
331
|
//# sourceMappingURL=evidence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../src/types/evidence.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,MAAM,gBAAgB,GACzB,SAAS,GACT,QAAQ,GACR,UAAU,GACV,UAAU,GACV,SAAS,GACT,UAAU,GACV,MAAM,GACN,eAAe,CAAC;AAEnB,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEzF,MAAM,WAAW,YAAY;IAC5B,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,MAAM,EAAE,cAAc,CAAC;IACvB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC5B,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC;IACxB,+BAA+B;IAC/B,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,2BAA2B;IAC3B,SAAS,EAAE,MAAM,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AAE,YAAY,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IACjC,uCAAuC;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,0BAA0B;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0BAA0B;IAC1B,UAAU,EAAE,eAAe,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB","sourcesContent":["/**\n * Evidence and verification types for OMK v0.80.3+\n *\n * Defines contracts for agent completion evidence, replay persistence,\n * merge gating, and artifact validation.\n */\n\n// ============================================================================\n// Evidence Contract\n// ============================================================================\n\nexport type EvidenceCategory =\n\t| \"feature\"\n\t| \"bugfix\"\n\t| \"refactor\"\n\t| \"research\"\n\t| \"release\"\n\t| \"security\"\n\t| \"docs\"\n\t| \"orchestration\";\n\nexport type EvidenceStatus = \"pending\" | \"gathering\" | \"satisfied\" | \"failed\" | \"waived\";\n\nexport interface EvidenceItem {\n\t/** What this evidence proves. */\n\tclaim: string;\n\t/** Category of the task. */\n\tcategory: EvidenceCategory;\n\t/** Path to artifact or command that produced it. */\n\tartifactPath?: string;\n\t/** Command that can reproduce the evidence. */\n\tverificationCommand?: string;\n\t/** SHA-256 of the artifact for integrity. */\n\thash?: string;\n\t/** When the evidence was gathered. */\n\ttimestamp: string;\n\t/** Whether the evidence is available. */\n\tstatus: EvidenceStatus;\n\t/** Reason if evidence is missing or waived. */\n\tgapReason?: string;\n}\n\nexport interface TaskContract {\n\t/** Unique task / goal identifier. */\n\tgoalId: string;\n\t/** One-sentence completion claim. */\n\tcompletionClaim: string;\n\t/** Required evidence items. */\n\trequiredEvidence: EvidenceItem[];\n\t/** Remaining risk note. */\n\tfinalRisk: string;\n\t/** Verdict: can the task be considered done? */\n\tverdict: \"pass\" | \"fail\" | \"conditional\";\n\t/** ISO-8601 timestamp of contract creation. */\n\tcreatedAt: string;\n\t/** ISO-8601 timestamp of last update. */\n\tupdatedAt: string;\n}\n\n// ============================================================================\n// Replay Ledger\n// ============================================================================\n\nexport type ReplayEventType =\n\t| \"session_start\"\n\t| \"tool_call\"\n\t| \"tool_result\"\n\t| \"message\"\n\t| \"guardrail_decision\"\n\t| \"lane_grant\"\n\t| \"merge_attempt\"\n\t| \"merge_blocked\"\n\t| \"evidence_gathered\"\n\t| \"contract_created\"\n\t| \"contract_updated\"\n\t| \"checkpoint\"\n\t| \"error\";\n\nexport interface ReplayEvent {\n\t/** Monotonic sequence number within a session. */\n\tseq: number;\n\t/** Event type. */\n\ttype: ReplayEventType;\n\t/** ISO-8601 timestamp. */\n\ttimestamp: string;\n\t/** Goal or session identifier. */\n\tgoalId: string;\n\t/** Optional lane identifier. */\n\tlaneId?: string;\n\t/** Event-specific payload. */\n\tpayload: unknown;\n\t/** SHA-256 of the serialized payload for integrity. */\n\tpayloadHash: string;\n}\n\nexport interface ReplayLedger {\n\t/** Session / goal this ledger belongs to. */\n\tgoalId: string;\n\t/** Ordered event log. */\n\tevents: ReplayEvent[];\n\t/** Path where the ledger is persisted. */\n\tledgerPath: string;\n\t/** Last persisted sequence number. */\n\tlastPersistedSeq: number;\n}\n\n// ============================================================================\n// Merge Gates\n// ============================================================================\n\nexport type MergeGateStatus = \"open\" | \"blocked\" | \"conditional\";\n\nexport interface MergeGateResult {\n\t/** Gate identifier. */\n\tgateId: string;\n\t/** Current status. */\n\tstatus: MergeGateStatus;\n\t/** Human-readable reason. */\n\treason: string;\n\t/** Suggested remediation. */\n\tsuggestion?: string;\n\t/** Evidence that was checked. */\n\tevidenceChecked: EvidenceItem[];\n}\n\nexport interface EvidenceGateCheck {\n\t/** Which evidence item was checked. */\n\tevidenceClaim: string;\n\t/** Whether it is satisfied. */\n\tsatisfied: boolean;\n\t/** Reason if not satisfied. */\n\treason?: string;\n}\n\n// ============================================================================\n// Verify Reporter v2\n// ============================================================================\n\nexport interface OmkVerifyResultV2 {\n\tgoalId: string;\n\tstatus: \"completed\" | \"failed\" | \"blocked\" | \"partial\";\n\tsummary: string;\n\tchangedFiles: string[];\n\tevidence: EvidenceItem[];\n\trisks: string[];\n\tnextAction: string;\n\t/** Associated task contract. */\n\tcontract?: TaskContract;\n\t/** Replay ledger path. */\n\treplayLedgerPath?: string;\n\t/** Merge gate results. */\n\tmergeGates: MergeGateResult[];\n}\n\nexport interface CiReportV2 {\n\tgoalId: string;\n\tstatus: string;\n\tsummary: string;\n\tchangedFilesCount: number;\n\tevidenceCount: number;\n\trisks: string[];\n\tmarkdown: string;\n\tcontractVerdict?: string;\n\tmergeGateStatus?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../src/types/evidence.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,MAAM,gBAAgB,GACzB,SAAS,GACT,QAAQ,GACR,UAAU,GACV,UAAU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IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,eAAe,EAAE,YAAY,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IACjC,uCAAuC;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,0BAA0B;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0BAA0B;IAC1B,UAAU,EAAE,eAAe,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB","sourcesContent":["/**\n * Evidence and verification types for OMK v0.80.3+\n *\n * Defines contracts for agent completion evidence, replay persistence,\n * merge gating, and artifact validation.\n */\n\n// ============================================================================\n// Evidence Contract\n// ============================================================================\n\nexport type EvidenceCategory =\n\t| \"feature\"\n\t| \"bugfix\"\n\t| \"refactor\"\n\t| \"research\"\n\t| \"release\"\n\t| \"security\"\n\t| \"docs\"\n\t| \"orchestration\";\n\nexport type EvidenceStatus = \"pending\" | \"gathering\" | \"satisfied\" | \"failed\" | \"waived\";\n\nexport interface EvidenceItem {\n\t/** What this evidence proves. */\n\tclaim: string;\n\t/** Category of the task. */\n\tcategory: EvidenceCategory;\n\t/** Path to artifact or command that produced it. */\n\tartifactPath?: string;\n\t/** Command that can reproduce the evidence. */\n\tverificationCommand?: string;\n\t/** SHA-256 of the artifact for integrity. */\n\thash?: string;\n\t/** When the evidence was gathered. */\n\ttimestamp: string;\n\t/** Whether the evidence is available. */\n\tstatus: EvidenceStatus;\n\t/** Receipt v3 metadata consumed by receipt-aware evidence gates. */\n\treceiptId?: string;\n\treceiptSchemaVersion?: 3;\n\t/** Domain-separated digest of the exact structured command descriptor. */\n\treceiptCommandSha256?: Sha256Hex;\n\t/** Lane that executed the verification command, when lane-scoped. */\n\treceiptLaneId?: string;\n\t/** Reason if evidence is missing or waived. */\n\tgapReason?: string;\n}\n\nexport interface TaskContract {\n\t/** Unique task / goal identifier. */\n\tgoalId: string;\n\t/** One-sentence completion claim. */\n\tcompletionClaim: string;\n\t/** Required evidence items. */\n\trequiredEvidence: EvidenceItem[];\n\t/** Remaining risk note. */\n\tfinalRisk: string;\n\t/** Verdict: can the task be considered done? */\n\tverdict: \"pass\" | \"fail\" | \"conditional\";\n\t/** ISO-8601 timestamp of contract creation. */\n\tcreatedAt: string;\n\t/** ISO-8601 timestamp of last update. */\n\tupdatedAt: string;\n}\n\n// ============================================================================\n// Replay Ledger\n// ============================================================================\n\nexport type ReplayEventType =\n\t| \"session_start\"\n\t| \"tool_call\"\n\t| \"tool_result\"\n\t| \"message\"\n\t| \"guardrail_decision\"\n\t| \"lane_grant\"\n\t| \"merge_attempt\"\n\t| \"merge_blocked\"\n\t| \"evidence_gathered\"\n\t| \"evidence_receipt\"\n\t| \"contract_created\"\n\t| \"contract_updated\"\n\t| \"checkpoint\"\n\t| \"error\"\n\t| \"transcript_repaired\"\n\t| \"tool_timeout\"\n\t| \"tool_late_settlement\"\n\t| \"workspace_mutation\";\n\n/**\n * Payload contract for `workspace_mutation` replay events. Emitters live in the\n * agent runtime; evidence gates consume these fail-closed: an event whose payload\n * does not provably target other paths in the same workspace root is treated as\n * relevant to every scope.\n */\nexport interface WorkspaceMutationReplayPayload {\n\t/** Absolute workspace root the mutation applies to. */\n\treadonly root: string;\n\t/** Root-relative normalized paths that were mutated; empty means unknown/whole workspace. */\n\treadonly paths: readonly string[];\n}\n\n// ============================================================================\n// Execution-bound evidence receipts (v3)\n// ============================================================================\n\ndeclare const SHA256_HEX_BRAND: unique symbol;\n\n/** A validated lowercase SHA-256 digest encoded as exactly 64 hexadecimal characters. */\nexport type Sha256Hex = string & { readonly [SHA256_HEX_BRAND]: \"sha256-hex\" };\n\nexport interface ArgvCommandDescriptor {\n\treadonly kind: \"argv\";\n\t/** Exact executable identity supplied by the caller. */\n\treadonly executable: string;\n\t/** Exact argument boundaries; values are never joined or whitespace-normalized. */\n\treadonly argv: readonly string[];\n}\n\nexport interface ShellCommandDescriptor {\n\treadonly kind: \"shell\";\n\t/** Exact shell identity supplied by the caller. */\n\treadonly shell: string;\n\t/** Exact script bytes decoded as a string; whitespace is significant. */\n\treadonly script: string;\n}\n\nexport type EvidenceCommandDescriptor = ArgvCommandDescriptor | ShellCommandDescriptor;\n\nexport interface MissingArtifactState {\n\treadonly path: string;\n\treadonly state: \"missing\";\n}\n\nexport interface FileArtifactState {\n\treadonly path: string;\n\treadonly state: \"file\";\n\treadonly sha256: Sha256Hex;\n\treadonly size: number;\n}\n\nexport type ArtifactState = MissingArtifactState | FileArtifactState;\n\n/** Trusted caller-selected workspace root and root-relative artifact set. */\nexport interface WorkspaceScope {\n\treadonly root: string;\n\treadonly artifactPaths: readonly string[];\n}\n\n/** A point-in-time digest of only the selected artifact set; not an immutable-workspace proof. */\nexport interface ArtifactSetWorkspaceFingerprint {\n\treadonly kind: \"artifact-set\";\n\treadonly scope: WorkspaceScope;\n\treadonly artifacts: readonly ArtifactState[];\n\treadonly manifestSha256: Sha256Hex;\n}\n\n/** Scope-limited Git workspace facts committed by a git-kind fingerprint. */\nexport interface GitWorkspaceState {\n\t/** Full hex object name of HEAD, or null while HEAD is unborn. */\n\treadonly headCommit: string | null;\n\t/** Sorted root-relative paths git reports changed (staged, unstaged, or untracked) within scope. */\n\treadonly changedPaths: readonly string[];\n\t/** SHA-256 of the scope-limited staged diff bytes (index vs HEAD). */\n\treadonly stagedDiffSha256: Sha256Hex;\n\t/** SHA-256 of the scope-limited unstaged diff bytes (work tree vs index). */\n\treadonly unstagedDiffSha256: Sha256Hex;\n\t/** Canonical digest committing changed paths, both diff digests, and every selected artifact state. */\n\treadonly dirtySha256: Sha256Hex;\n}\n\n/**\n * A point-in-time digest of a Git work-tree root: HEAD, scope-limited staged and\n * unstaged diffs, and direct states for every selected path. Direct states keep\n * ignored and index-flagged work-tree bytes content-bound independently of Git.\n */\nexport interface GitWorkspaceFingerprint {\n\treadonly kind: \"git\";\n\treadonly scope: WorkspaceScope;\n\treadonly artifacts: readonly ArtifactState[];\n\treadonly git: GitWorkspaceState;\n\treadonly manifestSha256: Sha256Hex;\n}\n\nexport type WorkspaceFingerprint = ArtifactSetWorkspaceFingerprint | GitWorkspaceFingerprint;\n\nexport interface EvidenceOutputDigest {\n\treadonly sha256: Sha256Hex;\n\treadonly byteCount: number;\n}\n\n/** Digests only; receipt v3 never carries raw output or excerpts. */\nexport interface EvidenceOutputCapture {\n\treadonly redactionPolicyId: string;\n\treadonly stdout: EvidenceOutputDigest;\n\treadonly stderr: EvidenceOutputDigest;\n}\n\n/** CLI form that produced one or more `[REDACTED]` placeholders in a persisted command. */\nexport type CommandRedactionPlaceholderType =\n\t| \"api-key-header\"\n\t| \"authorization-header\"\n\t| \"basic-auth\"\n\t| \"bearer-token\"\n\t| \"cli-option-inline\"\n\t| \"cli-option-value\"\n\t| \"cookie-header\"\n\t| \"env-assignment\"\n\t| \"known-token\"\n\t| \"url-credential\"\n\t| \"url-query\";\n\nexport interface CommandRedactionPlaceholder {\n\treadonly type: CommandRedactionPlaceholderType;\n\treadonly count: number;\n}\n\n/** Bounded description of the placeholders applied to a persisted redacted command. */\nexport interface CommandRedactionSummary {\n\treadonly policyId: string;\n\t/** Unique types in ascending order; empty when nothing was redacted. */\n\treadonly placeholders: readonly CommandRedactionPlaceholder[];\n}\n\n/**\n * Keyed commitment to the original (pre-redaction) command. The HMAC key is\n * process-internal and never persisted or exported, so this value is not\n * verifiable (and not brute-forceable) outside the executing trust boundary.\n */\nexport interface CommandHmacBinding {\n\treadonly algorithm: \"hmac-sha256\";\n\t/** Identifies the ephemeral process key generation, not the key itself. */\n\treadonly keyId: string;\n\t/** Per-binding random nonce; makes persisted MACs non-comparable. */\n\treadonly nonce: string;\n\treadonly mac: Sha256Hex;\n}\n\nexport type EvidenceReceiptStatus = \"passed\" | \"failed\" | \"timeout\" | \"aborted\";\n\nexport type EvidenceReceiptDisposition =\n\t| { readonly status: \"passed\"; readonly exitCode: 0 }\n\t| { readonly status: \"failed\"; readonly exitCode: number }\n\t| { readonly status: \"timeout\"; readonly exitCode: null }\n\t| { readonly status: \"aborted\"; readonly exitCode: null };\n\nexport type EvidenceExecutor = \"bash-tool\" | \"ci-runner\" | \"mcp\" | \"internal\";\n\nexport interface EvidenceReceiptCoreFields {\n\treadonly schemaVersion: 3;\n\treadonly receiptId: string;\n\treadonly goalId: string;\n\treadonly laneId?: string;\n\treadonly claim: string;\n\treadonly command: EvidenceCommandDescriptor;\n\treadonly cwd: string;\n\treadonly timeoutMs: number | null;\n\treadonly startedAt: string;\n\treadonly finishedAt: string;\n\treadonly durationMs: number;\n\treadonly workspaceBefore: WorkspaceFingerprint;\n\treadonly workspaceAfter: WorkspaceFingerprint;\n\treadonly output: EvidenceOutputCapture;\n\treadonly executor: EvidenceExecutor;\n\treadonly toolCallId?: string;\n\t/** Redaction metadata for the persisted `command` representation. */\n\treadonly commandRedaction?: CommandRedactionSummary;\n\t/** Keyed binding of the ORIGINAL command; required when placeholders were applied. */\n\treadonly commandBinding?: CommandHmacBinding;\n}\n\n/** Immutable execution facts. Envelope metadata is deliberately excluded from this core. */\nexport type EvidenceReceiptCore = EvidenceReceiptCoreFields & EvidenceReceiptDisposition;\n\nexport interface EvidenceReceiptLedgerBinding {\n\treadonly seq: number;\n\treadonly eventHash: Sha256Hex;\n}\n\n/**\n * Opaque metadata for an attestation verified by a separately configured trust anchor.\n * Its presence alone does not make a receipt trusted proof.\n */\nexport interface TrustedEvidenceAttestation {\n\treadonly attesterId: string;\n\treadonly keyId: string;\n\treadonly algorithm: \"ed25519\";\n\treadonly signature: string;\n\treadonly issuedAt: string;\n}\n\nexport interface EvidenceReceiptEnvelope {\n\treadonly coreSha256: Sha256Hex;\n\treadonly ledgerBinding?: EvidenceReceiptLedgerBinding;\n\treadonly trustedAttestation?: TrustedEvidenceAttestation;\n}\n\nexport interface EvidenceReceipt {\n\treadonly core: EvidenceReceiptCore;\n\treadonly envelope: EvidenceReceiptEnvelope;\n}\n\n/** Replay payload intentionally commits only the immutable core, avoiding a ledger/hash cycle. */\nexport interface EvidenceReceiptReplayPayload {\n\treadonly receiptId: string;\n\treadonly coreSha256: Sha256Hex;\n}\n\nexport interface ReplayEvent {\n\t/** Monotonic sequence number within a session. */\n\tseq: number;\n\t/** Event type. */\n\ttype: ReplayEventType;\n\t/** ISO-8601 timestamp. */\n\ttimestamp: string;\n\t/** Goal or session identifier. */\n\tgoalId: string;\n\t/** Optional lane identifier. */\n\tlaneId?: string;\n\t/** Event-specific payload. */\n\tpayload: unknown;\n\t/** SHA-256 of the serialized payload for integrity. */\n\tpayloadHash: string;\n\t/** eventHash of the previous event in the chain (\"genesis\" for the first event). */\n\tprevHash: string;\n\t/** SHA-256 over [seq, type, timestamp, goalId, laneId, payloadHash, prevHash]. */\n\teventHash: string;\n}\n\nexport interface ReplayLedgerFileIdentity {\n\treadonly dev: string;\n\treadonly ino: string;\n}\n\n/** Durable CAS tuple published atomically beside the replay JSONL. */\nexport interface ReplayLedgerHead {\n\treadonly fileIdentity: ReplayLedgerFileIdentity | null;\n\treadonly size: number;\n\treadonly lastSeq: number;\n\treadonly lastHash: string;\n}\n\n/** One chain- and committed-head-verified point-in-time ledger source. */\nexport interface VerifiedReplayLedgerSnapshot {\n\treadonly events: readonly ReplayEvent[];\n\treadonly head: ReplayLedgerHead;\n}\n\nexport interface ReplayLedger {\n\t/** Session / goal this ledger belongs to. */\n\tgoalId: string;\n\t/** Ordered event log. */\n\tevents: ReplayEvent[];\n\t/** Path where the ledger is persisted. */\n\tledgerPath: string;\n\t/** Last persisted sequence number. */\n\tlastPersistedSeq: number;\n}\n\n// ============================================================================\n// Merge Gates\n// ============================================================================\n\nexport type MergeGateStatus = \"open\" | \"blocked\" | \"conditional\";\n\n/** Compatibility policy for execution-bound evidence receipts. */\nexport type EvidenceReceiptMode = \"strict\" | \"prefer\" | \"legacy\";\n\nexport interface MergeGateResult {\n\t/** Gate identifier. */\n\tgateId: string;\n\t/** Current status. */\n\tstatus: MergeGateStatus;\n\t/** Human-readable reason. */\n\treason: string;\n\t/** Suggested remediation. */\n\tsuggestion?: string;\n\t/** Evidence that was checked. */\n\tevidenceChecked: EvidenceItem[];\n}\n\nexport interface EvidenceGateCheck {\n\t/** Which evidence item was checked. */\n\tevidenceClaim: string;\n\t/** Whether it is satisfied. */\n\tsatisfied: boolean;\n\t/** Reason if not satisfied. */\n\treason?: string;\n}\n\n// ============================================================================\n// Verify Reporter v2\n// ============================================================================\n\nexport interface OmkVerifyResultV2 {\n\tgoalId: string;\n\tstatus: \"completed\" | \"failed\" | \"blocked\" | \"partial\";\n\tsummary: string;\n\tchangedFiles: string[];\n\tevidence: EvidenceItem[];\n\trisks: string[];\n\tnextAction: string;\n\t/** Associated task contract. */\n\tcontract?: TaskContract;\n\t/** Replay ledger path. */\n\treplayLedgerPath?: string;\n\t/** Merge gate results. */\n\tmergeGates: MergeGateResult[];\n}\n\nexport interface CiReportV2 {\n\tgoalId: string;\n\tstatus: string;\n\tsummary: string;\n\tchangedFilesCount: number;\n\tevidenceCount: number;\n\trisks: string[];\n\tmarkdown: string;\n\tcontractVerdict?: string;\n\tmergeGateStatus?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../src/types/evidence.ts"],"names":[],"mappings":"AAAA;;;;;GAKG","sourcesContent":["/**\n * Evidence and verification types for OMK v0.80.3+\n *\n * Defines contracts for agent completion evidence, replay persistence,\n * merge gating, and artifact validation.\n */\n\n// ============================================================================\n// Evidence Contract\n// ============================================================================\n\nexport type EvidenceCategory =\n\t| \"feature\"\n\t| \"bugfix\"\n\t| \"refactor\"\n\t| \"research\"\n\t| \"release\"\n\t| \"security\"\n\t| \"docs\"\n\t| \"orchestration\";\n\nexport type EvidenceStatus = \"pending\" | \"gathering\" | \"satisfied\" | \"failed\" | \"waived\";\n\nexport interface EvidenceItem {\n\t/** What this evidence proves. */\n\tclaim: string;\n\t/** Category of the task. */\n\tcategory: EvidenceCategory;\n\t/** Path to artifact or command that produced it. */\n\tartifactPath?: string;\n\t/** Command that can reproduce the evidence. */\n\tverificationCommand?: string;\n\t/** SHA-256 of the artifact for integrity. */\n\thash?: string;\n\t/** When the evidence was gathered. */\n\ttimestamp: string;\n\t/** Whether the evidence is available. */\n\tstatus: EvidenceStatus;\n\t/** Reason if evidence is missing or waived. */\n\tgapReason?: string;\n}\n\nexport interface TaskContract {\n\t/** Unique task / goal identifier. */\n\tgoalId: string;\n\t/** One-sentence completion claim. */\n\tcompletionClaim: string;\n\t/** Required evidence items. */\n\trequiredEvidence: EvidenceItem[];\n\t/** Remaining risk note. */\n\tfinalRisk: string;\n\t/** Verdict: can the task be considered done? */\n\tverdict: \"pass\" | \"fail\" | \"conditional\";\n\t/** ISO-8601 timestamp of contract creation. */\n\tcreatedAt: string;\n\t/** ISO-8601 timestamp of last update. */\n\tupdatedAt: string;\n}\n\n// ============================================================================\n// Replay Ledger\n// ============================================================================\n\nexport type ReplayEventType =\n\t| \"session_start\"\n\t| \"tool_call\"\n\t| \"tool_result\"\n\t| \"message\"\n\t| \"guardrail_decision\"\n\t| \"lane_grant\"\n\t| \"merge_attempt\"\n\t| \"merge_blocked\"\n\t| \"evidence_gathered\"\n\t| \"contract_created\"\n\t| \"contract_updated\"\n\t| \"checkpoint\"\n\t| \"error\";\n\nexport interface ReplayEvent {\n\t/** Monotonic sequence number within a session. */\n\tseq: number;\n\t/** Event type. */\n\ttype: ReplayEventType;\n\t/** ISO-8601 timestamp. */\n\ttimestamp: string;\n\t/** Goal or session identifier. */\n\tgoalId: string;\n\t/** Optional lane identifier. */\n\tlaneId?: string;\n\t/** Event-specific payload. */\n\tpayload: unknown;\n\t/** SHA-256 of the serialized payload for integrity. */\n\tpayloadHash: string;\n}\n\nexport interface ReplayLedger {\n\t/** Session / goal this ledger belongs to. */\n\tgoalId: string;\n\t/** Ordered event log. */\n\tevents: ReplayEvent[];\n\t/** Path where the ledger is persisted. */\n\tledgerPath: string;\n\t/** Last persisted sequence number. */\n\tlastPersistedSeq: number;\n}\n\n// ============================================================================\n// Merge Gates\n// ============================================================================\n\nexport type MergeGateStatus = \"open\" | \"blocked\" | \"conditional\";\n\nexport interface MergeGateResult {\n\t/** Gate identifier. */\n\tgateId: string;\n\t/** Current status. */\n\tstatus: MergeGateStatus;\n\t/** Human-readable reason. */\n\treason: string;\n\t/** Suggested remediation. */\n\tsuggestion?: string;\n\t/** Evidence that was checked. */\n\tevidenceChecked: EvidenceItem[];\n}\n\nexport interface EvidenceGateCheck {\n\t/** Which evidence item was checked. */\n\tevidenceClaim: string;\n\t/** Whether it is satisfied. */\n\tsatisfied: boolean;\n\t/** Reason if not satisfied. */\n\treason?: string;\n}\n\n// ============================================================================\n// Verify Reporter v2\n// ============================================================================\n\nexport interface OmkVerifyResultV2 {\n\tgoalId: string;\n\tstatus: \"completed\" | \"failed\" | \"blocked\" | \"partial\";\n\tsummary: string;\n\tchangedFiles: string[];\n\tevidence: EvidenceItem[];\n\trisks: string[];\n\tnextAction: string;\n\t/** Associated task contract. */\n\tcontract?: TaskContract;\n\t/** Replay ledger path. */\n\treplayLedgerPath?: string;\n\t/** Merge gate results. */\n\tmergeGates: MergeGateResult[];\n}\n\nexport interface CiReportV2 {\n\tgoalId: string;\n\tstatus: string;\n\tsummary: string;\n\tchangedFilesCount: number;\n\tevidenceCount: number;\n\trisks: string[];\n\tmarkdown: string;\n\tcontractVerdict?: string;\n\tmergeGateStatus?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../src/types/evidence.ts"],"names":[],"mappings":"AAAA;;;;;GAKG","sourcesContent":["/**\n * Evidence and verification types for OMK v0.80.3+\n *\n * Defines contracts for agent completion evidence, replay persistence,\n * merge gating, and artifact validation.\n */\n\n// ============================================================================\n// Evidence Contract\n// ============================================================================\n\nexport type EvidenceCategory =\n\t| \"feature\"\n\t| \"bugfix\"\n\t| \"refactor\"\n\t| \"research\"\n\t| \"release\"\n\t| \"security\"\n\t| \"docs\"\n\t| \"orchestration\";\n\nexport type EvidenceStatus = \"pending\" | \"gathering\" | \"satisfied\" | \"failed\" | \"waived\";\n\nexport interface EvidenceItem {\n\t/** What this evidence proves. */\n\tclaim: string;\n\t/** Category of the task. */\n\tcategory: EvidenceCategory;\n\t/** Path to artifact or command that produced it. */\n\tartifactPath?: string;\n\t/** Command that can reproduce the evidence. */\n\tverificationCommand?: string;\n\t/** SHA-256 of the artifact for integrity. */\n\thash?: string;\n\t/** When the evidence was gathered. */\n\ttimestamp: string;\n\t/** Whether the evidence is available. */\n\tstatus: EvidenceStatus;\n\t/** Receipt v3 metadata consumed by receipt-aware evidence gates. */\n\treceiptId?: string;\n\treceiptSchemaVersion?: 3;\n\t/** Domain-separated digest of the exact structured command descriptor. */\n\treceiptCommandSha256?: Sha256Hex;\n\t/** Lane that executed the verification command, when lane-scoped. */\n\treceiptLaneId?: string;\n\t/** Reason if evidence is missing or waived. */\n\tgapReason?: string;\n}\n\nexport interface TaskContract {\n\t/** Unique task / goal identifier. */\n\tgoalId: string;\n\t/** One-sentence completion claim. */\n\tcompletionClaim: string;\n\t/** Required evidence items. */\n\trequiredEvidence: EvidenceItem[];\n\t/** Remaining risk note. */\n\tfinalRisk: string;\n\t/** Verdict: can the task be considered done? */\n\tverdict: \"pass\" | \"fail\" | \"conditional\";\n\t/** ISO-8601 timestamp of contract creation. */\n\tcreatedAt: string;\n\t/** ISO-8601 timestamp of last update. */\n\tupdatedAt: string;\n}\n\n// ============================================================================\n// Replay Ledger\n// ============================================================================\n\nexport type ReplayEventType =\n\t| \"session_start\"\n\t| \"tool_call\"\n\t| \"tool_result\"\n\t| \"message\"\n\t| \"guardrail_decision\"\n\t| \"lane_grant\"\n\t| \"merge_attempt\"\n\t| \"merge_blocked\"\n\t| \"evidence_gathered\"\n\t| \"evidence_receipt\"\n\t| \"contract_created\"\n\t| \"contract_updated\"\n\t| \"checkpoint\"\n\t| \"error\"\n\t| \"transcript_repaired\"\n\t| \"tool_timeout\"\n\t| \"tool_late_settlement\"\n\t| \"workspace_mutation\";\n\n/**\n * Payload contract for `workspace_mutation` replay events. Emitters live in the\n * agent runtime; evidence gates consume these fail-closed: an event whose payload\n * does not provably target other paths in the same workspace root is treated as\n * relevant to every scope.\n */\nexport interface WorkspaceMutationReplayPayload {\n\t/** Absolute workspace root the mutation applies to. */\n\treadonly root: string;\n\t/** Root-relative normalized paths that were mutated; empty means unknown/whole workspace. */\n\treadonly paths: readonly string[];\n}\n\n// ============================================================================\n// Execution-bound evidence receipts (v3)\n// ============================================================================\n\ndeclare const SHA256_HEX_BRAND: unique symbol;\n\n/** A validated lowercase SHA-256 digest encoded as exactly 64 hexadecimal characters. */\nexport type Sha256Hex = string & { readonly [SHA256_HEX_BRAND]: \"sha256-hex\" };\n\nexport interface ArgvCommandDescriptor {\n\treadonly kind: \"argv\";\n\t/** Exact executable identity supplied by the caller. */\n\treadonly executable: string;\n\t/** Exact argument boundaries; values are never joined or whitespace-normalized. */\n\treadonly argv: readonly string[];\n}\n\nexport interface ShellCommandDescriptor {\n\treadonly kind: \"shell\";\n\t/** Exact shell identity supplied by the caller. */\n\treadonly shell: string;\n\t/** Exact script bytes decoded as a string; whitespace is significant. */\n\treadonly script: string;\n}\n\nexport type EvidenceCommandDescriptor = ArgvCommandDescriptor | ShellCommandDescriptor;\n\nexport interface MissingArtifactState {\n\treadonly path: string;\n\treadonly state: \"missing\";\n}\n\nexport interface FileArtifactState {\n\treadonly path: string;\n\treadonly state: \"file\";\n\treadonly sha256: Sha256Hex;\n\treadonly size: number;\n}\n\nexport type ArtifactState = MissingArtifactState | FileArtifactState;\n\n/** Trusted caller-selected workspace root and root-relative artifact set. */\nexport interface WorkspaceScope {\n\treadonly root: string;\n\treadonly artifactPaths: readonly string[];\n}\n\n/** A point-in-time digest of only the selected artifact set; not an immutable-workspace proof. */\nexport interface ArtifactSetWorkspaceFingerprint {\n\treadonly kind: \"artifact-set\";\n\treadonly scope: WorkspaceScope;\n\treadonly artifacts: readonly ArtifactState[];\n\treadonly manifestSha256: Sha256Hex;\n}\n\n/** Scope-limited Git workspace facts committed by a git-kind fingerprint. */\nexport interface GitWorkspaceState {\n\t/** Full hex object name of HEAD, or null while HEAD is unborn. */\n\treadonly headCommit: string | null;\n\t/** Sorted root-relative paths git reports changed (staged, unstaged, or untracked) within scope. */\n\treadonly changedPaths: readonly string[];\n\t/** SHA-256 of the scope-limited staged diff bytes (index vs HEAD). */\n\treadonly stagedDiffSha256: Sha256Hex;\n\t/** SHA-256 of the scope-limited unstaged diff bytes (work tree vs index). */\n\treadonly unstagedDiffSha256: Sha256Hex;\n\t/** Canonical digest committing changed paths, both diff digests, and every selected artifact state. */\n\treadonly dirtySha256: Sha256Hex;\n}\n\n/**\n * A point-in-time digest of a Git work-tree root: HEAD, scope-limited staged and\n * unstaged diffs, and direct states for every selected path. Direct states keep\n * ignored and index-flagged work-tree bytes content-bound independently of Git.\n */\nexport interface GitWorkspaceFingerprint {\n\treadonly kind: \"git\";\n\treadonly scope: WorkspaceScope;\n\treadonly artifacts: readonly ArtifactState[];\n\treadonly git: GitWorkspaceState;\n\treadonly manifestSha256: Sha256Hex;\n}\n\nexport type WorkspaceFingerprint = ArtifactSetWorkspaceFingerprint | GitWorkspaceFingerprint;\n\nexport interface EvidenceOutputDigest {\n\treadonly sha256: Sha256Hex;\n\treadonly byteCount: number;\n}\n\n/** Digests only; receipt v3 never carries raw output or excerpts. */\nexport interface EvidenceOutputCapture {\n\treadonly redactionPolicyId: string;\n\treadonly stdout: EvidenceOutputDigest;\n\treadonly stderr: EvidenceOutputDigest;\n}\n\n/** CLI form that produced one or more `[REDACTED]` placeholders in a persisted command. */\nexport type CommandRedactionPlaceholderType =\n\t| \"api-key-header\"\n\t| \"authorization-header\"\n\t| \"basic-auth\"\n\t| \"bearer-token\"\n\t| \"cli-option-inline\"\n\t| \"cli-option-value\"\n\t| \"cookie-header\"\n\t| \"env-assignment\"\n\t| \"known-token\"\n\t| \"url-credential\"\n\t| \"url-query\";\n\nexport interface CommandRedactionPlaceholder {\n\treadonly type: CommandRedactionPlaceholderType;\n\treadonly count: number;\n}\n\n/** Bounded description of the placeholders applied to a persisted redacted command. */\nexport interface CommandRedactionSummary {\n\treadonly policyId: string;\n\t/** Unique types in ascending order; empty when nothing was redacted. */\n\treadonly placeholders: readonly CommandRedactionPlaceholder[];\n}\n\n/**\n * Keyed commitment to the original (pre-redaction) command. The HMAC key is\n * process-internal and never persisted or exported, so this value is not\n * verifiable (and not brute-forceable) outside the executing trust boundary.\n */\nexport interface CommandHmacBinding {\n\treadonly algorithm: \"hmac-sha256\";\n\t/** Identifies the ephemeral process key generation, not the key itself. */\n\treadonly keyId: string;\n\t/** Per-binding random nonce; makes persisted MACs non-comparable. */\n\treadonly nonce: string;\n\treadonly mac: Sha256Hex;\n}\n\nexport type EvidenceReceiptStatus = \"passed\" | \"failed\" | \"timeout\" | \"aborted\";\n\nexport type EvidenceReceiptDisposition =\n\t| { readonly status: \"passed\"; readonly exitCode: 0 }\n\t| { readonly status: \"failed\"; readonly exitCode: number }\n\t| { readonly status: \"timeout\"; readonly exitCode: null }\n\t| { readonly status: \"aborted\"; readonly exitCode: null };\n\nexport type EvidenceExecutor = \"bash-tool\" | \"ci-runner\" | \"mcp\" | \"internal\";\n\nexport interface EvidenceReceiptCoreFields {\n\treadonly schemaVersion: 3;\n\treadonly receiptId: string;\n\treadonly goalId: string;\n\treadonly laneId?: string;\n\treadonly claim: string;\n\treadonly command: EvidenceCommandDescriptor;\n\treadonly cwd: string;\n\treadonly timeoutMs: number | null;\n\treadonly startedAt: string;\n\treadonly finishedAt: string;\n\treadonly durationMs: number;\n\treadonly workspaceBefore: WorkspaceFingerprint;\n\treadonly workspaceAfter: WorkspaceFingerprint;\n\treadonly output: EvidenceOutputCapture;\n\treadonly executor: EvidenceExecutor;\n\treadonly toolCallId?: string;\n\t/** Redaction metadata for the persisted `command` representation. */\n\treadonly commandRedaction?: CommandRedactionSummary;\n\t/** Keyed binding of the ORIGINAL command; required when placeholders were applied. */\n\treadonly commandBinding?: CommandHmacBinding;\n}\n\n/** Immutable execution facts. Envelope metadata is deliberately excluded from this core. */\nexport type EvidenceReceiptCore = EvidenceReceiptCoreFields & EvidenceReceiptDisposition;\n\nexport interface EvidenceReceiptLedgerBinding {\n\treadonly seq: number;\n\treadonly eventHash: Sha256Hex;\n}\n\n/**\n * Opaque metadata for an attestation verified by a separately configured trust anchor.\n * Its presence alone does not make a receipt trusted proof.\n */\nexport interface TrustedEvidenceAttestation {\n\treadonly attesterId: string;\n\treadonly keyId: string;\n\treadonly algorithm: \"ed25519\";\n\treadonly signature: string;\n\treadonly issuedAt: string;\n}\n\nexport interface EvidenceReceiptEnvelope {\n\treadonly coreSha256: Sha256Hex;\n\treadonly ledgerBinding?: EvidenceReceiptLedgerBinding;\n\treadonly trustedAttestation?: TrustedEvidenceAttestation;\n}\n\nexport interface EvidenceReceipt {\n\treadonly core: EvidenceReceiptCore;\n\treadonly envelope: EvidenceReceiptEnvelope;\n}\n\n/** Replay payload intentionally commits only the immutable core, avoiding a ledger/hash cycle. */\nexport interface EvidenceReceiptReplayPayload {\n\treadonly receiptId: string;\n\treadonly coreSha256: Sha256Hex;\n}\n\nexport interface ReplayEvent {\n\t/** Monotonic sequence number within a session. */\n\tseq: number;\n\t/** Event type. */\n\ttype: ReplayEventType;\n\t/** ISO-8601 timestamp. */\n\ttimestamp: string;\n\t/** Goal or session identifier. */\n\tgoalId: string;\n\t/** Optional lane identifier. */\n\tlaneId?: string;\n\t/** Event-specific payload. */\n\tpayload: unknown;\n\t/** SHA-256 of the serialized payload for integrity. */\n\tpayloadHash: string;\n\t/** eventHash of the previous event in the chain (\"genesis\" for the first event). */\n\tprevHash: string;\n\t/** SHA-256 over [seq, type, timestamp, goalId, laneId, payloadHash, prevHash]. */\n\teventHash: string;\n}\n\nexport interface ReplayLedgerFileIdentity {\n\treadonly dev: string;\n\treadonly ino: string;\n}\n\n/** Durable CAS tuple published atomically beside the replay JSONL. */\nexport interface ReplayLedgerHead {\n\treadonly fileIdentity: ReplayLedgerFileIdentity | null;\n\treadonly size: number;\n\treadonly lastSeq: number;\n\treadonly lastHash: string;\n}\n\n/** One chain- and committed-head-verified point-in-time ledger source. */\nexport interface VerifiedReplayLedgerSnapshot {\n\treadonly events: readonly ReplayEvent[];\n\treadonly head: ReplayLedgerHead;\n}\n\nexport interface ReplayLedger {\n\t/** Session / goal this ledger belongs to. */\n\tgoalId: string;\n\t/** Ordered event log. */\n\tevents: ReplayEvent[];\n\t/** Path where the ledger is persisted. */\n\tledgerPath: string;\n\t/** Last persisted sequence number. */\n\tlastPersistedSeq: number;\n}\n\n// ============================================================================\n// Merge Gates\n// ============================================================================\n\nexport type MergeGateStatus = \"open\" | \"blocked\" | \"conditional\";\n\n/** Compatibility policy for execution-bound evidence receipts. */\nexport type EvidenceReceiptMode = \"strict\" | \"prefer\" | \"legacy\";\n\nexport interface MergeGateResult {\n\t/** Gate identifier. */\n\tgateId: string;\n\t/** Current status. */\n\tstatus: MergeGateStatus;\n\t/** Human-readable reason. */\n\treason: string;\n\t/** Suggested remediation. */\n\tsuggestion?: string;\n\t/** Evidence that was checked. */\n\tevidenceChecked: EvidenceItem[];\n}\n\nexport interface EvidenceGateCheck {\n\t/** Which evidence item was checked. */\n\tevidenceClaim: string;\n\t/** Whether it is satisfied. */\n\tsatisfied: boolean;\n\t/** Reason if not satisfied. */\n\treason?: string;\n}\n\n// ============================================================================\n// Verify Reporter v2\n// ============================================================================\n\nexport interface OmkVerifyResultV2 {\n\tgoalId: string;\n\tstatus: \"completed\" | \"failed\" | \"blocked\" | \"partial\";\n\tsummary: string;\n\tchangedFiles: string[];\n\tevidence: EvidenceItem[];\n\trisks: string[];\n\tnextAction: string;\n\t/** Associated task contract. */\n\tcontract?: TaskContract;\n\t/** Replay ledger path. */\n\treplayLedgerPath?: string;\n\t/** Merge gate results. */\n\tmergeGates: MergeGateResult[];\n}\n\nexport interface CiReportV2 {\n\tgoalId: string;\n\tstatus: string;\n\tsummary: string;\n\tchangedFilesCount: number;\n\tevidenceCount: number;\n\trisks: string[];\n\tmarkdown: string;\n\tcontractVerdict?: string;\n\tmergeGateStatus?: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-ci.d.ts","sourceRoot":"","sources":["../src/verify-ci.ts"],"names":[],"mappings":"","sourcesContent":["#!/usr/bin/env node\n\nimport { resolve } from \"node:path\";\nimport { runVerifiedCiCommand } from \"./commands/verify-ci.ts\";\n\nasync function main(): Promise<void> {\n\tconst cwd = process.cwd();\n\tconst result = await runVerifiedCiCommand({\n\t\tevidenceDir: resolve(cwd, \".omk/ci-evidence\"),\n\t\tgoalId: \"omk-ci-release-consistency\",\n\t\tclaim: \"release metadata is internally consistent\",\n\t\tscript: \"node scripts/check-release-consistency.mjs\",\n\t\tcwd,\n\t\ttimeoutMs: 60_000,\n\t\tworkspaceScope: {\n\t\t\troot: cwd,\n\t\t\tartifactPaths: [\"package.json\", \"packages/coding-agent/package.json\"],\n\t\t},\n\t});\n\tconsole.log(\n\t\tJSON.stringify({\n\t\t\tstatus: result.gate.status,\n\t\t\treceiptPath: result.receiptPath,\n\t\t\treportPath: result.reportPath,\n\t\t}),\n\t);\n\tprocess.exitCode = result.exitCode;\n}\n\nmain().catch((error: unknown) => {\n\tconst message = error instanceof Error ? error.message : String(error);\n\tconsole.error(`verified CI command failed: ${message}`);\n\tprocess.exitCode = 1;\n});\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { runVerifiedCiCommand } from "./commands/verify-ci.js";
|
|
4
|
+
async function main() {
|
|
5
|
+
const cwd = process.cwd();
|
|
6
|
+
const result = await runVerifiedCiCommand({
|
|
7
|
+
evidenceDir: resolve(cwd, ".omk/ci-evidence"),
|
|
8
|
+
goalId: "omk-ci-release-consistency",
|
|
9
|
+
claim: "release metadata is internally consistent",
|
|
10
|
+
script: "node scripts/check-release-consistency.mjs",
|
|
11
|
+
cwd,
|
|
12
|
+
timeoutMs: 60_000,
|
|
13
|
+
workspaceScope: {
|
|
14
|
+
root: cwd,
|
|
15
|
+
artifactPaths: ["package.json", "packages/coding-agent/package.json"],
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
console.log(JSON.stringify({
|
|
19
|
+
status: result.gate.status,
|
|
20
|
+
receiptPath: result.receiptPath,
|
|
21
|
+
reportPath: result.reportPath,
|
|
22
|
+
}));
|
|
23
|
+
process.exitCode = result.exitCode;
|
|
24
|
+
}
|
|
25
|
+
main().catch((error) => {
|
|
26
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
27
|
+
console.error(`verified CI command failed: ${message}`);
|
|
28
|
+
process.exitCode = 1;
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=verify-ci.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env node\n\nimport { resolve } from \"node:path\";\nimport { runVerifiedCiCommand } from \"./commands/verify-ci.ts\";\n\nasync function main(): Promise<void> {\n\tconst cwd = process.cwd();\n\tconst result = await runVerifiedCiCommand({\n\t\tevidenceDir: resolve(cwd, \".omk/ci-evidence\"),\n\t\tgoalId: \"omk-ci-release-consistency\",\n\t\tclaim: \"release metadata is internally consistent\",\n\t\tscript: \"node scripts/check-release-consistency.mjs\",\n\t\tcwd,\n\t\ttimeoutMs: 60_000,\n\t\tworkspaceScope: {\n\t\t\troot: cwd,\n\t\t\tartifactPaths: [\"package.json\", \"packages/coding-agent/package.json\"],\n\t\t},\n\t});\n\tconsole.log(\n\t\tJSON.stringify({\n\t\t\tstatus: result.gate.status,\n\t\t\treceiptPath: result.receiptPath,\n\t\t\treportPath: result.reportPath,\n\t\t}),\n\t);\n\tprocess.exitCode = result.exitCode;\n}\n\nmain().catch((error: unknown) => {\n\tconst message = error instanceof Error ? error.message : String(error);\n\tconsole.error(`verified CI command failed: ${message}`);\n\tprocess.exitCode = 1;\n});\n"]}
|
package/docs/compaction.md
CHANGED
|
@@ -29,13 +29,39 @@ Both use the same structured summary format and track file operations cumulative
|
|
|
29
29
|
Auto-compaction triggers when:
|
|
30
30
|
|
|
31
31
|
```
|
|
32
|
-
contextTokens >
|
|
32
|
+
contextTokens > triggerTokens
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
where `triggerTokens` is the smaller of:
|
|
36
|
+
|
|
37
|
+
- `floor(contextWindow × maxUsageRatio)` (default `maxUsageRatio` = 0.9)
|
|
38
|
+
- `contextWindow - reservedBudget` (the effective reserve budget)
|
|
39
|
+
|
|
40
|
+
The reserved budget is computed from:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
reservedBudget = reservedOutputTokens + reservedToolResultTokens + safetyMarginTokens + imageReserveTokens + systemPromptTokens
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If the reserved budget exceeds the context window, the reserve boundary is ignored and only the usage-ratio boundary applies. All numeric token reserves must be non-negative safe integers; ratios must be finite and in `(0, 1]`. Invalid values fail session creation instead of silently weakening the policy.
|
|
47
|
+
|
|
48
|
+
| Setting | Default | Description |
|
|
49
|
+
|---------|---------|-------------|
|
|
50
|
+
| `reserveTokens` | `16384` | Legacy/default output reserve; used as `reservedOutputTokens` when that value is not set |
|
|
51
|
+
| `reservedOutputTokens` | `reserveTokens` | Tokens reserved for the LLM response |
|
|
52
|
+
| `reservedToolResultTokens` | `0` | Tokens reserved for pending tool results |
|
|
53
|
+
| `safetyMarginTokens` | `0` | Extra safety margin added to the reserve |
|
|
54
|
+
| `imageReserveTokens` | `0` | Tokens reserved for image content |
|
|
55
|
+
| `maxUsageRatio` | `0.9` | Normal trigger ratio (fraction of context window) |
|
|
56
|
+
| `rearmRatio` | `0.75 × maxUsageRatio` | Ratio below which a triggered compaction can rearm |
|
|
57
|
+
| `emergencyRatio` | `0.98` | Emergency compaction ratio |
|
|
36
58
|
|
|
37
59
|
You can also trigger manually with `/compact [instructions]`, where optional instructions focus the summary.
|
|
38
60
|
|
|
61
|
+
### Model Selection
|
|
62
|
+
|
|
63
|
+
By default, compaction uses the active session model. Set `compaction.model` to an authenticated canonical `provider/model` reference when summaries should use a different model. For example, `zai/glm-5.2` keeps an interactive Claude session while using GLM only for auto-compaction and `/compact`.
|
|
64
|
+
|
|
39
65
|
### How It Works
|
|
40
66
|
|
|
41
67
|
1. **Find cut point**: Walk backwards from newest message, accumulating token estimates until `keepRecentTokens` (default 20k, configurable in `~/.omk/agent/settings.json` or `<project-dir>/.omk/settings.json`) is reached
|
|
@@ -379,8 +405,14 @@ Configure compaction in `~/.omk/agent/settings.json` or `<project-dir>/.omk/sett
|
|
|
379
405
|
{
|
|
380
406
|
"compaction": {
|
|
381
407
|
"enabled": true,
|
|
408
|
+
"model": "zai/glm-5.2",
|
|
382
409
|
"reserveTokens": 16384,
|
|
383
|
-
"
|
|
410
|
+
"reservedToolResultTokens": 8192,
|
|
411
|
+
"safetyMarginTokens": 1024,
|
|
412
|
+
"keepRecentTokens": 20000,
|
|
413
|
+
"maxUsageRatio": 0.9,
|
|
414
|
+
"rearmRatio": 0.7,
|
|
415
|
+
"emergencyRatio": 0.98
|
|
384
416
|
}
|
|
385
417
|
}
|
|
386
418
|
```
|
|
@@ -388,7 +420,15 @@ Configure compaction in `~/.omk/agent/settings.json` or `<project-dir>/.omk/sett
|
|
|
388
420
|
| Setting | Default | Description |
|
|
389
421
|
|---------|---------|-------------|
|
|
390
422
|
| `enabled` | `true` | Enable auto-compaction |
|
|
391
|
-
| `
|
|
423
|
+
| `model` | session model | Authenticated canonical `provider/model` used only for compaction |
|
|
424
|
+
| `reserveTokens` | `16384` | Legacy/default output reserve |
|
|
425
|
+
| `reservedOutputTokens` | `reserveTokens` | Optional output-only reserve |
|
|
426
|
+
| `reservedToolResultTokens` | `0` | Reserve tokens for pending tool results |
|
|
427
|
+
| `safetyMarginTokens` | `0` | Extra safety margin added to the reserve |
|
|
428
|
+
| `imageReserveTokens` | `0` | Reserve tokens for image content |
|
|
392
429
|
| `keepRecentTokens` | `20000` | Recent tokens to keep (not summarized) |
|
|
430
|
+
| `maxUsageRatio` | `0.9` | Normal trigger ratio (fraction of context window) |
|
|
431
|
+
| `rearmRatio` | `0.75 × maxUsageRatio` | Ratio below which a triggered compaction can rearm |
|
|
432
|
+
| `emergencyRatio` | `0.98` | Emergency compaction ratio |
|
|
393
433
|
|
|
394
434
|
Disable auto-compaction with `"enabled": false`. You can still compact manually with `/compact`.
|
package/docs/extensions.md
CHANGED
|
@@ -141,6 +141,8 @@ To share extensions via npm or git as omk packages, see [packages.md](packages.m
|
|
|
141
141
|
|---------|---------|
|
|
142
142
|
| `open-multi-agent-kit` | Extension types (`ExtensionAPI`, `ExtensionContext`, events) |
|
|
143
143
|
| `typebox` | Schema definitions for tool parameters |
|
|
144
|
+
| `omk-agent-core` | General agent framework types and utilities |
|
|
145
|
+
| `omk-agent-core/node` | Node-specific `omk-agent-core` entry points (use when you need the Node runtime surface) |
|
|
144
146
|
| `omk-ai` | AI utilities (`StringEnum` for Google-compatible enums) |
|
|
145
147
|
| `omk-tui` | TUI components for custom rendering |
|
|
146
148
|
|
package/docs/providers.md
CHANGED
|
@@ -25,6 +25,12 @@ Use `/logout` to clear credentials. Tokens are stored in `~/.omk/agent/auth.json
|
|
|
25
25
|
|
|
26
26
|
- Requires ChatGPT Plus or Pro subscription
|
|
27
27
|
- Officially endorsed by OpenAI: [Codex for OSS](https://developers.openai.com/community/codex-for-oss)
|
|
28
|
+
- `gpt-5.6-moa` is a tool-free virtual model that runs bounded GPT-5.6 Sol and Terra advisers concurrently, then streams a Sol synthesis. It performs three inference calls per turn, caps adviser/synthesis output independently, and is intended for analysis, review, and answer synthesis; use Sol or Terra directly when tools are required.
|
|
29
|
+
- The Codex backend accepts `xhigh` as its highest literal reasoning effort. OMK's `max` and `ultra` tiers map to `xhigh`; `ultra` on the MoA model additionally represents the Sol/Terra delegation workflow.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
omk --provider openai-codex --model gpt-5.6-moa --thinking ultra
|
|
33
|
+
```
|
|
28
34
|
|
|
29
35
|
### Claude Pro/Max
|
|
30
36
|
|