@tangle-network/agent-runtime 0.142.2 → 0.143.0

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.
Files changed (77) hide show
  1. package/dist/{activation-o7JKmtxi.js → activation-mi8TgSLM.js} +2 -2
  2. package/dist/{activation-o7JKmtxi.js.map → activation-mi8TgSLM.js.map} +1 -1
  3. package/dist/agent.d.ts +2 -2
  4. package/dist/agent.js +3 -3
  5. package/dist/{analyst-loop-GcX0BY75.js → analyst-loop-CvkmfhUB.js} +2 -2
  6. package/dist/{analyst-loop-GcX0BY75.js.map → analyst-loop-CvkmfhUB.js.map} +1 -1
  7. package/dist/analyst-loop.d.ts +1 -1
  8. package/dist/analyst-loop.js +1 -1
  9. package/dist/{authoring-Bm1WlGPv.js → authoring-DuyShLdw.js} +2 -2
  10. package/dist/{authoring-Bm1WlGPv.js.map → authoring-DuyShLdw.js.map} +1 -1
  11. package/dist/{conversation-DXKJHyqB.js → conversation-1hNtDeMM.js} +3 -3
  12. package/dist/{conversation-DXKJHyqB.js.map → conversation-1hNtDeMM.js.map} +1 -1
  13. package/dist/conversation.d.ts +1 -1
  14. package/dist/conversation.js +1 -1
  15. package/dist/durable.d.ts +2 -2
  16. package/dist/durable.js +1 -1
  17. package/dist/{environment-provider-BicwCDK5.d.ts → environment-provider-B8eZ85Ga.d.ts} +3 -3
  18. package/dist/{environment-provider-DCEACNt9.js → environment-provider-DCBJ13VP.js} +2 -2
  19. package/dist/{environment-provider-DCEACNt9.js.map → environment-provider-DCBJ13VP.js.map} +1 -1
  20. package/dist/environment-provider.d.ts +1 -1
  21. package/dist/environment-provider.js +1 -1
  22. package/dist/{graph-DhrLuLOS.js → graph-De_XEsfH.js} +2 -2
  23. package/dist/{graph-DhrLuLOS.js.map → graph-De_XEsfH.js.map} +1 -1
  24. package/dist/{improvement-cycle-lcwlR6E2.js → improvement-cycle-Bi-Tf4QF.js} +5 -5
  25. package/dist/{improvement-cycle-lcwlR6E2.js.map → improvement-cycle-Bi-Tf4QF.js.map} +1 -1
  26. package/dist/{index-Bx3-tqG-.d.ts → index-B8rKtH3U.d.ts} +4 -4
  27. package/dist/{index-D_aH0F4C.d.ts → index-C2caGomG.d.ts} +12 -27
  28. package/dist/{index-CV1xRWy2.d.ts → index-D4sLkOPY.d.ts} +3 -3
  29. package/dist/index.d.ts +9 -9
  30. package/dist/index.js +9 -9
  31. package/dist/intelligence.d.ts +5 -5
  32. package/dist/intelligence.js +4 -4
  33. package/dist/kernel.d.ts +7 -7
  34. package/dist/kernel.js +10 -10
  35. package/dist/{knowledge-C9LlSJAR.js → knowledge-CVE6Wk1i.js} +3 -3
  36. package/dist/{knowledge-C9LlSJAR.js.map → knowledge-CVE6Wk1i.js.map} +1 -1
  37. package/dist/knowledge.d.ts +1 -1
  38. package/dist/knowledge.js +1 -1
  39. package/dist/{loop-runner-bin-CctBy5-X.d.ts → loop-runner-bin-BoHdQqLm.d.ts} +3 -3
  40. package/dist/{loop-runner-bin-DFo6Ss-1.js → loop-runner-bin-DdaI1nLL.js} +4 -4
  41. package/dist/{loop-runner-bin-DFo6Ss-1.js.map → loop-runner-bin-DdaI1nLL.js.map} +1 -1
  42. package/dist/loop-runner-bin.d.ts +1 -1
  43. package/dist/loop-runner-bin.js +1 -1
  44. package/dist/{materialization-CrdcfWXp.js → materialization-P86EciBw.js} +43 -2
  45. package/dist/materialization-P86EciBw.js.map +1 -0
  46. package/dist/mcp/bin.js +3 -3
  47. package/dist/mcp/index.d.ts +5 -5
  48. package/dist/mcp/index.js +4 -4
  49. package/dist/{openai-tools-CSm460sC.js → openai-tools-BiAWKjh6.js} +2 -2
  50. package/dist/{openai-tools-CSm460sC.js.map → openai-tools-BiAWKjh6.js.map} +1 -1
  51. package/dist/{openai-tools-t5-6h5bj.d.ts → openai-tools-z-whdYNC.d.ts} +2 -2
  52. package/dist/primeintellect/index.d.ts +1 -1
  53. package/dist/profiles.d.ts +1 -1
  54. package/dist/{redact-B0gDSTZO.d.ts → redact-DexTuAiX.d.ts} +3 -3
  55. package/dist/{runtime-DQs5xHdt.js → runtime-BnqjbOGX.js} +18 -12
  56. package/dist/{runtime-DQs5xHdt.js.map → runtime-BnqjbOGX.js.map} +1 -1
  57. package/dist/{runtime-htqI3fKL.d.ts → runtime-J6Toky8K.d.ts} +22 -10
  58. package/dist/{sandbox-events-BK-g19wx.js → sandbox-events-COwCWUVB.js} +6 -49
  59. package/dist/sandbox-events-COwCWUVB.js.map +1 -0
  60. package/dist/{stream-agent-turn-Dfy12OjG.d.ts → stream-agent-turn-C1Vs_3B9.d.ts} +6 -3
  61. package/dist/{stream-agent-turn-BMHUIuQS.js → stream-agent-turn-CXRugSGO.js} +55 -14
  62. package/dist/stream-agent-turn-CXRugSGO.js.map +1 -0
  63. package/dist/{structural-rollout-CzZKDkmA.js → structural-rollout-CJgj9YXH.js} +4 -4
  64. package/dist/{structural-rollout-CzZKDkmA.js.map → structural-rollout-CJgj9YXH.js.map} +1 -1
  65. package/dist/{supervise-BEs5MB91.js → supervise-hCgG6ROJ.js} +3 -3
  66. package/dist/{supervise-BEs5MB91.js.map → supervise-hCgG6ROJ.js.map} +1 -1
  67. package/dist/{supervisor-B_0ISTFG.js → supervisor-s8SfZYbW.js} +107 -43
  68. package/dist/supervisor-s8SfZYbW.js.map +1 -0
  69. package/dist/testing.d.ts +2 -2
  70. package/dist/testing.js +11 -11
  71. package/dist/{types-DZrBoBpN.d.ts → types-DeX8ibLc.d.ts} +4 -1
  72. package/dist/{types-_7w24mMg.d.ts → types-Df9vulGc.d.ts} +2 -2
  73. package/package.json +5 -5
  74. package/dist/materialization-CrdcfWXp.js.map +0 -1
  75. package/dist/sandbox-events-BK-g19wx.js.map +0 -1
  76. package/dist/stream-agent-turn-BMHUIuQS.js.map +0 -1
  77. package/dist/supervisor-B_0ISTFG.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"materialization-P86EciBw.js","names":[],"sources":["../src/runtime/sandbox-outcome.ts","../src/runtime/supervise/executable-spec.ts","../src/runtime/supervise/materialization.ts"],"sourcesContent":["import type { AgentRunOutcome } from '@tangle-network/sandbox/runtime'\nimport type { AgentTaskStatus, BackendErrorDetail } from '../types'\nimport type { DefaultVerdict } from './supervise/types'\n\n/** The outcome carried by Runtime-owned Sandbox artifacts. */\nexport interface SandboxOutcomeCarrier {\n outcome?: AgentRunOutcome\n}\n\n/** Runtime's terminal projection of the public Sandbox outcome contract. */\nexport interface SandboxOutcomeProjection {\n status: AgentTaskStatus\n reason: string\n verdict: DefaultVerdict\n error?: BackendErrorDetail\n}\n\n/** Map the public Sandbox outcome to Runtime's stream and verdict vocabulary. */\nexport function projectSandboxOutcome(outcome: AgentRunOutcome): SandboxOutcomeProjection {\n if (outcome.status === 'success') {\n return {\n status: 'completed',\n reason: 'turn completed',\n verdict: { valid: true, score: 1 },\n }\n }\n\n const reason = outcome.error ?? 'Sandbox agent run failed'\n if (outcome.status === 'failed') {\n return {\n status: 'failed',\n reason,\n verdict: { valid: false, score: 0 },\n error: { kind: 'backend', message: reason },\n }\n }\n\n return {\n status: 'blocked',\n reason,\n verdict: { valid: false, score: 0 },\n }\n}\n\n/** Read an outcome that Runtime attached to one of its own executor artifacts. */\nexport function readSandboxOutcome(value: unknown): AgentRunOutcome | undefined {\n if (!value || typeof value !== 'object') return undefined\n const outcome = (value as SandboxOutcomeCarrier).outcome\n if (!outcome || typeof outcome !== 'object') return undefined\n return outcome\n}\n","import { type AgentProfile, agentProfileSchema } from '@tangle-network/agent-interface'\nimport { assertExecutableAgentProfile } from './model-policy'\nimport { detachedSnapshot } from './snapshot'\nimport type { AgentSpec } from './types'\n\n/**\n * Parse one untrusted profile into the exact immutable value execution may consume.\n *\n * Snapshotting before schema parsing reads caller-owned fields once. Snapshotting the parsed\n * result prevents downstream custom code from changing any identity or authority field.\n */\nexport function executableAgentProfileSnapshot(raw: unknown, context: string): AgentProfile {\n const input = detachedSnapshot(raw, `${context}: AgentProfile input`)\n const profile = agentProfileSchema.parse(input)\n assertExecutableAgentProfile(profile, context)\n return detachedSnapshot(profile, `${context}: parsed AgentProfile`)\n}\n\n/** Snapshot an executable spec while retaining trusted callbacks by reference. */\nexport function executableAgentSpecSnapshot(raw: AgentSpec, context: string): AgentSpec {\n const {\n profile: rawProfile,\n harness,\n execution: rawExecution,\n ...runtimeExtensions\n } = raw as AgentSpec & Readonly<Record<string, unknown>>\n const profile = executableAgentProfileSnapshot(rawProfile, context)\n const execution =\n rawExecution === undefined\n ? undefined\n : detachedSnapshot(rawExecution, `${context}: execution attribution`)\n return Object.freeze({\n ...runtimeExtensions,\n profile,\n harness,\n ...(execution === undefined ? {} : { execution }),\n }) as AgentSpec\n}\n","import { randomUUID } from 'node:crypto'\nimport {\n agentProfileSchema,\n canonicalAgentProfileDigest,\n canonicalCandidateDigest,\n type Sha256Digest,\n} from '@tangle-network/agent-interface'\nimport { ValidationError } from '../../errors'\nimport { detachedSnapshot } from './snapshot'\nimport type {\n ExecutionBindingReceipt,\n Executor,\n ExecutorExecutionBinding,\n ExecutorMaterialization,\n ProfileMaterializationReceipt,\n ProviderModelAttemptEvidence,\n ProviderModelExecutionEvidence,\n Runtime,\n UnknownMaterializationReason,\n} from './types'\n\ntype RuntimeOwnedExecutorMaterialization =\n | {\n readonly kind: 'known'\n readonly declaration: ExecutorMaterialization\n readonly binding?: ExecutorExecutionBinding\n }\n | {\n /** A Runtime-owned external executor whose exact launch is known, but whose remote\n * materializer has not yet returned its terminal acknowledgement. This private state lets\n * Runtime validate the planned authority before execution without presenting it as proof\n * that the remote process actually used that plan. */\n readonly kind: 'pending'\n readonly runtime: Runtime\n readonly declaration: ExecutorMaterialization\n readonly binding: ExecutorExecutionBinding\n }\n | { readonly kind: 'deferred'; readonly runtime: Runtime }\n\ninterface RuntimeOwnedExecutorMaterializationRef {\n current: RuntimeOwnedExecutorMaterialization\n}\n\nconst runtimeOwnedExecutorMaterializations = new WeakMap<\n object,\n RuntimeOwnedExecutorMaterializationRef\n>()\nconst runtimeOwnedScopeOwners = new WeakMap<object, Runtime>()\nconst runtimeOwnedExecutorProviderEvidenceState = new WeakMap<\n object,\n {\n readonly attempts: Array<{\n readonly observations: string[]\n identityConflict?: boolean\n providerDispatch?: 'not_started'\n }>\n }\n>()\nconst runtimeOwnedDriveHarnessProviderEvidenceState = new WeakMap<\n object,\n ProviderModelExecutionEvidence\n>()\n\ninterface KnownReceiptInput {\n readonly authoredProfileDigest: Sha256Digest\n readonly runtime: Runtime\n readonly declaration: ExecutorMaterialization\n}\n\ninterface UnknownReceiptInput {\n readonly authoredProfileDigest?: Sha256Digest\n readonly runtime: Runtime\n readonly reason: UnknownMaterializationReason\n}\n\nconst declarationKeys = new Set([\n 'effectiveProfile',\n 'backend',\n 'model',\n 'execution',\n 'materializer',\n 'plan',\n 'platformAttachments',\n])\n\n/**\n * Bind a declaration to a runtime-owned executor without putting an attestable method on the\n * public Executor interface. This module is not a package export: arbitrary caller executors stay\n * unknown even if they add a lookalike `materialization()` property.\n */\nexport function attestRuntimeOwnedExecutor<Out>(\n executor: Executor<Out>,\n declaration: ExecutorMaterialization,\n binding?: ExecutorExecutionBinding,\n): Executor<Out> {\n runtimeOwnedExecutorMaterializations.set(executor as object, {\n current: Object.freeze({\n kind: 'known',\n declaration: detachedSnapshot(declaration, 'runtime-owned executor materialization'),\n ...(binding === undefined\n ? {}\n : {\n binding: detachedSnapshot(binding, 'runtime-owned executor execution binding'),\n }),\n }),\n })\n ensureProviderEvidenceState(executor)\n return executor\n}\n\n/** Brand an external Runtime executor whose exact remote materialization is provable only after\n * its terminal protocol acknowledgement. The declaration is a planned authority check, never a\n * known receipt; callers must finalize this same object after validating the acknowledgement. */\nexport function attestRuntimeOwnedPendingExecutor<Out>(\n executor: Executor<Out>,\n runtime: Runtime,\n declaration: ExecutorMaterialization,\n binding: ExecutorExecutionBinding,\n): Executor<Out> {\n runtimeOwnedExecutorMaterializations.set(executor as object, {\n current: Object.freeze({\n kind: 'pending',\n runtime,\n declaration: detachedSnapshot(declaration, 'pending executor materialization'),\n binding: detachedSnapshot(binding, 'pending executor execution binding'),\n }),\n })\n return executor\n}\n\n/** Replace a private pending brand with terminally acknowledged evidence. A caller-owned executor\n * cannot enter this path because only this module can create the pending WeakMap entry. */\nexport function finalizeRuntimeOwnedPendingExecutor<Out>(\n executor: Executor<Out>,\n declaration: ExecutorMaterialization,\n binding: ExecutorExecutionBinding,\n): Executor<Out> {\n const ref = runtimeOwnedExecutorMaterializations.get(executor as object)\n if (ref?.current.kind !== 'pending' || ref.current.runtime !== executor.runtime) {\n throw new ValidationError(\n 'executor materialization: terminal acknowledgement has no matching Runtime-owned pending executor',\n )\n }\n ref.current = Object.freeze({\n kind: 'known',\n declaration: detachedSnapshot(declaration, 'runtime-owned executor materialization'),\n binding: detachedSnapshot(binding, 'runtime-owned executor execution binding'),\n })\n return executor\n}\n\n/** Mark a runtime-owned orchestration executor whose exact leaf declaration is published through\n * its private nested Scope before the first backend inference. Arbitrary executors cannot opt in. */\nexport function attestRuntimeOwnedDeferredExecutor<Out>(\n executor: Executor<Out>,\n runtime: Runtime,\n): Executor<Out> {\n runtimeOwnedExecutorMaterializations.set(executor as object, {\n current: Object.freeze({ kind: 'deferred', runtime }),\n })\n return executor\n}\n\n/** Preserve the runtime-owned attestation when a trusted wrapper changes result semantics only. */\nexport function inheritRuntimeOwnedExecutorAttestation<In, Out>(\n source: Executor<In>,\n wrapper: Executor<Out>,\n): Executor<Out> {\n const ref = runtimeOwnedExecutorMaterializations.get(source as object)\n if (ref !== undefined) {\n runtimeOwnedExecutorMaterializations.set(wrapper as object, ref)\n }\n const providerState = ensureProviderEvidenceState(source)\n runtimeOwnedExecutorProviderEvidenceState.set(wrapper as object, providerState)\n return wrapper\n}\n\nfunction ensureProviderEvidenceState<Out>(executor: Executor<Out>): {\n readonly attempts: Array<{\n readonly observations: string[]\n identityConflict?: boolean\n providerDispatch?: 'not_started'\n }>\n} {\n const existing = runtimeOwnedExecutorProviderEvidenceState.get(executor as object)\n if (existing !== undefined) return existing\n const state = { attempts: [] }\n runtimeOwnedExecutorProviderEvidenceState.set(executor as object, state)\n return state\n}\n\n/** Read a declaration only when Runtime itself branded this exact executor object. */\nexport function runtimeOwnedExecutorMaterialization<Out>(\n executor: Executor<Out>,\n): ExecutorMaterialization | undefined {\n const attestation = runtimeOwnedExecutorMaterializations.get(executor as object)?.current\n return attestation?.kind === 'known' ? attestation.declaration : undefined\n}\n\n/** Read one attempt binding only from the private brand on this exact executor object. */\nexport function runtimeOwnedExecutorExecutionBinding<Out>(\n executor: Executor<Out>,\n): ExecutorExecutionBinding | undefined {\n const attestation = runtimeOwnedExecutorMaterializations.get(executor as object)?.current\n return attestation?.kind === 'known' ? attestation.binding : undefined\n}\n\n/** Read a planned external declaration only for Runtime's private pending brand. This is useful for\n * pre-execution authority checks, but must never be turned into a known durable receipt. */\nexport function runtimeOwnedPendingExecutorMaterialization<Out>(executor: Executor<Out>):\n | {\n readonly runtime: Runtime\n readonly declaration: ExecutorMaterialization\n readonly binding: ExecutorExecutionBinding\n }\n | undefined {\n const attestation = runtimeOwnedExecutorMaterializations.get(executor as object)?.current\n return attestation?.kind === 'pending'\n ? {\n runtime: attestation.runtime,\n declaration: attestation.declaration,\n binding: attestation.binding,\n }\n : undefined\n}\n\n/** Read the expected leaf runtime only for a privately branded deferred orchestration executor. */\nexport function runtimeOwnedDeferredExecutorRuntime<Out>(\n executor: Executor<Out>,\n): Runtime | undefined {\n const attestation = runtimeOwnedExecutorMaterializations.get(executor as object)?.current\n return attestation?.kind === 'deferred' ? attestation.runtime : undefined\n}\n\n/** Propagate trust from a built-in driver adapter to the Agent and recursive executor it owns. */\nexport function attestRuntimeOwnedScopeOwner<T extends object>(owner: T, runtime: Runtime): T {\n runtimeOwnedScopeOwners.set(owner, runtime)\n return owner\n}\n\n/** Return a built-in scope owner's expected concrete leaf runtime; caller-owned functions/Agents\n * deliberately have no entry even if they add lookalike fields. */\nexport function runtimeOwnedScopeOwnerRuntime(owner: object): Runtime | undefined {\n return runtimeOwnedScopeOwners.get(owner)\n}\n\n/** Mark one provider inference attempt on a Runtime-owned executor. */\nexport function recordRuntimeOwnedProviderAttemptStart<Out>(executor: Executor<Out>): void {\n const state = ensureProviderEvidenceState(executor)\n state.attempts.push({ observations: [] })\n}\n\n/** Mark the current attempt as rejected before provider dispatch.\n *\n * The caller may use this only after consuming the Router-owned\n * `provider_dispatch: \"not_started\"` fact. Any other error stays an empty,\n * unknown attempt and must not be upgraded here.\n */\nexport function recordRuntimeOwnedProviderDispatchNotStarted<Out>(executor: Executor<Out>): void {\n const state = ensureProviderEvidenceState(executor)\n const attempt = state.attempts.at(-1)\n if (attempt === undefined) {\n throw new ValidationError('provider dispatch rejection arrived before an attempt started')\n }\n if (attempt.observations.length > 0 || attempt.identityConflict === true) {\n throw new ValidationError(\n 'provider dispatch rejection arrived after provider identity evidence was observed',\n )\n }\n attempt.providerDispatch = 'not_started'\n}\n\n/** Record a trusted served model on the current provider attempt. */\nexport function recordRuntimeOwnedProviderModel<Out>(executor: Executor<Out>, model: string): void {\n const state = runtimeOwnedExecutorProviderEvidenceState.get(executor as object)\n const attempt = state?.attempts.at(-1)\n if (attempt === undefined) {\n throw new ValidationError('provider model observation arrived before an attempt started')\n }\n if (attempt.observations.at(-1) !== model) attempt.observations.push(model)\n}\n\n/** Convert process-local provider observations into a frozen, replayable evidence value. */\nexport function runtimeOwnedExecutorProviderEvidence<Out>(\n executor: Executor<Out>,\n): ProviderModelExecutionEvidence | undefined {\n const state = runtimeOwnedExecutorProviderEvidenceState.get(executor as object)\n if (state === undefined || state.attempts.length === 0) return undefined\n const attempts: ReadonlyArray<ProviderModelAttemptEvidence> = Object.freeze(\n state.attempts.map((attempt) =>\n Object.freeze({\n observations: Object.freeze([...attempt.observations]),\n ...(attempt.identityConflict ? { identityConflict: true } : {}),\n ...(attempt.providerDispatch === 'not_started'\n ? { providerDispatch: 'not_started' as const }\n : {}),\n }),\n ),\n )\n const models = Object.freeze([...new Set(attempts.flatMap((attempt) => attempt.observations))])\n const missing = attempts.some(\n (attempt) => attempt.observations.length === 0 && attempt.providerDispatch !== 'not_started',\n )\n const conflict = attempts.some((attempt) => attempt.identityConflict === true)\n const served = attempts.some((attempt) => attempt.observations.length > 0)\n return Object.freeze(\n missing || conflict || !served\n ? {\n status: 'unknown' as const,\n attempts,\n models,\n reason: conflict\n ? ('provider-model-conflict' as const)\n : ('provider-model-missing' as const),\n }\n : { status: 'known' as const, attempts, models },\n )\n}\n\n/** Mark the current provider attempt unusable after conflicting served identity metadata. */\nexport function recordRuntimeOwnedProviderIdentityConflict<Out>(executor: Executor<Out>): void {\n const state = ensureProviderEvidenceState(executor)\n const attempt = state.attempts.at(-1)\n if (attempt === undefined) {\n throw new ValidationError('provider identity conflict arrived before an attempt started')\n }\n attempt.identityConflict = true\n}\n\n/** Attach one executor's provider evidence to a Runtime-owned root drive for final projection. */\nexport function recordRuntimeOwnedDriveHarnessProviderEvidence(\n owner: object,\n evidence: ProviderModelExecutionEvidence | undefined,\n): void {\n if (evidence === undefined) return\n const prior = runtimeOwnedDriveHarnessProviderEvidenceState.get(owner)\n if (prior === undefined) {\n runtimeOwnedDriveHarnessProviderEvidenceState.set(owner, evidence)\n return\n }\n const attempts = Object.freeze([...prior.attempts, ...evidence.attempts])\n const models = Object.freeze([...new Set([...prior.models, ...evidence.models])])\n const missing = attempts.some(\n (attempt) => attempt.observations.length === 0 && attempt.providerDispatch !== 'not_started',\n )\n const conflict = attempts.some((attempt) => attempt.identityConflict === true)\n const served = attempts.some((attempt) => attempt.observations.length > 0)\n runtimeOwnedDriveHarnessProviderEvidenceState.set(\n owner,\n Object.freeze(\n missing || conflict || !served\n ? {\n status: 'unknown' as const,\n attempts,\n models,\n reason: conflict\n ? ('provider-model-conflict' as const)\n : ('provider-model-missing' as const),\n }\n : { status: 'known' as const, attempts, models },\n ),\n )\n}\n\n/** Read provider evidence recorded by a Runtime-owned root drive. */\nexport function runtimeOwnedDriveHarnessProviderEvidence(\n owner: object,\n): ProviderModelExecutionEvidence | undefined {\n return runtimeOwnedDriveHarnessProviderEvidenceState.get(owner)\n}\n\n/** Build one kernel-owned known receipt from a data-only executor declaration. */\nexport function knownMaterializationReceipt(\n input: KnownReceiptInput,\n): ProfileMaterializationReceipt {\n const declaration = detachedSnapshot(input.declaration, 'executor materialization')\n assertExactDeclaration(declaration)\n const effectiveProfile = agentProfileSchema.safeParse(declaration.effectiveProfile)\n if (!effectiveProfile.success) {\n throw new ValidationError('executor materialization: effectiveProfile must be an AgentProfile')\n }\n assertNonEmpty(declaration.backend, 'backend')\n assertNonEmpty(declaration.materializer, 'materializer')\n assertNonEmpty(declaration.execution?.kind, 'execution.kind')\n assertNonEmpty(declaration.execution?.id, 'execution.id')\n assertModel(declaration.model)\n\n let effectiveProfileDigest: Sha256Digest\n let materializationPlanDigest: Sha256Digest\n let platformAttachmentsDigest: Sha256Digest | undefined\n try {\n effectiveProfileDigest = canonicalAgentProfileDigest(effectiveProfile.data)\n materializationPlanDigest = canonicalCandidateDigest(jsonWireSnapshot(declaration.plan))\n platformAttachmentsDigest =\n declaration.platformAttachments === undefined\n ? undefined\n : canonicalCandidateDigest(jsonWireSnapshot(declaration.platformAttachments))\n } catch (error) {\n throw new ValidationError(\n 'executor materialization: profile, plan, and attachments must be finite RFC 8785 JSON',\n { cause: error },\n )\n }\n\n return Object.freeze({\n status: 'known' as const,\n authoredProfileDigest: input.authoredProfileDigest,\n effectiveProfileDigest,\n materializationPlanDigest,\n ...(platformAttachmentsDigest === undefined ? {} : { platformAttachmentsDigest }),\n runtime: input.runtime,\n backend: declaration.backend,\n model: declaration.model,\n execution: declaration.execution,\n materializer: declaration.materializer,\n })\n}\n\n/** Build an explicit unknown receipt without fabricating any executor-owned identity. */\nexport function unknownMaterializationReceipt(\n input: UnknownReceiptInput,\n): ProfileMaterializationReceipt {\n return Object.freeze({\n status: 'unknown' as const,\n ...(input.authoredProfileDigest === undefined\n ? {}\n : { authoredProfileDigest: input.authoredProfileDigest }),\n runtime: input.runtime,\n reason: input.reason,\n })\n}\n\n/** Mint a process-unique attempt id before executor construction. */\nexport function newExecutionAttemptId(nodeId: string): string {\n return `${nodeId}:attempt:${randomUUID()}`\n}\n\n/** Build the immutable safe receipt for a full, transient execution binding. */\nexport function knownExecutionBindingReceipt(\n materialization: ProfileMaterializationReceipt,\n bindingInput: ExecutorExecutionBinding,\n): ExecutionBindingReceipt {\n const binding = detachedSnapshot(bindingInput, 'executor execution binding')\n assertNonEmpty(binding.attemptId, 'binding.attemptId')\n assertSafeDescriptor(binding.descriptor)\n let materializationReceiptDigest: Sha256Digest\n let bindingDigest: Sha256Digest\n try {\n materializationReceiptDigest = canonicalCandidateDigest(materialization)\n // Bind the exact JSON document a backend receives. Optional AgentProfile fields are represented\n // as `undefined` in memory but omitted by JSON transport; normalize that one distinction while\n // rejecting every non-finite/non-data value instead of silently coercing it.\n bindingDigest = canonicalCandidateDigest(jsonWireSnapshot(binding.binding))\n } catch (error) {\n throw new ValidationError('executor binding must be finite RFC 8785 JSON', { cause: error })\n }\n return Object.freeze({\n status: 'known' as const,\n attemptId: binding.attemptId,\n materializationReceiptDigest,\n bindingDigest,\n descriptor: binding.descriptor,\n })\n}\n\n/** Preserve an attempt boundary even when its caller-owned transport cannot be attested. */\nexport function unknownExecutionBindingReceipt(\n materialization: ProfileMaterializationReceipt,\n attemptId: string,\n reason: UnknownMaterializationReason,\n): ExecutionBindingReceipt {\n assertNonEmpty(attemptId, 'binding.attemptId')\n return Object.freeze({\n status: 'unknown' as const,\n attemptId,\n materializationReceiptDigest: canonicalCandidateDigest(materialization),\n reason,\n })\n}\n\n/** Derive an authored-profile digest without turning non-canonical input into a fake identity. */\nexport function authoredProfileDigest(profile: unknown): Sha256Digest | undefined {\n try {\n return canonicalAgentProfileDigest(agentProfileSchema.parse(profile))\n } catch {\n return undefined\n }\n}\n\nfunction assertExactDeclaration(value: ExecutorMaterialization): void {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new ValidationError('executor materialization: declaration must be an object')\n }\n const unknown = Object.keys(value).filter((key) => !declarationKeys.has(key))\n if (unknown.length > 0) {\n throw new ValidationError(\n `executor materialization: unknown declaration fields: ${unknown.sort().join(', ')}`,\n )\n }\n if (!Object.hasOwn(value, 'plan')) {\n throw new ValidationError('executor materialization: plan is required')\n }\n}\n\nfunction assertModel(model: ExecutorMaterialization['model']): void {\n if (typeof model !== 'object' || model === null || Array.isArray(model)) {\n throw new ValidationError('executor materialization: model must be a known/unknown identity')\n }\n const keys = Object.keys(model).sort()\n if (model.status === 'known') {\n if (keys.join(',') !== 'id,status') {\n throw new ValidationError('executor materialization: known model accepts only status and id')\n }\n assertNonEmpty(model.id, 'model.id')\n return\n }\n if (model.status === 'unknown') {\n if (keys.join(',') !== 'reason,status') {\n throw new ValidationError(\n 'executor materialization: unknown model accepts only status and reason',\n )\n }\n assertNonEmpty(model.reason, 'model.reason')\n return\n }\n throw new ValidationError('executor materialization: model.status must be known or unknown')\n}\n\nfunction assertNonEmpty(value: unknown, field: string): asserts value is string {\n if (typeof value !== 'string' || value.trim().length === 0) {\n throw new ValidationError(`executor materialization: ${field} must be a non-empty string`)\n }\n}\n\nfunction assertSafeDescriptor(descriptor: ExecutorExecutionBinding['descriptor']): void {\n if (typeof descriptor !== 'object' || descriptor === null || Array.isArray(descriptor)) {\n throw new ValidationError('executor binding: descriptor must be an object')\n }\n for (const [key, value] of Object.entries(descriptor)) {\n if (/(url|uri|token|key|secret|bearer|credential|authorization)/i.test(key)) {\n throw new ValidationError(`executor binding: unsafe descriptor key ${JSON.stringify(key)}`)\n }\n if (\n value !== null &&\n typeof value !== 'string' &&\n typeof value !== 'number' &&\n typeof value !== 'boolean'\n ) {\n throw new ValidationError(\n `executor binding: descriptor ${JSON.stringify(key)} must be scalar`,\n )\n }\n if (typeof value === 'string' && (value.includes('://') || value.includes('@'))) {\n throw new ValidationError(\n `executor binding: descriptor ${JSON.stringify(key)} contains transport or credential text`,\n )\n }\n }\n}\n\nfunction jsonWireSnapshot(value: unknown, path = '$'): unknown {\n if (value === null || typeof value === 'string' || typeof value === 'boolean') return value\n if (typeof value === 'number') {\n if (!Number.isFinite(value)) {\n throw new ValidationError(`executor binding: ${path} must be finite`)\n }\n return value\n }\n if (Array.isArray(value)) {\n return value.map((item, index) => {\n if (item === undefined) {\n throw new ValidationError(`executor binding: ${path}[${index}] cannot be undefined`)\n }\n return jsonWireSnapshot(item, `${path}[${index}]`)\n })\n }\n if (typeof value !== 'object' || value === null) {\n throw new ValidationError(`executor binding: ${path} must be JSON data`)\n }\n const prototype = Object.getPrototypeOf(value)\n if (prototype !== Object.prototype && prototype !== null) {\n throw new ValidationError(`executor binding: ${path} must be a plain object`)\n }\n const out: Record<string, unknown> = {}\n for (const [key, item] of Object.entries(value as Record<string, unknown>)) {\n if (item === undefined) continue\n out[key] = jsonWireSnapshot(item, `${path}.${key}`)\n }\n return out\n}\n"],"mappings":";;;;;;;AAkBA,SAAgB,sBAAsB,SAAoD;CACxF,IAAI,QAAQ,WAAW,WACrB,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,SAAS;GAAE,OAAO;GAAM,OAAO;EAAE;CACnC;CAGF,MAAM,SAAS,QAAQ,SAAS;CAChC,IAAI,QAAQ,WAAW,UACrB,OAAO;EACL,QAAQ;EACR;EACA,SAAS;GAAE,OAAO;GAAO,OAAO;EAAE;EAClC,OAAO;GAAE,MAAM;GAAW,SAAS;EAAO;CAC5C;CAGF,OAAO;EACL,QAAQ;EACR;EACA,SAAS;GAAE,OAAO;GAAO,OAAO;EAAE;CACpC;AACF;;AAGA,SAAgB,mBAAmB,OAA6C;CAC9E,IAAI,CAAC,SAAS,OAAO,UAAU,UAAU,OAAO,KAAA;CAChD,MAAM,UAAW,MAAgC;CACjD,IAAI,CAAC,WAAW,OAAO,YAAY,UAAU,OAAO,KAAA;CACpD,OAAO;AACT;;;;;;;;;ACvCA,SAAgB,+BAA+B,KAAc,SAA+B;CAC1F,MAAM,QAAQ,iBAAiB,KA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E,gBACtD;EAEF,IAAI,OAAO,UAAU,aAAa,MAAM,SAAS,KAAK,KAAK,MAAM,SAAS,GAAG,IAC3E,MAAM,IAAI,gBACR,gCAAgC,KAAK,UAAU,GAAG,EAAE,uCACtD;CAEJ;AACF;AAEA,SAAS,iBAAiB,OAAgB,OAAO,KAAc;CAC7D,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO;CACtF,IAAI,OAAO,UAAU,UAAU;EAC7B,IAAI,CAAC,OAAO,SAAS,KAAK,GACxB,MAAM,IAAI,gBAAgB,qBAAqB,KAAK,gBAAgB;EAEtE,OAAO;CACT;CACA,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO,MAAM,KAAK,MAAM,UAAU;EAChC,IAAI,SAAS,KAAA,GACX,MAAM,IAAI,gBAAgB,qBAAqB,KAAK,GAAG,MAAM,sBAAsB;EAErF,OAAO,iBAAiB,MAAM,GAAG,KAAK,GAAG,MAAM,EAAE;CACnD,CAAC;CAEH,IAAI,OAAO,UAAU,YAAY,UAAU,MACzC,MAAM,IAAI,gBAAgB,qBAAqB,KAAK,mBAAmB;CAEzE,MAAM,YAAY,OAAO,eAAe,KAAK;CAC7C,IAAI,cAAc,OAAO,aAAa,cAAc,MAClD,MAAM,IAAI,gBAAgB,qBAAqB,KAAK,wBAAwB;CAE9E,MAAM,MAA+B,CAAC;CACtC,KAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,KAAgC,GAAG;EAC1E,IAAI,SAAS,KAAA,GAAW;EACxB,IAAI,OAAO,iBAAiB,MAAM,GAAG,KAAK,GAAG,KAAK;CACpD;CACA,OAAO;AACT"}
