@tangle-network/agent-runtime 0.104.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 (217) hide show
  1. package/README.md +176 -42
  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 -1134
  40. package/dist/index.js +2134 -1972
  41. package/dist/index.js.map +1 -1
  42. package/dist/intelligence.d.ts +776 -888
  43. package/dist/intelligence.js +1466 -1410
  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 -17
  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 -437
  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 +150 -147
  84. package/dist/primeintellect/index.js +626 -1004
  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 -55
  130. package/skills/build-with-agent-runtime/SKILL.md +16 -9
  131. package/skills/loop-writer/SKILL.md +1 -1
  132. package/dist/activation-Cm-9MMX1.d.ts +0 -69
  133. package/dist/analyst-loop.js.map +0 -1
  134. package/dist/backends-BO4Jqoe2.d.ts +0 -134
  135. package/dist/candidate-execution/index.js.map +0 -1
  136. package/dist/chunk-2KGAN2HM.js +0 -1256
  137. package/dist/chunk-2KGAN2HM.js.map +0 -1
  138. package/dist/chunk-2QJSNOGK.js +0 -48
  139. package/dist/chunk-2QJSNOGK.js.map +0 -1
  140. package/dist/chunk-2UABGGUB.js +0 -474
  141. package/dist/chunk-2UABGGUB.js.map +0 -1
  142. package/dist/chunk-2VZYRB55.js +0 -834
  143. package/dist/chunk-2VZYRB55.js.map +0 -1
  144. package/dist/chunk-2X65HYMI.js +0 -3526
  145. package/dist/chunk-2X65HYMI.js.map +0 -1
  146. package/dist/chunk-3MDZX7YU.js +0 -125
  147. package/dist/chunk-3MDZX7YU.js.map +0 -1
  148. package/dist/chunk-3PPVCS75.js +0 -199
  149. package/dist/chunk-3PPVCS75.js.map +0 -1
  150. package/dist/chunk-5HNDYWUT.js +0 -6424
  151. package/dist/chunk-5HNDYWUT.js.map +0 -1
  152. package/dist/chunk-5IBQAPVB.js +0 -29
  153. package/dist/chunk-5IBQAPVB.js.map +0 -1
  154. package/dist/chunk-5QOB7H74.js +0 -387
  155. package/dist/chunk-5QOB7H74.js.map +0 -1
  156. package/dist/chunk-ATDFUJYI.js +0 -4728
  157. package/dist/chunk-ATDFUJYI.js.map +0 -1
  158. package/dist/chunk-B7K7V22Y.js +0 -699
  159. package/dist/chunk-B7K7V22Y.js.map +0 -1
  160. package/dist/chunk-DPEUKJRO.js +0 -27
  161. package/dist/chunk-DPEUKJRO.js.map +0 -1
  162. package/dist/chunk-FD2MBMOH.js +0 -494
  163. package/dist/chunk-FD2MBMOH.js.map +0 -1
  164. package/dist/chunk-FJI3EXU3.js +0 -2402
  165. package/dist/chunk-FJI3EXU3.js.map +0 -1
  166. package/dist/chunk-HAO4CXHP.js +0 -200
  167. package/dist/chunk-HAO4CXHP.js.map +0 -1
  168. package/dist/chunk-ISPWRSEC.js +0 -408
  169. package/dist/chunk-ISPWRSEC.js.map +0 -1
  170. package/dist/chunk-KRBFHMV6.js +0 -1228
  171. package/dist/chunk-KRBFHMV6.js.map +0 -1
  172. package/dist/chunk-L5DST3QC.js +0 -351
  173. package/dist/chunk-L5DST3QC.js.map +0 -1
  174. package/dist/chunk-M22PL4GH.js +0 -171
  175. package/dist/chunk-M22PL4GH.js.map +0 -1
  176. package/dist/chunk-NURIQBJQ.js +0 -72
  177. package/dist/chunk-NURIQBJQ.js.map +0 -1
  178. package/dist/chunk-PZZKQVQV.js +0 -52
  179. package/dist/chunk-PZZKQVQV.js.map +0 -1
  180. package/dist/chunk-Q2JSAVQ3.js +0 -671
  181. package/dist/chunk-Q2JSAVQ3.js.map +0 -1
  182. package/dist/chunk-SBTWKPVR.js +0 -5576
  183. package/dist/chunk-SBTWKPVR.js.map +0 -1
  184. package/dist/chunk-SGKPNBXE.js +0 -60
  185. package/dist/chunk-SGKPNBXE.js.map +0 -1
  186. package/dist/chunk-SNSMRT6H.js +0 -680
  187. package/dist/chunk-SNSMRT6H.js.map +0 -1
  188. package/dist/chunk-STJEHM5F.js +0 -1338
  189. package/dist/chunk-STJEHM5F.js.map +0 -1
  190. package/dist/chunk-UPWGXKXB.js +0 -254
  191. package/dist/chunk-UPWGXKXB.js.map +0 -1
  192. package/dist/chunk-YEJR7IXO.js +0 -68
  193. package/dist/chunk-YEJR7IXO.js.map +0 -1
  194. package/dist/chunk-ZXICDSAK.js +0 -907
  195. package/dist/chunk-ZXICDSAK.js.map +0 -1
  196. package/dist/completion-gate-Bv47cOnn.d.ts +0 -256
  197. package/dist/conversation.js.map +0 -1
  198. package/dist/coordination-CxtzMxSM.d.ts +0 -2570
  199. package/dist/environment-provider.js.map +0 -1
  200. package/dist/improve--2A0gK1-.d.ts +0 -440
  201. package/dist/improvement-adapter-HAZz-7vK.d.ts +0 -203
  202. package/dist/knowledge.js.map +0 -1
  203. package/dist/local-harness-CtK9dSny.d.ts +0 -175
  204. package/dist/loop-runner-bin-DUOGtvOl.d.ts +0 -207
  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-DzkUY3HQ.d.ts +0 -271
  209. package/dist/sanitize-DEbPNtyI.d.ts +0 -328
  210. package/dist/structural-rollout-C4mabf87.d.ts +0 -446
  211. package/dist/supervise-7q9F5brx.d.ts +0 -379
  212. package/dist/types-BCoemcXU.d.ts +0 -802
  213. package/dist/types-BwoZWq-i.d.ts +0 -510
  214. package/dist/types-Cbp72qyu.d.ts +0 -491
  215. package/dist/types-CmYCMbFT.d.ts +0 -203
  216. package/dist/types-CvNwMzQt.d.ts +0 -957
  217. package/dist/worktree-fanout-WsOzt8qu.d.ts +0 -999
