@tangle-network/agent-runtime 0.94.12 → 0.95.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 (80) hide show
  1. package/dist/agent.d.ts +2 -25
  2. package/dist/agent.js +9 -12
  3. package/dist/agent.js.map +1 -1
  4. package/dist/{agentic-generator-DDMM45kZ.d.ts → agentic-generator-hCaQRAes.d.ts} +0 -1
  5. package/dist/analyst-loop.d.ts +1 -1
  6. package/dist/candidate-execution/index.d.ts +43 -16
  7. package/dist/candidate-execution/index.js +18 -8
  8. package/dist/{chunk-VYA2YEKA.js → chunk-2KGAN2HM.js} +83 -14
  9. package/dist/chunk-2KGAN2HM.js.map +1 -0
  10. package/dist/{chunk-FTXM7Q7P.js → chunk-6YBA64Z2.js} +120 -724
  11. package/dist/chunk-6YBA64Z2.js.map +1 -0
  12. package/dist/{chunk-HGRW27YY.js → chunk-AP7CPGMZ.js} +139 -19
  13. package/dist/chunk-AP7CPGMZ.js.map +1 -0
  14. package/dist/{chunk-XP5KDM3R.js → chunk-BPGXIKK7.js} +3 -3
  15. package/dist/{chunk-D3H7F6L2.js → chunk-DHCHL6OG.js} +2 -3
  16. package/dist/chunk-DHCHL6OG.js.map +1 -0
  17. package/dist/{chunk-PCURO3DL.js → chunk-G55QE4IQ.js} +512 -36
  18. package/dist/chunk-G55QE4IQ.js.map +1 -0
  19. package/dist/{chunk-C3UKLQ54.js → chunk-IADLKE7I.js} +14 -4
  20. package/dist/chunk-IADLKE7I.js.map +1 -0
  21. package/dist/{chunk-WIPGQ4GT.js → chunk-IMSNJSXH.js} +1 -1
  22. package/dist/{chunk-WIPGQ4GT.js.map → chunk-IMSNJSXH.js.map} +1 -1
  23. package/dist/{chunk-VSWBYWFK.js → chunk-M6MD6JBS.js} +20 -27
  24. package/dist/chunk-M6MD6JBS.js.map +1 -0
  25. package/dist/chunk-MKGRLDWB.js +684 -0
  26. package/dist/chunk-MKGRLDWB.js.map +1 -0
  27. package/dist/{chunk-AEG3NGJ2.js → chunk-Q2JSAVQ3.js} +34 -2
  28. package/dist/chunk-Q2JSAVQ3.js.map +1 -0
  29. package/dist/{chunk-37V4KQDC.js → chunk-WTZ37EQY.js} +1021 -514
  30. package/dist/chunk-WTZ37EQY.js.map +1 -0
  31. package/dist/{chunk-U33YZ7B2.js → chunk-YLUOTX6U.js} +4 -4
  32. package/dist/{chunk-33OG2NN3.js → chunk-Z5I642SY.js} +2 -2
  33. package/dist/{completion-gate-D1gX1-hg.d.ts → completion-gate-C80jiRfN.d.ts} +1 -1
  34. package/dist/conversation.d.ts +12 -1
  35. package/dist/conversation.js +2 -2
  36. package/dist/{coordination-Dr_axlAf.d.ts → coordination-BFE3Den7.d.ts} +10 -11
  37. package/dist/environment-provider.d.ts +2 -2
  38. package/dist/environment-provider.js +1 -1
  39. package/dist/{improve-BN3HyXIO.d.ts → improve-B-UYaEH5.d.ts} +3 -3
  40. package/dist/index.d.ts +22 -25
  41. package/dist/index.js +45 -50
  42. package/dist/index.js.map +1 -1
  43. package/dist/intelligence.d.ts +177 -119
  44. package/dist/intelligence.js +501 -342
  45. package/dist/intelligence.js.map +1 -1
  46. package/dist/knowledge.d.ts +22 -11
  47. package/dist/knowledge.js +9 -4
  48. package/dist/lifecycle.d.ts +2 -2
  49. package/dist/lifecycle.js +1 -1
  50. package/dist/{loop-runner-bin-BRQSQdHa.d.ts → loop-runner-bin-BIQldFS8.d.ts} +2 -2
  51. package/dist/loop-runner-bin.d.ts +5 -5
  52. package/dist/loop-runner-bin.js +6 -6
  53. package/dist/loops.d.ts +12 -12
  54. package/dist/loops.js +5 -5
  55. package/dist/mcp/bin.js +3 -3
  56. package/dist/mcp/index.d.ts +6 -6
  57. package/dist/mcp/index.js +6 -6
  58. package/dist/{mcp-serve-verifier-DQQDbuyz.d.ts → mcp-serve-verifier-Bs_n0xPc.d.ts} +1 -1
  59. package/dist/primeintellect/index.js +1 -1
  60. package/dist/profile-DbfaMTdk.d.ts +233 -0
  61. package/dist/profiles.d.ts +1 -1
  62. package/dist/{supervise-DmYOug5f.d.ts → supervise-BLPI50-w.d.ts} +3 -3
  63. package/dist/{types-ByAYqlVb.d.ts → types-B3vAW0Oq.d.ts} +1 -1
  64. package/dist/types-CWqfCO8s.d.ts +491 -0
  65. package/dist/{types-1d5QGK3t.d.ts → types-CmnA2iL3.d.ts} +3 -3
  66. package/dist/{worktree-fanout-CPprU-qI.d.ts → worktree-fanout-DCA3G4bO.d.ts} +3 -3
  67. package/package.json +13 -10
  68. package/dist/chunk-37V4KQDC.js.map +0 -1
  69. package/dist/chunk-AEG3NGJ2.js.map +0 -1
  70. package/dist/chunk-C3UKLQ54.js.map +0 -1
  71. package/dist/chunk-D3H7F6L2.js.map +0 -1
  72. package/dist/chunk-FTXM7Q7P.js.map +0 -1
  73. package/dist/chunk-HGRW27YY.js.map +0 -1
  74. package/dist/chunk-PCURO3DL.js.map +0 -1
  75. package/dist/chunk-VSWBYWFK.js.map +0 -1
  76. package/dist/chunk-VYA2YEKA.js.map +0 -1
  77. package/dist/prepare-DIeVgQG3.d.ts +0 -718
  78. /package/dist/{chunk-XP5KDM3R.js.map → chunk-BPGXIKK7.js.map} +0 -0
  79. /package/dist/{chunk-U33YZ7B2.js.map → chunk-YLUOTX6U.js.map} +0 -0
  80. /package/dist/{chunk-33OG2NN3.js.map → chunk-Z5I642SY.js.map} +0 -0
@@ -1,12 +1,13 @@
1
- import { KnowledgeReadinessSpec, BuildEvalKnowledgeBundleOptions, KnowledgeBaseQualityOptions, KnowledgeImprovementResult, KnowledgeImprovementOptions } from '@tangle-network/agent-knowledge';
2
- import { E as ExecutorConfig } from './coordination-Dr_axlAf.js';
3
- import { a as SuperviseOptions, S as SupervisorProfile } from './supervise-DmYOug5f.js';
4
- import { B as Budget, b as SupervisedResult } from './types-1d5QGK3t.js';
5
- import { D as DeliverableSpec } from './completion-gate-D1gX1-hg.js';
6
- import '@tangle-network/agent-interface';
7
- import './substrate-DO2GHNg2.js';
8
- import './types-ByAYqlVb.js';
1
+ import { AgentImprovementProposal, AgentImprovementReview, AgentImprovementActivation, AgentCandidateKnowledge } from '@tangle-network/agent-interface';
2
+ import { RagKnowledgeUpdateResult, KnowledgeReadinessSpec, BuildEvalKnowledgeBundleOptions, KnowledgeBaseQualityOptions, KnowledgeImprovementResult, KnowledgeImprovementOptions } from '@tangle-network/agent-knowledge';
3
+ import { b as AgentCandidateOutputArtifactPort } from './types-CWqfCO8s.js';
4
+ import { E as ExecutorConfig } from './coordination-BFE3Den7.js';
5
+ import { a as SuperviseOptions, S as SupervisorProfile } from './supervise-BLPI50-w.js';
6
+ import { B as Budget, b as SupervisedResult } from './types-CmnA2iL3.js';
7
+ import { D as DeliverableSpec } from './completion-gate-C80jiRfN.js';
9
8
  import '@tangle-network/agent-eval';
