@tangle-network/agent-runtime 10.0.9 → 10.0.11

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 (67) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/{activation-Gi19oho7.d.ts → activation-B9c5eSla.d.ts} +13 -5
  3. package/dist/{activation-D4hAza0W.js → activation-DikG4Nxq.js} +2 -2
  4. package/dist/{activation-D4hAza0W.js.map → activation-DikG4Nxq.js.map} +1 -1
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/agent.js +2 -2
  7. package/dist/{delegate-C53pe9th.js → delegate-BEBd1qxi.js} +2 -2
  8. package/dist/{delegate-C53pe9th.js.map → delegate-BEBd1qxi.js.map} +1 -1
  9. package/dist/{driver-control-acknowledgers-eETy7SAi.js → driver-control-acknowledgers-C80hsHbs.js} +23 -7
  10. package/dist/driver-control-acknowledgers-C80hsHbs.js.map +1 -0
  11. package/dist/durable.d.ts +1 -1
  12. package/dist/durable.js +4 -4
  13. package/dist/{graph-CRaquJhB.js → graph-BP927YH9.js} +6 -5
  14. package/dist/{graph-CRaquJhB.js.map → graph-BP927YH9.js.map} +1 -1
  15. package/dist/{graph-registry-CRskE_Yp.js → graph-registry-BmghD_VO.js} +5 -2
  16. package/dist/graph-registry-BmghD_VO.js.map +1 -0
  17. package/dist/{graph-registry-CGKyYabE.js → graph-registry-DQ2-dA0X.js} +1 -1
  18. package/dist/{improve-CEOS1Ijj.js → improve-CaYHi8P-.js} +55 -15
  19. package/dist/improve-CaYHi8P-.js.map +1 -0
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +9 -8
  22. package/dist/index.js.map +1 -1
  23. package/dist/intelligence.d.ts +2 -2
  24. package/dist/intelligence.js +3 -3
  25. package/dist/kernel.d.ts +1 -1
  26. package/dist/kernel.js +11 -11
  27. package/dist/{loop-runner-2vKhhbQA.js → loop-runner-9OJItBqr.js} +2 -2
  28. package/dist/{loop-runner-2vKhhbQA.js.map → loop-runner-9OJItBqr.js.map} +1 -1
  29. package/dist/loop-runner-bin.d.ts +1 -1
  30. package/dist/loop-runner-bin.js +1 -1
  31. package/dist/{loop-runner-CPxQyiWQ.d.ts → loop-runner-kGLe3PSM.d.ts} +2 -2
  32. package/dist/mcp/bin.js +2 -2
  33. package/dist/mcp/index.d.ts +1 -1
  34. package/dist/mcp/index.js +4 -4
  35. package/dist/profiles.d.ts +1 -1
  36. package/dist/{provision-supervisor-CzKfUJIg.js → provision-supervisor-m_kRnNQf.js} +3 -3
  37. package/dist/{provision-supervisor-CzKfUJIg.js.map → provision-supervisor-m_kRnNQf.js.map} +1 -1
  38. package/dist/{run-state-Dbi2PVOt.js → run-state-Cd_Gvsjw.js} +2 -2
  39. package/dist/{run-state-Dbi2PVOt.js.map → run-state-Cd_Gvsjw.js.map} +1 -1
  40. package/dist/{runtime-CZ-VnOr5.js → runtime-CZc-cMrk.js} +13 -13
  41. package/dist/{runtime-CZ-VnOr5.js.map → runtime-CZc-cMrk.js.map} +1 -1
  42. package/dist/{search-executor-C0aVtzXX.js → search-executor-BHypQDeY.js} +2 -2
  43. package/dist/{search-executor-C0aVtzXX.js.map → search-executor-BHypQDeY.js.map} +1 -1
  44. package/dist/{server-BwpXzcpm.js → server-D7Mq2Bn1.js} +2 -2
  45. package/dist/{server-BwpXzcpm.js.map → server-D7Mq2Bn1.js.map} +1 -1
  46. package/dist/{structural-rollout-CKNwDl0T.js → structural-rollout-BfFEGl9Q.js} +2 -2
  47. package/dist/{structural-rollout-CKNwDl0T.js.map → structural-rollout-BfFEGl9Q.js.map} +1 -1
  48. package/dist/{supervise-CkIKRWDV.js → supervise-BX3fLhUS.js} +33 -33
  49. package/dist/supervise-BX3fLhUS.js.map +1 -0
  50. package/dist/{supervisor-CAQI8ILe.js → supervisor-CNE2g7Wz.js} +61 -10
  51. package/dist/supervisor-CNE2g7Wz.js.map +1 -0
  52. package/dist/testing.d.ts +1 -1
  53. package/dist/testing.js +11 -11
  54. package/dist/tui/index.d.ts +1 -1
  55. package/dist/tui/index.js +1 -1
  56. package/dist/{types-BYiwLO2L.d.ts → types-CTeyeXgz.d.ts} +12 -3
  57. package/package.json +2 -2
  58. package/skills/agent-graphs/SKILL.md +40 -50
  59. package/skills/be-ambitious/SKILL.md +29 -25
  60. package/skills/build-with-agent-runtime/SKILL.md +17 -20
  61. package/skills/graph-designer/SKILL.md +1 -1
  62. package/skills/profile-authoring/SKILL.md +16 -11
  63. package/dist/driver-control-acknowledgers-eETy7SAi.js.map +0 -1
  64. package/dist/graph-registry-CRskE_Yp.js.map +0 -1
  65. package/dist/improve-CEOS1Ijj.js.map +0 -1
  66. package/dist/supervise-CkIKRWDV.js.map +0 -1
  67. package/dist/supervisor-CAQI8ILe.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-DG8yufqX.js";
