@tangle-network/agent-runtime 0.299.3 → 0.301.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/{activation-Bhp8dYV5.d.ts → activation-CRgEJutr.d.ts} +3 -3
  2. package/dist/{activation-DqWmWTyB.js → activation-V6aaOlZV.js} +2 -2
  3. package/dist/{activation-DqWmWTyB.js.map → activation-V6aaOlZV.js.map} +1 -1
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-DzTvehd6.js → coordination-driver-vNrdQBSH.js} +317 -211
  7. package/dist/coordination-driver-vNrdQBSH.js.map +1 -0
  8. package/dist/{delegate-qNq_wnQo.js → delegate-B-jFJcbW.js} +5 -5
  9. package/dist/delegate-B-jFJcbW.js.map +1 -0
  10. package/dist/durable.d.ts +3 -3
  11. package/dist/durable.js +116 -4
  12. package/dist/durable.js.map +1 -1
  13. package/dist/{graph-DN0lm24q.js → graph-Dwv_hQB_.js} +5 -5
  14. package/dist/graph-Dwv_hQB_.js.map +1 -0
  15. package/dist/{improvement-cycle-D6cPLi6k.js → improvement-cycle-Cf37Kexd.js} +3 -3
  16. package/dist/{improvement-cycle-D6cPLi6k.js.map → improvement-cycle-Cf37Kexd.js.map} +1 -1
  17. package/dist/{index-DonXCBsy.d.ts → index-CxBVmgqL.d.ts} +207 -74
  18. package/dist/index.d.ts +6 -6
  19. package/dist/index.js +7 -7
  20. package/dist/intelligence.d.ts +3 -3
  21. package/dist/intelligence.js +4 -4
  22. package/dist/kernel.d.ts +4 -4
  23. package/dist/kernel.js +9 -9
  24. package/dist/{loop-runner-bin-DKfdYEK-.js → loop-runner-bin-C8MI8N1A.js} +3 -3
  25. package/dist/{loop-runner-bin-DKfdYEK-.js.map → loop-runner-bin-C8MI8N1A.js.map} +1 -1
  26. package/dist/{loop-runner-bin-63H4stv1.d.ts → loop-runner-bin-DiTNiJNs.d.ts} +3 -3
  27. package/dist/loop-runner-bin.d.ts +1 -1
  28. package/dist/loop-runner-bin.js +1 -1
  29. package/dist/mcp/bin.js +3 -3
  30. package/dist/mcp/index.d.ts +6 -6
  31. package/dist/mcp/index.js +5 -5
  32. package/dist/{openai-tools-DvR82zEo.d.ts → openai-tools-BeogJ6V8.d.ts} +2 -2
  33. package/dist/profiles.d.ts +2 -2
  34. package/dist/{provision-supervisor-IXBlLHE0.js → provision-supervisor-CS0fBIhp.js} +13 -24
  35. package/dist/provision-supervisor-CS0fBIhp.js.map +1 -0
  36. package/dist/{runtime-CZR5n7Zy.js → runtime-6VPSJVeg.js} +28 -36
  37. package/dist/runtime-6VPSJVeg.js.map +1 -0
  38. package/dist/{search-method-DvU-fc-f.js → search-method-wTTS7mGG.js} +2 -2
  39. package/dist/{search-method-DvU-fc-f.js.map → search-method-wTTS7mGG.js.map} +1 -1
  40. package/dist/{server-CSSopQyk.js → server-BfHD5iLD.js} +3 -3
  41. package/dist/{server-CSSopQyk.js.map → server-BfHD5iLD.js.map} +1 -1
  42. package/dist/{stream-agent-turn-I3bb0eqF.d.ts → stream-agent-turn-B1ipFtOc.d.ts} +4 -2
  43. package/dist/{substrate-UjsxukjZ.d.ts → substrate-DKBMd0Dl.d.ts} +2 -2
  44. package/dist/{supervise-Bu2rNYsK.js → supervise-BJrEC2Mh.js} +202 -64
  45. package/dist/supervise-BJrEC2Mh.js.map +1 -0
  46. package/dist/{supervisor-CQSu5XGl.js → supervisor-DA_nvF-h.js} +563 -181
  47. package/dist/supervisor-DA_nvF-h.js.map +1 -0
  48. package/dist/testing.d.ts +2 -2
  49. package/dist/testing.js +12 -12
  50. package/dist/tui/index.d.ts +1 -1
  51. package/dist/tui/index.js +1 -1
  52. package/dist/{types-C73caP0U.d.ts → types-jD9mNnJM.d.ts} +61 -11
  53. package/package.json +1 -1
  54. package/skills/profile-authoring/SKILL.md +3 -3
  55. package/skills/supervise/SKILL.md +2 -2
  56. package/dist/coordination-driver-DzTvehd6.js.map +0 -1
  57. package/dist/delegate-qNq_wnQo.js.map +0 -1
  58. package/dist/graph-DN0lm24q.js.map +0 -1
  59. package/dist/provision-supervisor-IXBlLHE0.js.map +0 -1
  60. package/dist/runtime-CZR5n7Zy.js.map +0 -1
  61. package/dist/supervise-Bu2rNYsK.js.map +0 -1
  62. package/dist/supervisor-CQSu5XGl.js.map +0 -1
