@tangle-network/agent-runtime 9.0.16 → 10.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/dist/{activation-DgT20fzX.js → activation-C_BenzIu.js} +2 -2
  3. package/dist/{activation-DgT20fzX.js.map → activation-C_BenzIu.js.map} +1 -1
  4. package/dist/{activation-y6NAn3sW.d.ts → activation-s6dGGify.d.ts} +7 -8
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/agent.js +3 -3
  7. package/dist/candidate-execution/index.d.ts +3 -0
  8. package/dist/candidate-execution/index.js +10 -3
  9. package/dist/candidate-execution/index.js.map +1 -1
  10. package/dist/{delegate-Cmu5OF3M.js → delegate-BOren4c7.js} +2 -2
  11. package/dist/{delegate-Cmu5OF3M.js.map → delegate-BOren4c7.js.map} +1 -1
  12. package/dist/{coordination-manager-CFtnSLPw.js → driver-control-acknowledgers-ByKwAgCI.js} +1062 -1042
  13. package/dist/driver-control-acknowledgers-ByKwAgCI.js.map +1 -0
  14. package/dist/durable.d.ts +5 -5
  15. package/dist/durable.js +13 -13
  16. package/dist/durable.js.map +1 -1
  17. package/dist/{failure-cause-WifbY42M.js → failure-cause-DoCCGLDH.js} +42 -18
  18. package/dist/failure-cause-DoCCGLDH.js.map +1 -0
  19. package/dist/{graph-DqtIiS94.js → graph-BXONYT1o.js} +8 -8
  20. package/dist/{graph-DqtIiS94.js.map → graph-BXONYT1o.js.map} +1 -1
  21. package/dist/{graph-registry-B_1C7qye.js → graph-registry-DxhlgHdA.js} +1 -1
  22. package/dist/{graph-registry-BbZN5deo.js → graph-registry-j9t9J0KT.js} +11 -12
  23. package/dist/{graph-registry-BbZN5deo.js.map → graph-registry-j9t9J0KT.js.map} +1 -1
  24. package/dist/{improve-B0vNv6e7.js → improve-CS2GIF5O.js} +42 -26
  25. package/dist/{improve-B0vNv6e7.js.map → improve-CS2GIF5O.js.map} +1 -1
  26. package/dist/index.d.ts +38 -6
  27. package/dist/index.js +59 -20
  28. package/dist/index.js.map +1 -1
  29. package/dist/intelligence.d.ts +93 -63
  30. package/dist/intelligence.js +166 -73
  31. package/dist/intelligence.js.map +1 -1
  32. package/dist/kernel.d.ts +3 -3
  33. package/dist/kernel.js +16 -15
  34. package/dist/{loop-runner-CfMOsISJ.d.ts → loop-runner-C0B3PexH.d.ts} +2 -2
  35. package/dist/loop-runner-bin.d.ts +1 -1
  36. package/dist/loop-runner-bin.js +1 -1
  37. package/dist/{loop-runner-BvVdDdZC.js → loop-runner-ftyZP4st.js} +2 -2
  38. package/dist/{loop-runner-BvVdDdZC.js.map → loop-runner-ftyZP4st.js.map} +1 -1
  39. package/dist/mcp/bin.js +3 -3
  40. package/dist/mcp/index.d.ts +1 -1
  41. package/dist/mcp/index.js +7 -7
  42. package/dist/mcp/memory-bin.js +1 -1
  43. package/dist/{model-policy-CZwhXp8O.js → model-policy-CqDuBTq-.js} +12 -2
  44. package/dist/model-policy-CqDuBTq-.js.map +1 -0
  45. package/dist/{prepare-Cw4ZaN01.js → prepare-DT-ibRsm.js} +2 -2
  46. package/dist/{prepare-Cw4ZaN01.js.map → prepare-DT-ibRsm.js.map} +1 -1
  47. package/dist/profiles.d.ts +1 -1
  48. package/dist/profiles.js +1 -1
  49. package/dist/{provision-supervisor-BjKluSKl.js → provision-supervisor-CauovUHn.js} +6 -6
  50. package/dist/{provision-supervisor-BjKluSKl.js.map → provision-supervisor-CauovUHn.js.map} +1 -1
  51. package/dist/{run-cancellation-BvGEEwRG.js → run-cancellation-NMNVuYiO.js} +2 -2
  52. package/dist/{run-cancellation-BvGEEwRG.js.map → run-cancellation-NMNVuYiO.js.map} +1 -1
  53. package/dist/{run-state-Dd_AjWd6.js → run-state-COyIVOVb.js} +5 -5
  54. package/dist/{run-state-Dd_AjWd6.js.map → run-state-COyIVOVb.js.map} +1 -1
  55. package/dist/{runtime-7VEM9muH.js → runtime-DYaRDLKn.js} +191 -24
  56. package/dist/runtime-DYaRDLKn.js.map +1 -0
  57. package/dist/{search-executor-Dqtm1fOC.js → search-executor-Drd_N9YO.js} +5 -5
  58. package/dist/{search-executor-Dqtm1fOC.js.map → search-executor-Drd_N9YO.js.map} +1 -1
  59. package/dist/{server-B8Kmit_v.js → server-Dk9B1WFf.js} +4 -4
  60. package/dist/{server-B8Kmit_v.js.map → server-Dk9B1WFf.js.map} +1 -1
  61. package/dist/{settle-record-BvH2-Ao5.js → settle-record-YdkkHzqw.js} +2 -2
  62. package/dist/{settle-record-BvH2-Ao5.js.map → settle-record-YdkkHzqw.js.map} +1 -1
  63. package/dist/{structural-rollout-CYc8PE2N.js → structural-rollout-DbZAkHTq.js} +5 -5
  64. package/dist/{structural-rollout-CYc8PE2N.js.map → structural-rollout-DbZAkHTq.js.map} +1 -1
  65. package/dist/{supervise-BayNu7qZ.js → supervise-B5hb0my3.js} +2426 -2336
  66. package/dist/supervise-B5hb0my3.js.map +1 -0
  67. package/dist/{supervision-discovery-Ca4QO4rG.js → supervision-discovery-ChkTxilL.js} +3 -3
  68. package/dist/{supervision-discovery-Ca4QO4rG.js.map → supervision-discovery-ChkTxilL.js.map} +1 -1
  69. package/dist/{supervisor-Bx21Hy27.js → supervisor-DpwcTrTh.js} +437 -75
  70. package/dist/supervisor-DpwcTrTh.js.map +1 -0
  71. package/dist/{supervisor-accounting-StDNW1YT.js → supervisor-accounting-QiXnF-EW.js} +541 -344
  72. package/dist/supervisor-accounting-QiXnF-EW.js.map +1 -0
  73. package/dist/testing.d.ts +1 -1
  74. package/dist/testing.js +11 -11
  75. package/dist/{tool-server-CirrqFlr.js → tool-server-DQCdu3am.js} +2 -2
  76. package/dist/{tool-server-CirrqFlr.js.map → tool-server-DQCdu3am.js.map} +1 -1
  77. package/dist/{top-web-Cg7ywIkF.js → top-web-E85Fk8pH.js} +6 -6
  78. package/dist/{top-web-Cg7ywIkF.js.map → top-web-E85Fk8pH.js.map} +1 -1
  79. package/dist/tui/bin.js +3 -3
  80. package/dist/tui/index.d.ts +1 -1
  81. package/dist/tui/index.js +2 -2
  82. package/dist/{types-_j53efrk.d.ts → types-dv295cpm.d.ts} +9907 -9784
  83. package/dist/{workspace-streams-BakRr-Pl.js → workspace-streams-C7PGLAUd.js} +3 -3
  84. package/dist/workspace-streams-C7PGLAUd.js.map +1 -0
  85. package/package.json +8 -7
  86. package/dist/coordination-manager-CFtnSLPw.js.map +0 -1
  87. package/dist/failure-cause-WifbY42M.js.map +0 -1
  88. package/dist/model-policy-CZwhXp8O.js.map +0 -1
  89. package/dist/runtime-7VEM9muH.js.map +0 -1
  90. package/dist/supervise-BayNu7qZ.js.map +0 -1
  91. package/dist/supervisor-Bx21Hy27.js.map +0 -1
  92. package/dist/supervisor-accounting-StDNW1YT.js.map +0 -1
  93. package/dist/workspace-streams-BakRr-Pl.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import { i as ConfigError } from "./errors-DG8yufqX.js";
