@leuduan/lagent 0.1.2 → 44.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 (353) hide show
  1. package/README.md +28 -15
  2. package/dist/chunks/{UC3FVVJ2.js → 2GCIWSOA.js} +2 -2
  3. package/dist/chunks/2P47AHNK.js +7 -0
  4. package/dist/chunks/3UMZMPWW.js +1 -0
  5. package/dist/chunks/5IRF47YB.js +1 -0
  6. package/dist/chunks/6DRCKZ2C.js +1 -0
  7. package/dist/chunks/6FRNHMCV.js +1 -0
  8. package/dist/chunks/7LI64H5X.js +17 -0
  9. package/dist/chunks/{SL2YLB2F.js → 7VAPNE3L.js} +1 -1
  10. package/dist/chunks/{BM3S37EZ.js → ASSQZH3F.js} +1 -1
  11. package/dist/chunks/B4FXK5ER.js +77 -0
  12. package/dist/chunks/{37YOGDGY.js → BBCW2FZK.js} +1 -1
  13. package/dist/chunks/BPRCULZH.js +1 -0
  14. package/dist/chunks/CANPZYTH.js +24 -0
  15. package/dist/chunks/CQEVREBT.js +1 -0
  16. package/dist/chunks/CUK7CGC7.js +1 -0
  17. package/dist/chunks/D4PQP5MA.js +3 -0
  18. package/dist/chunks/{CDQG7RKA.js → DDZ7YF26.js} +1 -1
  19. package/dist/chunks/EMRB4KCN.js +6 -0
  20. package/dist/chunks/EPYQ5M3B.js +3 -0
  21. package/dist/chunks/G44LG6VL.js +1 -0
  22. package/dist/chunks/GGSVIIWJ.js +2 -0
  23. package/dist/chunks/IAAEP6VL.js +30 -0
  24. package/dist/chunks/{AP6Q4EPT.js → JCTBX33H.js} +1 -1
  25. package/dist/chunks/JFX2MXBA.js +4 -0
  26. package/dist/chunks/JFZZXVWD.js +15 -0
  27. package/dist/chunks/KUZCL2SH.js +1 -0
  28. package/dist/chunks/MHC6VPB4.js +7 -0
  29. package/dist/chunks/MMNNZCBO.js +5 -0
  30. package/dist/chunks/{C5LYCXJG.js → MNJ4SRF7.js} +1 -1
  31. package/dist/chunks/N6IXG2VL.js +1 -0
  32. package/dist/chunks/OCBPT7KE.js +1 -0
  33. package/dist/chunks/OL5A6ITQ.js +1 -0
  34. package/dist/chunks/Q75FUN7D.js +2 -0
  35. package/dist/chunks/Q7S5LFGN.js +1 -0
  36. package/dist/chunks/RCIHV3KG.js +1 -0
  37. package/dist/chunks/S34ZA2R6.js +1 -0
  38. package/dist/chunks/SS3B5W34.js +12 -0
  39. package/dist/chunks/VYMT4TXD.js +1 -0
  40. package/dist/chunks/W57RW55W.js +1 -0
  41. package/dist/compositions/base.d.ts +11 -0
  42. package/dist/{presets → compositions}/codex.d.ts +12 -6
  43. package/dist/{presets/prompts.d.ts → compositions/codexPrompts.d.ts} +1 -1
  44. package/dist/context.d.ts +18 -10
  45. package/dist/index.d.ts +31 -23
  46. package/dist/index.js +1 -77
  47. package/dist/journal/catalog.d.ts +1 -1
  48. package/dist/journal/journal.d.ts +3 -3
  49. package/dist/journal/projection.d.ts +1 -1
  50. package/dist/journal/store.d.ts +3 -3
  51. package/dist/llm/index.d.ts +19 -13
  52. package/dist/llm/index.js +1 -0
  53. package/dist/llm/provider.d.ts +11 -0
  54. package/dist/loop/agent.d.ts +16 -132
  55. package/dist/loop/authorization.d.ts +41 -0
  56. package/dist/loop/auxiliary.d.ts +7 -3
  57. package/dist/loop/chunks.d.ts +3 -3
  58. package/dist/loop/completion.d.ts +17 -0
  59. package/dist/loop/errors.d.ts +6 -29
  60. package/dist/loop/hooks.d.ts +39 -6
  61. package/dist/loop/index.d.ts +7 -28
  62. package/dist/loop/runner.d.ts +134 -0
  63. package/dist/loop/runtime.d.ts +7 -16
  64. package/dist/loop/strategy.d.ts +12 -3
  65. package/dist/loop/{prepare.d.ts → surfacePrepare.d.ts} +2 -2
  66. package/dist/loop/tool.d.ts +11 -6
  67. package/dist/loop/toolCalls.d.ts +3 -10
  68. package/dist/plugin.d.ts +31 -34
  69. package/dist/plugin.js +1 -1
  70. package/dist/plugins/agentsMd.d.ts +24 -20
  71. package/dist/plugins/agentsMd.js +1 -1
  72. package/dist/plugins/ask/index.d.ts +2 -2
  73. package/dist/plugins/ask/index.js +1 -1
  74. package/dist/plugins/ask/service.d.ts +2 -2
  75. package/dist/plugins/commands/index.d.ts +5 -2
  76. package/dist/plugins/commands/index.js +1 -1
  77. package/dist/plugins/commands/output.d.ts +1 -1
  78. package/dist/plugins/commands/record.d.ts +31 -22
  79. package/dist/plugins/commands/service.d.ts +18 -11
  80. package/dist/plugins/commands/{background.d.ts → tools.d.ts} +2 -0
  81. package/dist/plugins/compaction/checkpoint.d.ts +4 -1
  82. package/dist/plugins/compaction/config.d.ts +3 -3
  83. package/dist/plugins/compaction/estimate.d.ts +9 -1
  84. package/dist/plugins/compaction/index.d.ts +87 -2
  85. package/dist/plugins/compaction/index.js +5 -5
  86. package/dist/plugins/compaction/{records.d.ts → record.d.ts} +36 -36
  87. package/dist/plugins/compaction/{log.d.ts → state.d.ts} +8 -1
  88. package/dist/plugins/dateAndBranch.js +1 -1
  89. package/dist/plugins/delegations/answers.d.ts +1 -1
  90. package/dist/plugins/delegations/assignmentKey.d.ts +1 -1
  91. package/dist/plugins/delegations/cleanup.d.ts +1 -1
  92. package/dist/plugins/delegations/index.js +1 -1
  93. package/dist/plugins/delegations/notices.d.ts +8 -8
  94. package/dist/plugins/delegations/obligations.d.ts +13 -13
  95. package/dist/plugins/delegations/record.d.ts +11 -10
  96. package/dist/plugins/delegations/request.d.ts +8 -5
  97. package/dist/plugins/delegations/role.d.ts +1 -1
  98. package/dist/plugins/delegations/service.d.ts +9 -8
  99. package/dist/plugins/delegations/{waitBook.d.ts → waitResolver.d.ts} +9 -9
  100. package/dist/plugins/diagnostics/digest.d.ts +1 -1
  101. package/dist/plugins/diagnostics/index.d.ts +1 -1
  102. package/dist/plugins/diagnostics/index.js +1 -1
  103. package/dist/plugins/fileTools/config.d.ts +10 -0
  104. package/dist/plugins/{tools → fileTools}/editFiles.d.ts +16 -27
  105. package/dist/plugins/fileTools/gitDiscovery.d.ts +9 -0
  106. package/dist/plugins/fileTools/index.d.ts +18 -0
  107. package/dist/plugins/fileTools/index.js +1 -0
  108. package/dist/plugins/fileTools/tools.d.ts +6 -0
  109. package/dist/plugins/historyRecall/history.d.ts +1 -1
  110. package/dist/plugins/historyRecall/index.js +1 -1
  111. package/dist/plugins/historyRecall/render.d.ts +1 -1
  112. package/dist/plugins/mcp/catalog.d.ts +1 -1
  113. package/dist/plugins/mcp/index.d.ts +2 -2
  114. package/dist/plugins/mcp/index.js +1 -1
  115. package/dist/plugins/mcp/mount.d.ts +2 -2
  116. package/dist/plugins/mcp/render.d.ts +1 -1
  117. package/dist/plugins/mcp/{tool.d.ts → tools.d.ts} +1 -1
  118. package/dist/plugins/{routeContext.d.ts → routeNotice.d.ts} +2 -2
  119. package/dist/plugins/routeNotice.js +1 -0
  120. package/dist/{sandbox → plugins/sandbox}/absent.d.ts +11 -10
  121. package/dist/{sandbox → plugins/sandbox}/index.d.ts +5 -2
  122. package/dist/plugins/sandbox/index.js +4 -0
  123. package/dist/{sandbox → plugins/sandbox}/mode.d.ts +5 -5
  124. package/dist/plugins/sandbox/policy.d.ts +163 -0
  125. package/dist/{sandbox → plugins/sandbox}/service.d.ts +23 -13
  126. package/dist/plugins/schedules/index.js +3 -3
  127. package/dist/plugins/schedules/record.d.ts +18 -18
  128. package/dist/plugins/schedules/service.d.ts +2 -2
  129. package/dist/plugins/skills/discovery.d.ts +38 -9
  130. package/dist/plugins/skills/index.d.ts +1 -1
  131. package/dist/plugins/skills/index.js +1 -1
  132. package/dist/plugins/subAgents/index.js +1 -1
  133. package/dist/plugins/subAgents/{fork.d.ts → tools.d.ts} +36 -1
  134. package/dist/plugins/threadDirs.d.ts +36 -0
  135. package/dist/plugins/threadDirs.js +1 -0
  136. package/dist/plugins/toolPolicy/index.d.ts +2 -2
  137. package/dist/plugins/toolPolicy/index.js +1 -1
  138. package/dist/plugins/truncateToolOutput.d.ts +14 -10
  139. package/dist/plugins/truncateToolOutput.js +6 -1
  140. package/dist/plugins/usage/index.d.ts +4 -2
  141. package/dist/plugins/usage/index.js +1 -1
  142. package/dist/plugins/usage/tracker.d.ts +1 -1
  143. package/dist/plugins/verify/index.d.ts +7 -55
  144. package/dist/plugins/verify/index.js +6 -1
  145. package/dist/plugins/verify/judgement.d.ts +16 -0
  146. package/dist/plugins/verify/record.d.ts +382 -0
  147. package/dist/plugins/verify/service.d.ts +7 -4
  148. package/dist/plugins/verify/state.d.ts +58 -0
  149. package/dist/plugins/webTools/index.d.ts +34 -0
  150. package/dist/plugins/webTools/index.js +1 -0
  151. package/dist/plugins/workflows/assignment.d.ts +6 -2
  152. package/dist/plugins/workflows/cleanup.d.ts +1 -1
  153. package/dist/plugins/workflows/definition.d.ts +2 -2
  154. package/dist/plugins/workflows/{bindings.d.ts → entryPlan.d.ts} +2 -2
  155. package/dist/plugins/workflows/{providers.d.ts → hostBindings.d.ts} +2 -2
  156. package/dist/plugins/workflows/index.d.ts +4 -4
  157. package/dist/plugins/workflows/index.js +10 -5
  158. package/dist/plugins/workflows/observations.d.ts +3 -3
  159. package/dist/plugins/workflows/participantModels.d.ts +28 -0
  160. package/dist/plugins/workflows/participants.d.ts +2 -2
  161. package/dist/plugins/workflows/policy.d.ts +2 -2
  162. package/dist/plugins/workflows/record.d.ts +51 -65
  163. package/dist/plugins/workflows/routing.d.ts +2 -2
  164. package/dist/plugins/workflows/service.d.ts +24 -24
  165. package/dist/plugins/workflows/{fold.d.ts → state.d.ts} +2 -2
  166. package/dist/plugins/workflows/stopCheck.d.ts +13 -0
  167. package/dist/plugins/workflows/tools.d.ts +13 -0
  168. package/dist/plugins/workflows/view.d.ts +2 -2
  169. package/dist/plugins/{workspaceContext.d.ts → workspaceNotice.d.ts} +5 -7
  170. package/dist/plugins/workspaceNotice.js +1 -0
  171. package/dist/{plugins/providers → providers}/anthropic.d.ts +6 -3
  172. package/dist/{plugins/providers → providers}/anthropicMessages.d.ts +2 -1
  173. package/dist/{plugins/providers → providers}/codex.d.ts +14 -3
  174. package/dist/{plugins/providers → providers}/deepseek.d.ts +6 -2
  175. package/dist/{plugins/providers → providers}/failure.d.ts +1 -1
  176. package/dist/{plugins/providers → providers}/gateway.d.ts +2 -1
  177. package/dist/providers/index.d.ts +18 -0
  178. package/dist/providers/index.js +6 -0
  179. package/dist/{plugins/providers → providers}/openaiChat.d.ts +13 -2
  180. package/dist/{plugins/providers → providers}/openaiResponses.d.ts +12 -3
  181. package/dist/{plugins/providers → providers}/opencodeCopilot.d.ts +2 -2
  182. package/dist/{plugins/providers → providers}/opencodeGo.d.ts +18 -7
  183. package/dist/{plugins/providers → providers}/shared.d.ts +9 -1
  184. package/dist/{plugins/providers → providers}/stream.d.ts +4 -2
  185. package/dist/{models/door.d.ts → records/index.d.ts} +8 -7
  186. package/dist/records/index.js +1 -0
  187. package/dist/{models/wire → records}/journal.d.ts +210 -14
  188. package/dist/{models/wire/primitives.d.ts → records/toolResult.d.ts} +1 -1
  189. package/dist/services/agents.d.ts +26 -1
  190. package/dist/services/confinement/files.d.ts +118 -0
  191. package/dist/services/confinement/service.d.ts +219 -0
  192. package/dist/services/core.d.ts +2 -8
  193. package/dist/{kit/extension.d.ts → services/extensionEvents.d.ts} +5 -4
  194. package/dist/services/journal.d.ts +1 -1
  195. package/dist/services/llm.d.ts +4 -2
  196. package/dist/{kit → services}/modes.d.ts +1 -1
  197. package/dist/services/plugins.d.ts +34 -0
  198. package/dist/services/{preset.d.ts → presets/definition.d.ts} +4 -4
  199. package/dist/services/{presets.d.ts → presets/installations.d.ts} +3 -3
  200. package/dist/services/prompts.d.ts +23 -5
  201. package/dist/services/{threadActivation.d.ts → threads/activation.d.ts} +3 -3
  202. package/dist/services/{admission.d.ts → threads/admission.d.ts} +3 -3
  203. package/dist/services/{birth.d.ts → threads/birth.d.ts} +9 -10
  204. package/dist/services/threads/index.d.ts +14 -0
  205. package/dist/services/{runEvents.d.ts → threads/runEvents.d.ts} +2 -2
  206. package/dist/services/{owner.d.ts → threads/runOwner.d.ts} +5 -4
  207. package/dist/services/{threads.d.ts → threads/service.d.ts} +9 -8
  208. package/dist/services/{thread.d.ts → threads/thread.d.ts} +8 -7
  209. package/dist/services/{threadView.d.ts → threads/view.d.ts} +7 -6
  210. package/dist/services/tools.d.ts +79 -2
  211. package/dist/{loop/opening.d.ts → state/birth.d.ts} +22 -2
  212. package/dist/{loop → state}/chain.d.ts +3 -3
  213. package/dist/state/confirmations.d.ts +64 -0
  214. package/dist/{loop → state}/continuation.d.ts +3 -2
  215. package/dist/{loop → state}/decide.d.ts +10 -2
  216. package/dist/state/dispatches.d.ts +54 -0
  217. package/dist/state/errors.d.ts +26 -0
  218. package/dist/{loop → state}/forks.d.ts +1 -1
  219. package/dist/{loop → state}/holds.d.ts +1 -1
  220. package/dist/{loop → state}/inbox.d.ts +2 -2
  221. package/dist/state/index.d.ts +31 -0
  222. package/dist/state/inputs.d.ts +58 -0
  223. package/dist/state/installations.d.ts +28 -0
  224. package/dist/state/prompt.d.ts +13 -0
  225. package/dist/state/recovery.d.ts +7 -0
  226. package/dist/{loop → state}/replace.d.ts +2 -2
  227. package/dist/{loop → state}/requests.d.ts +3 -3
  228. package/dist/{loop → state}/route.d.ts +10 -2
  229. package/dist/state/summary.d.ts +16 -0
  230. package/dist/{loop → state}/surface.d.ts +3 -3
  231. package/dist/state/surfaceRead.d.ts +20 -0
  232. package/dist/{loop/threadState.d.ts → state/thread.d.ts} +12 -11
  233. package/dist/state/turns.d.ts +87 -0
  234. package/dist/state/waits.d.ts +38 -0
  235. package/dist/{loop → state}/wake.d.ts +1 -1
  236. package/dist/stores/durableObject.js +1 -0
  237. package/dist/{plugins/store → stores}/memory.d.ts +2 -2
  238. package/dist/{plugins/store → stores}/sql.d.ts +2 -2
  239. package/dist/stores/sqlite.js +1 -0
  240. package/dist/sys/environment.d.ts +0 -5
  241. package/dist/sys/git.d.ts +0 -13
  242. package/dist/sys/paths.d.ts +0 -47
  243. package/dist/sys/spawn.d.ts +16 -6
  244. package/dist/testing/clock.d.ts +1 -1
  245. package/dist/testing/fakeLlm.d.ts +4 -2
  246. package/dist/testing/fedLlm.d.ts +3 -1
  247. package/dist/testing/helpers.d.ts +31 -13
  248. package/dist/testing/index.js +1 -1
  249. package/dist/testing/settlement.d.ts +1 -1
  250. package/package.json +36 -28
  251. package/dist/chunks/2O7ZGEIT.js +0 -1
  252. package/dist/chunks/2OSESBIL.js +0 -1
  253. package/dist/chunks/3LQHQRIU.js +0 -6
  254. package/dist/chunks/3QCW4WDJ.js +0 -1
  255. package/dist/chunks/4XVRUSCQ.js +0 -1
  256. package/dist/chunks/6ECI2GGV.js +0 -1
  257. package/dist/chunks/74HKUGRR.js +0 -1
  258. package/dist/chunks/ADHERZLW.js +0 -2
  259. package/dist/chunks/D7E6EWIE.js +0 -3
  260. package/dist/chunks/DRYAN665.js +0 -1
  261. package/dist/chunks/DXFXAYDN.js +0 -17
  262. package/dist/chunks/EGZI4XQX.js +0 -24
  263. package/dist/chunks/ENWFSU27.js +0 -41
  264. package/dist/chunks/G6RXC3AL.js +0 -1
  265. package/dist/chunks/G74AGRAJ.js +0 -15
  266. package/dist/chunks/GQGNVSKB.js +0 -1
  267. package/dist/chunks/IJ2WNMD5.js +0 -7
  268. package/dist/chunks/JPZFKSWT.js +0 -1
  269. package/dist/chunks/KESCTXGO.js +0 -5
  270. package/dist/chunks/L3N4FIEN.js +0 -1
  271. package/dist/chunks/NAOUTU7A.js +0 -4
  272. package/dist/chunks/NDIM7MEW.js +0 -1
  273. package/dist/chunks/O4PPOM5Z.js +0 -2
  274. package/dist/chunks/OVZFGILJ.js +0 -1
  275. package/dist/chunks/P5ZHHOOM.js +0 -6
  276. package/dist/chunks/QMMLQJBS.js +0 -1
  277. package/dist/chunks/RK3VP2Q4.js +0 -3
  278. package/dist/chunks/SGGMBSBA.js +0 -1
  279. package/dist/chunks/TOOIB6J2.js +0 -1
  280. package/dist/chunks/TYTQRLTX.js +0 -1
  281. package/dist/chunks/UCTEU62F.js +0 -1
  282. package/dist/chunks/UD3VJER6.js +0 -1
  283. package/dist/chunks/WUUKTSRT.js +0 -7
  284. package/dist/chunks/X65X4KP5.js +0 -7
  285. package/dist/chunks/YIR5MYGU.js +0 -1
  286. package/dist/chunks/YLNJXQ3Z.js +0 -1
  287. package/dist/kit/claim.d.ts +0 -13
  288. package/dist/kit/drain.d.ts +0 -10
  289. package/dist/kit/grants.d.ts +0 -9
  290. package/dist/kit/scope.d.ts +0 -32
  291. package/dist/kit/service.d.ts +0 -7
  292. package/dist/kit/strategy.d.ts +0 -10
  293. package/dist/kit/tool.d.ts +0 -72
  294. package/dist/llm/door.d.ts +0 -21
  295. package/dist/llm/door.js +0 -1
  296. package/dist/loop/projections.d.ts +0 -307
  297. package/dist/loop/state.d.ts +0 -70
  298. package/dist/loop/summary.d.ts +0 -3
  299. package/dist/models/config/agent.d.ts +0 -18
  300. package/dist/models/config/prompt.d.ts +0 -18
  301. package/dist/models/door.js +0 -1
  302. package/dist/models/index.d.ts +0 -7
  303. package/dist/plugins/commands/foreground.d.ts +0 -4
  304. package/dist/plugins/compaction/preset.d.ts +0 -86
  305. package/dist/plugins/compaction/shared.d.ts +0 -14
  306. package/dist/plugins/delegations/testing.d.ts +0 -16
  307. package/dist/plugins/providers/door.d.ts +0 -61
  308. package/dist/plugins/providers/door.js +0 -1
  309. package/dist/plugins/providers/index.d.ts +0 -6
  310. package/dist/plugins/routeContext.js +0 -1
  311. package/dist/plugins/store/durableObject.js +0 -1
  312. package/dist/plugins/store/sqlite.js +0 -1
  313. package/dist/plugins/subAgents/tool.d.ts +0 -38
  314. package/dist/plugins/tools/index.d.ts +0 -59
  315. package/dist/plugins/tools/index.js +0 -1
  316. package/dist/plugins/verify/facts.d.ts +0 -356
  317. package/dist/plugins/workflows/submit.d.ts +0 -8
  318. package/dist/plugins/workspaceContext.js +0 -1
  319. package/dist/presets/agents.d.ts +0 -7
  320. package/dist/presets/base.d.ts +0 -10
  321. package/dist/presets/index.d.ts +0 -4
  322. package/dist/sandbox/index.js +0 -4
  323. package/dist/sandbox/policy.d.ts +0 -86
  324. package/dist/services/launches.d.ts +0 -104
  325. package/dist/services/threadDirs.d.ts +0 -38
  326. package/dist/testing/sandbox.d.ts +0 -71
  327. /package/dist/chunks/{UKXMCHHT.js → FJLU4UH3.js} +0 -0
  328. /package/dist/chunks/{J5S4URAW.js → HK6ZSONF.js} +0 -0
  329. /package/dist/plugins/ask/{askQuestion.d.ts → tools.d.ts} +0 -0
  330. /package/dist/plugins/delegations/{waits.d.ts → waitContracts.d.ts} +0 -0
  331. /package/dist/plugins/{tools → fileTools}/fsRead.d.ts +0 -0
  332. /package/dist/plugins/{tools → fileTools}/ripgrep.d.ts +0 -0
  333. /package/dist/plugins/{tools → fileTools}/textEdit.d.ts +0 -0
  334. /package/dist/{util → plugins/mcp}/version.d.ts +0 -0
  335. /package/dist/{sandbox → plugins/sandbox}/client.d.ts +0 -0
  336. /package/dist/{sandbox → plugins/sandbox}/files.d.ts +0 -0
  337. /package/dist/{sandbox → plugins/sandbox}/protocol.d.ts +0 -0
  338. /package/dist/{sandbox → plugins/sandbox}/worker.d.ts +0 -0
  339. /package/dist/{sandbox → plugins/sandbox}/worker.js +0 -0
  340. /package/dist/plugins/skills/{tool.d.ts → tools.d.ts} +0 -0
  341. /package/dist/plugins/{tools → webTools}/html.d.ts +0 -0
  342. /package/dist/plugins/{tools → webTools}/network.d.ts +0 -0
  343. /package/dist/plugins/{tools → webTools}/web.d.ts +0 -0
  344. /package/dist/plugins/workflows/{work.d.ts → workStatus.d.ts} +0 -0
  345. /package/dist/{plugins/providers → providers}/codexAuth.d.ts +0 -0
  346. /package/dist/services/{contributions.d.ts → catalogContributions.d.ts} +0 -0
  347. /package/dist/{loop → state}/limits.d.ts +0 -0
  348. /package/dist/{plugins/store → stores}/durableObject.d.ts +0 -0
  349. /package/dist/{plugins/store → stores}/durableObjectConnection.d.ts +0 -0
  350. /package/dist/{plugins/store → stores}/sqlite.d.ts +0 -0
  351. /package/dist/{models → util}/jsonSchema.d.ts +0 -0
  352. /package/dist/{kit → util}/retries.d.ts +0 -0
  353. /package/dist/{kit → util}/timers.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import type { ToolResult } from '../../models/index.js';