9
+ import './substrate-DO2GHNg2.js';
10
+ import './types-B3vAW0Oq.js';
10
11
  import '@tangle-network/sandbox';
11
12
  import './types-BwoZWq-i.js';
12
13
  import './sanitize-BTSsdBXw.js';
@@ -42,7 +43,7 @@ interface SupervisedKnowledgeUpdateResult {
42
43
  applied: boolean;
43
44
  summary: string;
44
45
  supervised: SupervisedResult<unknown>;
45
- metadata: Record<string, unknown>;
46
+ metadata: NonNullable<RagKnowledgeUpdateResult['metadata']>;
46
47
  }
47
48
  interface SupervisedKnowledgeUpdateOptions {
48
49
  root: string;
@@ -84,8 +85,16 @@ interface RunKnowledgeImprovementJobOptions extends Omit<KnowledgeImprovementOpt
84
85
  superviseOptions?: Partial<Omit<SuperviseOptions, 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'>>;
85
86
  allowedModels?: readonly string[];
86
87
  runSupervised?: (profile: SupervisorProfile, task: unknown, opts: SuperviseOptions) => Promise<SupervisedResult<unknown>>;
88
+ candidateArtifacts?: AgentCandidateOutputArtifactPort;
89
+ approval?: ApprovedKnowledgeImprovementCandidate;
87
90
  onMeasurement?: (measurement: KnowledgeImprovementJobMeasurement) => Promise<void> | void;
88
91
  }
92
+ interface ApprovedKnowledgeImprovementCandidate {
93
+ proposal: AgentImprovementProposal;
94
+ review: AgentImprovementReview;
95
+ activation: AgentImprovementActivation;
96
+ authorizeActivation: (activation: AgentImprovementActivation, proposal: AgentImprovementProposal, review: AgentImprovementReview) => boolean | Promise<boolean>;
97
+ }
89
98
  interface KnowledgeImprovementJobMeasurement {
90
99
  startedAt: string;
91
100
  finishedAt: string;
@@ -96,12 +105,14 @@ interface KnowledgeImprovementJobMeasurement {
96
105
  iterations: number;
97
106
  inputTokens: number;
98
107
  outputTokens: number;
108
+ usdKnown: boolean;
99
109
  usd: number;
100
110
  ms: number;
101
111
  };
102
112
  }
103
113
  interface KnowledgeImprovementJobResult {
104
114
  improvement: KnowledgeImprovementResult;
115
+ candidateKnowledge?: AgentCandidateKnowledge;
105
116
  measurement: KnowledgeImprovementJobMeasurement;
106
117
  promoted: boolean;
107
118
  blocked: boolean;
@@ -116,7 +127,7 @@ interface AgentKnowledgeReadinessCheckOptions {
116
127
  }
117
128
  /** Build the default readiness check backed by `@tangle-network/agent-knowledge` validation and scoring. */
118
129
  declare function createAgentKnowledgeReadinessCheck(options: AgentKnowledgeReadinessCheckOptions): KnowledgeReadinessCheck;
119
- /** Run the full KB improvement job: candidate workspace, runtime supervisor update, readiness check, and promotion. */
130
+ /** Produce a frozen KB candidate, and promote it only when an exact signed review is supplied. */
120
131
  declare function runKnowledgeImprovementJob(options: RunKnowledgeImprovementJobOptions): Promise<KnowledgeImprovementJobResult>;
121
132
 
122
- export { type AgentKnowledgeReadinessCheckOptions, type KnowledgeImprovementJobMeasurement, type KnowledgeImprovementJobResult, type KnowledgeReadinessCheck, type KnowledgeReadinessCheckInput, type KnowledgeReadinessCheckResult, RESEARCH_SUPERVISOR_SYSTEM_PROMPT, type RunKnowledgeImprovementJobOptions, type SupervisedKnowledgeUpdateInput, type SupervisedKnowledgeUpdateOptions, type SupervisedKnowledgeUpdateResult, type SupervisedKnowledgeUpdater, createAgentKnowledgeReadinessCheck, createSupervisedKnowledgeUpdater, formatSupervisedKnowledgeTask, knowledgeReadinessDeliverable, runKnowledgeImprovementJob, runSupervisedKnowledgeUpdate };
133
+ export { type AgentKnowledgeReadinessCheckOptions, type ApprovedKnowledgeImprovementCandidate, type KnowledgeImprovementJobMeasurement, type KnowledgeImprovementJobResult, type KnowledgeReadinessCheck, type KnowledgeReadinessCheckInput, type KnowledgeReadinessCheckResult, RESEARCH_SUPERVISOR_SYSTEM_PROMPT, type RunKnowledgeImprovementJobOptions, type SupervisedKnowledgeUpdateInput, type SupervisedKnowledgeUpdateOptions, type SupervisedKnowledgeUpdateResult, type SupervisedKnowledgeUpdater, createAgentKnowledgeReadinessCheck, createSupervisedKnowledgeUpdater, formatSupervisedKnowledgeTask, knowledgeReadinessDeliverable, runKnowledgeImprovementJob, runSupervisedKnowledgeUpdate };
package/dist/knowledge.js CHANGED
@@ -6,15 +6,20 @@ import {
6
6
  knowledgeReadinessDeliverable,
7
7
  runKnowledgeImprovementJob,
8
8
  runSupervisedKnowledgeUpdate
9
- } from "./chunk-HGRW27YY.js";
9
+ } from "./chunk-AP7CPGMZ.js";
10
10
  import "./chunk-5QOB7H74.js";
11
- import "./chunk-C3UKLQ54.js";
11
+ import "./chunk-MKGRLDWB.js";
12
+ import "./chunk-G55QE4IQ.js";
13
+ import "./chunk-WTZ37EQY.js";
14
+ import "./chunk-IADLKE7I.js";
12
15
  import "./chunk-DPEUKJRO.js";
13
16
  import "./chunk-ISTDY47H.js";
14
- import "./chunk-WIPGQ4GT.js";
15
- import "./chunk-VSWBYWFK.js";
17
+ import "./chunk-IMSNJSXH.js";
18
+ import "./chunk-M6MD6JBS.js";
16
19
  import "./chunk-3MDZX7YU.js";
20
+ import "./chunk-QDSOD7RC.js";
17
21
  import "./chunk-M22PL4GH.js";
22
+ import "./chunk-DHCHL6OG.js";
18
23
  import "./chunk-EP6RVHMX.js";
19
24
  import "./chunk-YEJR7IXO.js";
20
25
  import "./chunk-DGUM43GV.js";
@@ -2,9 +2,9 @@ import { AgentProfile } from '@tangle-network/agent-interface';
2
2
  import { a as ProfileArtifact, A as ArtifactKind, b as ArtifactStatus, c as ArtifactInput, E as EvalRunner, d as EvalResult, G as GenerateContext, C as CandidateGenerator, e as PromotionVerdict, P as PromotionGate } from './generator-YkAQrOoD.js';
3
3
  export { f as ArtifactPayloads, H as HeldOutPromotionGateOptions, M as MarginalLift, g as MeasureMarginalLiftOptions, h as heldOutPromotionGate, m as measureMarginalLift, t as thresholdPromotionGate } from './generator-YkAQrOoD.js';
4
4
  import { LlmClientOptions, AnalystFinding } from '@tangle-network/agent-eval';
5
- import { M as McpServeSpec } from './mcp-serve-verifier-DQQDbuyz.js';
5
+ import { M as McpServeSpec } from './mcp-serve-verifier-Bs_n0xPc.js';
6
6
  import { L as LocalHarness } from './local-harness-ZqCx51u7.js';