2
- import { F as collectAgentTurn, I as streamAgentTurn } from "./structural-rollout-CYc8PE2N.js";
2
+ import { F as collectAgentTurn, I as streamAgentTurn } from "./structural-rollout-DbZAkHTq.js";
3
3
  import { l as sha256, m as runAbortable, p as linkAbort } from "./jsonl-file-BhuxeejY.js";
4
4
  import { o as armDeadlineTimer } from "./deadline-CySmJ_0S.js";
5
5
  import { n as detachedSnapshot } from "./snapshot-BKI_w3JD.js";
6
- import { Pt as runSettledCommand, Rt as terminateProcessTreeAndConfirm, w as createExecutor } from "./supervisor-Bx21Hy27.js";
7
- import { a as concreteProfileModel, t as assertExecutableAgentProfile } from "./model-policy-CZwhXp8O.js";
6
+ import { Bt as terminateProcessTreeAndConfirm, It as runSettledCommand, w as createExecutor } from "./supervisor-DpwcTrTh.js";
7
+ import { a as concreteProfileModel, t as assertExecutableAgentProfile } from "./model-policy-CqDuBTq-.js";
8
8
  import { i as syncDurableDirectory, r as publishExclusiveDurableFile } from "./durable-file-DstVeHcj.js";
9
9
  import { b as sha256Bytes$1, m as canonicalCandidateDigest$1, v as immutableCandidateValue } from "./output-artifacts-AqkZ8lO2.js";