2
+ import type { ToolResult } from '../../records/toolResult.js';
3
3
  import { JsonValueSchema, type DeepReadonly } from '../../util/json.js';
4
4
  import type { CanonicalDefinition, WorkflowDefinition } from './definition.js';
5
5
  /**
@@ -64,7 +64,6 @@ declare const PinsSchema: z.ZodObject<{
64
64
  }, z.core.$strip>;
65
65
  environment: z.ZodObject<{
66
66
  cwd: z.ZodString;
67
- read_roots: z.ZodArray<z.ZodString>;
68
67
  }, z.core.$strip>;
69
68
  installations: z.ZodArray<z.ZodObject<{
70
69
  installation_id: z.ZodString;
@@ -107,8 +106,8 @@ declare const AssignmentEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
107
106
  task: z.ZodString;
108
107
  generation: z.ZodNumber;
109
108
  lifetime: z.ZodEnum<{
110
- attempt: "attempt";
111
109
  instance: "instance";
110
+ attempt: "attempt";
112
111
  }>;
113
112
  checks: z.ZodArray<z.ZodString>;
114
113
  }, z.core.$strict>], "context">;
@@ -256,7 +255,6 @@ declare const InstanceRowSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
256
255
  }, z.core.$strip>;
257
256
  environment: z.ZodObject<{
258
257
  cwd: z.ZodString;
259
- read_roots: z.ZodArray<z.ZodString>;
260
258
  }, z.core.$strip>;
261
259
  installations: z.ZodArray<z.ZodObject<{
262
260
  installation_id: z.ZodString;
@@ -323,8 +321,8 @@ declare const InstanceRowSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
323
321
  task: z.ZodString;
324
322
  generation: z.ZodNumber;
325
323
  lifetime: z.ZodEnum<{
326
- attempt: "attempt";
327
324
  instance: "instance";
325
+ attempt: "attempt";
328
326
  }>;
329
327
  checks: z.ZodArray<z.ZodString>;
330
328
  }, z.core.$strict>], "context">>;
@@ -490,7 +488,6 @@ export declare const instanceRow: {
490
488
  };
491
489
  environment: {
492
490
  cwd: string;
493
- read_roots: string[];
494
491
  };
495
492
  installations: {
496
493
  installation_id: string;
@@ -550,7 +547,7 @@ export declare const instanceRow: {
550
547
  thread: string;
551
548
  task: string;
552
549
  generation: number;
553
- lifetime: "attempt" | "instance";
550
+ lifetime: "instance" | "attempt";
554
551
  checks: string[];
555
552
  })[];
556
553
  } | {
@@ -641,7 +638,7 @@ export declare const instanceRow: {
641
638
  } | {
642
639
  op: "cancelled";
643
640
  operation_id: string;
644
- }) => import("../../models/index.js").ExtensionRecord;
641
+ }) => import("../../records/journal.js").ExtensionRecord;
645
642
  parse: (value: {
646
643
  op: "decided";
647
644
  decision: string;
@@ -671,7 +668,6 @@ export declare const instanceRow: {
671
668
  };
672
669
  environment: {
673
670
  cwd: string;
674
- read_roots: string[];
675
671
  };
676
672
  installations: {
677
673
  installation_id: string;
@@ -731,7 +727,7 @@ export declare const instanceRow: {
731
727
  thread: string;
732
728
  task: string;
733
729
  generation: number;
734
- lifetime: "attempt" | "instance";
730
+ lifetime: "instance" | "attempt";
735
731
  checks: string[];
736
732
  })[];
737
733
  } | {
@@ -851,7 +847,6 @@ export declare const instanceRow: {
851
847
  };
852
848
  environment: {
853
849
  cwd: string;
854
- read_roots: string[];
855
850
  };
856
851
  installations: {
857
852
  installation_id: string;
@@ -911,7 +906,7 @@ export declare const instanceRow: {
911
906
  thread: string;
912
907
  task: string;
913
908
  generation: number;
914
- lifetime: "attempt" | "instance";
909
+ lifetime: "instance" | "attempt";
915
910
  checks: string[];
916
911
  })[];
917
912
  } | {
@@ -1032,7 +1027,6 @@ export declare const instanceRow: {
1032
1027
  };
1033
1028
  environment: {
1034
1029
  cwd: string;
1035
- read_roots: string[];
1036
1030
  };
1037
1031
  installations: {
1038
1032
  installation_id: string;
@@ -1092,7 +1086,7 @@ export declare const instanceRow: {
1092
1086
  thread: string;
1093
1087
  task: string;
1094
1088
  generation: number;
1095
- lifetime: "attempt" | "instance";
1089
+ lifetime: "instance" | "attempt";
1096
1090
  checks: string[];
1097
1091
  })[];
1098
1092
  } | {
@@ -1223,7 +1217,6 @@ export declare const instanceRow: {
1223
1217
  };
1224
1218
  environment: {
1225
1219
  cwd: string;
1226
- read_roots: string[];
1227
1220
  };
1228
1221
  installations: {
1229
1222
  installation_id: string;
@@ -1283,7 +1276,7 @@ export declare const instanceRow: {
1283
1276
  thread: string;
1284
1277
  task: string;
1285
1278
  generation: number;
1286
- lifetime: "attempt" | "instance";
1279
+ lifetime: "instance" | "attempt";
1287
1280
  checks: string[];
1288
1281
  })[];
1289
1282
  } | {
@@ -1374,8 +1367,8 @@ export declare const instanceRow: {
1374
1367
  } | {
1375
1368
  op: "cancelled";
1376
1369
  operation_id: string;
1377
- }, options: import("../../plugin.js").AppendOptions): Promise<import("../../models/index.js").JournalEvent<"ext">>;
1378
- read(event: import("../../models/index.js").JournalEvent): {
1370
+ }, options: import("../../plugin.js").AppendOptions): Promise<import("../../records/journal.js").JournalEvent<"ext">>;
1371
+ read(event: import("../../records/journal.js").JournalEvent): {
1379
1372
  op: "decided";
1380
1373
  decision: string;
1381
1374
  operation_id: string;
@@ -1404,7 +1397,6 @@ export declare const instanceRow: {
1404
1397
  };
1405
1398
  environment: {
1406
1399
  cwd: string;
1407
- read_roots: string[];
1408
1400
  };
1409
1401
  installations: {
1410
1402
  installation_id: string;
@@ -1464,7 +1456,7 @@ export declare const instanceRow: {
1464
1456
  thread: string;
1465
1457
  task: string;
1466
1458
  generation: number;
1467
- lifetime: "attempt" | "instance";
1459
+ lifetime: "instance" | "attempt";
1468
1460
  checks: string[];
1469
1461
  })[];
1470
1462
  } | {
@@ -1557,7 +1549,7 @@ export declare const instanceRow: {
1557
1549
  operation_id: string;
1558
1550
  } | undefined;
1559
1551
  contribution(message: {
1560
- role?: import("../../models/index.js").InputRole;
1552
+ role?: import("../../records/journal.js").InputRole;
1561
1553
  content: string | readonly import("../../llm/content.js").ContentPartInput[];
1562
1554
  }, value: {
1563
1555
  op: "decided";
@@ -1588,7 +1580,6 @@ export declare const instanceRow: {
1588
1580
  };
1589
1581
  environment: {
1590
1582
  cwd: string;
1591
- read_roots: string[];
1592
1583
  };
1593
1584
  installations: {
1594
1585
  installation_id: string;
@@ -1648,7 +1639,7 @@ export declare const instanceRow: {
1648
1639
  thread: string;
1649
1640
  task: string;
1650
1641
  generation: number;
1651
- lifetime: "attempt" | "instance";
1642
+ lifetime: "instance" | "attempt";
1652
1643
  checks: string[];
1653
1644
  })[];
1654
1645
  } | {
@@ -1740,9 +1731,9 @@ export declare const instanceRow: {
1740
1731
  op: "cancelled";
1741
1732
  operation_id: string;
1742
1733
  }, options?: {
1743
- sourceSeqs?: readonly import("../../models/index.js").Seq[];
1744
- }): import("../../models/index.js").StepContribution;
1745
- matchesSource(record: DeepReadonly<import("../../models/index.js").ExtensionRecord>): boolean;
1734
+ sourceSeqs?: readonly import("../../records/journal.js").Seq[];
1735
+ }): import("../../records/journal.js").StepContribution;
1736
+ matchesSource(record: DeepReadonly<import("../../records/journal.js").ExtensionRecord>): boolean;
1746
1737
  rejection(reason: string, value: {
1747
1738
  op: "decided";
1748
1739
  decision: string;
@@ -1772,7 +1763,6 @@ export declare const instanceRow: {
1772
1763
  };
1773
1764
  environment: {
1774
1765
  cwd: string;
1775
- read_roots: string[];
1776
1766
  };
1777
1767
  installations: {
1778
1768
  installation_id: string;
@@ -1832,7 +1822,7 @@ export declare const instanceRow: {
1832
1822
  thread: string;
1833
1823
  task: string;
1834
1824
  generation: number;
1835
- lifetime: "attempt" | "instance";
1825
+ lifetime: "instance" | "attempt";
1836
1826
  checks: string[];
1837
1827
  })[];
1838
1828
  } | {
@@ -1926,9 +1916,9 @@ export declare const instanceRow: {
1926
1916
  }): {
1927
1917
  decision: "reject";
1928
1918
  reason: string;
1929
- source: import("../../models/index.js").ExtensionRecord;
1919
+ source: import("../../records/journal.js").ExtensionRecord;
1930
1920
  };
1931
- readContribution: (event: import("../../models/index.js").JournalEvent) => {
1921
+ readContribution: (event: import("../../records/journal.js").JournalEvent) => {
1932
1922
  op: "decided";
1933
1923
  decision: string;
1934
1924
  operation_id: string;
@@ -1957,7 +1947,6 @@ export declare const instanceRow: {
1957
1947
  };
1958
1948
  environment: {
1959
1949
  cwd: string;
1960
- read_roots: string[];
1961
1950
  };
1962
1951
  installations: {
1963
1952
  installation_id: string;
@@ -2017,7 +2006,7 @@ export declare const instanceRow: {
2017
2006
  thread: string;
2018
2007
  task: string;
2019
2008
  generation: number;
2020
- lifetime: "attempt" | "instance";
2009
+ lifetime: "instance" | "attempt";
2021
2010
  checks: string[];
2022
2011
  })[];
2023
2012
  } | {
@@ -2109,7 +2098,7 @@ export declare const instanceRow: {
2109
2098
  op: "cancelled";
2110
2099
  operation_id: string;
2111
2100
  } | undefined;
2112
- readSource: (source: DeepReadonly<import("../../models/index.js").ExtensionRecord> | null) => {
2101
+ readSource: (source: DeepReadonly<import("../../records/journal.js").ExtensionRecord> | null) => {
2113
2102
  op: "decided";
2114
2103
  decision: string;
2115
2104
  operation_id: string;
@@ -2138,7 +2127,6 @@ export declare const instanceRow: {
2138
2127
  };
2139
2128
  environment: {
2140
2129
  cwd: string;
2141
- read_roots: string[];
2142
2130
  };
2143
2131
  installations: {
2144
2132
  installation_id: string;
@@ -2198,7 +2186,7 @@ export declare const instanceRow: {
2198
2186
  thread: string;
2199
2187
  task: string;
2200
2188
  generation: number;
2201
- lifetime: "attempt" | "instance";
2189
+ lifetime: "instance" | "attempt";
2202
2190
  checks: string[];
2203
2191
  })[];
2204
2192
  } | {
@@ -2290,7 +2278,7 @@ export declare const instanceRow: {
2290
2278
  op: "cancelled";
2291
2279
  operation_id: string;
2292
2280
  } | undefined;
2293
- told: import("../../plugin.js").PluginProjection<import("../../kit/extension.js").ToldNotices<{
2281
+ told: import("../../plugin.js").PluginProjection<import("../../services/extensionEvents.js").ToldNotices<{
2294
2282
  op: "decided";
2295
2283
  decision: string;
2296
2284
  operation_id: string;
@@ -2319,7 +2307,6 @@ export declare const instanceRow: {
2319
2307
  };
2320
2308
  environment: {
2321
2309
  cwd: string;
2322
- read_roots: string[];
2323
2310
  };
2324
2311
  installations: {
2325
2312
  installation_id: string;
@@ -2379,7 +2366,7 @@ export declare const instanceRow: {
2379
2366
  thread: string;
2380
2367
  task: string;
2381
2368
  generation: number;
2382
- lifetime: "attempt" | "instance";
2369
+ lifetime: "instance" | "attempt";
2383
2370
  checks: string[];
2384
2371
  })[];
2385
2372
  } | {
@@ -2503,7 +2490,6 @@ export declare const instanceRow: {
2503
2490
  };
2504
2491
  environment: {
2505
2492
  cwd: string;
2506
- read_roots: string[];
2507
2493
  };
2508
2494
  installations: {
2509
2495
  installation_id: string;
@@ -2563,7 +2549,7 @@ export declare const instanceRow: {
2563
2549
  thread: string;
2564
2550
  task: string;
2565
2551
  generation: number;
2566
- lifetime: "attempt" | "instance";
2552
+ lifetime: "instance" | "attempt";
2567
2553
  checks: string[];
2568
2554
  })[];
2569
2555
  } | {
@@ -2654,7 +2640,7 @@ export declare const instanceRow: {
2654
2640
  } | {
2655
2641
  op: "cancelled";
2656
2642
  operation_id: string;
2657
- }, event: import("../../models/index.js").JournalEvent<"ext">): State;
2643
+ }, event: import("../../records/journal.js").JournalEvent<"ext">): State;
2658
2644
  onFork?: "inherit" | "reset";
2659
2645
  }): import("../../plugin.js").PluginProjection<State>;
2660
2646
  };
@@ -2682,7 +2668,7 @@ export declare const submissionReminder: {
2682
2668
  record: (value: {
2683
2669
  assignment: string;
2684
2670
  epoch: number;
2685
- }) => import("../../models/index.js").ExtensionRecord;
2671
+ }) => import("../../records/journal.js").ExtensionRecord;
2686
2672
  parse: (value: {
2687
2673
  assignment: string;
2688
2674
  epoch: number;
@@ -2707,38 +2693,38 @@ export declare const submissionReminder: {
2707
2693
  append(journal: import("../../plugin.js").PluginJournal, value: {
2708
2694
  assignment: string;
2709
2695
  epoch: number;
2710
- }, options: import("../../plugin.js").AppendOptions): Promise<import("../../models/index.js").JournalEvent<"ext">>;
2711
- read(event: import("../../models/index.js").JournalEvent): {
2696
+ }, options: import("../../plugin.js").AppendOptions): Promise<import("../../records/journal.js").JournalEvent<"ext">>;
2697
+ read(event: import("../../records/journal.js").JournalEvent): {
2712
2698
  assignment: string;
2713
2699
  epoch: number;
2714
2700
  } | undefined;
2715
2701
  contribution(message: {
2716
- role?: import("../../models/index.js").InputRole;
2702
+ role?: import("../../records/journal.js").InputRole;
2717
2703
  content: string | readonly import("../../llm/content.js").ContentPartInput[];
2718
2704
  }, value: {
2719
2705
  assignment: string;
2720
2706
  epoch: number;
2721
2707
  }, options?: {
2722
- sourceSeqs?: readonly import("../../models/index.js").Seq[];
2723
- }): import("../../models/index.js").StepContribution;
2724
- matchesSource(record: DeepReadonly<import("../../models/index.js").ExtensionRecord>): boolean;
2708
+ sourceSeqs?: readonly import("../../records/journal.js").Seq[];
2709
+ }): import("../../records/journal.js").StepContribution;
2710
+ matchesSource(record: DeepReadonly<import("../../records/journal.js").ExtensionRecord>): boolean;
2725
2711
  rejection(reason: string, value: {
2726
2712
  assignment: string;
2727
2713
  epoch: number;
2728
2714
  }): {
2729
2715
  decision: "reject";
2730
2716
  reason: string;
2731
- source: import("../../models/index.js").ExtensionRecord;
2717
+ source: import("../../records/journal.js").ExtensionRecord;
2732
2718
  };
2733
- readContribution: (event: import("../../models/index.js").JournalEvent) => {
2719
+ readContribution: (event: import("../../records/journal.js").JournalEvent) => {
2734
2720
  assignment: string;
2735
2721
  epoch: number;
2736
2722
  } | undefined;
2737
- readSource: (source: DeepReadonly<import("../../models/index.js").ExtensionRecord> | null) => {
2723
+ readSource: (source: DeepReadonly<import("../../records/journal.js").ExtensionRecord> | null) => {
2738
2724
  assignment: string;
2739
2725
  epoch: number;
2740
2726
  } | undefined;
2741
- told: import("../../plugin.js").PluginProjection<import("../../kit/extension.js").ToldNotices<{
2727
+ told: import("../../plugin.js").PluginProjection<import("../../services/extensionEvents.js").ToldNotices<{
2742
2728
  assignment: string;
2743
2729
  epoch: number;
2744
2730
  }>>;
@@ -2748,7 +2734,7 @@ export declare const submissionReminder: {
2748
2734
  apply(state: State, value: {
2749
2735
  assignment: string;
2750
2736
  epoch: number;
2751
- }, event: import("../../models/index.js").JournalEvent<"ext">): State;
2737
+ }, event: import("../../records/journal.js").JournalEvent<"ext">): State;
2752
2738
  onFork?: "inherit" | "reset";
2753
2739
  }): import("../../plugin.js").PluginProjection<State>;
2754
2740
  };
@@ -2779,7 +2765,7 @@ export declare const transitionNotice: {
2779
2765
  transition: string;
2780
2766
  assignment: string | null;
2781
2767
  decision: string | null;
2782
- }) => import("../../models/index.js").ExtensionRecord;
2768
+ }) => import("../../records/journal.js").ExtensionRecord;
2783
2769
  parse: (value: {
2784
2770
  transition: string;
2785
2771
  assignment: string | null;
@@ -2808,23 +2794,23 @@ export declare const transitionNotice: {
2808
2794
  transition: string;
2809
2795
  assignment: string | null;
2810
2796
  decision: string | null;
2811
- }, options: import("../../plugin.js").AppendOptions): Promise<import("../../models/index.js").JournalEvent<"ext">>;
2812
- read(event: import("../../models/index.js").JournalEvent): {
2797
+ }, options: import("../../plugin.js").AppendOptions): Promise<import("../../records/journal.js").JournalEvent<"ext">>;
2798
+ read(event: import("../../records/journal.js").JournalEvent): {
2813
2799
  transition: string;
2814
2800
  assignment: string | null;
2815
2801
  decision: string | null;
2816
2802
  } | undefined;
2817
2803
  contribution(message: {
2818
- role?: import("../../models/index.js").InputRole;
2804
+ role?: import("../../records/journal.js").InputRole;
2819
2805
  content: string | readonly import("../../llm/content.js").ContentPartInput[];
2820
2806
  }, value: {
2821
2807
  transition: string;
2822
2808
  assignment: string | null;
2823
2809
  decision: string | null;
2824
2810
  }, options?: {
2825
- sourceSeqs?: readonly import("../../models/index.js").Seq[];
2826
- }): import("../../models/index.js").StepContribution;
2827
- matchesSource(record: DeepReadonly<import("../../models/index.js").ExtensionRecord>): boolean;
2811
+ sourceSeqs?: readonly import("../../records/journal.js").Seq[];
2812
+ }): import("../../records/journal.js").StepContribution;
2813
+ matchesSource(record: DeepReadonly<import("../../records/journal.js").ExtensionRecord>): boolean;
2828
2814
  rejection(reason: string, value: {
2829
2815
  transition: string;
2830
2816
  assignment: string | null;
@@ -2832,19 +2818,19 @@ export declare const transitionNotice: {
2832
2818
  }): {
2833
2819
  decision: "reject";
2834
2820
  reason: string;
2835
- source: import("../../models/index.js").ExtensionRecord;
2821
+ source: import("../../records/journal.js").ExtensionRecord;
2836
2822
  };
2837
- readContribution: (event: import("../../models/index.js").JournalEvent) => {
2823
+ readContribution: (event: import("../../records/journal.js").JournalEvent) => {
2838
2824
  transition: string;
2839
2825
  assignment: string | null;
2840
2826
  decision: string | null;
2841
2827
  } | undefined;
2842
- readSource: (source: DeepReadonly<import("../../models/index.js").ExtensionRecord> | null) => {
2828
+ readSource: (source: DeepReadonly<import("../../records/journal.js").ExtensionRecord> | null) => {
2843
2829
  transition: string;
2844
2830
  assignment: string | null;
2845
2831
  decision: string | null;
2846
2832
  } | undefined;
2847
- told: import("../../plugin.js").PluginProjection<import("../../kit/extension.js").ToldNotices<{
2833
+ told: import("../../plugin.js").PluginProjection<import("../../services/extensionEvents.js").ToldNotices<{
2848
2834
  transition: string;
2849
2835
  assignment: string | null;
2850
2836
  decision: string | null;
@@ -2856,7 +2842,7 @@ export declare const transitionNotice: {
2856
2842
  transition: string;
2857
2843
  assignment: string | null;
2858
2844
  decision: string | null;
2859
- }, event: import("../../models/index.js").JournalEvent<"ext">): State;
2845
+ }, event: import("../../records/journal.js").JournalEvent<"ext">): State;
2860
2846
  onFork?: "inherit" | "reset";
2861
2847
  }): import("../../plugin.js").PluginProjection<State>;
2862
2848
  };
@@ -1,7 +1,7 @@
1
1
  import type { CommandWork } from '../commands/index.js';
2
- import { type EntryEvidence, type EvidenceNeeds } from './bindings.js';
2
+ import { type EntryEvidence, type EvidenceNeeds } from './entryPlan.js';
3
3
  import { type CanonicalDefinition } from './definition.js';
4
- import type { InstanceState, PendingDecision } from './fold.js';
4
+ import type { InstanceState, PendingDecision } from './state.js';
5
5
  import { type InstanceRowInput } from './record.js';
6
6
  import type { ReadonlyState } from '../../util/foldState.js';
7
7
  /**
@@ -1,13 +1,13 @@
1
1
  import { Service, type Context } from '@leuduan/cordis';
2
2
  import { z } from 'zod';
3
- import { type ThinkingEffort } from '../../llm/index.js';
4
- import type { FreshOpening, WriteRows } from '../../loop/index.js';
5
- import type { ThreadEnvironment } from '../../models/index.js';
6
- import type { InitialInstallationInput } from '../../services/presets.js';
3
+ import type { ThinkingEffort } from '../../llm/primitives.js';
4
+ import type { FreshOpening, WriteRows } from '../../state/index.js';
5
+ import type { ThreadEnvironment } from '../../records/journal.js';
6
+ import type { InitialInstallationInput } from '../../services/presets/installations.js';
7
7
  import type { DeepReadonly } from '../../util/json.js';
8
8
  import type { AppendEntry } from '../../journal/index.js';
9
9
  import { type CanonicalDefinition, type JsonSchema, type WorkflowDefinition } from './definition.js';
10
- import { type Configured } from './providers.js';
10
+ import { type Configured } from './hostBindings.js';
11
11
  import { type InstanceView } from './view.js';
12
12
  declare module '@leuduan/cordis' {
13
13
  interface Context {
@@ -46,8 +46,8 @@ declare const WorkflowsConfigSchema: z.ZodObject<{
46
46
  prerequisites: z.ZodRecord<z.ZodString, z.ZodCustom<Prerequisite, Prerequisite>>;
47
47
  roles: z.ZodRecord<z.ZodString, z.ZodCustom<RoleBinding, RoleBinding>>;
48
48
  modelProviders: z.ZodArray<z.ZodString>;
49
- checks: z.ZodRecord<z.ZodString, z.ZodCustom<import("./providers.js").CheckProvider, import("./providers.js").CheckProvider>>;
50
- evidence: z.ZodRecord<z.ZodString, z.ZodCustom<import("./providers.js").EvidenceProvider, import("./providers.js").EvidenceProvider>>;
49
+ checks: z.ZodRecord<z.ZodString, z.ZodCustom<import("./hostBindings.js").CheckProvider, import("./hostBindings.js").CheckProvider>>;
50
+ evidence: z.ZodRecord<z.ZodString, z.ZodCustom<import("./hostBindings.js").EvidenceProvider, import("./hostBindings.js").EvidenceProvider>>;
51
51
  }, z.core.$strict>;
52
52
  export type WorkflowsConfig = z.input<typeof WorkflowsConfigSchema>;
53
53
  /**
@@ -75,7 +75,6 @@ declare const OpeningRequestSchema: z.ZodObject<{
75
75
  conversation: z.ZodObject<{
76
76
  environment: z.ZodObject<{
77
77
  cwd: z.ZodString;
78
- read_roots: z.ZodArray<z.ZodString>;
79
78
  }, z.core.$strict>;
80
79
  installations: z.ZodArray<z.ZodCustom<InitialInstallationInput, InitialInstallationInput>>;
81
80
  }, z.core.$strict>;
@@ -118,10 +117,6 @@ export type CancelRequest = z.input<typeof CancelRequestSchema>;
118
117
  * settles with that write.
119
118
  */
