@archmax-ai/harness 0.0.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 (351) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +219 -0
  3. package/dist/agent.d.ts +174 -0
  4. package/dist/agent.js +140 -0
  5. package/dist/agent.js.map +1 -0
  6. package/dist/assembly/compose.d.ts +170 -0
  7. package/dist/assembly/compose.js +391 -0
  8. package/dist/assembly/compose.js.map +1 -0
  9. package/dist/assembly/delegation-registry.d.ts +5 -0
  10. package/dist/assembly/delegation-registry.js +118 -0
  11. package/dist/assembly/delegation-registry.js.map +1 -0
  12. package/dist/assembly/index.d.ts +192 -0
  13. package/dist/assembly/index.js +265 -0
  14. package/dist/assembly/index.js.map +1 -0
  15. package/dist/assembly/plain.d.ts +7 -0
  16. package/dist/assembly/plain.js +41 -0
  17. package/dist/assembly/plain.js.map +1 -0
  18. package/dist/authoring-skill/archmax-harness/README.md +76 -0
  19. package/dist/authoring-skill/archmax-harness/SKILL.md +241 -0
  20. package/dist/authoring-skill/archmax-harness/references/backend-integration.md +626 -0
  21. package/dist/authoring-skill/archmax-harness/references/cases.md +41 -0
  22. package/dist/authoring-skill/archmax-harness/references/diagnostics.md +51 -0
  23. package/dist/authoring-skill/archmax-harness/references/hook-and-test-scripts.md +1070 -0
  24. package/dist/authoring-skill/archmax-harness/references/hooks-and-scripts.md +82 -0
  25. package/dist/authoring-skill/archmax-harness/references/wiring.md +101 -0
  26. package/dist/authoring-skill/archmax-harness/references/workflow-schema.md +1631 -0
  27. package/dist/authoring-skill/archmax-harness/references/workflow-yaml.md +241 -0
  28. package/dist/behaviour/support.d.ts +232 -0
  29. package/dist/behaviour/support.js +339 -0
  30. package/dist/behaviour/support.js.map +1 -0
  31. package/dist/cli/banner.d.ts +11 -0
  32. package/dist/cli/banner.js +29 -0
  33. package/dist/cli/banner.js.map +1 -0
  34. package/dist/cli/bootstrap.d.ts +33 -0
  35. package/dist/cli/bootstrap.js +153 -0
  36. package/dist/cli/bootstrap.js.map +1 -0
  37. package/dist/cli/command.d.ts +39 -0
  38. package/dist/cli/command.js +97 -0
  39. package/dist/cli/command.js.map +1 -0
  40. package/dist/cli/state-flow.d.ts +46 -0
  41. package/dist/cli/state-flow.js +268 -0
  42. package/dist/cli/state-flow.js.map +1 -0
  43. package/dist/cli/style.d.ts +41 -0
  44. package/dist/cli/style.js +64 -0
  45. package/dist/cli/style.js.map +1 -0
  46. package/dist/cli/turn.d.ts +41 -0
  47. package/dist/cli/turn.js +161 -0
  48. package/dist/cli/turn.js.map +1 -0
  49. package/dist/cli.d.ts +10 -0
  50. package/dist/cli.js +426 -0
  51. package/dist/cli.js.map +1 -0
  52. package/dist/core/code-description.d.ts +22 -0
  53. package/dist/core/code-description.js +38 -0
  54. package/dist/core/code-description.js.map +1 -0
  55. package/dist/core/deepagents.d.ts +183 -0
  56. package/dist/core/deepagents.js +128 -0
  57. package/dist/core/deepagents.js.map +1 -0
  58. package/dist/core/events.d.ts +350 -0
  59. package/dist/core/events.js +205 -0
  60. package/dist/core/events.js.map +1 -0
  61. package/dist/core/frontmatter.d.ts +15 -0
  62. package/dist/core/frontmatter.js +32 -0
  63. package/dist/core/frontmatter.js.map +1 -0
  64. package/dist/core/listing-redact.d.ts +37 -0
  65. package/dist/core/listing-redact.js +88 -0
  66. package/dist/core/listing-redact.js.map +1 -0
  67. package/dist/core/match.d.ts +26 -0
  68. package/dist/core/match.js +75 -0
  69. package/dist/core/match.js.map +1 -0
  70. package/dist/core/message-readers.d.ts +84 -0
  71. package/dist/core/message-readers.js +159 -0
  72. package/dist/core/message-readers.js.map +1 -0
  73. package/dist/core/messages.d.ts +49 -0
  74. package/dist/core/messages.js +85 -0
  75. package/dist/core/messages.js.map +1 -0
  76. package/dist/core/mount-prompt.d.ts +28 -0
  77. package/dist/core/mount-prompt.js +55 -0
  78. package/dist/core/mount-prompt.js.map +1 -0
  79. package/dist/core/mount-redact.d.ts +28 -0
  80. package/dist/core/mount-redact.js +32 -0
  81. package/dist/core/mount-redact.js.map +1 -0
  82. package/dist/core/mounts.d.ts +88 -0
  83. package/dist/core/mounts.js +147 -0
  84. package/dist/core/mounts.js.map +1 -0
  85. package/dist/core/path-mapping.d.ts +52 -0
  86. package/dist/core/path-mapping.js +113 -0
  87. package/dist/core/path-mapping.js.map +1 -0
  88. package/dist/core/platform-prompt.generated.d.ts +2 -0
  89. package/dist/core/platform-prompt.generated.js +4 -0
  90. package/dist/core/platform-prompt.generated.js.map +1 -0
  91. package/dist/core/prompt.d.ts +42 -0
  92. package/dist/core/prompt.js +75 -0
  93. package/dist/core/prompt.js.map +1 -0
  94. package/dist/core/session-id.d.ts +38 -0
  95. package/dist/core/session-id.js +61 -0
  96. package/dist/core/session-id.js.map +1 -0
  97. package/dist/core/session-store.d.ts +85 -0
  98. package/dist/core/session-store.js +149 -0
  99. package/dist/core/session-store.js.map +1 -0
  100. package/dist/core/session-zone.d.ts +54 -0
  101. package/dist/core/session-zone.js +82 -0
  102. package/dist/core/session-zone.js.map +1 -0
  103. package/dist/core/skill-prompt.d.ts +31 -0
  104. package/dist/core/skill-prompt.js +54 -0
  105. package/dist/core/skill-prompt.js.map +1 -0
  106. package/dist/core/skill-redact.d.ts +15 -0
  107. package/dist/core/skill-redact.js +27 -0
  108. package/dist/core/skill-redact.js.map +1 -0
  109. package/dist/core/skills.d.ts +172 -0
  110. package/dist/core/skills.js +214 -0
  111. package/dist/core/skills.js.map +1 -0
  112. package/dist/core/tool-mocks.d.ts +23 -0
  113. package/dist/core/tool-mocks.js +39 -0
  114. package/dist/core/tool-mocks.js.map +1 -0
  115. package/dist/core/tool-telemetry.d.ts +16 -0
  116. package/dist/core/tool-telemetry.js +40 -0
  117. package/dist/core/tool-telemetry.js.map +1 -0
  118. package/dist/core/usage.d.ts +114 -0
  119. package/dist/core/usage.js +226 -0
  120. package/dist/core/usage.js.map +1 -0
  121. package/dist/core/workspace-context.d.ts +136 -0
  122. package/dist/core/workspace-context.js +178 -0
  123. package/dist/core/workspace-context.js.map +1 -0
  124. package/dist/core/workspace-prompt.d.ts +7 -0
  125. package/dist/core/workspace-prompt.js +102 -0
  126. package/dist/core/workspace-prompt.js.map +1 -0
  127. package/dist/core/workspace-router.d.ts +61 -0
  128. package/dist/core/workspace-router.js +145 -0
  129. package/dist/core/workspace-router.js.map +1 -0
  130. package/dist/core/workspace.d.ts +85 -0
  131. package/dist/core/workspace.js +193 -0
  132. package/dist/core/workspace.js.map +1 -0
  133. package/dist/core/zones.d.ts +181 -0
  134. package/dist/core/zones.js +202 -0
  135. package/dist/core/zones.js.map +1 -0
  136. package/dist/env.d.ts +99 -0
  137. package/dist/env.js +271 -0
  138. package/dist/env.js.map +1 -0
  139. package/dist/index.d.ts +265 -0
  140. package/dist/index.js +197 -0
  141. package/dist/index.js.map +1 -0
  142. package/dist/kernel/kernel.d.ts +192 -0
  143. package/dist/kernel/kernel.js +751 -0
  144. package/dist/kernel/kernel.js.map +1 -0
  145. package/dist/lifecycle/hook-shape.d.ts +44 -0
  146. package/dist/lifecycle/hook-shape.js +66 -0
  147. package/dist/lifecycle/hook-shape.js.map +1 -0
  148. package/dist/lifecycle/runner.d.ts +177 -0
  149. package/dist/lifecycle/runner.js +372 -0
  150. package/dist/lifecycle/runner.js.map +1 -0
  151. package/dist/lifecycle/transcript.d.ts +27 -0
  152. package/dist/lifecycle/transcript.js +43 -0
  153. package/dist/lifecycle/transcript.js.map +1 -0
  154. package/dist/machine/allow.d.ts +65 -0
  155. package/dist/machine/allow.js +107 -0
  156. package/dist/machine/allow.js.map +1 -0
  157. package/dist/machine/delegation.d.ts +9 -0
  158. package/dist/machine/delegation.js +10 -0
  159. package/dist/machine/delegation.js.map +1 -0
  160. package/dist/machine/diagnostic.d.ts +14 -0
  161. package/dist/machine/diagnostic.js +2 -0
  162. package/dist/machine/diagnostic.js.map +1 -0
  163. package/dist/machine/lint-spec.d.ts +4 -0
  164. package/dist/machine/lint-spec.js +266 -0
  165. package/dist/machine/lint-spec.js.map +1 -0
  166. package/dist/machine/load-spec.d.ts +90 -0
  167. package/dist/machine/load-spec.js +120 -0
  168. package/dist/machine/load-spec.js.map +1 -0
  169. package/dist/machine/machine.d.ts +273 -0
  170. package/dist/machine/machine.js +551 -0
  171. package/dist/machine/machine.js.map +1 -0
  172. package/dist/machine/mount-grants.d.ts +25 -0
  173. package/dist/machine/mount-grants.js +24 -0
  174. package/dist/machine/mount-grants.js.map +1 -0
  175. package/dist/machine/slug.d.ts +14 -0
  176. package/dist/machine/slug.js +17 -0
  177. package/dist/machine/slug.js.map +1 -0
  178. package/dist/machine/spec-schema.d.ts +662 -0
  179. package/dist/machine/spec-schema.js +717 -0
  180. package/dist/machine/spec-schema.js.map +1 -0
  181. package/dist/machine/tool-names.d.ts +98 -0
  182. package/dist/machine/tool-names.js +144 -0
  183. package/dist/machine/tool-names.js.map +1 -0
  184. package/dist/machine/triggers.d.ts +114 -0
  185. package/dist/machine/triggers.js +165 -0
  186. package/dist/machine/triggers.js.map +1 -0
  187. package/dist/machine/types.d.ts +186 -0
  188. package/dist/machine/types.js +12 -0
  189. package/dist/machine/types.js.map +1 -0
  190. package/dist/machine/validate-spec.d.ts +42 -0
  191. package/dist/machine/validate-spec.js +29 -0
  192. package/dist/machine/validate-spec.js.map +1 -0
  193. package/dist/machine/variables.d.ts +196 -0
  194. package/dist/machine/variables.js +415 -0
  195. package/dist/machine/variables.js.map +1 -0
  196. package/dist/public/cli.d.ts +15 -0
  197. package/dist/public/cli.js +14 -0
  198. package/dist/public/cli.js.map +1 -0
  199. package/dist/public/messages.d.ts +33 -0
  200. package/dist/public/messages.js +33 -0
  201. package/dist/public/messages.js.map +1 -0
  202. package/dist/public/sandbox.d.ts +99 -0
  203. package/dist/public/sandbox.js +32 -0
  204. package/dist/public/sandbox.js.map +1 -0
  205. package/dist/public/spec.d.ts +147 -0
  206. package/dist/public/spec.js +149 -0
  207. package/dist/public/spec.js.map +1 -0
  208. package/dist/public/testing.d.ts +71 -0
  209. package/dist/public/testing.js +39 -0
  210. package/dist/public/testing.js.map +1 -0
  211. package/dist/rubrics/rubrics.d.ts +135 -0
  212. package/dist/rubrics/rubrics.js +145 -0
  213. package/dist/rubrics/rubrics.js.map +1 -0
  214. package/dist/runtime/contract.d.ts +73 -0
  215. package/dist/runtime/contract.js +96 -0
  216. package/dist/runtime/contract.js.map +1 -0
  217. package/dist/sandbox/assets/parts/core.js +22 -0
  218. package/dist/sandbox/assets/parts/lifecycle-hook.js +47 -0
  219. package/dist/sandbox/bridge.d.ts +16 -0
  220. package/dist/sandbox/bridge.js +95 -0
  221. package/dist/sandbox/bridge.js.map +1 -0
  222. package/dist/sandbox/executor.d.ts +46 -0
  223. package/dist/sandbox/executor.js +119 -0
  224. package/dist/sandbox/executor.js.map +1 -0
  225. package/dist/sandbox/imports.d.ts +33 -0
  226. package/dist/sandbox/imports.js +67 -0
  227. package/dist/sandbox/imports.js.map +1 -0
  228. package/dist/sandbox/prelude.d.ts +12 -0
  229. package/dist/sandbox/prelude.js +51 -0
  230. package/dist/sandbox/prelude.js.map +1 -0
  231. package/dist/sandbox/ptc-gateway.d.ts +104 -0
  232. package/dist/sandbox/ptc-gateway.js +167 -0
  233. package/dist/sandbox/ptc-gateway.js.map +1 -0
  234. package/dist/sandbox/runtime.d.ts +59 -0
  235. package/dist/sandbox/runtime.js +51 -0
  236. package/dist/sandbox/runtime.js.map +1 -0
  237. package/dist/sandbox/tools.d.ts +34 -0
  238. package/dist/sandbox/tools.js +147 -0
  239. package/dist/sandbox/tools.js.map +1 -0
  240. package/dist/sessions/operations.d.ts +79 -0
  241. package/dist/sessions/operations.js +121 -0
  242. package/dist/sessions/operations.js.map +1 -0
  243. package/dist/sessions/resolve.d.ts +97 -0
  244. package/dist/sessions/resolve.js +145 -0
  245. package/dist/sessions/resolve.js.map +1 -0
  246. package/dist/sessions/resume.d.ts +242 -0
  247. package/dist/sessions/resume.js +288 -0
  248. package/dist/sessions/resume.js.map +1 -0
  249. package/dist/sessions/scope.d.ts +99 -0
  250. package/dist/sessions/scope.js +145 -0
  251. package/dist/sessions/scope.js.map +1 -0
  252. package/dist/sessions/summary.d.ts +65 -0
  253. package/dist/sessions/summary.js +56 -0
  254. package/dist/sessions/summary.js.map +1 -0
  255. package/dist/testing/assertions.d.ts +30 -0
  256. package/dist/testing/assertions.js +231 -0
  257. package/dist/testing/assertions.js.map +1 -0
  258. package/dist/testing/case-document.d.ts +141 -0
  259. package/dist/testing/case-document.js +51 -0
  260. package/dist/testing/case-document.js.map +1 -0
  261. package/dist/testing/case-schema.d.ts +29 -0
  262. package/dist/testing/case-schema.js +519 -0
  263. package/dist/testing/case-schema.js.map +1 -0
  264. package/dist/testing/discovery.d.ts +10 -0
  265. package/dist/testing/discovery.js +24 -0
  266. package/dist/testing/discovery.js.map +1 -0
  267. package/dist/testing/driver.d.ts +78 -0
  268. package/dist/testing/driver.js +117 -0
  269. package/dist/testing/driver.js.map +1 -0
  270. package/dist/testing/grade.d.ts +116 -0
  271. package/dist/testing/grade.js +261 -0
  272. package/dist/testing/grade.js.map +1 -0
  273. package/dist/testing/interpreter.d.ts +55 -0
  274. package/dist/testing/interpreter.js +103 -0
  275. package/dist/testing/interpreter.js.map +1 -0
  276. package/dist/testing/mock-middleware.d.ts +5 -0
  277. package/dist/testing/mock-middleware.js +33 -0
  278. package/dist/testing/mock-middleware.js.map +1 -0
  279. package/dist/testing/runner.d.ts +205 -0
  280. package/dist/testing/runner.js +266 -0
  281. package/dist/testing/runner.js.map +1 -0
  282. package/dist/testing/target.d.ts +27 -0
  283. package/dist/testing/target.js +21 -0
  284. package/dist/testing/target.js.map +1 -0
  285. package/dist/validate/validate.d.ts +41 -0
  286. package/dist/validate/validate.js +669 -0
  287. package/dist/validate/validate.js.map +1 -0
  288. package/dist/workflow/agent-tools.d.ts +10 -0
  289. package/dist/workflow/agent-tools.js +10 -0
  290. package/dist/workflow/agent-tools.js.map +1 -0
  291. package/dist/workflow/checkpointer.d.ts +52 -0
  292. package/dist/workflow/checkpointer.js +200 -0
  293. package/dist/workflow/checkpointer.js.map +1 -0
  294. package/dist/workflow/control-tools.d.ts +174 -0
  295. package/dist/workflow/control-tools.js +468 -0
  296. package/dist/workflow/control-tools.js.map +1 -0
  297. package/dist/workflow/governance.d.ts +104 -0
  298. package/dist/workflow/governance.js +546 -0
  299. package/dist/workflow/governance.js.map +1 -0
  300. package/dist/workflow/middleware.d.ts +85 -0
  301. package/dist/workflow/middleware.js +283 -0
  302. package/dist/workflow/middleware.js.map +1 -0
  303. package/dist/workflow/on-error.d.ts +25 -0
  304. package/dist/workflow/on-error.js +58 -0
  305. package/dist/workflow/on-error.js.map +1 -0
  306. package/dist/workflow/parks.d.ts +46 -0
  307. package/dist/workflow/parks.js +513 -0
  308. package/dist/workflow/parks.js.map +1 -0
  309. package/dist/workflow/paths.d.ts +67 -0
  310. package/dist/workflow/paths.js +108 -0
  311. package/dist/workflow/paths.js.map +1 -0
  312. package/dist/workflow/prompt-cache.d.ts +70 -0
  313. package/dist/workflow/prompt-cache.js +103 -0
  314. package/dist/workflow/prompt-cache.js.map +1 -0
  315. package/dist/workflow/prompt-pruning.d.ts +20 -0
  316. package/dist/workflow/prompt-pruning.js +83 -0
  317. package/dist/workflow/prompt-pruning.js.map +1 -0
  318. package/dist/workflow/render-prompt.d.ts +45 -0
  319. package/dist/workflow/render-prompt.js +140 -0
  320. package/dist/workflow/render-prompt.js.map +1 -0
  321. package/dist/workflow/runtime-config.d.ts +7 -0
  322. package/dist/workflow/runtime-config.js +9 -0
  323. package/dist/workflow/runtime-config.js.map +1 -0
  324. package/dist/workflow/session-artifacts.d.ts +90 -0
  325. package/dist/workflow/session-artifacts.js +134 -0
  326. package/dist/workflow/session-artifacts.js.map +1 -0
  327. package/dist/workflow/session-view.d.ts +31 -0
  328. package/dist/workflow/session-view.js +94 -0
  329. package/dist/workflow/session-view.js.map +1 -0
  330. package/dist/workflow/snapshot.d.ts +14 -0
  331. package/dist/workflow/snapshot.js +97 -0
  332. package/dist/workflow/snapshot.js.map +1 -0
  333. package/dist/workflow/state.d.ts +347 -0
  334. package/dist/workflow/state.js +322 -0
  335. package/dist/workflow/state.js.map +1 -0
  336. package/dist/workflow/sub-workflow.d.ts +174 -0
  337. package/dist/workflow/sub-workflow.js +392 -0
  338. package/dist/workflow/sub-workflow.js.map +1 -0
  339. package/dist/workflow/tool-service.d.ts +48 -0
  340. package/dist/workflow/tool-service.js +291 -0
  341. package/dist/workflow/tool-service.js.map +1 -0
  342. package/dist/workflow/turn-boundary.d.ts +39 -0
  343. package/dist/workflow/turn-boundary.js +128 -0
  344. package/dist/workflow/turn-boundary.js.map +1 -0
  345. package/dist/workflow/turn-runner.d.ts +40 -0
  346. package/dist/workflow/turn-runner.js +122 -0
  347. package/dist/workflow/turn-runner.js.map +1 -0
  348. package/dist/workflow/workflow-tools.d.ts +46 -0
  349. package/dist/workflow/workflow-tools.js +90 -0
  350. package/dist/workflow/workflow-tools.js.map +1 -0
  351. package/package.json +119 -0
