@tangle-network/agent-runtime 0.193.1 → 0.195.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 (131) hide show
  1. package/dist/{activation-BismttgN.js → activation-DtIbcFOX.js} +3 -3
  2. package/dist/{activation-BismttgN.js.map → activation-DtIbcFOX.js.map} +1 -1
  3. package/dist/agent.d.ts +1 -1
  4. package/dist/agent.js +2 -2
  5. package/dist/candidate-execution/index.js +4 -4
  6. package/dist/{candidate-execution-BSkZErxD.js → candidate-execution-nvqVIMyS.js} +5 -4
  7. package/dist/{candidate-execution-BSkZErxD.js.map → candidate-execution-nvqVIMyS.js.map} +1 -1
  8. package/dist/{conversation-DILnmy84.js → conversation-BXPWMOSd.js} +4 -5
  9. package/dist/{conversation-DILnmy84.js.map → conversation-BXPWMOSd.js.map} +1 -1
  10. package/dist/conversation.d.ts +1 -1
  11. package/dist/conversation.js +1 -1
  12. package/dist/{coordination-driver-DujHiIGa.js → coordination-driver-iSN-m3VX.js} +281 -244
  13. package/dist/coordination-driver-iSN-m3VX.js.map +1 -0
  14. package/dist/{authoring-DWiqKSDY.js → delegate-DCC2muUd.js} +56 -13
  15. package/dist/delegate-DCC2muUd.js.map +1 -0
  16. package/dist/delegation-status-BlsbSeOB.js +358 -0
  17. package/dist/delegation-status-BlsbSeOB.js.map +1 -0
  18. package/dist/durable.d.ts +2 -2
  19. package/dist/durable.js +3 -3
  20. package/dist/{environment-provider-DEwsolvi.js → environment-provider-Dr-wfnHg.js} +422 -8
  21. package/dist/environment-provider-Dr-wfnHg.js.map +1 -0
  22. package/dist/{environment-provider-DpPGJfK-.d.ts → environment-provider-adVa6X7a.d.ts} +2 -2
  23. package/dist/environment-provider.d.ts +1 -1
  24. package/dist/environment-provider.js +1 -1
  25. package/dist/{graph-DORfp9WX.js → graph-DghidDx5.js} +138 -5
  26. package/dist/graph-DghidDx5.js.map +1 -0
  27. package/dist/graph.d.ts +3 -3
  28. package/dist/graph.js +4 -5
  29. package/dist/graph.js.map +1 -1
  30. package/dist/{improve-Bn1zpWHF.d.ts → improve-7VTwse1c.d.ts} +6 -6
  31. package/dist/{improvement-cycle-BbsiYcpH.js → improvement-cycle-bTBySunH.js} +22 -8
  32. package/dist/{improvement-cycle-BbsiYcpH.js.map → improvement-cycle-bTBySunH.js.map} +1 -1
  33. package/dist/{index-Vz-13VZq.d.ts → index-CVD30soi.d.ts} +4 -4
  34. package/dist/{index-DV1lzp9p.d.ts → index-DNx0nWZH.d.ts} +57 -51
  35. package/dist/{index-RM2oRI9s.d.ts → index-DO6DHgRP.d.ts} +2 -2
  36. package/dist/index.d.ts +10 -9
  37. package/dist/index.js +75 -29
  38. package/dist/index.js.map +1 -1
  39. package/dist/intelligence.d.ts +5 -5
  40. package/dist/intelligence.js +7 -6
  41. package/dist/intelligence.js.map +1 -1
  42. package/dist/{executable-spec-DxuiDFAU.js → jsonl-file-Bh1Q9nt0.js} +59 -3
  43. package/dist/jsonl-file-Bh1Q9nt0.js.map +1 -0
  44. package/dist/kernel.d.ts +6 -6
  45. package/dist/kernel.js +11 -12
  46. package/dist/{knowledge-RW1pbZCH.js → knowledge-U8WJ5xCI.js} +7 -17
  47. package/dist/knowledge-U8WJ5xCI.js.map +1 -0
  48. package/dist/knowledge.d.ts +1 -1
  49. package/dist/knowledge.js +1 -1
  50. package/dist/{loop-runner-bin-sBwcyQTc.js → loop-runner-bin-BU2NACsF.js} +3 -3
  51. package/dist/{loop-runner-bin-sBwcyQTc.js.map → loop-runner-bin-BU2NACsF.js.map} +1 -1
  52. package/dist/{loop-runner-bin-CGraqNiA.d.ts → loop-runner-bin-b4585v9Z.d.ts} +3 -3
  53. package/dist/loop-runner-bin.d.ts +1 -1
  54. package/dist/loop-runner-bin.js +1 -1
  55. package/dist/{materialization-CekWK6OO.js → materialization-vZssF9Nx.js} +28 -3
  56. package/dist/materialization-vZssF9Nx.js.map +1 -0
  57. package/dist/mcp/bin.js +3 -3
  58. package/dist/mcp/index.d.ts +4 -4
  59. package/dist/mcp/index.js +8 -8
  60. package/dist/mcp/index.js.map +1 -1
  61. package/dist/{openai-tools-6jUqkGG7.js → openai-tools-DmvmaG0a.js} +2 -2
  62. package/dist/{openai-tools-6jUqkGG7.js.map → openai-tools-DmvmaG0a.js.map} +1 -1
  63. package/dist/{prepare-B5fJ7mLS.js → prepare-DDGp0-rW.js} +4 -59
  64. package/dist/prepare-DDGp0-rW.js.map +1 -0
  65. package/dist/primeintellect/index.d.ts +1 -1
  66. package/dist/profiles.js +454 -1
  67. package/dist/profiles.js.map +1 -1
  68. package/dist/{protected-model-port-B0xFSAjt.js → protected-model-port-DxFN8DLS.js} +3 -2
  69. package/dist/{protected-model-port-B0xFSAjt.js.map → protected-model-port-DxFN8DLS.js.map} +1 -1
  70. package/dist/{protected-redaction--F3v1oo8.js → protected-redaction-wGo44k2K.js} +54 -3
  71. package/dist/protected-redaction-wGo44k2K.js.map +1 -0
  72. package/dist/{provision-supervisor-CddfH9mg.js → provision-supervisor-CRPbnJiB.js} +6 -8
  73. package/dist/{provision-supervisor-CddfH9mg.js.map → provision-supervisor-CRPbnJiB.js.map} +1 -1
  74. package/dist/{redact-D0OzQsyt.js → redact-BOU77QfQ.js} +1013 -24
  75. package/dist/redact-BOU77QfQ.js.map +1 -0
  76. package/dist/{runtime-V91N6sPc.d.ts → runtime-B8x43nGP.d.ts} +5 -4
  77. package/dist/{runtime-ZM4i-jEF.js → runtime-CuNJ0opC.js} +153 -77
  78. package/dist/runtime-CuNJ0opC.js.map +1 -0
  79. package/dist/server-D6XmE1Du.js +1311 -0
  80. package/dist/server-D6XmE1Du.js.map +1 -0
  81. package/dist/{stream-agent-turn-1ahpdeIo.d.ts → stream-agent-turn-B-gtBlOy.d.ts} +2 -2
  82. package/dist/{stream-agent-turn-DWWe_7bh.js → stream-agent-turn-DOtEsvCV.js} +3 -3
  83. package/dist/{stream-agent-turn-DWWe_7bh.js.map → stream-agent-turn-DOtEsvCV.js.map} +1 -1
  84. package/dist/{structural-rollout-CktnUTCC.js → structural-rollout-DxEQ77H7.js} +37 -51
  85. package/dist/structural-rollout-DxEQ77H7.js.map +1 -0
  86. package/dist/{supervise-Dj6zd2C7.js → supervise-C0V3pZXK.js} +154 -1961
  87. package/dist/supervise-C0V3pZXK.js.map +1 -0
  88. package/dist/testing.d.ts +2 -2
  89. package/dist/testing.js +14 -13
  90. package/dist/testing.js.map +1 -1
  91. package/dist/tui/index.d.ts +1 -1
  92. package/dist/tui/index.js +1 -1
  93. package/dist/{types-CGez_ZHQ.d.ts → types-B_pNTBjK.d.ts} +5 -2
  94. package/dist/{workspace-archive-yAPDklLV.js → workspace-archive-Ybomp7AN.js} +3 -2
  95. package/dist/{workspace-archive-yAPDklLV.js.map → workspace-archive-Ybomp7AN.js.map} +1 -1
  96. package/package.json +4 -4
  97. package/skills/agent-graphs/SKILL.md +28 -123
  98. package/skills/agent-graphs/references/authoring.md +34 -0
  99. package/skills/agent-graphs/references/measurement.md +18 -0
  100. package/skills/build-with-agent-runtime/SKILL.md +31 -117
  101. package/skills/build-with-agent-runtime/references/improvement.md +32 -0
  102. package/skills/codemode/SKILL.md +22 -34
  103. package/skills/codemode/references/runtime-execution.md +14 -0
  104. package/skills/generate-eval/SKILL.md +2 -1
  105. package/skills/loop-writer/SKILL.md +30 -84
  106. package/skills/supervise/SKILL.md +43 -77
  107. package/skills/supervise/references/profile-authoring.md +19 -0
  108. package/dist/authoring-DWiqKSDY.js.map +0 -1
  109. package/dist/coordination-driver-DujHiIGa.js.map +0 -1
  110. package/dist/environment-provider-DEwsolvi.js.map +0 -1
  111. package/dist/executable-spec-DxuiDFAU.js.map +0 -1
  112. package/dist/graph-DORfp9WX.js.map +0 -1
  113. package/dist/jsonl-file-CDfsCI5s.js +0 -59
  114. package/dist/jsonl-file-CDfsCI5s.js.map +0 -1
  115. package/dist/knowledge-RW1pbZCH.js.map +0 -1
  116. package/dist/materialization-CekWK6OO.js.map +0 -1
  117. package/dist/prepare-B5fJ7mLS.js.map +0 -1
  118. package/dist/protected-redaction--F3v1oo8.js.map +0 -1
  119. package/dist/redact-D0OzQsyt.js.map +0 -1
  120. package/dist/researcher-hgPa5p9i.js +0 -457
  121. package/dist/researcher-hgPa5p9i.js.map +0 -1
  122. package/dist/runtime-ZM4i-jEF.js.map +0 -1
  123. package/dist/snapshot-CTAf4uuA.js +0 -26
  124. package/dist/snapshot-CTAf4uuA.js.map +0 -1
  125. package/dist/spawn-journal-B9eTmVAn.js +0 -999
  126. package/dist/spawn-journal-B9eTmVAn.js.map +0 -1
  127. package/dist/structural-rollout-CktnUTCC.js.map +0 -1
  128. package/dist/supervise-Dj6zd2C7.js.map +0 -1
  129. package/dist/util-mCNUeboW.js +0 -419
  130. package/dist/util-mCNUeboW.js.map +0 -1
  131. package/skills/agent-graphs/IMPROVE.md +0 -58
