@namzu/sdk 30.2.0 → 31.1.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 (718) hide show
  1. package/CHANGELOG.md +562 -0
  2. package/README.md +43 -2
  3. package/dist/advisory/executor.d.ts +2 -1
  4. package/dist/advisory/executor.d.ts.map +1 -1
  5. package/dist/advisory/executor.js +4 -1
  6. package/dist/advisory/executor.js.map +1 -1
  7. package/dist/agents/ReactiveAgent.d.ts.map +1 -1
  8. package/dist/agents/ReactiveAgent.js +12 -0
  9. package/dist/agents/ReactiveAgent.js.map +1 -1
  10. package/dist/agents/RouterAgent.d.ts.map +1 -1
  11. package/dist/agents/RouterAgent.js +21 -3
  12. package/dist/agents/RouterAgent.js.map +1 -1
  13. package/dist/agents/SupervisorAgent.d.ts.map +1 -1
  14. package/dist/agents/SupervisorAgent.js +34 -11
  15. package/dist/agents/SupervisorAgent.js.map +1 -1
  16. package/dist/agents/runAgent.d.ts +12 -0
  17. package/dist/agents/runAgent.d.ts.map +1 -1
  18. package/dist/agents/runAgent.js +26 -2
  19. package/dist/agents/runAgent.js.map +1 -1
  20. package/dist/authorization/command-line.d.ts +81 -0
  21. package/dist/authorization/command-line.d.ts.map +1 -0
  22. package/dist/authorization/command-line.js +347 -0
  23. package/dist/authorization/command-line.js.map +1 -0
  24. package/dist/authorization/rules.d.ts.map +1 -1
  25. package/dist/authorization/rules.js +22 -1
  26. package/dist/authorization/rules.js.map +1 -1
  27. package/dist/bridge/a2a/client.d.ts +23 -5
  28. package/dist/bridge/a2a/client.d.ts.map +1 -1
  29. package/dist/bridge/a2a/client.js +320 -73
  30. package/dist/bridge/a2a/client.js.map +1 -1
  31. package/dist/bridge/a2a/mapper.d.ts.map +1 -1
  32. package/dist/bridge/a2a/mapper.js +4 -0
  33. package/dist/bridge/a2a/mapper.js.map +1 -1
  34. package/dist/bridge/acp/server.d.ts +13 -1
  35. package/dist/bridge/acp/server.d.ts.map +1 -1
  36. package/dist/bridge/acp/server.js +150 -44
  37. package/dist/bridge/acp/server.js.map +1 -1
  38. package/dist/bridge/mcp/connector/adapter.d.ts +3 -2
  39. package/dist/bridge/mcp/connector/adapter.d.ts.map +1 -1
  40. package/dist/bridge/mcp/connector/adapter.js +17 -21
  41. package/dist/bridge/mcp/connector/adapter.js.map +1 -1
  42. package/dist/bridge/sse/mapper.d.ts.map +1 -1
  43. package/dist/bridge/sse/mapper.js +3 -0
  44. package/dist/bridge/sse/mapper.js.map +1 -1
  45. package/dist/compaction/dangling.d.ts +29 -2
  46. package/dist/compaction/dangling.d.ts.map +1 -1
  47. package/dist/compaction/dangling.js +172 -35
  48. package/dist/compaction/dangling.js.map +1 -1
  49. package/dist/compaction/index.d.ts +3 -2
  50. package/dist/compaction/index.d.ts.map +1 -1
  51. package/dist/compaction/index.js +1 -1
  52. package/dist/compaction/index.js.map +1 -1
  53. package/dist/compaction/manual.d.ts +11 -1
  54. package/dist/compaction/manual.d.ts.map +1 -1
  55. package/dist/compaction/manual.js +89 -14
  56. package/dist/compaction/manual.js.map +1 -1
  57. package/dist/compaction/plan.d.ts +19 -6
  58. package/dist/compaction/plan.d.ts.map +1 -1
  59. package/dist/compaction/plan.js +18 -4
  60. package/dist/compaction/plan.js.map +1 -1
  61. package/dist/compaction/retention.d.ts +10 -7
  62. package/dist/compaction/retention.d.ts.map +1 -1
  63. package/dist/compaction/retention.js +26 -8
  64. package/dist/compaction/retention.js.map +1 -1
  65. package/dist/compaction/summary.d.ts +4 -4
  66. package/dist/compaction/summary.js +4 -4
  67. package/dist/compaction/verifier.d.ts +19 -1
  68. package/dist/compaction/verifier.d.ts.map +1 -1
  69. package/dist/compaction/verifier.js +20 -1
  70. package/dist/compaction/verifier.js.map +1 -1
  71. package/dist/config/runtime.d.ts +6 -6
  72. package/dist/connector/BaseConnector.d.ts +6 -4
  73. package/dist/connector/BaseConnector.d.ts.map +1 -1
  74. package/dist/connector/BaseConnector.js +8 -2
  75. package/dist/connector/BaseConnector.js.map +1 -1
  76. package/dist/connector/builtins/http.d.ts +16 -4
  77. package/dist/connector/builtins/http.d.ts.map +1 -1
  78. package/dist/connector/builtins/http.js +177 -44
  79. package/dist/connector/builtins/http.js.map +1 -1
  80. package/dist/connector/builtins/webhook.d.ts +15 -4
  81. package/dist/connector/builtins/webhook.d.ts.map +1 -1
  82. package/dist/connector/builtins/webhook.js +165 -45
  83. package/dist/connector/builtins/webhook.js.map +1 -1
  84. package/dist/connector/execution-contract.d.ts +11 -0
  85. package/dist/connector/execution-contract.d.ts.map +1 -0
  86. package/dist/connector/execution-contract.js +14 -0
  87. package/dist/connector/execution-contract.js.map +1 -0
  88. package/dist/connector/http-operation.d.ts +48 -0
  89. package/dist/connector/http-operation.d.ts.map +1 -0
  90. package/dist/connector/http-operation.js +205 -0
  91. package/dist/connector/http-operation.js.map +1 -0
  92. package/dist/connector/mcp/adapter.d.ts.map +1 -1
  93. package/dist/connector/mcp/adapter.js +8 -3
  94. package/dist/connector/mcp/adapter.js.map +1 -1
  95. package/dist/connector/mcp/client.d.ts +14 -8
  96. package/dist/connector/mcp/client.d.ts.map +1 -1
  97. package/dist/connector/mcp/client.js +160 -44
  98. package/dist/connector/mcp/client.js.map +1 -1
  99. package/dist/connector/mcp/http-sse.d.ts +8 -2
  100. package/dist/connector/mcp/http-sse.d.ts.map +1 -1
  101. package/dist/connector/mcp/http-sse.js +70 -17
  102. package/dist/connector/mcp/http-sse.js.map +1 -1
  103. package/dist/connector/mcp/prompt-adapter.d.ts.map +1 -1
  104. package/dist/connector/mcp/prompt-adapter.js +9 -2
  105. package/dist/connector/mcp/prompt-adapter.js.map +1 -1
  106. package/dist/connector/mcp/stdio.d.ts +2 -2
  107. package/dist/connector/mcp/stdio.d.ts.map +1 -1
  108. package/dist/connector/mcp/stdio.js +14 -50
  109. package/dist/connector/mcp/stdio.js.map +1 -1
  110. package/dist/connector/mcp/streamable-http.d.ts +7 -2
  111. package/dist/connector/mcp/streamable-http.d.ts.map +1 -1
  112. package/dist/connector/mcp/streamable-http.js +66 -18
  113. package/dist/connector/mcp/streamable-http.js.map +1 -1
  114. package/dist/connector/tools/adapter.d.ts +2 -2
  115. package/dist/connector/tools/adapter.d.ts.map +1 -1
  116. package/dist/connector/tools/adapter.js +23 -14
  117. package/dist/connector/tools/adapter.js.map +1 -1
  118. package/dist/connector/tools/definitions.d.ts.map +1 -1
  119. package/dist/connector/tools/definitions.js +5 -2
  120. package/dist/connector/tools/definitions.js.map +1 -1
  121. package/dist/connector/tools/result.d.ts +4 -0
  122. package/dist/connector/tools/result.d.ts.map +1 -0
  123. package/dist/connector/tools/result.js +20 -0
  124. package/dist/connector/tools/result.js.map +1 -0
  125. package/dist/connector/web/guarded-fetch.d.ts +4 -2
  126. package/dist/connector/web/guarded-fetch.d.ts.map +1 -1
  127. package/dist/connector/web/guarded-fetch.js +157 -43
  128. package/dist/connector/web/guarded-fetch.js.map +1 -1
  129. package/dist/constants/sandbox/index.d.ts +3 -2
  130. package/dist/constants/sandbox/index.d.ts.map +1 -1
  131. package/dist/constants/sandbox/index.js +3 -2
  132. package/dist/constants/sandbox/index.js.map +1 -1
  133. package/dist/contracts/api.d.ts +2 -0
  134. package/dist/contracts/api.d.ts.map +1 -1
  135. package/dist/contracts/schemas.d.ts +38 -12
  136. package/dist/contracts/schemas.d.ts.map +1 -1
  137. package/dist/contracts/schemas.js +7 -0
  138. package/dist/contracts/schemas.js.map +1 -1
  139. package/dist/directory/derive-supervisor.d.ts.map +1 -1
  140. package/dist/directory/derive-supervisor.js +8 -0
  141. package/dist/directory/derive-supervisor.js.map +1 -1
  142. package/dist/directory/derive.d.ts.map +1 -1
  143. package/dist/directory/derive.js +8 -0
  144. package/dist/directory/derive.js.map +1 -1
  145. package/dist/directory/load.d.ts.map +1 -1
  146. package/dist/directory/load.js +2 -0
  147. package/dist/directory/load.js.map +1 -1
  148. package/dist/directory/types.d.ts +4 -0
  149. package/dist/directory/types.d.ts.map +1 -1
  150. package/dist/eval/experiment.d.ts +10 -10
  151. package/dist/eval/experiment.d.ts.map +1 -1
  152. package/dist/eval/experiment.js +121 -91
  153. package/dist/eval/experiment.js.map +1 -1
  154. package/dist/eval/judge.d.ts +6 -0
  155. package/dist/eval/judge.d.ts.map +1 -1
  156. package/dist/eval/judge.js +7 -2
  157. package/dist/eval/judge.js.map +1 -1
  158. package/dist/eval/types.d.ts +7 -1
  159. package/dist/eval/types.d.ts.map +1 -1
  160. package/dist/manager/agent/lifecycle.d.ts +12 -10
  161. package/dist/manager/agent/lifecycle.d.ts.map +1 -1
  162. package/dist/manager/agent/lifecycle.js +16 -3
  163. package/dist/manager/agent/lifecycle.js.map +1 -1
  164. package/dist/manager/connector/environment.d.ts +2 -2
  165. package/dist/manager/connector/environment.d.ts.map +1 -1
  166. package/dist/manager/connector/environment.js +2 -2
  167. package/dist/manager/connector/environment.js.map +1 -1
  168. package/dist/manager/connector/lifecycle.d.ts +10 -2
  169. package/dist/manager/connector/lifecycle.d.ts.map +1 -1
  170. package/dist/manager/connector/lifecycle.js +273 -24
  171. package/dist/manager/connector/lifecycle.js.map +1 -1
  172. package/dist/manager/connector/tenant.d.ts +5 -4
  173. package/dist/manager/connector/tenant.d.ts.map +1 -1
  174. package/dist/manager/connector/tenant.js +47 -22
  175. package/dist/manager/connector/tenant.js.map +1 -1
  176. package/dist/manager/goal/activation.d.ts +23 -0
  177. package/dist/manager/goal/activation.d.ts.map +1 -0
  178. package/dist/manager/goal/activation.js +41 -0
  179. package/dist/manager/goal/activation.js.map +1 -0
  180. package/dist/manager/index.d.ts +3 -2
  181. package/dist/manager/index.d.ts.map +1 -1
  182. package/dist/manager/index.js.map +1 -1
  183. package/dist/manager/run/persistence.d.ts +2 -0
  184. package/dist/manager/run/persistence.d.ts.map +1 -1
  185. package/dist/manager/run/persistence.js +5 -1
  186. package/dist/manager/run/persistence.js.map +1 -1
  187. package/dist/manager/topic/dependency.d.ts +24 -0
  188. package/dist/manager/topic/dependency.d.ts.map +1 -0
  189. package/dist/manager/topic/dependency.js +13 -0
  190. package/dist/manager/topic/dependency.js.map +1 -0
  191. package/dist/manager/topic/lifecycle.d.ts +9 -21
  192. package/dist/manager/topic/lifecycle.d.ts.map +1 -1
  193. package/dist/manager/topic/lifecycle.js +17 -29
  194. package/dist/manager/topic/lifecycle.js.map +1 -1
  195. package/dist/plugin/index.d.ts +1 -0
  196. package/dist/plugin/index.d.ts.map +1 -1
  197. package/dist/plugin/index.js.map +1 -1
  198. package/dist/plugin/lifecycle.d.ts +15 -0
  199. package/dist/plugin/lifecycle.d.ts.map +1 -1
  200. package/dist/plugin/lifecycle.js +144 -38
  201. package/dist/plugin/lifecycle.js.map +1 -1
  202. package/dist/plugin/loader.d.ts +3 -3
  203. package/dist/plugin/loader.d.ts.map +1 -1
  204. package/dist/plugin/loader.js +58 -12
  205. package/dist/plugin/loader.js.map +1 -1
  206. package/dist/provider/collect-chat-completion.d.ts.map +1 -1
  207. package/dist/provider/collect-chat-completion.js +4 -0
  208. package/dist/provider/collect-chat-completion.js.map +1 -1
  209. package/dist/provider/fallback.d.ts +3 -1
  210. package/dist/provider/fallback.d.ts.map +1 -1
  211. package/dist/provider/fallback.js +62 -10
  212. package/dist/provider/fallback.js.map +1 -1
  213. package/dist/provider/idle-timeout.d.ts +4 -0
  214. package/dist/provider/idle-timeout.d.ts.map +1 -1
  215. package/dist/provider/idle-timeout.js +131 -15
  216. package/dist/provider/idle-timeout.js.map +1 -1
  217. package/dist/provider/index.d.ts +2 -0
  218. package/dist/provider/index.d.ts.map +1 -1
  219. package/dist/provider/index.js +1 -0
  220. package/dist/provider/index.js.map +1 -1
  221. package/dist/provider/instrumentation.d.ts.map +1 -1
  222. package/dist/provider/instrumentation.js +1 -0
  223. package/dist/provider/instrumentation.js.map +1 -1
  224. package/dist/provider/retry.d.ts.map +1 -1
  225. package/dist/provider/retry.js +13 -1
  226. package/dist/provider/retry.js.map +1 -1
  227. package/dist/public-runtime.d.ts +57 -24
  228. package/dist/public-runtime.d.ts.map +1 -1
  229. package/dist/public-runtime.js +42 -35
  230. package/dist/public-runtime.js.map +1 -1
  231. package/dist/public-tools.d.ts +1 -0
  232. package/dist/public-tools.d.ts.map +1 -1
  233. package/dist/public-tools.js +5 -0
  234. package/dist/public-tools.js.map +1 -1
  235. package/dist/public-types.d.ts +33 -12
  236. package/dist/public-types.d.ts.map +1 -1
  237. package/dist/rag/embedding.d.ts +8 -3
  238. package/dist/rag/embedding.d.ts.map +1 -1
  239. package/dist/rag/embedding.js +120 -9
  240. package/dist/rag/embedding.js.map +1 -1
  241. package/dist/rag/index.d.ts +1 -1
  242. package/dist/rag/index.d.ts.map +1 -1
  243. package/dist/rag/index.js +1 -1
  244. package/dist/rag/index.js.map +1 -1
  245. package/dist/rag/ingestion.d.ts +2 -2
  246. package/dist/rag/ingestion.d.ts.map +1 -1
  247. package/dist/rag/ingestion.js +15 -3
  248. package/dist/rag/ingestion.js.map +1 -1
  249. package/dist/rag/knowledge-base.d.ts +3 -3
  250. package/dist/rag/knowledge-base.d.ts.map +1 -1
  251. package/dist/rag/knowledge-base.js +8 -4
  252. package/dist/rag/knowledge-base.js.map +1 -1
  253. package/dist/rag/operation.d.ts +10 -0
  254. package/dist/rag/operation.d.ts.map +1 -0
  255. package/dist/rag/operation.js +26 -0
  256. package/dist/rag/operation.js.map +1 -0
  257. package/dist/rag/rag-tool.d.ts.map +1 -1
  258. package/dist/rag/rag-tool.js +6 -3
  259. package/dist/rag/rag-tool.js.map +1 -1
  260. package/dist/rag/retriever.d.ts +2 -2
  261. package/dist/rag/retriever.d.ts.map +1 -1
  262. package/dist/rag/retriever.js +31 -15
  263. package/dist/rag/retriever.js.map +1 -1
  264. package/dist/rag/vector-store.d.ts +3 -3
  265. package/dist/rag/vector-store.d.ts.map +1 -1
  266. package/dist/rag/vector-store.js +4 -2
  267. package/dist/rag/vector-store.js.map +1 -1
  268. package/dist/registry/command/kernel-commands.d.ts +16 -4
  269. package/dist/registry/command/kernel-commands.d.ts.map +1 -1
  270. package/dist/registry/command/kernel-commands.js +171 -0
  271. package/dist/registry/command/kernel-commands.js.map +1 -1
  272. package/dist/run/reporter.d.ts.map +1 -1
  273. package/dist/run/reporter.js +9 -0
  274. package/dist/run/reporter.js.map +1 -1
  275. package/dist/run-query/index.d.ts +15 -1
  276. package/dist/run-query/index.d.ts.map +1 -1
  277. package/dist/run-query/index.js +69 -15
  278. package/dist/run-query/index.js.map +1 -1
  279. package/dist/runtime/query/context.d.ts.map +1 -1
  280. package/dist/runtime/query/context.js +10 -3
  281. package/dist/runtime/query/context.js.map +1 -1
  282. package/dist/runtime/query/executor.d.ts +3 -0
  283. package/dist/runtime/query/executor.d.ts.map +1 -1
  284. package/dist/runtime/query/executor.js +80 -18
  285. package/dist/runtime/query/executor.js.map +1 -1
  286. package/dist/runtime/query/guard.d.ts +9 -0
  287. package/dist/runtime/query/guard.d.ts.map +1 -1
  288. package/dist/runtime/query/guard.js +11 -0
  289. package/dist/runtime/query/guard.js.map +1 -1
  290. package/dist/runtime/query/index.d.ts +30 -1
  291. package/dist/runtime/query/index.d.ts.map +1 -1
  292. package/dist/runtime/query/index.js +548 -95
  293. package/dist/runtime/query/index.js.map +1 -1
  294. package/dist/runtime/query/iteration/index.d.ts.map +1 -1
  295. package/dist/runtime/query/iteration/index.js +74 -14
  296. package/dist/runtime/query/iteration/index.js.map +1 -1
  297. package/dist/runtime/query/iteration/phases/compaction.d.ts.map +1 -1
  298. package/dist/runtime/query/iteration/phases/compaction.js +94 -53
  299. package/dist/runtime/query/iteration/phases/compaction.js.map +1 -1
  300. package/dist/runtime/query/iteration/phases/context.d.ts +3 -0
  301. package/dist/runtime/query/iteration/phases/context.d.ts.map +1 -1
  302. package/dist/runtime/query/iteration/phases/context.js.map +1 -1
  303. package/dist/runtime/query/iteration/phases/tool-review.d.ts.map +1 -1
  304. package/dist/runtime/query/iteration/phases/tool-review.js +21 -0
  305. package/dist/runtime/query/iteration/phases/tool-review.js.map +1 -1
  306. package/dist/runtime/query/iteration/stream-turn.d.ts.map +1 -1
  307. package/dist/runtime/query/iteration/stream-turn.js +4 -0
  308. package/dist/runtime/query/iteration/stream-turn.js.map +1 -1
  309. package/dist/runtime/query/project-instructions.d.ts +69 -0
  310. package/dist/runtime/query/project-instructions.d.ts.map +1 -0
  311. package/dist/runtime/query/project-instructions.js +137 -0
  312. package/dist/runtime/query/project-instructions.js.map +1 -0
  313. package/dist/runtime/query/request-rich-content.d.ts +22 -0
  314. package/dist/runtime/query/request-rich-content.d.ts.map +1 -0
  315. package/dist/runtime/query/request-rich-content.js +122 -0
  316. package/dist/runtime/query/request-rich-content.js.map +1 -0
  317. package/dist/runtime/query/result.d.ts.map +1 -1
  318. package/dist/runtime/query/result.js +12 -1
  319. package/dist/runtime/query/result.js.map +1 -1
  320. package/dist/runtime/query/resume-pending.d.ts.map +1 -1
  321. package/dist/runtime/query/resume-pending.js +19 -20
  322. package/dist/runtime/query/resume-pending.js.map +1 -1
  323. package/dist/runtime/query/resume-run.d.ts.map +1 -1
  324. package/dist/runtime/query/resume-run.js +54 -8
  325. package/dist/runtime/query/resume-run.js.map +1 -1
  326. package/dist/runtime/query/run-state.d.ts +5 -0
  327. package/dist/runtime/query/run-state.d.ts.map +1 -1
  328. package/dist/runtime/query/run-state.js +6 -1
  329. package/dist/runtime/query/run-state.js.map +1 -1
  330. package/dist/runtime/query/sandbox-lifecycle.d.ts +54 -0
  331. package/dist/runtime/query/sandbox-lifecycle.d.ts.map +1 -0
  332. package/dist/runtime/query/sandbox-lifecycle.js +167 -0
  333. package/dist/runtime/query/sandbox-lifecycle.js.map +1 -0
  334. package/dist/sandbox/isolation.d.ts.map +1 -1
  335. package/dist/sandbox/isolation.js +9 -0
  336. package/dist/sandbox/isolation.js.map +1 -1
  337. package/dist/sandbox/provider/local.d.ts +56 -6
  338. package/dist/sandbox/provider/local.d.ts.map +1 -1
  339. package/dist/sandbox/provider/local.js +181 -76
  340. package/dist/sandbox/provider/local.js.map +1 -1
  341. package/dist/sandbox/terminal.d.ts +13 -5
  342. package/dist/sandbox/terminal.d.ts.map +1 -1
  343. package/dist/sandbox/terminal.js +11 -3
  344. package/dist/sandbox/terminal.js.map +1 -1
  345. package/dist/session/errors.d.ts +28 -29
  346. package/dist/session/errors.d.ts.map +1 -1
  347. package/dist/session/errors.js +28 -29
  348. package/dist/session/errors.js.map +1 -1
  349. package/dist/session/handoff/broadcast.d.ts +5 -8
  350. package/dist/session/handoff/broadcast.d.ts.map +1 -1
  351. package/dist/session/handoff/broadcast.js +16 -6
  352. package/dist/session/handoff/broadcast.js.map +1 -1
  353. package/dist/session/handoff/single.d.ts +5 -8
  354. package/dist/session/handoff/single.d.ts.map +1 -1
  355. package/dist/session/handoff/single.js +7 -4
  356. package/dist/session/handoff/single.js.map +1 -1
  357. package/dist/store/attachment/index.d.ts +11 -3
  358. package/dist/store/attachment/index.d.ts.map +1 -1
  359. package/dist/store/attachment/index.js +49 -4
  360. package/dist/store/attachment/index.js.map +1 -1
  361. package/dist/store/feedback/conformance.d.ts.map +1 -1
  362. package/dist/store/feedback/conformance.js +32 -0
  363. package/dist/store/feedback/conformance.js.map +1 -1
  364. package/dist/store/feedback/disk.d.ts +8 -6
  365. package/dist/store/feedback/disk.d.ts.map +1 -1
  366. package/dist/store/feedback/disk.js +111 -76
  367. package/dist/store/feedback/disk.js.map +1 -1
  368. package/dist/store/goal/index.d.ts +111 -0
  369. package/dist/store/goal/index.d.ts.map +1 -0
  370. package/dist/store/goal/index.js +436 -0
  371. package/dist/store/goal/index.js.map +1 -0
  372. package/dist/store/index.d.ts +1 -1
  373. package/dist/store/index.d.ts.map +1 -1
  374. package/dist/store/index.js +1 -1
  375. package/dist/store/index.js.map +1 -1
  376. package/dist/store/kv/revision-record-store.d.ts +70 -0
  377. package/dist/store/kv/revision-record-store.d.ts.map +1 -0
  378. package/dist/store/kv/revision-record-store.js +290 -0
  379. package/dist/store/kv/revision-record-store.js.map +1 -0
  380. package/dist/store/memory/disk.d.ts +9 -7
  381. package/dist/store/memory/disk.d.ts.map +1 -1
  382. package/dist/store/memory/disk.js +256 -98
  383. package/dist/store/memory/disk.js.map +1 -1
  384. package/dist/store/run/disk.d.ts +10 -2
  385. package/dist/store/run/disk.d.ts.map +1 -1
  386. package/dist/store/run/disk.js +70 -4
  387. package/dist/store/run/disk.js.map +1 -1
  388. package/dist/store/run/memory.d.ts +4 -2
  389. package/dist/store/run/memory.d.ts.map +1 -1
  390. package/dist/store/run/memory.js +15 -1
  391. package/dist/store/run/memory.js.map +1 -1
  392. package/dist/store/session/disk.d.ts +9 -0
  393. package/dist/store/session/disk.d.ts.map +1 -1
  394. package/dist/store/session/disk.js +57 -5
  395. package/dist/store/session/disk.js.map +1 -1
  396. package/dist/store/session/memory.d.ts +1 -0
  397. package/dist/store/session/memory.d.ts.map +1 -1
  398. package/dist/store/session/memory.js +14 -0
  399. package/dist/store/session/memory.js.map +1 -1
  400. package/dist/store/topic/memory.d.ts +1 -2
  401. package/dist/store/topic/memory.d.ts.map +1 -1
  402. package/dist/store/topic/memory.js +4 -5
  403. package/dist/store/topic/memory.js.map +1 -1
  404. package/dist/store/topic/objective.d.ts +8 -4
  405. package/dist/store/topic/objective.d.ts.map +1 -1
  406. package/dist/store/topic/objective.js +185 -100
  407. package/dist/store/topic/objective.js.map +1 -1
  408. package/dist/store/topic/state.d.ts +1 -2
  409. package/dist/store/topic/state.d.ts.map +1 -1
  410. package/dist/store/topic/state.js +50 -62
  411. package/dist/store/topic/state.js.map +1 -1
  412. package/dist/tools/builtins/bash.d.ts.map +1 -1
  413. package/dist/tools/builtins/bash.js +20 -0
  414. package/dist/tools/builtins/bash.js.map +1 -1
  415. package/dist/tools/builtins/computer-use.d.ts +9 -1
  416. package/dist/tools/builtins/computer-use.d.ts.map +1 -1
  417. package/dist/tools/builtins/computer-use.js.map +1 -1
  418. package/dist/tools/builtins/content-fingerprint.d.ts +8 -7
  419. package/dist/tools/builtins/content-fingerprint.d.ts.map +1 -1
  420. package/dist/tools/builtins/content-fingerprint.js +9 -10
  421. package/dist/tools/builtins/content-fingerprint.js.map +1 -1
  422. package/dist/tools/builtins/edit.d.ts +6 -1
  423. package/dist/tools/builtins/edit.d.ts.map +1 -1
  424. package/dist/tools/builtins/edit.js +166 -27
  425. package/dist/tools/builtins/edit.js.map +1 -1
  426. package/dist/tools/builtins/write-file.d.ts.map +1 -1
  427. package/dist/tools/builtins/write-file.js +45 -19
  428. package/dist/tools/builtins/write-file.js.map +1 -1
  429. package/dist/tools/command-arguments.d.ts +43 -0
  430. package/dist/tools/command-arguments.d.ts.map +1 -0
  431. package/dist/tools/command-arguments.js +52 -0
  432. package/dist/tools/command-arguments.js.map +1 -0
  433. package/dist/tools/coordinator/index.d.ts +2 -0
  434. package/dist/tools/coordinator/index.d.ts.map +1 -1
  435. package/dist/tools/coordinator/index.js +3 -1
  436. package/dist/tools/coordinator/index.js.map +1 -1
  437. package/dist/tools/defineTool.d.ts +10 -0
  438. package/dist/tools/defineTool.d.ts.map +1 -1
  439. package/dist/tools/defineTool.js +1 -0
  440. package/dist/tools/defineTool.js.map +1 -1
  441. package/dist/tools/env-scrub.d.ts +7 -5
  442. package/dist/tools/env-scrub.d.ts.map +1 -1
  443. package/dist/tools/env-scrub.js +7 -5
  444. package/dist/tools/env-scrub.js.map +1 -1
  445. package/dist/tools/goal/index.d.ts +20 -0
  446. package/dist/tools/goal/index.d.ts.map +1 -0
  447. package/dist/tools/goal/index.js +104 -0
  448. package/dist/tools/goal/index.js.map +1 -0
  449. package/dist/tools/memory/index.d.ts +16 -0
  450. package/dist/tools/memory/index.d.ts.map +1 -1
  451. package/dist/tools/memory/index.js +6 -2
  452. package/dist/tools/memory/index.js.map +1 -1
  453. package/dist/tools/memory/search.d.ts +4 -1
  454. package/dist/tools/memory/search.d.ts.map +1 -1
  455. package/dist/tools/memory/search.js +10 -2
  456. package/dist/tools/memory/search.js.map +1 -1
  457. package/dist/types/agent/base.d.ts +11 -3
  458. package/dist/types/agent/base.d.ts.map +1 -1
  459. package/dist/types/agent/factory.d.ts +2 -0
  460. package/dist/types/agent/factory.d.ts.map +1 -1
  461. package/dist/types/agent/reactive.d.ts +2 -0
  462. package/dist/types/agent/reactive.d.ts.map +1 -1
  463. package/dist/types/agent/supervisor.d.ts +6 -0
  464. package/dist/types/agent/supervisor.d.ts.map +1 -1
  465. package/dist/types/agent/task.d.ts +6 -2
  466. package/dist/types/agent/task.d.ts.map +1 -1
  467. package/dist/types/connector/core.d.ts +13 -8
  468. package/dist/types/connector/core.d.ts.map +1 -1
  469. package/dist/types/connector/definition.d.ts +37 -18
  470. package/dist/types/connector/definition.d.ts.map +1 -1
  471. package/dist/types/connector/http.d.ts +6 -0
  472. package/dist/types/connector/http.d.ts.map +1 -1
  473. package/dist/types/connector/mcp.d.ts +24 -6
  474. package/dist/types/connector/mcp.d.ts.map +1 -1
  475. package/dist/types/connector/tenant.d.ts +17 -7
  476. package/dist/types/connector/tenant.d.ts.map +1 -1
  477. package/dist/types/connector/webhook.d.ts +6 -0
  478. package/dist/types/connector/webhook.d.ts.map +1 -1
  479. package/dist/types/goal/index.d.ts +46 -0
  480. package/dist/types/goal/index.d.ts.map +1 -0
  481. package/dist/types/goal/index.js +2 -0
  482. package/dist/types/goal/index.js.map +1 -0
  483. package/dist/types/ids/index.d.ts +2 -0
  484. package/dist/types/ids/index.d.ts.map +1 -1
  485. package/dist/types/ids/index.js.map +1 -1
  486. package/dist/types/message/index.d.ts +79 -13
  487. package/dist/types/message/index.d.ts.map +1 -1
  488. package/dist/types/message/index.js +49 -3
  489. package/dist/types/message/index.js.map +1 -1
  490. package/dist/types/plugin/index.d.ts +7 -5
  491. package/dist/types/plugin/index.d.ts.map +1 -1
  492. package/dist/types/plugin/index.js.map +1 -1
  493. package/dist/types/provider/chat.d.ts +27 -4
  494. package/dist/types/provider/chat.d.ts.map +1 -1
  495. package/dist/types/provider/index.d.ts +1 -1
  496. package/dist/types/provider/index.d.ts.map +1 -1
  497. package/dist/types/provider/interface.d.ts +18 -7
  498. package/dist/types/provider/interface.d.ts.map +1 -1
  499. package/dist/types/provider/model.d.ts +12 -0
  500. package/dist/types/provider/model.d.ts.map +1 -1
  501. package/dist/types/provider/stream.d.ts +6 -0
  502. package/dist/types/provider/stream.d.ts.map +1 -1
  503. package/dist/types/rag/embedding.d.ts +15 -2
  504. package/dist/types/rag/embedding.d.ts.map +1 -1
  505. package/dist/types/rag/ingestion.d.ts +2 -2
  506. package/dist/types/rag/ingestion.d.ts.map +1 -1
  507. package/dist/types/rag/knowledge-base.d.ts +3 -3
  508. package/dist/types/rag/knowledge-base.d.ts.map +1 -1
  509. package/dist/types/rag/retrieval.d.ts +2 -2
  510. package/dist/types/rag/retrieval.d.ts.map +1 -1
  511. package/dist/types/rag/scope.d.ts +4 -0
  512. package/dist/types/rag/scope.d.ts.map +1 -1
  513. package/dist/types/rag/vector.d.ts +5 -2
  514. package/dist/types/rag/vector.d.ts.map +1 -1
  515. package/dist/types/run/config.d.ts +20 -0
  516. package/dist/types/run/config.d.ts.map +1 -1
  517. package/dist/types/run/events.d.ts +25 -1
  518. package/dist/types/run/events.d.ts.map +1 -1
  519. package/dist/types/run/events.js.map +1 -1
  520. package/dist/types/run/metadata.d.ts +2 -0
  521. package/dist/types/run/metadata.d.ts.map +1 -1
  522. package/dist/types/run/step.d.ts +2 -6
  523. package/dist/types/run/step.d.ts.map +1 -1
  524. package/dist/types/run/step.js.map +1 -1
  525. package/dist/types/run/store.d.ts +55 -2
  526. package/dist/types/run/store.d.ts.map +1 -1
  527. package/dist/types/sandbox/index.d.ts +47 -6
  528. package/dist/types/sandbox/index.d.ts.map +1 -1
  529. package/dist/types/sandbox/index.js +23 -10
  530. package/dist/types/sandbox/index.js.map +1 -1
  531. package/dist/types/session/store.d.ts +13 -0
  532. package/dist/types/session/store.d.ts.map +1 -1
  533. package/dist/types/tool/index.d.ts +33 -11
  534. package/dist/types/tool/index.d.ts.map +1 -1
  535. package/dist/types/tool/index.js.map +1 -1
  536. package/dist/types/topic/entity.d.ts +3 -4
  537. package/dist/types/topic/entity.d.ts.map +1 -1
  538. package/dist/types/topic/store.d.ts +3 -3
  539. package/dist/utils/id.d.ts +3 -1
  540. package/dist/utils/id.d.ts.map +1 -1
  541. package/dist/utils/id.js +4 -0
  542. package/dist/utils/id.js.map +1 -1
  543. package/dist/utils/process-environment.d.ts +26 -0
  544. package/dist/utils/process-environment.d.ts.map +1 -0
  545. package/dist/utils/process-environment.js +78 -0
  546. package/dist/utils/process-environment.js.map +1 -0
  547. package/dist/vault/InMemoryCredentialVault.d.ts +2 -0
  548. package/dist/vault/InMemoryCredentialVault.d.ts.map +1 -1
  549. package/dist/vault/InMemoryCredentialVault.js +24 -4
  550. package/dist/vault/InMemoryCredentialVault.js.map +1 -1
  551. package/dist/vault/instrumentation.d.ts.map +1 -1
  552. package/dist/vault/instrumentation.js +15 -0
  553. package/dist/vault/instrumentation.js.map +1 -1
  554. package/package.json +1 -1
  555. package/src/advisory/executor.ts +4 -1
  556. package/src/agents/ReactiveAgent.ts +12 -0
  557. package/src/agents/RouterAgent.ts +25 -3
  558. package/src/agents/SupervisorAgent.ts +33 -11
  559. package/src/agents/runAgent.ts +38 -2
  560. package/src/authorization/command-line.ts +390 -0
  561. package/src/authorization/rules.ts +22 -1
  562. package/src/bridge/a2a/client.ts +384 -97
  563. package/src/bridge/a2a/mapper.ts +5 -0
  564. package/src/bridge/acp/server.ts +184 -42
  565. package/src/bridge/mcp/connector/adapter.ts +28 -20
  566. package/src/bridge/sse/mapper.ts +3 -0
  567. package/src/compaction/dangling.ts +203 -38
  568. package/src/compaction/index.ts +9 -2
  569. package/src/compaction/manual.ts +125 -18
  570. package/src/compaction/plan.ts +42 -11
  571. package/src/compaction/retention.ts +23 -8
  572. package/src/compaction/summary.ts +4 -4
  573. package/src/compaction/verifier.ts +66 -0
  574. package/src/connector/BaseConnector.ts +19 -4
  575. package/src/connector/builtins/http.ts +236 -46
  576. package/src/connector/builtins/webhook.ts +207 -47
  577. package/src/connector/execution-contract.ts +27 -0
  578. package/src/connector/http-operation.ts +238 -0
  579. package/src/connector/mcp/adapter.ts +8 -3
  580. package/src/connector/mcp/client.ts +207 -58
  581. package/src/connector/mcp/http-sse.ts +91 -23
  582. package/src/connector/mcp/prompt-adapter.ts +8 -2
  583. package/src/connector/mcp/stdio.ts +21 -46
  584. package/src/connector/mcp/streamable-http.ts +86 -22
  585. package/src/connector/tools/adapter.ts +23 -14
  586. package/src/connector/tools/definitions.ts +5 -2
  587. package/src/connector/tools/result.ts +21 -0
  588. package/src/connector/web/guarded-fetch.ts +188 -48
  589. package/src/constants/sandbox/index.ts +3 -2
  590. package/src/contracts/api.ts +2 -0
  591. package/src/contracts/schemas.ts +7 -0
  592. package/src/directory/derive-supervisor.ts +8 -0
  593. package/src/directory/derive.ts +8 -0
  594. package/src/directory/load.ts +2 -0
  595. package/src/directory/types.ts +4 -0
  596. package/src/eval/experiment.ts +160 -111
  597. package/src/eval/judge.ts +13 -2
  598. package/src/eval/types.ts +7 -1
  599. package/src/manager/agent/lifecycle.ts +28 -12
  600. package/src/manager/connector/environment.ts +3 -1
  601. package/src/manager/connector/lifecycle.ts +364 -24
  602. package/src/manager/connector/tenant.ts +56 -23
  603. package/src/manager/goal/activation.ts +52 -0
  604. package/src/manager/index.ts +10 -2
  605. package/src/manager/run/persistence.ts +6 -1
  606. package/src/manager/topic/dependency.ts +39 -0
  607. package/src/manager/topic/lifecycle.ts +19 -31
  608. package/src/plugin/index.ts +1 -0
  609. package/src/plugin/lifecycle.ts +180 -39
  610. package/src/plugin/loader.ts +70 -13
  611. package/src/provider/collect-chat-completion.ts +3 -0
  612. package/src/provider/fallback.ts +79 -11
  613. package/src/provider/idle-timeout.ts +143 -17
  614. package/src/provider/index.ts +2 -0
  615. package/src/provider/instrumentation.ts +1 -0
  616. package/src/provider/retry.ts +16 -1
  617. package/src/public-runtime.ts +190 -32
  618. package/src/public-tools.ts +5 -0
  619. package/src/public-types.ts +85 -11
  620. package/src/rag/embedding.ts +147 -19
  621. package/src/rag/index.ts +1 -1
  622. package/src/rag/ingestion.ts +16 -2
  623. package/src/rag/knowledge-base.ts +13 -4
  624. package/src/rag/operation.ts +28 -0
  625. package/src/rag/rag-tool.ts +6 -3
  626. package/src/rag/retriever.ts +62 -11
  627. package/src/rag/vector-store.ts +8 -2
  628. package/src/registry/command/kernel-commands.ts +223 -4
  629. package/src/run/reporter.ts +10 -0
  630. package/src/run-query/index.ts +84 -15
  631. package/src/runtime/query/context.ts +13 -3
  632. package/src/runtime/query/executor.ts +90 -17
  633. package/src/runtime/query/guard.ts +12 -0
  634. package/src/runtime/query/index.ts +652 -103
  635. package/src/runtime/query/iteration/index.ts +89 -13
  636. package/src/runtime/query/iteration/phases/compaction.ts +120 -55
  637. package/src/runtime/query/iteration/phases/context.ts +4 -0
  638. package/src/runtime/query/iteration/phases/tool-review.ts +28 -0
  639. package/src/runtime/query/iteration/stream-turn.ts +3 -0
  640. package/src/runtime/query/project-instructions.ts +212 -0
  641. package/src/runtime/query/request-rich-content.ts +153 -0
  642. package/src/runtime/query/result.ts +12 -1
  643. package/src/runtime/query/resume-pending.ts +20 -18
  644. package/src/runtime/query/resume-run.ts +52 -8
  645. package/src/runtime/query/run-state.ts +11 -1
  646. package/src/runtime/query/sandbox-lifecycle.ts +210 -0
  647. package/src/sandbox/isolation.ts +9 -0
  648. package/src/sandbox/provider/local.ts +255 -90
  649. package/src/sandbox/terminal.ts +13 -5
  650. package/src/session/errors.ts +68 -42
  651. package/src/session/handoff/broadcast.ts +20 -14
  652. package/src/session/handoff/single.ts +14 -13
  653. package/src/store/attachment/index.ts +65 -3
  654. package/src/store/feedback/conformance.ts +39 -0
  655. package/src/store/feedback/disk.ts +128 -82
  656. package/src/store/goal/index.ts +594 -0
  657. package/src/store/index.ts +1 -1
  658. package/src/store/kv/revision-record-store.ts +346 -0
  659. package/src/store/memory/disk.ts +288 -113
  660. package/src/store/run/disk.ts +96 -5
  661. package/src/store/run/memory.ts +22 -2
  662. package/src/store/session/disk.ts +93 -6
  663. package/src/store/session/memory.ts +22 -0
  664. package/src/store/topic/memory.ts +4 -5
  665. package/src/store/topic/objective.ts +215 -100
  666. package/src/store/topic/state.ts +100 -63
  667. package/src/tools/builtins/bash.ts +21 -0
  668. package/src/tools/builtins/computer-use.ts +9 -1
  669. package/src/tools/builtins/content-fingerprint.ts +9 -12
  670. package/src/tools/builtins/edit.ts +190 -27
  671. package/src/tools/builtins/write-file.ts +55 -19
  672. package/src/tools/command-arguments.ts +54 -0
  673. package/src/tools/coordinator/index.ts +4 -1
  674. package/src/tools/defineTool.ts +11 -0
  675. package/src/tools/env-scrub.ts +7 -5
  676. package/src/tools/goal/index.ts +129 -0
  677. package/src/tools/memory/index.ts +26 -3
  678. package/src/tools/memory/search.ts +20 -3
  679. package/src/types/agent/base.ts +12 -3
  680. package/src/types/agent/factory.ts +2 -0
  681. package/src/types/agent/reactive.ts +2 -0
  682. package/src/types/agent/supervisor.ts +6 -0
  683. package/src/types/agent/task.ts +6 -2
  684. package/src/types/connector/core.ts +13 -8
  685. package/src/types/connector/definition.ts +54 -20
  686. package/src/types/connector/http.ts +7 -0
  687. package/src/types/connector/mcp.ts +27 -6
  688. package/src/types/connector/tenant.ts +21 -7
  689. package/src/types/connector/webhook.ts +7 -0
  690. package/src/types/goal/index.ts +50 -0
  691. package/src/types/ids/index.ts +2 -0
  692. package/src/types/message/index.ts +147 -12
  693. package/src/types/plugin/index.ts +7 -5
  694. package/src/types/provider/chat.ts +35 -4
  695. package/src/types/provider/index.ts +1 -1
  696. package/src/types/provider/interface.ts +22 -7
  697. package/src/types/provider/model.ts +13 -0
  698. package/src/types/provider/stream.ts +6 -0
  699. package/src/types/rag/embedding.ts +16 -2
  700. package/src/types/rag/ingestion.ts +2 -1
  701. package/src/types/rag/knowledge-base.ts +7 -3
  702. package/src/types/rag/retrieval.ts +2 -1
  703. package/src/types/rag/scope.ts +5 -0
  704. package/src/types/rag/vector.ts +5 -2
  705. package/src/types/run/config.ts +20 -0
  706. package/src/types/run/events.ts +28 -3
  707. package/src/types/run/metadata.ts +2 -0
  708. package/src/types/run/step.ts +2 -7
  709. package/src/types/run/store.ts +60 -2
  710. package/src/types/sandbox/index.ts +57 -14
  711. package/src/types/session/store.ts +18 -0
  712. package/src/types/tool/index.ts +33 -11
  713. package/src/types/topic/entity.ts +3 -4
  714. package/src/types/topic/store.ts +3 -3
  715. package/src/utils/id.ts +6 -0
  716. package/src/utils/process-environment.ts +101 -0
  717. package/src/vault/InMemoryCredentialVault.ts +29 -4
  718. package/src/vault/instrumentation.ts +24 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,567 @@
