@tangle-network/agent-runtime 0.105.0 → 0.106.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 (218) hide show
  1. package/README.md +2 -2
  2. package/dist/activation-CRjVfOiy.js +203 -0
  3. package/dist/activation-CRjVfOiy.js.map +1 -0
  4. package/dist/activation-DyWB0K6E.d.ts +98 -0
  5. package/dist/agent.d.ts +216 -234
  6. package/dist/agent.js +615 -547
  7. package/dist/agent.js.map +1 -1
  8. package/dist/analyst-loop-DGdtVENg.js +517 -0
  9. package/dist/analyst-loop-DGdtVENg.js.map +1 -0
  10. package/dist/analyst-loop.d.ts +10 -43
  11. package/dist/analyst-loop.js +2 -11
  12. package/dist/backends-Dy8NujB4.js +713 -0
  13. package/dist/backends-Dy8NujB4.js.map +1 -0
  14. package/dist/candidate-execution/index.d.ts +4 -192
  15. package/dist/candidate-execution/index.js +5 -66
  16. package/dist/candidate-execution-DqMbv1rU.js +488 -0
  17. package/dist/candidate-execution-DqMbv1rU.js.map +1 -0
  18. package/dist/coder-yhVWbdWc.js +40 -0
  19. package/dist/coder-yhVWbdWc.js.map +1 -0
  20. package/dist/conversation-XucG_K3l.js +1265 -0
  21. package/dist/conversation-XucG_K3l.js.map +1 -0
  22. package/dist/conversation.d.ts +2 -804
  23. package/dist/conversation.js +2 -55
  24. package/dist/environment-provider-CfLUmKmf.js +1168 -0
  25. package/dist/environment-provider-CfLUmKmf.js.map +1 -0
  26. package/dist/environment-provider-IUGU3epE.d.ts +964 -0
  27. package/dist/environment-provider.d.ts +2 -78
  28. package/dist/environment-provider.js +2 -18
  29. package/dist/errors-DEAvWQPy.js +111 -0
  30. package/dist/errors-DEAvWQPy.js.map +1 -0
  31. package/dist/improvement-adapter-Cr5TBSji.d.ts +166 -0
  32. package/dist/improvement-cycle-C095kS_g.js +2624 -0
  33. package/dist/improvement-cycle-C095kS_g.js.map +1 -0
  34. package/dist/index-BGdxAwfO.d.ts +838 -0
  35. package/dist/index-C-FYUuFG.d.ts +193 -0
  36. package/dist/index-CbNM40xG.d.ts +140 -0
  37. package/dist/index-DruSKs3Z.d.ts +7224 -0
  38. package/dist/index-Efjb3nrQ.d.ts +671 -0
  39. package/dist/index.d.ts +14 -1058
  40. package/dist/index.js +2106 -2082
  41. package/dist/index.js.map +1 -1
  42. package/dist/intelligence.d.ts +768 -889
  43. package/dist/intelligence.js +1466 -1367
  44. package/dist/intelligence.js.map +1 -1
  45. package/dist/{kb-gate-CwHO0vz6.d.ts → kb-gate-C8z2juK8.d.ts} +33 -31
  46. package/dist/kb-gate-DpaSwXVx.js +80 -0
  47. package/dist/kb-gate-DpaSwXVx.js.map +1 -0
  48. package/dist/knowledge-Ku-mPP4f.js +433 -0
  49. package/dist/knowledge-Ku-mPP4f.js.map +1 -0
  50. package/dist/knowledge.d.ts +2 -150
  51. package/dist/knowledge.js +2 -40
  52. package/dist/local-harness-Dh8PJ0ot.d.ts +455 -0
  53. package/dist/loop-runner-bin-BXsFEUcf.d.ts +162 -0
  54. package/dist/loop-runner-bin-BwjQ1NfH.js +268 -0
  55. package/dist/loop-runner-bin-BwjQ1NfH.js.map +1 -0
  56. package/dist/loop-runner-bin.d.ts +2 -15
  57. package/dist/loop-runner-bin.js +2 -24
  58. package/dist/loops.d.ts +5 -4164
  59. package/dist/loops.js +8 -419
  60. package/dist/mcp/bin.d.ts +1 -1
  61. package/dist/mcp/bin.js +116 -146
  62. package/dist/mcp/bin.js.map +1 -1
  63. package/dist/mcp/index.d.ts +295 -436
  64. package/dist/mcp/index.js +1242 -1177
  65. package/dist/mcp/index.js.map +1 -1
  66. package/dist/mcp/memory-bin.d.ts +1 -1
  67. package/dist/mcp/memory-bin.js +37 -16
  68. package/dist/mcp/memory-bin.js.map +1 -1
  69. package/dist/memory-server-DL6cE2Ag.js +234 -0
  70. package/dist/memory-server-DL6cE2Ag.js.map +1 -0
  71. package/dist/model-resolution-Btd9iIKV.js +98 -0
  72. package/dist/model-resolution-Btd9iIKV.js.map +1 -0
  73. package/dist/openai-tools-B68JaOCx.d.ts +24 -0
  74. package/dist/openai-tools-CKLy1C7M.js +44 -0
  75. package/dist/openai-tools-CKLy1C7M.js.map +1 -0
  76. package/dist/otel-export-D34IQW1C.js +843 -0
  77. package/dist/otel-export-D34IQW1C.js.map +1 -0
  78. package/dist/platform.d.ts +188 -185
  79. package/dist/platform.js +185 -218
  80. package/dist/platform.js.map +1 -1
  81. package/dist/prepare-B53sPV7M.js +4292 -0
  82. package/dist/prepare-B53sPV7M.js.map +1 -0
  83. package/dist/primeintellect/index.d.ts +149 -145
  84. package/dist/primeintellect/index.js +626 -1003
  85. package/dist/primeintellect/index.js.map +1 -1
  86. package/dist/profiles.d.ts +296 -490
  87. package/dist/profiles.js +722 -749
  88. package/dist/profiles.js.map +1 -1
  89. package/dist/protected-model-port-BLPH5VVv.js +722 -0
  90. package/dist/protected-model-port-BLPH5VVv.js.map +1 -0
  91. package/dist/protected-model-port-BP6Z4eau.d.ts +283 -0
  92. package/dist/protected-redaction--F3v1oo8.js +200 -0
  93. package/dist/protected-redaction--F3v1oo8.js.map +1 -0
  94. package/dist/redact-D-u-rrcn.js +82 -0
  95. package/dist/redact-D-u-rrcn.js.map +1 -0
  96. package/dist/redact-kbIOjfjM.d.ts +452 -0
  97. package/dist/researcher-CoVqNhfI.js +433 -0
  98. package/dist/researcher-CoVqNhfI.js.map +1 -0
  99. package/dist/runtime-BG0BziaP.js +5408 -0
  100. package/dist/runtime-BG0BziaP.js.map +1 -0
  101. package/dist/sandbox-events-DeI5xX8P.js +316 -0
  102. package/dist/sandbox-events-DeI5xX8P.js.map +1 -0
  103. package/dist/spawn-journal-CwPvKUTa.js +456 -0
  104. package/dist/spawn-journal-CwPvKUTa.js.map +1 -0
  105. package/dist/structural-rollout-IXUEplky.js +1445 -0
  106. package/dist/structural-rollout-IXUEplky.js.map +1 -0
  107. package/dist/substrate-B0TYNrXn.js +27 -0
  108. package/dist/substrate-B0TYNrXn.js.map +1 -0
  109. package/dist/{substrate-Dyiqmd3o.d.ts → substrate-BcnuSHXm.d.ts} +57 -54
  110. package/dist/supervise-BiRutHS9.js +7321 -0
  111. package/dist/supervise-BiRutHS9.js.map +1 -0
  112. package/dist/supervisor-DTKhF-RV.js +3826 -0
  113. package/dist/supervisor-DTKhF-RV.js.map +1 -0
  114. package/dist/testing.d.ts +4 -3
  115. package/dist/testing.js +2478 -2637
  116. package/dist/testing.js.map +1 -1
  117. package/dist/tool-server-RcWgLIsL.js +141 -0
  118. package/dist/tool-server-RcWgLIsL.js.map +1 -0
  119. package/dist/trace-propagation-CJJC7SVB.js +57 -0
  120. package/dist/trace-propagation-CJJC7SVB.js.map +1 -0
  121. package/dist/types-BaIpb0XT.d.ts +492 -0
  122. package/dist/types-BevOjfTY.d.ts +765 -0
  123. package/dist/types-C9j4qg6l.d.ts +500 -0
  124. package/dist/types-Cja5OTGh.d.ts +190 -0
  125. package/dist/util-MVgdwuIS.js +145 -0
  126. package/dist/util-MVgdwuIS.js.map +1 -0
  127. package/dist/workspace-archive-BosQiotA.js +575 -0
  128. package/dist/workspace-archive-BosQiotA.js.map +1 -0
  129. package/package.json +43 -56
  130. package/skills/build-with-agent-runtime/SKILL.md +1 -0
  131. package/dist/activation-Cm-9MMX1.d.ts +0 -69
  132. package/dist/analyst-loop.js.map +0 -1
  133. package/dist/backends-BO4Jqoe2.d.ts +0 -134
  134. package/dist/candidate-execution/index.js.map +0 -1
  135. package/dist/chunk-2KGAN2HM.js +0 -1256
  136. package/dist/chunk-2KGAN2HM.js.map +0 -1
  137. package/dist/chunk-2VZYRB55.js +0 -834
  138. package/dist/chunk-2VZYRB55.js.map +0 -1
  139. package/dist/chunk-3MDZX7YU.js +0 -125
  140. package/dist/chunk-3MDZX7YU.js.map +0 -1
  141. package/dist/chunk-5IBQAPVB.js +0 -29
  142. package/dist/chunk-5IBQAPVB.js.map +0 -1
  143. package/dist/chunk-5QOB7H74.js +0 -387
  144. package/dist/chunk-5QOB7H74.js.map +0 -1
  145. package/dist/chunk-C5RTIBNZ.js +0 -48
  146. package/dist/chunk-C5RTIBNZ.js.map +0 -1
  147. package/dist/chunk-CTRA64LY.js +0 -680
  148. package/dist/chunk-CTRA64LY.js.map +0 -1
  149. package/dist/chunk-DPEUKJRO.js +0 -27
  150. package/dist/chunk-DPEUKJRO.js.map +0 -1
  151. package/dist/chunk-FD2MBMOH.js +0 -494
  152. package/dist/chunk-FD2MBMOH.js.map +0 -1
  153. package/dist/chunk-H5QPIZNX.js +0 -907
  154. package/dist/chunk-H5QPIZNX.js.map +0 -1
  155. package/dist/chunk-HLKC4UYB.js +0 -3514
  156. package/dist/chunk-HLKC4UYB.js.map +0 -1
  157. package/dist/chunk-HNP72PNU.js +0 -192
  158. package/dist/chunk-HNP72PNU.js.map +0 -1
  159. package/dist/chunk-ISPWRSEC.js +0 -408
  160. package/dist/chunk-ISPWRSEC.js.map +0 -1
  161. package/dist/chunk-KRBFHMV6.js +0 -1228
  162. package/dist/chunk-KRBFHMV6.js.map +0 -1
  163. package/dist/chunk-M22PL4GH.js +0 -171
  164. package/dist/chunk-M22PL4GH.js.map +0 -1
  165. package/dist/chunk-NURIQBJQ.js +0 -72
  166. package/dist/chunk-NURIQBJQ.js.map +0 -1
  167. package/dist/chunk-OPVWXJ2H.js +0 -75
  168. package/dist/chunk-OPVWXJ2H.js.map +0 -1
  169. package/dist/chunk-PZZKQVQV.js +0 -52
  170. package/dist/chunk-PZZKQVQV.js.map +0 -1
  171. package/dist/chunk-Q2JSAVQ3.js +0 -671
  172. package/dist/chunk-Q2JSAVQ3.js.map +0 -1
  173. package/dist/chunk-RDOAVVHY.js +0 -699
  174. package/dist/chunk-RDOAVVHY.js.map +0 -1
  175. package/dist/chunk-SGKPNBXE.js +0 -60
  176. package/dist/chunk-SGKPNBXE.js.map +0 -1
  177. package/dist/chunk-SMQXZGLZ.js +0 -351
  178. package/dist/chunk-SMQXZGLZ.js.map +0 -1
  179. package/dist/chunk-UHEZW5BU.js +0 -2918
  180. package/dist/chunk-UHEZW5BU.js.map +0 -1
  181. package/dist/chunk-UPWGXKXB.js +0 -254
  182. package/dist/chunk-UPWGXKXB.js.map +0 -1
  183. package/dist/chunk-VISA6CI3.js +0 -200
  184. package/dist/chunk-VISA6CI3.js.map +0 -1
  185. package/dist/chunk-WMTCUOQL.js +0 -474
  186. package/dist/chunk-WMTCUOQL.js.map +0 -1
  187. package/dist/chunk-WRTOVNN4.js +0 -4728
  188. package/dist/chunk-WRTOVNN4.js.map +0 -1
  189. package/dist/chunk-WSTRQZYQ.js +0 -5576
  190. package/dist/chunk-WSTRQZYQ.js.map +0 -1
  191. package/dist/chunk-XBG2W2VW.js +0 -6434
  192. package/dist/chunk-XBG2W2VW.js.map +0 -1
  193. package/dist/chunk-YEJR7IXO.js +0 -68
  194. package/dist/chunk-YEJR7IXO.js.map +0 -1
  195. package/dist/chunk-YJZA2BIK.js +0 -1338
  196. package/dist/chunk-YJZA2BIK.js.map +0 -1
  197. package/dist/completion-gate-BMy5LGoP.d.ts +0 -256
  198. package/dist/conversation.js.map +0 -1
  199. package/dist/coordination-BZZSVYpZ.d.ts +0 -2570
  200. package/dist/environment-provider.js.map +0 -1
  201. package/dist/improvement-adapter-HAZz-7vK.d.ts +0 -203
  202. package/dist/knowledge.js.map +0 -1
  203. package/dist/local-harness-BDNcl6jI.d.ts +0 -175
  204. package/dist/loop-runner-bin-68aoM9-7.d.ts +0 -199
  205. package/dist/loop-runner-bin.js.map +0 -1
  206. package/dist/loops.js.map +0 -1
  207. package/dist/openai-tools-fnj6SRVg.d.ts +0 -46
  208. package/dist/protected-model-port-B4t-OQjL.d.ts +0 -271
  209. package/dist/redact-BuFjxBUJ.d.ts +0 -481
  210. package/dist/sanitize-DEbPNtyI.d.ts +0 -328
  211. package/dist/structural-rollout-DEh6CEsa.d.ts +0 -446
  212. package/dist/supervise-4_48wwvy.d.ts +0 -379
  213. package/dist/types-BCoemcXU.d.ts +0 -802
  214. package/dist/types-BwoZWq-i.d.ts +0 -510
  215. package/dist/types-Cbp72qyu.d.ts +0 -491
  216. package/dist/types-CmYCMbFT.d.ts +0 -203
  217. package/dist/types-CvNwMzQt.d.ts +0 -957
  218. package/dist/worktree-fanout-DxhAWr5Z.d.ts +0 -999