120
119
  export type StopCancel = (rows: (threadId: string) => AppendEntry<'ext'>[]) => Promise<void>;
121
- /** A request the workflow refuses, with why: nothing was recorded. */
122
- export declare class WorkflowRefusedError extends Error {
123
- constructor(reason: string);
124
- }
125
120
  /**
126
121
  * Registered definitions and the instances that run them. An instance lives on its root thread,
127
122
  * the conversation it was opened with: the root requires {@link WORKFLOWS_OWNER}, so it runs only
@@ -157,13 +152,13 @@ export declare class WorkflowRefusedError extends Error {
157
152
  * Beside these writes it mounts what the fold derives for the model steps of the root, its
158
153
  * participants' children and the threads they start: the presentation of assignments
159
154
  * (`assignment.ts`), the vote and grant of their authority (`policy.ts`), and
160
- * `submit_workflow_output` with the stop check reminding a thread to submit (`submit.ts`). Its
155
+ * `submit_workflow_output` with the stop check reminding a thread to submit (`stopCheck.ts`, `tools.ts`). Its
161
156
  * constraint holds the root and every thread under it while the instance cannot execute.
162
157
  *
163
158
  * An entry that binds evidence has it acquired first, outside any write, for exactly that transition
164
159
  * and attempt; its write plans the entry again with that evidence and records it only when the plan
165
160
  * is unchanged. The providers' subscriptions and every acquisition in flight are this service's
166
- * (`providers.ts`): a provider's notice decides again what it held, and the unload cancels and
161
+ * (`hostBindings.ts`): a provider's notice decides again what it held, and the unload cancels and
167
162
  * waits for what is in flight.
168
163
  *
169
164
  * Registration refuses a definition naming a restriction, prerequisite, role or provider the host
@@ -235,13 +230,13 @@ export declare class WorkflowsService extends Service<WorkflowsConfig> {
235
230
  /** The conversation a host proposes, as its creation records it, installation ids left out. */
