open-multi-agent-kit 0.93.0 → 0.94.1
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 +29 -1
- package/README.md +3 -2
- package/dist/core/agent-session.d.ts +7 -14
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +78 -347
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/github-star-nudge.d.ts +15 -0
- package/dist/core/github-star-nudge.d.ts.map +1 -0
- package/dist/core/github-star-nudge.js +21 -0
- package/dist/core/github-star-nudge.js.map +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +11 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/sandbox/default-policy.d.ts +14 -0
- package/dist/core/sandbox/default-policy.d.ts.map +1 -0
- package/dist/core/sandbox/default-policy.js +58 -0
- package/dist/core/sandbox/default-policy.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-bash-runtime.d.ts +62 -0
- package/dist/core/session-bash-runtime.d.ts.map +1 -0
- package/dist/core/session-bash-runtime.js +167 -0
- package/dist/core/session-bash-runtime.js.map +1 -0
- package/dist/core/session-bash-service.d.ts +61 -0
- package/dist/core/session-bash-service.d.ts.map +1 -0
- package/dist/core/session-bash-service.js +155 -0
- package/dist/core/session-bash-service.js.map +1 -0
- package/dist/core/session-compaction-service.d.ts +48 -0
- package/dist/core/session-compaction-service.d.ts.map +1 -0
- package/dist/core/session-compaction-service.js +250 -0
- package/dist/core/session-compaction-service.js.map +1 -0
- package/dist/core/settings-manager.d.ts +5 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +9 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills-catalog-cache.d.ts +25 -0
- package/dist/core/skills-catalog-cache.d.ts.map +1 -0
- package/dist/core/skills-catalog-cache.js +123 -0
- package/dist/core/skills-catalog-cache.js.map +1 -0
- package/dist/core/skills.d.ts +6 -0
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +25 -4
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +4 -0
- package/dist/core/slash-commands.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/tools/bash.d.ts +3 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +3 -2
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/diagnostics.d.ts +29 -0
- package/dist/core/tools/diagnostics.d.ts.map +1 -0
- package/dist/core/tools/diagnostics.js +325 -0
- package/dist/core/tools/diagnostics.js.map +1 -0
- package/dist/core/tools/index.d.ts +2 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +18 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/verified-bash-adapter.d.ts +18 -1
- package/dist/core/verified-bash-adapter.d.ts.map +1 -1
- package/dist/core/verified-bash-adapter.js +38 -1
- package/dist/core/verified-bash-adapter.js.map +1 -1
- package/dist/core/verified-bash-runtime.d.ts +13 -0
- package/dist/core/verified-bash-runtime.d.ts.map +1 -0
- package/dist/core/verified-bash-runtime.js +81 -0
- package/dist/core/verified-bash-runtime.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +55 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/types/evidence.d.ts +1 -1
- package/dist/types/evidence.d.ts.map +1 -1
- package/dist/types/evidence.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +31 -5
- package/dist/utils/frontmatter.js.map +1 -1
- package/docs/environment-variables.md +4 -0
- package/docs/sdk.md +10 -4
- package/docs/settings.md +11 -0
- package/docs/usage.md +1 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- 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 +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +15 -15
- package/package.json +5 -5
package/dist/types/evidence.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export interface TaskContract {
|
|
|
47
47
|
/** ISO-8601 timestamp of last update. */
|
|
48
48
|
updatedAt: string;
|
|
49
49
|
}
|
|
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";
|
|
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" | "sandbox_audit";
|
|
51
51
|
/**
|
|
52
52
|
* Payload contract for `workspace_mutation` replay events. Emitters live in the
|
|
53
53
|
* agent runtime; evidence gates consume these fail-closed: an event whose payload
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.d.ts","source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ent 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
|
+
{"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,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,0EAA0E;IAC1E,oBAAoB,CAAC,EAAE,SAAS,CAAC;IACjC,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;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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\t| \"sandbox_audit\";\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/** 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
|
+
{"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\t| \"sandbox_audit\";\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":"frontmatter.d.ts","sourceRoot":"","sources":["../../src/utils/frontmatter.ts"],"names":[],"mappings":"AAEA,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC3D,WAAW,EAAE,CAAC,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;
|
|
1
|
+
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../../src/utils/frontmatter.ts"],"names":[],"mappings":"AAEA,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC3D,WAAW,EAAE,CAAC,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAuDF,eAAO,MAAM,gBAAgB,GAAI,CAAC,oGASjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,6BAA8D,CAAC","sourcesContent":["import { parse } from \"yaml\";\n\ntype ParsedFrontmatter<T extends Record<string, unknown>> = {\n\tfrontmatter: T;\n\tbody: string;\n};\n\nconst normalizeNewlines = (value: string): string => value.replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\");\n\nconst FRONTMATTER_OPEN = /^---(?:[ \\t]*\\r?\\n|$)/m;\n\n/**\n * Locate YAML frontmatter even when a short preamble (comments/HTML) precedes the opening fence.\n * bigpowers and similar skill packs emit story markers before `---`.\n */\nconst extractFrontmatter = (content: string): { yamlString: string | null; body: string } => {\n\tconst normalized = normalizeNewlines(content);\n\n\tconst openMatch = FRONTMATTER_OPEN.exec(normalized);\n\tif (!openMatch || openMatch.index === undefined) {\n\t\treturn { yamlString: null, body: normalized };\n\t}\n\n\t// Reject preambles that already look like document body (too long / has headings beyond comments).\n\tconst preamble = normalized.slice(0, openMatch.index);\n\tif (preamble.length > 0) {\n\t\tconst preambleLines = preamble.split(\"\\n\").filter((line) => line.trim().length > 0);\n\t\tconst onlyPreambleNoise = preambleLines.every(\n\t\t\t(line) =>\n\t\t\t\tline.trimStart().startsWith(\"#\") ||\n\t\t\t\tline.trimStart().startsWith(\"<!--\") ||\n\t\t\t\tline.trim() === \"-->\" ||\n\t\t\t\t/^ARCHIVED:/i.test(line.trim()),\n\t\t);\n\t\tif (!onlyPreambleNoise || preambleLines.length > 32) {\n\t\t\treturn { yamlString: null, body: normalized };\n\t\t}\n\t}\n\n\tconst yamlStart = openMatch.index + openMatch[0].length;\n\tconst endIndex = normalized.indexOf(\"\\n---\", yamlStart - 1);\n\tif (endIndex === -1 || endIndex < yamlStart) {\n\t\treturn { yamlString: null, body: normalized };\n\t}\n\n\t// Closing fence must be a line that is exactly `---` (optional trailing spaces).\n\tconst afterClose = normalized.slice(endIndex + 1); // starts at ---\n\tif (!/^---[ \\t]*(?:\\n|$)/.test(afterClose)) {\n\t\treturn { yamlString: null, body: normalized };\n\t}\n\n\tconst closeLineEnd = afterClose.search(/\\n/);\n\tconst bodyStart = closeLineEnd === -1 ? normalized.length : endIndex + 1 + closeLineEnd + 1;\n\n\treturn {\n\t\tyamlString: normalized.slice(yamlStart, endIndex),\n\t\tbody: normalized.slice(bodyStart).trim(),\n\t};\n};\n\nexport const parseFrontmatter = <T extends Record<string, unknown> = Record<string, unknown>>(\n\tcontent: string,\n): ParsedFrontmatter<T> => {\n\tconst { yamlString, body } = extractFrontmatter(content);\n\tif (!yamlString) {\n\t\treturn { frontmatter: {} as T, body };\n\t}\n\tconst parsed = parse(yamlString);\n\treturn { frontmatter: (parsed ?? {}) as T, body };\n};\n\nexport const stripFrontmatter = (content: string): string => parseFrontmatter(content).body;\n"]}
|
|
@@ -1,17 +1,43 @@
|
|
|
1
1
|
import { parse } from "yaml";
|
|
2
2
|
const normalizeNewlines = (value) => value.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
3
|
+
const FRONTMATTER_OPEN = /^---(?:[ \t]*\r?\n|$)/m;
|
|
4
|
+
/**
|
|
5
|
+
* Locate YAML frontmatter even when a short preamble (comments/HTML) precedes the opening fence.
|
|
6
|
+
* bigpowers and similar skill packs emit story markers before `---`.
|
|
7
|
+
*/
|
|
3
8
|
const extractFrontmatter = (content) => {
|
|
4
9
|
const normalized = normalizeNewlines(content);
|
|
5
|
-
|
|
10
|
+
const openMatch = FRONTMATTER_OPEN.exec(normalized);
|
|
11
|
+
if (!openMatch || openMatch.index === undefined) {
|
|
6
12
|
return { yamlString: null, body: normalized };
|
|
7
13
|
}
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
// Reject preambles that already look like document body (too long / has headings beyond comments).
|
|
15
|
+
const preamble = normalized.slice(0, openMatch.index);
|
|
16
|
+
if (preamble.length > 0) {
|
|
17
|
+
const preambleLines = preamble.split("\n").filter((line) => line.trim().length > 0);
|
|
18
|
+
const onlyPreambleNoise = preambleLines.every((line) => line.trimStart().startsWith("#") ||
|
|
19
|
+
line.trimStart().startsWith("<!--") ||
|
|
20
|
+
line.trim() === "-->" ||
|
|
21
|
+
/^ARCHIVED:/i.test(line.trim()));
|
|
22
|
+
if (!onlyPreambleNoise || preambleLines.length > 32) {
|
|
23
|
+
return { yamlString: null, body: normalized };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const yamlStart = openMatch.index + openMatch[0].length;
|
|
27
|
+
const endIndex = normalized.indexOf("\n---", yamlStart - 1);
|
|
28
|
+
if (endIndex === -1 || endIndex < yamlStart) {
|
|
29
|
+
return { yamlString: null, body: normalized };
|
|
30
|
+
}
|
|
31
|
+
// Closing fence must be a line that is exactly `---` (optional trailing spaces).
|
|
32
|
+
const afterClose = normalized.slice(endIndex + 1); // starts at ---
|
|
33
|
+
if (!/^---[ \t]*(?:\n|$)/.test(afterClose)) {
|
|
10
34
|
return { yamlString: null, body: normalized };
|
|
11
35
|
}
|
|
36
|
+
const closeLineEnd = afterClose.search(/\n/);
|
|
37
|
+
const bodyStart = closeLineEnd === -1 ? normalized.length : endIndex + 1 + closeLineEnd + 1;
|
|
12
38
|
return {
|
|
13
|
-
yamlString: normalized.slice(
|
|
14
|
-
body: normalized.slice(
|
|
39
|
+
yamlString: normalized.slice(yamlStart, endIndex),
|
|
40
|
+
body: normalized.slice(bodyStart).trim(),
|
|
15
41
|
};
|
|
16
42
|
};
|
|
17
43
|
export const parseFrontmatter = (content) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../../src/utils/frontmatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAO7B,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAEvG,MAAM,kBAAkB,GAAG,CAAC,OAAe,EAA+C,EAAE,CAAC;IAC5F,MAAM,UAAU,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAE9C,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../../src/utils/frontmatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAO7B,MAAM,iBAAiB,GAAG,CAAC,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OAAO,CAAC,CAAC;IACzD,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,OAAO,EAAE,WAAW,EAAE,EAAO,EAAE,IAAI,EAAE,CAAC;IACvC,CAAC;IACD,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;IACjC,OAAO,EAAE,WAAW,EAAE,CAAC,MAAM,IAAI,EAAE,CAAM,EAAE,IAAI,EAAE,CAAC;AAAA,CAClD,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAU,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC","sourcesContent":["import { parse } from \"yaml\";\n\ntype ParsedFrontmatter<T extends Record<string, unknown>> = {\n\tfrontmatter: T;\n\tbody: string;\n};\n\nconst normalizeNewlines = (value: string): string => value.replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\");\n\nconst FRONTMATTER_OPEN = /^---(?:[ \\t]*\\r?\\n|$)/m;\n\n/**\n * Locate YAML frontmatter even when a short preamble (comments/HTML) precedes the opening fence.\n * bigpowers and similar skill packs emit story markers before `---`.\n */\nconst extractFrontmatter = (content: string): { yamlString: string | null; body: string } => {\n\tconst normalized = normalizeNewlines(content);\n\n\tconst openMatch = FRONTMATTER_OPEN.exec(normalized);\n\tif (!openMatch || openMatch.index === undefined) {\n\t\treturn { yamlString: null, body: normalized };\n\t}\n\n\t// Reject preambles that already look like document body (too long / has headings beyond comments).\n\tconst preamble = normalized.slice(0, openMatch.index);\n\tif (preamble.length > 0) {\n\t\tconst preambleLines = preamble.split(\"\\n\").filter((line) => line.trim().length > 0);\n\t\tconst onlyPreambleNoise = preambleLines.every(\n\t\t\t(line) =>\n\t\t\t\tline.trimStart().startsWith(\"#\") ||\n\t\t\t\tline.trimStart().startsWith(\"<!--\") ||\n\t\t\t\tline.trim() === \"-->\" ||\n\t\t\t\t/^ARCHIVED:/i.test(line.trim()),\n\t\t);\n\t\tif (!onlyPreambleNoise || preambleLines.length > 32) {\n\t\t\treturn { yamlString: null, body: normalized };\n\t\t}\n\t}\n\n\tconst yamlStart = openMatch.index + openMatch[0].length;\n\tconst endIndex = normalized.indexOf(\"\\n---\", yamlStart - 1);\n\tif (endIndex === -1 || endIndex < yamlStart) {\n\t\treturn { yamlString: null, body: normalized };\n\t}\n\n\t// Closing fence must be a line that is exactly `---` (optional trailing spaces).\n\tconst afterClose = normalized.slice(endIndex + 1); // starts at ---\n\tif (!/^---[ \\t]*(?:\\n|$)/.test(afterClose)) {\n\t\treturn { yamlString: null, body: normalized };\n\t}\n\n\tconst closeLineEnd = afterClose.search(/\\n/);\n\tconst bodyStart = closeLineEnd === -1 ? normalized.length : endIndex + 1 + closeLineEnd + 1;\n\n\treturn {\n\t\tyamlString: normalized.slice(yamlStart, endIndex),\n\t\tbody: normalized.slice(bodyStart).trim(),\n\t};\n};\n\nexport const parseFrontmatter = <T extends Record<string, unknown> = Record<string, unknown>>(\n\tcontent: string,\n): ParsedFrontmatter<T> => {\n\tconst { yamlString, body } = extractFrontmatter(content);\n\tif (!yamlString) {\n\t\treturn { frontmatter: {} as T, body };\n\t}\n\tconst parsed = parse(yamlString);\n\treturn { frontmatter: (parsed ?? {}) as T, body };\n};\n\nexport const stripFrontmatter = (content: string): string => parseFrontmatter(content).body;\n"]}
|
|
@@ -84,6 +84,10 @@ These variables are read by OMK itself:
|
|
|
84
84
|
| `OMK_SHARE_VIEWER_URL` | Override the base URL used by `/share` |
|
|
85
85
|
| `OMK_HARDWARE_CURSOR` | Set to `1` to show the hardware cursor; see [Terminal setup](terminal-setup.md) |
|
|
86
86
|
| `OMK_CONTEXT_GOVERNOR` | Configure the context-budget governor; see `context-budget-*` sources |
|
|
87
|
+
| `OMK_VERIFIED_BASH` | Default-on verified bash adapter for AgentSession/CLI bash. Set to `0` to opt out and use the legacy unverified path (see [SDK — Evidence and Verification](sdk.md#evidence-and-verification)) |
|
|
88
|
+
| `OMK_BASH_SANDBOX` | Bash sandbox mode: `audit` (default — unwrapped spawn, every decision recorded to the replay ledger), `enforce` (wrap with macOS `sandbox-exec` / Linux `bwrap`, fail closed when no backend), `0`/`off` to disable. `session.setBashSandboxMode()` overrides at runtime |
|
|
89
|
+
| `LIVE_E2E` | Test-only: keep provider credentials so live-API e2e suites run on purpose (default scrubbed for hermetic tests) |
|
|
90
|
+
| `OMK_OMP_SEAMS` | Default-on OMP pure seams for `read`/`grep`. Set to `0` to opt out |
|
|
87
91
|
| `VISUAL`, `EDITOR` | External editor fallback when `externalEditor` is unset |
|
|
88
92
|
| `HTTP_PROXY`, `HTTPS_PROXY` | Proxy outbound HTTP requests |
|
|
89
93
|
|
package/docs/sdk.md
CHANGED
|
@@ -505,14 +505,16 @@ const { session } = await createAgentSession({ resourceLoader: loader });
|
|
|
505
505
|
|
|
506
506
|
Specify which built-in tools to enable:
|
|
507
507
|
|
|
508
|
-
- Built-in tool names: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
|
|
509
|
-
- Default built-ins: `read`, `bash`, `edit`, `write`
|
|
508
|
+
- Built-in tool names: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`, `diagnostics`
|
|
509
|
+
- Default built-ins: `read`, `bash`, `edit`, `write`, `diagnostics`
|
|
510
510
|
- `noTools: "all"` disables all tools
|
|
511
511
|
- `noTools: "builtin"` disables default built-ins while keeping extension and custom tools enabled
|
|
512
512
|
- `excludeTools` disables specific built-in, extension, or custom tool names after any `tools` allowlist is applied
|
|
513
513
|
|
|
514
514
|
The `edit` tool returns `details.diff` for OMK's TUI display and `details.patch` as a standard unified patch for SDK consumers.
|
|
515
515
|
|
|
516
|
+
The `diagnostics` tool runs the project's own checkers and normalizes the result — `tsc --noEmit` for TypeScript, `pyright`/`ruff` for Python, `go vet` for Go, `cargo check` for Rust. Missing checkers or project markers are reported as `skipped` in the tool result instead of failing. Output is capped at 50 diagnostics and cached for 5 s.
|
|
517
|
+
|
|
516
518
|
```typescript
|
|
517
519
|
import { createAgentSession } from "open-multi-agent-kit";
|
|
518
520
|
|
|
@@ -1130,7 +1132,11 @@ RPC mode is preferred when:
|
|
|
1130
1132
|
|
|
1131
1133
|
## Evidence and Verification
|
|
1132
1134
|
|
|
1133
|
-
Execution-bound evidence
|
|
1135
|
+
Execution-bound evidence records a declared verification command and reported outcome between two artifact-set snapshots, then binds that record to a tamper-evident ledger. `VerifiedEvidenceExecutor` never executes the declared command. `executeVerifiedBash()` invokes caller-supplied `BashOperations`; `executeVerifiedLocalBash()` derives the shell identity and runner from OMK's built-in local backend.
|
|
1136
|
+
|
|
1137
|
+
**Default path (opt-out):** when an AgentSession has a replay ledger (persisted sessions create one automatically), LLM-callable `bash` and interactive/RPC `executeBash` bind through `executeVerifiedBash` with `executor: "bash-tool"` and receipts under `<sessionFile>.evidence/receipts` (or `cwd/.omk/session-evidence/<goalId>/receipts` for ephemeral sessions). Session workspace scope is git-aware: inside a worktree, the receipt binds the toplevel plus the sorted dirty set (capped at 32 paths, 1 s TTL). Set `OMK_VERIFIED_BASH=0` to restore the legacy unverified path. Custom `createBashTool()` calls stay unverified unless the caller wraps operations with `createVerifiedBashOperations()`. CI still runs release-consistency through `executeVerifiedLocalBash()` with `executor: "ci-runner"`.
|
|
1138
|
+
|
|
1139
|
+
**Default sandbox (opt-out):** session bash also carries a default `audit`-mode sandbox preflight (workspace-write policy rooted at the session cwd). The spawn stays unwrapped, but every decision is appended to the replay ledger as a `sandbox_audit` event, giving a tamper-evident audit trail. `OMK_BASH_SANDBOX=enforce` activates the real OS backend — macOS `sandbox-exec` seatbelt or Linux `bwrap` bubblewrap — and fails closed when neither is installed; `OMK_BASH_SANDBOX=0` disables the preflight entirely.
|
|
1134
1140
|
|
|
1135
1141
|
### Recorded and invoked inputs
|
|
1136
1142
|
|
|
@@ -1164,7 +1170,7 @@ Injected runners must follow the built-in terminal protocol: return an integer e
|
|
|
1164
1170
|
|
|
1165
1171
|
`.github/workflows/ci.yml` invokes the compiled `dist/verify-ci.js` entry after the normal repository check. That entry runs only `node scripts/check-release-consistency.mjs` through `executeVerifiedLocalBash()` with `executor: "ci-runner"`, applies a strict `EvidenceGate`, writes receipts, ledger, and report under `.omk/ci-evidence`, and returns a non-zero process exit when the gate is blocked. CI uploads that directory as `verified-release-consistency`.
|
|
1166
1172
|
|
|
1167
|
-
This callsite does not wrap the full build, check, or test suite
|
|
1173
|
+
This callsite does not wrap the full build, check, or test suite. Session bash receipts (default-on above) use an empty artifact set and do not replace CI's manifest-scoped release-consistency gate. CI workspace freshness remains limited to the root and coding-agent package manifests.
|
|
1168
1174
|
|
|
1169
1175
|
### Execution ordering
|
|
1170
1176
|
|
package/docs/settings.md
CHANGED
|
@@ -71,6 +71,7 @@ Advisory-only hint source for the v4 auto thinking-level resolver. Read from the
|
|
|
71
71
|
| `theme` | string | `"dark"` | Theme name (`"dark"`, `"light"`, or custom) |
|
|
72
72
|
| `quietStartup` | boolean | `false` | Hide startup header |
|
|
73
73
|
| `collapseChangelog` | boolean | `false` | Show condensed changelog after updates |
|
|
74
|
+
| `githubStarred` | boolean | `false` | Global-only. After the operator stars the OMK GitHub repo and runs `/star`, set to `true` so the startup star nudge stops. Fresh installs and anyone who has not confirmed stay `false`/`unset` and keep seeing the nudge every interactive launch |
|
|
74
75
|
| `enableInstallTelemetry` | boolean | `true` | Send an anonymous install/update version ping after first install or changelog-detected updates. This does not control update checks |
|
|
75
76
|
| `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
|
|
76
77
|
| `treeFilterMode` | string | `"default"` | Default filter for `/tree`: `"default"`, `"no-tools"`, `"user-only"`, `"labeled-only"`, `"all"` |
|
|
@@ -85,6 +86,16 @@ Advisory-only hint source for the v4 auto thinking-level resolver. Read from the
|
|
|
85
86
|
|
|
86
87
|
Set `OMK_SKIP_VERSION_CHECK=1` to disable the OMK version update check. Use `--offline` or `OMK_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
|
|
87
88
|
|
|
89
|
+
### GitHub star nudge
|
|
90
|
+
|
|
91
|
+
Interactive mode remembers whether this install has confirmed a GitHub star via global `githubStarred` in `~/.omk/agent/settings.json`.
|
|
92
|
+
|
|
93
|
+
- Missing / `false`: every interactive startup shows a star nudge with the repo link and `/star`.
|
|
94
|
+
- `/star`: opens https://github.com/dmae97/omk and sets `githubStarred: true` so the nudge stops.
|
|
95
|
+
- `/star reset`: clears the flag so the nudge returns on the next launch.
|
|
96
|
+
|
|
97
|
+
Project `.omk/settings.json` cannot silence this nudge; only the global flag counts.
|
|
98
|
+
|
|
88
99
|
### Warnings
|
|
89
100
|
|
|
90
101
|
| Setting | Type | Default | Description |
|
package/docs/usage.md
CHANGED
|
@@ -55,6 +55,7 @@ Type `/` in the editor to open command completion. Extensions can register custo
|
|
|
55
55
|
| `/reload` | Reload keybindings, extensions, skills, prompts, and context files |
|
|
56
56
|
| `/hotkeys` | Show all keyboard shortcuts |
|
|
57
57
|
| `/changelog` | Display version history |
|
|
58
|
+
| `/star` | Open the OMK GitHub repo and stop the startup star nudge after you star it (`/star reset` brings it back) |
|
|
58
59
|
| `/quit` | Quit omk |
|
|
59
60
|
|
|
60
61
|
## Automatic Thinking Level Routing
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-custom-provider-anthropic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.94.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-custom-provider-anthropic",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.94.1",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-gondolin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.94.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-gondolin",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.94.1",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@earendil-works/gondolin": "0.12.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.94.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-sandbox",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.94.1",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "0.0.26"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-with-deps",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.94.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-with-deps",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.94.1",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "2.1.3"
|
|
12
12
|
},
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-multi-agent-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.94.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "open-multi-agent-kit",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.94.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"omk-agent-core": "^0.
|
|
13
|
-
"omk-ai": "^0.
|
|
14
|
-
"omk-tui": "^0.
|
|
12
|
+
"omk-agent-core": "^0.94.1",
|
|
13
|
+
"omk-ai": "^0.94.1",
|
|
14
|
+
"omk-tui": "^0.94.1",
|
|
15
15
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
16
16
|
"chalk": "5.6.2",
|
|
17
17
|
"cross-spawn": "7.0.6",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typebox": "1.1.38",
|
|
27
27
|
"undici": "8.5.0",
|
|
28
28
|
"yaml": "2.9.0",
|
|
29
|
-
"omk-adaptorch-wpl": "^0.
|
|
29
|
+
"omk-adaptorch-wpl": "^0.94.1"
|
|
30
30
|
},
|
|
31
31
|
"optionalDependencies": {
|
|
32
32
|
"@mariozechner/clipboard": "0.3.9"
|
|
@@ -1424,19 +1424,19 @@
|
|
|
1424
1424
|
}
|
|
1425
1425
|
},
|
|
1426
1426
|
"node_modules/omk-adaptorch-wpl": {
|
|
1427
|
-
"version": "0.
|
|
1428
|
-
"resolved": "https://registry.npmjs.org/omk-adaptorch-wpl/-/omk-adaptorch-wpl-0.
|
|
1427
|
+
"version": "0.94.1",
|
|
1428
|
+
"resolved": "https://registry.npmjs.org/omk-adaptorch-wpl/-/omk-adaptorch-wpl-0.94.1.tgz",
|
|
1429
1429
|
"license": "MIT",
|
|
1430
1430
|
"engines": {
|
|
1431
1431
|
"node": ">=22.19.0"
|
|
1432
1432
|
}
|
|
1433
1433
|
},
|
|
1434
1434
|
"node_modules/omk-agent-core": {
|
|
1435
|
-
"version": "0.
|
|
1436
|
-
"resolved": "https://registry.npmjs.org/omk-agent-core/-/omk-agent-core-0.
|
|
1435
|
+
"version": "0.94.1",
|
|
1436
|
+
"resolved": "https://registry.npmjs.org/omk-agent-core/-/omk-agent-core-0.94.1.tgz",
|
|
1437
1437
|
"license": "MIT",
|
|
1438
1438
|
"dependencies": {
|
|
1439
|
-
"omk-ai": "^0.
|
|
1439
|
+
"omk-ai": "^0.94.1",
|
|
1440
1440
|
"ignore": "7.0.5",
|
|
1441
1441
|
"typebox": "1.1.38",
|
|
1442
1442
|
"yaml": "2.9.0"
|
|
@@ -1446,8 +1446,8 @@
|
|
|
1446
1446
|
}
|
|
1447
1447
|
},
|
|
1448
1448
|
"node_modules/omk-ai": {
|
|
1449
|
-
"version": "0.
|
|
1450
|
-
"resolved": "https://registry.npmjs.org/omk-ai/-/omk-ai-0.
|
|
1449
|
+
"version": "0.94.1",
|
|
1450
|
+
"resolved": "https://registry.npmjs.org/omk-ai/-/omk-ai-0.94.1.tgz",
|
|
1451
1451
|
"license": "MIT",
|
|
1452
1452
|
"dependencies": {
|
|
1453
1453
|
"@anthropic-ai/sdk": "0.91.1",
|
|
@@ -1469,8 +1469,8 @@
|
|
|
1469
1469
|
}
|
|
1470
1470
|
},
|
|
1471
1471
|
"node_modules/omk-tui": {
|
|
1472
|
-
"version": "0.
|
|
1473
|
-
"resolved": "https://registry.npmjs.org/omk-tui/-/omk-tui-0.
|
|
1472
|
+
"version": "0.94.1",
|
|
1473
|
+
"resolved": "https://registry.npmjs.org/omk-tui/-/omk-tui-0.94.1.tgz",
|
|
1474
1474
|
"license": "MIT",
|
|
1475
1475
|
"dependencies": {
|
|
1476
1476
|
"get-east-asian-width": "1.6.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-multi-agent-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.94.1",
|
|
4
4
|
"description": "OMK (Open Multi-Agent Kit) coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"omkConfig": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"postinstall": "node ./scripts/link-workspace-deps.mjs"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"omk-agent-core": "^0.
|
|
48
|
-
"omk-ai": "^0.
|
|
49
|
-
"omk-tui": "^0.
|
|
47
|
+
"omk-agent-core": "^0.94.1",
|
|
48
|
+
"omk-ai": "^0.94.1",
|
|
49
|
+
"omk-tui": "^0.94.1",
|
|
50
50
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
51
51
|
"chalk": "5.6.2",
|
|
52
52
|
"cross-spawn": "7.0.6",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"typebox": "1.1.38",
|
|
62
62
|
"undici": "8.5.0",
|
|
63
63
|
"yaml": "2.9.0",
|
|
64
|
-
"omk-adaptorch-wpl": "^0.
|
|
64
|
+
"omk-adaptorch-wpl": "^0.94.1"
|
|
65
65
|
},
|
|
66
66
|
"overrides": {
|
|
67
67
|
"rimraf": "6.1.2",
|