@tangle-network/agent-runtime 0.197.1 → 0.198.2

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 (103) hide show
  1. package/README.md +1 -2
  2. package/dist/{improve-DZs0KXhK.d.ts → activation-DFRTurvU.d.ts} +99 -5
  3. package/dist/{activation-BxMZybuo.js → activation-IBEVN3VI.js} +2 -2
  4. package/dist/{activation-BxMZybuo.js.map → activation-IBEVN3VI.js.map} +1 -1
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/agent.js +2 -2
  7. package/dist/candidate-execution/index.d.ts +370 -2
  8. package/dist/candidate-execution/index.js +828 -4
  9. package/dist/candidate-execution/index.js.map +1 -0
  10. package/dist/{coordination-driver-zkCrfEbS.js → coordination-driver-NFvZ5ofi.js} +57 -26
  11. package/dist/coordination-driver-NFvZ5ofi.js.map +1 -0
  12. package/dist/{delegate-DHeUYU5E.js → delegate-dN5yooEj.js} +2 -2
  13. package/dist/{delegate-DHeUYU5E.js.map → delegate-dN5yooEj.js.map} +1 -1
  14. package/dist/durable.d.ts +2 -2
  15. package/dist/durable.js +4 -5
  16. package/dist/durable.js.map +1 -1
  17. package/dist/{graph-51SJOEcw.js → graph-CgCVtMuz.js} +3 -3
  18. package/dist/{graph-51SJOEcw.js.map → graph-CgCVtMuz.js.map} +1 -1
  19. package/dist/{improvement-cycle-Tw5nYT5R.js → improvement-cycle-Cfu6kDOs.js} +8 -10
  20. package/dist/{improvement-cycle-Tw5nYT5R.js.map → improvement-cycle-Cfu6kDOs.js.map} +1 -1
  21. package/dist/{index-CYOJsxSg.d.ts → index-CMTUgh-T.d.ts} +9 -11
  22. package/dist/index.d.ts +694 -16
  23. package/dist/index.js +1780 -17
  24. package/dist/index.js.map +1 -1
  25. package/dist/intelligence.d.ts +3 -7
  26. package/dist/intelligence.js +5 -6
  27. package/dist/intelligence.js.map +1 -1
  28. package/dist/kernel.d.ts +2 -5
  29. package/dist/kernel.js +8 -10
  30. package/dist/{loop-runner-bin-DwrSB04m.d.ts → loop-runner-bin-CAf1OQot.d.ts} +3 -3
  31. package/dist/{loop-runner-bin-2LQSjRTB.js → loop-runner-bin-WQniYJ8C.js} +3 -3
  32. package/dist/{loop-runner-bin-2LQSjRTB.js.map → loop-runner-bin-WQniYJ8C.js.map} +1 -1
  33. package/dist/loop-runner-bin.d.ts +1 -1
  34. package/dist/loop-runner-bin.js +1 -1
  35. package/dist/mcp/bin.js +3 -3
  36. package/dist/mcp/index.d.ts +2 -3
  37. package/dist/mcp/index.js +4 -5
  38. package/dist/mcp/index.js.map +1 -1
  39. package/dist/{prepare-DDGp0-rW.js → prepare-CAO1yXov.js} +2407 -2407
  40. package/dist/prepare-CAO1yXov.js.map +1 -0
  41. package/dist/{protected-model-port-DxFN8DLS.js → protected-model-port-B5avcRiQ.js} +2 -2
  42. package/dist/{protected-model-port-DxFN8DLS.js.map → protected-model-port-B5avcRiQ.js.map} +1 -1
  43. package/dist/{provision-supervisor-CpMMShE_.js → provision-supervisor-BxsIaJ35.js} +3 -6
  44. package/dist/{provision-supervisor-CpMMShE_.js.map → provision-supervisor-BxsIaJ35.js.map} +1 -1
  45. package/dist/{redact-Cbl2O-4N.js → redact-DqfB7oB4.js} +5233 -2526
  46. package/dist/redact-DqfB7oB4.js.map +1 -0
  47. package/dist/{runtime-BSFz2z7h.js → runtime-CHEtvaTY.js} +427 -23
  48. package/dist/runtime-CHEtvaTY.js.map +1 -0
  49. package/dist/{server-COXa19sp.js → server-ccGua5tH.js} +4 -4
  50. package/dist/{server-COXa19sp.js.map → server-ccGua5tH.js.map} +1 -1
  51. package/dist/{types-DFLZMaeh.d.ts → stream-agent-turn-CLOQr497.d.ts} +1986 -6
  52. package/dist/{structural-rollout-DPbZWgEm.js → structural-rollout-BmDuXyR9.js} +1101 -8
  53. package/dist/structural-rollout-BmDuXyR9.js.map +1 -0
  54. package/dist/{supervise-b93YUaka.js → supervise-DVt8-TI-.js} +9 -5
  55. package/dist/supervise-DVt8-TI-.js.map +1 -0
  56. package/dist/testing.d.ts +2 -2
  57. package/dist/testing.js +13 -13
  58. package/dist/tui/index.d.ts +1 -1
  59. package/dist/tui/index.js +1 -1
  60. package/dist/{workspace-archive-Ybomp7AN.js → workspace-archive-BMOnloFf.js} +3 -3
  61. package/dist/{workspace-archive-Ybomp7AN.js.map → workspace-archive-BMOnloFf.js.map} +1 -1
  62. package/package.json +1 -28
  63. package/dist/activation-DyWB0K6E.d.ts +0 -98
  64. package/dist/authored-code-URmkdgjv.js +0 -37
  65. package/dist/authored-code-URmkdgjv.js.map +0 -1
  66. package/dist/candidate-execution-nvqVIMyS.js +0 -829
  67. package/dist/candidate-execution-nvqVIMyS.js.map +0 -1
  68. package/dist/conversation-BxJ0SIBM.js +0 -1363
  69. package/dist/conversation-BxJ0SIBM.js.map +0 -1
  70. package/dist/conversation.d.ts +0 -2
  71. package/dist/conversation.js +0 -2
  72. package/dist/coordination-driver-zkCrfEbS.js.map +0 -1
  73. package/dist/environment-provider-1fKZh2zl.js +0 -2281
  74. package/dist/environment-provider-1fKZh2zl.js.map +0 -1
  75. package/dist/environment-provider-B-I2jlQy.d.ts +0 -143
  76. package/dist/environment-provider.d.ts +0 -2
  77. package/dist/environment-provider.js +0 -2
  78. package/dist/graph.d.ts +0 -753
  79. package/dist/graph.js +0 -2111
  80. package/dist/graph.js.map +0 -1
  81. package/dist/index-CUosKU4N.d.ts +0 -372
  82. package/dist/index-D9mb6fn2.d.ts +0 -691
  83. package/dist/index-ZnxSe6iK.d.ts +0 -138
  84. package/dist/jsonl-file-BEpaEYjT.js +0 -141
  85. package/dist/jsonl-file-BEpaEYjT.js.map +0 -1
  86. package/dist/knowledge-B_MsOtDG.js +0 -428
  87. package/dist/knowledge-B_MsOtDG.js.map +0 -1
  88. package/dist/knowledge.d.ts +0 -2
  89. package/dist/knowledge.js +0 -2
  90. package/dist/materialization-Cy0oM8tb.js +0 -672
  91. package/dist/materialization-Cy0oM8tb.js.map +0 -1
  92. package/dist/prepare-DDGp0-rW.js.map +0 -1
  93. package/dist/primeintellect/index.d.ts +0 -218
  94. package/dist/primeintellect/index.js +0 -739
  95. package/dist/primeintellect/index.js.map +0 -1
  96. package/dist/redact-Cbl2O-4N.js.map +0 -1
  97. package/dist/runtime-0xNaV6TJ.d.ts +0 -1699
  98. package/dist/runtime-BSFz2z7h.js.map +0 -1
  99. package/dist/stream-agent-turn-Dt5mZpc3.js +0 -1103
  100. package/dist/stream-agent-turn-Dt5mZpc3.js.map +0 -1
  101. package/dist/stream-agent-turn-urHpmO_Z.d.ts +0 -160
  102. package/dist/structural-rollout-DPbZWgEm.js.map +0 -1
  103. package/dist/supervise-b93YUaka.js.map +0 -1