236
231
  private proposed;
237
232
  /**
238
- * What the instance runs on besides its definition, pinned: each participant's configuration and
239
- * the pins of the checks its assignments list, then the evidence providers' pins.
233
+ * What the instance runs on besides its definition, pinned: each participant's configuration, on
234
+ * its resolved model, and the pins of the checks its assignments list, then the evidence
235
+ * providers' pins.
240
236
  */
241
237
  private pins;
242
238
  /**
243
- * An isolated participant's complete configuration: its route, the default its definition names
244
- * or the starter's complete choice, on a provider the host offers; and what its role resolves from
239
+ * An isolated participant's complete configuration: its route, the resolved model; and what its role resolves from
245
240
  * the conversation, its installations validated and normalized as its creation records them.
246
241
  */
247
242
  private configuration;
@@ -326,11 +321,12 @@ export declare class WorkflowsService extends Service<WorkflowsConfig> {
326
321
  /**
327
322
  * Writes the transition the instance owes on its own, if any: a follow-up send whose input is the
328
323
  * scheduling input of the root assignment it opens, with a `fresh` wake that releases no hold,
329
- * or else a notice the root reads at its next turn. An entry that binds evidence has it acquired
330
- * first; one it refuses is kept as the instance's entry refusal until a provider's notice tries
331
- * again, and one cancelled writes nothing. Nothing is acquired when nothing is owed, such as after
332
- * an entry was recorded: replay reads what that entry recorded. Decided again inside the write; a
333
- * send whose id is known, or whose transition is no longer owed, writes nothing.
324
+ * or else context the root reads at its next model step, without a turn of its own. An entry that
325
+ * binds evidence has it acquired first; one it refuses is kept as the instance's entry refusal
326
+ * until a provider's notice tries again, and one cancelled writes nothing. Nothing is acquired when
327
+ * nothing is owed, such as after an entry was recorded: replay reads what that entry recorded.
328
+ * Decided again inside the write; a send whose id is known, or whose transition is no longer owed,
329
+ * writes nothing.
334
330
  */
335
331
  private advance;
336
332
  /**
@@ -351,7 +347,11 @@ export declare class WorkflowsService extends Service<WorkflowsConfig> {
351
347
  private send;
352
348
  /**
353
349
  * `row`'s input: the scheduling input naming the root assignment the transition opens, or a notice
354
- * of what happened, with the host decision that made it when one did.
350
+ * of what happened, with the host decision that made it when one did. It says what happened, never
351
+ * what the instance waits on, which the presentation tells as it stands at each step: a notice read
352
+ * later never goes stale. A decision's option and feedback are always told here, since an
353
+ * assignment it opens may be superseded before it is presented; completion is told here too, since a
354
+ * root that never saw the instance is presented no end.
355
355
  */
356
356
  private transition;
357
357
  /**
@@ -1,5 +1,5 @@
1
- import { type AnswerCheck } from '../../loop/index.js';
2
- import type { JournalEvent, Seq } from '../../models/index.js';
1
+ import { type AnswerCheck } from '../../state/index.js';
2
+ import type { JournalEvent, Seq } from '../../records/journal.js';
3
3
  import type { ReadonlyState } from '../../util/foldState.js';
4
4
  import type { JsonValue, ReadonlyJsonValue } from '../../util/json.js';
5
5
  import type { WorkflowDefinition } from './definition.js';
@@ -0,0 +1,13 @@
1
+ import type { Context } from '@leuduan/cordis';
2
+ import { type Governance } from './policy.js';
3
+ /**
4
+ * The workflow's stop check (§7 of the design): while a thread's assignment is active, an answer
5
+ * that is not its submission (a reply, another tool's conclusion) is sent back once per epoch with
6
+ * how to submit. Once that reminder is spent, the outcome depends on who answered: on the root it
7
+ * abstains, so the answer may be accepted as chat, but prose never advances the workflow, the
8
+ * assignment stays active and a person resumes it; on an isolated participant's child it rejects,
9
+ * which fails its task and opens the attempt's recovery. The submission itself, and every thread
10
+ * that is not working an assignment, it leaves to the other checks, whose rejection wins. A pure
11
+ * read of the journal, so judging again repeats nothing.
12
+ */
13
+ export declare function remindToSubmit(ctx: Context, governance: Governance): void;
@@ -0,0 +1,13 @@
1
+ import type { Context } from '@leuduan/cordis';
2
+ import { type Governance } from './policy.js';
3
+ /**
4
+ * The protocol tool, one static envelope for every assignment, since a tool's spec is fixed when it
5
+ * is defined: the output is validated by the assignment's own schema, rebuilt from the registered
6
+ * definition. A valid submission is the turn's answer (`concludes_turn`), the assignment's
7
+ * candidate until core accepts or refuses that answer. Refused as an error, recording no candidate:
8
+ * a caller that is not the thread working the assignment it names from this call's model step on
9
+ * (the vote's standing: the root's own assignment, or the one whose task an isolated participant's
10
+ * child serves), work it started that is still open at any depth (quiescence), and an output its
11
+ * schema refuses. Validating is all it does, so a rerun after an interruption repeats nothing.
12
+ */
13
+ export declare function submitTool(ctx: Context, governance: Governance): import("../../plugin.js").Tool;
@@ -1,7 +1,7 @@
1
- import type { ThinkingEffort } from '../../llm/index.js';
1
+ import type { ThinkingEffort } from '../../llm/primitives.js';
2
2
  import type { ReadonlyJsonValue } from '../../util/json.js';
3
3
  import type { WorkflowDefinition } from './definition.js';
4
- import { type AssignmentState, type InstanceState, type PendingDecision, type ResultDecision } from './fold.js';
4
+ import { type AssignmentState, type InstanceState, type PendingDecision, type ResultDecision } from './state.js';
5
5
  import type { StartState } from './participants.js';
6
6
  import { type Citation } from './record.js';
7
7
  import { type Barrier } from './routing.js';