@@ -1,16 +1,16 @@
1
- import { $i as detachedFrozen, Ai as prepareJsonlAppend, Ar as contentAddress, At as createExecutor, Bn as InMemoryResultBlobStore, Ca as sleep, Cn as readPromptOptions, G as settledToIteration, Gn as insideCursorNamespace, Hn as SpawnEventIndex, La as armDeadlineTimer, M as withDriverExecutor, Mi as writeAllBytes, Nn as createPushTraceSource, Nt as createWorktreeCliExecutor, O as verdictFromJudgeScore, Qi as executableAgentSpecSnapshot, Qn as isTraceAnalysisStore, Sa as randomSuffix, Sn as assertBoxlessPromptOptions, Tn as runBrainLoop, Tt as rollingDispatch, Un as assertContentAddress, Vn as InMemorySpawnJournal, Wn as encodeResultBlob, Zi as executableAgentProfileSnapshot, _ as CheckUnavailableError, _a as cloneSpend, _n as createSandboxLineage, ba as isAbortError, da as notifySandboxEventObserver, ea as detachedSnapshot, ga as chargedTokens, gn as runAgentRounds, ha as addSpend, ji as readCommittedJsonLines, jt as createExecutorRegistry, ka as zeroSpend, mn as defaultSelectWinner, r as createSupervisor, vn as probeSandboxCapabilities, wa as stringifySafe, wn as routerBrain, ya as hasCompleteCacheBreakdown } from "./supervisor-CQSu5XGl.js";
1
+ import { $i as executableAgentProfileSnapshot, Bn as InMemoryResultBlobStore, Cn as readPromptOptions, Dt as rollingDispatch, Ea as stringifySafe, Ft as createWorktreeCliExecutor, G as settledToIteration, Gn as insideCursorNamespace, Hn as SpawnEventIndex, M as withDriverExecutor, Mi as prepareJsonlAppend, Mr as contentAddress, Mt as createExecutor, Ni as readCommittedJsonLines, Nn as createPushTraceSource, Nt as createExecutorRegistry, O as verdictFromJudgeScore, Pi as writeAllBytes, Qn as isTraceAnalysisStore, Sa as isAbortError, Sn as assertBoxlessPromptOptions, Ta as sleep, Tn as runBrainLoop, Un as assertContentAddress, Vn as InMemorySpawnJournal, Wn as encodeResultBlob, _ as CheckUnavailableError, _a as addSpend, _n as createSandboxLineage, ea as executableAgentSpecSnapshot, gn as runAgentRounds, ja as zeroSpend, mn as defaultSelectWinner, na as detachedSnapshot, pa as notifySandboxEventObserver, r as createSupervisor, ta as detachedFrozen, va as chargedTokens, vn as probeSandboxCapabilities, wa as randomSuffix, wn as routerBrain, xa as hasCompleteCacheBreakdown, ya as cloneSpend, za as armDeadlineTimer } from "./supervisor-DA_nvF-h.js";
2
2
  import { i as ConfigError, m as ValidationError, n as AnalystError, s as PlannerError } from "./errors-DodWX-cb.js";