2
- import { c as budgetOverspendText, f as createFileRunContext, i as createCoordinationToolsForManager, l as coordinationVerbNames, m as withRunContext, n as createSteerAcknowledger, p as createInMemoryRunContext, r as createCoordinationTools, t as createCancelAcknowledger, u as normalizeAnalyzeOnSettle } from "./driver-control-acknowledgers-eETy7SAi.js";
3
- import { $t as worktreeCliProfileMaterialization, B as toolResultText, C as captureReusableExecutorConfig, Ct as bridgeAdmissionRefusal, Gt as fullProfileMaterialization, H as routerBrain, I as codeModeArguments, Jt as promptModelProfileMaterialization, K as providerOutputOptions, Kt as profileMaterializationAxes$1, L as codeModeModelOutput, Mt as bridgeRuntimeAttachmentsKey, Nt as bridgeRuntimeEnvKey, Pt as bridgeStopSignalKey, Q as createInbox, Qt as unsupportedProfileDimensions, R as createCodeModeTools, S as bindReusableExecutorExecutionId, T as snapshotExecutorConfig, Ut as controlProfileMaterialization, V as createRouterTranscript, Vt as assertProfileMaterialization, W as resolveAgentEnvironmentProvider, Wt as defineProfileMaterializationContract, Yt as renderUnsupported, Z as INBOX_RECEIPT_KEY, Zt as sandboxProfileMaterialization, _ as isDriverSpec, _t as preflightPublicCoordination, a as awaitRootWake, at as isPeerMailEnvelope, d as bestDelivered, dt as abandonablePending, f as runFinalizer, ft as classifyDriverFailure, g as driverExecutorFactory, gt as upstreamUnavailableSignal, h as driverChild, ht as undispatchedCredentialExit, i as assertRunParking, l as sleepScopeWait, lt as DriverAttemptsExhaustedError, m as createRootHandle, mt as transientFailureKind, n as createSupervisor, nt as PEER_MAIL_WIRE_KEY, o as bindScopeParkingDrain, p as runTree, pt as summarizeDriverAttempts, qt as promptControlProfileMaterialization, r as RunParkedError, s as isRunParked, u as withRunParking, ut as HarnessTurnFailedError, vt as CheckUnavailableError, w as createExecutor, wt as bridgeModelRouteRefusal, yt as gateFactoryOnDeliverable } from "./supervisor-CAQI8ILe.js";
2
+ import { c as budgetOverspendText, f as createFileRunContext, i as createCoordinationToolsForManager, l as coordinationVerbNames, m as withRunContext, n as createSteerAcknowledger, p as createInMemoryRunContext, r as createCoordinationTools, t as createCancelAcknowledger, u as normalizeAnalyzeOnSettle } from "./driver-control-acknowledgers-C80hsHbs.js";
3
+ import { $t as worktreeCliProfileMaterialization, B as toolResultText, C as captureReusableExecutorConfig, Ct as bridgeAdmissionRefusal, Gt as fullProfileMaterialization, H as routerBrain, I as codeModeArguments, Jt as promptModelProfileMaterialization, K as providerOutputOptions, Kt as profileMaterializationAxes$1, L as codeModeModelOutput, Mt as bridgeRuntimeAttachmentsKey, Nt as bridgeRuntimeEnvKey, Pt as bridgeStopSignalKey, Q as createInbox, Qt as unsupportedProfileDimensions, R as createCodeModeTools, S as bindReusableExecutorExecutionId, T as snapshotExecutorConfig, Ut as controlProfileMaterialization, V as createRouterTranscript, Vt as assertProfileMaterialization, W as resolveAgentEnvironmentProvider, Wt as defineProfileMaterializationContract, Yt as renderUnsupported, Z as INBOX_RECEIPT_KEY, Zt as sandboxProfileMaterialization, _ as isDriverSpec, _t as preflightPublicCoordination, a as awaitRootWake, at as isPeerMailEnvelope, d as bestDelivered, dt as abandonablePending, f as runFinalizer, ft as classifyDriverFailure, g as driverExecutorFactory, gt as upstreamUnavailableSignal, h as driverChild, ht as undispatchedCredentialExit, i as assertRunParking, l as sleepScopeWait, lt as DriverAttemptsExhaustedError, m as createRootHandle, mt as transientFailureKind, n as createSupervisor, nt as PEER_MAIL_WIRE_KEY, o as bindScopeParkingDrain, p as runTree, pt as summarizeDriverAttempts, qt as promptControlProfileMaterialization, r as RunParkedError, s as isRunParked, u as withRunParking, ut as HarnessTurnFailedError, vt as CheckUnavailableError, w as createExecutor, wt as bridgeModelRouteRefusal, yt as gateFactoryOnDeliverable } from "./supervisor-CNE2g7Wz.js";
4
4
  import { a as freezeDetached, c as supervisionRunNamespace, i as externalExecutionId, l as workerAssignmentNamespace, n as childCoordinationOwner, o as freezeDetachedProfile, r as coordinationEventId, s as rootCoordinationOwner, t as canonicalExecution } from "./supervise-identity-QavM_M4r.js";
