@tangle-network/agent-runtime 4.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5279 -0
- package/dist/{activation-BiQYCayd.js → activation-BRfZOfwb.js} +4 -4
- package/dist/{activation-BiQYCayd.js.map → activation-BRfZOfwb.js.map} +1 -1
- package/dist/{activation-B49A14V5.d.ts → activation-DEKw9CDD.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +4 -4
- package/dist/{bundle-CV4Ts0cS.js → bundle-vFFiCigS.js} +2 -2
- package/dist/{bundle-CV4Ts0cS.js.map → bundle-vFFiCigS.js.map} +1 -1
- package/dist/candidate-execution/index.d.ts +71 -4
- package/dist/candidate-execution/index.js +4 -4
- package/dist/{coordination-manager-C-ZoeZ73.js → coordination-manager-RSJg5GmY.js} +12 -11
- package/dist/coordination-manager-RSJg5GmY.js.map +1 -0
- package/dist/{coordination-map-routing-SnsZp287.js → coordination-map-routing-DVjW5Gx0.js} +2 -2
- package/dist/coordination-map-routing-DVjW5Gx0.js.map +1 -0
- package/dist/{delegate-d9HcOFC5.js → delegate-C0cprMUN.js} +2 -2
- package/dist/{delegate-d9HcOFC5.js.map → delegate-C0cprMUN.js.map} +1 -1
- package/dist/durable.d.ts +5 -3
- package/dist/durable.js +14 -186
- package/dist/durable.js.map +1 -1
- package/dist/{graph-C_Z0Ua10.js → graph-cEg-gquv.js} +6 -8
- package/dist/{graph-C_Z0Ua10.js.map → graph-cEg-gquv.js.map} +1 -1
- package/dist/{graph-registry-CI1o16DH.js → graph-registry-B25FxBZN.js} +5 -5
- package/dist/graph-registry-B25FxBZN.js.map +1 -0
- package/dist/{graph-registry-BU7pcrUW.js → graph-registry-C-hjRx2t.js} +1 -1
- package/dist/{improve-B4v4S8jY.js → improve-DNl4_6lP.js} +8 -8
- package/dist/{improve-B4v4S8jY.js.map → improve-DNl4_6lP.js.map} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +11 -11
- package/dist/intelligence.d.ts +5 -5
- package/dist/intelligence.js +8 -8
- package/dist/{jsonl-file-CvPuwM0a.js → jsonl-file-CeVYTIQJ.js} +41 -32
- package/dist/jsonl-file-CeVYTIQJ.js.map +1 -0
- package/dist/kernel.d.ts +3 -3
- package/dist/kernel.js +14 -13
- package/dist/{loop-runner-DKvA0JJr.d.ts → loop-runner-CDad0CCY.d.ts} +2 -2
- package/dist/{loop-runner-DMZkwlND.js → loop-runner-DQJjowz0.js} +2 -2
- package/dist/{loop-runner-DMZkwlND.js.map → loop-runner-DQJjowz0.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +6 -6
- package/dist/{prepare-DutbxpWr.js → prepare-B6SQA12v.js} +3 -3
- package/dist/{prepare-DutbxpWr.js.map → prepare-B6SQA12v.js.map} +1 -1
- package/dist/{profile-ClvuI8aY.js → profile-DN8Dw2Kp.js} +2 -2
- package/dist/{profile-ClvuI8aY.js.map → profile-DN8Dw2Kp.js.map} +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{protected-model-port-DEsNIYi1.d.ts → protected-model-port-uN4M48vT.d.ts} +2 -2
- package/dist/{provision-supervisor-Cjs4SQ9Q.js → provision-supervisor-CtAaJCUa.js} +6 -6
- package/dist/{provision-supervisor-Cjs4SQ9Q.js.map → provision-supervisor-CtAaJCUa.js.map} +1 -1
- package/dist/{run-cancellation-CGgk54Md.js → run-cancellation-BCuu6khW.js} +3 -3
- package/dist/{run-cancellation-CGgk54Md.js.map → run-cancellation-BCuu6khW.js.map} +1 -1
- package/dist/run-state-ByHiAjUs.js +351 -0
- package/dist/run-state-ByHiAjUs.js.map +1 -0
- package/dist/{runtime-BmxmsaNz.js → runtime-9EYvBcHG.js} +19 -18
- package/dist/runtime-9EYvBcHG.js.map +1 -0
- package/dist/runtime-hooks-CsW2pfFk.js.map +1 -1
- package/dist/{runtime-hooks-ZQqPw-0g.d.ts → runtime-hooks-DPghSHV7.d.ts} +11 -16
- package/dist/{scope-CJ7xtrs8.js → scope-DzhBJrRN.js} +3632 -3528
- package/dist/scope-DzhBJrRN.js.map +1 -0
- package/dist/{search-executor-DSB6XAl1.js → search-executor-BJRNavck.js} +4 -4
- package/dist/{search-executor-DSB6XAl1.js.map → search-executor-BJRNavck.js.map} +1 -1
- package/dist/{server-FWT2Nt_w.js → server-DH0P6OY_.js} +4 -4
- package/dist/{server-FWT2Nt_w.js.map → server-DH0P6OY_.js.map} +1 -1
- package/dist/settle-record-BSDDf9Z4.js +130 -0
- package/dist/settle-record-BSDDf9Z4.js.map +1 -0
- package/dist/{structural-rollout-Bl23HSOd.js → structural-rollout-DgvJLTO0.js} +4 -4
- package/dist/{structural-rollout-Bl23HSOd.js.map → structural-rollout-DgvJLTO0.js.map} +1 -1
- package/dist/{supervise-MAzd0hOk.js → supervise-Cqhkb2Oj.js} +402 -450
- package/dist/supervise-Cqhkb2Oj.js.map +1 -0
- package/dist/{supervision-discovery-6EtvKCsU.js → supervision-discovery-DI5GIFBJ.js} +5 -130
- package/dist/supervision-discovery-DI5GIFBJ.js.map +1 -0
- package/dist/{supervisor-CwANBb9-.js → supervisor-B6sl14OR.js} +408 -1069
- package/dist/supervisor-B6sl14OR.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +13 -13
- package/dist/tool-loop.d.ts +1 -1
- package/dist/{top-web-CZP3RRhD.js → top-web-DGoXGxH8.js} +13 -9
- package/dist/{top-web-CZP3RRhD.js.map → top-web-DGoXGxH8.js.map} +1 -1
- package/dist/tui/bin.js +3 -3
- package/dist/tui/index.d.ts +2 -2
- package/dist/tui/index.js +2 -2
- package/dist/{types-ooyUaxq_.d.ts → types-niKnm6ux.d.ts} +270 -461
- package/dist/{workspace-streams-DbKiDOWA.d.ts → workspace-archive-DS9E9tUr.d.ts} +2 -69
- package/dist/{workspace-streams-8ALHaZzx.js → workspace-streams-BqNM06y4.js} +34 -9
- package/dist/workspace-streams-BqNM06y4.js.map +1 -0
- package/package.json +9 -10
- package/dist/coordination-manager-C-ZoeZ73.js.map +0 -1
- package/dist/coordination-map-routing-SnsZp287.js.map +0 -1
- package/dist/graph-registry-CI1o16DH.js.map +0 -1
- package/dist/jsonl-file-CvPuwM0a.js.map +0 -1
- package/dist/runtime-BmxmsaNz.js.map +0 -1
- package/dist/scope-CJ7xtrs8.js.map +0 -1
- package/dist/supervise-MAzd0hOk.js.map +0 -1
- package/dist/supervision-discovery-6EtvKCsU.js.map +0 -1
- package/dist/supervisor-CwANBb9-.js.map +0 -1
- package/dist/workspace-streams-8ALHaZzx.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as AgentCandidateExecutionTerminalResult, C as AgentCandidateExecutionFinishResult, D as AgentCandidateExecutionRecoveryEvidence, E as AgentCandidateExecutionPhaseResult, M as AgentCandidatePreparationEvidence, O as AgentCandidateExecutionStageResult, S as AgentCandidateExecutionFailureClass, T as AgentCandidateExecutionPhase, _ as AgentCandidateExecutionAttemptRef, a as createProtectedAgentCandidateModelPort, b as AgentCandidateExecutionClaimStore, c as assertCandidateProfileBinding, d as parseExactAgentProfileDiff, g as AgentCandidateExecutionAttemptRecord, h as executePreparedAgentCandidate, i as CreateProtectedAgentCandidateModelPortOptions, j as AgentCandidateRetryRejection, k as AgentCandidateExecutionTerminalRecord, l as freezeGenericAgentCandidateProfile, m as ExecutePreparedAgentCandidateOptions, n as AgentCandidateModelGrantClient, o as agentCandidateProfileAsAgentProfile, p as prepareAgentCandidateExecution, r as AgentCandidateModelGrantReserveInput, s as applyExactAgentProfileDiff, t as AgentCandidateModelGrantActivateInput, v as AgentCandidateExecutionClaim, w as AgentCandidateExecutionLease, x as AgentCandidateExecutionCleanupHandles, y as AgentCandidateExecutionClaimResult } from "../protected-model-port-
|
|
1
|
+
import { A as AgentCandidateProtectedModelSettlementCall, B as PreparedAgentCandidateInstruction, C as AgentCandidateModelLimits, D as AgentCandidateProtectedModelActivation, E as AgentCandidateOutputPurpose, F as AgentCandidateVerificationPorts, G as VerifiedAgentCandidate, H as PreparedAgentCandidateLaunch, I as AgentCandidateWorkspacePort, K as VerifiedAgentCandidateTaskOutcome, L as CanonicalCandidateDocument, M as AgentCandidateRepositoryPort, N as AgentCandidateRunFinalization, O as AgentCandidateProtectedModelReservation, P as AgentCandidateTaskExecution, R as PersistedTaskOutcomeEvidence, S as AgentCandidateMemoryResetResult, T as AgentCandidateOutputArtifactPort, U as PreparedAgentCandidateTrace, V as PreparedAgentCandidateKnowledge, W as ResolvedAgentCandidateContainer, _ as AgentCandidateExecutorStopRequest, a as CreateAgentCandidateWorkspacePortOptions, b as AgentCandidateExecutorWorkspaceInput, c as AgentCandidateArtifactPort, d as AgentCandidateExecutionPorts, f as AgentCandidateExecutorFinalCapture, g as AgentCandidateExecutorRequest, h as AgentCandidateExecutorProfileFile, i as CaptureAgentCandidateWorkspaceOptions, j as AgentCandidateProtectedRunCapture, k as AgentCandidateProtectedModelSettlement, l as AgentCandidateBenchmarkGraderPort, m as AgentCandidateExecutorPort, n as CapturedAgentCandidateWorkspace, o as captureAgentCandidateWorkspace, p as AgentCandidateExecutorMemoryCapture, q as AgentCandidateExecutionRoots, r as captureAgentCandidateWorkspaceFiles, s as createAgentCandidateWorkspacePort, t as AgentCandidateWorkspaceArchiveLimits, u as AgentCandidateContainerPort, v as AgentCandidateExecutorTaskOutcomeCapture, w as AgentCandidateModelPort, x as AgentCandidateMemoryPort, y as AgentCandidateExecutorWorkspaceFile, z as PreparedAgentCandidateExecution } from "../workspace-archive-DS9E9tUr.js";
|
|
2
|
+
import { A as AgentCandidateExecutionTerminalResult, C as AgentCandidateExecutionFinishResult, D as AgentCandidateExecutionRecoveryEvidence, E as AgentCandidateExecutionPhaseResult, M as AgentCandidatePreparationEvidence, O as AgentCandidateExecutionStageResult, S as AgentCandidateExecutionFailureClass, T as AgentCandidateExecutionPhase, _ as AgentCandidateExecutionAttemptRef, a as createProtectedAgentCandidateModelPort, b as AgentCandidateExecutionClaimStore, c as assertCandidateProfileBinding, d as parseExactAgentProfileDiff, g as AgentCandidateExecutionAttemptRecord, h as executePreparedAgentCandidate, i as CreateProtectedAgentCandidateModelPortOptions, j as AgentCandidateRetryRejection, k as AgentCandidateExecutionTerminalRecord, l as freezeGenericAgentCandidateProfile, m as ExecutePreparedAgentCandidateOptions, n as AgentCandidateModelGrantClient, o as agentCandidateProfileAsAgentProfile, p as prepareAgentCandidateExecution, r as AgentCandidateModelGrantReserveInput, s as applyExactAgentProfileDiff, t as AgentCandidateModelGrantActivateInput, v as AgentCandidateExecutionClaim, w as AgentCandidateExecutionLease, x as AgentCandidateExecutionCleanupHandles, y as AgentCandidateExecutionClaimResult } from "../protected-model-port-uN4M48vT.js";
|
|
3
3
|
import { AgentCandidateArtifactRef, AgentCandidateBundle, AgentCandidateCapturedArtifact, AgentCandidateCodeDisabled, AgentCandidateCodeNoOp, AgentCandidateExecution, AgentCandidateGitHubRepository, AgentCandidateKnowledge, AgentCandidateMemoryPolicy, AgentCandidateProfile, AgentCandidateResolvedModel, AgentCandidateWorkspaceManifestMaterial, AgentCandidateWorkspaceSnapshotEvidence, AgentProfile, AgentProfileDiff, Sha256Digest } from "@tangle-network/agent-interface";
|
|
4
|
-
import { CodeSurface } from "@tangle-network/agent-eval/campaign";
|
|
5
4
|
import { AgentEnvironmentProvider, AgentExactProcessResources } from "@tangle-network/agent-interface/environment-provider";
|
|
5
|
+
import { CodeSurface } from "@tangle-network/agent-eval/campaign";
|
|
6
6
|
/** The per-scan caps a bounded capture applies. */
|
|
7
7
|
interface WorkspaceScanLimits {
|
|
8
8
|
readonly maxFiles: number;
|
|
@@ -169,6 +169,73 @@ interface RunProtectedAgentCandidateModelGrantResult<TResult> {
|
|
|
169
169
|
export declare function runProtectedAgentCandidateModelGrant<TResult>(options: RunProtectedAgentCandidateModelGrantOptions<TResult>): Promise<RunProtectedAgentCandidateModelGrantResult<TResult>>;
|
|
170
170
|
/** Verifies every digest, resource, workspace, and Git object in a candidate bundle. */
|
|
171
171
|
export declare function verifyAgentCandidateBundle(input: unknown, ports: AgentCandidateVerificationPorts): Promise<VerifiedAgentCandidate>;
|
|
172
|
+
interface CaptureAgentCandidateWorkspaceToArtifactsOptions {
|
|
173
|
+
limits?: Partial<AgentCandidateWorkspaceArchiveLimits>;
|
|
174
|
+
/**
|
|
175
|
+
* Root-relative files or directories to leave out of the capture, each by its exact path. A
|
|
176
|
+
* caller whose root holds data another capture already keeps, such as a provider's retained
|
|
177
|
+
* native session trees, or an environment it can rebuild, such as a virtualenv, names them here
|
|
178
|
+
* instead of storing them on every capture. The manifest then describes only what was kept.
|
|
179
|
+
*/
|
|
180
|
+
excludedPaths?: readonly string[];
|
|
181
|
+
artifactPersistence: NonNullable<CaptureAgentCandidateWorkspaceOptions['artifactPersistence']>;
|
|
182
|
+
}
|
|
183
|
+
/** Capture regular files to durable artifacts with memory bounded by the manifest and stream buffers. */
|
|
184
|
+
export declare function captureAgentCandidateWorkspaceToArtifacts(rootInput: string, options: CaptureAgentCandidateWorkspaceToArtifactsOptions): Promise<{
|
|
185
|
+
readonly snapshot: AgentCandidateWorkspaceSnapshotEvidence;
|
|
186
|
+
}>;
|
|
187
|
+
/**
|
|
188
|
+
* A workspace stored as one content-addressed object per file plus the manifest that names them.
|
|
189
|
+
*
|
|
190
|
+
* Its digest is the manifest's, the same identity an archived capture of the same files has. Two
|
|
191
|
+
* trees share every file they have in common, so storing one costs only the files no earlier
|
|
192
|
+
* capture in the store holds: on Discovery Lab run terraform-dc-tokens-20261006d, the files a
|
|
193
|
+
* director changed between two captures one to two minutes apart were 5.5 to 8.2 MB of a
|
|
194
|
+
* 60 to 70 MB workspace.
|
|
195
|
+
*/
|
|
196
|
+
interface AgentCandidateWorkspaceTree {
|
|
197
|
+
readonly kind: 'agent-candidate-workspace-tree';
|
|
198
|
+
/** The manifest's digest; the manifest is the object of this digest. */
|
|
199
|
+
readonly digest: Sha256Digest;
|
|
200
|
+
readonly manifest: AgentCandidateArtifactRef;
|
|
201
|
+
readonly files: number;
|
|
202
|
+
/** The bytes of every file in the workspace. */
|
|
203
|
+
readonly bytes: number;
|
|
204
|
+
/** The bytes this capture added to the store; every other file was already there. */
|
|
205
|
+
readonly storedBytes: number;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Store a workspace as a tree: each regular file the store does not already hold, then the
|
|
209
|
+
* manifest. The store must find objects by content (`locate`) and stream them.
|
|
210
|
+
*/
|
|
211
|
+
export declare function captureAgentCandidateWorkspaceTreeToArtifacts(rootInput: string, options: CaptureAgentCandidateWorkspaceToArtifactsOptions): Promise<AgentCandidateWorkspaceTree>;
|
|
212
|
+
/**
|
|
213
|
+
* Read a tree back by its digest and confirm the store holds every file it names. Returns the
|
|
214
|
+
* manifest; reading a file is `artifacts.read` of what `locate` returns for its digest.
|
|
215
|
+
*/
|
|
216
|
+
export declare function verifyAgentCandidateWorkspaceTree(tree: Pick<AgentCandidateWorkspaceTree, 'digest' | 'manifest'>, artifacts: AgentCandidateArtifactPort, options?: {
|
|
217
|
+
limits?: Partial<AgentCandidateWorkspaceArchiveLimits>;
|
|
218
|
+
signal?: AbortSignal;
|
|
219
|
+
}): Promise<AgentCandidateWorkspaceManifestMaterial>;
|
|
220
|
+
interface AgentCandidateWorkspaceArtifactsOptions {
|
|
221
|
+
role: 'task' | 'candidate' | 'knowledge' | 'memory';
|
|
222
|
+
snapshot: AgentCandidateWorkspaceSnapshotEvidence;
|
|
223
|
+
artifacts: AgentCandidateArtifactPort;
|
|
224
|
+
limits?: Partial<AgentCandidateWorkspaceArchiveLimits>;
|
|
225
|
+
signal?: AbortSignal;
|
|
226
|
+
}
|
|
227
|
+
/** Verify durable regular-file workspace evidence without retaining archive or file contents. */
|
|
228
|
+
export declare function verifyAgentCandidateWorkspaceArtifacts(input: AgentCandidateWorkspaceArtifactsOptions): Promise<void>;
|
|
229
|
+
/** Read selected files only after the existing verifier has accepted the entire archive. */
|
|
230
|
+
export declare function readAgentCandidateWorkspaceArtifactFiles(input: AgentCandidateWorkspaceArtifactsOptions & {
|
|
231
|
+
readonly paths: readonly string[];
|
|
232
|
+
readonly maxReadBytes: number;
|
|
233
|
+
}): Promise<ReadonlyMap<string, Uint8Array>>;
|
|
234
|
+
/** Restore regular files into an empty destination after complete verification; paths selects a subset. */
|
|
235
|
+
export declare function materializeAgentCandidateWorkspaceFromArtifacts(input: AgentCandidateWorkspaceArtifactsOptions & {
|
|
236
|
+
destination: string;
|
|
237
|
+
paths?: readonly string[];
|
|
238
|
+
}): Promise<void>;
|
|
172
239
|
/** The canonical workspace evidence without manifest material or embedded file bytes. */
|
|
173
240
|
type AgentCandidateWorkspaceSnapshotReferences = Pick<AgentCandidateWorkspaceSnapshotEvidence, 'kind' | 'digest'> & {
|
|
174
241
|
readonly manifest: AgentCandidateArtifactRef;
|
|
@@ -258,5 +325,5 @@ interface SeedWorkspaceTreeInput {
|
|
|
258
325
|
/** Default `'tree-v1'`; decides only the digest this returns, never the bytes it writes. */
|
|
259
326
|
readonly algorithm?: WorkspaceTreeAlgorithm;
|
|
260
327
|
}
|
|
261
|
-
export { type AgentCandidateArtifactPort, type AgentCandidateBenchmarkGraderPort, type AgentCandidateBundleInput, type AgentCandidateCodeSource, type AgentCandidateCodeSurfaceSource, type AgentCandidateContainerPort, type AgentCandidateExecutionAttemptRecord, type AgentCandidateExecutionAttemptRef, type AgentCandidateExecutionClaim, type AgentCandidateExecutionClaimResult, type AgentCandidateExecutionClaimStore, type AgentCandidateExecutionCleanupHandles, type AgentCandidateExecutionFailureClass, type AgentCandidateExecutionFinishResult, type AgentCandidateExecutionLease, type AgentCandidateExecutionPhase, type AgentCandidateExecutionPhaseResult, type AgentCandidateExecutionPorts, type AgentCandidateExecutionRecoveryEvidence, type AgentCandidateExecutionRoots, type AgentCandidateExecutionStageResult, type AgentCandidateExecutionTerminalRecord, type AgentCandidateExecutionTerminalResult, type AgentCandidateExecutorFinalCapture, type AgentCandidateExecutorMemoryCapture, type AgentCandidateExecutorPort, type AgentCandidateExecutorProfileFile, type AgentCandidateExecutorRequest, type AgentCandidateExecutorStopRequest, type AgentCandidateExecutorTaskOutcomeCapture, type AgentCandidateExecutorWorkspaceFile, type AgentCandidateExecutorWorkspaceInput, type AgentCandidateMemoryPort, type AgentCandidateMemoryResetResult, type AgentCandidateModelGrantClient, type AgentCandidateModelGrantReserveInput, type AgentCandidateModelGrantRunReservationInput, type AgentCandidateModelLimits, type AgentCandidateModelPort, type AgentCandidateOutputArtifactPort, type AgentCandidateOutputPurpose, type AgentCandidatePreparationEvidence, type AgentCandidateProfileSource, type AgentCandidateProtectedModelActivation, type AgentCandidateProtectedModelReservation, type AgentCandidateProtectedModelSettlement, type AgentCandidateProtectedModelSettlementCall, type AgentCandidateProtectedRunCapture, type AgentCandidateRepositoryPort, type AgentCandidateRetryRejection, type AgentCandidateRunFinalization, type AgentCandidateTaskExecution, type AgentCandidateVerificationPorts, type AgentCandidateWorkspaceArtifactsOptions, type AgentCandidateWorkspacePort, type AgentCandidateWorkspaceSnapshotReferences, type AgentCandidateWorkspaceTree, type BuildAgentCandidateBundleInput, type CanonicalCandidateDocument, type CaptureAgentCandidateWorkspaceOptions, type CaptureAgentCandidateWorkspaceToArtifactsOptions, type CaptureAgentWorkspaceSnapshotOptions, type CapturedAgentCandidateWorkspace, type CreateAgentCandidateWorkspacePortOptions, type CreateProtectedAgentCandidateModelPortOptions, type DescribeWorkspaceTreeOptions, type DisposePreparedAgentCandidateOptions, type ExactProcessCandidateExecutorOptions, type ExecutePreparedAgentCandidateOptions, type FileAgentCandidateExecutionClaimStoreOptions, type MaterializeAgentWorkspaceSnapshotOptions, type PersistedTaskOutcomeEvidence, type PreparedAgentCandidateExecution, type PreparedAgentCandidateInstruction, type PreparedAgentCandidateKnowledge, type PreparedAgentCandidateLaunch, type PreparedAgentCandidateTrace, type ProtectedAgentCandidateModelGrantContext, type ResolvedAgentCandidateContainer, type RunProtectedAgentCandidateModelGrantOptions, type RunProtectedAgentCandidateModelGrantResult, type SeedWorkspaceTreeInput, type VerifiedAgentCandidate, type VerifiedAgentCandidateTaskOutcome, type WorkspaceScanLimits, type WorkspaceScanOptions, type WorkspaceTreeAlgorithm, type WorkspaceTreeDescriptor, type WorkspaceTreeEntryPolicy, type WorkspaceTreeExclusion, type WorkspaceTreeExclusionReason, agentCandidateProfileAsAgentProfile, applyExactAgentProfileDiff, assertCandidateProfileBinding, captureAgentCandidateWorkspace, captureAgentCandidateWorkspaceFiles,
|
|
328
|
+
export { type AgentCandidateArtifactPort, type AgentCandidateBenchmarkGraderPort, type AgentCandidateBundleInput, type AgentCandidateCodeSource, type AgentCandidateCodeSurfaceSource, type AgentCandidateContainerPort, type AgentCandidateExecutionAttemptRecord, type AgentCandidateExecutionAttemptRef, type AgentCandidateExecutionClaim, type AgentCandidateExecutionClaimResult, type AgentCandidateExecutionClaimStore, type AgentCandidateExecutionCleanupHandles, type AgentCandidateExecutionFailureClass, type AgentCandidateExecutionFinishResult, type AgentCandidateExecutionLease, type AgentCandidateExecutionPhase, type AgentCandidateExecutionPhaseResult, type AgentCandidateExecutionPorts, type AgentCandidateExecutionRecoveryEvidence, type AgentCandidateExecutionRoots, type AgentCandidateExecutionStageResult, type AgentCandidateExecutionTerminalRecord, type AgentCandidateExecutionTerminalResult, type AgentCandidateExecutorFinalCapture, type AgentCandidateExecutorMemoryCapture, type AgentCandidateExecutorPort, type AgentCandidateExecutorProfileFile, type AgentCandidateExecutorRequest, type AgentCandidateExecutorStopRequest, type AgentCandidateExecutorTaskOutcomeCapture, type AgentCandidateExecutorWorkspaceFile, type AgentCandidateExecutorWorkspaceInput, type AgentCandidateMemoryPort, type AgentCandidateMemoryResetResult, type AgentCandidateModelGrantClient, type AgentCandidateModelGrantReserveInput, type AgentCandidateModelGrantRunReservationInput, type AgentCandidateModelLimits, type AgentCandidateModelPort, type AgentCandidateOutputArtifactPort, type AgentCandidateOutputPurpose, type AgentCandidatePreparationEvidence, type AgentCandidateProfileSource, type AgentCandidateProtectedModelActivation, type AgentCandidateProtectedModelReservation, type AgentCandidateProtectedModelSettlement, type AgentCandidateProtectedModelSettlementCall, type AgentCandidateProtectedRunCapture, type AgentCandidateRepositoryPort, type AgentCandidateRetryRejection, type AgentCandidateRunFinalization, type AgentCandidateTaskExecution, type AgentCandidateVerificationPorts, type AgentCandidateWorkspaceArtifactsOptions, type AgentCandidateWorkspacePort, type AgentCandidateWorkspaceSnapshotReferences, type AgentCandidateWorkspaceTree, type BuildAgentCandidateBundleInput, type CanonicalCandidateDocument, type CaptureAgentCandidateWorkspaceOptions, type CaptureAgentCandidateWorkspaceToArtifactsOptions, type CaptureAgentWorkspaceSnapshotOptions, type CapturedAgentCandidateWorkspace, type CreateAgentCandidateWorkspacePortOptions, type CreateProtectedAgentCandidateModelPortOptions, type DescribeWorkspaceTreeOptions, type DisposePreparedAgentCandidateOptions, type ExactProcessCandidateExecutorOptions, type ExecutePreparedAgentCandidateOptions, type FileAgentCandidateExecutionClaimStoreOptions, type MaterializeAgentWorkspaceSnapshotOptions, type PersistedTaskOutcomeEvidence, type PreparedAgentCandidateExecution, type PreparedAgentCandidateInstruction, type PreparedAgentCandidateKnowledge, type PreparedAgentCandidateLaunch, type PreparedAgentCandidateTrace, type ProtectedAgentCandidateModelGrantContext, type ResolvedAgentCandidateContainer, type RunProtectedAgentCandidateModelGrantOptions, type RunProtectedAgentCandidateModelGrantResult, type SeedWorkspaceTreeInput, type VerifiedAgentCandidate, type VerifiedAgentCandidateTaskOutcome, type WorkspaceScanLimits, type WorkspaceScanOptions, type WorkspaceTreeAlgorithm, type WorkspaceTreeDescriptor, type WorkspaceTreeEntryPolicy, type WorkspaceTreeExclusion, type WorkspaceTreeExclusionReason, agentCandidateProfileAsAgentProfile, applyExactAgentProfileDiff, assertCandidateProfileBinding, captureAgentCandidateWorkspace, captureAgentCandidateWorkspaceFiles, createAgentCandidateWorkspacePort, createProtectedAgentCandidateModelPort, executePreparedAgentCandidate, freezeGenericAgentCandidateProfile, parseExactAgentProfileDiff, prepareAgentCandidateExecution };
|
|
262
329
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as applyExactAgentProfileDiff, b as parseExactCandidateProfile, i as agentCandidateProfileAsAgentProfile, o as assertCandidateProfileBinding, p as freezeGenericAgentCandidateProfile, v as parseExactAgentProfile, y as parseExactAgentProfileDiff } from "../profile-
|
|
3
|
-
import { t as sealAgentCandidateBundle } from "../bundle-
|
|
4
|
-
import { _ as sealTerminalDigest, a as consumePreparedCandidateExecution, b as sealAgentCandidateModelSettlement, c as withinCandidateCleanupDeadline, d as assertTerminalMatchesClaim, f as assertTerminalMatchesStaged, g as requireStagedTerminal, h as rejectedStage, i as beginPreparedCandidateDisposal, l as assertRecoveryMatchesStaged, m as rejectedFinish, n as executePreparedAgentCandidate, o as candidateClaimFileInternals, p as recoveredTerminalRecord, r as assertPreparedCandidateIntegrity, s as candidateCleanupDeadline, t as prepareAgentCandidateExecution, u as assertTerminalAllowedInPhase, v as terminalRecord, w as verifyAgentCandidateBundle, x as exactProcessProviderAsCandidateExecutor, y as createProtectedAgentCandidateModelPort } from "../prepare-
|
|
1
|
+
import { A as verifiedArtifactChunks, F as embeddedCandidateArtifact, P as deepFreezeCandidate, a as verifyAgentCandidateWorkspaceArtifacts, c as createAgentCandidateWorkspacePort, h as workspaceLimits, i as readAgentCandidateWorkspaceArtifactFiles, j as canonicalCandidateBytes$1, n as captureAgentCandidateWorkspaceTreeToArtifacts, o as verifyAgentCandidateWorkspaceTree, p as captureAgentCandidateWorkspaceFiles, r as materializeAgentCandidateWorkspaceFromArtifacts, s as captureAgentCandidateWorkspace, t as captureAgentCandidateWorkspaceToArtifacts, x as candidateWorkspaceManifest } from "../workspace-streams-BqNM06y4.js";
|
|
2
|
+
import { a as applyExactAgentProfileDiff, b as parseExactCandidateProfile, i as agentCandidateProfileAsAgentProfile, o as assertCandidateProfileBinding, p as freezeGenericAgentCandidateProfile, v as parseExactAgentProfile, y as parseExactAgentProfileDiff } from "../profile-DN8Dw2Kp.js";
|
|
3
|
+
import { t as sealAgentCandidateBundle } from "../bundle-vFFiCigS.js";
|
|
4
|
+
import { _ as sealTerminalDigest, a as consumePreparedCandidateExecution, b as sealAgentCandidateModelSettlement, c as withinCandidateCleanupDeadline, d as assertTerminalMatchesClaim, f as assertTerminalMatchesStaged, g as requireStagedTerminal, h as rejectedStage, i as beginPreparedCandidateDisposal, l as assertRecoveryMatchesStaged, m as rejectedFinish, n as executePreparedAgentCandidate, o as candidateClaimFileInternals, p as recoveredTerminalRecord, r as assertPreparedCandidateIntegrity, s as candidateCleanupDeadline, t as prepareAgentCandidateExecution, u as assertTerminalAllowedInPhase, v as terminalRecord, w as verifyAgentCandidateBundle, x as exactProcessProviderAsCandidateExecutor, y as createProtectedAgentCandidateModelPort } from "../prepare-B6SQA12v.js";
|
|
5
5
|
import { agentCandidateArtifactRefSchema, agentCandidateWorkspaceManifestMaterialSchema, agentCandidateWorkspaceSnapshotEvidenceSchema } from "@tangle-network/agent-interface";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { linkSync } from "node:fs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as writeWorkerSteerAcknowledgement,
|
|
2
|
-
import { b as resolveRedactor, m as errMessage, u as detachedFrozen } from "./jsonl-file-
|
|
3
|
-
import { Dt as failedItems, Tt as checkVerdictOf, Y as INBOX_RECEIPT_KEY, _ as withDriverExecutor, _t as CheckUnavailableError, b as createExecutorRegistry, nt as createPeerMailbox, v as InMemoryResultBlobStore, y as InMemorySpawnJournal } from "./supervisor-
|
|
4
|
-
import { c as writeRunCancellation, i as readRunCancellation, r as readRunCancelRequest, t as applyRunCancellation, v as FileCoordinationLog } from "./run-cancellation-
|
|
5
|
-
import { a as admitRuntimeSpawn, i as workerSettlement, n as resolveJsonPointer, o as safeJsonText, r as textBytes, t as createMapRouting } from "./coordination-map-routing-
|
|
1
|
+
import { $t as FileResultBlobStore, B as FileSpawnJournal, C as writeWorkerSteerAcknowledgement, H as spawnJournalRecordEvents, M as workerTraceAnalysisStore, Pt as runtimeGraphMetadataKey, Xr as settlementFailureCause, _i as contentAddress, et as meterRuntimeOwnedAccounting, f as readWorkerCancelRequests, h as readWorkerSteerRequests, j as parseWorkerToolTraceArtifact, ji as assertValidBudget, l as claimWorkerSteerDelivery, m as readWorkerSteerAcknowledgement, or as isLiveNodeStatus, p as readWorkerCancellation, sr as isTerminalNodeStatus, vt as resolveSpawnResourcePaths, x as writeWorkerCancellation } from "./scope-DzhBJrRN.js";
|
|
2
|
+
import { b as resolveRedactor, m as errMessage, u as detachedFrozen } from "./jsonl-file-CeVYTIQJ.js";
|
|
3
|
+
import { Dt as failedItems, Tt as checkVerdictOf, Y as INBOX_RECEIPT_KEY, _ as withDriverExecutor, _t as CheckUnavailableError, b as createExecutorRegistry, nt as createPeerMailbox, v as InMemoryResultBlobStore, y as InMemorySpawnJournal } from "./supervisor-B6sl14OR.js";
|
|
4
|
+
import { c as writeRunCancellation, i as readRunCancellation, r as readRunCancelRequest, t as applyRunCancellation, v as FileCoordinationLog } from "./run-cancellation-BCuu6khW.js";
|
|
5
|
+
import { a as admitRuntimeSpawn, i as workerSettlement, n as resolveJsonPointer, o as safeJsonText, r as textBytes, t as createMapRouting } from "./coordination-map-routing-DVjW5Gx0.js";
|
|
6
6
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest } from "@tangle-network/agent-interface";
|
|
7
7
|
import { argHash, errorStreakDetector, observeAll, repeatedActionDetector } from "@tangle-network/agent-eval";
|
|
8
8
|
import { registry } from "zod";
|
|
@@ -2389,7 +2389,8 @@ async function waitForWakeCondition(env, input, startedAt) {
|
|
|
2389
2389
|
let cursorIdle = false;
|
|
2390
2390
|
for (;;) {
|
|
2391
2391
|
while (bus.pending(wakeEventKinds) === 0 && !workerQuestionPending(env) && !outsideWake && !input.signal.aborted && Date.now() < wakeAt) {
|
|
2392
|
-
const
|
|
2392
|
+
const { running, unqueued } = workers.openWork();
|
|
2393
|
+
const drained = !cursorIdle && (running.length > 0 || unqueued.length > 0) ? ensureDrain(env) : new Promise(() => void 0);
|
|
2393
2394
|
if (await Promise.race([
|
|
2394
2395
|
drained.then((value) => value ? "drained" : "idle"),
|
|
2395
2396
|
queuedEvent.then(() => "queued"),
|
|
@@ -3483,7 +3484,7 @@ function createSettlementDrain({ opts, ledger, unwatchWorker, bus, analysis, map
|
|
|
3483
3484
|
return true;
|
|
3484
3485
|
};
|
|
3485
3486
|
const settleCommitted = async (workerId) => {
|
|
3486
|
-
if (hooked.has(workerId)) return;
|
|
3487
|
+
if (hooked.has(workerId) || opts.scope.view.nodes.some((node) => node.id === workerId)) return;
|
|
3487
3488
|
const settled = opts.scope.resume?.settled.find((s) => s.handle.id === workerId);
|
|
3488
3489
|
if (settled === void 0) throw new Error(`committed worker ${workerId} has no settlement in the resumed journal`);
|
|
3489
3490
|
hooked.add(workerId);
|
|
@@ -4366,7 +4367,7 @@ function spawnWorkerTool(ctx) {
|
|
|
4366
4367
|
const { profileTable } = ctx;
|
|
4367
4368
|
return {
|
|
4368
4369
|
name: "spawn_worker",
|
|
4369
|
-
description: "Start a worker the driver will drive. `profile` is the worker or another driver; `task` is what it should do. Reserves budget from the conserved pool and fails closed. Pass an optional `budget` (per-field) to give a sub-task more or less than the default — it merges over the per-worker default; the conserved pool is still the hard fence. Each worker reserves
|
|
4370
|
+
description: "Start a worker the driver will drive. `profile` is the worker or another driver; `task` is what it should do. Reserves budget from the conserved pool and fails closed. Pass an optional `budget` (per-field) to give a sub-task more or less than the default — it merges over the per-worker default; the conserved pool is still the hard fence. Each worker reserves only the channels capped by the pool. workerSlots sets concurrency. A funded worker waits with `status: \"queued\"` when every slot is busy and starts when one frees. A new worker whose budget cannot fit is refused immediately. Wait for settlements or request a smaller allocation before trying again. End your turn to be woken with results. Pass a `key` naming the assignment to make it run-once ACROSS restarts: a key that already completed returns the finished result (`resumed: \"completed\"` — no work re-runs, nothing is spent). A keyed worker that settled with a `budgetStop` keeps its session for a while: spawn the same key with a larger `budget` and a new worker continues that same session where it stopped (`resumed: \"continued\"`, `priorWorkerId`), or cancel_worker the stopped worker to release it. A key whose prior attempt failed (`down`) spawns fresh and says so (`resumed: \"retried\"`), and a key the process died with IN FLIGHT retries under the same key when the executor provably died with the process (an inline worker — the same `resumed: \"retried\"`, naming the interruption). A key with no terminal receipt whose execution may still exist elsewhere (sandbox, CLI bridge, router) is refused (`error: \"in-doubt\"`) until its exact prior execution is recovered. A key still running is refused (`error: \"duplicate-key\"`). Returns `freeSlots`: how many MORE workers start at once (`null` = no slot bound), and `queued`: how many of your workers wait for a slot. Parallel workers finish the run sooner than one at a time." + (profileTable === void 0 ? "" : " This run has a profiles table: pass `profile` as one of the table's names to run that exact profile, or write a new profile under a name the table does not hold."),
|
|
4370
4371
|
inputSchema: {
|
|
4371
4372
|
type: "object",
|
|
4372
4373
|
properties: {
|
|
@@ -4486,7 +4487,7 @@ async function spawnWorkerHandler(ctx, raw) {
|
|
|
4486
4487
|
function observeAgentTool(ctx) {
|
|
4487
4488
|
return {
|
|
4488
4489
|
name: "observe_agent",
|
|
4489
|
-
description: "Inspect a worker WHILE IT RUNS, not only after it finishes: status, spend so far, and `progress` — how long since it last did anything (`idleMs`), whether that counts as stalled, how many turns it has taken, the last tools/files it touched (`recentActivity`), what its executor CHANGED about the profile you gave it (`derived` — an MCP config it materialized, an extension it had to add), whether a steer can even reach it (`steerable`), and how many steers it has not yet read (`pendingMessages`). For a worker that leads its own team, `progress.team` counts the agents below it (working, queued, done, down) and its idle clock reads the newest activity anywhere in that team, so a lead whose workers are busy is not stalled. A queued worker waits for a worker slot and is never stalled. A worker
|
|
4490
|
+
description: "Inspect a worker WHILE IT RUNS, not only after it finishes: status, spend so far, and `progress` — how long since it last did anything (`idleMs`), whether that counts as stalled, how many turns it has taken, the last tools/files it touched (`recentActivity`), what its executor CHANGED about the profile you gave it (`derived` — an MCP config it materialized, an extension it had to add), whether a steer can even reach it (`steerable`), and how many steers it has not yet read (`pendingMessages`). For a worker that leads its own team, `progress.team` counts the agents below it (working, queued, done, down) and its idle clock reads the newest activity anywhere in that team, so a lead whose workers are busy is not stalled. A queued worker waits for a worker slot and is never stalled. A completed worker reports its terminal status and output before your next wake. `settlementPending` means its event has not yet been delivered. The output is what the worker submitted, often a plain string, else its provider result. Omit `outputPath` to read it whole; [\"content\"] selects a provider result without its events. Large outputs return a bounded JSON `outputPage`; repeat with `outputOffset: outputPage.nextOffset` until it is null, concatenate page text, then parse the JSON. Offsets and limits count UTF-16 characters. The full artifact stays retained; an outRef is a content address, not a workspace path. Use this BEFORE steer_agent: a steer is only worth sending when the progress says the worker is on the wrong path or has stopped making any.",
|
|
4490
4491
|
inputSchema: {
|
|
4491
4492
|
type: "object",
|
|
4492
4493
|
properties: {
|
|
@@ -4630,7 +4631,7 @@ async function observeAgentHandler(ctx, raw) {
|
|
|
4630
4631
|
progress: progress ?? null,
|
|
4631
4632
|
...pending ? {
|
|
4632
4633
|
settlementPending: pending,
|
|
4633
|
-
hint: `this worker
|
|
4634
|
+
hint: `this worker's ${pending.kind} settlement awaits delivery at your next wake`
|
|
4634
4635
|
} : {}
|
|
4635
4636
|
};
|
|
4636
4637
|
}
|
|
@@ -5133,4 +5134,4 @@ function createResumeReplay({ opts, bus, ledger, analysis, projectSettled }) {
|
|
|
5133
5134
|
}
|
|
5134
5135
|
export { downMessageRefusalReasons as a, createSteerAcknowledger as c, coordinationVerbNames as d, createFileRunContext as f, watchTrace as i, budgetOverspendText as l, withRunContext as m, createCoordinationToolsForManager as n, createEventBus as o, createInMemoryRunContext as p, defaultToolDetectors as r, createCancelAcknowledger as s, createCoordinationTools as t, normalizeAnalyzeOnSettle as u };
|
|
5135
5136
|
|
|
5136
|
-
//# sourceMappingURL=coordination-manager-
|
|
5137
|
+
//# sourceMappingURL=coordination-manager-RSJg5GmY.js.map
|