@tangle-network/agent-runtime 0.94.5 → 0.94.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/agent.d.ts +1 -1
  2. package/dist/agent.js +4 -4
  3. package/dist/{agentic-generator-CL1q0H91.d.ts → agentic-generator-1g7GDba7.d.ts} +73 -6
  4. package/dist/analyst-loop.d.ts +1 -1
  5. package/dist/analyst-loop.js +2 -2
  6. package/dist/candidate-execution/index.d.ts +39 -4
  7. package/dist/candidate-execution/index.js +8 -2
  8. package/dist/{chunk-MZH4HORF.js → chunk-5BT2NMML.js} +689 -3
  9. package/dist/chunk-5BT2NMML.js.map +1 -0
  10. package/dist/{chunk-GKZ6DFDN.js → chunk-7HH22XN4.js} +105 -27
  11. package/dist/chunk-7HH22XN4.js.map +1 -0
  12. package/dist/{chunk-JMT5VYY3.js → chunk-7NCP74SL.js} +174 -48
  13. package/dist/chunk-7NCP74SL.js.map +1 -0
  14. package/dist/{chunk-WQA5Y6PD.js → chunk-EP6RVHMX.js} +3 -3
  15. package/dist/chunk-EP6RVHMX.js.map +1 -0
  16. package/dist/{chunk-LWNMCOEA.js → chunk-FRXDOBFP.js} +3 -3
  17. package/dist/chunk-GHXW56PO.js +526 -0
  18. package/dist/chunk-GHXW56PO.js.map +1 -0
  19. package/dist/{chunk-KHLE3C5G.js → chunk-HKMKUESZ.js} +169 -50
  20. package/dist/chunk-HKMKUESZ.js.map +1 -0
  21. package/dist/{chunk-63TIZHMI.js → chunk-KYPVUEJ4.js} +4 -4
  22. package/dist/{chunk-FVJ7M3DA.js → chunk-M22PL4GH.js} +1 -1
  23. package/dist/chunk-M22PL4GH.js.map +1 -0
  24. package/dist/{chunk-4VMRCEI6.js → chunk-MSUWXCHD.js} +2 -2
  25. package/dist/{chunk-ZQZX77MM.js → chunk-QDSOD7RC.js} +2 -2
  26. package/dist/{chunk-RNWDH5Z3.js → chunk-TNUBPPZA.js} +2 -2
  27. package/dist/{completion-gate-CfX2thvL.d.ts → completion-gate-tzwyyD-E.d.ts} +2 -2
  28. package/dist/{coordination-pOGZuYS7.d.ts → coordination-o0TzS7Ms.d.ts} +5 -5
  29. package/dist/environment-provider.d.ts +2 -2
  30. package/dist/{improve-Ciuvu2jh.d.ts → improve-DZeatcs7.d.ts} +19 -8
  31. package/dist/index.d.ts +22 -19
  32. package/dist/index.js +45 -22
  33. package/dist/index.js.map +1 -1
  34. package/dist/intelligence.d.ts +7 -7
  35. package/dist/intelligence.js +42 -18
  36. package/dist/intelligence.js.map +1 -1
  37. package/dist/knowledge.d.ts +7 -7
  38. package/dist/knowledge.js +4 -4
  39. package/dist/lifecycle.d.ts +3 -3
  40. package/dist/lifecycle.js +2 -2
  41. package/dist/{local-harness-CePtFrwu.d.ts → local-harness-ZLMkKdZc.d.ts} +1 -1
  42. package/dist/{loop-runner-bin-B4PwjVaF.d.ts → loop-runner-bin-iTSxSmpv.d.ts} +2 -2
  43. package/dist/loop-runner-bin.d.ts +6 -6
  44. package/dist/loop-runner-bin.js +6 -6
  45. package/dist/loops.d.ts +36 -23
  46. package/dist/loops.js +4 -4
  47. package/dist/mcp/bin.js +3 -3
  48. package/dist/mcp/index.d.ts +10 -10
  49. package/dist/mcp/index.js +5 -5
  50. package/dist/{mcp-serve-verifier-D7hCZIkT.d.ts → mcp-serve-verifier-BO4MEsR3.d.ts} +1 -1
  51. package/dist/{openai-tools-BMOu1t3A.d.ts → openai-tools-0wACz8f8.d.ts} +1 -1
  52. package/dist/{prepare-BKxAiUcH.d.ts → prepare-DIeVgQG3.d.ts} +1 -1
  53. package/dist/profiles.d.ts +1 -1
  54. package/dist/{sanitize-Dr3SliRC.d.ts → sanitize-Dcbjp0tU.d.ts} +1 -1
  55. package/dist/{supervise-Y3w878fN.d.ts → supervise-CRwaJIkd.d.ts} +4 -4
  56. package/dist/{types-Kjr5W6OF.d.ts → types-CKmyZ9TP.d.ts} +4 -7
  57. package/dist/{types-DHLXdLVN.d.ts → types-CogNCaw7.d.ts} +1 -1
  58. package/dist/{worktree-fanout-DmBvR-_O.d.ts → worktree-fanout-BJy24LYe.d.ts} +4 -4
  59. package/package.json +6 -4
  60. package/dist/chunk-4WWSICFY.js +0 -210
  61. package/dist/chunk-4WWSICFY.js.map +0 -1
  62. package/dist/chunk-FVJ7M3DA.js.map +0 -1
  63. package/dist/chunk-GKZ6DFDN.js.map +0 -1
  64. package/dist/chunk-JMT5VYY3.js.map +0 -1
  65. package/dist/chunk-KHLE3C5G.js.map +0 -1
  66. package/dist/chunk-MZH4HORF.js.map +0 -1
  67. package/dist/chunk-WQA5Y6PD.js.map +0 -1
  68. /package/dist/{chunk-LWNMCOEA.js.map → chunk-FRXDOBFP.js.map} +0 -0
  69. /package/dist/{chunk-63TIZHMI.js.map → chunk-KYPVUEJ4.js.map} +0 -0
  70. /package/dist/{chunk-4VMRCEI6.js.map → chunk-MSUWXCHD.js.map} +0 -0
  71. /package/dist/{chunk-ZQZX77MM.js.map → chunk-QDSOD7RC.js.map} +0 -0
  72. /package/dist/{chunk-RNWDH5Z3.js.map → chunk-TNUBPPZA.js.map} +0 -0