@@ -1,134 +1,135 @@
1
- import { c as AgentExecutionBackend, A as AgentBackendInput } from '../types-BwoZWq-i.js';
2
- import { c as createOpenAICompatibleBackend } from '../backends-BO4Jqoe2.js';
3
- import { RunRecord } from '@tangle-network/agent-eval';
4
-
1
+ import { i as AgentExecutionBackend, r as AgentBackendInput } from "../types-C9j4qg6l.js";
2
+ import { Nt as createOpenAICompatibleBackend } from "../index-BGdxAwfO.js";
3
+ import { RunRecord } from "@tangle-network/agent-eval";
4
+ //#region src/primeintellect/types.d.ts
5
5
  type PrimeIntellectSplit = 'train' | 'eval';
6
6
  type PrimeIntellectJson = null | boolean | number | string | PrimeIntellectJson[] | {
7
- [key: string]: PrimeIntellectJson;
7
+ [key: string]: PrimeIntellectJson;
8
8
  };
9
9
  type PrimeIntellectContent = string | Array<{
10
- type: 'text';
11
- text: string;
10
+ type: 'text';
11
+ text: string;
12
12
  } | {
13
- type: 'image_url';
14
- image_url: {
15
- url: string;
16
- };
13
+ type: 'image_url';
14
+ image_url: {
15
+ url: string;
16
+ };
17
17
  }>;