3
- import { Q as sample, X as refine, Z as runAgentic, c as reconcileInterruptedSearchCalls, ct as strategyAuthorMethod, et as ObservationError, it as profileChatClient, nt as observe, o as dedicatedLane, r as runtimeShipDecision, rt as renderReport, u as searchExecutor } from "./search-method-DvU-fc-f.js";
3
+ import { Q as sample, X as refine, Z as runAgentic, c as reconcileInterruptedSearchCalls, ct as strategyAuthorMethod, et as ObservationError, it as profileChatClient, nt as observe, o as dedicatedLane, r as runtimeShipDecision, rt as renderReport, u as searchExecutor } from "./search-method-wTTS7mGG.js";
4
4
  import { c as profileModelExecutionSettings, i as concreteModelId, l as profileProviderModel, o as enforceTokenLimits, p as canonicalObservedModelParts, t as assertExecutableAgentProfile } from "./model-policy-DydyWTQg.js";
5
5
  import { F as sha256Bytes$1, N as immutableCandidateValue, g as WorkspaceScanLimitError, k as canonicalCandidateDigest$1, y as captureMaterializedWorkspace } from "./workspace-streams-D5gHJdTb.js";
6
6
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
7
7
  import { i as redactProtectedValue, r as redactProtectedReason } from "./protected-redaction-DylCC_ot.js";
8
- import { S as foldCoordinationRecords, y as createInMemoryRunContext } from "./coordination-driver-DzTvehd6.js";
9
- import { C as gateOnDeliverable, r as supervise, w as mapExecutorResult } from "./supervise-Bu2rNYsK.js";
8
+ import { O as foldCoordinationRecords, T as createInMemoryRunContext } from "./coordination-driver-vNrdQBSH.js";
9
+ import { C as gateOnDeliverable, r as supervise, w as mapExecutorResult } from "./supervise-BJrEC2Mh.js";
10
10
  import "./run-layout-DSCWdbX2.js";
11
- import "./provision-supervisor-IXBlLHE0.js";
12
- import "./delegate-qNq_wnQo.js";
13
- import "./graph-DN0lm24q.js";
11
+ import "./provision-supervisor-CS0fBIhp.js";
12
+ import "./delegate-B-jFJcbW.js";
13
+ import "./graph-Dwv_hQB_.js";
14
14
  import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, sha256Bytes, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
15
15
  import { CODING_HARNESSES, DEFAULT_TRACE_ANALYST_KINDS, InMemoryTraceStore, OUTPUT_VALUE, benjaminiHochberg, buildTrajectory, computeFindingId as computeFindingId$1, confidenceInterval, createTraceAnalyst, expandProfileAxes, makeFinding as makeFinding$1, pairedBootstrap, paretoFrontier, wilcoxonSignedRank, wilson } from "@tangle-network/agent-eval";
16
16
  import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