@@ -1,7 +1,6 @@
1
- import { x as contentAddress } from "./spawn-journal-B9eTmVAn.js";
2
- import { i as redactProtectedValue, n as createProtectedRecordRedactor, r as redactProtectedReason, t as assertNoProtectedBytes } from "./protected-redaction--F3v1oo8.js";
1
+ import { a as canonicalCandidateBytes, c as deepFreezeCandidate, d as omitTopLevelDigest, f as sha256Bytes, i as redactProtectedValue, l as embeddedCandidateArtifact, n as createProtectedRecordRedactor, o as canonicalCandidateDigest$1, r as redactProtectedReason, s as canonicalCandidateDocument, t as assertNoProtectedBytes, u as immutableCandidateValue } from "./protected-redaction-wGo44k2K.js";
3
2
  import { agentCandidateArtifactRefSchema, agentCandidateBenchmarkResultEvidenceSchema, agentCandidateBenchmarkSuiteSchema, agentCandidateBenchmarkTaskSchema, agentCandidateBundleSchema, agentCandidateContainerSchema, agentCandidateExecutionLimitsSchema, agentCandidateExecutionPlanEvidenceSchema, agentCandidateExecutionPlanMaterialSchema, agentCandidateMaterializationReceiptSchema, agentCandidateModelAccessNetworkSchema, agentCandidateModelSettlementEvidenceSchema, agentCandidateProfileActivationSchema, agentCandidateProfilePlanEvidenceSchema, agentCandidateProfileSchema, agentCandidateResolvedModelSchema, agentCandidateRunCellSchema, agentCandidateRunReceiptSchema, agentCandidateTaskOutcomeEvidenceSchema, agentCandidateTaskOutcomeSpecSchema, agentCandidateTerminationSchema, agentCandidateWorkspaceManifestMaterialSchema, agentCandidateWorkspaceSnapshotEvidenceSchema, agentProfileDiffSchema, agentProfileSchema, applyAgentProfileDiff, sha256DigestSchema } from "@tangle-network/agent-interface";