@@ -0,0 +1,22 @@
1
+ /**
2
+ * `archmax_run` scripts carry their human-facing contract as a leading JSDoc
3
+ * block comment — the code-file analogue of a case file's `description`. Admin
4
+ * UIs display only that description. Lifecycle hook scripts are NOT covered by this convention:
5
+ * they are hand-authored files whose only validation is that the referenced
6
+ * file exists. This module is the canonical extractor so consumers never
7
+ * scrape comments themselves. It operates on source strings only (callers read
8
+ * the file through their configured backend) and never touches the filesystem.
9
+ */
10
+ /** Description frontmatter extracted from a code file's leading JSDoc block. */
11
+ export interface CodeDescription {
12
+ /** Human-language prose of the block, with comment decorations removed. */
13
+ description: string;
14
+ }
15
+ /**
16
+ * Extract the description frontmatter from a code file's source. Returns the
17
+ * prose of a leading JSDoc block — BOM/CRLF normalized, `*` gutters stripped,
18
+ * and truncated at the first `@tag` line (tags are permitted but not part of
19
+ * the description) — or `null` when the source does not begin with a JSDoc
20
+ * block or the block contains no prose.
21
+ */
22
+ export declare function parseCodeDescription(source: string): CodeDescription | null;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * `archmax_run` scripts carry their human-facing contract as a leading JSDoc
3
+ * block comment — the code-file analogue of a case file's `description`. Admin
4
+ * UIs display only that description. Lifecycle hook scripts are NOT covered by this convention:
5
+ * they are hand-authored files whose only validation is that the referenced
6
+ * file exists. This module is the canonical extractor so consumers never
7
+ * scrape comments themselves. It operates on source strings only (callers read
8
+ * the file through their configured backend) and never touches the filesystem.
9
+ */
10
+ /**
11
+ * A JSDoc block comment as the first non-whitespace content of the file. The
12
+ * negative lookahead rejects the degenerate empty comment (slash-star-star-
13
+ * slash), which opens with the same three characters but has no body.
14
+ */
15
+ const LEADING_JSDOC = /^\/\*\*(?!\/)([\s\S]*?)\*\//;
16
+ /**
17
+ * Extract the description frontmatter from a code file's source. Returns the
18
+ * prose of a leading JSDoc block — BOM/CRLF normalized, `*` gutters stripped,
19
+ * and truncated at the first `@tag` line (tags are permitted but not part of
20
+ * the description) — or `null` when the source does not begin with a JSDoc
21
+ * block or the block contains no prose.
22
+ */
23
+ export function parseCodeDescription(source) {
24
+ const normalized = String(source).replace(/^\uFEFF/, "").replace(/\r\n/g, "\n");
25
+ const match = LEADING_JSDOC.exec(normalized.trimStart());
26
+ if (!match)
27
+ return null;
28
+ const proseLines = [];
29
+ for (const rawLine of match[1].split("\n")) {
30
+ const line = rawLine.replace(/^\s*\** ?/, "").trimEnd();
31
+ if (line.startsWith("@"))
32
+ break;
33
+ proseLines.push(line);
34
+ }
35
+ const description = proseLines.join("\n").trim();
36
+ return description === "" ? null : { description };
37
+ }
38
+ //# sourceMappingURL=code-description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-description.js","sourceRoot":"","sources":["../../src/core/code-description.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH;;;;GAIG;AACH,MAAM,aAAa,GAAG,6BAA6B,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc;IACjD,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAChF,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC;IACzD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;QACxD,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,MAAM;QAChC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;IACjD,OAAO,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;AACrD,CAAC"}
@@ -0,0 +1,183 @@
1
+ import { AIMessage } from "@langchain/core/messages";
2
+ import type { ToolMessage } from "@langchain/core/messages";
3
+ import type { RunnableConfig } from "@langchain/core/runnables";
4
+ import type { Graph } from "@langchain/core/runnables/graph";
5
+ import type { StructuredTool } from "@langchain/core/tools";
6
+ import type { AgentMiddleware, BuiltInState, ModelRequest, Runtime, ToolCallHandler, ToolCallRequest } from "langchain";
7
+ import type { DeepAgent } from "deepagents";
8
+ import type { WorkflowStateFields } from "../workflow/state.js";
9
+ /**
10
+ * The single typed seam between this runtime and its agent framework
11
+ * (`deepagents` / `langchain` / `langgraph`). Every place the runtime reaches
12
+ * into a framework request object, drives the Deep Agent graph, or introspects a
13
+ * compiled graph does so through the aliases and helpers defined here — so a
14
+ * framework reshape surfaces at `tsc` in this module (and its call sites) rather
15
+ * than at runtime. Keep it thin: aliases over the framework's own generics plus
16
+ * a couple of narrowing helpers, not a re-abstraction of the framework.
17
+ *
18
+ * This is the only runtime module permitted to depend on the framework's
19
+ * middleware/introspection seam types.
20
+ */
21
+ /**
22
+ * Agent state the workflow middleware sees on every framework request: the
23
+ * checkpointed workflow fields (derived once from the zod `workflowStateSchema`)
24
+ * intersected with the framework's built-in agent state (messages, etc.).
25
+ */
26
+ export type WorkflowRequestState = WorkflowStateFields & BuiltInState & Record<string, unknown>;
27
+ /** A model-call request carrying the workflow state (for `wrapModelCall`). */
28
+ export type ModelCallRequest = ModelRequest<WorkflowRequestState>;
29
+ /**
30
+ * The structured-output result the framework's model handler returns when the
31
+ * agent was assembled with a `responseFormat` — a plain object, not a message.
32
+ */
33
+ export interface StructuredModelResult {
34
+ structuredResponse: unknown;
35
+ messages: unknown[];
36
+ }
37
+ /**
38
+ * What a `wrapModelCall` handler may hand back, and therefore what a middleware
39
+ * may return: a settled `AIMessage`, a LangGraph `Command`, or a
40
+ * {@link StructuredModelResult}. `Command` is typed structurally by the one field
41
+ * the framework's own `isCommand` duck-types on, so this seam does not depend on
42
+ * a `Command` class identity that a second copy of `@langchain/langgraph` would
43
+ * break.
44
+ */
45
+ export type ModelCallResult = AIMessage | {
46
+ lg_name: "Command";
47
+ } | StructuredModelResult;
48
+ /**
49
+ * What a `wrapModelCall` hook must be *declared* to return. The framework's own
50
+ * hook type names only `AIMessage | Command`, while its agent node additionally
51
+ * accepts (and its own base handler produces) a {@link StructuredModelResult} —
52
+ * so this alias tracks the declaration and {@link asModelCallResult} bridges the
53
+ * gap in one place instead of at every middleware.
54
+ */
55
+ export type ModelCallHookResult = Awaited<ReturnType<NonNullable<AgentMiddleware["wrapModelCall"]>>>;
56
+ /**
57
+ * The handler that runs the model for a (possibly modified) request. The
58
+ * workflow middleware forwards its request through this to invoke the model.
59
+ */
60
+ export type ModelCallHandler = (request: ModelCallRequest) => ModelCallResult | Promise<ModelCallResult>;
61
+ /** A tool-call request carrying the workflow state (for `wrapToolCall`). */
62
+ export type WorkflowToolCallRequest = ToolCallRequest<WorkflowRequestState>;
63
+ /** The handler that executes a (possibly modified) tool call. */
64
+ export type WorkflowToolCallHandler = ToolCallHandler<WorkflowRequestState>;
65
+ /**
66
+ * A generic tool-call request for middleware that declares no state schema
67
+ * (e.g. the evals tool-mock middleware). The optional `config` mirror is a
68
+ * defensive fallback for runtimes that surface `configurable` under `config`
69
+ * instead of `runtime`.
70
+ */
71
+ export type AnyToolCallRequest = ToolCallRequest & {
72
+ config?: {
73
+ configurable?: Record<string, unknown>;
74
+ };
75
+ };
76
+ /** A generic model-call request for middleware that declares no state schema. */
77
+ export type AnyModelCallRequest = ModelRequest;
78
+ /** The handler that executes a (possibly modified) generic tool call. */
79
+ export type AnyToolCallHandler = ToolCallHandler;
80
+ /** The handler that runs the model for a generic model-call request. */
81
+ export type AnyModelCallHandler = (request: AnyModelCallRequest) => ModelCallResult | Promise<ModelCallResult>;
82
+ /** The framework runtime handed to lifecycle hooks (context, configurable, signal, store). */
83
+ export type FrameworkRuntime = Runtime;
84
+ export type { ToolMessage };
85
+ /**
86
+ * Bridge the framework's tool-surface type (`(ServerTool | ClientTool)[]`) to
87
+ * the `StructuredTool[]` the runtime works with. The runtime only ever binds
88
+ * `StructuredTool`s, so this narrowing is sound; confining it here keeps the one
89
+ * tool-surface cast out of the middleware.
90
+ */
91
+ export declare function asStructuredTools(tools: ModelCallRequest["tools"] | undefined): StructuredTool[];
92
+ /**
93
+ * Narrow what a `wrapModelCall` handler returned to the framework's contract.
94
+ *
95
+ * The agent node validates each middleware's *return* value, so when the model
96
+ * handler below the stack yields something outside the contract, the innermost
97
+ * middleware is the one named — even though it only forwarded the value. An
98
+ * `AIMessage`, a `Command` or a {@link StructuredModelResult} passes through; a
99
+ * value that is an assistant message in all but class identity is rebuilt into a
100
+ * real `AIMessage`; anything else is refused with the shape it actually had,
101
+ * naming the model rather than the middleware.
102
+ */
103
+ export declare function asModelCallResult(result: unknown, origin: string): ModelCallHookResult;
104
+ /**
105
+ * The `recursionLimit` a turn runs under when the caller names none. One invoke
106
+ * is one whole turn across states — every hook, model call and tool batch is a
107
+ * super-step — so this is generous by design: the authored budgets
108
+ * (`budget.maxTurns`, `maxParks`) are the real bound, and this only stops a
109
+ * run nothing else bounds.
110
+ */
111
+ export declare const DEFAULT_RECURSION_LIMIT = 400;
112
+ /** The input a Deep Agent graph is invoked with: messages plus any state channel. */
113
+ export type AgentInput = Parameters<DeepAgent["invoke"]>[0];
114
+ /** The settled state a Deep Agent graph resolves to. */
115
+ export type AgentResult = Awaited<ReturnType<DeepAgent["invoke"]>>;
116
+ /** The options object accepted by a Deep Agent graph's `stream`. */
117
+ export type AgentStreamOptions = Parameters<DeepAgent["stream"]>[1];
118
+ /**
119
+ * The compiled graph an assembly is built over: the Deep Agent's own
120
+ * `CompiledStateGraph` — a real Pregel runnable — so the surface below is the
121
+ * framework's own, not a re-abstraction. Declared structurally because the
122
+ * governed and plain graphs' state generics differ while their runtime surface
123
+ * is identical; the runtime only ever drives them through these members.
124
+ */
125
+ export interface CompiledAgentGraph {
126
+ invoke(input: AgentInput, config?: RunnableConfig): Promise<AgentResult>;
127
+ stream(input: AgentInput, options?: AgentStreamOptions): Promise<AsyncIterable<unknown>>;
128
+ streamEvents(input: AgentInput, config: RunnableConfig, options?: unknown): AsyncIterable<unknown>;
129
+ withConfig(config: RunnableConfig): CompiledAgentGraph;
130
+ getState(config: RunnableConfig, options?: unknown): Promise<unknown>;
131
+ getStateHistory(config: RunnableConfig, options?: unknown): AsyncIterableIterator<unknown>;
132
+ updateState(config: RunnableConfig, values: unknown, asNode?: string): Promise<RunnableConfig>;
133
+ getSubgraphs(namespace?: string, recurse?: boolean): Generator<[string, unknown]>;
134
+ getSubgraphsAsync(namespace?: string, recurse?: boolean): AsyncGenerator<[string, unknown]>;
135
+ getGraphAsync(config?: RunnableConfig): Promise<Graph>;
136
+ checkpointer?: unknown;
137
+ store?: unknown;
138
+ }
139
+ /**
140
+ * Narrow a compiled graph to {@link CompiledAgentGraph}. The governed and plain
141
+ * graphs' declared state generics differ, so neither is assignable to a shared
142
+ * type by structure alone; at run time both are the same `CompiledStateGraph`
143
+ * class, and this is the one place that fact is asserted.
144
+ */
145
+ export declare function asCompiledAgentGraph(graph: unknown): CompiledAgentGraph;
146
+ /** Minimal shape needed to serialize a compiled LangGraph runnable's topology. */
147
+ export interface IntrospectableGraph {
148
+ getGraphAsync(config: RunnableConfig): Promise<Graph>;
149
+ }
150
+ /**
151
+ * The narrow view of a compiled state graph the human-decision surface needs:
152
+ * read a parked session's checkpoint (`getState`) and resume it (`invoke`).
153
+ */
154
+ export interface IntrospectableStateGraph {
155
+ getState(config: unknown): Promise<{
156
+ values?: Record<string, unknown>;
157
+ tasks?: {
158
+ interrupts?: unknown[];
159
+ }[];
160
+ }>;
161
+ invoke(input: unknown, config: unknown): Promise<Record<string, unknown>>;
162
+ }
163
+ /**
164
+ * The compiled state-graph methods the decision surface calls. The signatures
165
+ * are intentionally permissive (`...args: never[]`) so this gates on the methods
166
+ * *existing* rather than on their exact generic variance: a framework that drops
167
+ * or renames `getState`/`invoke` fails at the call site, while a benign
168
+ * parameter-type reshape does not produce noise. The exact call shapes are
169
+ * enforced inside {@link decide} against {@link IntrospectableStateGraph}.
170
+ */
171
+ export interface DecisionGraphSource {
172
+ getState(...args: never[]): unknown;
173
+ invoke(...args: never[]): unknown;
174
+ }
175
+ /**
176
+ * Narrow a compiled state graph to {@link IntrospectableStateGraph}. The single
177
+ * remaining framework cast lives here (design D3): the compiled graph's
178
+ * `getState`/`invoke` are structurally compatible but their generic
179
+ * input/return types do not unify with the narrow introspection shape without
180
+ * widening. Containing the cast in one place keeps every call site typed against
181
+ * {@link DecisionGraphSource}.
182
+ */
183
+ export declare function asDecisionGraph(graph: DecisionGraphSource): IntrospectableStateGraph;
@@ -0,0 +1,128 @@
1
+ import { AIMessage } from "@langchain/core/messages";
2
+ /**
3
+ * Bridge the framework's tool-surface type (`(ServerTool | ClientTool)[]`) to
4
+ * the `StructuredTool[]` the runtime works with. The runtime only ever binds
5
+ * `StructuredTool`s, so this narrowing is sound; confining it here keeps the one
6
+ * tool-surface cast out of the middleware.
7
+ */
8
+ export function asStructuredTools(tools) {
9
+ return (tools ?? []);
10
+ }
11
+ function isRecord(value) {
12
+ return typeof value === "object" && value !== null;
13
+ }
14
+ function isStructuredModelResult(value) {
15
+ return isRecord(value) && "structuredResponse" in value && "messages" in value;
16
+ }
17
+ /** The framework's own `Command` test: a duck-typed `lg_name` marker. */
18
+ function isCommandLike(value) {
19
+ return isRecord(value) && value.lg_name === "Command";
20
+ }
21
+ /**
22
+ * An AI message in all but class identity: a plain object that *says* it is the
23
+ * assistant's turn — LangChain's `type: "ai"` (an `AIMessage` built against a
24
+ * second copy of `@langchain/core`, whose brand this copy does not recognize) or
25
+ * the chat protocol's `role: "assistant"` (a provider dict) — with `content` the
26
+ * framework accepts. A message that names no role is not repaired here: the
27
+ * provider seam (`createChatModel` in `env.ts`) reads a role-less response as the
28
+ * assistant's before it reaches the agent loop.
29
+ */
30
+ function asAiMessageLike(value) {
31
+ if (!isRecord(value))
32
+ return undefined;
33
+ const { content } = value;
34
+ if (typeof content !== "string" && !Array.isArray(content))
35
+ return undefined;
36
+ const declaredType = typeof value._getType === "function" ? value._getType() : value.type;
37
+ const isAi = declaredType === "ai" || value.role === "assistant";
38
+ return isAi ? value : undefined;
39
+ }
40
+ /**
41
+ * Narrow what a `wrapModelCall` handler returned to the framework's contract.
42
+ *
43
+ * The agent node validates each middleware's *return* value, so when the model
44
+ * handler below the stack yields something outside the contract, the innermost
45
+ * middleware is the one named — even though it only forwarded the value. An
46
+ * `AIMessage`, a `Command` or a {@link StructuredModelResult} passes through; a
47
+ * value that is an assistant message in all but class identity is rebuilt into a
48
+ * real `AIMessage`; anything else is refused with the shape it actually had,
49
+ * naming the model rather than the middleware.
50
+ */
51
+ export function asModelCallResult(result, origin) {
52
+ if (AIMessage.isInstance(result) || isCommandLike(result) || isStructuredModelResult(result)) {
53
+ // The one widening cast: a structured-output result is outside the framework's
54
+ // declared hook return type but inside what its agent node accepts.
55
+ return result;
56
+ }
57
+ const messageLike = asAiMessageLike(result);
58
+ if (messageLike) {
59
+ return new AIMessage({
60
+ content: messageLike.content,
61
+ ...(messageLike.tool_calls ? { tool_calls: messageLike.tool_calls } : {}),
62
+ ...(messageLike.invalid_tool_calls
63
+ ? { invalid_tool_calls: messageLike.invalid_tool_calls }
64
+ : {}),
65
+ ...(messageLike.additional_kwargs ? { additional_kwargs: messageLike.additional_kwargs } : {}),
66
+ ...(messageLike.response_metadata ? { response_metadata: messageLike.response_metadata } : {}),
67
+ ...(messageLike.usage_metadata ? { usage_metadata: messageLike.usage_metadata } : {}),
68
+ ...(messageLike.id ? { id: messageLike.id } : {}),
69
+ ...(messageLike.name ? { name: messageLike.name } : {}),
70
+ });
71
+ }
72
+ throw new Error(`The model call in '${origin}' returned ${describeModelResult(result)}, which is neither ` +
73
+ `an AIMessage, a Command, nor a structured-output result. The value comes from the model ` +
74
+ `(or from a middleware assembled inside this one), not from workflow governance — check ` +
75
+ `the configured chat model and its provider response.`);
76
+ }
77
+ /**
78
+ * A short, non-leaking description of a rejected model result. Names the message
79
+ * kind (LangChain's `type`, and the class it arrived as) when the value is
80
+ * message-shaped — that is what identifies which turn a provider claimed.
81
+ */
82
+ function describeModelResult(result) {
83
+ if (result === null)
84
+ return "null";
85
+ if (result === undefined)
86
+ return "undefined";
87
+ if (!isRecord(result))
88
+ return `a ${typeof result}`;
89
+ const keys = Object.keys(result);
90
+ const shown = keys.slice(0, 8).join(", ");
91
+ const shape = `a plain object with keys [${shown}${keys.length > 8 ? ", …" : ""}]`;
92
+ const kind = typeof result.type === "string" ? `type '${result.type}'` : undefined;
93
+ const className = typeof result.constructor === "function" && result.constructor.name !== "Object"
94
+ ? result.constructor.name
95
+ : undefined;
96
+ const named = [kind, className].filter(Boolean).join(", ");
97
+ return named === "" ? shape : `${shape} (${named})`;
98
+ }
99
+ // --- Defaults -----------------------------------------------------------------
100
+ /**
101
+ * The `recursionLimit` a turn runs under when the caller names none. One invoke
102
+ * is one whole turn across states — every hook, model call and tool batch is a
103
+ * super-step — so this is generous by design: the authored budgets
104
+ * (`budget.maxTurns`, `maxParks`) are the real bound, and this only stops a
105
+ * run nothing else bounds.
106
+ */
107
+ export const DEFAULT_RECURSION_LIMIT = 400;
108
+ /**
109
+ * Narrow a compiled graph to {@link CompiledAgentGraph}. The governed and plain
110
+ * graphs' declared state generics differ, so neither is assignable to a shared
111
+ * type by structure alone; at run time both are the same `CompiledStateGraph`
112
+ * class, and this is the one place that fact is asserted.
113
+ */
114
+ export function asCompiledAgentGraph(graph) {
115
+ return graph;
116
+ }
117
+ /**
118
+ * Narrow a compiled state graph to {@link IntrospectableStateGraph}. The single
119
+ * remaining framework cast lives here (design D3): the compiled graph's
120
+ * `getState`/`invoke` are structurally compatible but their generic
121
+ * input/return types do not unify with the narrow introspection shape without
122
+ * widening. Containing the cast in one place keeps every call site typed against
123
+ * {@link DecisionGraphSource}.
124
+ */
125
+ export function asDecisionGraph(graph) {
126
+ return graph;
127
+ }
128
+ //# sourceMappingURL=deepagents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepagents.js","sourceRoot":"","sources":["../../src/core/deepagents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AA+GrD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAA4C;IAC5E,OAAO,CAAC,KAAK,IAAI,EAAE,CAAgC,CAAC;AACtD,CAAC;AAgBD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAc;IAC7C,OAAO,QAAQ,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