1
1
  # Changelog
2
2
 
3
+ ## 31.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 77242a0: Expose optional per-model input modalities through `ModelInfo`, add inline image input for DeepSeek's vision preview while refusing images on text models and documents on every DeepSeek model, and label models whose listing explicitly advertises image input in the CLI picker.
8
+
9
+ ## 31.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - bebad69: Refuse host background jobs when a run is sandboxed.
14
+
15
+ `bash` previously sent foreground commands through `Sandbox.exec`, but sent the same command directly to a host-spawning `BackgroundJobRegistry` when `run_in_background: true`. A caller that supplied both `sandboxProvider` and `backgroundJobs` therefore exposed both capabilities to every tool, and one input boolean moved work outside the configured boundary.
16
+
17
+ Sandboxed tool contexts no longer receive the host background-job reference. `bash run_in_background` reports that the two capabilities cannot be composed, while foreground `bash` continues through the sandbox and unsandboxed runs can continue to use the registry.
18
+
19
+ **What breaks:** a run configured with both `sandboxProvider` and `backgroundJobs` can no longer start a background job. Omit `sandboxProvider` only when host execution is the intended policy, run the command in the foreground to keep the sandbox boundary, or provide a future persistent-process backend that owns confinement as well as lifetime.
20
+
21
+ - f3bf47b: Require every `PluginLifecycleManager` host to provide project and user
22
+ `scopeRoots`. Plugin installation now canonicalizes a candidate against that
23
+ declared filesystem authority, refuses symlinked or non-regular plugin
24
+ manifests, and keeps executable admission and lifecycle ownership private to
25
+ the manager instead of trusting mutable `PluginRegistry` records.
26
+
27
+ Hosts constructing the SDK manager must pass
28
+ `scopeRoots: { project: trustedWorkingDirectory, user: userHomeDirectory }`.
29
+ Move plugins under the matching root instead of relying on a symlink or an
30
+ out-of-scope registry record. The CLI applies those roots automatically and no
31
+ longer loads project or user plugins through links that leave the admitted
32
+ scope.
33
+
34
+ - 27667cc: Provider requests now limit accumulated inline user attachments and rich tool-result images/documents to 24 MiB by default. Over-budget requests replace the oldest payloads with model-visible markers without modifying `Run.messages`, durable history, checkpoints, or tool call/result identity. This changes the previous unbounded default; set `maxRequestRichContentBytes: 0` on the run or agent config to retain it. The effective value is persisted in run metadata, and `DEFAULT_MAX_REQUEST_RICH_CONTENT_BYTES` exposes the shipped default.
35
+ - fd5fcea: Bound sandbox lifecycle ownership across run cancellation and teardown.
36
+
37
+ Sandbox creation now receives run cancellation and the run's remaining wall-clock timeout, cannot publish a handle after either boundary wins, and releases any handle that arrives late. A setup that ignores its signal therefore settles the run with `stopReason: 'timeout'` instead of pinning it forever. Teardown receives a fresh signal and waits for 30 seconds by default without allowing an implementation that ignores cancellation to pin the run. Set `sandboxTeardownTimeoutMs: 0` on SDK runs or agents to retain the former unbounded teardown wait. Custom providers should honor `SandboxCreateConfig.signal` and `SandboxDestroyOptions.signal`; remote allocation protocols still need a client-owned reconciliation key or fleet reaper for a resource committed behind a lost response.
38
+
39
+ The CLI exposes the same compatibility control as `sandbox.teardownTimeoutMs` and carries it to live turns, delegated child agents, and durable resumes. Children and resumed runs now use the session's sandbox provider instead of silently executing through the host boundary; set `sandbox.enabled: false` only when host execution is intentional.
40
+
41
+ - f528acd: Make every disk-backed message-feedback update a real compare-and-set commit across concurrent processes, not only the first write.
42
+
43
+ `DiskMessageFeedbackStore` now publishes complete immutable owner-version files through exclusive hard links, lists committed values even when the best-effort legacy projection is absent or behind, reads previous single-file records forward, refuses damaged or mixed-version projection/head states, validates runtime id prefixes before callbacks, and confines run/message keys to injective filesystem segments. Distinct message ids whose previous lossy filenames collide no longer overwrite one projection.
44
+
45
+ **What breaks:** the disk feedback store now requires hard-link support and refuses unsupported filesystems instead of falling back to a racy update. Stop every process using an older SDK before opening a shared feedback root with this version; mixed-version rolling writers are unsupported. Calls that bypassed the branded types with a run or message id lacking its required prefix now reject before message validation or persistence.
46
+
47
+ - 0a7bd58: Make topic-state and objective revisions real compare-and-set commits across concurrent calls and processes.
48
+
49
+ The in-memory stores now keep each read/check/write in one JavaScript turn. The disk stores publish complete, immutable revision files through exclusive hard links, preserve the former single-file record as a forward-readable compatibility projection, reject damaged or mixed-version projection/head states, and encode opaque ids so they cannot escape the configured root. Cross-tenant mutations now reject with `TenantIsolationError` instead of treating a hidden record as absent, and objective `maxRounds` must be a positive safe integer.
50
+
51
+ **What breaks:** disk-backed topic stores now require hard-link support and refuse unsupported filesystems instead of degrading to a racy read-check-replace write. Stop every process using an older SDK before opening a shared store root with this version; mixed-version rolling writers are unsupported because the old implementation cannot see immutable revision commits. Callers that passed fractional, infinite, `NaN`, or unsafe `maxRounds` values must pass a positive safe integer, and callers performing cross-tenant mutations must handle `TenantIsolationError`.
52
+
53
+ - ce8cd61: Make registered connector methods the authoritative execution contract.
54
+
55
+ `ConnectorManager` now requires the registered definition and concrete
56
+ connector to expose the same unique method names, captures that definition at
57
+ instance admission, and refuses unknown methods or invalid input before
58
+ connector I/O. Input schemas use asynchronous parsing and their canonical
59
+ transformed value is passed to the connector exactly once. Successful outputs
60
+ are asynchronously validated and transformed when `outputSchema` is present;
61
+ an invalid or unprovable output is quarantined instead of reaching a caller,
62
+ tool result, MCP response, or later model request.
63
+
64
+ **What breaks:** connectors can no longer execute undeclared methods, consume
65
+ raw pre-transform input through `ConnectorManager`, return schema-invalid data
66
+ as success, or change a live instance's method surface by replacing its
67
+ registry entry. Align the concrete connector and registered definition before
68
+ creating an instance. Third-party `BaseConnector` subclasses that call
69
+ `validateInput` inside `execute` must change that call to
70
+ `await this.validateInput(method, input, options)` so a managed canonical value
71
+ is not parsed twice; standalone calls remain validated.
72
+
73
+ Per-method tools now keep their model-facing method schema separate from their
74
+ pass-through runtime decoder, and MCP projections carry connector output
75
+ schemas, including non-object JSON Schema values. `MCPToolDefinition.outputSchema`
76
+ therefore widens from object-only `MCPJsonSchema` to `MCPValueJsonSchema`.
77
+
78
+ - 2d16ca2: Isolate every live agent-client protocol session by identity, working
79
+ directory, cancellation and exact provider history.
80
+
81
+ **What breaks in the SDK:** one ACP session now permits only one unsettled
82
+ prompt, and session working directories must be absolute. Hosts that submitted
83
+ overlapping prompts under one id must wait, cancel, or use distinct sessions;
84
+ hosts that passed a relative `cwd` must resolve it first. Session creation and
85
+ loading also share one collision-refusing namespace, so loading or generating
86
+ an already open id no longer replaces its live record.
87
+
88
+ Gateways may return the settled conversation beside the stop reason so the next
89
+ prompt receives exact replay state. The CLI drives that seam with one runtime
90
+ session per wire id, activates trusted target config only at the first prompt,
91
+ routes events and permissions to the owning id, and closes late or connection-
92
+ owned sessions on teardown. Cancelling during lazy runtime construction now
93
+ settles the wire prompt immediately while retaining ownership of, and later
94
+ closing, any session candidate that arrives after cancellation.
95
+
96
+ - a3a632f: Stop delegated `SupervisorAgent` runs from publishing `ask_user_question`, including a host tool registered under the same name. Existing hosts that let child supervisors prompt an operator must route that decision through the root supervisor instead. Delegated runs still inherit `resumeHandler` for REVIEW-tier tool authorization; the change does not auto-approve child tool calls.
97
+
98
+ Make `AgentManager` authoritative for child `depth` and `parentRunId` after config builders and per-spawn overrides. Builders that deliberately replaced those lineage fields can no longer do so; derive child behavior from the manager-stamped lineage instead.
99
+
100
+ - 99ff79e: Stop exposing an unconfined host pseudo-terminal as a local sandbox capability.
101
+
102
+ `LocalSandboxProvider` previously implemented `Sandbox.openTerminal` by starting a host PTY in `rootDir`. That changed only the working directory: it bypassed the provider's selected isolation tier, accepted host process configuration, and was not owned or awaited by `Sandbox.destroy()`.
103
+
104
+ Local sandboxes no longer expose `openTerminal`. Supplying the legacy `LocalSandboxProviderOptions.ptyLoader` injection now fails with the boundary reason instead of accepting configuration the provider cannot honour. The option and the optional `Sandbox.openTerminal` member remain deprecated for a release window; the contract now requires an implementing backend to confine the complete terminal process tree and to kill and await it during `destroy()`.
105
+
106
+ **What breaks:** code that opened a terminal from `LocalSandboxProvider` must stop doing so. Use `loadPty` and `openTerminalWith` directly only when intentional host execution and externally owned teardown are correct, or provide a terminal backend that owns both confinement and the complete session lifetime. The generic helpers no longer claim to create a sandbox.
107
+
108
+ - 15f8ee4: Bound provider stream silence, including query-owned advisory calls and
109
+ RouterAgent routing decisions, compaction verifiers and model-graded eval
110
+ judges, to five minutes by default and abort the stalled provider transport,
111
+ with network-classified retry and fallback recovery where those policies
112
+ apply. This changes the previous default, under which a provider iterator could
113
+ remain silent forever. Set `streamIdleTimeoutMs: 0` on the run, agent, manual
114
+ compaction, verifier, or judge config to keep the old unbounded behavior, or set
115
+ a positive millisecond value to choose a different bound.
116
+
117
+ Queries whose caller signal is already aborted now settle as cancelled before
118
+ starting provider, provider-metadata, or tool work. A later cancellation also
119
+ settles while an optional context-window resolver remains pending, even when
120
+ that resolver ignores its signal. With no caller cancellation, `timeoutMs`
121
+ bounds the optional metadata lookup, aborts its private transport signal, and
122
+ falls back to the static context-window table instead of blocking the run.
123
+
124
+ The OpenRouter context-window lookup now forwards cancellation to its model-list
125
+ transport. Only fulfilled listings are cached, so cancelling one concurrent
126
+ query cannot abort another query's shared metadata request or force that query
127
+ onto the static context-window table.
128
+
129
+ `runExperiment({ timeoutMs })` now applies one validated wall-clock deadline to
130
+ both case execution and scoring. Scorers receive its optional cancellation
131
+ signal; a non-cooperative scorer is detached, and `judgeScorer` forwards the
132
+ signal to its bounded provider transport. Values outside the positive platform
133
+ timer range are refused before a case starts; omit the field for the prior
134
+ unbounded case behavior.
135
+
136
+ Compaction verification inside a query now carries the run cancellation cause
137
+ to its provider transport without placing a second idle timer around retry and
138
+ fallback. Public `buildVerifiedSummary`, `compactNow`, and `compactRegion`
139
+ calls bound raw provider silence themselves and accept optional `signal` and
140
+ `streamIdleTimeoutMs`; malformed values and pre-cancelled manual work are
141
+ refused before provider work or a no-op result.
142
+
143
+ HTTP embedding batches now have a 30-second whole-request default, including
144
+ response-body reads, where the previous default could wait forever. Set
145
+ `requestTimeoutMs: 0` on `HttpEmbeddingProvider` to keep the former unbounded
146
+ behavior. Invalid timeout values and non-positive or fractional `batchSize`
147
+ or `dimensions` values are refused at construction instead of silently
148
+ disabling the bound or entering a non-progressing batch loop. Successful HTTP
149
+ responses must contain exactly one unique, in-range result per input and finite
150
+ vectors of the configured dimension; malformed or incomplete batches are
151
+ refused atomically instead of reaching ingestion with missing embeddings.
152
+
153
+ Public RAG operations accept optional cancellation context. The shipped
154
+ `knowledge_search` tool forwards its run-owned signal through
155
+ `KnowledgeBase`, retrieval or ingestion, and the embedding provider. The HTTP
156
+ provider preserves the caller's exact cancellation reason while aborting only
157
+ its private fetch transport. Custom embedding providers receive the signal as
158
+ a cooperative request; callers still own their wait boundary if a custom
159
+ implementation ignores it. Default retrieval and ingestion recheck authority
160
+ after that custom call settles, so a late result cannot start a vector search
161
+ or persist chunks after cancellation. `VectorStore.search` and `upsert` now
162
+ receive the same optional operation context. The default pipelines also race
163
+ those store promises against cancellation, so a non-cooperative custom store
164
+ cannot leave the public query or ingestion call pending forever.
165
+
166
+ A2A agent-card discovery now has a 30-second whole fetch-and-body default and
167
+ accepts an optional caller signal and `timeoutMs`; set `timeoutMs: 0` to retain
168
+ the former unbounded behavior. `A2ADelegate.timeoutMs` now starts before
169
+ `message/send` and bounds the whole delegation instead of polling only. A
170
+ pre-cancelled dispatch starts no remote work, pending fetch and body promises
171
+ cannot hold `waitForTask`, and caller cancellation preserves its exact cause on
172
+ the private transport. Poll and delegation timers are validated at
173
+ construction. Once a safe task id exists, cancellation or timeout sends one
174
+ independently bounded `tasks/cancel`; during initial task creation the client
175
+ keeps a short cleanup grace and explicitly reports an unknown remote outcome if
176
+ the peer never returns an addressable id. Poll replies are bound to that initial
177
+ id, and transport or protocol failures after it is known make the same bounded
178
+ cleanup attempt before the original failure is returned. An `input-required`
179
+ task is also bounded-cancelled before the delegate reports that it cannot
180
+ supply the requested input.
181
+
182
+ Connector execution now carries optional operation authority through the
183
+ manager, every connector-tool adapter, real query runs, tenant/environment
184
+ facades, health checks, and `MCPConnectorBridge.callTool`. Custom connectors
185
+ receive the signal; if they ignore it, the manager settles with an honest
186
+ unknown remote outcome and rejects a late success that does not identify a
187
+ received response. A tenant call cancelled before admission no longer spends a
188
+ rate-limit slot.
189
+
190
+ `HttpConnector` and `WebhookConnector` now apply one validated 30-second
191
+ fetch-and-body deadline and a streaming 2 MiB response limit by default. Set
192
+ positive `timeoutMs` and `maxResponseBytes` values to choose different bounds.
193
+ Cancellation, deadline, or response-size failure aborts only the private
194
+ transport/body reader and preserves the caller's exact cause. Result metadata
195
+ distinguishes `not_started`, `unknown`, and `response_received`, includes retry
196
+ safety, and keeps a received status visible when its body is unavailable.
197
+
198
+ Dynamic HTTP paths and webhook URL overrides must remain on the configured
199
+ origin. Model-authored routing headers are refused, redirects are not followed,
200
+ and 3xx responses are no longer reported as success. Configure a separate
201
+ connector instance for each authorized origin; callers that previously used a
202
+ cross-origin webhook override must migrate to that instance.
203
+
204
+ `GuardedFetchProvider` now applies one validated 30-second deadline across DNS
205
+ resolution, every manually admitted redirect fetch, and the final response
206
+ body, while preserving a caller's exact cancellation cause on a private
207
+ transport signal. Its 2 MiB default response cap is enforced from streamed
208
+ bytes rather than after `response.text()` allocates the whole body; overflow
209
+ cancels the reader and returns a valid UTF-8 prefix. Redirect bodies are
210
+ cancelled when abandoned, and a spent redirect budget causes no DNS lookup for
211
+ the next target. Set positive `timeoutMs` and `maxBytes` values or a
212
+ non-negative integer `maxRedirects` to choose other bounds. Custom
213
+ `GuardedFetchConfig.resolve` functions may now accept the operation signal as
214
+ a second argument. IPv4-mapped IPv6 literals are canonicalized back to their
215
+ IPv4 address before range checks, closing the hexadecimal mapped loopback and
216
+ link-local bypass; the full IPv6 link-local and multicast ranges are also
217
+ refused.
218
+
219
+ MCP request methods now accept optional cancellation authority, and generated
220
+ MCP tool and prompt adapters forward the run-owned tool signal. A pre-aborted
221
+ request starts no transport work; a pending request preserves the caller's
222
+ exact cause, aborts a private transport, removes its correlated pending id, and
223
+ makes a one-second best-effort `notifications/cancelled` attempt. The
224
+ notification does not prove that an already-started remote side effect stopped.
225
+ Paged list calls recheck the same signal before each page.
226
+
227
+ `MCPClient.requestTimeoutMs` and HTTP MCP transport `timeoutMs` values must now
228
+ be positive platform-range integers. A shorter transport deadline remains a
229
+ request-timeout terminal and emits the same correlated cancellation. HTTP
230
+ fetches and response-body reads share operation authority; disconnect owns
231
+ active requests and cancellation cleanup. Reconnects fence late POST responses
232
+ and SSE batches from prior generations, clear Streamable session state, and
233
+ accept session ids only from successful `initialize` responses. Per-send
234
+ failure no longer marks a Streamable client connection-wide errored or rejects
235
+ unrelated concurrent calls. `MCPTransport.send` now accepts optional
236
+ `MCPTransportSendOptions`; custom transports should refuse pre-aborted work and
237
+ stop their per-send I/O when its signal fires.
238
+
239
+ Provider model listings and credential probes now accept optional cancellation
240
+ signals. Retry, fallback, stream-idle and instrumentation decorators preserve
241
+ that authority, and every bundled CLI driver forwards it to the underlying
242
+ transport where supported or refuses a result that arrived after cancellation.
243
+ Existing zero-argument provider implementations remain valid.
244
+
245
+ The interactive provider picker now cancels model discovery, credential checks
246
+ and subscription sign-in when the operator backs out, supersedes the work, or
247
+ leaves the screen. Late results cannot reopen an old model step, accept a
248
+ credential, re-probe the application, or persist a subscription credential
249
+ after cancellation. Model listing and credential probing both settle after a
250
+ three-second bound even when a custom provider ignores its signal.
251
+
252
+ Between-turn and durable-resume subscription refreshes now settle on caller
253
+ cancellation and apply one 30-second bound across the token request and response
254
+ body. Refreshes in one session are serialized and re-read their source at the
255
+ head of the queue, preventing a later stale caller from downgrading a token
256
+ published by an earlier one. Namzu's credential file uses an exact conditional
257
+ replacement under a cross-process, atomically published lock; an external
258
+ rotation or logout wins, and an uncertain publication refuses instead of using
259
+ an uncommitted refresh. Borrowed macOS Keychain credentials are read-only: a
260
+ changed or removed entry wins, and a successful refresh of an unchanged entry
261
+ remains session-local.
262
+
263
+ - 317360a: `WriteFileTool` now refuses an existing file whose complete body differs from the exact body captured by the run's `FileReadTracker`, instead of silently replacing that newer body. Read the file again and recompute the full replacement before retrying. Hosts that implement only the older boolean read tracker retain their previous behavior; the guard is an admission-time preflight and does not claim cross-process compare-and-swap publication.
264
+ - 192d90e: Make connector credentials tenant- and connector-authorized instead of
265
+ globally authorized by credential id. Custom `CredentialVault`
266
+ implementations must add atomic `retrieveForScope(tenantId, connectorId, id)`
267
+ and `revokeForTenant(tenantId, id)` operations; keep `retrieve(id)` and
268
+ `revoke(id)` only for callers that intentionally hold host-wide vault
269
+ authority. `TenantConnectorManager.revokeCredential` now requires `tenantId`,
270
+ and credential plus connector-instance identity fields are readonly snapshots.
271
+
272
+ `ConnectorDefinition.supportedAuth` is now enforced. Align a concrete
273
+ connector's declaration with its registered definition, include `none` when an
274
+ unauthenticated connection is valid, and declare every scheme it can consume.
275
+ Unsupported explicit credentials are refused before instance publication and
276
+ late credentials are rechecked before connection. Existing live instances keep
277
+ the auth policy captured at creation instead of following later registry
278
+ replacement.
279
+
280
+ - 1792bcb: `argument_pattern` reads a command line as the commands it runs, not as one string
281
+
282
+ An anchored pattern was tested against the argument's whole value, so a rule
283
+ matching `^git push` saw `git push origin main` and did not see
284
+ `true; git push origin main`. A rule that fails to match reaches the permission
285
+ mode, and a run with no terminal resolves that to `auto` — so an operator's
286
+ prohibition was bypassed by typing four characters in front of it, in exactly
287
+ the unattended case the prohibition exists for. The `bash` tool's own
288
+ description tells the model to use `&&` / `;` chaining, so the evading form is
289
+ the documented one rather than an exotic input.
290
+
291
+ The rule now decomposes the value into its commands — chain operators, subshell
292
+ grouping and a nested `sh -c` payload, with quoting respected — and the two
293
+ decisions read that decomposition differently:
294
+
295
+ - `deny` matches when **any** command on the line matches.
296
+ - `allow` matches only when **every** command on the line matches, and never
297
+ when the line runs something the decomposition cannot see (`$(…)`, backticks,
298
+ `<(…)`, `eval`).
299
+
300
+ **What breaks.** An `allow` rule stops approving a chain that carries a command
301
+ it does not name: `git status && rm -rf ~` was approved by a rule written for
302
+ `^git status` and is now left undecided, falling through to the permission mode.
303
+ A `deny` rule refuses more than it used to, which is the change it exists for.
304
+ To keep a compound line approved, write a pattern that matches every command on
305
+ it, or approve the tool by name.
306
+
307
+ A value with no chain operator, no nested shell and nothing opaque is matched
308
+ exactly as before, byte for byte, so rules about a path, a URL or a number are
309
+ unaffected.
310
+
311
+ `ToolDefinition` and `defineTool` gain an optional `commandArgument`, naming the
312
+ argument that holds a command line — `bash` declares `command`. A host
313
+ compiling operator permissions has a tool name and needs an argument to attach a
314
+ pattern to, and every other way of learning that is a list elsewhere that
315
+ drifts. `builtinCommandArguments()` and `commandArgumentOf()` read it back.
316
+
317
+ - 095c936: Use Topic terminology across the public lifecycle authority and its rejection shapes.
318
+
319
+ **What breaks:** `TopicManager`, `InMemoryTopicStore`, `AgentManager`, and the handoff helpers now reject with `TopicArchivedError`, `TopicNotEmptyError`, and `StaleTopicError`. Their `error.name`, message, JSON serialization, and structured details use Topic vocabulary; replace `details.threadId` with `details.topicId` and branch on the new classes exported from `@namzu/sdk`.
320
+
321
+ Inject the lifecycle authority through the canonical `topicManager` dependency key. The deprecated `threadManager` key remains accepted for a migration window, but supplying two different manager instances is now refused instead of choosing one implicitly.
322
+
323
+ - bf26200: Make a run's surviving messages readable and bind their publication to the durable event log.
324
+
325
+ `RunStore.readMessages()` is now required and returns an explicit `RunMessageSnapshot`: `available` includes the messages and the event sequence they were published through, `unavailable` means no snapshot was published, and `legacy-unverified` preserves access to older raw arrays without claiming which log head they represent. The built-in disk and memory stores implement the same contract, and `readRunMessagesIn(runDir)` reads a disk snapshot without creating a run directory.
326
+
327
+ `RunQuery.fullTranscript()` can now read the surviving snapshot from its bound store when the caller omits the message argument. It combines that verified snapshot with durable `compaction_shed` records and refuses with `RunTranscriptUnavailableError` when publication was interrupted, the snapshot is legacy-unverified, or a resumed run has advanced beyond the snapshot boundary. A missing file is never reported as an empty conversation.
328
+
329
+ **What breaks:** custom `RunStore` implementations must add `readMessages()` and change `writeMessages(run)` to `writeMessages(run, throughEventSeq)`. Return `unavailable` until a write has actually published the snapshot; do not use an available empty list for missing data. Code that reads the built-in `messages.json` directly must migrate from the former raw array to the versioned `{ format, throughEventSeq, messages }` envelope, or call `readRunMessagesIn`. Older raw-array files remain readable as `legacy-unverified` but cannot support a complete-transcript claim.
330
+
331
+ ### Minor Changes
332
+
333
+ - 777b444: Bind stored image and document resolution to the run's caller signal. A pre-cancelled run now starts no attachment-store or provider work, and a store that ignores cancellation can no longer hold the run open or publish bytes after authority is withdrawn. Cancelled runs retain the unresolved attachment references in their durable messages. Canonical resumes also retain the selected checkpoint's history and usage without rereading that checkpoint after cancellation.
334
+
335
+ Custom `AttachmentStore` implementations may accept the new optional `AttachmentOperationOptions` argument on `get` and should use its signal to stop owned I/O. Existing one-argument implementations remain compatible.
336
+
337
+ `resumeRun` now refuses contradictory run, session, topic, project, tenant, or explicit parent attribution before provider work instead of allowing checkpoint history to cross those boundaries. Its selected checkpoint also supplies the trace parent for a cancelled cross-process resume without a second checkpoint read.
338
+
339
+ - 780a471: Expand `ReasoningEffort` with `none`, `minimal`, and `ultra`, while making the vocabulary explicitly model-specific rather than a universal capability claim. The OpenAI Chat Completions driver now carries a requested effort to `reasoning_effort`, refuses levels outside each recognized model family's published set before transport, and exposes `openAIReasoningEffortLevels()` with an honest `undefined` result for unknown compatible-endpoint model ids.
340
+ - 74705e2: Add `/compact`, which shrinks a conversation when you ask rather than when a threshold decides.
341
+
342
+ The machinery already existed — `compactNow` is exported from `@namzu/sdk` and its comment says it is "compaction a host can ASK for" — and no host asked. A long session could only be compacted by crossing a token threshold mid-turn, which is the moment you least want a model call, or by clearing it and losing everything.
343
+
344
+ `/compact` summarises the older half and keeps the recent turns. What it does with the transcript is the part worth knowing: the transcript is **trimmed** to the surviving turns rather than rebuilt from the returned messages. The two are not the same list — the transcript also holds tool rows, per-tool glyphs and collapsed bodies the model never saw, and rebuilding would produce a correct conversation while erasing how the surviving turns looked. Tool rows belonging to a kept turn stay with it, because an answer on screen with no visible cause is worse than a longer transcript.
345
+
346
+ A conversation too short to shed anything says so instead of reporting a compaction that did not happen, and the summary is attached to the row as collapsible detail — it is what the model reads from here on, so it has to be inspectable.
347
+
348
+ `CompactNowInput` and `CompactionResult` are now exported from `@namzu/sdk`. `compactNow` was on the public surface and its parameter and return types were not, so the first host to call it had to inline the shapes.
349
+
350
+ - 45e8f56: Deprecate `ConnectorDefinition.triggers`, `ConnectorTrigger`, and
351
+ `ConnectorEvent`. The SDK has never subscribed to these declarations, emitted
352
+ their event shape, or started a run from them. Existing hosts may continue to
353
+ read trigger metadata back from `ConnectorRegistry` during this migration
354
+ release.
355
+
356
+ Move inbound subscription metadata and the event envelope into the host that
357
+ owns delivery before the next SDK major. That host must continue to own
358
+ de-duplication, claim recovery, trust, and run admission; registering a trigger
359
+ with Namzu does not activate an inbound event path.
360
+
361
+ - 3c61c94: Make manual compaction the conversation history used after the command, not only a transcript notice.
362
+
363
+ The CLI now sends the compaction summary on the next turn and restores the same compacted history through `/resume`. It waits for pending turn writes before atomically replacing the durable conversation projection, refuses to compact an active turn, and pauses input while the snapshot is owned. Expanded file mentions and image attachments also remain in later model requests instead of being rebuilt from their lossy transcript rows. `/clear` continues to clear only the visible transcript.
364
+
365
+ The SDK adds optional `SessionStore.replaceMessages` support to its memory and disk stores. The disk implementation keeps the physical message log append-only by writing one replacement record, then projects later reads from it. `isCompactionMessage` is now exported for hosts that restore summary rows in their own views.
366
+
367
+ - 924df56: `edit` can carry several replacements for one file, committed together
368
+
369
+ A change that spans four places in a file is one change, and sending it as four
370
+ calls makes it four. Each call is a fresh chance to stop halfway, and the file
371
+ left after the third succeeded and the fourth did not is in a state nobody wrote
372
+ and nobody is looking at — a rename applied at two of its five call sites
373
+ compiles nowhere and reads like a bug in the code rather than an unfinished
374
+ edit.
375
+
376
+ `edits` takes a list of `{old_string, new_string}` for one `path`:
377
+
378
+ ```json
379
+ {
380
+ "path": "src/user.ts",
381
+ "edits": [
382
+ { "old_string": "function getUser(", "new_string": "function loadUser(" },
383
+ { "old_string": "getUser(id)", "new_string": "loadUser(id)" }
384
+ ]
385
+ }
386
+ ```
387
+
388
+ Every entry is applied in memory, in order, against the content the entries
389
+ before it left — so a later one can target text an earlier one produced. The
390
+ file is written once, at the end, through the same atomic writer. If any entry
391
+ does not apply — not found, ambiguous, or a no-op — nothing is written at all
392
+ and the error names the entry by index, because by the time a later one fails
393
+ the string it wanted may have been consumed by an earlier one, and "not found"
394
+ alone sends the model to re-check the wrong hunk.
395
+
396
+ A call carrying both an `edits` list and a top-level `old_string` is refused
397
+ rather than resolved. That is two intentions in one object, and any precedence
398
+ would be a guess about which was meant, silently dropping an edit somebody
399
+ believes was made.
400
+
401
+ The guarantee is per file: `edits` names one `path`. Atomicity across several
402
+ files is not something this tool can enforce, so it is not offered.
403
+
404
+ Two fields became optional in the input type — the top-level `replace_all` and
405
+ each entry's — because `execute` takes the schema's output type and a defaulted
406
+ field is required of every hand-built call, including batch calls where the
407
+ top-level flag means nothing. The default is applied during normalization, so
408
+ behaviour is unchanged. `new_string` also left the model schema's `required`
409
+ list, the same trade `old_string` made when line insertion was added: which
410
+ fields a shape needs is decided by refinements that name what is missing.
411
+
412
+ - 94d3306: Add the chain-aware `reasoningEffortLevelsFor(model, thinking)` provider capability while retaining `effortLevelsFor` as a deprecated compatibility member. The four capability states now distinguish a driver with no menu, an unknown model, an explicitly unsupported model, and an exact selectable set; fallback chains expose only levels every reachable member accepts.
413
+
414
+ The TUI adds session-scoped `/effort [level|default]`, sends the selection to later main-query turns, and resets it atomically when a provider/model replacement succeeds. Failed or cancelled replacements preserve the current selection.
415
+
416
+ OpenAI publishes exact known-model menus and keeps unknown compatible-endpoint models unknown. DeepSeek explicitly publishes no supported levels. Anthropic now refuses unsupported effort levels before transport instead of silently dropping them; callers upgrading Anthropic must choose a level returned by `reasoningEffortLevelsFor()` or omit `effort` to retain the provider default.
417
+
418
+ - 45d7014: Export `isWorkingMemoryMessage` so hosts can preserve the kernel's state-bearing artifact ledger across fresh runs without copying its private sentinel or persisting the per-run system prompt floor.
419
+ - 99127d8: Expose unsupported document inputs through the public `capability_warning` run event before provider settlement. Consumers handling that event must accept the new `documents` capability value.
420
+
421
+ Render provider capability warnings in the interactive transcript, and pause already-queued follow-ups after a failed or abnormally stopped human turn until the operator submits a continuation or successfully changes provider/model.
422
+
423
+ - 7a45aa4: Add a Linux sandbox tier that actually confines the filesystem.
424
+
425
+ Until now the strongest tier a Linux host could get was `linux-namespace`, and `isolation.ts` has always said what that is worth: `{ filesystem: false, network: true, process: true }`. It unshares a mount namespace and never remounts, so the child still sees — and can write to — the whole host filesystem. `read`, `edit` and the code-navigation tools are path-contained by a shared helper, but a model-issued shell command is not, and no OS boundary stood behind it.
426
+
427
+ `linux-bwrap` is the tier that remounts. It builds a fresh mount table holding the sandbox root read-write, the system paths a binary needs read-only, a private `/proc`, `/dev` and `/tmp`, and nothing else. A host path is not unreadable, it is **absent** — `ENOENT`, not `EACCES` — which is the difference between a boundary and a permission bit. `--unshare-all` supplies the network and process controls in the same call, so all three rows of the tier's isolation report come from one spawn.
428
+
429
+ Detection prefers it and probes it the way the existing tier is probed: by running the real confinement, not by asking the binary its version. A host with `bwrap` present but unprivileged user namespaces disabled falls through to the weaker tier rather than claiming a control it cannot deliver — the rule `assertIsolation` already enforces.
430
+
431
+ The interpreter's own prefix is bound read-only, because a Node installed outside the distribution's packages is otherwise not there at all, and the failure reads as a broken command rather than as the sandbox working.
432
+
433
+ `SANDBOX_ENVIRONMENTS` is now exported: the tier list was spelled out by hand in a doctor test, which broke on the first tier added after it was written.
434
+
435
+ Nothing changes on macOS, where `macos-seatbelt` already reported `filesystem: true`, or on hosts without `bwrap`.
436
+
437
+ - 79faa99: Add a host-owned live project-instruction context to the SDK. Queries and all
438
+ agent front doors can rebuild a retained snapshot before the first provider
439
+ request, observe completed top-level and nested registry executions, and
440
+ durably replace that snapshot after a complete tool batch without creating a
441
+ human continuation. Callbacks receive the run cancellation signal and accepted
442
+ message prefix; each returned snapshot is committed before the next observation
443
+ begins, so cancellation retains accepted policy state while rejecting an
444
+ unfinished suffix. Project-instruction messages carry bounded canonical
445
+ project-relative `AGENTS.md` provenance and survive compaction.
446
+
447
+ BREAKING: the CLI now represents repository instructions as scoped, retained
448
+ conversation context instead of a frozen system-prompt block. Hosts that inspect
449
+ raw provider messages or persisted session history must handle the
450
+ `project-instructions` user-message source. This lets nested instructions take
451
+ effect during the session and lets reconstruction re-read current disk content
452
+ instead of replaying stale policy prose.
453
+
454
+ - 8de3582: Allow `PluginLifecycleManager.install()` to admit manifest-declared skills when the manager owns a `SkillRegistry`, so the supported `install → enable` lifecycle reaches the model without hosts fabricating registry records. `loadPluginManifest()` now accepts an optional, fail-closed `PluginEnablementCapabilities` argument for hosts that call the loader directly.
455
+ - 487ed4e: Repair provider-invalid tool history chronologically before the first model
456
+ call. Abandoned calls receive an explicit unknown-outcome error result while
457
+ checkpoint calls still owned by approval or crash recovery retain their exact
458
+ assistant state and execute only through that authority path. The SDK adds the
459
+ public `repairToolMessageHistory` projection and `message_history_repaired`
460
+ `RunEvent`; CLI transcripts surface the measured repair without exposing tool
461
+ content.
462
+ - c933952: Return exact verifier token usage from `compactNow` and `compactRegion`. Every non-null `CompactionResult` now includes `usage`; an all-zero record means the pass made no verifier request. Hosts that account for provider work should include this record in their own ledger.
463
+
464
+ After `/compact`, remove the old context-fill gauge only after the replacement conversation has been durably published. A pending or failed replacement keeps the old transcript and measurement; a successful replacement remains unmeasured until the next model request reports the new context size.
465
+
466
+ - fd280c0: Make the first structured-memory search after process startup see records that
467
+ were already persisted on disk.
468
+
469
+ `buildMemoryTools(store)` is a new store-authoritative composition whose
470
+ `search_memory` tool awaits the store's asynchronous `list()` boundary. This is
471
+ the default for lazy and disk-backed stores. The existing
472
+ `buildMemoryTools(store, index)` form remains index-authoritative and performs
473
+ no store read, preserving custom pre-populated or independently managed search
474
+ indexes.
475
+
476
+ The CLI now uses the store-authoritative form for both its main and delegated
477
+ agent registries, so a fresh session can recall prior run memories without an
478
+ unrelated read or write first warming the in-memory index.
479
+
480
+ - ee4fd1d: Persist provider-native reasoning state with the exact provider, model, and fallback-chain member that produced it. Same-route sessions now replay native reasoning after restart, `/resume`, and `/fork`; a model, provider, or member switch keeps portable assistant/tool history without sending foreign native reasoning metadata.
481
+
482
+ `@namzu/sdk` adds `ProviderRoute`, `AssistantMessageSource`, optional assistant source/replay fields, and the provider request/stream/response plumbing. Fallback and forced-final turns now attribute provenance and cost to the member that actually answered.
483
+
484
+ `@namzu/cli` preserves and validates the additive assistant source shape in stateless and durable history.
485
+
486
+ **What breaks in the drivers:** hand-built assistant reasoning and histories written by earlier versions do not carry a validated route-bound replay envelope, so they are no longer emitted as native `reasoning_content` or signed thinking. Their portable assistant text and tool exchanges remain available, but an upstream that requires native metadata for an old tool continuation may refuse that request; compact or start a fresh conversation before continuing such legacy history. Preserve the complete assistant message returned by new runs, including `source.replayState`. Direct callers of the exported DeepSeek `toDeepSeekMessages` converter must also pass the target `ProviderRoute` as its second argument.
487
+
488
+ - 143b8d9: Add session-owned durable completion goals, direct `/goal` operator control,
489
+ and race-fenced automatic continuation.
490
+
491
+ SDK consumers can persist, inspect, and transition a `SessionGoal` through
492
+ tenant-authorized in-memory or disk stores with exact revision checks. CLI
493
+ operators can create, inspect, edit, pause, resume, and clear the goal belonging
494
+ to the active durable conversation without sending those commands to the model.
495
+
496
+ The SDK also exposes atomic admitted-round accounting, finite caps,
497
+ process-local activation, host provenance for goal-sourced user messages, and
498
+ run-scoped goal tools. The CLI drives those primitives only at a durable idle
499
+ boundary, keeps human prompts ahead across admission races, withholds goal tools
500
+ from ordinary and child runs, disarms on abnormal or non-durable settlement,
501
+ and preserves automatic-turn attribution through resume and verified export.
502
+
503
+ - bb8cb05: Export the 45 types that exported signatures already named.
504
+
505
+ Each is the parameter or the result of a function that was already public, and none of them was reachable. A consumer could call `createLogger` and had no name for its options or its return; could call `compactRegion`, `runBidi`, the handoff helpers, the replay helpers, and had to inline every shape or reach for `any`. The package's vocabulary stopped at the function name.
506
+
507
+ Additive: the original 28 function-signature types plus constructor contracts including `AgentManagerDeps`, `TopicManagerDeps`, `ProjectManagerDeps`, `DiskTopicStateStoreConfig`, `DiskMessageFeedbackStoreConfig`, `MessageExistenceCheck`, `EnvCredentialProviderOptions`, `FileLockManagerConfig`, `GitWorktreeDriverConfig`, `CapacityDimension`, `HandoffLockRejectedReason`, `SessionSummaryMaterializerDeps`, `ArchivalManagerDeps`, `ArchiveBackendRef`, `DiskArchiveBackendConfig`, `SlidingWindowManagerConfig`, and `SubprocessComputerUseHostOptions`.
508
+
509
+ Nothing changes for existing code.
510
+
511
+ A CI step keeps it that way. `check-signature-types-exported.mjs` resolves exported function signatures and public class constructors, then fails when a type they name is declared in the package and not exported. The constructor branch has its own self-check so removing it cannot turn the gate silently green.
512
+
513
+ - c6ebb31: Add `/export [path]` to write a no-clobber Markdown conversation from durable CLI turn bindings and event-head-verified SDK run evidence. Legacy conversations and unresolved fork prefixes refuse instead of producing a partial file.
514
+
515
+ Add `ReadRunEventsOptions.integrity`. The default `tolerant` mode retains the existing damaged-line skip behavior; `strict` refuses torn, malformed, or discontinuously numbered event logs for callers that need a completeness proof.
516
+
517
+ ### Patch Changes
518
+
519
+ - 0e678a8: Keep host-triggered compaction state intact when a conversation starts a fresh run.
520
+
521
+ `compactNow` and `compactRegion` now extract real structured state from the messages they replace instead of producing an empty summary when model verification is disabled. Their summaries are retained because no run-scoped state manager exists between queries to reproduce them.
522
+
523
+ Fresh `query()` calls restore compacted-context summaries and working-memory artifact ledgers after rebuilding the current system prompt, while continuing to discard arbitrary historical system messages. An inherited compaction summary remains pinned through later automatic compaction, including context-overflow retries and the final persisted run-message snapshot.
524
+
525
+ - 753b037: Make disk-backed memory reads and mutations fail closed on incomplete,
526
+ malformed, unsafe, or uncommitted durable state.
527
+
528
+ Indexed content is now validated before it is returned or updated. Missing
529
+ content, invalid JSON, newer schemas, mismatched IDs, invalid field shapes,
530
+ unsafe filename IDs, and content directories resolving outside the memory
531
+ root refuse the operation instead of becoming a false not-found or success.
532
+
533
+ Disk-memory operations sharing one canonical index path are serialized within
534
+ the SDK process and reload the authoritative index before acting. Concurrent
535
+ CLI parent/delegate saves no longer lose all but the last record, warmed
536
+ readers observe sibling writes, and create/update/delete publish live state
537
+ only after their required durable operations succeed. Cross-process writers
538
+ still require a single owner or storage-level conditional publication.
539
+
540
+ - ade6c85: Allow host-triggered whole-history compaction to establish a retained summary floor for user/assistant-only conversations. Compaction now preserves every retained message together with the user boundary and complete tool exchange needed for a provider-valid turn, and manual whole-history and region passes decline before provider work when those survivors leave nothing to shed.
541
+ - 5581dde: Probe local sandbox wrappers through the same direct child-process and stdout boundary used for execution, then pin the verified canonical absolute wrapper path. Hosts where a wrapper is reachable only through a shell now fall back honestly, and per-run `PATH` overrides can no longer replace a verified isolation wrapper.
542
+ - fd6683b: Preserve the non-secret Windows core environment when `LocalSandboxProvider` launches a child. Windows environment names now merge case-insensitively, so session and per-call overrides replace ambient variants deterministically, while POSIX sandbox and MCP inheritance policies remain unchanged.
543
+ - 43620d9: Publish `token_usage_updated` immediately after every automatic context edit, before the next provider request. The event keeps cumulative usage and cost intact while reporting the estimated post-compaction context and window provenance. An insufficient stale-tool-result clear is now staged until summary verification succeeds, so cancellation or verification failure cannot leave half of a compaction visible.
544
+ - 63e8148: Refuse an unreadable or structurally invalid persistent-memory index instead
545
+ of treating it as an empty store.
546
+
547
+ `DiskMemoryStore` now validates every persisted index entry before publishing
548
+ it into the live projection. Invalid JSON, newer schema data, unrecognized or
549
+ duplicate memory IDs, wrong field types, unknown statuses and invalid
550
+ timestamps leave the original index byte-identical and make the operation
551
+ fail. Once the durable file is repaired, the same store instance may retry.
552
+
553
+ The CLI's memory tools inherit the fail-closed boundary, so `save_memory`
554
+ cannot overwrite an index the current SDK could not safely understand.
555
+
556
+ - c8753a7: Propagate run cancellation through every plugin hook and preserve cancellation
557
+ when it occurs before the iteration loop. Hook code now receives a signal that
558
+ combines the run lifetime with its hook deadline, and a hook that ignores that
559
+ signal can no longer keep the run waiting.
560
+
561
+ Make CLI session shutdown cancel and settle in-flight sends, manual compaction,
562
+ and durable resumes before external tool servers are closed. Calls made after
563
+ session close now refuse before starting provider work.
564
+
3
565
  ## 30.2.0
4
566
 
5
567
  ### Minor Changes