10
- import { C as serializeRolloutPolicy, S as normalizeRolloutPolicy, w as structuralRolloutPolicyFromProfile, x as applyRolloutPolicyToProfile } from "./activation-DgT20fzX.js";
11
- import { a as reconcileInterruptedSearchCalls, b as improveSearchCost, c as searchExecutor, d as taggedLedger, i as isSearchEnvironmentFault, n as assertSearchLanes, s as searchCallTags, v as decideClosedSearch } from "./search-executor-Dqtm1fOC.js";
10
+ import { C as serializeRolloutPolicy, S as normalizeRolloutPolicy, w as structuralRolloutPolicyFromProfile, x as applyRolloutPolicyToProfile } from "./activation-C_BenzIu.js";
11
+ import { a as reconcileInterruptedSearchCalls, b as improveSearchCost, c as searchExecutor, d as taggedLedger, i as isSearchEnvironmentFault, n as assertSearchLanes, s as searchCallTags, v as decideClosedSearch } from "./search-executor-Drd_N9YO.js";
12
12
  import { agentProfileEnvironmentSchema, agentProfileSchema, agentProfileTrainingSchema, agentTrainingDatasetIdentitySchema, agentTrainingParametersSchema, agentTrainingReceiptSchema, agentTrainingTaskKey, agentTrainingTaskSchema, applyAgentProfileDiff, canonicalAgentProfileDigest, canonicalCandidateBytes, diffAgentProfiles, sha256DigestSchema, snapshotAgentProfile, trainedModelIdForArtifact } from "@tangle-network/agent-interface";
13
13
  import { canonicalJson, makeProposalFinding } from "@tangle-network/agent-eval";
14
14
  import { redact } from "@tangle-network/agent-eval/traces";
@@ -19,7 +19,7 @@ import { spawn, spawnSync } from "node:child_process";
19
19
  import { chmod, mkdir, mkdtemp, open, realpath, rm, writeFile } from "node:fs/promises";
20
20
  import { tmpdir } from "node:os";
21
21
  import { assertProposalFindings } from "@tangle-network/agent-eval/analyst";
22
- import { SearchRecorder, aide, asha, campaignCellSearchResult, campaignScenarioIdentity, campaignSplitDigestFromIdentities, compareOptimizationMethods, createRunCostLedger, fsCampaignStorage, gitWorktreeAdapter, isProposedCandidate, openSearchLedger, renderSearchSummary, resolveRunDir, runCampaign, runSearch, searchClaimReserveUsd, searchNodeId, searchProposalExecution, searchProposerView, searchReceiptAccounting, verifyCodeSurface, verifySearchHistoryArtifact } from "@tangle-network/agent-eval/campaign";
22
+ import { SearchRecorder, aide, asha, campaignCellSearchResult, campaignScenarioIdentity, campaignSplitDigestFromIdentities, captureFinalEvidencePolicy, compareOptimizationMethods, createRunCostLedger, fsCampaignStorage, gitWorktreeAdapter, isProposedCandidate, openSearchLedger, prepareSearchFinalEvidence, renderSearchSummary, resolveRunDir, runCampaign, runSearch, searchClaimReserveUsd, searchNodeId, searchProposalExecution, searchProposerView, searchReceiptAccounting, verifyCodeSurface, verifySearchHistoryArtifact } from "@tangle-network/agent-eval/campaign";
23
23
  import { selfImprove } from "@tangle-network/agent-eval/contract";
24
24
  import { defineEvaluationClaim, summarizeEvaluationUnits } from "@tangle-network/agent-eval/experiment";
25
25
  // src/runtime-usage.ts
@@ -2145,7 +2145,8 @@ const SEARCH_METHOD_SOURCE = {
2145
2145
  })
2146
2146
  };