package/dist/agent.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _tangle_network_agent_eval from '@tangle-network/agent-eval';
2
2
  import { TraceAnalystKindSpec, AnalystFinding } from '@tangle-network/agent-eval';
3
3
  import { A as ArtifactKind, C as CandidateGenerator, P as PromotionGate } from './generator-YkAQrOoD.js';
4
- import { a as RuntimeStreamEvent, S as SandboxClient, c as OutputAdapter, d as AgentRunSpec } from './types-Kjr5W6OF.js';
4
+ import { a as RuntimeStreamEvent, S as SandboxClient, c as OutputAdapter, d as AgentRunSpec } from './types-CKmyZ9TP.js';
5
5
  import { A as AgentSurfaces } from './improvement-adapter-BieWeK5J.js';
6
6
  export { C as CreateSurfaceImprovementAdapterOpts, D as DraftPatchInput, a as DraftPatchOutput, R as ResolvedSurface, S as SurfaceImprovementEdit, b as SurfaceValidationIssue, c as createSurfaceImprovementAdapter, r as renderSurfaceIssues, d as resolveSubjectPath, v as validateSurfaces } from './improvement-adapter-BieWeK5J.js';
7
7
  import { K as KnowledgeAdapter, a as RunAnalystLoopResult } from './types-BC3bZpH0.js';
package/dist/agent.js CHANGED
@@ -1,7 +1,7 @@
1
- import "./chunk-GKZ6DFDN.js";
1
+ import "./chunk-7HH22XN4.js";
2
2
  import {
3
3
  createSandboxForSpec
4
- } from "./chunk-LWNMCOEA.js";
4
+ } from "./chunk-FRXDOBFP.js";
5
5
  import "./chunk-DPEUKJRO.js";
6
6
  import "./chunk-ISTDY47H.js";
7
7
  import "./chunk-WIPGQ4GT.js";
@@ -9,8 +9,8 @@ import "./chunk-VSWBYWFK.js";
9
9
  import "./chunk-3MDZX7YU.js";
10
10
  import {
11
11
  mapSandboxEvent
12
- } from "./chunk-FVJ7M3DA.js";
13
- import "./chunk-WQA5Y6PD.js";
12
+ } from "./chunk-M22PL4GH.js";
13
+ import "./chunk-EP6RVHMX.js";
14
14
  import {
15
15
  ValidationError
16
16
  } from "./chunk-YEJR7IXO.js";