@@ -7167,7 +7167,7 @@ function chatWorkerSeam(opts) {
7167
7167
  /** The coordination verbs callable in code, and the `context.verbs` member each maps to. */
7168
7168
  const CODE_CALLABLE_VERBS = {
7169
7169
  spawn_worker: "spawnAgent",
7170
- await_event: "awaitEvent",
7170
+ await_settlement: "awaitSettlement",
7171
7171
  steer_agent: "steerAgent",
7172
7172
  observe_agent: "observeAgent",
7173
7173
  list_questions: "listQuestions",
@@ -7176,6 +7176,20 @@ const CODE_CALLABLE_VERBS = {
7176
7176
  read_journal: "readJournal",
7177
7177
  define_analyst: "defineAnalyst"
7178
7178
  };
7179
+ /** A program that spawns may join what it spawned. Not an MCP tool: a manager waits by ending its
7180
+ * turn, and only code inside one call needs to wait in place. */
7181
+ const AWAIT_SETTLEMENT_FACE = Object.freeze({
7182
+ name: "await_settlement",
7183
+ description: "Wait until at least one of the named workers has settled; returns { settled: [ids] }. Read each output with observe_agent. Takes nothing from your inbox, so you still hear of each settlement when you are woken.",
7184
+ inputSchema: {
7185
+ type: "object",
7186
+ properties: { workerIds: {
7187
+ type: "array",
7188
+ items: { type: "string" }
7189
+ } },
7190
+ required: ["workerIds"]
7191
+ }
7192
+ });
7179
7193
  /** The manager's own lifecycle verbs — never callable from code; `search` names them and why. */
7180
7194
  const LIFECYCLE_VERBS = [
7181
7195
  "submit_result",
@@ -7318,7 +7332,10 @@ function codeModeSupervisorTools(runner, options = {}) {
7318
7332
  if (runner === void 0 || typeof runner.run !== "function") throw new ValidationError("codeModeSupervisorTools: a CodeModeRunner is required (no default) — pass unsafeInProcessRunner() for trusted output, or a jailed runner for untrusted models");
7319
7333
  const timeoutMs = options.timeoutMs ?? null;
7320
7334
  if (timeoutMs !== null && (!Number.isSafeInteger(timeoutMs) || timeoutMs <= 0)) throw new ValidationError("codeModeSupervisorTools: timeoutMs must be a positive safe integer or null");
7321
- const faces = (context) => context.coordinationTools().filter((tool) => CODE_CALLABLE_VERBS[tool.name] !== void 0);
7335
+ const faces = (context) => {
7336
+ const granted = context.coordinationTools().filter((tool) => CODE_CALLABLE_VERBS[tool.name] !== void 0);
7337
+ return granted.some((tool) => tool.name === "spawn_worker") ? [...granted, AWAIT_SETTLEMENT_FACE] : granted;
7338
+ };
7322
7339
  return () => [{
7323
7340
  name: "search",
7324
7341
  description: "Search the callable API. Returns TypeScript declarations for the operations your code may call, generated from the live grant. Optional `query` filters by name or description; omit it for the full API.",
@@ -7514,31 +7531,6 @@ function signalPass(value, required) {
7514
7531
  return !required;
7515
7532
  }
7516
7533
  //#endregion
7517
- //#region src/runtime/supervise/run-context-sql.ts
7518
- /**
7519
- *
7520
- * `createSqlRunContext` — the SQL-backed durable bundle a `createSupervisor().run` (or a
7521
- * `runGraph`/`supervise` call that accepts injected stores) needs: a `SqlSpawnJournal`, a
7522
- * `SqlResultBlobStore` (both over one `SqlStatements` seam — the same adapter shape
7523
- * `SqlConversationJournal` takes), and a fresh `createExecutorRegistry()`, with `resume: true`
7524
- * so spreading the context makes the run loadTree-first.
7525
- *
7526
- * The SQL analogue of `createFileRunContext`: where that bundle owns a directory, this one owns
7527
- * tables in a database the caller already operates. The durable coordination side-log and
7528
- * cancellation observers remain file-based behind `runDir`; a SQL coordination log is follow-up.
7529
- *
7530
- * @experimental
7531
- */
7532
- /** Build a durable run context over one SQL statement seam. Tables are created on first use. */
7533
- function createSqlRunContext(db) {
7534
- return {
7535
- journal: new SqlSpawnJournal(db),
7536
- blobs: new SqlResultBlobStore(db),
7537
- executors: createExecutorRegistry(),
7538
- resume: true
7539
- };
7540
- }
7541
- //#endregion
7542
7534
  //#region src/runtime/supervise/sql-run-context.ts
7543
7535
  /**
7544
7536
  * A cross-machine run context on the existing autocommit SqlAdapter. Reuse the same database,
@@ -8996,6 +8988,6 @@ function tail(s) {
8996
8988
  return s.slice(-400);
8997
8989
  }
8998
8990
  //#endregion
8999
- export { FileCorpus as $, envKeyProvider as $t, unsafeInProcessRunner as A, readDeclaredCheck as At, SandboxRunAbortError as B, renderLeaderboardSvg as Bt, withUntrackedArtifacts as C, loopDispatch as Ct, patchDelivered as D, declaredCheckDeliverable as Dt, createSqlRunContext as E, checkProgramDigest as Et, strategyTournament as F, stopSentinel as Ft, createPrivateCasArtifactPort as G, openSqlRunStore as Gt, createS3PrivateCasStore as H, auditIntent as Ht, assertStrategyContract as I, leaderboard as It, definePersona as J, McpSpawnFault as Jt, equalKOnCost as K, SqlResultBlobStore as Kt, authorStrategy as L, pairwiseSignificance as Lt, chatWorkerSeam as M, completionAuthorizes as Mt, createChatSessionStore as N, deterministicCompletion as Nt, runCoderChecks as O, declaredCheckDigest as Ot, runStrategyEvolution as P, sentinelCompletion as Pt, registerShape as Q, sanitizeMcpToolSchema as Qt, strategyAuthorContract as R, renderLeaderboardHtml as Rt, copyUntrackedIntoClone as S, loopCampaignDispatch as St, createFencedSqlRunContext as T, assertDeclaredCheck as Tt, printBenchmarkReport as U, defaultAuditorInstruction as Ut, openSandboxRun as V, renderPairwiseMarkdown as Vt, runBenchmark as W, SqlRunOwnershipError as Wt, builtinShapes as X, materializeLocalMcp as Xt, runPersonified as Y, connectStdioMcp as Yt, createShapeRegistry as Z, createMcpEnvironment as Zt, NOTE_MAX_CHARS as _, harvestCorpus as _t, localShell as a, panel as at, composeWorkerEvidence as b, localSandboxClient as bt, createVerifierEnvironment as c, verify as ct, harvestSurfaceDiffs as d, buildSteerContext as dt, mcpSecretEnvMetadataKey as en, InMemoryCorpus as et, analystsFromRegistry as f, createScopeAnalyst as ft, EVIDENCE_MAX_CHARS as g, HarvestError as gt, worktreeFanout as h, inProcessSandboxClient as ht, jjWorkspace as i, createTangleSandboxExactProcessProvider as in, loopUntil as it, chatTransportExecutor as j, runIsolatedCheck as jt, codeModeSupervisorTools as k, declaredCheckJudge as kt, boxSurfaceReader as l, widen as lt, superviseSurface as m, observationFromRegistry as mt, makeFinding$1 as n, resolveSecretEnv as nn, fanout as nt, runInWorkspace as o, pipeline as ot, failuresAnalyst as p, registryScopeAnalyst as pt, trajectoryReport as q, SqlSpawnJournal as qt, gitWorkspace as r, secretEnvOfMcpServer as rn, flatWidenGate as rt, createWaterfallCollector as s, selectValidWinner as st, computeFindingId$1 as t, resolveMcpServerLaunch as tn, renderCorpusToInstructions as tt, fsSurfaceReader as u, assertTraceDerivedFindings as ut, VERIFY_TAIL_CHARS as v, defineLeaderboard as vt, analyzeTrace as w, superviseDispatch as wt, settledWorkerOut as x, inlineSandboxClient as xt, closingWorkerNote as y, resolveSandboxClient as yt, strategyAuthorSystemPrompt as z, renderLeaderboardMarkdown as zt };
8991
+ export { InMemoryCorpus as $, mcpSecretEnvMetadataKey as $t, chatTransportExecutor as A, runIsolatedCheck as At, openSandboxRun as B, renderPairwiseMarkdown as Bt, withUntrackedArtifacts as C, superviseDispatch as Ct, runCoderChecks as D, declaredCheckDigest as Dt, patchDelivered as E, declaredCheckDeliverable as Et, assertStrategyContract as F, leaderboard as Ft, equalKOnCost as G, SqlResultBlobStore as Gt, printBenchmarkReport as H, defaultAuditorInstruction as Ht, authorStrategy as I, pairwiseSignificance as It, runPersonified as J, connectStdioMcp as Jt, trajectoryReport as K, SqlSpawnJournal as Kt, strategyAuthorContract as L, renderLeaderboardHtml as Lt, createChatSessionStore as M, deterministicCompletion as Mt, runStrategyEvolution as N, sentinelCompletion as Nt, codeModeSupervisorTools as O, declaredCheckJudge as Ot, strategyTournament as P, stopSentinel as Pt, FileCorpus as Q, envKeyProvider as Qt, strategyAuthorSystemPrompt as R, renderLeaderboardMarkdown as Rt, copyUntrackedIntoClone as S, loopDispatch as St, createFencedSqlRunContext as T, checkProgramDigest as Tt, runBenchmark as U, SqlRunOwnershipError as Ut, createS3PrivateCasStore as V, auditIntent as Vt, createPrivateCasArtifactPort as W, openSqlRunStore as Wt, createShapeRegistry as X, createMcpEnvironment as Xt, builtinShapes as Y, materializeLocalMcp as Yt, registerShape as Z, sanitizeMcpToolSchema as Zt, NOTE_MAX_CHARS as _, defineLeaderboard as _t, localShell as a, pipeline as at, composeWorkerEvidence as b, inlineSandboxClient as bt, createVerifierEnvironment as c, widen as ct, harvestSurfaceDiffs as d, createScopeAnalyst as dt, resolveMcpServerLaunch as en, renderCorpusToInstructions as et, analystsFromRegistry as f, registryScopeAnalyst as ft, EVIDENCE_MAX_CHARS as g, harvestCorpus as gt, worktreeFanout as h, HarvestError as ht, jjWorkspace as i, panel as it, chatWorkerSeam as j, completionAuthorizes as jt, unsafeInProcessRunner as k, readDeclaredCheck as kt, boxSurfaceReader as l, assertTraceDerivedFindings as lt, superviseSurface as m, inProcessSandboxClient as mt, makeFinding$1 as n, secretEnvOfMcpServer as nn, flatWidenGate as nt, runInWorkspace as o, selectValidWinner as ot, failuresAnalyst as p, observationFromRegistry as pt, definePersona as q, McpSpawnFault as qt, gitWorkspace as r, createTangleSandboxExactProcessProvider as rn, loopUntil as rt, createWaterfallCollector as s, verify as st, computeFindingId$1 as t, resolveSecretEnv as tn, fanout as tt, fsSurfaceReader as u, buildSteerContext as ut, VERIFY_TAIL_CHARS as v, resolveSandboxClient as vt, analyzeTrace as w, assertDeclaredCheck as wt, settledWorkerOut as x, loopCampaignDispatch as xt, closingWorkerNote as y, localSandboxClient as yt, SandboxRunAbortError as z, renderLeaderboardSvg as zt };
9000
8992
 
9001
- //# sourceMappingURL=runtime-CZR5n7Zy.js.map
8993
+ //# sourceMappingURL=runtime-6VPSJVeg.js.map