@@ -0,0 +1,193 @@
1
+ import { D as AgentCandidateExecutionPhaseResult, O as AgentCandidateExecutionRecoveryEvidence, T as AgentCandidateExecutionLease, _ as AgentCandidateExecutionAttemptRecord, b as AgentCandidateExecutionClaimResult, j as AgentCandidateExecutionTerminalResult, k as AgentCandidateExecutionStageResult, v as AgentCandidateExecutionAttemptRef, w as AgentCandidateExecutionFinishResult, x as AgentCandidateExecutionClaimStore, y as AgentCandidateExecutionClaim } from "./protected-model-port-BP6Z4eau.js";
2
+ import { B as VerifiedAgentCandidate, O as AgentCandidateVerificationPorts, P as PreparedAgentCandidateExecution, a as AgentCandidateExecutionPorts, b as AgentCandidateOutputPurpose, c as AgentCandidateExecutorPort, k as AgentCandidateWorkspacePort, p as AgentCandidateExecutorWorkspaceFile, y as AgentCandidateOutputArtifactPort } from "./types-BaIpb0XT.js";
3
+ import { TraceStore } from "@tangle-network/agent-eval";
4
+ import { CodeSurface } from "@tangle-network/agent-eval/campaign";
5
+ import { AgentCandidateArtifactRef, AgentCandidateBundle, AgentCandidateCapturedArtifact, AgentCandidateCodeDisabled, AgentCandidateCodeNoOp, AgentCandidateExecution, AgentCandidateGitHubRepository, AgentCandidateKnowledge, AgentCandidateMemoryPolicy, AgentCandidateProfile, AgentCandidateRunCell, AgentCandidateWorkspaceSnapshotEvidence, AgentProfile as AgentProfile$1, AgentProfileDiff, Sha256Digest } from "@tangle-network/agent-interface";
6
+ import { AgentEnvironmentProvider, AgentExactProcessResources } from "@tangle-network/agent-interface/environment-provider";
7
+ //#region src/candidate-execution/bundle.d.ts
8
+ /** Exact candidate wire shape before the runtime computes its canonical digest. */
9
+ type AgentCandidateBundleInput = Omit<AgentCandidateBundle, 'digest'>;
10
+ /** Validate and content-address a candidate bundle before it crosses an approval boundary. */
11
+ declare function sealAgentCandidateBundle(input: AgentCandidateBundleInput): AgentCandidateBundle;
12
+ //#endregion
13
+ //#region src/candidate-execution/builder.d.ts
14
+ /** A complete profile that can be frozen without losing behavior. */
15
+ type AgentCandidateProfileSource = {
16
+ kind: 'profile';
17
+ profile: AgentProfile$1;
18
+ } | {
19
+ kind: 'profile-diffs';
20
+ base: AgentProfile$1;
21
+ /** Applied in order before the resulting profile is frozen into the bundle. */
22
+ diffs: readonly AgentProfileDiff[];
23
+ } | {
24
+ kind: 'candidate-profile';
25
+ /** Already converted to the closed, secret-free candidate profile contract. */
26
+ profile: AgentCandidateProfile;
27
+ };
28
+ /** The only accepted path from an agent-eval code candidate to executable bytes. */
29
+ interface AgentCandidateCodeSurfaceSource {
30
+ kind: 'code-surface';
31
+ surface: CodeSurface;
32
+ repository: AgentCandidateGitHubRepository;
33
+ /** Optional parent directory used to resolve a relative `surface.worktreeRef`. */
34
+ worktreeDir?: string;
35
+ }
36
+ /** Explicit control/no-op code or one finalized CodeSurface whose bytes must still verify. */
37
+ type AgentCandidateCodeSource = AgentCandidateCodeDisabled | AgentCandidateCodeNoOp | AgentCandidateCodeSurfaceSource;
38
+ /** Complete measured surfaces and execution policy compiled into one candidate bundle. */
39
+ interface BuildAgentCandidateBundleInput {
40
+ profile: AgentCandidateProfileSource;
41
+ code: AgentCandidateCodeSource;
42
+ execution: AgentCandidateExecution;
43
+ knowledge?: AgentCandidateKnowledge;
44
+ memory: AgentCandidateMemoryPolicy;
45
+ }
46
+ /**
47
+ * Compile one measured profile/code candidate into the immutable execution
48
+ * contract. Code bytes are re-read and verified by agent-eval before they are
49
+ * embedded. The returned bundle is schema-validated, canonically digested, and
50
+ * deeply immutable; call `verifyAgentCandidateBundle` at the execution boundary
51
+ * to re-read external memory, repository, and workspace artifacts.
52
+ */
53
+ declare function buildAgentCandidateBundle(input: BuildAgentCandidateBundleInput): ReturnType<typeof sealAgentCandidateBundle>;
54
+ //#endregion
55
+ //#region src/candidate-execution/claim-file-store.d.ts
56
+ interface FileAgentCandidateExecutionClaimStoreOptions {
57
+ /** Evaluator-owned directory shared by every process allowed to execute candidates. */
58
+ directory: string;
59
+ /** Testable evaluator clock; defaults to `Date.now`. */
60
+ now?: () => number;
61
+ }
62
+ /** Cross-process lifecycle implemented as fsynced, create-if-absent records. */
63
+ declare class FileAgentCandidateExecutionClaimStore implements AgentCandidateExecutionClaimStore {
64
+ private readonly directory;
65
+ private readonly now;
66
+ constructor(options: FileAgentCandidateExecutionClaimStoreOptions);
67
+ tryClaim(requested: AgentCandidateExecutionClaim): Promise<AgentCandidateExecutionClaimResult>;
68
+ getAttempt(requestedAttempt: AgentCandidateExecutionAttemptRef): Promise<AgentCandidateExecutionAttemptRecord | undefined>;
69
+ markCandidateMayRun(requestedLease: AgentCandidateExecutionLease): Promise<AgentCandidateExecutionPhaseResult>;
70
+ stageTerminal(requestedLease: AgentCandidateExecutionLease, result: AgentCandidateExecutionTerminalResult): Promise<AgentCandidateExecutionStageResult>;
71
+ finish(requestedLease: AgentCandidateExecutionLease, requestedTerminalDigest: Sha256Digest): Promise<AgentCandidateExecutionFinishResult>;
72
+ recoverExpired(requestedAttempt: AgentCandidateExecutionAttemptRef, evidence: AgentCandidateExecutionRecoveryEvidence): Promise<AgentCandidateExecutionFinishResult>;
73
+ private storedAttempt;
74
+ private transitionState;
75
+ private retryFailure;
76
+ private ownerPublication;
77
+ private claimPath;
78
+ private terminalPath;
79
+ private transitionPath;
80
+ }
81
+ //#endregion
82
+ //#region src/candidate-execution/dispose.d.ts
83
+ interface DisposePreparedAgentCandidateOptions {
84
+ cleanupTimeoutMs?: number;
85
+ }
86
+ /** Revoke reservations held by a prepared candidate that will not be executed. */
87
+ declare function disposePreparedAgentCandidateExecution(prepared: PreparedAgentCandidateExecution, options?: DisposePreparedAgentCandidateOptions): Promise<{
88
+ disposed: true;
89
+ }>;
90
+ //#endregion
91
+ //#region src/candidate-execution/exact-process-executor.d.ts
92
+ interface ExactProcessCandidateExecutorOptions {
93
+ provider: AgentEnvironmentProvider;
94
+ resources: AgentExactProcessResources;
95
+ provisionTimeoutMs?: number;
96
+ recoveryRetentionMs?: number;
97
+ providerOptions?: Record<string, unknown>;
98
+ }
99
+ /** Adapt one neutral exact-process provider to Runtime's trusted candidate boundary. */
100
+ declare function exactProcessProviderAsCandidateExecutor(options: ExactProcessCandidateExecutorOptions): AgentCandidateExecutorPort;
101
+ //#endregion
102
+ //#region src/candidate-execution/knowledge.d.ts
103
+ /** Environment variable containing the materialized candidate knowledge root. */
104
+ declare const CANDIDATE_KNOWLEDGE_ROOT_ENV = "TANGLE_CANDIDATE_KNOWLEDGE_ROOT";
105
+ /** Environment variable containing the materialized retrieval configuration path. */
106
+ declare const CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV = "TANGLE_CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG";
107
+ /** Deterministic, signed locations used by every candidate executor. */
108
+ declare function candidateKnowledgeExecutionPaths(taskRoot: string, hasRetrievalConfig: boolean): {
109
+ root: string;
110
+ retrievalConfig?: string;
111
+ };
112
+ //#endregion
113
+ //#region src/candidate-execution/output-artifacts.d.ts
114
+ /** Persist evaluator evidence, read it back, and bind the returned locator to the exact bytes. */
115
+ declare function persistCandidateOutputArtifact(port: AgentCandidateOutputArtifactPort, input: {
116
+ executionId: string;
117
+ purpose: AgentCandidateOutputPurpose;
118
+ bytes: Uint8Array;
119
+ signal?: AbortSignal;
120
+ }): Promise<AgentCandidateArtifactRef>;
121
+ //#endregion
122
+ //#region src/candidate-execution/recover.d.ts
123
+ interface RecoverExpiredAgentCandidateOptions {
124
+ attempt: AgentCandidateExecutionAttemptRef;
125
+ claimStore: AgentCandidateExecutionClaimStore;
126
+ executor: AgentCandidateExecutorPort;
127
+ traceStore: TraceStore;
128
+ ports: Pick<AgentCandidateExecutionPorts, 'models' | 'memory'>;
129
+ outputArtifacts: AgentCandidateOutputArtifactPort;
130
+ cleanupTimeoutMs?: number;
131
+ /** Evaluator clock; must be the same clock used by the claim store. */
132
+ now?: () => number;
133
+ }
134
+ /** Close an expired crashed attempt from persisted non-secret handles, then record failure. */
135
+ declare function recoverExpiredAgentCandidateExecution(options: RecoverExpiredAgentCandidateOptions): Promise<AgentCandidateExecutionFinishResult>;
136
+ //#endregion
137
+ //#region src/candidate-execution/verify.d.ts
138
+ /** Surfaces admitted by Runtime's verifier before an environment adapter is selected. */
139
+ declare const AGENT_CANDIDATE_EXECUTION_SUPPORT: Readonly<{
140
+ outcomes: readonly ["workspace", "output"];
141
+ code: readonly ["disabled", "no-op", "git-patch"];
142
+ memory: readonly ["disabled", "isolated"];
143
+ knowledge: true;
144
+ profile: Readonly<{
145
+ mcpTransports: readonly ["stdio"];
146
+ remoteMcp: false;
147
+ tools: false;
148
+ permissions: false;
149
+ modes: false;
150
+ confidential: false;
151
+ }>;
152
+ }>;
153
+ /** Verifies every digest, resource, workspace, and Git object in a candidate bundle. */
154
+ declare function verifyAgentCandidateBundle(input: unknown, ports: AgentCandidateVerificationPorts): Promise<VerifiedAgentCandidate>;
155
+ //#endregion
156
+ //#region src/candidate-execution/workspace-archive.d.ts
157
+ interface AgentCandidateWorkspaceArchiveLimits {
158
+ maxArchiveBytes: number;
159
+ maxEmbeddedArtifactBytes: number;
160
+ maxFiles: number;
161
+ maxFileBytes: number;
162
+ maxTotalFileBytes: number;
163
+ maxPathBytes: number;
164
+ maxRepositoryBundleBytes: number;
165
+ }
166
+ interface CaptureAgentCandidateWorkspaceOptions {
167
+ /** Include Git HEAD so task preparation can prove its exact commit and tree. */
168
+ includeRepository?: boolean;
169
+ limits?: Partial<AgentCandidateWorkspaceArchiveLimits>;
170
+ /** Use the evaluator-owned artifact store when manifest or archive bytes should not be embedded. */
171
+ artifactPersistence?: {
172
+ executionId: string;
173
+ outputArtifacts: AgentCandidateOutputArtifactPort;
174
+ signal?: AbortSignal;
175
+ };
176
+ }
177
+ interface CreateAgentCandidateWorkspacePortOptions {
178
+ limits?: Partial<AgentCandidateWorkspaceArchiveLimits>;
179
+ }
180
+ interface CapturedAgentCandidateWorkspace {
181
+ readonly snapshot: AgentCandidateWorkspaceSnapshotEvidence;
182
+ /** Caller-owned bytes accepted by createAgentCandidateWorkspacePort. */
183
+ readonly archive: Uint8Array;
184
+ }
185
+ /** Capture one exact regular-file workspace for immutable candidate execution. */
186
+ declare function captureAgentCandidateWorkspace(rootInput: string, options?: CaptureAgentCandidateWorkspaceOptions): Promise<CapturedAgentCandidateWorkspace>;
187
+ /** Capture detached files returned by a remote executor into the standard archive. */
188
+ declare function captureAgentCandidateWorkspaceFiles(input: readonly AgentCandidateExecutorWorkspaceFile[], options?: Omit<CaptureAgentCandidateWorkspaceOptions, 'includeRepository'>): Promise<CapturedAgentCandidateWorkspace>;
189
+ /** Create the standard bounded materializer for candidate execution ports. */
190
+ declare function createAgentCandidateWorkspacePort(options?: CreateAgentCandidateWorkspacePortOptions): AgentCandidateWorkspacePort;
191
+ //#endregion
192
+ export { AgentCandidateCodeSurfaceSource as C, AgentCandidateBundleInput as D, buildAgentCandidateBundle as E, sealAgentCandidateBundle as O, AgentCandidateCodeSource as S, BuildAgentCandidateBundleInput as T, exactProcessProviderAsCandidateExecutor as _, captureAgentCandidateWorkspace as a, FileAgentCandidateExecutionClaimStore as b, AGENT_CANDIDATE_EXECUTION_SUPPORT as c, recoverExpiredAgentCandidateExecution as d, persistCandidateOutputArtifact as f, ExactProcessCandidateExecutorOptions as g, candidateKnowledgeExecutionPaths as h, CreateAgentCandidateWorkspacePortOptions as i, verifyAgentCandidateBundle as l, CANDIDATE_KNOWLEDGE_ROOT_ENV as m, CaptureAgentCandidateWorkspaceOptions as n, captureAgentCandidateWorkspaceFiles as o, CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV as p, CapturedAgentCandidateWorkspace as r, createAgentCandidateWorkspacePort as s, AgentCandidateWorkspaceArchiveLimits as t, RecoverExpiredAgentCandidateOptions as u, DisposePreparedAgentCandidateOptions as v, AgentCandidateProfileSource as w, FileAgentCandidateExecutionClaimStoreOptions as x, disposePreparedAgentCandidateExecution as y };
193
+ //# sourceMappingURL=index-C-FYUuFG.d.ts.map
@@ -0,0 +1,140 @@
1
+ import { R as Budget, st as SupervisedResult } from "./environment-provider-IUGU3epE.js";
2
+ import { Ec as DeliverableSpec, ct as SupervisorProfile, j as SuperviseOptions, qs as ExecutorConfig } from "./index-DruSKs3Z.js";
3
+ import { y as AgentCandidateOutputArtifactPort } from "./types-BaIpb0XT.js";
4
+ import { i as AgentImprovementActivationTransition, n as AgentImprovementActivationResultStore, t as AgentImprovementActivationReconciliation } from "./activation-DyWB0K6E.js";
5
+ import { AgentCandidateBundle, AgentCandidateCapturedArtifact, AgentCandidateKnowledge } from "@tangle-network/agent-interface";
6
+ import { BuildEvalKnowledgeBundleOptions, KnowledgeBaseQualityOptions, KnowledgeImprovementOptions, KnowledgeImprovementResult, KnowledgeReadinessSpec, PromoteKnowledgeCandidateOptions, RagKnowledgeUpdateResult } from "@tangle-network/agent-knowledge";
7
+ //#region src/knowledge/activation.d.ts
8
+ interface CreateKnowledgeImprovementActivationExecutorOptions extends Omit<PromoteKnowledgeCandidateOptions, 'root' | 'candidate'> {
9
+ root: string;
10
+ identity: string;
11
+ results: AgentImprovementActivationResultStore;
12
+ }
13
+ interface KnowledgeImprovementActivationExecutor {
14
+ transition: AgentImprovementActivationTransition;
15
+ reconcile: AgentImprovementActivationReconciliation;
16
+ }
17
+ /** Apply or restore one local knowledge candidate through the shared activation contract. */
18
+ declare function createKnowledgeImprovementActivationExecutor(options: CreateKnowledgeImprovementActivationExecutorOptions): KnowledgeImprovementActivationExecutor;
19
+ //#endregion
20
+ //#region src/knowledge/supervised-update.d.ts
21
+ /** Standing prompt for a supervisor that grows a shared knowledge base through spawned researchers. */
22
+ declare const RESEARCH_SUPERVISOR_SYSTEM_PROMPT: string;
23
+ interface KnowledgeReadinessCheckInput {
24
+ root: string;
25
+ goal: string;
26
+ readinessSpecs?: readonly unknown[];
27
+ readinessTaskId?: string;
28
+ readiness?: unknown;
29
+ }
30
+ type KnowledgeReadinessCheckResult = boolean | {
31
+ ready: boolean;
32
+ summary?: string;
33
+ metadata?: Record<string, unknown>;
34
+ };
35
+ type KnowledgeReadinessCheck = (input: KnowledgeReadinessCheckInput) => Promise<KnowledgeReadinessCheckResult> | KnowledgeReadinessCheckResult;
36
+ interface SupervisedKnowledgeUpdateInput {
37
+ goal?: string;
38
+ root?: string;
39
+ candidateRoot?: string;
40
+ findings?: readonly unknown[];
41
+ metadata?: Record<string, unknown>;
42
+ }
43
+ interface SupervisedKnowledgeUpdateResult {
44
+ applied: boolean;
45
+ summary: string;
46
+ supervised: SupervisedResult<unknown>;
47
+ metadata: NonNullable<RagKnowledgeUpdateResult['metadata']>;
48
+ }
49
+ interface SupervisedKnowledgeUpdateOptions {
50
+ root: string;
51
+ goal: string;
52
+ readiness: KnowledgeReadinessCheck;
53
+ readinessSpecs?: readonly unknown[];
54
+ readinessTaskId?: string;
55
+ readinessOptions?: unknown;
56
+ findings?: readonly unknown[];
57
+ metadata?: Record<string, unknown>;
58
+ budget: Budget;
59
+ backend?: ExecutorConfig;
60
+ makeWorkerAgent?: SuperviseOptions['makeWorkerAgent'];
61
+ harness?: string;
62
+ supervisorModel?: string;
63
+ supervisorSystemPrompt?: string;
64
+ superviseOptions?: Partial<Omit<SuperviseOptions, 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'>>;
65
+ allowedModels?: readonly string[];
66
+ runSupervised?: (profile: SupervisorProfile, task: unknown, opts: SuperviseOptions) => Promise<SupervisedResult<unknown>>;
67
+ }
68
+ type SupervisedKnowledgeUpdater = (input: SupervisedKnowledgeUpdateInput) => Promise<SupervisedKnowledgeUpdateResult>;
69
+ /** Build the completion check a supervised KB update uses to stop only when the KB is ready. */
70
+ declare function knowledgeReadinessDeliverable(options: Pick<SupervisedKnowledgeUpdateOptions, 'root' | 'goal' | 'readiness' | 'readinessSpecs' | 'readinessTaskId' | 'readinessOptions'>): DeliverableSpec<unknown>;
71
+ /** Create an `improveKnowledgeBase` update callback backed by runtime supervision. */
72
+ declare function createSupervisedKnowledgeUpdater(options: SupervisedKnowledgeUpdateOptions): SupervisedKnowledgeUpdater;
73
+ /** Run a runtime supervisor that updates one candidate knowledge base and stops on readiness. */
74
+ declare function runSupervisedKnowledgeUpdate(options: SupervisedKnowledgeUpdateOptions): Promise<SupervisedKnowledgeUpdateResult>;
75
+ /** Format the supervisor task with the KB root, readiness requirements, current findings, and metadata. */
76
+ declare function formatSupervisedKnowledgeTask(options: Pick<SupervisedKnowledgeUpdateOptions, 'root' | 'goal' | 'readinessSpecs' | 'readinessTaskId' | 'findings' | 'metadata'>): string;
77
+ //#endregion
78
+ //#region src/knowledge/improvement-job.d.ts
79
+ interface RunKnowledgeImprovementJobOptions extends Omit<KnowledgeImprovementOptions, 'updateKnowledge'> {
80
+ budget: Budget;
81
+ readinessCheck?: KnowledgeReadinessCheck;
82
+ backend?: ExecutorConfig;
83
+ makeWorkerAgent?: SuperviseOptions['makeWorkerAgent'];
84
+ harness?: string;
85
+ supervisorModel?: string;
86
+ supervisorSystemPrompt?: string;
87
+ superviseOptions?: Partial<Omit<SuperviseOptions, 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'>>;
88
+ allowedModels?: readonly string[];
89
+ runSupervised?: (profile: SupervisorProfile, task: unknown, opts: SuperviseOptions) => Promise<SupervisedResult<unknown>>;
90
+ candidateArtifacts?: AgentCandidateOutputArtifactPort;
91
+ onMeasurement?: (measurement: KnowledgeImprovementJobMeasurement) => Promise<void> | void;
92
+ }
93
+ interface KnowledgeImprovementJobMeasurement {
94
+ startedAt: string;
95
+ finishedAt: string;
96
+ durationMs: number;
97
+ updateCalls: number;
98
+ updateDurationMs: number;
99
+ supervisedSpent: {
100
+ iterations: number;
101
+ inputTokens: number;
102
+ outputTokens: number;
103
+ usdKnown: boolean;
104
+ usd: number;
105
+ ms: number;
106
+ };
107
+ }
108
+ interface KnowledgeImprovementJobResult {
109
+ improvement: KnowledgeImprovementResult;
110
+ knowledge?: KnowledgeImprovementCandidatePair;
111
+ measurement: KnowledgeImprovementJobMeasurement;
112
+ blocked: boolean;
113
+ }
114
+ interface KnowledgeImprovementCandidatePair {
115
+ reference: AgentCandidateKnowledge['candidate'];
116
+ evaluation: AgentCandidateCapturedArtifact;
117
+ baseline: AgentCandidateKnowledge['snapshot'];
118
+ candidate: AgentCandidateKnowledge['snapshot'];
119
+ }
120
+ interface KnowledgeImprovementExperimentBundles {
121
+ baseline: AgentCandidateBundle;
122
+ candidate: AgentCandidateBundle;
123
+ }
124
+ interface AgentKnowledgeReadinessCheckOptions {
125
+ goal: string;
126
+ readinessSpecs?: readonly KnowledgeReadinessSpec[];
127
+ readinessTaskId?: string;
128
+ readiness?: Omit<BuildEvalKnowledgeBundleOptions, 'taskId' | 'index' | 'specs'>;
129
+ strict?: boolean;
130
+ kbQuality?: KnowledgeBaseQualityOptions;
131
+ }
132
+ /** Build the default readiness check backed by `@tangle-network/agent-knowledge` validation and scoring. */
133
+ declare function createAgentKnowledgeReadinessCheck(options: AgentKnowledgeReadinessCheckOptions): KnowledgeReadinessCheck;
134
+ /** Produce a frozen KB candidate while leaving live knowledge content unchanged. */
135
+ declare function runKnowledgeImprovementJob(options: RunKnowledgeImprovementJobOptions): Promise<KnowledgeImprovementJobResult>;
136
+ /** Attach both frozen knowledge inputs to one otherwise-identical bundle pair. */
137
+ declare function buildKnowledgeImprovementExperimentBundles(bundle: AgentCandidateBundle, knowledge: KnowledgeImprovementCandidatePair): KnowledgeImprovementExperimentBundles;
138
+ //#endregion
139
+ export { KnowledgeImprovementActivationExecutor as C, CreateKnowledgeImprovementActivationExecutorOptions as S, SupervisedKnowledgeUpdater as _, KnowledgeImprovementJobResult as a, knowledgeReadinessDeliverable as b, createAgentKnowledgeReadinessCheck as c, KnowledgeReadinessCheckInput as d, KnowledgeReadinessCheckResult as f, SupervisedKnowledgeUpdateResult as g, SupervisedKnowledgeUpdateOptions as h, KnowledgeImprovementJobMeasurement as i, runKnowledgeImprovementJob as l, SupervisedKnowledgeUpdateInput as m, KnowledgeImprovementCandidatePair as n, RunKnowledgeImprovementJobOptions as o, RESEARCH_SUPERVISOR_SYSTEM_PROMPT as p, KnowledgeImprovementExperimentBundles as r, buildKnowledgeImprovementExperimentBundles as s, AgentKnowledgeReadinessCheckOptions as t, KnowledgeReadinessCheck as u, createSupervisedKnowledgeUpdater as v, createKnowledgeImprovementActivationExecutor as w, runSupervisedKnowledgeUpdate as x, formatSupervisedKnowledgeTask as y };
140
+ //# sourceMappingURL=index-CbNM40xG.d.ts.map