5
5
  import { a as errMessage, c as errorStack, i as causeChain, l as errorText, n as detachedSnapshot, o as errorHttpStatus, u as defaultRedactor } from "./snapshot-BKI_w3JD.js";
6
6
  import { t as composeRuntimeHooks } from "./runtime-hooks-CsW2pfFk.js";
@@ -14,7 +14,7 @@ import { n as createStdioToolServer } from "./tool-server-Cb7LBW4e.js";
14
14
  import { A as withBudgetResources, D as addResourceSpend, S as unmeteredSpend, T as zeroSpend, c as errorMessage, f as isAsyncIterable, i as chargedTokens, k as resourceTelemetry, m as promptCacheTokenClasses, n as addSpend, v as sleep, w as withTimeout } from "./util-qsH5cC9S.js";
15
15
  import { d as teardownExecutor, i as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, l as isDeadlineAbortReason, o as armDeadlineTimer } from "./deadline-CySmJ_0S.js";
16
16
  import { a as concreteProfileModel, c as profileModelExecutionSettings, l as profileProviderModel, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile, v as agentHarness, y as harnessRunsAgent } from "./model-policy-DTbTFyOG.js";
17
- import { a as graphRegistry, c as loadGraph } from "./graph-registry-CRskE_Yp.js";
17
+ import { a as graphRegistry, c as loadGraph } from "./graph-registry-BmghD_VO.js";
18
18
  import { ATTR, LINK_KIND_ATTR, agentIdentityAttributes } from "@tangle-network/agent-trace-contract";