18
18
  type PrimeIntellectMessage = {
19
- role: 'system' | 'user';
20
- content: PrimeIntellectContent;
19
+ role: 'system' | 'user';
20
+ content: PrimeIntellectContent;
21
21
  } | {
22
- role: 'assistant';
23
- content?: string | null;
24
- reasoning_content?: string | null;
25
- tool_calls?: Array<{
26
- id: string;
27
- name: string;
28
- arguments: string;
29
- }>;
30
- provider_state?: Array<Record<string, PrimeIntellectJson>>;
22
+ role: 'assistant';
23
+ content?: string | null;
24
+ reasoning_content?: string | null;
25
+ tool_calls?: Array<{
26
+ id: string;
27
+ name: string;
28
+ arguments: string;
29
+ }>;
30
+ provider_state?: Array<Record<string, PrimeIntellectJson>>;
31
31
  } | {
32
- role: 'tool';
33
- tool_call_id: string;
34
- content: PrimeIntellectContent;
35
- name?: string;
32
+ role: 'tool';
33
+ tool_call_id: string;
34
+ content: PrimeIntellectContent;
35
+ name?: string;
36
36
  };
37
37
  /** One immutable problem. References stay inside Prime's task process. */
38
38
  interface PrimeIntellectTask {
39
- id: string;
40
- split: PrimeIntellectSplit;
41
- prompt: string | PrimeIntellectMessage[];
42
- systemPrompt?: string;
43
- answer?: string | string[];
44
- metadata?: Record<string, PrimeIntellectJson>;
39
+ id: string;
40
+ split: PrimeIntellectSplit;
41
+ prompt: string | PrimeIntellectMessage[];
42
+ systemPrompt?: string;
43
+ answer?: string | string[];
44
+ metadata?: Record<string, PrimeIntellectJson>;
45
45
  }
46
46
  type PrimeIntellectScoring = {
47
- kind: 'exact';
48
- normalization?: 'none' | 'trim' | 'trim-casefold';
47
+ kind: 'exact';
48
+ normalization?: 'none' | 'trim' | 'trim-casefold';
49
49
  } | {
50
- kind: 'reference-judge';
51
- model: string;
52
- prompt?: string;
53
- view?: 'last_reply' | 'full_trace';
50
+ kind: 'reference-judge';
51
+ model: string;
52
+ prompt?: string;
53
+ view?: 'last_reply' | 'full_trace';
54
54
  } | {
55
- kind: 'command';
56
- command: readonly [string, ...string[]];
57
- files?: Readonly<Record<string, string>>;
58
- forwardEnv?: readonly string[];
59
- timeoutSeconds?: number;
55
+ kind: 'command';
56
+ command: readonly [string, ...string[]];
57
+ files?: Readonly<Record<string, string>>;
58
+ forwardEnv?: readonly string[];
59
+ timeoutSeconds?: number;
60
60
  };
61
61
  type PrimeIntellectSetupCommand = readonly [string, ...string[]];
62
62
  /** Files and commands that make the caller's real agent program runnable. */
63
63
  interface PrimeIntellectRunner {
64
- command: readonly [string, ...string[]];
65
- files?: Readonly<Record<string, string>>;
66
- setup?: readonly PrimeIntellectSetupCommand[];
67
- forwardEnv?: readonly string[];
68
- /** Container image used by the generated eval config. */
69
- image: string;
64
+ command: readonly [string, ...string[]];
65
+ files?: Readonly<Record<string, string>>;
66
+ setup?: readonly PrimeIntellectSetupCommand[];
67
+ forwardEnv?: readonly string[];
68
+ /** Container image used by the generated eval config. */
69
+ image: string;
70
70
  }