7
- import './agentic-generator-DDMM45kZ.js';
7
+ import './agentic-generator-hCaQRAes.js';
8
8
  import '@tangle-network/agent-eval/campaign';
9
9
  import 'node:child_process';
10
10
 
package/dist/lifecycle.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  agenticGenerator,
8
8
  commandVerifier
9
- } from "./chunk-D3H7F6L2.js";
9
+ } from "./chunk-DHCHL6OG.js";
10
10
  import "./chunk-EP6RVHMX.js";
11
11
  import {
12
12
  ValidationError
@@ -2,8 +2,8 @@ import { Scenario } from '@tangle-network/agent-eval/campaign';
2
2
  import { SelfImproveOptions, SelfImproveResult } from '@tangle-network/agent-eval/contract';
3
3
  import { R as RunAnalystLoopOpts, a as RunAnalystLoopResult } from './types-BC3bZpH0.js';
4
4
  import { F as FactCandidate, C as CreateKbGateOptions } from './kb-gate-CwHO0vz6.js';
5
- import { B as Budget } from './types-1d5QGK3t.js';
6
- import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions, b as WorktreePatchArtifact } from './worktree-fanout-CPprU-qI.js';
5
+ import { B as Budget } from './types-CmnA2iL3.js';
6
+ import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions, b as WorktreePatchArtifact } from './worktree-fanout-DCA3G4bO.js';
7
7
 