19
19
  import { ProxySecretScopeSchema, ProxySecretsSchema, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, mergeProxySecretBindings, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
20
20
  import { toolSpansToTraceAnalysisStore } from "@tangle-network/agent-eval";
@@ -122,11 +122,13 @@ function assertSuperviseOptionKeys(opts, context) {
122
122
  function captureDeliverable(deliverable, context) {
123
123
  if (typeof deliverable !== "object" || deliverable === null || Array.isArray(deliverable)) throw new ValidationError(`${context}: deliverable must be an object`);
124
124
  if (typeof deliverable.check !== "function") throw new ValidationError(`${context}: deliverable.check must be a function`);
125
+ if (deliverable.requireSubmission !== void 0 && typeof deliverable.requireSubmission !== "boolean") throw new ValidationError(`${context}: deliverable.requireSubmission must be a boolean`);
125
126
  if (deliverable.checkState !== void 0 && typeof deliverable.checkState !== "function") throw new ValidationError(`${context}: deliverable.checkState must be a function`);
126
127
  if (deliverable.feedback !== void 0 && deliverable.feedback !== "verbatim" && deliverable.feedback !== "pass-only") throw new ValidationError(`${context}: deliverable.feedback must be 'verbatim' or 'pass-only'`);
127
128
  return Object.freeze({
128
129
  ...detachedSnapshot({
129
130
  describe: deliverable.describe,
131
+ ...deliverable.requireSubmission === void 0 ? {} : { requireSubmission: deliverable.requireSubmission },
130
132
  ...deliverable.feedback === void 0 ? {} : { feedback: deliverable.feedback },
131
133
  ...deliverable.sealed === void 0 ? {} : { sealed: deliverable.sealed === true }
132
134
  }, `${context} configuration`),
@@ -4636,17 +4638,9 @@ function driverInitialMessages(opts, system, task, scope) {
4636
4638
  }
4637
4639
  // src/runtime/supervise/supervisor-agent-profile.ts
4638
4640
  /**
4639
- * The completion check of a managed child that no `resolveDeliverable` gave a check of its own, a
4640
- * `run_graph` node included: its accepted submission settles it, and the result goes to the manager
4641
- * that assigned the task. The run's own check judges the run's result, never a child's narrower
4642
- * assignment. Held to the run's check, a child's submission is refused for as long as the run's
4643
- * is: every node of test-canary-graph-tools-20261017a, and the `delay` child of
4644
- * test-retained-root-wake-20261018b ("Expected: the canary runs to its deadline"), was
4645
- * refused at submit_result, never settled, and its manager was never woken with it.
4646
- *
4647
- * It is the one check a harness manager may hold without a continuation policy: it accepts every
4648
- * submission, so there is nothing to send the child back for. test-canary-graph-tools-20261018c and
4649
- * -d had every harness-run graph lead refused at spawn until this exemption.
4641
+ * A managed child without a separate assignment check returns its own submission to its parent.
4642
+ * The run's check belongs to the root. A configured continuation gives the child another turn
4643
+ * when it returns early. Graph nodes can also submit directly in runs without a continuation.
4650
4644
  */
4651
4645
  const ownSubmissionDeliverable = Object.freeze({
4652
4646
  describe: "the result your task asks for; it goes to the manager that assigned the task, and the run's own check judges that manager's result",
@@ -5336,7 +5330,9 @@ var DriverRetryLoop = class {
5336
5330
  pending
5337
5331
  };
5338
5332
  this.sameIdle = progressed ? void 0 : extend(this.sameIdle, error);
5339
- if (classification !== "terminal" && !(classification === "unavailable" && pending === void 0 && this.run.budget().deadlineMs > 0 && (RATE_LIMIT_SIGNALS.has(refusal) || PLACEMENT_SIGNALS.has(refusal))) && !this.run.signal.aborted && budgetStop(this.run.budget(), this.limits.now()) === void 0 && (this.sameIdle?.count ?? 0) >= 3) {
5333
+ const observingRoot = !this.run.nested && classification === "transient" && error instanceof RetainedExecutionPendingError && error.phase === "execution" && error.pendingCause === "transport";
5334
+ const waitingForCapacity = classification === "unavailable" && pending === void 0 && (RATE_LIMIT_SIGNALS.has(refusal) || PLACEMENT_SIGNALS.has(refusal));
5335
+ if (classification !== "terminal" && !(this.run.budget().deadlineMs > 0 && (observingRoot || waitingForCapacity)) && !this.run.signal.aborted && budgetStop(this.run.budget(), this.limits.now()) === void 0 && (this.sameIdle?.count ?? 0) >= 3) {
5340
5336
  const stop = pending === void 0 || classification === "unavailable" ? "repeated-failure" : "pending-unresolved";
5341
5337
  await this.emit({
5342
5338
  ...this.failureRecord(failure),
@@ -6445,7 +6441,7 @@ async function actExternalManager(config, task, scope) {
6445
6441
  }
6446
6442
  const contractDeclared = deps.deliverable !== void 0;
6447
6443
  const finalize = managerFinalizer(deps, session);
6448
- return await settleManagerOutput(config, mcp, contractDeclared, finalize, await driveManagerTurns({
6444
+ return await settleManagerOutput(config, mcp, scope, contractDeclared, finalize, await driveManagerTurns({
6449
6445
  config,
6450
6446
  session,
6451
6447
  contractDeclared,
@@ -6473,7 +6469,7 @@ async function actExternalManager(config, task, scope) {
6473
6469
  }
6474
6470
  }
6475
6471
  /** Return the manager's output in eligibility order, closing its analysis with it. */
6476
- async function settleManagerOutput(config, mcp, contractDeclared, finalize, candidate) {
6472
+ async function settleManagerOutput(config, mcp, scope, contractDeclared, finalize, candidate) {
6477
6473
  const deps = config.deps;
6478
6474
  if (!contractDeclared) await mcp.drainResolved();
6479
6475
  const submitted = mcp.submittedResult();
@@ -6486,19 +6482,23 @@ async function settleManagerOutput(config, mcp, contractDeclared, finalize, cand
6486
6482
  return submitted.result;
6487
6483
  }
6488
6484
  if (contractDeclared) {
6489
- await mcp.finishAnalysis({
6490
- status: "done",
6491
- output: candidate
6492
- });
6493
- return candidate;
6494
- }
6495
- const finalized = await finalize();
6496
- if (finalized !== void 0) {
6497
- await mcp.finishAnalysis({
6498
- status: "done",
6499
- output: finalized
6500
- });
6501
- return finalized;
6485
+ if (!(deps.deliverable === ownSubmissionDeliverable || deps.deliverable?.requireSubmission === true) || candidate !== void 0 || (config.nodeContextSeed?.depth ?? 0) === 0) {
6486
+ await mcp.finishAnalysis({
6487
+ status: "done",
6488
+ output: candidate
6489
+ });
6490
+ return candidate;
6491
+ }
6492
+ if (exhaustedBudgetChannels(scope.budget, Date.now()) === void 0) throw new Error("The worker ended without an accepted result for its assignment.");
6493
+ } else {
6494
+ const finalized = await finalize();
6495
+ if (finalized !== void 0) {
6496
+ await mcp.finishAnalysis({
6497
+ status: "done",
6498
+ output: finalized
6499
+ });
6500
+ return finalized;
6501
+ }
6502
6502
  }
6503
6503
  const harnessResult = config.driveHarness.resultArtifact?.();
6504
6504
  if (config.nodeContextSeed !== void 0 && config.nodeContextSeed.depth > 0 && harnessResult?.out !== void 0 && harnessResult.out !== null) {
@@ -6509,6 +6509,7 @@ async function settleManagerOutput(config, mcp, contractDeclared, finalize, cand
6509
6509
  });
6510
6510
  return harnessResult.out;
6511
6511
  }
6512
+ if (contractDeclared) throw new Error("The worker ended without an accepted result for its assignment.");
6512
6513
  await mcp.finishAnalysis({ status: "done" });
6513
6514
  }
6514
6515
  // src/runtime/supervise/supervisor-router-config.ts
@@ -6995,7 +6996,7 @@ function nestedDeliverableDeps(child) {
6995
6996
  ...checked ? { onAcceptedSubmission: () => {
6996
6997
  child.acceptedSubmission = true;
6997
6998
  } } : {},
6998
- ...checked && !child.ownSubmission && options.continuation && isExternalSupervisor(admitted.authorized) ? {
6999
+ ...checked && options.continuation && isExternalSupervisor(admitted.authorized) ? {
6999
7000
  continuation: options.continuation,
7000
7001
  ...options.runDir === void 0 ? {} : { continuationDir: resolve(options.runDir, CONTINUATIONS_DIR, "managers", encodeURIComponent(ownerId)) }
7001
7002
  } : {}
@@ -7444,7 +7445,6 @@ function managedWorker(env, seat, admitted, spawnContext) {
7444
7445
  subtreeGraph,
7445
7446
  ownFlow,
7446
7447
  managerDeliverable: ownSubmission ? ownSubmissionDeliverable : admitted.childDeliverable,
7447
- ownSubmission,
7448
7448
  acceptedSubmission: false,
7449
7449
  unassessedOutput: false
7450
7450
  };
@@ -9502,4 +9502,4 @@ function superviseWithContext(profile, task, opts, brain) {
9502
9502
  }
9503
9503
  export { validateGraphTopology as A, allWorkersStalled as B, createFlowRun as C, validateFlowGraph as D, routeFlowOf as E, dumbContinuationPassPrompt as F, areaUnderCurve as G, noProgressFor as H, formatPromptHandle as I, renderAnytimeTable as J, bestSoFar as K, kernelPromptRegistry as L, createPromptRegistry as M, delegatesWorkerBriefPrompt as N, defaultEdgeTraversalCap as O, dumbContinuationFailPrompt as P, naiveContinuationPrompt as R, GraphRouteError as S, journaledGateDecider as T, plateau as U, anyOf as V, anytimeReport as W, createSupervisorSpanRecorder as Y, graphFlowSpawnProfile as _, bridgeProfileRefusal as a, serveCoordinationMcp as b, ASSISTANT_REASONING_SPAN as c, runToolSpans as d, UNPROVEN_CONTINUITY as f, createGraphOverlay as g, runBrainLoop as h, workerFromBackend as i, analyzesFindingsReportPrompt as j, graphRootProfile as k, ASSISTANT_TEXT_SPAN as l, driverAgent as m, superviseFleetCapabilities as n, supervisorAgent as o, composeReentryTask as p, plateauLength as q, superviseWithTestBrain as r, supervisorAgentWithTestBrain as s, supervise as t, rootStreamToolSpans as u, profileGuidanceComposer as v, flowRootProfile as w, coordinationControlToolNames as x, superviseRootProfile as y, promptHandle as z };
9504
9504
 
9505
- //# sourceMappingURL=supervise-CkIKRWDV.js.map
9505
+ //# sourceMappingURL=supervise-BX3fLhUS.js.map