@@ -1,372 +0,0 @@
1
- import { A as AgentCandidateWorkspacePort, C as AgentCandidateProtectedModelSettlement, F as PreparedAgentCandidateExecution, S as AgentCandidateProtectedModelReservation, V as VerifiedAgentCandidate, a as AgentCandidateExecutionPorts, b as AgentCandidateOutputPurpose, c as AgentCandidateExecutorPort, k as AgentCandidateVerificationPorts, p as AgentCandidateExecutorWorkspaceFile, v as AgentCandidateModelPort, x as AgentCandidateProtectedModelActivation, y as AgentCandidateOutputArtifactPort } from "./types-1s_29INY.js";
2
- import { C as AgentCandidateExecutionClaim, F as AgentCandidateExecutionTerminalResult, M as AgentCandidateExecutionRecoveryEvidence, N as AgentCandidateExecutionStageResult, O as AgentCandidateExecutionFinishResult, S as AgentCandidateExecutionAttemptRef, T as AgentCandidateExecutionClaimStore, i as AgentCandidateModelGrantReserveInput, j as AgentCandidateExecutionPhaseResult, k as AgentCandidateExecutionLease, t as AgentCandidateModelGrantActivateInput, w as AgentCandidateExecutionClaimResult, x as AgentCandidateExecutionAttemptRecord } from "./protected-model-port-BtXp2dUY.js";
3
- import { AgentCandidateArtifactRef, AgentCandidateBundle, AgentCandidateCapturedArtifact, AgentCandidateCodeDisabled, AgentCandidateCodeNoOp, AgentCandidateExecution, AgentCandidateGitHubRepository, AgentCandidateKnowledge, AgentCandidateMemoryPolicy, AgentCandidateProfile, AgentCandidateResolvedModel, AgentCandidateRunCell, AgentCandidateWorkspaceManifestMaterial, AgentCandidateWorkspaceSnapshotEvidence, AgentProfile, AgentProfileDiff, Sha256Digest } from "@tangle-network/agent-interface";
4
- import { TraceStore } from "@tangle-network/agent-eval";
5
- import { CodeSurface } from "@tangle-network/agent-eval/campaign";
6
- import { AgentEnvironmentProvider, AgentExactProcessResources } from "@tangle-network/agent-interface/environment-provider";
7
- //#region src/candidate-execution/artifacts.d.ts
8
- /** The per-scan caps a bounded capture applies. */
9
- interface WorkspaceScanLimits {
10
- readonly maxFiles: number;
11
- readonly maxFileBytes: number;
12
- readonly maxTotalFileBytes: number;
13
- }
14
- /** What a workspace scan reads and how it records a file's permission bits. */
15
- interface WorkspaceScanOptions {
16
- readonly ignoredProtectedRootEntries?: readonly ('.git' | '.sidecar')[];
17
- readonly limits?: WorkspaceScanLimits;
18
- /**
19
- * Record Git's two file modes instead of the filesystem's exact permission bits: `0o755` when
20
- * any execute bit is set, `0o644` otherwise. A checkout umask then cannot move a manifest
21
- * digest, while a real permission change still does.
22
- *
23
- * This is the normalization `readCandidateGitTreeFiles` already applies to a Git tree
24
- * (`100644`/`100755`), so one tree scanned from disk and the same tree read out of Git produce
25
- * the same manifest. Off by default: the flag changes the digest, so a capture and the verify
26
- * that checks it must agree on it.
27
- */
28
- readonly portableTree?: boolean;
29
- }
30
- /**
31
- * Refuse a materialized workspace whose files, modes, or bytes are not the signed manifest.
32
- *
33
- * The scan streams, so the size of the largest file does not decide whether the check can run, and
34
- * the refusal names the one mismatch a caller can produce on its own: a capture and a verify that
35
- * disagree about `portableTree`.
36
- */
37
- declare function verifyMaterializedWorkspace(root: string, expected: AgentCandidateWorkspaceManifestMaterial, options?: Omit<WorkspaceScanOptions, 'limits'>): Promise<void>;
38
- /**
39
- * The canonical manifest of one materialized workspace, read without holding any file.
40
- *
41
- * Every file is digested by streaming, so the size of the largest file does not decide whether the
42
- * workspace can be described. `FileHandle.readFile` refuses anything above 2 GiB with
43
- * `ERR_FS_FILE_TOO_LARGE`, which made a workspace holding one such artifact impossible to verify
44
- * against a manifest it already matched. The digest is sha-256 over the same bytes either way, so
45
- * a manifest a buffered read produced is reproduced exactly.
46
- */
47
- declare function scanMaterializedWorkspaceManifest(root: string, options?: WorkspaceScanOptions): Promise<AgentCandidateWorkspaceManifestMaterial>;
48
- /**
49
- * Build the canonical manifest for files a caller already holds — the shape a remote executor
50
- * returns. Pass `portableTree` to record Git's two file modes instead of exact permission bits, and
51
- * pass the same flag to every verify that reads the result.
52
- */
53
- declare function candidateWorkspaceManifest(files: ReadonlyArray<{
54
- path: string;
55
- mode: number;
56
- bytes: Uint8Array;
57
- }>, options?: {
58
- portableTree?: boolean;
59
- }): AgentCandidateWorkspaceManifestMaterial;
60
- //#endregion
61
- //#region src/candidate-execution/bundle.d.ts
62
- /** Exact candidate wire shape before the runtime computes its canonical digest. */
63
- type AgentCandidateBundleInput = Omit<AgentCandidateBundle, 'digest'>;
64
- /** Validate and content-address a candidate bundle before it crosses an approval boundary. */
65
- declare function sealAgentCandidateBundle(input: AgentCandidateBundleInput): AgentCandidateBundle;
66
- //#endregion
67
- //#region src/candidate-execution/builder.d.ts
68
- /** A complete profile that can be frozen without losing behavior. */
69
- type AgentCandidateProfileSource = {
70
- kind: 'profile';
71
- profile: AgentProfile;
72
- } | {
73
- kind: 'profile-diffs';
74
- base: AgentProfile;
75
- /** Applied in order before the resulting profile is frozen into the bundle. */
76
- diffs: readonly AgentProfileDiff[];
77
- } | {
78
- kind: 'candidate-profile';
79
- /** Already converted to the closed, secret-free candidate profile contract. */
80
- profile: AgentCandidateProfile;
81
- };
82
- /** The only accepted path from an agent-eval code candidate to executable bytes. */
83
- interface AgentCandidateCodeSurfaceSource {
84
- kind: 'code-surface';
85
- surface: CodeSurface;
86
- repository: AgentCandidateGitHubRepository;
87
- /** Optional parent directory used to resolve a relative `surface.worktreeRef`. */
88
- worktreeDir?: string;
89
- }
90
- /** Explicit control/no-op code or one finalized CodeSurface whose bytes must still verify. */
91
- type AgentCandidateCodeSource = AgentCandidateCodeDisabled | AgentCandidateCodeNoOp | AgentCandidateCodeSurfaceSource;
92
- /** Complete measured surfaces and execution policy compiled into one candidate bundle. */
93
- interface BuildAgentCandidateBundleInput {
94
- profile: AgentCandidateProfileSource;
95
- code: AgentCandidateCodeSource;
96
- execution: AgentCandidateExecution;
97
- knowledge?: AgentCandidateKnowledge;
98
- memory: AgentCandidateMemoryPolicy;
99
- }
100
- /**
101
- * Compile one measured profile/code candidate into the immutable execution
102
- * contract. Code bytes are re-read and verified by agent-eval before they are
103
- * embedded. The returned bundle is schema-validated, canonically digested, and
104
- * deeply immutable; call `verifyAgentCandidateBundle` at the execution boundary
105
- * to re-read external memory, repository, and workspace artifacts.
106
- */
107
- declare function buildAgentCandidateBundle(input: BuildAgentCandidateBundleInput): ReturnType<typeof sealAgentCandidateBundle>;
108
- //#endregion
109
- //#region src/candidate-execution/claim-file-store.d.ts
110
- interface FileAgentCandidateExecutionClaimStoreOptions {
111
- /** Evaluator-owned directory shared by every process allowed to execute candidates. */
112
- directory: string;
113
- /** Testable evaluator clock; defaults to `Date.now`. */
114
- now?: () => number;
115
- }
116
- /** Cross-process lifecycle implemented as fsynced, create-if-absent records. */
117
- declare class FileAgentCandidateExecutionClaimStore implements AgentCandidateExecutionClaimStore {
118
- private readonly directory;
119
- private readonly now;
120
- constructor(options: FileAgentCandidateExecutionClaimStoreOptions);
121
- tryClaim(requested: AgentCandidateExecutionClaim): Promise<AgentCandidateExecutionClaimResult>;
122
- getAttempt(requestedAttempt: AgentCandidateExecutionAttemptRef): Promise<AgentCandidateExecutionAttemptRecord | undefined>;
123
- markCandidateMayRun(requestedLease: AgentCandidateExecutionLease): Promise<AgentCandidateExecutionPhaseResult>;
124
- stageTerminal(requestedLease: AgentCandidateExecutionLease, result: AgentCandidateExecutionTerminalResult): Promise<AgentCandidateExecutionStageResult>;
125
- finish(requestedLease: AgentCandidateExecutionLease, requestedTerminalDigest: Sha256Digest): Promise<AgentCandidateExecutionFinishResult>;
126
- recoverExpired(requestedAttempt: AgentCandidateExecutionAttemptRef, evidence: AgentCandidateExecutionRecoveryEvidence): Promise<AgentCandidateExecutionFinishResult>;
127
- private storedAttempt;
128
- private transitionState;
129
- private retryFailure;
130
- private ownerPublication;
131
- private claimPath;
132
- private terminalPath;
133
- private transitionPath;
134
- }
135
- //#endregion
136
- //#region src/candidate-execution/dispose.d.ts
137
- interface DisposePreparedAgentCandidateOptions {
138
- cleanupTimeoutMs?: number;
139
- }
140
- /** Revoke reservations held by a prepared candidate that will not be executed. */
141
- declare function disposePreparedAgentCandidateExecution(prepared: PreparedAgentCandidateExecution, options?: DisposePreparedAgentCandidateOptions): Promise<{
142
- disposed: true;
143
- }>;
144
- //#endregion
145
- //#region src/candidate-execution/exact-process-executor.d.ts
146
- interface ExactProcessCandidateExecutorOptions {
147
- provider: AgentEnvironmentProvider;
148
- resources: AgentExactProcessResources;
149
- provisionTimeoutMs?: number;
150
- recoveryRetentionMs?: number;
151
- providerOptions?: Record<string, unknown>;
152
- }
153
- /** Adapt one neutral exact-process provider to Runtime's trusted candidate boundary. */
154
- declare function exactProcessProviderAsCandidateExecutor(options: ExactProcessCandidateExecutorOptions): AgentCandidateExecutorPort;
155
- //#endregion
156
- //#region src/candidate-execution/knowledge.d.ts
157
- /** Environment variable containing the materialized candidate knowledge root. */
158
- declare const CANDIDATE_KNOWLEDGE_ROOT_ENV = "TANGLE_CANDIDATE_KNOWLEDGE_ROOT";
159
- /** Environment variable containing the materialized retrieval configuration path. */
160
- declare const CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV = "TANGLE_CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG";
161
- /** Deterministic, signed locations used by every candidate executor. */
162
- declare function candidateKnowledgeExecutionPaths(taskRoot: string, hasRetrievalConfig: boolean): {
163
- root: string;
164
- retrievalConfig?: string;
165
- };
166
- //#endregion
167
- //#region src/candidate-execution/output-artifacts.d.ts
168
- /** Persist evaluator evidence, read it back, and bind the returned locator to the exact bytes. */
169
- declare function persistCandidateOutputArtifact(port: AgentCandidateOutputArtifactPort, input: {
170
- executionId: string;
171
- purpose: AgentCandidateOutputPurpose;
172
- bytes: Uint8Array;
173
- signal?: AbortSignal;
174
- }): Promise<AgentCandidateArtifactRef>;
175
- //#endregion
176
- //#region src/candidate-execution/protected-model-grant.d.ts
177
- /** Reservation fields supplied by a caller before Runtime resolves the model. */
178
- type AgentCandidateModelGrantRunReservationInput = Omit<AgentCandidateModelGrantReserveInput, 'resolved'>;
179
- /** Values available only while one protected model grant is active. */
180
- interface ProtectedAgentCandidateModelGrantContext {
181
- readonly activation: AgentCandidateProtectedModelActivation;
182
- readonly reservation: AgentCandidateProtectedModelReservation;
183
- readonly resolved: AgentCandidateResolvedModel;
184
- }
185
- /** Inputs for one protected grant scoped to one bounded caller unit. */
186
- interface RunProtectedAgentCandidateModelGrantOptions<TResult> {
187
- /** Runtime port that validates and settles the evaluator-owned grant. */
188
- readonly port: AgentCandidateModelPort;
189
- /** Provider-neutral model request resolved before any grant is reserved. */
190
- readonly resolve: Parameters<AgentCandidateModelPort['resolve']>[0];
191
- /** One bounded unit's immutable identity, attempt, expiry, and limits. */
192
- readonly reserve: AgentCandidateModelGrantRunReservationInput;
193
- /** Must be no later than the reservation expiry. */
194
- readonly deadlineAtMs: AgentCandidateModelGrantActivateInput['deadlineAtMs'];
195
- /** Execute exactly one bounded unit while the activated environment is valid. */
196
- readonly execute: (context: ProtectedAgentCandidateModelGrantContext) => Promise<TResult>;
197
- }
198
- /** Result and sealed settlement returned after one protected grant closes. */
199
- interface RunProtectedAgentCandidateModelGrantResult<TResult> {
200
- readonly value: TResult;
201
- readonly resolved: AgentCandidateResolvedModel;
202
- readonly reservation: AgentCandidateProtectedModelReservation;
203
- readonly settlement: AgentCandidateProtectedModelSettlement;
204
- }
205
- /**
206
- * Run one bounded unit under a protected model grant.
207
- *
208
- * Runtime owns the grant lifecycle; callers own the unit boundary and any
209
- * durable scheduling or accounting around it. A reserved grant is settled
210
- * after activation failure or callback failure, and the callback error is
211
- * preserved when settlement also fails.
212
- */
213
- declare function runProtectedAgentCandidateModelGrant<TResult>(options: RunProtectedAgentCandidateModelGrantOptions<TResult>): Promise<RunProtectedAgentCandidateModelGrantResult<TResult>>;
214
- //#endregion
215
- //#region src/candidate-execution/recover.d.ts
216
- interface RecoverExpiredAgentCandidateOptions {
217
- attempt: AgentCandidateExecutionAttemptRef;
218
- claimStore: AgentCandidateExecutionClaimStore;
219
- executor: AgentCandidateExecutorPort;
220
- traceStore: TraceStore;
221
- ports: Pick<AgentCandidateExecutionPorts, 'models' | 'memory'>;
222
- outputArtifacts: AgentCandidateOutputArtifactPort;
223
- cleanupTimeoutMs?: number;
224
- /** Evaluator clock; must be the same clock used by the claim store. */
225
- now?: () => number;
226
- }
227
- /** Close an expired crashed attempt from persisted non-secret handles, then record failure. */
228
- declare function recoverExpiredAgentCandidateExecution(options: RecoverExpiredAgentCandidateOptions): Promise<AgentCandidateExecutionFinishResult>;
229
- //#endregion
230
- //#region src/candidate-execution/verify.d.ts
231
- /** Surfaces admitted by Runtime's verifier before an environment adapter is selected. */
232
- declare const AGENT_CANDIDATE_EXECUTION_SUPPORT: Readonly<{
233
- outcomes: readonly ["workspace", "output"];
234
- code: readonly ["disabled", "no-op", "git-patch"];
235
- memory: readonly ["disabled", "isolated"];
236
- knowledge: true;
237
- profile: Readonly<{
238
- mcpTransports: readonly ["stdio"];
239
- remoteMcp: false;
240
- tools: false;
241
- permissions: false;
242
- modes: false;
243
- confidential: false;
244
- }>;
245
- }>;
246
- /** Verifies every digest, resource, workspace, and Git object in a candidate bundle. */
247
- declare function verifyAgentCandidateBundle(input: unknown, ports: AgentCandidateVerificationPorts): Promise<VerifiedAgentCandidate>;
248
- //#endregion
249
- //#region src/candidate-execution/workspace-archive.d.ts
250
- interface AgentCandidateWorkspaceArchiveLimits {
251
- maxArchiveBytes: number;
252
- maxEmbeddedArtifactBytes: number;
253
- maxFiles: number;
254
- maxFileBytes: number;
255
- maxTotalFileBytes: number;
256
- maxPathBytes: number;
257
- maxRepositoryBundleBytes: number;
258
- }
259
- interface CaptureAgentCandidateWorkspaceOptions {
260
- /** Include Git HEAD so task preparation can prove its exact commit and tree. */
261
- includeRepository?: boolean;
262
- limits?: Partial<AgentCandidateWorkspaceArchiveLimits>;
263
- /** Use the evaluator-owned artifact store when manifest or archive bytes should not be embedded. */
264
- artifactPersistence?: {
265
- executionId: string;
266
- outputArtifacts: AgentCandidateOutputArtifactPort;
267
- signal?: AbortSignal;
268
- };
269
- }
270
- interface CreateAgentCandidateWorkspacePortOptions {
271
- limits?: Partial<AgentCandidateWorkspaceArchiveLimits>;
272
- }
273
- interface CapturedAgentCandidateWorkspace {
274
- readonly snapshot: AgentCandidateWorkspaceSnapshotEvidence;
275
- /** Caller-owned bytes accepted by createAgentCandidateWorkspacePort. */
276
- readonly archive: Uint8Array;
277
- }
278
- /** Capture one exact regular-file workspace for immutable candidate execution. */
279
- declare function captureAgentCandidateWorkspace(rootInput: string, options?: CaptureAgentCandidateWorkspaceOptions): Promise<CapturedAgentCandidateWorkspace>;
280
- /** Capture detached files returned by a remote executor into the standard archive. */
281
- declare function captureAgentCandidateWorkspaceFiles(input: readonly AgentCandidateExecutorWorkspaceFile[], options?: Omit<CaptureAgentCandidateWorkspaceOptions, 'includeRepository'>): Promise<CapturedAgentCandidateWorkspace>;
282
- /** Create the standard bounded materializer for candidate execution ports. */
283
- declare function createAgentCandidateWorkspacePort(options?: CreateAgentCandidateWorkspacePortOptions): AgentCandidateWorkspacePort;
284
- //#endregion
285
- //#region src/candidate-execution/workspace-tree.d.ts
286
- /**
287
- * `'tree-v1'` records a file's exact permission bits. `'portable-tree-v1'` records the two modes
288
- * Git stores — `755` when any execute bit is set, `644` otherwise, and `755` for a directory — so a
289
- * digest survives a checkout whose umask differs. Both stamp the algorithm into the digest, so one
290
- * tree cannot produce the same digest under both.
291
- */
292
- type WorkspaceTreeAlgorithm = 'tree-v1' | 'portable-tree-v1';
293
- /** What a walk does with an entry it refuses to describe: fail, or record and continue. */
294
- type WorkspaceTreeEntryPolicy = 'refuse' | 'exclude';
295
- /** Why one entry contributed its name instead of its content. */
296
- type WorkspaceTreeExclusionReason = 'absolute-symlink' | 'symlink-escapes-tree' | 'symlink-resolves-outside-tree' | 'unresolved-symlink' | 'entry-disappeared';
297
- /** One entry the walk recorded but did not describe. Reported rather than dropped: a digest that
298
- * silently omitted an entry would be a different digest with no way to tell why. */
299
- interface WorkspaceTreeExclusion {
300
- /** Tree-relative path, `/`-separated. */
301
- readonly path: string;
302
- readonly reason: WorkspaceTreeExclusionReason;
303
- /** The link target exactly as it was written, for a symbolic-link exclusion. */
304
- readonly target?: string;
305
- }
306
- interface WorkspaceTreeDescriptor {
307
- readonly algorithm: WorkspaceTreeAlgorithm;
308
- readonly digest: Sha256Digest;
309
- readonly files: number;
310
- readonly directories: number;
311
- /** Links kept INSIDE the tree. An excluded link is counted in `excluded`, never here. */
312
- readonly symlinks: number;
313
- /** Total described regular-file bytes. */
314
- readonly bytes: number;
315
- readonly excluded: ReadonlyArray<WorkspaceTreeExclusion>;
316
- }
317
- interface DescribeWorkspaceTreeOptions {
318
- /** Default `'tree-v1'`. */
319
- readonly algorithm?: WorkspaceTreeAlgorithm;
320
- /**
321
- * A symbolic link that is absolute, leaves the tree lexically, resolves outside it, or does not
322
- * resolve at all. `'refuse'` (default) is correct for an input seed. `'exclude'` is correct for a
323
- * close-time walk over a tree a run wrote. The link is NEVER followed in either policy: an
324
- * escaping link must not contribute bytes from outside the tree to a content address.
325
- */
326
- readonly onEscapingLink?: WorkspaceTreeEntryPolicy;
327
- /**
328
- * An entry that vanished between the directory read that named it and the walk that reached it.
329
- * `'refuse'` (default) is correct for a settled tree; `'exclude'` is correct for a workspace a
330
- * live process still writes to.
331
- */
332
- readonly onMissingEntry?: WorkspaceTreeEntryPolicy;
333
- }
334
- interface SeedWorkspaceTreeInput {
335
- /** The tree to copy FROM. Described, then copied entry by entry. */
336
- readonly source: string;
337
- /** The tree to copy INTO. Must exist, and must not lie inside `source`. */
338
- readonly destination: string;
339
- /** Default `'tree-v1'`; decides only the digest this returns, never the bytes it writes. */
340
- readonly algorithm?: WorkspaceTreeAlgorithm;
341
- }
342
- /**
343
- * Describe one directory tree by content, streaming every file.
344
- *
345
- * The digest covers, for every entry in sorted order: its kind, its tree-relative path, its mode
346
- * under the selected algorithm, and then — for a file, its length and its own sha-256; for a kept
347
- * link, its target; for an excluded entry, the reason and the target. A file's content therefore
348
- * never enters the tree hash directly, which is what removes any in-memory size ceiling: the tree
349
- * hash consumes 32 bytes per file however large the file is.
350
- *
351
- * A hard-linked regular file is described like any other regular file. Its content is what the
352
- * digest is about, and a package manager that links a store into `node_modules` is ordinary
353
- * content, not a reason to refuse a workspace.
354
- */
355
- declare function describeWorkspaceTree(directory: string, options?: DescribeWorkspaceTreeOptions): Promise<WorkspaceTreeDescriptor>;
356
- /**
357
- * Seed a workspace from a directory, one entry at a time, and return the digest of what was
358
- * seeded.
359
- *
360
- * Nothing is packed: `cp` walks and copies file by file, so a multi-gigabyte seed costs one file
361
- * handle rather than one archive in memory. Existing destination entries are never overwritten —
362
- * a seed that could replace a file the workspace already holds would make the resulting tree
363
- * depend on the order two seeds ran in.
364
- *
365
- * Links are copied verbatim, exactly as they were written. Following them would copy bytes from
366
- * outside the seed into the workspace, which is the same rule {@link describeWorkspaceTree}
367
- * applies to the digest.
368
- */
369
- declare function seedWorkspaceTree(input: SeedWorkspaceTreeInput): Promise<WorkspaceTreeDescriptor>;
370
- //#endregion
371
- export { ExactProcessCandidateExecutorOptions as A, buildAgentCandidateBundle as B, RunProtectedAgentCandidateModelGrantOptions as C, CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV as D, persistCandidateOutputArtifact as E, FileAgentCandidateExecutionClaimStoreOptions as F, candidateWorkspaceManifest as G, sealAgentCandidateBundle as H, AgentCandidateCodeSource as I, scanMaterializedWorkspaceManifest as K, AgentCandidateCodeSurfaceSource as L, DisposePreparedAgentCandidateOptions as M, disposePreparedAgentCandidateExecution as N, CANDIDATE_KNOWLEDGE_ROOT_ENV as O, FileAgentCandidateExecutionClaimStore as P, AgentCandidateProfileSource as R, ProtectedAgentCandidateModelGrantContext as S, runProtectedAgentCandidateModelGrant as T, WorkspaceScanLimits as U, AgentCandidateBundleInput as V, WorkspaceScanOptions as W, AGENT_CANDIDATE_EXECUTION_SUPPORT as _, WorkspaceTreeEntryPolicy as a, recoverExpiredAgentCandidateExecution as b, describeWorkspaceTree as c, CaptureAgentCandidateWorkspaceOptions as d, CapturedAgentCandidateWorkspace as f, createAgentCandidateWorkspacePort as g, captureAgentCandidateWorkspaceFiles as h, WorkspaceTreeDescriptor as i, exactProcessProviderAsCandidateExecutor as j, candidateKnowledgeExecutionPaths as k, seedWorkspaceTree as l, captureAgentCandidateWorkspace as m, SeedWorkspaceTreeInput as n, WorkspaceTreeExclusion as o, CreateAgentCandidateWorkspacePortOptions as p, verifyMaterializedWorkspace as q, WorkspaceTreeAlgorithm as r, WorkspaceTreeExclusionReason as s, DescribeWorkspaceTreeOptions as t, AgentCandidateWorkspaceArchiveLimits as u, verifyAgentCandidateBundle as v, RunProtectedAgentCandidateModelGrantResult as w, AgentCandidateModelGrantRunReservationInput as x, RecoverExpiredAgentCandidateOptions as y, BuildAgentCandidateBundleInput as z };
372
- //# sourceMappingURL=index-CUosKU4N.d.ts.map