8
8
  /**
9
9
  *
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
- export { L as LoopRunnerCliArgs, e as LoopRunnerCliResult, p as parseLoopRunnerArgv, k as runLoopRunnerCli } from './loop-runner-bin-BRQSQdHa.js';
2
+ export { L as LoopRunnerCliArgs, e as LoopRunnerCliResult, p as parseLoopRunnerArgv, k as runLoopRunnerCli } from './loop-runner-bin-BIQldFS8.js';
3
3
  import '@tangle-network/agent-eval/campaign';
4
4
  import '@tangle-network/agent-eval/contract';
5
5
  import './types-BC3bZpH0.js';
6
6
  import '@tangle-network/agent-eval';
7
7
  import './kb-gate-CwHO0vz6.js';
8
- import './types-1d5QGK3t.js';
8
+ import './types-CmnA2iL3.js';
9
9
  import '@tangle-network/agent-interface';
10
10
  import '@tangle-network/sandbox';
11
- import './types-ByAYqlVb.js';
11
+ import './types-B3vAW0Oq.js';
12
12
  import './types-BwoZWq-i.js';
13
- import './worktree-fanout-CPprU-qI.js';
14
- import './completion-gate-D1gX1-hg.js';
13
+ import './worktree-fanout-DCA3G4bO.js';
14
+ import './completion-gate-C80jiRfN.js';
15
15
  import '@tangle-network/agent-profile-materialize';
16
16
  import './local-harness-ZqCx51u7.js';
17
17
  import 'node:child_process';
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  parseLoopRunnerArgv,
4
4
  runLoopRunnerCli
5
- } from "./chunk-XP5KDM3R.js";
5
+ } from "./chunk-BPGXIKK7.js";
6
6
  import "./chunk-SGKPNBXE.js";
7
- import "./chunk-U33YZ7B2.js";
8
- import "./chunk-C3UKLQ54.js";
7
+ import "./chunk-YLUOTX6U.js";
8
+ import "./chunk-IADLKE7I.js";
9
9
  import "./chunk-DPEUKJRO.js";
10
- import "./chunk-AEG3NGJ2.js";
10
+ import "./chunk-Q2JSAVQ3.js";
11
11
  import "./chunk-ISTDY47H.js";
12
- import "./chunk-WIPGQ4GT.js";
13
- import "./chunk-VSWBYWFK.js";
12
+ import "./chunk-IMSNJSXH.js";
13
+ import "./chunk-M6MD6JBS.js";
14
14
  import "./chunk-3MDZX7YU.js";
15
15
  import "./chunk-QDSOD7RC.js";
16
16
  import "./chunk-M22PL4GH.js";
package/dist/loops.d.ts CHANGED
@@ -2,25 +2,25 @@ import { ChatClient, RunRecord, HarnessType, AgentProfile, MaximumCharge, Analys
2
2
  export { AnalystFinding, DefaultVerdict, computeFindingId, makeFinding } from '@tangle-network/agent-eval';
3
3
  import { SandboxEvent, SandboxInstance, CreateSandboxOptions, PromptOptions, TaskOptions } from '@tangle-network/sandbox';
4
4
  export { AgentProfile, CreateSandboxOptions, SandboxEvent, SandboxInstance } from '@tangle-network/sandbox';
5
- import { a as ResultBlobStore, f as SpawnJournal, N as NodeId, j as SpawnEvent, E as ExecutorFactory, A as Agent, B as Budget, S as Scope, h as Settled, b as SupervisedResult, i as Spend, U as UsageEvent, e as ExecutorRegistry, k as Supervisor } from './types-1d5QGK3t.js';
6
- export { d as AgentSpec, c as Executor, l as ExecutorContext, m as ExecutorResult, R as Runtime, n as SupervisorOpts, T as TreeView, W as WidenGate } from './types-1d5QGK3t.js';
7
- import { M as MakeWorkerAgent, A as AnalystRegistry, o as CoordinationTools, n as CoordinationEvent, as as QuestionPolicy, E as ExecutorConfig } from './coordination-Dr_axlAf.js';
8
- export { bh as BusEvent, bi as BusRecord, bj as BusStats, bk as EventBus, bl as ProviderSeam, bm as PublishOptions, bn as cliWorktreeExecutor, bo as createEventBus, bp as createExecutor, bq as createExecutorRegistry } from './coordination-Dr_axlAf.js';
9
- import { R as RuntimeHooks, I as Iteration, S as SandboxClient, D as Driver, A as AgentRunSpec, O as OutputAdapter, V as Validator, E as ExecCtx, t as LoopWinner, u as LoopLineageOptions, v as LoopResult, L as LoopTokenUsage, M as MountRecorder, w as SelectionReceipt } from './types-ByAYqlVb.js';
10
- export { x as LoopDecisionPayload, y as LoopEndedPayload, z as LoopIterationDispatchPayload, B as LoopIterationEndedPayload, C as LoopIterationStartedPayload, F as LoopPlanDescription, G as LoopPlanPayload, b as LoopSandboxPlacement, H as LoopStartedPayload, J as LoopTeardownFailedPayload, r as LoopTraceEmitter, a as LoopTraceEvent, K as MountManifestEntry, N as RunProvenance, P as ValidationCtx } from './types-ByAYqlVb.js';
5
+ import { a as ResultBlobStore, f as SpawnJournal, N as NodeId, j as SpawnEvent, E as ExecutorFactory, A as Agent, B as Budget, S as Scope, h as Settled, b as SupervisedResult, i as Spend, U as UsageEvent, e as ExecutorRegistry, k as Supervisor } from './types-CmnA2iL3.js';
6
+ export { d as AgentSpec, c as Executor, l as ExecutorContext, m as ExecutorResult, R as Runtime, n as SupervisorOpts, T as TreeView, W as WidenGate } from './types-CmnA2iL3.js';
7
+ import { M as MakeWorkerAgent, A as AnalystRegistry, o as CoordinationTools, n as CoordinationEvent, as as QuestionPolicy, E as ExecutorConfig } from './coordination-BFE3Den7.js';
8
+ export { bh as BusEvent, bi as BusRecord, bj as BusStats, bk as EventBus, bl as ProviderSeam, bm as PublishOptions, bn as cliWorktreeExecutor, bo as createEventBus, bp as createExecutor, bq as createExecutorRegistry } from './coordination-BFE3Den7.js';
9
+ import { R as RuntimeHooks, I as Iteration, S as SandboxClient, D as Driver, A as AgentRunSpec, O as OutputAdapter, V as Validator, E as ExecCtx, t as LoopWinner, u as LoopLineageOptions, v as LoopResult, L as LoopTokenUsage, M as MountRecorder, w as SelectionReceipt } from './types-B3vAW0Oq.js';
10
+ export { x as LoopDecisionPayload, y as LoopEndedPayload, z as LoopIterationDispatchPayload, B as LoopIterationEndedPayload, C as LoopIterationStartedPayload, F as LoopPlanDescription, G as LoopPlanPayload, a as LoopSandboxPlacement, H as LoopStartedPayload, J as LoopTeardownFailedPayload, r as LoopTraceEmitter, b as LoopTraceEvent, K as MountManifestEntry, N as RunProvenance, P as ValidationCtx } from './types-B3vAW0Oq.js';
11
11
  import { RunProfileMatrixResult, Scenario, ProfileDispatchFn, JudgeConfig, RunProfileMatrixOptions, DispatchFn } from '@tangle-network/agent-eval/campaign';
12
12
  export { AgentEnvironmentProviderRef, AgentEnvironmentProviderRegistry, ProviderAsSandboxClientOptions, ProviderExecutorOptions, SandboxClientProviderOptions, createAgentEnvironmentProviderRegistry, providerAsExecutor, providerAsSandboxClient, resolveAgentEnvironmentProvider, sandboxClientAsProvider } from './environment-provider.js';
13
- import { C as CorpusRecord, c as Corpus, O as Outcome, S as ScopeAnalyzeInput, d as AssertTraceDerivedFindings, e as SteerContext, f as ScopeAnalyst, F as FanoutOptions, g as CombinatorShape, h as ScopeWidenGate, L as LoopUntilSpec, P as PanelSpec, i as PipelineStage, W as WinnerStrategy, j as FanoutWinnerSelector, V as VerifySpec, k as WidenSpec, l as CorpusFilter, R as RenderCorpusToInstructionsOptions, D as DefinePersonaInput, m as Persona, n as RunPersonifiedOptions, o as ShapeRegistry, p as LoopShape, E as EqualKArm, q as EqualKOnCostOptions, r as EqualKVerdict, T as TrajectoryReportOptions, s as TrajectoryReport } from './worktree-fanout-CPprU-qI.js';
14
- export { A as AuthoredHarness, t as DefinePersona, u as EqualKOnCost, v as Fanout, w as FanoutSynthesis, x as FlatWidenGate, y as LoopUntil, z as LoopUntilState, B as Panel, G as PanelJudge, H as PanelVerdict, I as PatchDeliverableOptions, J as PersonaContext, K as PersonaExecutors, M as Pipeline, N as RenderCorpusToInstructions, Q as RunPersonified, U as ShapeBudget, X as ShapeContext, Y as TrajectoryNode, Z as TrajectoryReportFn, _ as Verify, $ as Widen, a0 as WidenDecision, a1 as WidenLineage, a2 as WorktreeCliExecutorOptions, a as WorktreeFanoutOptions, b as WorktreePatchArtifact, a3 as createWorktreeCliExecutor, a4 as patchDelivered, a5 as worktreeFanout } from './worktree-fanout-CPprU-qI.js';
13
+ import { C as CorpusRecord, c as Corpus, O as Outcome, S as ScopeAnalyzeInput, d as AssertTraceDerivedFindings, e as SteerContext, f as ScopeAnalyst, F as FanoutOptions, g as CombinatorShape, h as ScopeWidenGate, L as LoopUntilSpec, P as PanelSpec, i as PipelineStage, W as WinnerStrategy, j as FanoutWinnerSelector, V as VerifySpec, k as WidenSpec, l as CorpusFilter, R as RenderCorpusToInstructionsOptions, D as DefinePersonaInput, m as Persona, n as RunPersonifiedOptions, o as ShapeRegistry, p as LoopShape, E as EqualKArm, q as EqualKOnCostOptions, r as EqualKVerdict, T as TrajectoryReportOptions, s as TrajectoryReport } from './worktree-fanout-DCA3G4bO.js';
14
+ export { A as AuthoredHarness, t as DefinePersona, u as EqualKOnCost, v as Fanout, w as FanoutSynthesis, x as FlatWidenGate, y as LoopUntil, z as LoopUntilState, B as Panel, G as PanelJudge, H as PanelVerdict, I as PatchDeliverableOptions, J as PersonaContext, K as PersonaExecutors, M as Pipeline, N as RenderCorpusToInstructions, Q as RunPersonified, U as ShapeBudget, X as ShapeContext, Y as TrajectoryNode, Z as TrajectoryReportFn, _ as Verify, $ as Widen, a0 as WidenDecision, a1 as WidenLineage, a2 as WorktreeCliExecutorOptions, a as WorktreeFanoutOptions, b as WorktreePatchArtifact, a3 as createWorktreeCliExecutor, a4 as patchDelivered, a5 as worktreeFanout } from './worktree-fanout-DCA3G4bO.js';
15
15
  import { b as AnalystRegistryLike } from './types-BC3bZpH0.js';
16
16
  import { AgentProfile as AgentProfile$1 } from '@tangle-network/agent-interface';
17
17
  import { R as RouterConfig, T as ToolLoopChat, a as ToolLoopCompactionOptions } from './sanitize-BTSsdBXw.js';
18
18
  export { j as RouterChatResult, k as RouterChatToolsResult, l as RouterToolCall, m as RouterToolLoopResult, n as ToolLoopCompaction, b as ToolSpec, r as routerBrain, o as routerChatWithTools, p as routerChatWithUsage, q as routerToolLoop } from './sanitize-BTSsdBXw.js';
19
19
  import { R as RuntimeStreamEvent, c as AgentExecutionBackend, f as AgentTaskStatus, B as BackendErrorDetail } from './types-BwoZWq-i.js';
20
- import { D as DeliverableSpec } from './completion-gate-D1gX1-hg.js';
21
- export { g as WorktreeCommandResult, h as WorktreeProfileMaterializationReceipt, i as gateOnDeliverable } from './completion-gate-D1gX1-hg.js';
22
- import { S as SupervisorProfile } from './supervise-DmYOug5f.js';
23
- export { D as DriveHarness, a as SuperviseOptions, b as SupervisorAgentDeps, s as supervise, c as supervisorAgent, w as workerFromBackend } from './supervise-DmYOug5f.js';
20
+ import { D as DeliverableSpec } from './completion-gate-C80jiRfN.js';
21
+ export { g as WorktreeCommandResult, h as WorktreeProfileMaterializationReceipt, i as gateOnDeliverable } from './completion-gate-C80jiRfN.js';
22
+ import { S as SupervisorProfile } from './supervise-BLPI50-w.js';
23
+ export { D as DriveHarness, a as SuperviseOptions, b as SupervisorAgentDeps, s as supervise, c as supervisorAgent, w as workerFromBackend } from './supervise-BLPI50-w.js';
24
24
  import { stuckLoopView, toolWasteView } from '@tangle-network/agent-eval/pipelines';
25
25
  export { AgentEnvironment, AgentEnvironmentCapabilities, AgentEnvironmentEvent, AgentEnvironmentProvider, AgentEnvironmentQuery, AgentEnvironmentStatus, AgentEnvironmentSummary, AgentProfileRef, AgentSession, AgentSessionRef, AgentSessionStatus, AgentTurnInput, AgentTurnResult, CheckpointRef, CheckpointRequest, CreateAgentEnvironmentInput, ExecRequest, ExecResult, ForkRequest, PlacementInfo, ResourceRequest, WorkspaceRequest } from '@tangle-network/agent-interface/environment-provider';
26
26
  import './substrate-DO2GHNg2.js';
package/dist/loops.js CHANGED
@@ -102,7 +102,7 @@ import {
102
102
  watchTrace,
103
103
  widen,
104
104
  worktreeFanout
105
- } from "./chunk-U33YZ7B2.js";
105
+ } from "./chunk-YLUOTX6U.js";
106
106
  import {
107
107
  acquireSandbox,
108
108
  asAuthoredProfile,
@@ -140,9 +140,9 @@ import {
140
140
  supervisorAgent,
141
141
  supervisorInstructions,
142
142
  workerFromBackend
143
- } from "./chunk-C3UKLQ54.js";
143
+ } from "./chunk-IADLKE7I.js";
144
144
  import "./chunk-DPEUKJRO.js";
145
- import "./chunk-AEG3NGJ2.js";
145
+ import "./chunk-Q2JSAVQ3.js";
146
146
  import {
147
147
  assertModelAllowed
148
148
  } from "./chunk-ISTDY47H.js";
@@ -150,14 +150,14 @@ import {
150
150
  InMemoryResultBlobStore,
151
151
  InMemorySpawnJournal,
152
152
  contentAddress
153
- } from "./chunk-WIPGQ4GT.js";
153
+ } from "./chunk-IMSNJSXH.js";
154
154
  import {
155
155
  createAgentEnvironmentProviderRegistry,
156
156
  providerAsExecutor,
157
157
  providerAsSandboxClient,
158
158
  resolveAgentEnvironmentProvider,
159
159
  sandboxClientAsProvider
160
- } from "./chunk-VSWBYWFK.js";
160
+ } from "./chunk-M6MD6JBS.js";
161
161
  import "./chunk-3MDZX7YU.js";
162
162
  import {
163
163
  createSandboxToolPartState,
package/dist/mcp/bin.js CHANGED
@@ -9,11 +9,11 @@ import {
9
9
  DelegationTaskQueue,
10
10
  FileDelegationStore,
11
11
  createMcpServer
12
- } from "../chunk-C3UKLQ54.js";
12
+ } from "../chunk-IADLKE7I.js";
13
13
  import "../chunk-DPEUKJRO.js";
14
14
  import "../chunk-ISTDY47H.js";
15
- import "../chunk-WIPGQ4GT.js";
16
- import "../chunk-VSWBYWFK.js";
15
+ import "../chunk-IMSNJSXH.js";
16
+ import "../chunk-M6MD6JBS.js";
17
17
  import "../chunk-3MDZX7YU.js";
18
18
  import "../chunk-M22PL4GH.js";
19
19
  import "../chunk-EP6RVHMX.js";
@@ -1,17 +1,17 @@
1
- import { S as SandboxClient, b as LoopSandboxPlacement } from '../types-ByAYqlVb.js';
2
- import { F as FleetHandle, D as DelegationExecutor, a as DelegationTaskQueue, b as FeedbackStore, c as DelegateFeedbackResult, d as DelegateFeedbackArgs, U as UiAuditorDelegate, e as DelegateUiAuditArgs, f as DelegateUiAuditResult, g as DelegationHistoryResult, h as DelegationHistoryArgs, i as DelegationStatusResult, j as DelegationStatusArgs } from '../coordination-Dr_axlAf.js';
3
- export { A as AnalystRegistry, C as CappedDelegationTrace, k as CoderDelegate, l as CoderReview, m as CoderReviewer, n as CoordinationEvent, o as CoordinationTools, p as CoordinationToolsOptions, q as DELEGATE_DESCRIPTION, r as DELEGATE_INPUT_SCHEMA, s as DELEGATE_TOOL_NAME, t as DELEGATION_TRACE_MAX_BYTES, u as DELEGATION_TRACE_MAX_SPANS, v as DelegateArgs, w as DelegateCodeArgs, x as DelegateCodeConfig, y as DelegateCodeResult, z as DelegateHandlerOptions, B as DelegateResearchArgs, G as DelegateResearchConfig, H as DelegateResearchResult, I as DelegateResult, J as DelegateRunCtx, K as DelegateUiAuditConfig, L as DelegateUiAuditRoute, N as DelegationError, O as DelegationFeedbackSnapshot, P as DelegationHistoryEntry, Q as DelegationPersistenceError, R as DelegationProfile, S as DelegationProgress, T as DelegationRecord, V as DelegationResultPayload, W as DelegationResumeContext, X as DelegationResumeDriver, Y as DelegationResumeTick, Z as DelegationRunContext, _ as DelegationStateCorruptError, $ as DelegationStatus, a0 as DelegationStore, a1 as DelegationTaskQueueOptions, a2 as DelegationTraceCaps, a3 as DelegationTraceCollector, a4 as DelegationTraceSpan, a5 as DetachedSessionDelegateOptions, a6 as DetachedSessionRefParts, a7 as DetachedTurn, a8 as DetachedTurnResumeDriverOptions, a9 as DetachedWinnerSelection, aa as DriveTurnCapableBox, ab as DriveTurnTick, ac as FeedbackEvent, ad as FeedbackRating, ae as FeedbackRefersTo, af as FileDelegationStore, ag as FileDelegationStoreOptions, ah as FleetWorkspaceExecutorOptions, ai as InMemoryDelegationStore, aj as InMemoryFeedbackStore, ak as JsonRpcMessage, al as JsonRpcResponse, M as MakeWorkerAgent, am as McpServer, an as McpServerOptions, ao as McpToolDescriptor, ap as McpTransport, aq as Question, ar as QuestionDecision, as as QuestionPolicy, at as QuestionRecord, au as ResearchOutputShape, av as ResearchSource, aw as RunDetachedTurnOptions, ax as SettleDetachedCoderTurnOptions, ay as SettledWorker, az as SiblingSandboxExecutorOptions, aA as SubmitInput, aB as SubmitOutput, aC as TraceContext, aD as UiAuditorDelegationOutput, aE as buildDelegationTraceSpans, aF as capDelegationTrace, aG as coderTaskFromArgs, aH as composeLoopTraceEmitters, aI as createCoordinationTools, aJ as createDelegateHandler, aK as createDelegationTraceCollector, aL as createDetachedTurnResumeDriver, aM as createFleetWorkspaceExecutor, aN as createInProcessTransport, aO as createMcpServer, aP as createPropagatingTraceEmitter, aQ as createSiblingSandboxExecutor, aR as detachedSessionDelegate, aS as detachedTurnEvents, aT as eventToSnapshot, aU as formatDetachedSessionRef, aV as hashIdempotencyInput, aW as parseDetachedSessionRef, aX as readTraceContextFromEnv, aY as runDetachedTurn, aZ as settleDetachedCoderTurn, a_ as traceContextToEnv, a$ as validateDelegateArgs } from '../coordination-Dr_axlAf.js';
1
+ import { S as SandboxClient, a as LoopSandboxPlacement } from '../types-B3vAW0Oq.js';
2
+ import { F as FleetHandle, D as DelegationExecutor, a as DelegationTaskQueue, b as FeedbackStore, c as DelegateFeedbackResult, d as DelegateFeedbackArgs, U as UiAuditorDelegate, e as DelegateUiAuditArgs, f as DelegateUiAuditResult, g as DelegationHistoryResult, h as DelegationHistoryArgs, i as DelegationStatusResult, j as DelegationStatusArgs } from '../coordination-BFE3Den7.js';
3
+ export { A as AnalystRegistry, C as CappedDelegationTrace, k as CoderDelegate, l as CoderReview, m as CoderReviewer, n as CoordinationEvent, o as CoordinationTools, p as CoordinationToolsOptions, q as DELEGATE_DESCRIPTION, r as DELEGATE_INPUT_SCHEMA, s as DELEGATE_TOOL_NAME, t as DELEGATION_TRACE_MAX_BYTES, u as DELEGATION_TRACE_MAX_SPANS, v as DelegateArgs, w as DelegateCodeArgs, x as DelegateCodeConfig, y as DelegateCodeResult, z as DelegateHandlerOptions, B as DelegateResearchArgs, G as DelegateResearchConfig, H as DelegateResearchResult, I as DelegateResult, J as DelegateRunCtx, K as DelegateUiAuditConfig, L as DelegateUiAuditRoute, N as DelegationError, O as DelegationFeedbackSnapshot, P as DelegationHistoryEntry, Q as DelegationPersistenceError, R as DelegationProfile, S as DelegationProgress, T as DelegationRecord, V as DelegationResultPayload, W as DelegationResumeContext, X as DelegationResumeDriver, Y as DelegationResumeTick, Z as DelegationRunContext, _ as DelegationStateCorruptError, $ as DelegationStatus, a0 as DelegationStore, a1 as DelegationTaskQueueOptions, a2 as DelegationTraceCaps, a3 as DelegationTraceCollector, a4 as DelegationTraceSpan, a5 as DetachedSessionDelegateOptions, a6 as DetachedSessionRefParts, a7 as DetachedTurn, a8 as DetachedTurnResumeDriverOptions, a9 as DetachedWinnerSelection, aa as DriveTurnCapableBox, ab as DriveTurnTick, ac as FeedbackEvent, ad as FeedbackRating, ae as FeedbackRefersTo, af as FileDelegationStore, ag as FileDelegationStoreOptions, ah as FleetWorkspaceExecutorOptions, ai as InMemoryDelegationStore, aj as InMemoryFeedbackStore, ak as JsonRpcMessage, al as JsonRpcResponse, M as MakeWorkerAgent, am as McpServer, an as McpServerOptions, ao as McpToolDescriptor, ap as McpTransport, aq as Question, ar as QuestionDecision, as as QuestionPolicy, at as QuestionRecord, au as ResearchOutputShape, av as ResearchSource, aw as RunDetachedTurnOptions, ax as SettleDetachedCoderTurnOptions, ay as SettledWorker, az as SiblingSandboxExecutorOptions, aA as SubmitInput, aB as SubmitOutput, aC as TraceContext, aD as UiAuditorDelegationOutput, aE as buildDelegationTraceSpans, aF as capDelegationTrace, aG as coderTaskFromArgs, aH as composeLoopTraceEmitters, aI as createCoordinationTools, aJ as createDelegateHandler, aK as createDelegationTraceCollector, aL as createDetachedTurnResumeDriver, aM as createFleetWorkspaceExecutor, aN as createInProcessTransport, aO as createMcpServer, aP as createPropagatingTraceEmitter, aQ as createSiblingSandboxExecutor, aR as detachedSessionDelegate, aS as detachedTurnEvents, aT as eventToSnapshot, aU as formatDetachedSessionRef, aV as hashIdempotencyInput, aW as parseDetachedSessionRef, aX as readTraceContextFromEnv, aY as runDetachedTurn, aZ as settleDetachedCoderTurn, a_ as traceContextToEnv, a$ as validateDelegateArgs } from '../coordination-BFE3Den7.js';
4
4
  import { L as LocalHarness, r as runLocalHarness } from '../local-harness-ZqCx51u7.js';
5
5
  export { a as CodexExecutionEvidence, c as CodexExecutionPolicy, C as CodexTokenUsage, b as LocalHarnessResult, R as RunLocalHarnessOptions, p as parseCodexTokenUsage } from '../local-harness-ZqCx51u7.js';
6
- import { G as GitRunner } from '../completion-gate-D1gX1-hg.js';
7
- export { C as CreateWorktreeOptions, b as DiffOptions, c as DiffResult, R as RemoveWorktreeOptions, d as WorktreeHandle, e as captureWorktreeDiff, f as createWorktree, r as removeWorktree } from '../completion-gate-D1gX1-hg.js';
6
+ import { G as GitRunner } from '../completion-gate-C80jiRfN.js';
7
+ export { C as CreateWorktreeOptions, b as DiffOptions, c as DiffResult, R as RemoveWorktreeOptions, d as WorktreeHandle, e as captureWorktreeDiff, f as createWorktree, r as removeWorktree } from '../completion-gate-C80jiRfN.js';
8
8
  export { C as CreateKbGateOptions, F as FactCandidate, a as FactJudge, b as FactJudgeVerdict, K as KbGateResult, c as createKbGate } from '../kb-gate-CwHO0vz6.js';
9
9
  export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from '../openai-tools-fnj6SRVg.js';
10
10
  import { AnalystFinding } from '@tangle-network/agent-eval';
11
11
  import { U as UiLens } from '../substrate-DO2GHNg2.js';
12
12
  import '@tangle-network/sandbox';
13
13
  import '../types-BwoZWq-i.js';
14
- import '../types-1d5QGK3t.js';
14
+ import '../types-CmnA2iL3.js';
15
15
  import '@tangle-network/agent-interface';
16
16
  import '../sanitize-BTSsdBXw.js';
17
17
  import '../environment-provider.js';
package/dist/mcp/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  mcpToolsForRuntimeMcp,
11
11
  mcpToolsForRuntimeMcpSubset
12
- } from "../chunk-33OG2NN3.js";
12
+ } from "../chunk-Z5I642SY.js";
13
13
  import {
14
14
  createKbGate
15
15
  } from "../chunk-SGKPNBXE.js";
@@ -17,7 +17,7 @@ import {
17
17
  assertTraceDerivedFindings,
18
18
  runCoderChecks,
19
19
  selectValidWinner
20
- } from "../chunk-U33YZ7B2.js";
20
+ } from "../chunk-YLUOTX6U.js";
21
21
  import {
22
22
  DELEGATE_DESCRIPTION,
23
23
  DELEGATE_FEEDBACK_DESCRIPTION,
@@ -67,12 +67,12 @@ import {
67
67
  validateDelegateUiAuditArgs,
68
68
  validateDelegationHistoryArgs,
69
69
  validateDelegationStatusArgs
70
- } from "../chunk-C3UKLQ54.js";
70
+ } from "../chunk-IADLKE7I.js";
71
71
  import "../chunk-DPEUKJRO.js";
72
- import "../chunk-AEG3NGJ2.js";
72
+ import "../chunk-Q2JSAVQ3.js";
73
73
  import "../chunk-ISTDY47H.js";
74
- import "../chunk-WIPGQ4GT.js";
75
- import "../chunk-VSWBYWFK.js";
74
+ import "../chunk-IMSNJSXH.js";
75
+ import "../chunk-M6MD6JBS.js";
76
76
  import {
77
77
  deleteBoxSafe,
78
78
  sleep,
@@ -1,4 +1,4 @@
1
- import { V as Verifier } from './agentic-generator-DDMM45kZ.js';
1
+ import { V as Verifier } from './agentic-generator-hCaQRAes.js';
2
2
 
3
3
  /**
4
4
  * `mcpServeVerifier` — the intrinsic verifier for a built MCP server: the
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createOpenAICompatibleBackend
3
- } from "../chunk-AEG3NGJ2.js";
3
+ } from "../chunk-Q2JSAVQ3.js";
4
4
  import "../chunk-YEJR7IXO.js";
5
5
  import "../chunk-DGUM43GV.js";
6
6
 
@@ -0,0 +1,233 @@
1
+ import { TraceStore } from '@tangle-network/agent-eval';
2
+ import { AgentCandidateArtifactRef, AgentCandidateAttemptPolicy, Sha256Digest, AgentCandidateResolvedModel, AgentCandidateFixedSpend, AgentProfile, AgentProfileDiff, AgentCandidateProfilePlanEvidence, AgentCandidateProfileActivation } from '@tangle-network/agent-interface';
3
+ import { A as AgentCandidateExecutorPort, a as AgentCandidateBenchmarkGraderPort, b as AgentCandidateOutputArtifactPort, P as PreparedAgentCandidateExecution, c as AgentCandidateRunFinalization, V as VerifiedAgentCandidate, d as AgentCandidateTaskExecution, e as AgentCandidateExecutionPorts } from './types-CWqfCO8s.js';
4
+
5
+ interface AgentCandidatePreparationEvidence {
6
+ readonly executionPlan: AgentCandidateArtifactRef;
7
+ readonly materializationReceipt: AgentCandidateArtifactRef;
8
+ }
9
+
10
+ /** Durable one-shot lifecycle for candidate execution attempts. */
11
+
12
+ /** Non-secret identities a trusted recovery worker needs to close an abandoned attempt. */
13
+ interface AgentCandidateExecutionCleanupHandles {
14
+ readonly preparationId: string;
15
+ readonly modelGrantDigest: Sha256Digest;
16
+ readonly resolvedModel: AgentCandidateResolvedModel;
17
+ readonly traceRunId: string;
18
+ readonly cleanupTimeoutMs: number;
19
+ readonly memory?: {
20
+ readonly accessDigest: Sha256Digest;
21
+ readonly effectiveNamespace: string;
22
+ };
23
+ }
24
+ /** Immutable signed identity stored for one execution attempt. */
25
+ interface AgentCandidateExecutionClaim {
26
+ readonly executionId: string;
27
+ readonly attempt: number;
28
+ readonly maxAttempts: number;
29
+ readonly retryPolicy: AgentCandidateAttemptPolicy['retryPolicy'];
30
+ readonly bundleDigest: Sha256Digest;
31
+ readonly executionPlanDigest: Sha256Digest;
32
+ /** Durable canonical bytes needed to reconstruct the signed preparation. */
33
+ readonly preparationEvidence: AgentCandidatePreparationEvidence;
34
+ /** Frozen plan identity with only attempt number and per-attempt grant identity normalized. */
35
+ readonly retryLineageDigest: Sha256Digest;
36
+ /** The winning lease stops authorizing a new terminal write at this instant. */
37
+ readonly leaseExpiresAtMs: number;
38
+ /** Frozen budget for task verification, executable grading, and receipt construction. */
39
+ readonly resultTimeoutMs: number;
40
+ /** Non-secret handles retained so an expired attempt can be closed and reconciled. */
41
+ readonly cleanup: AgentCandidateExecutionCleanupHandles;
42
+ }
43
+ /** Secret capability required to finish the acquired attempt. */
44
+ interface AgentCandidateExecutionLease {
45
+ readonly executionId: string;
46
+ readonly attempt: number;
47
+ readonly token: string;
48
+ readonly expiresAtMs: number;
49
+ }
50
+ /** Only the first class is retryable, and only when the closed model ledger has zero calls. */
51
+ type AgentCandidateExecutionFailureClass = 'pre-model-infrastructure' | 'execution' | 'post-model-infrastructure' | 'unknown';
52
+ /** Evaluator-owned terminal facts staged durably before the terminal CAS. */
53
+ type AgentCandidateExecutionTerminalResult = {
54
+ readonly status: 'succeeded';
55
+ readonly usage: AgentCandidateFixedSpend;
56
+ readonly modelSettlement: AgentCandidateArtifactRef;
57
+ readonly taskOutcome: AgentCandidateArtifactRef;
58
+ readonly benchmarkResult: AgentCandidateArtifactRef;
59
+ readonly runReceipt: AgentCandidateArtifactRef;
60
+ } | {
61
+ readonly status: 'failed';
62
+ readonly failureClass: AgentCandidateExecutionFailureClass;
63
+ readonly usage: AgentCandidateFixedSpend;
64
+ readonly modelSettlement: AgentCandidateArtifactRef;
65
+ readonly failureEvidence?: AgentCandidateArtifactRef;
66
+ };
67
+ /** Durable terminal record for one acquired execution attempt. */
68
+ type AgentCandidateExecutionTerminalRecord = AgentCandidateExecutionTerminalResult & {
69
+ readonly executionId: string;
70
+ readonly attempt: number;
71
+ readonly bundleDigest: Sha256Digest;
72
+ readonly executionPlanDigest: Sha256Digest;
73
+ readonly preparationEvidence: AgentCandidateExecutionClaim['preparationEvidence'];
74
+ /** RFC 8785 SHA-256 of this record with `terminalDigest` omitted. */
75
+ readonly terminalDigest: Sha256Digest;
76
+ };
77
+ /** Monotonic durable phase: the second value means candidate code could have started. */
78
+ type AgentCandidateExecutionPhase = 'claimed' | 'candidate-may-run';
79
+ /** Trusted, independently observed closure facts for one expired winning lease. */
80
+ interface AgentCandidateExecutionRecoveryEvidence {
81
+ readonly failureClass: AgentCandidateExecutionFailureClass;
82
+ readonly usage: AgentCandidateFixedSpend;
83
+ readonly modelSettlement: AgentCandidateArtifactRef;
84
+ readonly failureEvidence?: AgentCandidateArtifactRef;
85
+ readonly process: {
86
+ readonly stopped: true;
87
+ readonly executionPlanDigest: Sha256Digest;
88
+ };
89
+ readonly model: {
90
+ readonly closed: true;
91
+ readonly preparationId: string;
92
+ readonly grantDigest: Sha256Digest;
93
+ };
94
+ readonly memory?: {
95
+ readonly closed: true;
96
+ readonly preparationId: string;
97
+ readonly accessDigest: Sha256Digest;
98
+ readonly effectiveNamespace: string;
99
+ };
100
+ }
101
+ interface AgentCandidateExecutionAttemptRef {
102
+ readonly executionId: string;
103
+ readonly attempt: number;
104
+ }
105
+ /** Persisted state available to a fresh trusted recovery worker after a crash. */
106
+ interface AgentCandidateExecutionAttemptRecord {
107
+ readonly claim: AgentCandidateExecutionClaim;
108
+ readonly phase: AgentCandidateExecutionPhase;
109
+ /** Durable outbox content written before the terminal compare-and-set. */
110
+ readonly staged?: AgentCandidateExecutionTerminalRecord;
111
+ readonly terminal?: AgentCandidateExecutionTerminalRecord;
112
+ }
113
+ /** Result of atomically claiming one execution attempt. */
114
+ type AgentCandidateExecutionClaimResult = {
115
+ readonly acquired: true;
116
+ readonly claim: AgentCandidateExecutionClaim;
117
+ readonly lease: AgentCandidateExecutionLease;
118
+ } | {
119
+ readonly acquired: false;
120
+ readonly reason: 'already-claimed';
121
+ /** The durable winner already occupying this execution-attempt slot. */
122
+ readonly claim: AgentCandidateExecutionClaim;
123
+ /** True only when every signed claim field matches the durable winner. */
124
+ readonly exactReplay: boolean;
125
+ } | {
126
+ readonly acquired: false;
127
+ readonly reason: 'retry-not-eligible';
128
+ readonly claim: AgentCandidateExecutionClaim;
129
+ readonly detail: AgentCandidateRetryRejection;
130
+ };
131
+ /** Result of atomically recording an attempt's terminal facts. */
132
+ type AgentCandidateExecutionFinishResult = {
133
+ readonly finished: true;
134
+ readonly terminal: AgentCandidateExecutionTerminalRecord;
135
+ } | {
136
+ readonly finished: false;
137
+ readonly terminal: AgentCandidateExecutionTerminalRecord;
138
+ /** True when a repeated finish supplied the same terminal digest. */
139
+ readonly exactReplay: boolean;
140
+ };
141
+ /** Result of durably staging the one immutable terminal outbox entry. */
142
+ type AgentCandidateExecutionStageResult = {
143
+ readonly staged: true;
144
+ readonly terminal: AgentCandidateExecutionTerminalRecord;
145
+ } | {
146
+ readonly staged: false;
147
+ readonly terminal: AgentCandidateExecutionTerminalRecord;
148
+ readonly exactReplay: boolean;
149
+ };
150
+ /** Result of crossing the irreversible candidate-may-run boundary. */
151
+ type AgentCandidateExecutionPhaseResult = {
152
+ readonly marked: true;
153
+ readonly phase: 'candidate-may-run';
154
+ } | {
155
+ readonly marked: false;
156
+ readonly phase: 'candidate-may-run';
157
+ };
158
+ type AgentCandidateRetryRejection = 'prior-attempt-missing' | 'prior-attempt-running' | 'prior-attempt-succeeded' | 'prior-attempt-spent-model-calls' | 'prior-attempt-not-pre-model-infrastructure' | 'retry-lineage-mismatch';
159
+ /**
160
+ * Atomic one-shot store for candidate execution attempts.
161
+ *
162
+ * Implementations must linearize both methods across every process sharing the
163
+ * store. Terminal publication is deliberately two-step: `stageTerminal`
164
+ * fsyncs the complete immutable outbox record, then `finish` publishes exactly
165
+ * those staged bytes by digest. A crash between the two leaves recoverable
166
+ * evidence rather than an ambiguous completed run.
167
+ */
168
+ interface AgentCandidateExecutionClaimStore {
169
+ tryClaim(claim: AgentCandidateExecutionClaim): Promise<AgentCandidateExecutionClaimResult>;
170
+ getAttempt(attempt: AgentCandidateExecutionAttemptRef): Promise<AgentCandidateExecutionAttemptRecord | undefined>;
171
+ /** Persist the point after which candidate code may have run. */
172
+ markCandidateMayRun(lease: AgentCandidateExecutionLease): Promise<AgentCandidateExecutionPhaseResult>;
173
+ /** Fsync the complete terminal record into the durable outbox. */
174
+ stageTerminal(lease: AgentCandidateExecutionLease, result: AgentCandidateExecutionTerminalResult): Promise<AgentCandidateExecutionStageResult>;
175
+ /** Publish exactly the staged terminal identified by `terminalDigest`. */
176
+ finish(lease: AgentCandidateExecutionLease, terminalDigest: Sha256Digest): Promise<AgentCandidateExecutionFinishResult>;
177
+ /**
178
+ * Write a failed terminal only after the lease expired and a trusted worker
179
+ * independently proved process death plus model and memory closure.
180
+ */
181
+ recoverExpired(attempt: AgentCandidateExecutionAttemptRef, evidence: AgentCandidateExecutionRecoveryEvidence): Promise<AgentCandidateExecutionFinishResult>;
182
+ }
183
+ interface InMemoryAgentCandidateExecutionClaimStoreOptions {
184
+ /** Testable evaluator clock; defaults to `Date.now`. */
185
+ now?: () => number;
186
+ }
187
+ /** Single-process lifecycle implementation. */
188
+ declare class InMemoryAgentCandidateExecutionClaimStore implements AgentCandidateExecutionClaimStore {
189
+ private readonly claims;
190
+ private readonly now;
191
+ constructor(options?: InMemoryAgentCandidateExecutionClaimStoreOptions);
192
+ tryClaim(requested: AgentCandidateExecutionClaim): Promise<AgentCandidateExecutionClaimResult>;
193
+ getAttempt(requestedAttempt: AgentCandidateExecutionAttemptRef): Promise<AgentCandidateExecutionAttemptRecord | undefined>;
194
+ markCandidateMayRun(requestedLease: AgentCandidateExecutionLease): Promise<AgentCandidateExecutionPhaseResult>;
195
+ stageTerminal(requestedLease: AgentCandidateExecutionLease, result: AgentCandidateExecutionTerminalResult): Promise<AgentCandidateExecutionStageResult>;
196
+ finish(requestedLease: AgentCandidateExecutionLease, requestedTerminalDigest: Sha256Digest): Promise<AgentCandidateExecutionFinishResult>;
197
+ recoverExpired(requestedAttempt: AgentCandidateExecutionAttemptRef, evidence: AgentCandidateExecutionRecoveryEvidence): Promise<AgentCandidateExecutionFinishResult>;
198
+ private requireClaim;
199
+ }
200
+
201
+ interface ExecutePreparedAgentCandidateOptions {
202
+ executor: AgentCandidateExecutorPort;
203
+ grader: AgentCandidateBenchmarkGraderPort;
204
+ outputArtifacts: AgentCandidateOutputArtifactPort;
205
+ traceStore: TraceStore;
206
+ /** Long-lived evaluator-owned store shared by every process that can run this benchmark. */
207
+ claimStore: AgentCandidateExecutionClaimStore;
208
+ /** Maximum time to prove process death and revoke protected access after a run ends. */
209
+ cleanupTimeoutMs?: number;
210
+ /** Maximum time for task verification, executable grading, and receipt construction. */
211
+ resultTimeoutMs?: number;
212
+ }
213
+ /** Executes and finalizes one durably claimed candidate without exposing an unproven result. */
214
+ declare function executePreparedAgentCandidate(prepared: PreparedAgentCandidateExecution, options: ExecutePreparedAgentCandidateOptions): Promise<AgentCandidateRunFinalization>;
215
+
216
+ interface PrepareAgentCandidateExecutionOptions {
217
+ cleanupTimeoutMs?: number;
218
+ /** Maximum time for task verification, executable grading, and receipt construction. */
219
+ resultTimeoutMs?: number;
220
+ }
221
+ /** Materializes a verified candidate into one immutable evaluator-owned execution plan. */
222
+ declare function prepareAgentCandidateExecution(candidate: VerifiedAgentCandidate, task: AgentCandidateTaskExecution, ports: AgentCandidateExecutionPorts, options?: PrepareAgentCandidateExecutionOptions): Promise<PreparedAgentCandidateExecution>;
223
+
224
+ /** Parse and check every native file hash plus both canonical document digests. */
225
+ declare function parseAgentCandidateProfileActivation(input: unknown, expectedProfilePlanDigest?: AgentCandidateProfilePlanEvidence['digest']): AgentCandidateProfileActivation;
226
+ /** Parse a complete profile without silently discarding unsupported fields. */
227
+ declare function parseExactAgentProfile(input: unknown, label: string): AgentProfile;
228
+ /** Parse a profile diff without silently discarding unsupported fields. */
229
+ declare function parseExactAgentProfileDiff(input: unknown, label: string): AgentProfileDiff;
230
+ /** Apply one exact diff and reject any value that cannot be preserved canonically. */
231
+ declare function applyExactAgentProfileDiff(baseInput: unknown, diffInput: unknown, label: string): AgentProfile;
232
+
233
+ export { type AgentCandidateExecutionClaimStore as A, type ExecutePreparedAgentCandidateOptions as E, InMemoryAgentCandidateExecutionClaimStore as I, type PrepareAgentCandidateExecutionOptions as P, type AgentCandidateExecutionAttemptRecord as a, type AgentCandidateExecutionAttemptRef as b, type AgentCandidateExecutionClaim as c, type AgentCandidateExecutionClaimResult as d, type AgentCandidateExecutionCleanupHandles as e, type AgentCandidateExecutionFailureClass as f, type AgentCandidateExecutionFinishResult as g, type AgentCandidateExecutionLease as h, type AgentCandidateExecutionPhase as i, type AgentCandidateExecutionPhaseResult as j, type AgentCandidateExecutionRecoveryEvidence as k, type AgentCandidateExecutionStageResult as l, type AgentCandidateExecutionTerminalRecord as m, type AgentCandidateExecutionTerminalResult as n, type AgentCandidatePreparationEvidence as o, parseAgentCandidateProfileActivation as p, type AgentCandidateRetryRejection as q, applyExactAgentProfileDiff as r, executePreparedAgentCandidate as s, parseExactAgentProfile as t, parseExactAgentProfileDiff as u, prepareAgentCandidateExecution as v };
@@ -1,7 +1,7 @@
1
1
  import { a as UiFinding, U as UiLens } from './substrate-DO2GHNg2.js';
2
2
  export { C as CoderTask, b as UI_FINDING_SEVERITIES, c as UI_LENSES, d as UiFindingScreenshot, e as UiFindingSeverity, f as coderTaskToPrompt } from './substrate-DO2GHNg2.js';
3
3
  import { AgentProfile, SandboxEvent } from '@tangle-network/sandbox';
4
- import { V as Validator, A as AgentRunSpec, O as OutputAdapter, D as Driver, S as SandboxClient } from './types-ByAYqlVb.js';
4
+ import { V as Validator, A as AgentRunSpec, O as OutputAdapter, D as Driver, S as SandboxClient } from './types-B3vAW0Oq.js';
5
5
  import { AgentProfile as AgentProfile$1 } from '@tangle-network/agent-interface';
6
6
  import '@tangle-network/agent-eval';
7
7
  import './types-BwoZWq-i.js';