71
71
  interface PrimeIntellectPackageOptions {
72
- name: string;
73
- version: string;
74
- description?: string;
75
- tasks: readonly PrimeIntellectTask[];
76
- scoring: PrimeIntellectScoring;
77
- runner: PrimeIntellectRunner;
78
- /** Prime-enforced model turn cap. Default 16. */
79
- maxTurns?: number;
80
- maxInputTokens?: number;
81
- maxOutputTokens?: number;
82
- maxTotalTokens?: number;
83
- rolloutTimeoutSeconds?: number;
84
- scoringTimeoutSeconds?: number;
72
+ name: string;
73
+ version: string;
74
+ description?: string;
75
+ tasks: readonly PrimeIntellectTask[];
76
+ scoring: PrimeIntellectScoring;
77
+ runner: PrimeIntellectRunner;
78
+ /** Prime-enforced model turn cap. Default 16. */
79
+ maxTurns?: number;
80
+ maxInputTokens?: number;
81
+ maxOutputTokens?: number;
82
+ maxTotalTokens?: number;
83
+ rolloutTimeoutSeconds?: number;
84
+ scoringTimeoutSeconds?: number;
85
85
  }
86
86
  interface PrimeIntellectPackageManifest {
87
- schema: 'tangle.primeintellect.package/v1';
88
- name: string;
89
- moduleName: string;
90
- version: string;
91
- verifiers: '>=0.2.0,<0.3.0';
92
- taskCount: number;
93
- splits: Record<PrimeIntellectSplit, number>;
94
- taskIdsSha256: string;
95
- filesSha256: Record<string, string>;
87
+ kind: 'tangle.primeintellect.package';
88
+ name: string;
89
+ moduleName: string;
90
+ version: string;
91
+ verifiers: '>=0.2.0,<0.3.0';
92
+ taskCount: number;
93
+ splits: Record<PrimeIntellectSplit, number>;
94
+ taskIdsSha256: string;
95
+ filesSha256: Record<string, string>;
96
96
  }
97
97
  interface PrimeIntellectPackageBundle {
98
- manifest: PrimeIntellectPackageManifest;
99
- /** Relative package path to UTF-8 contents. */
100
- files: Readonly<Record<string, string>>;
98
+ manifest: PrimeIntellectPackageManifest;
99
+ /** Relative package path to UTF-8 contents. */
100
+ files: Readonly<Record<string, string>>;
101
101
  }
102
102
  /** The answer-free task exposed to the caller's runtime program. */
103
103
  interface PrimeIntellectPublicTask {
104
- id: string;
105
- split: PrimeIntellectSplit;
106
- prompt: string | PrimeIntellectMessage[];
107
- systemPrompt?: string;
108
- metadata?: Record<string, PrimeIntellectJson>;
104
+ id: string;
105
+ split: PrimeIntellectSplit;
106
+ prompt: string | PrimeIntellectMessage[];
107
+ systemPrompt?: string;
108
+ metadata?: Record<string, PrimeIntellectJson>;
109
109
  }
110
110
  interface PrimeIntellectEpisodeContext {
111
- protocol: 'tangle.primeintellect.episode/v1';
112
- task: PrimeIntellectPublicTask;
113
- model: {
114
- name: string;
115
- baseUrl: string;
116
- apiKey: string;
117
- };
118
- mcpServers: Readonly<Record<string, string>>;
111
+ task: PrimeIntellectPublicTask;
112
+ model: {
113
+ name: string;
114
+ baseUrl: string;
115
+ apiKey: string;
116
+ };
117
+ mcpServers: Readonly<Record<string, string>>;
119
118
  }
120
-
119
+ //#endregion
120
+ //#region src/primeintellect/package.d.ts
121
121
  interface WritePrimeIntellectPackageOptions {
122
- /** Replace an existing generated package and restore it if the final swap fails. */
123
- replace?: boolean;
122
+ /** Replace an existing generated package and restore it if the final swap fails. */
123
+ replace?: boolean;
124
124
  }
125
- /** Build a complete PrimeIntellect Verifiers v1 package without writing to disk. */
125
+ /** Build a complete PrimeIntellect Verifiers package without writing to disk. */
126
126
  declare function createPrimeIntellectPackage(options: PrimeIntellectPackageOptions): PrimeIntellectPackageBundle;
127
127
  /** Write a bundle through a sibling temporary directory, then rename it into place. */