@@ -1,5 +1,6 @@
1
- import { AnalystFinding } from '@tangle-network/agent-eval';
2
- import { L as LocalHarness, r as runLocalHarness } from './local-harness-CePtFrwu.js';
1
+ import { AnalystFinding, CostLedger, MaximumCharge } from '@tangle-network/agent-eval';
2
+ import { AgentProfile, ReasoningEffort } from '@tangle-network/agent-interface';
3
+ import { L as LocalHarness, C as CodexTokenUsage, a as CodexExecutionEvidence, r as runLocalHarness } from './local-harness-ZLMkKdZc.js';
3
4
  import { LabeledScenarioStore, WorktreeAdapter, SurfaceProposer } from '@tangle-network/agent-eval/campaign';
4
5
 
5
6
  /**
@@ -42,7 +43,7 @@ interface CandidateGenerator {
42
43
  * for a guaranteed no-op. Default `false`. */
43
44
  proposesWithoutFindings?: boolean;
44
45
  generate(args: {
45
- /** The candidate worktree — a fresh checkout of baseRef. Write changes here. */
46
+ /** The candidate worktree — a clean checkout of the current incumbent. */
46
47
  worktreePath: string;
47
48
  /** Phase-2 research report (analyst findings + diff), opaque. */
48
49
  report: unknown;
@@ -54,6 +55,13 @@ interface CandidateGenerator {
54
55
  * reflective generator ignores it). */
55
56
  maxShots: number;
56
57
  signal: AbortSignal;
58
+ /** Improvement-loop coordinates. Present when called through improvementDriver. */
59
+ generation?: number;
60
+ candidateIndex?: number;
61
+ /** Shared run-wide paid-call account supplied by agent-eval 0.117+. */
62
+ costLedger?: CostLedger;
63
+ /** Receipt attribution phase supplied alongside `costLedger`. */
64
+ costPhase?: string;
57
65
  }): Promise<{
58
66
  applied: boolean;
59
67
  summary: string;
@@ -62,11 +70,12 @@ interface CandidateGenerator {
62
70
  interface ImprovementDriverOptions {
63
71
  worktree: WorktreeAdapter;
64
72
  generator: CandidateGenerator;
65
- /** Base ref candidate worktrees fork from. Default `main`. */
73
+ /** Root ref for first-generation/direct callers. Default `main`.
74
+ * Later code generations retain the incumbent's original root. */
66
75
  baseRef?: string;
67
76
  }
68
77
  interface ManagedImprovementDriver extends SurfaceProposer<AnalystFinding> {
69
- /** Remove every finalized candidate except explicitly retained winners. */
78
+ /** Remove every owned candidate except explicitly retained finalized winners. */
70
79
  cleanup(retainWorktreeRefs?: readonly string[]): Promise<void>;
71
80
  }
72
81
  /** The one reflective/agentic improvement proposer (`SurfaceProposer`): owns the candidate worktree lifecycle and delegates HOW a change is produced to a pluggable `CandidateGenerator`. */
@@ -106,6 +115,9 @@ declare function improvementDriver(opts: ImprovementDriverOptions): ManagedImpro
106
115
  * @experimental
107
116
  */
108
117
 
118
+ /** Dedicated ephemeral root for generic author-profile files. Every declared
119
+ * file must live below this root so cleanup cannot alter candidate-owned files. */
120
+ declare const AGENTIC_PROFILE_RESOURCE_ROOT = ".agent-runtime-profile-resources";
109
121
  /** Outcome of verifying a candidate worktree. `feedback` (compiler errors,
110
122
  * failing test output) is fed into the next shot when `ok` is false. */
111
123
  interface VerifyResult {
@@ -116,9 +128,64 @@ interface VerifyResult {
116
128
  * (a candidate that fails verification returns `{ok:false}`, it does not
117
129
  * throw). */
118
130
  type Verifier = (worktreePath: string) => Promise<VerifyResult> | VerifyResult;
131
+ interface AgenticGeneratorShotReceipt {
132
+ readonly schemaVersion: 1;
133
+ readonly generation: number | null;
134
+ readonly candidateIndex: number | null;
135
+ /** One-based shot number within this candidate. */
136
+ readonly shot: number;
137
+ readonly maxShots: number;
138
+ readonly harness: LocalHarness;
139
+ readonly model: string | null;
140
+ readonly reasoningEffort: ReasoningEffort | null;
141
+ readonly promptSha256: `sha256:${string}`;
142
+ readonly startedAt: string;
143
+ readonly completedAt: string;
144
+ readonly durationMs: number;
145
+ readonly exitCode: number | null;
146
+ readonly timedOut: boolean;
147
+ readonly killedBySignal: NodeJS.Signals | null;
148
+ readonly stdoutBytes: number | null;
149
+ readonly stdoutSha256: `sha256:${string}` | null;
150
+ readonly stderrBytes: number | null;
151
+ readonly stderrSha256: `sha256:${string}` | null;
152
+ readonly usage: CodexTokenUsage | null;
153
+ /** Digest of the exact profile-file workspace plan applied for this shot. */
154
+ readonly profileWorkspacePlanDigest: string | null;
155
+ readonly profileWorkspaceFileCount: number;
156
+ /** Shared run-ledger call id for this exact shot. */
157
+ readonly costCallId: string | null;
158
+ /** Whether dollars came from the provider, the pricing table, or are unknown. */
159
+ readonly costBasis: 'provider-reported' | 'estimated-pricing' | 'unknown';
160
+ readonly costUsd: number | null;
161
+ /** True only for a provider-reported amount, never for a pricing estimate. */
162
+ readonly costUsdKnown: boolean;
163
+ readonly evidence: CodexExecutionEvidence | null;
164
+ readonly error: {
165
+ readonly name: string;
166
+ readonly message: string;
167
+ } | null;
168
+ }
119
169
  interface AgenticGeneratorOptions {
120
170
  /** Local coding harness to run in the worktree. Default `claude`. */
121
171
  harness?: LocalHarness;
172
+ /** Author profile rendered through the canonical harness mapper. Required
173
+ * for reproducible Codex so model and reasoning settings are explicit. */
174
+ profile?: AgentProfile;
175
+ /** Run Codex with isolated configuration, exact prompt evidence, and required
176
+ * terminal token usage. Requires `harness: 'codex'` and `profile`. */
177
+ codexReproducible?: boolean;
178
+ /** Absolute paths reproducible Codex must not read. A function can derive
179
+ * candidate-specific paths after the driver creates its worktree. */
180
+ codexReadDeniedPaths?: ReadonlyArray<string> | ((worktreePath: string) => ReadonlyArray<string>);
181
+ /** Awaited once for every attempted author shot, including process failures.
182
+ * Throwing aborts the candidate so receipt persistence can fail closed. */
183
+ onShotCompleted?: (receipt: AgenticGeneratorShotReceipt) => void | Promise<void>;
184
+ /** Optional hard upper bound passed to the run-wide CostLedger before each
185
+ * author shot. This MUST be enforced by the provider or executor; a planning
186
+ * estimate is not an admissible bound. Omit for an uncapped ledger. A capped
187
+ * ledger rejects before model dispatch when this is absent. */
188
+ maximumCharge?: MaximumCharge;
122
189
  /** Per-shot wall-clock timeout (ms). Default = `runLocalHarness` default (5m). */
123
190
  timeoutMs?: number;
124
191
  /** Build the harness task prompt from the report + findings. Override for
@@ -148,4 +215,4 @@ declare function agenticGenerator(opts?: AgenticGeneratorOptions): CandidateGene
148
215
  * silent fallback). */
149
216
  declare function commandVerifier(command: string, args?: string[], timeoutMs?: number): Verifier;
150
217
 
151
- export { type AgenticGeneratorOptions as A, type CandidateGenerator as C, type ImprovementDriverOptions as I, type ManagedImprovementDriver as M, type Verifier as V, type VerifyResult as a, agenticGenerator as b, commandVerifier as c, improvementDriver as i };
218
+ export { AGENTIC_PROFILE_RESOURCE_ROOT as A, type CandidateGenerator as C, type ImprovementDriverOptions as I, type ManagedImprovementDriver as M, type Verifier as V, type AgenticGeneratorOptions as a, type AgenticGeneratorShotReceipt as b, type VerifyResult as c, agenticGenerator as d, commandVerifier as e, improvementDriver as i };
@@ -1,5 +1,5 @@
1
1
  import { TraceAnalystByteBudgets, TraceAnalysisStore } from '@tangle-network/agent-eval';
2
- import { I as Iteration } from './types-Kjr5W6OF.js';
2
+ import { I as Iteration } from './types-CKmyZ9TP.js';
3
3
  import { R as RunAnalystLoopOpts, a as RunAnalystLoopResult } from './types-BC3bZpH0.js';
4
4
  export { A as AnalystLoopEvent, b as AnalystRegistryLike, c as AnalystRegistryStreamingLike, d as AutoApplyPolicy, F as FindingsStoreLike, I as ImprovementAdapter, e as ImprovementEditBatch, f as ImprovementReport, K as KnowledgeAdapter, g as KnowledgeProposalBatch, h as KnowledgeReport } from './types-BC3bZpH0.js';
5
5
  import '@tangle-network/sandbox';
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  iterationsToTraceStore,
3
3
  runAnalystLoop
4
- } from "./chunk-ZQZX77MM.js";
5
- import "./chunk-FVJ7M3DA.js";
4
+ } from "./chunk-QDSOD7RC.js";
5
+ import "./chunk-M22PL4GH.js";
6
6
  import "./chunk-YEJR7IXO.js";
7
7
  import "./chunk-DGUM43GV.js";
8
8
  export {
@@ -1,7 +1,7 @@
1
1
  import { CodeSurface } from '@tangle-network/agent-eval/campaign';
2
- import { AgentCandidateCodeDisabled, AgentCandidateCodeNoOp, AgentCandidateGitHubRepository, AgentProfile, AgentProfileDiff, AgentCandidateProfile, AgentCandidateExecution, AgentCandidateKnowledge, AgentCandidateMemoryPolicy, AgentCandidateLineage, Sha256Digest, AgentCandidateArtifactRef } from '@tangle-network/agent-interface';
3
- import { a9 as sealAgentCandidateBundle, a0 as PreparedAgentCandidateExecution, j as AgentCandidateExecutionClaim, l as AgentCandidateExecutionClaimStore, k as AgentCandidateExecutionClaimResult, i as AgentCandidateExecutionAttemptRef, h as AgentCandidateExecutionAttemptRecord, p as AgentCandidateExecutionLease, r as AgentCandidateExecutionPhaseResult, v as AgentCandidateExecutionTerminalResult, t as AgentCandidateExecutionStageResult, o as AgentCandidateExecutionFinishResult, s as AgentCandidateExecutionRecoveryEvidence, M as AgentCandidateOutputArtifactPort, N as AgentCandidateOutputPurpose, L as AgentCandidateModelPort, R as AgentCandidateProtectedModelReservation, O as AgentCandidateProtectedModelActivation, S as AgentCandidateProtectedModelSettlement, z as AgentCandidateExecutorPort, b as AgentCandidateExecutionPorts, W as AgentCandidateVerificationPorts, a5 as VerifiedAgentCandidate } from '../prepare-BKxAiUcH.js';
4
- export { d as AgentCandidateArtifactPort, e as AgentCandidateBenchmarkGraderIdentity, f as AgentCandidateBenchmarkGraderPort, A as AgentCandidateBundleInput, g as AgentCandidateContainerPort, m as AgentCandidateExecutionCleanupHandles, n as AgentCandidateExecutionFailureClass, q as AgentCandidateExecutionPhase, u as AgentCandidateExecutionTerminalRecord, w as AgentCandidateExecutionUsage, x as AgentCandidateExecutorFinalCapture, y as AgentCandidateExecutorMemoryCapture, B as AgentCandidateExecutorProfileFile, C as AgentCandidateExecutorRequest, D as AgentCandidateExecutorStopRequest, F as AgentCandidateExecutorTaskOutcomeCapture, G as AgentCandidateExecutorWorkspaceFile, H as AgentCandidateExecutorWorkspaceInput, I as AgentCandidateMemoryPort, J as AgentCandidateMemoryResetResult, K as AgentCandidateModelLimits, Q as AgentCandidateProtectedModelCall, T as AgentCandidateProtectedRunCapture, U as AgentCandidateRepositoryPort, V as AgentCandidateRetryRejection, c as AgentCandidateRunFinalization, a as AgentCandidateTaskExecution, X as AgentCandidateWorkspacePort, Y as CANDIDATE_TRACE_ENV, Z as CANDIDATE_TRACE_TAGS, _ as CanonicalCandidateDocument, E as ExecutePreparedAgentCandidateOptions, $ as InMemoryAgentCandidateExecutionClaimStore, P as PrepareAgentCandidateExecutionOptions, a1 as PreparedAgentCandidateInstruction, a2 as PreparedAgentCandidateLaunch, a3 as PreparedAgentCandidateTrace, a4 as ResolvedAgentCandidateContainer, a6 as VerifiedAgentCandidateTaskOutcome, a7 as executePreparedAgentCandidate, a8 as prepareAgentCandidateExecution } from '../prepare-BKxAiUcH.js';
2
+ import { AgentCandidateCodeDisabled, AgentCandidateCodeNoOp, AgentCandidateGitHubRepository, AgentProfile, AgentProfileDiff, AgentCandidateProfile, AgentCandidateExecution, AgentCandidateKnowledge, AgentCandidateMemoryPolicy, AgentCandidateLineage, Sha256Digest, AgentCandidateArtifactRef, AgentCandidateWorkspaceSnapshotEvidence } from '@tangle-network/agent-interface';
3
+ import { a9 as sealAgentCandidateBundle, a0 as PreparedAgentCandidateExecution, j as AgentCandidateExecutionClaim, l as AgentCandidateExecutionClaimStore, k as AgentCandidateExecutionClaimResult, i as AgentCandidateExecutionAttemptRef, h as AgentCandidateExecutionAttemptRecord, p as AgentCandidateExecutionLease, r as AgentCandidateExecutionPhaseResult, v as AgentCandidateExecutionTerminalResult, t as AgentCandidateExecutionStageResult, o as AgentCandidateExecutionFinishResult, s as AgentCandidateExecutionRecoveryEvidence, M as AgentCandidateOutputArtifactPort, N as AgentCandidateOutputPurpose, L as AgentCandidateModelPort, R as AgentCandidateProtectedModelReservation, O as AgentCandidateProtectedModelActivation, S as AgentCandidateProtectedModelSettlement, z as AgentCandidateExecutorPort, b as AgentCandidateExecutionPorts, W as AgentCandidateVerificationPorts, a5 as VerifiedAgentCandidate, G as AgentCandidateExecutorWorkspaceFile, X as AgentCandidateWorkspacePort } from '../prepare-DIeVgQG3.js';
4
+ export { d as AgentCandidateArtifactPort, e as AgentCandidateBenchmarkGraderIdentity, f as AgentCandidateBenchmarkGraderPort, A as AgentCandidateBundleInput, g as AgentCandidateContainerPort, m as AgentCandidateExecutionCleanupHandles, n as AgentCandidateExecutionFailureClass, q as AgentCandidateExecutionPhase, u as AgentCandidateExecutionTerminalRecord, w as AgentCandidateExecutionUsage, x as AgentCandidateExecutorFinalCapture, y as AgentCandidateExecutorMemoryCapture, B as AgentCandidateExecutorProfileFile, C as AgentCandidateExecutorRequest, D as AgentCandidateExecutorStopRequest, F as AgentCandidateExecutorTaskOutcomeCapture, H as AgentCandidateExecutorWorkspaceInput, I as AgentCandidateMemoryPort, J as AgentCandidateMemoryResetResult, K as AgentCandidateModelLimits, Q as AgentCandidateProtectedModelCall, T as AgentCandidateProtectedRunCapture, U as AgentCandidateRepositoryPort, V as AgentCandidateRetryRejection, c as AgentCandidateRunFinalization, a as AgentCandidateTaskExecution, Y as CANDIDATE_TRACE_ENV, Z as CANDIDATE_TRACE_TAGS, _ as CanonicalCandidateDocument, E as ExecutePreparedAgentCandidateOptions, $ as InMemoryAgentCandidateExecutionClaimStore, P as PrepareAgentCandidateExecutionOptions, a1 as PreparedAgentCandidateInstruction, a2 as PreparedAgentCandidateLaunch, a3 as PreparedAgentCandidateTrace, a4 as ResolvedAgentCandidateContainer, a6 as VerifiedAgentCandidateTaskOutcome, a7 as executePreparedAgentCandidate, a8 as prepareAgentCandidateExecution } from '../prepare-DIeVgQG3.js';
5
5
  import { TraceStore } from '@tangle-network/agent-eval';
6
6
 
7
7
  /** A complete profile that can be frozen without losing behavior. */
@@ -152,4 +152,39 @@ declare function recoverExpiredAgentCandidateExecution(options: RecoverExpiredAg
152
152
  /** Verifies every digest, resource, workspace, and Git object in a candidate bundle. */
153
153
  declare function verifyAgentCandidateBundle(input: unknown, ports: AgentCandidateVerificationPorts): Promise<VerifiedAgentCandidate>;
154
154
 
155
- export { type AgentCandidateCodeSource, type AgentCandidateCodeSurfaceSource, AgentCandidateExecutionAttemptRecord, AgentCandidateExecutionAttemptRef, AgentCandidateExecutionClaim, AgentCandidateExecutionClaimResult, AgentCandidateExecutionClaimStore, AgentCandidateExecutionFinishResult, AgentCandidateExecutionLease, AgentCandidateExecutionPhaseResult, AgentCandidateExecutionPorts, AgentCandidateExecutionRecoveryEvidence, AgentCandidateExecutionStageResult, AgentCandidateExecutionTerminalResult, AgentCandidateExecutorPort, type AgentCandidateModelGrantActivateInput, type AgentCandidateModelGrantClient, type AgentCandidateModelGrantReservation, type AgentCandidateModelGrantReserveInput, type AgentCandidateModelGrantSettleInput, AgentCandidateModelPort, AgentCandidateOutputArtifactPort, AgentCandidateOutputPurpose, type AgentCandidateProfileSource, AgentCandidateProtectedModelActivation, AgentCandidateProtectedModelReservation, AgentCandidateProtectedModelSettlement, AgentCandidateVerificationPorts, type BuildAgentCandidateBundleInput, type CreateProtectedAgentCandidateModelPortOptions, type DisposePreparedAgentCandidateOptions, FileAgentCandidateExecutionClaimStore, type FileAgentCandidateExecutionClaimStoreOptions, PreparedAgentCandidateExecution, type RecoverExpiredAgentCandidateOptions, VerifiedAgentCandidate, applyExactAgentProfileDiff, buildAgentCandidateBundle, candidateExecutionClaim, createProtectedAgentCandidateModelPort, disposePreparedAgentCandidateExecution, parseExactAgentProfile, parseExactAgentProfileDiff, persistCandidateOutputArtifact, recoverExpiredAgentCandidateExecution, sealAgentCandidateBundle, verifyAgentCandidateBundle };
155
+ interface AgentCandidateWorkspaceArchiveLimits {
156
+ maxArchiveBytes: number;
157
+ maxEmbeddedArtifactBytes: number;
158
+ maxFiles: number;
159
+ maxFileBytes: number;
160
+ maxTotalFileBytes: number;
161
+ maxPathBytes: number;
162
+ maxRepositoryBundleBytes: number;
163
+ }
164
+ interface CaptureAgentCandidateWorkspaceOptions {
165
+ /** Include Git HEAD so task preparation can prove its exact commit and tree. */
166
+ includeRepository?: boolean;
167
+ limits?: Partial<AgentCandidateWorkspaceArchiveLimits>;
168
+ /** Use the evaluator-owned artifact store when manifest or archive bytes should not be embedded. */
169
+ artifactPersistence?: {
170
+ executionId: string;
171
+ outputArtifacts: AgentCandidateOutputArtifactPort;
172
+ signal?: AbortSignal;
173
+ };
174
+ }
175
+ interface CreateAgentCandidateWorkspacePortOptions {
176
+ limits?: Partial<AgentCandidateWorkspaceArchiveLimits>;
177
+ }
178
+ interface CapturedAgentCandidateWorkspace {
179
+ readonly snapshot: AgentCandidateWorkspaceSnapshotEvidence;
180
+ /** Caller-owned bytes accepted by createAgentCandidateWorkspacePort. */
181
+ readonly archive: Uint8Array;
182
+ }
183
+ /** Capture one exact regular-file workspace for immutable candidate execution. */
184
+ declare function captureAgentCandidateWorkspace(rootInput: string, options?: CaptureAgentCandidateWorkspaceOptions): Promise<CapturedAgentCandidateWorkspace>;
185
+ /** Capture detached files returned by a remote executor into the standard archive. */
186
+ declare function captureAgentCandidateWorkspaceFiles(input: readonly AgentCandidateExecutorWorkspaceFile[], options?: Omit<CaptureAgentCandidateWorkspaceOptions, 'includeRepository'>): Promise<CapturedAgentCandidateWorkspace>;
187
+ /** Create the standard bounded materializer for candidate execution ports. */
188
+ declare function createAgentCandidateWorkspacePort(options?: CreateAgentCandidateWorkspacePortOptions): AgentCandidateWorkspacePort;
189
+
190
+ export { type AgentCandidateCodeSource, type AgentCandidateCodeSurfaceSource, AgentCandidateExecutionAttemptRecord, AgentCandidateExecutionAttemptRef, AgentCandidateExecutionClaim, AgentCandidateExecutionClaimResult, AgentCandidateExecutionClaimStore, AgentCandidateExecutionFinishResult, AgentCandidateExecutionLease, AgentCandidateExecutionPhaseResult, AgentCandidateExecutionPorts, AgentCandidateExecutionRecoveryEvidence, AgentCandidateExecutionStageResult, AgentCandidateExecutionTerminalResult, AgentCandidateExecutorPort, AgentCandidateExecutorWorkspaceFile, type AgentCandidateModelGrantActivateInput, type AgentCandidateModelGrantClient, type AgentCandidateModelGrantReservation, type AgentCandidateModelGrantReserveInput, type AgentCandidateModelGrantSettleInput, AgentCandidateModelPort, AgentCandidateOutputArtifactPort, AgentCandidateOutputPurpose, type AgentCandidateProfileSource, AgentCandidateProtectedModelActivation, AgentCandidateProtectedModelReservation, AgentCandidateProtectedModelSettlement, AgentCandidateVerificationPorts, type AgentCandidateWorkspaceArchiveLimits, AgentCandidateWorkspacePort, type BuildAgentCandidateBundleInput, type CaptureAgentCandidateWorkspaceOptions, type CapturedAgentCandidateWorkspace, type CreateAgentCandidateWorkspacePortOptions, type CreateProtectedAgentCandidateModelPortOptions, type DisposePreparedAgentCandidateOptions, FileAgentCandidateExecutionClaimStore, type FileAgentCandidateExecutionClaimStoreOptions, PreparedAgentCandidateExecution, type RecoverExpiredAgentCandidateOptions, VerifiedAgentCandidate, applyExactAgentProfileDiff, buildAgentCandidateBundle, candidateExecutionClaim, captureAgentCandidateWorkspace, captureAgentCandidateWorkspaceFiles, createAgentCandidateWorkspacePort, createProtectedAgentCandidateModelPort, disposePreparedAgentCandidateExecution, parseExactAgentProfile, parseExactAgentProfileDiff, persistCandidateOutputArtifact, recoverExpiredAgentCandidateExecution, sealAgentCandidateBundle, verifyAgentCandidateBundle };
@@ -1,10 +1,13 @@
1
1
  import {
2
2
  FileAgentCandidateExecutionClaimStore,
3
3
  buildAgentCandidateBundle,
4
+ captureAgentCandidateWorkspace,
5
+ captureAgentCandidateWorkspaceFiles,
6
+ createAgentCandidateWorkspacePort,
4
7
  createProtectedAgentCandidateModelPort,
5
8
  disposePreparedAgentCandidateExecution,
6
9
  recoverExpiredAgentCandidateExecution
7
- } from "../chunk-MZH4HORF.js";
10
+ } from "../chunk-5BT2NMML.js";
8
11
  import {
9
12
  CANDIDATE_TRACE_ENV,
10
13
  CANDIDATE_TRACE_TAGS,
@@ -18,7 +21,7 @@ import {
18
21
  prepareAgentCandidateExecution,
19
22
  sealAgentCandidateBundle,
20
23
  verifyAgentCandidateBundle
21
- } from "../chunk-KHLE3C5G.js";
24
+ } from "../chunk-HKMKUESZ.js";
22
25
  import "../chunk-WIPGQ4GT.js";
23
26
  import "../chunk-3MDZX7YU.js";
24
27
  import "../chunk-DGUM43GV.js";
@@ -30,6 +33,9 @@ export {
30
33
  applyExactAgentProfileDiff,
31
34
  buildAgentCandidateBundle,
32
35
  candidateExecutionClaim,
36
+ captureAgentCandidateWorkspace,
37
+ captureAgentCandidateWorkspaceFiles,
38
+ createAgentCandidateWorkspacePort,
33
39
  createProtectedAgentCandidateModelPort,
34
40
  disposePreparedAgentCandidateExecution,
35
41
  executePreparedAgentCandidate,