package/dist/mcp/bin.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { i as ConfigError } from "../errors-CDZ8XsVj.js";
3
- import { St as readTraceContextFromEnv } from "../supervisor-B_0ISTFG.js";
4
- import { C as createMcpServer, Z as DelegationTaskQueue, st as FileDelegationStore } from "../supervise-BEs5MB91.js";
5
- import { a as supervisorInstructions } from "../authoring-Bm1WlGPv.js";
3
+ import { St as readTraceContextFromEnv } from "../supervisor-s8SfZYbW.js";
4
+ import { C as createMcpServer, Z as DelegationTaskQueue, st as FileDelegationStore } from "../supervise-hCgG6ROJ.js";
5
+ import { a as supervisorInstructions } from "../authoring-DuyShLdw.js";
6
6
  //#region src/mcp/delegate-supervisor-provisioning.ts
7
7
  function trimmed(value) {
8
8
  const v = value?.trim();
@@ -1,10 +1,10 @@
1
- import { E as SandboxClient, h as LoopSandboxPlacement } from "../types-DZrBoBpN.js";
2
- import { $d as DELEGATION_TRACE_MAX_BYTES, $l as CoordinationTools, $u as createFleetWorkspaceExecutor, Ad as DelegateResearchResult, Au as DelegateHandlerOptions, Bd as DelegationProfile, Bu as CoderReviewer, Cd as DelegateCodeArgs, Cu as createInProcessTransport, Dd as DelegateFeedbackResult, Du as DELEGATE_TOOL_NAME, Ed as DelegateFeedbackArgs, Eu as DELEGATE_INPUT_SCHEMA, Fd as DelegationError, Fu as FeedbackStore, Gd as DelegationStatusResult, Gl as AnalystFindingEvent, Gu as UiAuditorDelegate, Hd as DelegationResultPayload, Hu as DetachedSessionDelegateOptions, Id as DelegationFeedbackSnapshot, Iu as InMemoryFeedbackStore, Jd as ResearchOutputShape, Jl as AuthorizeDownMessage, Ju as settleDetachedCoderTurn, Kd as FeedbackRating, Kl as AnalystRegistry, Ku as coderTaskFromArgs, Ld as DelegationHistoryArgs, Lu as eventToSnapshot, Md as DelegateUiAuditConfig, Mu as createDelegateHandler, Nd as DelegateUiAuditResult, Nu as validateDelegateArgs, Od as DelegateResearchArgs, Ou as DelegateArgs, Pd as DelegateUiAuditRoute, Pu as FeedbackEvent, Qd as CappedDelegationTrace, Qf as CoderOutput, Ql as CoordinationEvent, Qu as SiblingSandboxExecutorOptions, Rd as DelegationHistoryEntry, Ru as CoderDelegate, Sd as hashIdempotencyInput, Su as McpServerOptions, Td as DelegateCodeResult, Tu as DELEGATE_DESCRIPTION, Ud as DelegationStatus, Uu as DetachedWinnerSelection, Vd as DelegationProgress, Vu as DelegateRunCtx, Wd as DelegationStatusArgs, Wu as SettleDetachedCoderTurnOptions, Xd as UiAuditLensFilter, Xl as ContinuationInstruction, Xu as FleetHandle, Yd as ResearchSource, Yl as AuthorizedDownMessage, Yu as DelegationExecutor, Zd as UiAuditorDelegationOutput, Zu as FleetWorkspaceExecutorOptions, _d as DelegationRunContext, _u as WorkerWatchOptions, ad as DriveTurnTick, af as capDelegationTrace, au as DownMessageEvent, bd as SubmitInput, cd as detachedTurnEvents, cf as DelegationPersistenceError, cu as QuestionDecision, dd as runDetachedTurn, df as FileDelegationStore, du as QuestionPolicy, ed as createSiblingSandboxExecutor, ef as DELEGATION_TRACE_MAX_SPANS, eu as CoordinationToolsOptions, fd as DelegationArgs, ff as FileDelegationStoreOptions, fu as QuestionRecord, gd as DelegationResumeTick, gu as WorkerSpawnContext, hd as DelegationResumeDriver, id as DriveTurnCapableBox, if as buildDelegationTraceSpans, iu as DownMessageDeliveryOutcome, jd as DelegateUiAuditArgs, ju as DelegateResult, kd as DelegateResearchConfig, ku as DelegateError, ld as formatDetachedSessionRef, lf as DelegationStateCorruptError, lu as QuestionLevel, md as DelegationResumeContext, mu as SettledWorker, nd as DetachedTurn, nf as DelegationTraceCollector, nu as DownMessageAuthorizationInput, od as RunDetachedTurnOptions, of as composeLoopTraceEmitters, ou as MakeWorkerAgent, pd as DelegationRecord, pf as InMemoryDelegationStore, pu as QuestionUrgency, qd as FeedbackRefersTo, qu as detachedSessionDelegate, rd as DetachedTurnResumeDriverOptions, rf as DelegationTraceSpan, ru as DownMessageDeliveryAttempt, sd as createDetachedTurnResumeDriver, sf as createDelegationTraceCollector, su as Question, td as DetachedSessionRefParts, tf as DelegationTraceCaps, tu as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, ud as parseDetachedSessionRef, uf as DelegationStore, uu as QuestionOption, vd as DelegationTaskQueue, wd as DelegateCodeConfig, wu as createMcpServer, xd as SubmitOutput, xu as McpServer, yd as DelegationTaskQueueOptions, yu as createCoordinationTools, zd as DelegationHistoryResult, zu as CoderReview } from "../index-D_aH0F4C.js";
3
- import { dt as mergeTraceEnv, ft as readTraceContextFromEnv, lt as TraceContext, pt as traceContextToEnv, ut as createPropagatingTraceEmitter } from "../types-_7w24mMg.js";
4
- import { $ as WorktreeHandle, At as JsonRpcResponse, B as LOCAL_HARNESSES, G as localHarnessExecutable, H as LocalHarnessResult, I as CodexExecutionEvidence, J as CreateWorktreeOptions, K as parseCodexTokenUsage, L as CodexExecutionPolicy, Mt as McpTransport, Q as RemoveWorktreeOptions, R as CodexTokenUsage, U as RunLocalHarnessOptions, V as LocalHarness, W as harnessSupportsReasoningEffort, X as DiffResult, Y as DiffOptions, Z as GitRunner, et as captureWorktreeDiff, jt as McpToolDescriptor, kt as JsonRpcMessage, nt as removeWorktree, q as runLocalHarness, tt as createWorktree, z as DEFAULT_LOCAL_HARNESS } from "../runtime-htqI3fKL.js";
1
+ import { E as SandboxClient, h as LoopSandboxPlacement } from "../types-DeX8ibLc.js";
2
+ import { $d as DelegationTraceCaps, $l as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, $u as DetachedSessionRefParts, Ad as DelegateUiAuditConfig, Au as createDelegateHandler, Bd as DelegationResultPayload, Bu as DetachedSessionDelegateOptions, Cd as DelegateCodeResult, Cu as DELEGATE_DESCRIPTION, Dd as DelegateResearchConfig, Du as DelegateError, Ed as DelegateResearchArgs, Eu as DelegateArgs, Fd as DelegationHistoryArgs, Fu as eventToSnapshot, Gd as FeedbackRefersTo, Gu as detachedSessionDelegate, Hd as DelegationStatusArgs, Hu as SettleDetachedCoderTurnOptions, Id as DelegationHistoryEntry, Iu as CoderDelegate, Jd as UiAuditLensFilter, Jl as ContinuationInstruction, Ju as FleetHandle, Kd as ResearchOutputShape, Kl as AuthorizeDownMessage, Ku as settleDetachedCoderTurn, Ld as DelegationHistoryResult, Lu as CoderReview, Md as DelegateUiAuditRoute, Mu as FeedbackEvent, Nd as DelegationError, Nu as FeedbackStore, Od as DelegateResearchResult, Ou as DelegateHandlerOptions, Pd as DelegationFeedbackSnapshot, Pu as InMemoryFeedbackStore, Qd as DELEGATION_TRACE_MAX_SPANS, Ql as CoordinationToolsOptions, Qu as createSiblingSandboxExecutor, Rd as DelegationProfile, Ru as CoderReviewer, Sd as DelegateCodeConfig, Su as createMcpServer, Td as DelegateFeedbackResult, Tu as DELEGATE_TOOL_NAME, Ud as DelegationStatusResult, Ul as AnalystFindingEvent, Uu as UiAuditorDelegate, Vd as DelegationStatus, Vu as DetachedWinnerSelection, Wd as FeedbackRating, Wl as AnalystRegistry, Wu as coderTaskFromArgs, Xd as CappedDelegationTrace, Xf as CoderOutput, Xl as CoordinationEvent, Xu as SiblingSandboxExecutorOptions, Yd as UiAuditorDelegationOutput, Yu as FleetWorkspaceExecutorOptions, Zd as DELEGATION_TRACE_MAX_BYTES, Zl as CoordinationTools, Zu as createFleetWorkspaceExecutor, _d as DelegationTaskQueueOptions, _u as createCoordinationTools, ad as createDetachedTurnResumeDriver, af as createDelegationTraceCollector, au as Question, bd as hashIdempotencyInput, bu as McpServerOptions, cd as parseDetachedSessionRef, cf as DelegationStore, cu as QuestionOption, dd as DelegationRecord, df as InMemoryDelegationStore, du as QuestionUrgency, ed as DetachedTurn, ef as DelegationTraceCollector, eu as DownMessageAuthorizationInput, fd as DelegationResumeContext, fu as SettledWorker, gd as DelegationTaskQueue, hd as DelegationRunContext, hu as WorkerWatchOptions, id as RunDetachedTurnOptions, if as composeLoopTraceEmitters, iu as MakeWorkerAgent, jd as DelegateUiAuditResult, ju as validateDelegateArgs, kd as DelegateUiAuditArgs, ku as DelegateResult, ld as runDetachedTurn, lf as FileDelegationStore, lu as QuestionPolicy, md as DelegationResumeTick, mu as WorkerSpawnContext, nd as DriveTurnCapableBox, nf as buildDelegationTraceSpans, nu as DownMessageDeliveryOutcome, od as detachedTurnEvents, of as DelegationPersistenceError, ou as QuestionDecision, pd as DelegationResumeDriver, qd as ResearchSource, ql as AuthorizedDownMessage, qu as DelegationExecutor, rd as DriveTurnTick, rf as capDelegationTrace, ru as DownMessageEvent, sd as formatDetachedSessionRef, sf as DelegationStateCorruptError, su as QuestionLevel, td as DetachedTurnResumeDriverOptions, tf as DelegationTraceSpan, tu as DownMessageDeliveryAttempt, ud as DelegationArgs, uf as FileDelegationStoreOptions, uu as QuestionRecord, vd as SubmitInput, wd as DelegateFeedbackArgs, wu as DELEGATE_INPUT_SCHEMA, xd as DelegateCodeArgs, xu as createInProcessTransport, yd as SubmitOutput, yu as McpServer, zd as DelegationProgress, zu as DelegateRunCtx } from "../index-C2caGomG.js";
3
+ import { dt as mergeTraceEnv, ft as readTraceContextFromEnv, lt as TraceContext, pt as traceContextToEnv, ut as createPropagatingTraceEmitter } from "../types-Df9vulGc.js";
4
+ import { $ as RemoveWorktreeOptions, At as JsonRpcMessage, B as DEFAULT_LOCAL_HARNESS, G as harnessSupportsReasoningEffort, H as LocalHarness, J as runLocalHarness, K as localHarnessExecutable, L as CodexExecutionEvidence, Mt as McpToolDescriptor, Nt as McpTransport, Q as GitRunner, R as CodexExecutionPolicy, U as LocalHarnessResult, V as LOCAL_HARNESSES, W as RunLocalHarnessOptions, X as DiffOptions, Y as CreateWorktreeOptions, Z as DiffResult, et as WorktreeHandle, jt as JsonRpcResponse, nt as createWorktree, q as parseCodexTokenUsage, rt as removeWorktree, tt as captureWorktreeDiff, z as CodexTokenUsage } from "../runtime-J6Toky8K.js";
5
5
  import { o as UiLens } from "../substrate-BcnuSHXm.js";
6
6
  import { a as KbGateResult, i as FactJudgeVerdict, n as FactCandidate, o as createKbGate, r as FactJudge, t as CreateKbGateOptions } from "../kb-gate-C8z2juK8.js";
7
- import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "../openai-tools-t5-6h5bj.js";
7
+ import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "../openai-tools-z-whdYNC.js";
8
8
  import { AgentProfileMcpServer } from "@tangle-network/agent-interface";
9
9
  //#region src/mcp/codex-diagnostics.d.ts
10
10
  /** Bounded, credential-redacted process context attached when reproducible Codex output fails
package/dist/mcp/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { i as ConfigError, m as ValidationError } from "../errors-CDZ8XsVj.js";
2
2
  import { d as sleep, i as deleteBoxSafe, m as throwIfAborted, p as throwAbort } from "../util-C1bv6yog.js";
3
3
  import { t as assertExecutableAgentProfile } from "../model-policy-DgRJIJse.js";
4
- import { Ct as traceContextToEnv, Gt as createWorktree, Jt as LOCAL_HARNESSES, Kt as removeWorktree, Qt as CodexExecutionDiagnosticError, St as readTraceContextFromEnv, Ut as runWorktreeHarness, Wt as captureWorktreeDiff, Xt as localHarnessExecutable, Yt as harnessSupportsReasoningEffort, Zt as parseCodexTokenUsage, bt as createPropagatingTraceEmitter, ft as runAgentRounds, lt as createSandboxForSpec, qt as DEFAULT_LOCAL_HARNESS, xt as mergeTraceEnv } from "../supervisor-B_0ISTFG.js";
5
- import { T as runCoderChecks, dt as selectValidWinner } from "../runtime-DQs5xHdt.js";
6
- import { $ as DELEGATION_TRACE_MAX_BYTES, A as DELEGATION_HISTORY_INPUT_SCHEMA, B as DELEGATE_FEEDBACK_INPUT_SCHEMA, C as createMcpServer, D as createDelegationStatusHandler, Dt as createCoordinationTools, E as DELEGATION_STATUS_TOOL_NAME, F as DELEGATE_UI_AUDIT_INPUT_SCHEMA, G as DELEGATE_INPUT_SCHEMA, H as createDelegateFeedbackHandler, I as DELEGATE_UI_AUDIT_TOOL_NAME, J as validateDelegateArgs, K as DELEGATE_TOOL_NAME, L as createDelegateUiAuditHandler, M as createDelegationHistoryHandler, N as validateDelegationHistoryArgs, O as validateDelegationStatusArgs, P as DELEGATE_UI_AUDIT_DESCRIPTION, Q as hashIdempotencyInput, R as validateDelegateUiAuditArgs, S as createInProcessTransport, T as DELEGATION_STATUS_INPUT_SCHEMA, Tt as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, U as validateDelegateFeedbackArgs, V as DELEGATE_FEEDBACK_TOOL_NAME, W as DELEGATE_DESCRIPTION, Z as DelegationTaskQueue, at as DelegationPersistenceError, ct as InMemoryDelegationStore, et as DELEGATION_TRACE_MAX_SPANS, it as createDelegationTraceCollector, j as DELEGATION_HISTORY_TOOL_NAME, k as DELEGATION_HISTORY_DESCRIPTION, lt as InMemoryFeedbackStore, nt as capDelegationTrace, ot as DelegationStateCorruptError, q as createDelegateHandler, rt as composeLoopTraceEmitters, st as FileDelegationStore, tt as buildDelegationTraceSpans, ut as eventToSnapshot, w as DELEGATION_STATUS_DESCRIPTION, z as DELEGATE_FEEDBACK_DESCRIPTION } from "../supervise-BEs5MB91.js";
4
+ import { Ct as traceContextToEnv, Gt as createWorktree, Jt as LOCAL_HARNESSES, Kt as removeWorktree, Qt as CodexExecutionDiagnosticError, St as readTraceContextFromEnv, Ut as runWorktreeHarness, Wt as captureWorktreeDiff, Xt as localHarnessExecutable, Yt as harnessSupportsReasoningEffort, Zt as parseCodexTokenUsage, bt as createPropagatingTraceEmitter, ft as runAgentRounds, lt as createSandboxForSpec, qt as DEFAULT_LOCAL_HARNESS, xt as mergeTraceEnv } from "../supervisor-s8SfZYbW.js";
5
+ import { T as runCoderChecks, dt as selectValidWinner } from "../runtime-BnqjbOGX.js";
6
+ import { $ as DELEGATION_TRACE_MAX_BYTES, A as DELEGATION_HISTORY_INPUT_SCHEMA, B as DELEGATE_FEEDBACK_INPUT_SCHEMA, C as createMcpServer, D as createDelegationStatusHandler, Dt as createCoordinationTools, E as DELEGATION_STATUS_TOOL_NAME, F as DELEGATE_UI_AUDIT_INPUT_SCHEMA, G as DELEGATE_INPUT_SCHEMA, H as createDelegateFeedbackHandler, I as DELEGATE_UI_AUDIT_TOOL_NAME, J as validateDelegateArgs, K as DELEGATE_TOOL_NAME, L as createDelegateUiAuditHandler, M as createDelegationHistoryHandler, N as validateDelegationHistoryArgs, O as validateDelegationStatusArgs, P as DELEGATE_UI_AUDIT_DESCRIPTION, Q as hashIdempotencyInput, R as validateDelegateUiAuditArgs, S as createInProcessTransport, T as DELEGATION_STATUS_INPUT_SCHEMA, Tt as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, U as validateDelegateFeedbackArgs, V as DELEGATE_FEEDBACK_TOOL_NAME, W as DELEGATE_DESCRIPTION, Z as DelegationTaskQueue, at as DelegationPersistenceError, ct as InMemoryDelegationStore, et as DELEGATION_TRACE_MAX_SPANS, it as createDelegationTraceCollector, j as DELEGATION_HISTORY_TOOL_NAME, k as DELEGATION_HISTORY_DESCRIPTION, lt as InMemoryFeedbackStore, nt as capDelegationTrace, ot as DelegationStateCorruptError, q as createDelegateHandler, rt as composeLoopTraceEmitters, st as FileDelegationStore, tt as buildDelegationTraceSpans, ut as eventToSnapshot, w as DELEGATION_STATUS_DESCRIPTION, z as DELEGATE_FEEDBACK_DESCRIPTION } from "../supervise-hCgG6ROJ.js";
7
7
  import { t as createStdioToolServer } from "../tool-server-DEmLr9YY.js";
8
8
  import { t as createKbGate } from "../kb-gate-DpaSwXVx.js";
9
- import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "../openai-tools-CSm460sC.js";
9
+ import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "../openai-tools-BiAWKjh6.js";
10
10
  import { t as coderTaskToPrompt } from "../coder-yhVWbdWc.js";
11
11
  import { a as createMemoryToolServer, c as resolveMemoryFromEnv, i as MEMORY_NAME_ENV, n as MEMORY_ITEMS_ENV, o as parseMemoryItems, r as MEMORY_LOG_ENV, s as readMemoryItemsFile, t as MEMORY_FILE_ENV } from "../memory-server-DsKOhzGf.js";
12
12
  import { agentProfileSchema } from "@tangle-network/agent-interface";
@@ -1,4 +1,4 @@
1
- import { A as DELEGATION_HISTORY_INPUT_SCHEMA, B as DELEGATE_FEEDBACK_INPUT_SCHEMA, E as DELEGATION_STATUS_TOOL_NAME, T as DELEGATION_STATUS_INPUT_SCHEMA, V as DELEGATE_FEEDBACK_TOOL_NAME, j as DELEGATION_HISTORY_TOOL_NAME, k as DELEGATION_HISTORY_DESCRIPTION, w as DELEGATION_STATUS_DESCRIPTION, z as DELEGATE_FEEDBACK_DESCRIPTION } from "./supervise-BEs5MB91.js";
1
+ import { A as DELEGATION_HISTORY_INPUT_SCHEMA, B as DELEGATE_FEEDBACK_INPUT_SCHEMA, E as DELEGATION_STATUS_TOOL_NAME, T as DELEGATION_STATUS_INPUT_SCHEMA, V as DELEGATE_FEEDBACK_TOOL_NAME, j as DELEGATION_HISTORY_TOOL_NAME, k as DELEGATION_HISTORY_DESCRIPTION, w as DELEGATION_STATUS_DESCRIPTION, z as DELEGATE_FEEDBACK_DESCRIPTION } from "./supervise-hCgG6ROJ.js";
2
2
  //#region src/mcp/openai-tools.ts
3
3
  function buildTool(name, description, parameters) {
4
4
  return {
@@ -41,4 +41,4 @@ function mcpToolsForRuntimeMcpSubset(names) {
41
41
  //#endregion
42
42
  export { mcpToolsForRuntimeMcpSubset as n, mcpToolsForRuntimeMcp as t };
43
43
 
44
- //# sourceMappingURL=openai-tools-CSm460sC.js.map
44
+ //# sourceMappingURL=openai-tools-BiAWKjh6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"openai-tools-CSm460sC.js","names":[],"sources":["../src/mcp/openai-tools.ts"],"sourcesContent":["/**\n *\n * OpenAI Chat Completions `tools[]` projection of the queue-bound agent-runtime\n * MCP delegation tools.\n *\n * Use when a caller-owned OpenAI-compatible transport needs the model to call\n * `delegate_feedback`, `delegation_status`, and `delegation_history`. Execution\n * is the caller's responsibility (typically the parent sandbox runtime's MCP\n * mount); Runtime's profile-bound model path materializes profile tools through\n * its executor instead.\n *\n * Sandbox-SDK callers do NOT need this helper: the sandbox runtime mounts\n * MCP servers natively and the in-sandbox harness discovers tools via the\n * runtime, not via an OpenAI tools array.\n *\n * Tool name + description + JSON-schema are pulled from the canonical\n * `DELEGATE_*` constants exported by `./tools/*` so the projection cannot\n * drift from the server's own validators.\n *\n * @experimental\n */\n\nimport type { OpenAIChatTool } from '../types'\nimport {\n DELEGATE_FEEDBACK_DESCRIPTION,\n DELEGATE_FEEDBACK_INPUT_SCHEMA,\n DELEGATE_FEEDBACK_TOOL_NAME,\n} from './tools/delegate-feedback'\nimport {\n DELEGATION_HISTORY_DESCRIPTION,\n DELEGATION_HISTORY_INPUT_SCHEMA,\n DELEGATION_HISTORY_TOOL_NAME,\n} from './tools/delegation-history'\nimport {\n DELEGATION_STATUS_DESCRIPTION,\n DELEGATION_STATUS_INPUT_SCHEMA,\n DELEGATION_STATUS_TOOL_NAME,\n} from './tools/delegation-status'\n\nfunction buildTool(\n name: string,\n description: string,\n parameters: Readonly<Record<string, unknown>>,\n): OpenAIChatTool {\n // `parameters` arrives as a deeply-readonly `as const` literal. The\n // OpenAI-compatible transports JSON-serialize the body, so a shallow copy\n // into a plain object is sufficient and shields callers that mutate\n // the returned descriptor from corrupting the source constant.\n return {\n type: 'function',\n function: { name, description, parameters: { ...parameters } },\n }\n}\n\n/**\n *\n * Returns the queue-bound delegation tools projected into OpenAI Chat\n * Completions `tools[]` shape. The order is stable: `delegate_feedback`,\n * `delegation_status`, `delegation_history`.\n *\n * @experimental\n */\nexport function mcpToolsForRuntimeMcp(): OpenAIChatTool[] {\n return [\n buildTool(\n DELEGATE_FEEDBACK_TOOL_NAME,\n DELEGATE_FEEDBACK_DESCRIPTION,\n DELEGATE_FEEDBACK_INPUT_SCHEMA as Readonly<Record<string, unknown>>,\n ),\n buildTool(\n DELEGATION_STATUS_TOOL_NAME,\n DELEGATION_STATUS_DESCRIPTION,\n DELEGATION_STATUS_INPUT_SCHEMA as Readonly<Record<string, unknown>>,\n ),\n buildTool(\n DELEGATION_HISTORY_TOOL_NAME,\n DELEGATION_HISTORY_DESCRIPTION,\n DELEGATION_HISTORY_INPUT_SCHEMA as Readonly<Record<string, unknown>>,\n ),\n ]\n}\n\n/**\n *\n * Subset filter — return only the projected tools whose `function.name`\n * appears in `names`. Useful for curated mounts (e.g. only the queue-bound\n * delegation tools, omitting `delegate_feedback`). Unknown names are\n * silently ignored; pass an empty array to get an empty result.\n *\n * @experimental\n */\nexport function mcpToolsForRuntimeMcpSubset(names: ReadonlyArray<string>): OpenAIChatTool[] {\n const allowed = new Set(names)\n return mcpToolsForRuntimeMcp().filter((tool) => allowed.has(tool.function.name))\n}\n"],"mappings":";;AAuCA,SAAS,UACP,MACA,aACA,YACgB;CAKhB,OAAO;EACL,MAAM;EACN,UAAU;GAAE;GAAM;GAAa,YAAY,EAAE,GAAG,WAAW;EAAE;CAC/D;AACF;;;;;;;;;AAUA,SAAgB,wBAA0C;CACxD,OAAO;EACL,UACE,6BACA,+BACA,8BACF;EACA,UACE,6BACA,+BACA,8BACF;EACA,UACE,8BACA,gCACA,+BACF;CACF;AACF;;;;;;;;;;AAWA,SAAgB,4BAA4B,OAAgD;CAC1F,MAAM,UAAU,IAAI,IAAI,KAAK;CAC7B,OAAO,sBAAsB,CAAC,CAAC,QAAQ,SAAS,QAAQ,IAAI,KAAK,SAAS,IAAI,CAAC;AACjF"}
1
+ {"version":3,"file":"openai-tools-BiAWKjh6.js","names":[],"sources":["../src/mcp/openai-tools.ts"],"sourcesContent":["/**\n *\n * OpenAI Chat Completions `tools[]` projection of the queue-bound agent-runtime\n * MCP delegation tools.\n *\n * Use when a caller-owned OpenAI-compatible transport needs the model to call\n * `delegate_feedback`, `delegation_status`, and `delegation_history`. Execution\n * is the caller's responsibility (typically the parent sandbox runtime's MCP\n * mount); Runtime's profile-bound model path materializes profile tools through\n * its executor instead.\n *\n * Sandbox-SDK callers do NOT need this helper: the sandbox runtime mounts\n * MCP servers natively and the in-sandbox harness discovers tools via the\n * runtime, not via an OpenAI tools array.\n *\n * Tool name + description + JSON-schema are pulled from the canonical\n * `DELEGATE_*` constants exported by `./tools/*` so the projection cannot\n * drift from the server's own validators.\n *\n * @experimental\n */\n\nimport type { OpenAIChatTool } from '../types'\nimport {\n DELEGATE_FEEDBACK_DESCRIPTION,\n DELEGATE_FEEDBACK_INPUT_SCHEMA,\n DELEGATE_FEEDBACK_TOOL_NAME,\n} from './tools/delegate-feedback'\nimport {\n DELEGATION_HISTORY_DESCRIPTION,\n DELEGATION_HISTORY_INPUT_SCHEMA,\n DELEGATION_HISTORY_TOOL_NAME,\n} from './tools/delegation-history'\nimport {\n DELEGATION_STATUS_DESCRIPTION,\n DELEGATION_STATUS_INPUT_SCHEMA,\n DELEGATION_STATUS_TOOL_NAME,\n} from './tools/delegation-status'\n\nfunction buildTool(\n name: string,\n description: string,\n parameters: Readonly<Record<string, unknown>>,\n): OpenAIChatTool {\n // `parameters` arrives as a deeply-readonly `as const` literal. The\n // OpenAI-compatible transports JSON-serialize the body, so a shallow copy\n // into a plain object is sufficient and shields callers that mutate\n // the returned descriptor from corrupting the source constant.\n return {\n type: 'function',\n function: { name, description, parameters: { ...parameters } },\n }\n}\n\n/**\n *\n * Returns the queue-bound delegation tools projected into OpenAI Chat\n * Completions `tools[]` shape. The order is stable: `delegate_feedback`,\n * `delegation_status`, `delegation_history`.\n *\n * @experimental\n */\nexport function mcpToolsForRuntimeMcp(): OpenAIChatTool[] {\n return [\n buildTool(\n DELEGATE_FEEDBACK_TOOL_NAME,\n DELEGATE_FEEDBACK_DESCRIPTION,\n DELEGATE_FEEDBACK_INPUT_SCHEMA as Readonly<Record<string, unknown>>,\n ),\n buildTool(\n DELEGATION_STATUS_TOOL_NAME,\n DELEGATION_STATUS_DESCRIPTION,\n DELEGATION_STATUS_INPUT_SCHEMA as Readonly<Record<string, unknown>>,\n ),\n buildTool(\n DELEGATION_HISTORY_TOOL_NAME,\n DELEGATION_HISTORY_DESCRIPTION,\n DELEGATION_HISTORY_INPUT_SCHEMA as Readonly<Record<string, unknown>>,\n ),\n ]\n}\n\n/**\n *\n * Subset filter — return only the projected tools whose `function.name`\n * appears in `names`. Useful for curated mounts (e.g. only the queue-bound\n * delegation tools, omitting `delegate_feedback`). Unknown names are\n * silently ignored; pass an empty array to get an empty result.\n *\n * @experimental\n */\nexport function mcpToolsForRuntimeMcpSubset(names: ReadonlyArray<string>): OpenAIChatTool[] {\n const allowed = new Set(names)\n return mcpToolsForRuntimeMcp().filter((tool) => allowed.has(tool.function.name))\n}\n"],"mappings":";;AAuCA,SAAS,UACP,MACA,aACA,YACgB;CAKhB,OAAO;EACL,MAAM;EACN,UAAU;GAAE;GAAM;GAAa,YAAY,EAAE,GAAG,WAAW;EAAE;CAC/D;AACF;;;;;;;;;AAUA,SAAgB,wBAA0C;CACxD,OAAO;EACL,UACE,6BACA,+BACA,8BACF;EACA,UACE,6BACA,+BACA,8BACF;EACA,UACE,8BACA,gCACA,+BACF;CACF;AACF;;;;;;;;;;AAWA,SAAgB,4BAA4B,OAAgD;CAC1F,MAAM,UAAU,IAAI,IAAI,KAAK;CAC7B,OAAO,sBAAsB,CAAC,CAAC,QAAQ,SAAS,QAAQ,IAAI,KAAK,SAAS,IAAI,CAAC;AACjF"}
@@ -1,4 +1,4 @@
1
- import { Q as OpenAIChatTool } from "./types-DZrBoBpN.js";
1
+ import { Q as OpenAIChatTool } from "./types-DeX8ibLc.js";
2
2
  //#region src/mcp/openai-tools.d.ts
3
3
  /**
4
4
  *
@@ -21,4 +21,4 @@ declare function mcpToolsForRuntimeMcp(): OpenAIChatTool[];
21
21
  declare function mcpToolsForRuntimeMcpSubset(names: ReadonlyArray<string>): OpenAIChatTool[];
22
22
  //#endregion
23
23
  export { mcpToolsForRuntimeMcpSubset as n, mcpToolsForRuntimeMcp as t };
24
- //# sourceMappingURL=openai-tools-t5-6h5bj.d.ts.map
24
+ //# sourceMappingURL=openai-tools-z-whdYNC.d.ts.map
@@ -1,4 +1,4 @@
1
- import { o as ExecutorConfig } from "../runtime-htqI3fKL.js";
1
+ import { o as ExecutorConfig } from "../runtime-J6Toky8K.js";
2
2
  import { RunRecord } from "@tangle-network/agent-eval";
3
3
  //#region src/primeintellect/types.d.ts
4
4
  type PrimeIntellectSplit = 'train' | 'eval';
@@ -1,4 +1,4 @@
1
- import { k as Validator, r as Driver, t as AgentRunSpec, w as OutputAdapter } from "./types-DZrBoBpN.js";
1
+ import { k as Validator, r as Driver, t as AgentRunSpec, w as OutputAdapter } from "./types-DeX8ibLc.js";
2
2
  import { a as UiFindingSeverity, c as coderTaskToPrompt, i as UiFindingScreenshot, n as UI_LENSES, o as UiLens, r as UiFinding, s as CoderTask, t as UI_FINDING_SEVERITIES } from "./substrate-BcnuSHXm.js";
3
3
  import { AgentProfile } from "@tangle-network/agent-interface";
4
4
  import { SandboxEvent } from "@tangle-network/sandbox";
@@ -1,5 +1,5 @@
1
- import { o as ExecutorConfig } from "./runtime-htqI3fKL.js";
2
- import { i as CollectedAgentTurn, r as AgentTurnUsage } from "./stream-agent-turn-Dfy12OjG.js";
1
+ import { o as ExecutorConfig } from "./runtime-J6Toky8K.js";
2
+ import { i as CollectedAgentTurn, r as AgentTurnUsage } from "./stream-agent-turn-C1Vs_3B9.js";
3
3
  import { AgentProfile, AgentProfileDiff, HarnessType, ReasoningEffort, Sha256Digest } from "@tangle-network/agent-interface";
4
4
  import { CostLedgerHandle, MaximumCharge, ProposalFinding } from "@tangle-network/agent-eval";
5
5
  import { CampaignScenarioIdentity, CompareOptimizationMethodsOptions, OptimizationMethod, OptimizationMethodComparison, WorktreeAdapter } from "@tangle-network/agent-eval/campaign";
@@ -545,4 +545,4 @@ declare function defaultRedactor(value: unknown): unknown;
545
545
  declare function resolveRedactor(redact: Redactor | false | undefined): Redactor;
546
546
  //#endregion
547
547
  export { agenticGenerator as $, ImprovementCandidate as A, ImprovementProfilePopulationLineage as B, ImproveProfileComponents as C, ImproveScenarioPartitions as D, ImproveRuntimeCodeGeneratorOptions as E, ImprovementProfileCandidatePopulationAvailable as F, ReadonlyAgentProfile as G, ImprovementProfilePopulationObservationSource as H, ImprovementProfileCandidatePopulationUnavailable as I, AgenticGeneratorShotDisposition as J, AgenticGeneratorExecutorForWorktree as K, ImprovementProfilePopulationArtifactSource as L, ImprovementMaterializedProfilePopulationCandidate as M, ImprovementProfileCandidate as N, ImproveSkillsOptions as O, ImprovementProfileCandidatePopulation as P, VerifyResult as Q, ImprovementProfilePopulationCandidate as R, ImproveProfileAgent as S, ImproveResult as T, ImprovementRefusedProfilePopulationCandidate as U, ImprovementProfilePopulationLineageNode as V, DeepReadonly as W, AgenticGeneratorShotReceipt as X, AgenticGeneratorShotExecution as Y, Verifier as Z, ImproveMethodOptions as _, ImproveCandidateValidationInput as a, ImproveOptimizationRunOptions as b, ImproveCodeOptions as c, ImproveCost as d, commandVerifier as et, ImproveCustomCodeGeneratorOptions as f, ImproveMethodLineage as g, ImproveMethodFactory as h, improve as i, ImprovementCodeCandidate as j, ImproveSurface as k, ImproveCodeResult as l, ImproveMethodContext as m, defaultRedactor as n, CandidateGenerator as nt, ImproveCandidateValidator as o, ImproveLineage as p, AgenticGeneratorOptions as q, resolveRedactor as r, ImproveCodeBaseOptions as s, Redactor as t, defaultBuildPrompt as tt, ImproveCodeRunOptions as u, ImproveMethodResult as v, ImproveProfileSurface as w, ImproveOptions as x, ImproveMethodSource as y, ImprovementProfilePopulationCandidateSource as z };
548
- //# sourceMappingURL=redact-B0gDSTZO.d.ts.map
548
+ //# sourceMappingURL=redact-DexTuAiX.d.ts.map
@@ -1,20 +1,20 @@
1
1
  import { C as sameControlCoordinates, S as isTerminalSessionStatus, _ as exactSession, a as assertEventBinding, b as freezeControlRef, c as assertSequence, d as awaitAbortable, f as cancellationRequest, g as exactControlRef, h as exactContinuedControlRef, i as assertCanonicalEventBinding, l as assertStableText, m as delay, n as abortError, o as assertInteractionBinding, p as copyControlRef, r as assertBoundaryBinding, s as assertResultBinding, t as RetainedRunProviderContractError, u as assertWaitDuration, v as exactSessionCancel, w as freshTurnInput, x as hasDurableCancel, y as exactSessionResult } from "./retained-run-binding-Dp2e8xne.js";
2
2
  import { c as RetainedInteractiveAdmissionError, d as RetainedRunDispatchBindingError, l as RetainedInteractiveBindingError, m as ValidationError, n as AnalystError, s as PlannerError, u as RetainedRunAdmissionError } from "./errors-CDZ8XsVj.js";
3
- import "./stream-agent-turn-BMHUIuQS.js";
3
+ import "./stream-agent-turn-CXRugSGO.js";
4
4
  import { t as detachedSnapshot } from "./snapshot-cK9K420n.js";
5
5
  import { S as contentAddress, i as InMemorySpawnJournal, r as InMemoryResultBlobStore, y as isTraceAnalysisStore } from "./spawn-journal-D2HKUImC.js";
6
6
  import { _ as zeroTokenUsage, a as hasCompleteCacheBreakdown, d as sleep, f as stringifySafe, h as usdEstimatedOf, l as randomSuffix, n as chargedTokens, o as isAbortError, r as cloneTokenUsage, t as addTokenUsage } from "./util-C1bv6yog.js";
7
7
  import { i as redactProtectedValue, r as redactProtectedReason } from "./protected-redaction--F3v1oo8.js";
8
- import { c as notifySandboxEventObserver, f as extractTransportEventIdentity, p as parseCanonicalTransportEvent } from "./sandbox-events-BK-g19wx.js";
8
+ import { d as parseCanonicalTransportEvent, s as notifySandboxEventObserver, u as extractTransportEventIdentity } from "./sandbox-events-COwCWUVB.js";
9
+ import { E as executableAgentSpecSnapshot, T as executableAgentProfileSnapshot } from "./materialization-P86EciBw.js";
9
10
  import { c as profileProviderModel, i as concreteModelId, s as profileModelExecutionSettings, t as assertExecutableAgentProfile } from "./model-policy-DgRJIJse.js";
10
- import { E as executableAgentSpecSnapshot, T as executableAgentProfileSnapshot } from "./materialization-CrdcfWXp.js";
11
- import { E as rollingDispatch, I as createExecutor, L as createExecutorRegistry, _t as runBrainLoop, ft as runAgentRounds, g as settledToIteration, gt as routerBrain, l as withDriverExecutor, mt as probeSandboxCapabilities, n as createSupervisor, pt as createSandboxLineage, q as createPushTraceSource, ut as defaultSelectWinner, vt as canonicalObservedModel, z as createWorktreeCliExecutor } from "./supervisor-B_0ISTFG.js";
12
- import "./environment-provider-DCEACNt9.js";
11
+ import { E as rollingDispatch, I as createExecutor, L as createExecutorRegistry, _t as runBrainLoop, ft as runAgentRounds, g as settledToIteration, gt as routerBrain, l as withDriverExecutor, mt as probeSandboxCapabilities, n as createSupervisor, pt as createSandboxLineage, q as createPushTraceSource, ut as defaultSelectWinner, vt as canonicalObservedModel, z as createWorktreeCliExecutor } from "./supervisor-s8SfZYbW.js";
12
+ import "./environment-provider-DCBJ13VP.js";
13
13
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
14
- import { C as observe, O as strategyAuthorMethod, T as profileChatClient, b as sample, v as refine, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-CzZKDkmA.js";
15
- import { It as gateOnDeliverable, Lt as mapExecutorResult, n as supervise } from "./supervise-BEs5MB91.js";
16
- import "./authoring-Bm1WlGPv.js";
17
- import "./graph-DhrLuLOS.js";
14
+ import { C as observe, O as strategyAuthorMethod, T as profileChatClient, b as sample, v as refine, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-CJgj9YXH.js";
15
+ import { It as gateOnDeliverable, Lt as mapExecutorResult, n as supervise } from "./supervise-hCgG6ROJ.js";
16
+ import "./authoring-DuyShLdw.js";
17
+ import "./graph-De_XEsfH.js";
18
18
  import { AgentEnvironmentCapabilitiesSchema, AgentExactRunControlRefSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentNativeContextContinuationResultSchema, AgentTurnResultSchema, InteractionAcknowledgementSchema, InteractionResponseCommandSchema, NativeContextBoundaryProofSchema, NativeContextContinuationRequestSchema, RuntimeEventEnvelopeSchema, TerminalReplayWindowSchema, TerminalSessionRefSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionControlClaimRequestDigest, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentNativeContextContinuationResultMatchesRequest, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, exactAgentInteractiveSessionStart, nativeContextContinuationTurnDigest, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
19
19
  import { CODING_HARNESSES, InMemoryTraceStore, OUTPUT_VALUE, benjaminiHochberg, buildTrajectory, computeFindingId as computeFindingId$1, confidenceInterval, expandProfileAxes, makeFinding as makeFinding$1, pairedBootstrap, paretoFrontier, wilcoxonSignedRank, wilson } from "@tangle-network/agent-eval";
20
20
  import { heldoutSignificance, runProfileMatrix } from "@tangle-network/agent-eval/campaign";
@@ -24,8 +24,9 @@ import { mkdir, readFile, realpath, writeFile } from "node:fs/promises";
24
24
  import { appendFileSync, chmodSync, constants, copyFileSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readlinkSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
25
25
  import { execFileSync, spawn, spawnSync } from "node:child_process";
26
26
  import { tmpdir } from "node:os";
27
- import { createInterface } from "node:readline";
27
+ import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
28
28
  import { collectAgentResponseText } from "@tangle-network/sandbox";
29
+ import { createInterface } from "node:readline";
29
30
  import { gzipSync } from "node:zlib";
30
31
  import { stuckLoopView, toolWasteView } from "@tangle-network/agent-eval/pipelines";
31
32
  //#region src/runtime/key-provider.ts
@@ -4884,9 +4885,11 @@ async function openSandboxRun(client, options, deliverable) {
4884
4885
  });
4885
4886
  async function settle(box, events, turnIndex, turnKind) {
4886
4887
  const collected = [];
4888
+ const outcomeTracker = createAgentRunOutcomeTracker();
4887
4889
  try {
4888
4890
  for await (const ev of events) {
4889
4891
  collected.push(ev);
4892
+ outcomeTracker.observe(ev);
4890
4893
  notifySandboxEventObserver(ev, options.onSandboxEvent, {
4891
4894
  turnIndex,
4892
4895
  turnKind,
@@ -4897,9 +4900,11 @@ async function openSandboxRun(client, options, deliverable) {
4897
4900
  if (isAbortError(err)) throw new SandboxRunAbortError(collected);
4898
4901
  throw err;
4899
4902
  }
4903
+ const outcome = outcomeTracker.finish();
4900
4904
  if (deliverable.kind === "events") return {
4901
4905
  out: deliverable.fromEvents(collected),
4902
- events: collected
4906
+ events: collected,
4907
+ outcome
4903
4908
  };
4904
4909
  if (options.signal.aborted) throw new SandboxRunAbortError(collected);
4905
4910
  const attempted = await readBoxPathWithRetry(box.fs.read.bind(box.fs), deliverable.path, {
@@ -4915,6 +4920,7 @@ async function openSandboxRun(client, options, deliverable) {
4915
4920
  return {
4916
4921
  out: deliverable.fromArtifact(raw, collected),
4917
4922
  events: collected,
4923
+ outcome,
4918
4924
  ...readError !== void 0 ? { readError } : {}
4919
4925
  };
4920
4926
  }
@@ -7091,4 +7097,4 @@ function tail(s) {
7091
7097
  //#endregion
7092
7098
  export { runPersonified as $, pickChampion as A, stopSentinel as At, runBenchmark as B, connectStdioMcp as Bt, analyzeTrace as C, inlineSandboxClient as Ct, chatWorkerSeam as D, completionAuthorizes as Dt, chatTransportExecutor as E, superviseDispatch as Et, strategyAuthorContract as F, renderLeaderboardSvg as Ft, reconnectRetainedRun as G, mcpSecretEnvMetadataKey as Gt, reconnectRetainedInteractiveRun as H, createMcpEnvironment as Ht, strategyAuthorSystemPrompt as I, renderPairwiseMarkdown as It, startRetainedRunInEnvironment as J, secretEnvOfMcpServer as Jt, recoverRetainedRun as K, resolveMcpServerLaunch as Kt, SandboxRunAbortError as L, auditIntent as Lt, selectChampion as M, pairwiseSignificance as Mt, assertStrategyContract as N, renderLeaderboardHtml as Nt, createChatSessionStore as O, deterministicCompletion as Ot, authorStrategy as P, renderLeaderboardMarkdown as Pt, definePersona as Q, openSandboxRun as R, defaultAuditorInstruction as Rt, withUntrackedArtifacts as S, localSandboxClient as St, runCoderChecks as T, loopDispatch as Tt, recoverRetainedInteractiveRun as U, sanitizeMcpToolSchema as Ut, claimRetainedInteractiveControl as V, materializeLocalMcp as Vt, startRetainedInteractiveRun as W, envKeyProvider as Wt, equalKOnCost as X, promotionGate as Y, trajectoryReport as Z, VERIFY_TAIL_CHARS as _, registryScopeAnalyst as _t, localShell as a, renderCorpusToInstructions as at, settledWorkerOut as b, defineLeaderboard as bt, createVerifierEnvironment as c, loopUntil as ct, harvestSurfaceDiffs as d, selectValidWinner as dt, builtinShapes as et, failuresAnalyst as f, verify as ft, NOTE_MAX_CHARS as g, createScopeAnalyst as gt, EVIDENCE_MAX_CHARS as h, buildSteerContext as ht, jjWorkspace as i, InMemoryCorpus as it, runStrategyEvolution as j, leaderboard as jt, discriminatingMeans as k, sentinelCompletion as kt, boxSurfaceReader as l, panel as lt, worktreeFanout as m, assertTraceDerivedFindings as mt, makeFinding$1 as n, registerShape as nt, runInWorkspace as o, fanout as ot, superviseSurface as p, widen as pt, startRetainedRun as q, resolveSecretEnv as qt, gitWorkspace as r, FileCorpus as rt, createWaterfallCollector as s, flatWidenGate as st, computeFindingId$1 as t, createShapeRegistry as tt, fsSurfaceReader as u, pipeline as ut, closingWorkerNote as v, inProcessSandboxClient as vt, patchDelivered as w, loopCampaignDispatch as wt, copyUntrackedIntoClone as x, resolveSandboxClient as xt, composeWorkerEvidence as y, harvestCorpus as yt, printBenchmarkReport as z, McpSpawnFault as zt };
7093
7099
 
7094
- //# sourceMappingURL=runtime-DQs5xHdt.js.map
7100
+ //# sourceMappingURL=runtime-BnqjbOGX.js.map