128
128
  declare function writePrimeIntellectPackage(bundle: PrimeIntellectPackageBundle, outputDirectory: string, options?: WritePrimeIntellectPackageOptions): Promise<string>;
129
-
129
+ //#endregion
130
+ //#region src/primeintellect/runner.d.ts
130
131
  interface RunPrimeIntellectProgramOptions {
131
- env?: NodeJS.ProcessEnv;
132
+ env?: NodeJS.ProcessEnv;
132
133
  }
133
134
  type PrimeIntellectBackendOptions = Omit<Parameters<typeof createOpenAICompatibleBackend>[0], 'apiKey' | 'baseUrl' | 'model'>;
134
135
  /** Read and validate the private process contract installed by the generated Prime harness. */
@@ -140,68 +141,69 @@ declare function createPrimeIntellectBackend(context: PrimeIntellectEpisodeConte
140
141
  * The callback may call runPersonified, runAgentic, runAgentRounds, or any product wrapper.
141
142
  */
142
143
  declare function runPrimeIntellectProgram<Result>(run: (context: PrimeIntellectEpisodeContext) => Promise<Result>, options?: RunPrimeIntellectProgramOptions): Promise<Result>;
143
-
144
+ //#endregion
145
+ //#region src/primeintellect/traces.d.ts
144
146
  interface PrimeUsage {
145
- prompt_tokens: number;
146
- completion_tokens: number;
147
- cached_input_tokens?: number | null;
148
- reasoning_tokens?: number | null;
149
- cost?: number | null;
147
+ prompt_tokens: number;
148
+ completion_tokens: number;
149
+ cached_input_tokens?: number | null;
150
+ reasoning_tokens?: number | null;
151
+ cost?: number | null;
150
152
  }
151
153
  interface PrimeTraceNode {
152
- parent?: number | null;
153
- sampled?: boolean;
154
- usage?: PrimeUsage | null;
155
- message?: unknown;
154
+ parent?: number | null;
155
+ sampled?: boolean;
156
+ usage?: PrimeUsage | null;
157
+ message?: unknown;
156
158
  }
157
159
  interface PrimeTimeSpan {
158
- start?: number;
159
- end?: number;
160
+ start?: number;
161
+ end?: number;
160
162
  }
161
163
  interface PrimeIntellectTrace {
162
- id: string;
163
- task: {
164
- type: string;
165
- data: {
166
- idx: number;
167
- name?: string | null;
168
- split?: 'train' | 'eval';
169
- prompt?: unknown;
170
- system_prompt?: string | null;
171
- metadata?: Record<string, unknown>;
172
- [key: string]: unknown;
173
- };
174
- };
175
- runtime?: unknown;
176
- nodes: PrimeTraceNode[];
177
- rewards: Record<string, number>;
178
- metrics: Record<string, number>;
179
- info?: Record<string, unknown>;
180
- extra_usage?: PrimeUsage[];
181
- is_completed?: boolean;
182
- stop_condition?: string | null;
183
- errors?: Array<{
184
- type: string;
185
- message: string;
186
- traceback?: string | null;
187
- }>;
188
- timing?: {
189
- start?: number;
190
- setup?: PrimeTimeSpan;
191
- generation?: PrimeTimeSpan;
192
- finalize?: PrimeTimeSpan;
193
- scoring?: PrimeTimeSpan;
164
+ id: string;
165
+ task: {
166
+ type: string;
167
+ data: {
168
+ idx: number;
169
+ name?: string | null;
170
+ split?: 'train' | 'eval';
171
+ prompt?: unknown;
172
+ system_prompt?: string | null;
173
+ metadata?: Record<string, unknown>;
174
+ [key: string]: unknown;
194
175
  };
176
+ };
177
+ runtime?: unknown;
178
+ nodes: PrimeTraceNode[];
179
+ rewards: Record<string, number>;
180
+ metrics: Record<string, number>;
181
+ info?: Record<string, unknown>;
182
+ extra_usage?: PrimeUsage[];
183
+ is_completed?: boolean;
184
+ stop_condition?: string | null;
185
+ errors?: Array<{
186
+ type: string;
187
+ message: string;
188
+ traceback?: string | null;
189
+ }>;
190
+ timing?: {
191
+ start?: number;
192
+ setup?: PrimeTimeSpan;
193
+ generation?: PrimeTimeSpan;
194
+ finalize?: PrimeTimeSpan;
195
+ scoring?: PrimeTimeSpan;
196
+ };
195
197
  }
196
198
  interface PrimeIntellectTraceImportOptions {
197
- experimentId: string;
198
- candidateId: string;
199
- seed: number;
200
- /** Snapshot-pinned model id required by RunRecord validation. */
201
- model: string;
202
- promptHash: string;
203
- configHash: string;
204
- commitSha: string;
199
+ experimentId: string;
200
+ candidateId: string;
201
+ seed: number;
202
+ /** Snapshot-pinned model id required by RunRecord validation. */
203
+ model: string;
204
+ promptHash: string;
205
+ configHash: string;
206
+ commitSha: string;
205
207
  }
206
208
  type PrimeIntellectImportDefaults = PrimeIntellectTraceImportOptions;
207
209
  /** Parse Prime's durable `traces.jsonl` and reject malformed rows with a line number. */
@@ -210,5 +212,6 @@ declare function parsePrimeIntellectTraces(jsonl: string): PrimeIntellectTrace[]
210
212
  declare function importPrimeIntellectTraces(jsonl: string, defaults: PrimeIntellectImportDefaults): RunRecord[];
211
213
  /** Project one complete Prime trace into the common agent-eval analysis row. */
212
214
  declare function primeIntellectTraceToRunRecord(trace: PrimeIntellectTrace, options: PrimeIntellectTraceImportOptions): RunRecord;
213
-
214
- export { type PrimeIntellectBackendOptions, type PrimeIntellectContent, type PrimeIntellectEpisodeContext, type PrimeIntellectImportDefaults, type PrimeIntellectJson, type PrimeIntellectMessage, type PrimeIntellectPackageBundle, type PrimeIntellectPackageManifest, type PrimeIntellectPackageOptions, type PrimeIntellectPublicTask, type PrimeIntellectRunner, type PrimeIntellectScoring, type PrimeIntellectSetupCommand, type PrimeIntellectSplit, type PrimeIntellectTask, type PrimeIntellectTrace, type PrimeIntellectTraceImportOptions, type RunPrimeIntellectProgramOptions, type WritePrimeIntellectPackageOptions, createPrimeIntellectBackend, createPrimeIntellectPackage, importPrimeIntellectTraces, parsePrimeIntellectTraces, primeIntellectTraceToRunRecord, readPrimeIntellectEpisodeContext, runPrimeIntellectProgram, writePrimeIntellectPackage };
215
+ //#endregion
216
+ export { type PrimeIntellectBackendOptions, type PrimeIntellectContent, type PrimeIntellectEpisodeContext, type PrimeIntellectImportDefaults, type PrimeIntellectJson, type PrimeIntellectMessage, type PrimeIntellectPackageBundle, type PrimeIntellectPackageManifest, type PrimeIntellectPackageOptions, type PrimeIntellectPublicTask, type PrimeIntellectRunner, type PrimeIntellectScoring, type PrimeIntellectSetupCommand, type PrimeIntellectSplit, type PrimeIntellectTask, type PrimeIntellectTrace, type PrimeIntellectTraceImportOptions, type PrimeTimeSpan, type PrimeTraceNode, type PrimeUsage, type RunPrimeIntellectProgramOptions, type WritePrimeIntellectPackageOptions, createPrimeIntellectBackend, createPrimeIntellectPackage, importPrimeIntellectTraces, parsePrimeIntellectTraces, primeIntellectTraceToRunRecord, readPrimeIntellectEpisodeContext, runPrimeIntellectProgram, writePrimeIntellectPackage };
217
+ //# sourceMappingURL=index.d.ts.map