2147
2147
  async function runSearchImprovement(profile, opts) {
2148
- const { method, claim: inputClaim, agent, executionRunId, recordCell, trainScenarios, selectionScenarios, testScenarios, judges: _judges, surface: _surface, executionRef: _executionRef, validateCandidate: _validateCandidate, findings: _findings, skills: _skills, profileComponents: _profileComponents, minimumLift: _minimumLift, subject: _subject, costCeiling, costLedger: inputCostLedger, seed = 42, signal, workerSlots, budgetPool, trace, ...campaignOptions } = opts;
2148
+ const { method, claim: inputClaim, agent, executionRunId, recordCell, trainScenarios, selectionScenarios, testScenarios, judges: _judges, surface: _surface, executionRef: _executionRef, validateCandidate: _validateCandidate, findings: _findings, skills: _skills, profileComponents: _profileComponents, minimumLift: _minimumLift, subject: _subject, costCeiling, costLedger: inputCostLedger, seed = 42, signal, workerSlots, budgetPool, trace, finalEvidence: inputFinalEvidence, ...campaignOptions } = opts;
2149
+ const finalEvidencePolicy = inputFinalEvidence && captureFinalEvidencePolicy(inputFinalEvidence);
2149
2150
  const splitScenarios = {
2150
2151
  trainScenarios,
2151
2152
  selectionScenarios,
@@ -2170,7 +2171,11 @@ async function runSearchImprovement(profile, opts) {
2170
2171
  const searchId = `improve-${canonicalCandidateDigest$1({
2171
2172
  evaluationRef,
2172
2173
  process: SEARCH_METHOD_SOURCE,
2173
- method: searchMethodDescriptor(method)
2174
+ method: searchMethodDescriptor(method),
2175
+ ...finalEvidencePolicy ? { finalEvidence: {
2176
+ requestId: finalEvidencePolicy.requestId,
2177
+ evaluatorDigest: finalEvidencePolicy.evaluatorDigest
2178
+ } } : {}
2174
2179
  }).slice(7, 31)}`;
2175
2180
  const searchDir = `${runDir}/search/${searchId}`;
2176
2181
  const costLedger = inputCostLedger ?? createRunCostLedger({
@@ -2192,6 +2197,13 @@ async function runSearchImprovement(profile, opts) {
2192
2197
  concurrency,
2193
2198
  execution
2194
2199
  });
2200
+ const finalEvidence = finalEvidencePolicy ? await prepareSearchFinalEvidence({
2201
+ policy: finalEvidencePolicy,
2202
+ recorder,
2203
+ claim,
2204
+ finalScenarios: testScenarios,
2205
+ developmentScenarios: [...trainScenarios, ...selectionScenarios]
2206
+ }) : void 0;
2195
2207
  const session = {
2196
2208
  method,
2197
2209
  prepared,
@@ -2244,25 +2256,29 @@ async function runSearchImprovement(profile, opts) {
2244
2256
  })
2245
2257
  });
2246
2258
  const startedAt = Date.now();
2247
- return decideSearchResult({
2248
- session,
2249
- codec,
2250
- result: await runSearch({
2251
- recorder,
2252
- root,
2259
+ return {
2260
+ ...await decideSearchResult({
2261
+ session,
2253
2262
  codec,
2254
- policy,
2255
- allocation,
2256
- proposer: searchProposerPort(session),
2257
- executor,
2258
- admit: (node) => admissionRefusal(session, node),
2259
- maxExpansions: method.maxExpansions,
2260
- maxAttempts: method.maxAttempts,
2261
- ...signal ? { signal } : {}
2263
+ result: await runSearch({
2264
+ recorder,
2265
+ root,
2266
+ codec,
2267
+ policy,
2268
+ allocation,
2269
+ proposer: searchProposerPort(session),
2270
+ executor,
2271
+ admit: (node) => admissionRefusal(session, node),
2272
+ maxExpansions: method.maxExpansions,
2273
+ maxAttempts: method.maxAttempts,
2274
+ ...finalEvidence ? { beforeClaim: finalEvidence.beforeClaim } : {},
2275
+ ...signal ? { signal } : {}
2276
+ }),
2277
+ costCeiling,
2278
+ startedAt
2262
2279
  }),
2263
- costCeiling,
2264
- startedAt
2265
- });
2280
+ ...finalEvidence ? { finalEvidence: finalEvidence.receipt() } : {}
2281
+ };
2266
2282
  }
2267
2283
  /** Open the search's ledger: a fresh search records its opening, an interrupted one continues. */
2268
2284
  function openSearchRecorder(input) {
@@ -3006,4 +3022,4 @@ async function improve(profileOrCode, opts) {
3006
3022
  }
3007
3023
  export { assertProfileTrainingIsHeldOut as a, withMethodRuntimeControls as c, commandVerifier as d, addRuntimeUsage as f, assertCandidateValidator as i, rethrowAfterCleanup as l, isUsageAmount as m, createCommandProfileTrainer as n, parseExecutionRef as o, createRuntimeUsageTotals as p, searchMethod as r, privateValuePaths as s, improve as t, agenticGenerator as u };
3008
3024
 
3009
- //# sourceMappingURL=improve-B0vNv6e7.js.map
3025
+ //# sourceMappingURL=improve-CS2GIF5O.js.map