4
- import { REDACTION_VERSION, canonicalJson, isLlmSpan } from "@tangle-network/agent-eval";
3
+ import { REDACTION_VERSION, isLlmSpan } from "@tangle-network/agent-eval";
5
4
  import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
6
5
  import { constants } from "node:fs";
7
6
  import { lstat, mkdir, mkdtemp, open, readFile, readdir, readlink, realpath, rm, stat } from "node:fs/promises";
@@ -10,60 +9,6 @@ import { applyAgentCandidateWorkspacePlan, isMaterializerHarness, materializeCan
10
9
  import { spawn } from "node:child_process";
11
10
  import { tmpdir } from "node:os";
12
11
  import { hashKnowledgeBase } from "@tangle-network/agent-knowledge";
13
- //#region src/candidate-execution/digest.ts
14
- function sha256Bytes(bytes) {
15
- return `sha256:${createHash("sha256").update(bytes).digest("hex")}`;
16
- }
17
- function canonicalCandidateBytes(value) {
18
- return Buffer.from(canonicalJson(value), "utf8");
19
- }
20
- function canonicalCandidateDigest$1(value) {
21
- return contentAddress(value);
22
- }
23
- /** Returns a detached, deeply frozen JSON value with canonical number normalization. */
24
- function immutableCandidateValue(value) {
25
- return deepFreezeCandidate(JSON.parse(Buffer.from(canonicalCandidateBytes(value)).toString("utf8")));
26
- }
27
- function canonicalCandidateDocument(valueWithoutDigest) {
28
- const bytes = canonicalCandidateBytes(valueWithoutDigest);
29
- const digest = canonicalCandidateDigest$1(valueWithoutDigest);
30
- if (sha256Bytes(bytes) !== digest) throw new Error("canonical candidate serializers disagree on document digest");
31
- const storedBytes = Uint8Array.from(bytes);
32
- const value = immutableCandidateValue({
33
- ...valueWithoutDigest,
34
- digest
35
- });
36
- return Object.freeze({
37
- value,
38
- get bytes() {
39
- return Uint8Array.from(storedBytes);
40
- },
41
- digest
42
- });
43
- }
44
- function verifyCanonicalCandidateDocument(value, label) {
45
- if (canonicalCandidateDigest$1(omitTopLevelDigest(value)) !== value.digest) throw new Error(`${label} digest does not match`);
46
- return immutableCandidateValue(value);
47
- }
48
- function embeddedCandidateArtifact(bytes) {
49
- return {
50
- encoding: "base64",
51
- content: Buffer.from(bytes).toString("base64"),
52
- sha256: sha256Bytes(bytes),
53
- byteLength: bytes.byteLength
54
- };
55
- }
56
- function omitTopLevelDigest(value) {
57
- const { digest: _digest, ...rest } = value;
58
- return rest;
59
- }
60
- function deepFreezeCandidate(value, seen = /* @__PURE__ */ new Set()) {
61
- if (value === null || typeof value !== "object" || ArrayBuffer.isView(value) || seen.has(value)) return value;
62
- seen.add(value);
63
- for (const child of Object.values(value)) deepFreezeCandidate(child, seen);
64
- return Object.freeze(value);
65
- }
66
- //#endregion
67
12
  //#region src/candidate-execution/artifacts.ts
68
13
  function artifactCacheKey(artifact) {
69
14
  return `${artifact.sha256}:${artifact.byteLength}`;
@@ -4657,6 +4602,6 @@ function errorMessage(error) {
4657
4602
  return error instanceof Error ? error.message : String(error);
4658
4603
  }
4659
4604
  //#endregion
4660
- export { parseExactAgentProfile as $, assertRecoveryMatchesStaged as A, assertExactObjectKeys as B, assertNoGitIndirection as C, candidateCleanupDeadline as D, assertAgentCandidateExecutionRoots as E, rejectedFinish as F, applyExactAgentProfileDiff as G, PI_CANDIDATE_AGENT_DIR_ENV as H, rejectedStage as I, createAgentCandidateProfileActivation as J, assertCandidateProfileBinding as K, requireStagedTerminal as L, assertTerminalMatchesClaim as M, assertTerminalMatchesStaged as N, candidateCleanupTimeout as O, recoveredTerminalRecord as P, parseAgentCandidateProfileActivation as Q, sealTerminalDigest as R, CANDIDATE_TRACE_TAGS as S, runCandidateGit as T, PI_CANDIDATE_SESSION_DIR_ENV as U, isWellFormedUnicode as V, agentCandidateProfileAsAgentProfile as W, materializeAgentCandidateProfilePlan as X, freezeGenericAgentCandidateProfile as Y, omitUndefinedObjectFields as Z, candidateExecutionClaim as _, persistCandidateOutputArtifact as a, scanMaterializedWorkspaceManifest as at, consumePreparedCandidateExecution as b, CANDIDATE_KNOWLEDGE_ROOT_ENV as c, canonicalCandidateBytes as ct, verifiedResourceTextByDigest as d, deepFreezeCandidate as dt, parseExactAgentProfileDiff as et, verifyAgentCandidateBundle as f, embeddedCandidateArtifact as ft, candidateClaimFileInternals as g, verifyCanonicalCandidateDocument as gt, InMemoryAgentCandidateExecutionClaimStore as h, sha256Bytes as ht, persistCandidateModelSettlementEvidence as i, readVerifiedArtifact as it, assertTerminalAllowedInPhase as j, withinCandidateCleanupDeadline as k, candidateKnowledgeExecutionPaths as l, canonicalCandidateDigest$1 as lt, usdToNanos as m, omitTopLevelDigest as mt, executePreparedAgentCandidate as n, candidateWorkspaceManifest as nt, sealAgentCandidateExecutorStopAcknowledgement as o, verifyBytes as ot, sealAgentCandidateModelSettlement as p, immutableCandidateValue as pt, candidateProfileAgentPaths as q, RecoveryAgentCandidateTraceStore as r, captureMaterializedWorkspace as rt, CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV as s, verifyMaterializedWorkspace as st, prepareAgentCandidateExecution as t, parseExactCandidateProfile as tt, AGENT_CANDIDATE_EXECUTION_SUPPORT as u, canonicalCandidateDocument as ut, assertPreparedCandidateIntegrity as v, readCandidateGitTreeFiles as w, CANDIDATE_TRACE_ENV as x, beginPreparedCandidateDisposal as y, terminalRecord as z };
4605
+ export { parseExactAgentProfile as $, assertRecoveryMatchesStaged as A, assertExactObjectKeys as B, assertNoGitIndirection as C, candidateCleanupDeadline as D, assertAgentCandidateExecutionRoots as E, rejectedFinish as F, applyExactAgentProfileDiff as G, PI_CANDIDATE_AGENT_DIR_ENV as H, rejectedStage as I, createAgentCandidateProfileActivation as J, assertCandidateProfileBinding as K, requireStagedTerminal as L, assertTerminalMatchesClaim as M, assertTerminalMatchesStaged as N, candidateCleanupTimeout as O, recoveredTerminalRecord as P, parseAgentCandidateProfileActivation as Q, sealTerminalDigest as R, CANDIDATE_TRACE_TAGS as S, runCandidateGit as T, PI_CANDIDATE_SESSION_DIR_ENV as U, isWellFormedUnicode as V, agentCandidateProfileAsAgentProfile as W, materializeAgentCandidateProfilePlan as X, freezeGenericAgentCandidateProfile as Y, omitUndefinedObjectFields as Z, candidateExecutionClaim as _, persistCandidateOutputArtifact as a, scanMaterializedWorkspaceManifest as at, consumePreparedCandidateExecution as b, CANDIDATE_KNOWLEDGE_ROOT_ENV as c, verifiedResourceTextByDigest as d, parseExactAgentProfileDiff as et, verifyAgentCandidateBundle as f, candidateClaimFileInternals as g, InMemoryAgentCandidateExecutionClaimStore as h, persistCandidateModelSettlementEvidence as i, readVerifiedArtifact as it, assertTerminalAllowedInPhase as j, withinCandidateCleanupDeadline as k, candidateKnowledgeExecutionPaths as l, usdToNanos as m, executePreparedAgentCandidate as n, candidateWorkspaceManifest as nt, sealAgentCandidateExecutorStopAcknowledgement as o, verifyBytes as ot, sealAgentCandidateModelSettlement as p, candidateProfileAgentPaths as q, RecoveryAgentCandidateTraceStore as r, captureMaterializedWorkspace as rt, CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV as s, verifyMaterializedWorkspace as st, prepareAgentCandidateExecution as t, parseExactCandidateProfile as tt, AGENT_CANDIDATE_EXECUTION_SUPPORT as u, assertPreparedCandidateIntegrity as v, readCandidateGitTreeFiles as w, CANDIDATE_TRACE_ENV as x, beginPreparedCandidateDisposal as y, terminalRecord as z };
4661
4606
 
4662
- //# sourceMappingURL=prepare-B5fJ7mLS.js.map
4607
+ //# sourceMappingURL=prepare-DDGp0-rW.js.map