@oni.bot/core 0.6.3 → 1.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 (736) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/README.md +64 -263
  3. package/SECURITY.md +71 -0
  4. package/dist/checkpointers/sqlite.d.ts.map +1 -1
  5. package/dist/checkpointers/sqlite.js +42 -25
  6. package/dist/checkpointers/sqlite.js.map +1 -1
  7. package/dist/circuit-breaker.d.ts +20 -0
  8. package/dist/circuit-breaker.d.ts.map +1 -0
  9. package/dist/circuit-breaker.js +58 -0
  10. package/dist/circuit-breaker.js.map +1 -0
  11. package/dist/cli/build.d.ts +11 -0
  12. package/dist/cli/build.d.ts.map +1 -0
  13. package/dist/cli/build.js +61 -0
  14. package/dist/cli/build.js.map +1 -0
  15. package/dist/cli/dev.d.ts +5 -0
  16. package/dist/cli/dev.d.ts.map +1 -0
  17. package/dist/cli/dev.js +54 -0
  18. package/dist/cli/dev.js.map +1 -0
  19. package/dist/cli/index.d.ts +3 -0
  20. package/dist/cli/index.d.ts.map +1 -0
  21. package/dist/cli/index.js +21 -0
  22. package/dist/cli/index.js.map +1 -0
  23. package/dist/cli/init.d.ts +4 -0
  24. package/dist/cli/init.d.ts.map +1 -0
  25. package/dist/cli/init.js +34 -0
  26. package/dist/cli/init.js.map +1 -0
  27. package/dist/cli/inspect.d.ts +5 -0
  28. package/dist/cli/inspect.d.ts.map +1 -0
  29. package/dist/cli/inspect.js +85 -0
  30. package/dist/cli/inspect.js.map +1 -0
  31. package/dist/cli/router.d.ts +14 -0
  32. package/dist/cli/router.d.ts.map +1 -0
  33. package/dist/cli/router.js +107 -0
  34. package/dist/cli/router.js.map +1 -0
  35. package/dist/cli/run.d.ts +5 -0
  36. package/dist/cli/run.d.ts.map +1 -0
  37. package/dist/cli/run.js +53 -0
  38. package/dist/cli/run.js.map +1 -0
  39. package/dist/cli/templates.d.ts +9 -0
  40. package/dist/cli/templates.d.ts.map +1 -0
  41. package/dist/cli/templates.js +159 -0
  42. package/dist/cli/templates.js.map +1 -0
  43. package/dist/cli/test.d.ts +3 -0
  44. package/dist/cli/test.d.ts.map +1 -0
  45. package/dist/cli/test.js +29 -0
  46. package/dist/cli/test.js.map +1 -0
  47. package/dist/config/index.d.ts +3 -0
  48. package/dist/config/index.d.ts.map +1 -0
  49. package/dist/config/index.js +3 -0
  50. package/dist/config/index.js.map +1 -0
  51. package/dist/config/loader.d.ts +37 -0
  52. package/dist/config/loader.d.ts.map +1 -0
  53. package/dist/config/loader.js +180 -0
  54. package/dist/config/loader.js.map +1 -0
  55. package/dist/config/types.d.ts +74 -0
  56. package/dist/config/types.d.ts.map +1 -0
  57. package/dist/config/types.js +5 -0
  58. package/dist/config/types.js.map +1 -0
  59. package/dist/coordination/pubsub.d.ts +4 -0
  60. package/dist/coordination/pubsub.d.ts.map +1 -1
  61. package/dist/coordination/pubsub.js +8 -0
  62. package/dist/coordination/pubsub.js.map +1 -1
  63. package/dist/coordination/request-reply.d.ts +3 -1
  64. package/dist/coordination/request-reply.d.ts.map +1 -1
  65. package/dist/coordination/request-reply.js +11 -2
  66. package/dist/coordination/request-reply.js.map +1 -1
  67. package/dist/dlq.d.ts +17 -0
  68. package/dist/dlq.d.ts.map +1 -0
  69. package/dist/dlq.js +41 -0
  70. package/dist/dlq.js.map +1 -0
  71. package/dist/errors.d.ts +43 -2
  72. package/dist/errors.d.ts.map +1 -1
  73. package/dist/errors.js +179 -8
  74. package/dist/errors.js.map +1 -1
  75. package/dist/events/bridge.d.ts +17 -0
  76. package/dist/events/bridge.d.ts.map +1 -0
  77. package/dist/events/bridge.js +67 -0
  78. package/dist/events/bridge.js.map +1 -0
  79. package/dist/events/bus.d.ts +9 -0
  80. package/dist/events/bus.d.ts.map +1 -1
  81. package/dist/events/bus.js +39 -4
  82. package/dist/events/bus.js.map +1 -1
  83. package/dist/events/index.d.ts +2 -1
  84. package/dist/events/index.d.ts.map +1 -1
  85. package/dist/events/index.js +2 -0
  86. package/dist/events/index.js.map +1 -1
  87. package/dist/events/types.d.ts +123 -1
  88. package/dist/events/types.d.ts.map +1 -1
  89. package/dist/graph.d.ts +17 -0
  90. package/dist/graph.d.ts.map +1 -1
  91. package/dist/graph.js +29 -10
  92. package/dist/graph.js.map +1 -1
  93. package/dist/guardrails/types.d.ts +1 -1
  94. package/dist/guardrails/types.d.ts.map +1 -1
  95. package/dist/harness/agent-loop.d.ts +8 -0
  96. package/dist/harness/agent-loop.d.ts.map +1 -0
  97. package/dist/harness/agent-loop.js +524 -0
  98. package/dist/harness/agent-loop.js.map +1 -0
  99. package/dist/harness/context-compactor.d.ts +92 -0
  100. package/dist/harness/context-compactor.d.ts.map +1 -0
  101. package/dist/harness/context-compactor.js +201 -0
  102. package/dist/harness/context-compactor.js.map +1 -0
  103. package/dist/harness/harness.d.ts +41 -0
  104. package/dist/harness/harness.d.ts.map +1 -0
  105. package/dist/harness/harness.js +140 -0
  106. package/dist/harness/harness.js.map +1 -0
  107. package/dist/harness/hooks-engine.d.ts +77 -0
  108. package/dist/harness/hooks-engine.d.ts.map +1 -0
  109. package/dist/harness/hooks-engine.js +232 -0
  110. package/dist/harness/hooks-engine.js.map +1 -0
  111. package/dist/harness/index.d.ts +17 -0
  112. package/dist/harness/index.d.ts.map +1 -0
  113. package/dist/harness/index.js +21 -0
  114. package/dist/harness/index.js.map +1 -0
  115. package/dist/harness/safety-gate.d.ts +29 -0
  116. package/dist/harness/safety-gate.d.ts.map +1 -0
  117. package/dist/harness/safety-gate.js +72 -0
  118. package/dist/harness/safety-gate.js.map +1 -0
  119. package/dist/harness/skill-loader.d.ts +76 -0
  120. package/dist/harness/skill-loader.d.ts.map +1 -0
  121. package/dist/harness/skill-loader.js +244 -0
  122. package/dist/harness/skill-loader.js.map +1 -0
  123. package/dist/harness/todo-module.d.ts +39 -0
  124. package/dist/harness/todo-module.d.ts.map +1 -0
  125. package/dist/harness/todo-module.js +179 -0
  126. package/dist/harness/todo-module.js.map +1 -0
  127. package/dist/harness/types.d.ts +100 -0
  128. package/dist/harness/types.d.ts.map +1 -0
  129. package/dist/harness/types.js +9 -0
  130. package/dist/harness/types.js.map +1 -0
  131. package/dist/harness/validate-args.d.ts +16 -0
  132. package/dist/harness/validate-args.d.ts.map +1 -0
  133. package/dist/harness/validate-args.js +132 -0
  134. package/dist/harness/validate-args.js.map +1 -0
  135. package/dist/hitl/interrupt.d.ts.map +1 -1
  136. package/dist/hitl/interrupt.js +7 -6
  137. package/dist/hitl/interrupt.js.map +1 -1
  138. package/dist/index.d.ts +16 -5
  139. package/dist/index.d.ts.map +1 -1
  140. package/dist/index.js +22 -13
  141. package/dist/index.js.map +1 -1
  142. package/dist/internal/timeout.d.ts +2 -0
  143. package/dist/internal/timeout.d.ts.map +1 -0
  144. package/dist/internal/timeout.js +16 -0
  145. package/dist/internal/timeout.js.map +1 -0
  146. package/dist/lsp/client.d.ts +70 -0
  147. package/dist/lsp/client.d.ts.map +1 -0
  148. package/dist/lsp/client.js +421 -0
  149. package/dist/lsp/client.js.map +1 -0
  150. package/dist/lsp/index.d.ts +77 -0
  151. package/dist/lsp/index.d.ts.map +1 -0
  152. package/dist/lsp/index.js +183 -0
  153. package/dist/lsp/index.js.map +1 -0
  154. package/dist/lsp/servers.d.ts +48 -0
  155. package/dist/lsp/servers.d.ts.map +1 -0
  156. package/dist/lsp/servers.js +108 -0
  157. package/dist/lsp/servers.js.map +1 -0
  158. package/dist/lsp/types.d.ts +142 -0
  159. package/dist/lsp/types.d.ts.map +1 -0
  160. package/dist/lsp/types.js +16 -0
  161. package/dist/lsp/types.js.map +1 -0
  162. package/dist/mcp/client.d.ts +56 -0
  163. package/dist/mcp/client.d.ts.map +1 -0
  164. package/dist/mcp/client.js +170 -0
  165. package/dist/mcp/client.js.map +1 -0
  166. package/dist/mcp/convert.d.ts +26 -0
  167. package/dist/mcp/convert.d.ts.map +1 -0
  168. package/dist/mcp/convert.js +56 -0
  169. package/dist/mcp/convert.js.map +1 -0
  170. package/dist/mcp/index.d.ts +21 -0
  171. package/dist/mcp/index.d.ts.map +1 -0
  172. package/dist/mcp/index.js +19 -0
  173. package/dist/mcp/index.js.map +1 -0
  174. package/dist/mcp/transport.d.ts +56 -0
  175. package/dist/mcp/transport.d.ts.map +1 -0
  176. package/dist/mcp/transport.js +204 -0
  177. package/dist/mcp/transport.js.map +1 -0
  178. package/dist/mcp/types.d.ts +96 -0
  179. package/dist/mcp/types.d.ts.map +1 -0
  180. package/dist/mcp/types.js +11 -0
  181. package/dist/mcp/types.js.map +1 -0
  182. package/dist/models/anthropic.d.ts.map +1 -1
  183. package/dist/models/anthropic.js +78 -41
  184. package/dist/models/anthropic.js.map +1 -1
  185. package/dist/models/google.d.ts.map +1 -1
  186. package/dist/models/google.js +54 -52
  187. package/dist/models/google.js.map +1 -1
  188. package/dist/models/http-error.d.ts +16 -0
  189. package/dist/models/http-error.d.ts.map +1 -0
  190. package/dist/models/http-error.js +67 -0
  191. package/dist/models/http-error.js.map +1 -0
  192. package/dist/models/index.d.ts +5 -0
  193. package/dist/models/index.d.ts.map +1 -1
  194. package/dist/models/index.js +3 -0
  195. package/dist/models/index.js.map +1 -1
  196. package/dist/models/ollama.d.ts.map +1 -1
  197. package/dist/models/ollama.js +4 -3
  198. package/dist/models/ollama.js.map +1 -1
  199. package/dist/models/openai.d.ts.map +1 -1
  200. package/dist/models/openai.js +42 -45
  201. package/dist/models/openai.js.map +1 -1
  202. package/dist/models/openrouter.d.ts +26 -0
  203. package/dist/models/openrouter.d.ts.map +1 -0
  204. package/dist/models/openrouter.js +361 -0
  205. package/dist/models/openrouter.js.map +1 -0
  206. package/dist/models/sse.d.ts +9 -0
  207. package/dist/models/sse.d.ts.map +1 -0
  208. package/dist/models/sse.js +45 -0
  209. package/dist/models/sse.js.map +1 -0
  210. package/dist/models/types.d.ts +10 -0
  211. package/dist/models/types.d.ts.map +1 -1
  212. package/dist/oni-code/agent-registry.d.ts +73 -0
  213. package/dist/oni-code/agent-registry.d.ts.map +1 -0
  214. package/dist/oni-code/agent-registry.js +151 -0
  215. package/dist/oni-code/agent-registry.js.map +1 -0
  216. package/dist/oni-code/bin.d.ts +18 -0
  217. package/dist/oni-code/bin.d.ts.map +1 -0
  218. package/dist/oni-code/bin.js +78 -0
  219. package/dist/oni-code/bin.js.map +1 -0
  220. package/dist/oni-code/change-tracking.d.ts +28 -0
  221. package/dist/oni-code/change-tracking.d.ts.map +1 -0
  222. package/dist/oni-code/change-tracking.js +77 -0
  223. package/dist/oni-code/change-tracking.js.map +1 -0
  224. package/dist/oni-code/cli.d.ts +6 -0
  225. package/dist/oni-code/cli.d.ts.map +1 -0
  226. package/dist/oni-code/cli.js +30 -0
  227. package/dist/oni-code/cli.js.map +1 -0
  228. package/dist/oni-code/conductor.d.ts +203 -0
  229. package/dist/oni-code/conductor.d.ts.map +1 -0
  230. package/dist/oni-code/conductor.js +1547 -0
  231. package/dist/oni-code/conductor.js.map +1 -0
  232. package/dist/oni-code/config.d.ts +130 -0
  233. package/dist/oni-code/config.d.ts.map +1 -0
  234. package/dist/oni-code/config.js +264 -0
  235. package/dist/oni-code/config.js.map +1 -0
  236. package/dist/oni-code/context-files.d.ts +22 -0
  237. package/dist/oni-code/context-files.d.ts.map +1 -0
  238. package/dist/oni-code/context-files.js +156 -0
  239. package/dist/oni-code/context-files.js.map +1 -0
  240. package/dist/oni-code/cron/humanize.d.ts +26 -0
  241. package/dist/oni-code/cron/humanize.d.ts.map +1 -0
  242. package/dist/oni-code/cron/humanize.js +83 -0
  243. package/dist/oni-code/cron/humanize.js.map +1 -0
  244. package/dist/oni-code/cron/index.d.ts +10 -0
  245. package/dist/oni-code/cron/index.d.ts.map +1 -0
  246. package/dist/oni-code/cron/index.js +7 -0
  247. package/dist/oni-code/cron/index.js.map +1 -0
  248. package/dist/oni-code/cron/matcher.d.ts +29 -0
  249. package/dist/oni-code/cron/matcher.d.ts.map +1 -0
  250. package/dist/oni-code/cron/matcher.js +73 -0
  251. package/dist/oni-code/cron/matcher.js.map +1 -0
  252. package/dist/oni-code/cron/parser.d.ts +27 -0
  253. package/dist/oni-code/cron/parser.d.ts.map +1 -0
  254. package/dist/oni-code/cron/parser.js +149 -0
  255. package/dist/oni-code/cron/parser.js.map +1 -0
  256. package/dist/oni-code/cron/persistence.d.ts +21 -0
  257. package/dist/oni-code/cron/persistence.d.ts.map +1 -0
  258. package/dist/oni-code/cron/persistence.js +58 -0
  259. package/dist/oni-code/cron/persistence.js.map +1 -0
  260. package/dist/oni-code/cron/scheduler.d.ts +64 -0
  261. package/dist/oni-code/cron/scheduler.d.ts.map +1 -0
  262. package/dist/oni-code/cron/scheduler.js +188 -0
  263. package/dist/oni-code/cron/scheduler.js.map +1 -0
  264. package/dist/oni-code/cron/store.d.ts +46 -0
  265. package/dist/oni-code/cron/store.d.ts.map +1 -0
  266. package/dist/oni-code/cron/store.js +68 -0
  267. package/dist/oni-code/cron/store.js.map +1 -0
  268. package/dist/oni-code/env.d.ts +17 -0
  269. package/dist/oni-code/env.d.ts.map +1 -0
  270. package/dist/oni-code/env.js +51 -0
  271. package/dist/oni-code/env.js.map +1 -0
  272. package/dist/oni-code/file-reader.d.ts +28 -0
  273. package/dist/oni-code/file-reader.d.ts.map +1 -0
  274. package/dist/oni-code/file-reader.js +368 -0
  275. package/dist/oni-code/file-reader.js.map +1 -0
  276. package/dist/oni-code/file-watcher.d.ts +66 -0
  277. package/dist/oni-code/file-watcher.d.ts.map +1 -0
  278. package/dist/oni-code/file-watcher.js +167 -0
  279. package/dist/oni-code/file-watcher.js.map +1 -0
  280. package/dist/oni-code/loop-detector.d.ts +64 -0
  281. package/dist/oni-code/loop-detector.d.ts.map +1 -0
  282. package/dist/oni-code/loop-detector.js +163 -0
  283. package/dist/oni-code/loop-detector.js.map +1 -0
  284. package/dist/oni-code/permissions.d.ts +43 -0
  285. package/dist/oni-code/permissions.d.ts.map +1 -0
  286. package/dist/oni-code/permissions.js +98 -0
  287. package/dist/oni-code/permissions.js.map +1 -0
  288. package/dist/oni-code/planner.d.ts +26 -0
  289. package/dist/oni-code/planner.d.ts.map +1 -0
  290. package/dist/oni-code/planner.js +86 -0
  291. package/dist/oni-code/planner.js.map +1 -0
  292. package/dist/oni-code/plugin-loader.d.ts +103 -0
  293. package/dist/oni-code/plugin-loader.d.ts.map +1 -0
  294. package/dist/oni-code/plugin-loader.js +171 -0
  295. package/dist/oni-code/plugin-loader.js.map +1 -0
  296. package/dist/oni-code/process-tree.d.ts +44 -0
  297. package/dist/oni-code/process-tree.d.ts.map +1 -0
  298. package/dist/oni-code/process-tree.js +107 -0
  299. package/dist/oni-code/process-tree.js.map +1 -0
  300. package/dist/oni-code/progress-tracker.d.ts +40 -0
  301. package/dist/oni-code/progress-tracker.d.ts.map +1 -0
  302. package/dist/oni-code/progress-tracker.js +375 -0
  303. package/dist/oni-code/progress-tracker.js.map +1 -0
  304. package/dist/oni-code/scheduler.d.ts +56 -0
  305. package/dist/oni-code/scheduler.d.ts.map +1 -0
  306. package/dist/oni-code/scheduler.js +105 -0
  307. package/dist/oni-code/scheduler.js.map +1 -0
  308. package/dist/oni-code/session-fork.d.ts +146 -0
  309. package/dist/oni-code/session-fork.d.ts.map +1 -0
  310. package/dist/oni-code/session-fork.js +238 -0
  311. package/dist/oni-code/session-fork.js.map +1 -0
  312. package/dist/oni-code/session-stats.d.ts +72 -0
  313. package/dist/oni-code/session-stats.d.ts.map +1 -0
  314. package/dist/oni-code/session-stats.js +141 -0
  315. package/dist/oni-code/session-stats.js.map +1 -0
  316. package/dist/oni-code/session-title.d.ts +25 -0
  317. package/dist/oni-code/session-title.d.ts.map +1 -0
  318. package/dist/oni-code/session-title.js +67 -0
  319. package/dist/oni-code/session-title.js.map +1 -0
  320. package/dist/oni-code/shell-parser.d.ts +112 -0
  321. package/dist/oni-code/shell-parser.d.ts.map +1 -0
  322. package/dist/oni-code/shell-parser.js +657 -0
  323. package/dist/oni-code/shell-parser.js.map +1 -0
  324. package/dist/oni-code/summarizer.d.ts +27 -0
  325. package/dist/oni-code/summarizer.d.ts.map +1 -0
  326. package/dist/oni-code/summarizer.js +70 -0
  327. package/dist/oni-code/summarizer.js.map +1 -0
  328. package/dist/oni-code/swarm-checkpoint.d.ts +52 -0
  329. package/dist/oni-code/swarm-checkpoint.d.ts.map +1 -0
  330. package/dist/oni-code/swarm-checkpoint.js +71 -0
  331. package/dist/oni-code/swarm-checkpoint.js.map +1 -0
  332. package/dist/oni-code/swarm-runner.d.ts +173 -0
  333. package/dist/oni-code/swarm-runner.d.ts.map +1 -0
  334. package/dist/oni-code/swarm-runner.js +873 -0
  335. package/dist/oni-code/swarm-runner.js.map +1 -0
  336. package/dist/oni-code/system-prompt.d.ts +13 -0
  337. package/dist/oni-code/system-prompt.d.ts.map +1 -0
  338. package/dist/oni-code/system-prompt.js +64 -0
  339. package/dist/oni-code/system-prompt.js.map +1 -0
  340. package/dist/oni-code/task-evaluator.d.ts +73 -0
  341. package/dist/oni-code/task-evaluator.d.ts.map +1 -0
  342. package/dist/oni-code/task-evaluator.js +172 -0
  343. package/dist/oni-code/task-evaluator.js.map +1 -0
  344. package/dist/oni-code/tools/batch.d.ts +12 -0
  345. package/dist/oni-code/tools/batch.d.ts.map +1 -0
  346. package/dist/oni-code/tools/batch.js +116 -0
  347. package/dist/oni-code/tools/batch.js.map +1 -0
  348. package/dist/oni-code/tools/coding.d.ts +10 -0
  349. package/dist/oni-code/tools/coding.d.ts.map +1 -0
  350. package/dist/oni-code/tools/coding.js +557 -0
  351. package/dist/oni-code/tools/coding.js.map +1 -0
  352. package/dist/oni-code/tools/cron.d.ts +4 -0
  353. package/dist/oni-code/tools/cron.d.ts.map +1 -0
  354. package/dist/oni-code/tools/cron.js +120 -0
  355. package/dist/oni-code/tools/cron.js.map +1 -0
  356. package/dist/oni-code/tools/custom.d.ts +43 -0
  357. package/dist/oni-code/tools/custom.d.ts.map +1 -0
  358. package/dist/oni-code/tools/custom.js +115 -0
  359. package/dist/oni-code/tools/custom.js.map +1 -0
  360. package/dist/oni-code/tools/patch.d.ts +58 -0
  361. package/dist/oni-code/tools/patch.d.ts.map +1 -0
  362. package/dist/oni-code/tools/patch.js +247 -0
  363. package/dist/oni-code/tools/patch.js.map +1 -0
  364. package/dist/oni-code/tools/plan.d.ts +17 -0
  365. package/dist/oni-code/tools/plan.d.ts.map +1 -0
  366. package/dist/oni-code/tools/plan.js +48 -0
  367. package/dist/oni-code/tools/plan.js.map +1 -0
  368. package/dist/oni-code/tools/question.d.ts +17 -0
  369. package/dist/oni-code/tools/question.d.ts.map +1 -0
  370. package/dist/oni-code/tools/question.js +46 -0
  371. package/dist/oni-code/tools/question.js.map +1 -0
  372. package/dist/oni-code/tools/skill.d.ts +36 -0
  373. package/dist/oni-code/tools/skill.d.ts.map +1 -0
  374. package/dist/oni-code/tools/skill.js +132 -0
  375. package/dist/oni-code/tools/skill.js.map +1 -0
  376. package/dist/oni-code/tools/spawn-agents.d.ts +37 -0
  377. package/dist/oni-code/tools/spawn-agents.d.ts.map +1 -0
  378. package/dist/oni-code/tools/spawn-agents.js +91 -0
  379. package/dist/oni-code/tools/spawn-agents.js.map +1 -0
  380. package/dist/oni-code/tools/spawn-swarm.d.ts +70 -0
  381. package/dist/oni-code/tools/spawn-swarm.d.ts.map +1 -0
  382. package/dist/oni-code/tools/spawn-swarm.js +129 -0
  383. package/dist/oni-code/tools/spawn-swarm.js.map +1 -0
  384. package/dist/oni-code/tools/web.d.ts +11 -0
  385. package/dist/oni-code/tools/web.d.ts.map +1 -0
  386. package/dist/oni-code/tools/web.js +375 -0
  387. package/dist/oni-code/tools/web.js.map +1 -0
  388. package/dist/oni-code/topology-agent-builder.d.ts +22 -0
  389. package/dist/oni-code/topology-agent-builder.d.ts.map +1 -0
  390. package/dist/oni-code/topology-agent-builder.js +220 -0
  391. package/dist/oni-code/topology-agent-builder.js.map +1 -0
  392. package/dist/oni-code/topology-selector.d.ts +85 -0
  393. package/dist/oni-code/topology-selector.d.ts.map +1 -0
  394. package/dist/oni-code/topology-selector.js +338 -0
  395. package/dist/oni-code/topology-selector.js.map +1 -0
  396. package/dist/oni-code/ui/App.d.ts +10 -0
  397. package/dist/oni-code/ui/App.d.ts.map +1 -0
  398. package/dist/oni-code/ui/App.js +395 -0
  399. package/dist/oni-code/ui/App.js.map +1 -0
  400. package/dist/oni-code/ui/FooterPanel.d.ts +16 -0
  401. package/dist/oni-code/ui/FooterPanel.d.ts.map +1 -0
  402. package/dist/oni-code/ui/FooterPanel.js +56 -0
  403. package/dist/oni-code/ui/FooterPanel.js.map +1 -0
  404. package/dist/oni-code/ui/Header.d.ts +21 -0
  405. package/dist/oni-code/ui/Header.d.ts.map +1 -0
  406. package/dist/oni-code/ui/Header.js +105 -0
  407. package/dist/oni-code/ui/Header.js.map +1 -0
  408. package/dist/oni-code/ui/InputArea.d.ts +11 -0
  409. package/dist/oni-code/ui/InputArea.d.ts.map +1 -0
  410. package/dist/oni-code/ui/InputArea.js +82 -0
  411. package/dist/oni-code/ui/InputArea.js.map +1 -0
  412. package/dist/oni-code/ui/MessageBlock.d.ts +11 -0
  413. package/dist/oni-code/ui/MessageBlock.d.ts.map +1 -0
  414. package/dist/oni-code/ui/MessageBlock.js +103 -0
  415. package/dist/oni-code/ui/MessageBlock.js.map +1 -0
  416. package/dist/oni-code/ui/OutputPane.d.ts +12 -0
  417. package/dist/oni-code/ui/OutputPane.d.ts.map +1 -0
  418. package/dist/oni-code/ui/OutputPane.js +8 -0
  419. package/dist/oni-code/ui/OutputPane.js.map +1 -0
  420. package/dist/oni-code/ui/PermissionPrompt.d.ts +11 -0
  421. package/dist/oni-code/ui/PermissionPrompt.d.ts.map +1 -0
  422. package/dist/oni-code/ui/PermissionPrompt.js +48 -0
  423. package/dist/oni-code/ui/PermissionPrompt.js.map +1 -0
  424. package/dist/oni-code/ui/QuestionPrompt.d.ts +8 -0
  425. package/dist/oni-code/ui/QuestionPrompt.d.ts.map +1 -0
  426. package/dist/oni-code/ui/QuestionPrompt.js +9 -0
  427. package/dist/oni-code/ui/QuestionPrompt.js.map +1 -0
  428. package/dist/oni-code/ui/StatusLine.d.ts +14 -0
  429. package/dist/oni-code/ui/StatusLine.d.ts.map +1 -0
  430. package/dist/oni-code/ui/StatusLine.js +23 -0
  431. package/dist/oni-code/ui/StatusLine.js.map +1 -0
  432. package/dist/oni-code/ui/SwarmPanel.d.ts +9 -0
  433. package/dist/oni-code/ui/SwarmPanel.d.ts.map +1 -0
  434. package/dist/oni-code/ui/SwarmPanel.js +52 -0
  435. package/dist/oni-code/ui/SwarmPanel.js.map +1 -0
  436. package/dist/oni-code/ui/ToolCallBlock.d.ts +10 -0
  437. package/dist/oni-code/ui/ToolCallBlock.d.ts.map +1 -0
  438. package/dist/oni-code/ui/ToolCallBlock.js +21 -0
  439. package/dist/oni-code/ui/ToolCallBlock.js.map +1 -0
  440. package/dist/oni-code/ui/Toolbar.d.ts +8 -0
  441. package/dist/oni-code/ui/Toolbar.d.ts.map +1 -0
  442. package/dist/oni-code/ui/Toolbar.js +11 -0
  443. package/dist/oni-code/ui/Toolbar.js.map +1 -0
  444. package/dist/oni-code/ui/WelcomeBanner.d.ts +12 -0
  445. package/dist/oni-code/ui/WelcomeBanner.d.ts.map +1 -0
  446. package/dist/oni-code/ui/WelcomeBanner.js +24 -0
  447. package/dist/oni-code/ui/WelcomeBanner.js.map +1 -0
  448. package/dist/oni-code/ui/activity.d.ts +15 -0
  449. package/dist/oni-code/ui/activity.d.ts.map +1 -0
  450. package/dist/oni-code/ui/activity.js +252 -0
  451. package/dist/oni-code/ui/activity.js.map +1 -0
  452. package/dist/oni-code/ui/banner.d.ts +16 -0
  453. package/dist/oni-code/ui/banner.d.ts.map +1 -0
  454. package/dist/oni-code/ui/banner.js +132 -0
  455. package/dist/oni-code/ui/banner.js.map +1 -0
  456. package/dist/oni-code/ui/command-menu.d.ts +7 -0
  457. package/dist/oni-code/ui/command-menu.d.ts.map +1 -0
  458. package/dist/oni-code/ui/command-menu.js +20 -0
  459. package/dist/oni-code/ui/command-menu.js.map +1 -0
  460. package/dist/oni-code/ui/diff.d.ts +17 -0
  461. package/dist/oni-code/ui/diff.d.ts.map +1 -0
  462. package/dist/oni-code/ui/diff.js +37 -0
  463. package/dist/oni-code/ui/diff.js.map +1 -0
  464. package/dist/oni-code/ui/format.d.ts +41 -0
  465. package/dist/oni-code/ui/format.d.ts.map +1 -0
  466. package/dist/oni-code/ui/format.js +223 -0
  467. package/dist/oni-code/ui/format.js.map +1 -0
  468. package/dist/oni-code/ui/input.d.ts +28 -0
  469. package/dist/oni-code/ui/input.d.ts.map +1 -0
  470. package/dist/oni-code/ui/input.js +216 -0
  471. package/dist/oni-code/ui/input.js.map +1 -0
  472. package/dist/oni-code/ui/insights.d.ts +39 -0
  473. package/dist/oni-code/ui/insights.d.ts.map +1 -0
  474. package/dist/oni-code/ui/insights.js +193 -0
  475. package/dist/oni-code/ui/insights.js.map +1 -0
  476. package/dist/oni-code/ui/markdown.d.ts +9 -0
  477. package/dist/oni-code/ui/markdown.d.ts.map +1 -0
  478. package/dist/oni-code/ui/markdown.js +44 -0
  479. package/dist/oni-code/ui/markdown.js.map +1 -0
  480. package/dist/oni-code/ui/panels.d.ts +39 -0
  481. package/dist/oni-code/ui/panels.d.ts.map +1 -0
  482. package/dist/oni-code/ui/panels.js +209 -0
  483. package/dist/oni-code/ui/panels.js.map +1 -0
  484. package/dist/oni-code/ui/paste.d.ts +17 -0
  485. package/dist/oni-code/ui/paste.d.ts.map +1 -0
  486. package/dist/oni-code/ui/paste.js +45 -0
  487. package/dist/oni-code/ui/paste.js.map +1 -0
  488. package/dist/oni-code/ui/raw-spinner.d.ts +37 -0
  489. package/dist/oni-code/ui/raw-spinner.d.ts.map +1 -0
  490. package/dist/oni-code/ui/raw-spinner.js +121 -0
  491. package/dist/oni-code/ui/raw-spinner.js.map +1 -0
  492. package/dist/oni-code/ui/session.d.ts +44 -0
  493. package/dist/oni-code/ui/session.d.ts.map +1 -0
  494. package/dist/oni-code/ui/session.js +93 -0
  495. package/dist/oni-code/ui/session.js.map +1 -0
  496. package/dist/oni-code/ui/spinner.d.ts +7 -0
  497. package/dist/oni-code/ui/spinner.d.ts.map +1 -0
  498. package/dist/oni-code/ui/spinner.js +20 -0
  499. package/dist/oni-code/ui/spinner.js.map +1 -0
  500. package/dist/oni-code/ui/swarm-activity.d.ts +50 -0
  501. package/dist/oni-code/ui/swarm-activity.d.ts.map +1 -0
  502. package/dist/oni-code/ui/swarm-activity.js +233 -0
  503. package/dist/oni-code/ui/swarm-activity.js.map +1 -0
  504. package/dist/oni-code/ui/terminal-size.d.ts +18 -0
  505. package/dist/oni-code/ui/terminal-size.d.ts.map +1 -0
  506. package/dist/oni-code/ui/terminal-size.js +45 -0
  507. package/dist/oni-code/ui/terminal-size.js.map +1 -0
  508. package/dist/oni-code/ui/theme.d.ts +82 -0
  509. package/dist/oni-code/ui/theme.d.ts.map +1 -0
  510. package/dist/oni-code/ui/theme.js +101 -0
  511. package/dist/oni-code/ui/theme.js.map +1 -0
  512. package/dist/oni-code/ui/tool-utils.d.ts +10 -0
  513. package/dist/oni-code/ui/tool-utils.d.ts.map +1 -0
  514. package/dist/oni-code/ui/tool-utils.js +82 -0
  515. package/dist/oni-code/ui/tool-utils.js.map +1 -0
  516. package/dist/oni-code/ui/useTerminalSize.d.ts +3 -0
  517. package/dist/oni-code/ui/useTerminalSize.d.ts.map +1 -0
  518. package/dist/oni-code/ui/useTerminalSize.js +16 -0
  519. package/dist/oni-code/ui/useTerminalSize.js.map +1 -0
  520. package/dist/oni-code/workspace/change-tracker.d.ts +18 -0
  521. package/dist/oni-code/workspace/change-tracker.d.ts.map +1 -0
  522. package/dist/oni-code/workspace/change-tracker.js +67 -0
  523. package/dist/oni-code/workspace/change-tracker.js.map +1 -0
  524. package/dist/oni-code/workspace/conflict-detector.d.ts +12 -0
  525. package/dist/oni-code/workspace/conflict-detector.d.ts.map +1 -0
  526. package/dist/oni-code/workspace/conflict-detector.js +24 -0
  527. package/dist/oni-code/workspace/conflict-detector.js.map +1 -0
  528. package/dist/oni-code/workspace/file-snapshots.d.ts +39 -0
  529. package/dist/oni-code/workspace/file-snapshots.d.ts.map +1 -0
  530. package/dist/oni-code/workspace/file-snapshots.js +77 -0
  531. package/dist/oni-code/workspace/file-snapshots.js.map +1 -0
  532. package/dist/oni-code/workspace/index.d.ts +5 -0
  533. package/dist/oni-code/workspace/index.d.ts.map +1 -0
  534. package/dist/oni-code/workspace/index.js +5 -0
  535. package/dist/oni-code/workspace/index.js.map +1 -0
  536. package/dist/oni-code/workspace/project-map.d.ts +14 -0
  537. package/dist/oni-code/workspace/project-map.d.ts.map +1 -0
  538. package/dist/oni-code/workspace/project-map.js +91 -0
  539. package/dist/oni-code/workspace/project-map.js.map +1 -0
  540. package/dist/prebuilt/tool-node.d.ts.map +1 -1
  541. package/dist/prebuilt/tool-node.js +0 -1
  542. package/dist/prebuilt/tool-node.js.map +1 -1
  543. package/dist/pregel.d.ts +15 -1
  544. package/dist/pregel.d.ts.map +1 -1
  545. package/dist/pregel.js +199 -51
  546. package/dist/pregel.js.map +1 -1
  547. package/dist/retry.d.ts.map +1 -1
  548. package/dist/retry.js +16 -4
  549. package/dist/retry.js.map +1 -1
  550. package/dist/sentinel/config/index.d.ts +2 -0
  551. package/dist/sentinel/config/index.d.ts.map +1 -0
  552. package/dist/sentinel/config/index.js +2 -0
  553. package/dist/sentinel/config/index.js.map +1 -0
  554. package/dist/sentinel/config/schema.d.ts +4 -0
  555. package/dist/sentinel/config/schema.d.ts.map +1 -0
  556. package/dist/sentinel/config/schema.js +42 -0
  557. package/dist/sentinel/config/schema.js.map +1 -0
  558. package/dist/sentinel/debate/index.d.ts +6 -0
  559. package/dist/sentinel/debate/index.d.ts.map +1 -0
  560. package/dist/sentinel/debate/index.js +64 -0
  561. package/dist/sentinel/debate/index.js.map +1 -0
  562. package/dist/sentinel/debate/prompts.d.ts +4 -0
  563. package/dist/sentinel/debate/prompts.d.ts.map +1 -0
  564. package/dist/sentinel/debate/prompts.js +13 -0
  565. package/dist/sentinel/debate/prompts.js.map +1 -0
  566. package/dist/sentinel/fix/index.d.ts +6 -0
  567. package/dist/sentinel/fix/index.d.ts.map +1 -0
  568. package/dist/sentinel/fix/index.js +27 -0
  569. package/dist/sentinel/fix/index.js.map +1 -0
  570. package/dist/sentinel/fix/strategies.d.ts +9 -0
  571. package/dist/sentinel/fix/strategies.d.ts.map +1 -0
  572. package/dist/sentinel/fix/strategies.js +40 -0
  573. package/dist/sentinel/fix/strategies.js.map +1 -0
  574. package/dist/sentinel/index.d.ts +14 -0
  575. package/dist/sentinel/index.d.ts.map +1 -0
  576. package/dist/sentinel/index.js +22 -0
  577. package/dist/sentinel/index.js.map +1 -0
  578. package/dist/sentinel/integrations/cli.d.ts +10 -0
  579. package/dist/sentinel/integrations/cli.d.ts.map +1 -0
  580. package/dist/sentinel/integrations/cli.js +24 -0
  581. package/dist/sentinel/integrations/cli.js.map +1 -0
  582. package/dist/sentinel/integrations/index.d.ts +2 -0
  583. package/dist/sentinel/integrations/index.d.ts.map +1 -0
  584. package/dist/sentinel/integrations/index.js +2 -0
  585. package/dist/sentinel/integrations/index.js.map +1 -0
  586. package/dist/sentinel/memory/index.d.ts +16 -0
  587. package/dist/sentinel/memory/index.d.ts.map +1 -0
  588. package/dist/sentinel/memory/index.js +60 -0
  589. package/dist/sentinel/memory/index.js.map +1 -0
  590. package/dist/sentinel/report/console.d.ts +3 -0
  591. package/dist/sentinel/report/console.d.ts.map +1 -0
  592. package/dist/sentinel/report/console.js +27 -0
  593. package/dist/sentinel/report/console.js.map +1 -0
  594. package/dist/sentinel/report/github.d.ts +3 -0
  595. package/dist/sentinel/report/github.d.ts.map +1 -0
  596. package/dist/sentinel/report/github.js +36 -0
  597. package/dist/sentinel/report/github.js.map +1 -0
  598. package/dist/sentinel/report/index.d.ts +6 -0
  599. package/dist/sentinel/report/index.d.ts.map +1 -0
  600. package/dist/sentinel/report/index.js +15 -0
  601. package/dist/sentinel/report/index.js.map +1 -0
  602. package/dist/sentinel/report/sarif.d.ts +3 -0
  603. package/dist/sentinel/report/sarif.d.ts.map +1 -0
  604. package/dist/sentinel/report/sarif.js +29 -0
  605. package/dist/sentinel/report/sarif.js.map +1 -0
  606. package/dist/sentinel/sentinel.d.ts +17 -0
  607. package/dist/sentinel/sentinel.d.ts.map +1 -0
  608. package/dist/sentinel/sentinel.js +111 -0
  609. package/dist/sentinel/sentinel.js.map +1 -0
  610. package/dist/sentinel/swarm/agents.d.ts +6 -0
  611. package/dist/sentinel/swarm/agents.d.ts.map +1 -0
  612. package/dist/sentinel/swarm/agents.js +36 -0
  613. package/dist/sentinel/swarm/agents.js.map +1 -0
  614. package/dist/sentinel/swarm/index.d.ts +8 -0
  615. package/dist/sentinel/swarm/index.d.ts.map +1 -0
  616. package/dist/sentinel/swarm/index.js +74 -0
  617. package/dist/sentinel/swarm/index.js.map +1 -0
  618. package/dist/sentinel/swarm/prompts.d.ts +2 -0
  619. package/dist/sentinel/swarm/prompts.d.ts.map +1 -0
  620. package/dist/sentinel/swarm/prompts.js +24 -0
  621. package/dist/sentinel/swarm/prompts.js.map +1 -0
  622. package/dist/sentinel/swarm/topology.d.ts +10 -0
  623. package/dist/sentinel/swarm/topology.d.ts.map +1 -0
  624. package/dist/sentinel/swarm/topology.js +38 -0
  625. package/dist/sentinel/swarm/topology.js.map +1 -0
  626. package/dist/sentinel/triage/analyzers/complexity-analyzer.d.ts +7 -0
  627. package/dist/sentinel/triage/analyzers/complexity-analyzer.d.ts.map +1 -0
  628. package/dist/sentinel/triage/analyzers/complexity-analyzer.js +94 -0
  629. package/dist/sentinel/triage/analyzers/complexity-analyzer.js.map +1 -0
  630. package/dist/sentinel/triage/analyzers/custom-analyzer.d.ts +19 -0
  631. package/dist/sentinel/triage/analyzers/custom-analyzer.d.ts.map +1 -0
  632. package/dist/sentinel/triage/analyzers/custom-analyzer.js +268 -0
  633. package/dist/sentinel/triage/analyzers/custom-analyzer.js.map +1 -0
  634. package/dist/sentinel/triage/analyzers/dependency-analyzer.d.ts +26 -0
  635. package/dist/sentinel/triage/analyzers/dependency-analyzer.d.ts.map +1 -0
  636. package/dist/sentinel/triage/analyzers/dependency-analyzer.js +220 -0
  637. package/dist/sentinel/triage/analyzers/dependency-analyzer.js.map +1 -0
  638. package/dist/sentinel/triage/analyzers/diff-analyzer.d.ts +12 -0
  639. package/dist/sentinel/triage/analyzers/diff-analyzer.d.ts.map +1 -0
  640. package/dist/sentinel/triage/analyzers/diff-analyzer.js +19 -0
  641. package/dist/sentinel/triage/analyzers/diff-analyzer.js.map +1 -0
  642. package/dist/sentinel/triage/analyzers/index.d.ts +14 -0
  643. package/dist/sentinel/triage/analyzers/index.d.ts.map +1 -0
  644. package/dist/sentinel/triage/analyzers/index.js +25 -0
  645. package/dist/sentinel/triage/analyzers/index.js.map +1 -0
  646. package/dist/sentinel/triage/analyzers/pattern-analyzer.d.ts +7 -0
  647. package/dist/sentinel/triage/analyzers/pattern-analyzer.d.ts.map +1 -0
  648. package/dist/sentinel/triage/analyzers/pattern-analyzer.js +180 -0
  649. package/dist/sentinel/triage/analyzers/pattern-analyzer.js.map +1 -0
  650. package/dist/sentinel/triage/analyzers/security-analyzer.d.ts +7 -0
  651. package/dist/sentinel/triage/analyzers/security-analyzer.d.ts.map +1 -0
  652. package/dist/sentinel/triage/analyzers/security-analyzer.js +96 -0
  653. package/dist/sentinel/triage/analyzers/security-analyzer.js.map +1 -0
  654. package/dist/sentinel/triage/analyzers/ts-parser.d.ts +71 -0
  655. package/dist/sentinel/triage/analyzers/ts-parser.d.ts.map +1 -0
  656. package/dist/sentinel/triage/analyzers/ts-parser.js +323 -0
  657. package/dist/sentinel/triage/analyzers/ts-parser.js.map +1 -0
  658. package/dist/sentinel/triage/analyzers/typescript-analyzer.d.ts +7 -0
  659. package/dist/sentinel/triage/analyzers/typescript-analyzer.d.ts.map +1 -0
  660. package/dist/sentinel/triage/analyzers/typescript-analyzer.js +68 -0
  661. package/dist/sentinel/triage/analyzers/typescript-analyzer.js.map +1 -0
  662. package/dist/sentinel/triage/index.d.ts +10 -0
  663. package/dist/sentinel/triage/index.d.ts.map +1 -0
  664. package/dist/sentinel/triage/index.js +39 -0
  665. package/dist/sentinel/triage/index.js.map +1 -0
  666. package/dist/sentinel/triage/scorer.d.ts +9 -0
  667. package/dist/sentinel/triage/scorer.d.ts.map +1 -0
  668. package/dist/sentinel/triage/scorer.js +28 -0
  669. package/dist/sentinel/triage/scorer.js.map +1 -0
  670. package/dist/sentinel/types.d.ts +125 -0
  671. package/dist/sentinel/types.d.ts.map +1 -0
  672. package/dist/sentinel/types.js +6 -0
  673. package/dist/sentinel/types.js.map +1 -0
  674. package/dist/store/index.d.ts +5 -0
  675. package/dist/store/index.d.ts.map +1 -1
  676. package/dist/store/index.js +24 -1
  677. package/dist/store/index.js.map +1 -1
  678. package/dist/stream-events.js +2 -2
  679. package/dist/stream-events.js.map +1 -1
  680. package/dist/streaming.d.ts +13 -0
  681. package/dist/streaming.d.ts.map +1 -1
  682. package/dist/streaming.js +42 -0
  683. package/dist/streaming.js.map +1 -1
  684. package/dist/swarm/graph.d.ts +81 -2
  685. package/dist/swarm/graph.d.ts.map +1 -1
  686. package/dist/swarm/graph.js +517 -36
  687. package/dist/swarm/graph.js.map +1 -1
  688. package/dist/swarm/index.d.ts +10 -2
  689. package/dist/swarm/index.d.ts.map +1 -1
  690. package/dist/swarm/index.js +6 -1
  691. package/dist/swarm/index.js.map +1 -1
  692. package/dist/swarm/mermaid.d.ts +10 -0
  693. package/dist/swarm/mermaid.d.ts.map +1 -0
  694. package/dist/swarm/mermaid.js +64 -0
  695. package/dist/swarm/mermaid.js.map +1 -0
  696. package/dist/swarm/pool.d.ts +9 -1
  697. package/dist/swarm/pool.d.ts.map +1 -1
  698. package/dist/swarm/pool.js +58 -10
  699. package/dist/swarm/pool.js.map +1 -1
  700. package/dist/swarm/registry.d.ts +11 -1
  701. package/dist/swarm/registry.d.ts.map +1 -1
  702. package/dist/swarm/registry.js +17 -3
  703. package/dist/swarm/registry.js.map +1 -1
  704. package/dist/swarm/scaling.d.ts +95 -0
  705. package/dist/swarm/scaling.d.ts.map +1 -0
  706. package/dist/swarm/scaling.js +214 -0
  707. package/dist/swarm/scaling.js.map +1 -0
  708. package/dist/swarm/snapshot.d.ts +51 -0
  709. package/dist/swarm/snapshot.d.ts.map +1 -0
  710. package/dist/swarm/snapshot.js +115 -0
  711. package/dist/swarm/snapshot.js.map +1 -0
  712. package/dist/swarm/supervisor.d.ts.map +1 -1
  713. package/dist/swarm/supervisor.js +82 -4
  714. package/dist/swarm/supervisor.js.map +1 -1
  715. package/dist/swarm/tracer.d.ts +57 -0
  716. package/dist/swarm/tracer.d.ts.map +1 -0
  717. package/dist/swarm/tracer.js +138 -0
  718. package/dist/swarm/tracer.js.map +1 -0
  719. package/dist/swarm/types.d.ts +23 -1
  720. package/dist/swarm/types.d.ts.map +1 -1
  721. package/dist/swarm/types.js.map +1 -1
  722. package/dist/telemetry.d.ts +41 -0
  723. package/dist/telemetry.d.ts.map +1 -0
  724. package/dist/telemetry.js +69 -0
  725. package/dist/telemetry.js.map +1 -0
  726. package/dist/testing/index.d.ts +33 -0
  727. package/dist/testing/index.d.ts.map +1 -0
  728. package/dist/testing/index.js +95 -0
  729. package/dist/testing/index.js.map +1 -0
  730. package/dist/tools/types.d.ts +2 -0
  731. package/dist/tools/types.d.ts.map +1 -1
  732. package/dist/types.d.ts +9 -0
  733. package/dist/types.d.ts.map +1 -1
  734. package/dist/types.js +1 -1
  735. package/dist/types.js.map +1 -1
  736. package/package.json +160 -108
package/CHANGELOG.md ADDED
@@ -0,0 +1,126 @@
1
+ # Changelog
2
+
3
+ All notable changes to @oni.bot/core are documented here.
4
+
5
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
+ This project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] — 2026-03-13
9
+
10
+ ### Breaking Changes
11
+ - `oni-code` AI coding assistant extracted to `@oni.bot/code` (separate package)
12
+ - `sentinel` code analysis engine extracted to `@oni.bot/sentinel` (separate package)
13
+ - `oni` and `oni-code` CLI binaries removed from this package (install `@oni.bot/code` for the CLI)
14
+
15
+ ### Added
16
+ - `./config` sub-module export (`@oni.bot/core/config`) — JSONC config loader with env var substitution and hierarchical merge
17
+ - `"sideEffects": false` — enables full tree shaking in bundlers
18
+
19
+ ### Framework
20
+ - 5 model adapters (anthropic, openai, openrouter, google, ollama) — zero runtime dependencies
21
+ - 21 total exports: root + 20 named subpaths
22
+
23
+ ## [0.7.0] - 2026-03-08
24
+
25
+ ### Added
26
+ - Structured error codes with `ONI_<CATEGORY>_<NAME>` taxonomy — every error carries code, category, recoverable flag, suggestion, and context
27
+ - Per-node timeouts via `addNode(name, fn, { timeout: ms })` with `NodeTimeoutError`
28
+ - Global default timeout via `compile({ defaults: { nodeTimeout: ms } })`
29
+ - Circuit breaker pattern: `addNode(name, fn, { circuitBreaker: { threshold, resetAfter, fallback? } })`
30
+ - Dead letter queue: `compile({ deadLetterQueue: true })` captures failed node inputs for recovery
31
+ - OpenTelemetry tracing adapter (`ONITracer`) — zero-dep, user brings own tracer
32
+ - Backpressure streaming with `BoundedBuffer` (drop-oldest and error strategies)
33
+ - Testing utilities: `mockModel()`, `assertGraph()`, `createTestHarness()` via `@oni.bot/core/testing`
34
+ - `oni init` CLI command for project scaffolding
35
+ - 7 new error types: `NodeTimeoutError`, `CircuitBreakerOpenError`, `SwarmDeadlockError`, `ModelRateLimitError`, `ModelContextLengthError`, `CheckpointCorruptError`, `StoreKeyNotFoundError`
36
+
37
+ ### Changed
38
+ - `ONIError` now accepts optional `ONIErrorOptions` as second constructor parameter
39
+ - All existing error classes enhanced with structured codes (backward compatible)
40
+
41
+ ## [0.6.3] - 2026-03-05
42
+
43
+ ### Added
44
+ - `set()` alias for `put()` on `InMemoryStore` and `NamespacedStore`
45
+
46
+ ## [0.6.2] - 2026-03-05
47
+
48
+ ### Fixed
49
+ - `createReactAgent` now accepts `ONIModel` (auto-adapts chat to invoke)
50
+
51
+ ### Changed
52
+ - Package renamed from `@oni-bot/core` to `@oni.bot/core`
53
+
54
+ ## [0.6.1] - 2026-03-05
55
+
56
+ ### Changed
57
+ - Removed all external framework references from codebase and documentation
58
+
59
+ ### Fixed
60
+ - Resolved TypeScript strict errors in swarm template `Send` casts
61
+
62
+ ## [0.6.0] - 2026-03-04
63
+
64
+ ### Added
65
+ - `SwarmGraph` builder for multi-agent orchestration
66
+ - `SwarmGraph.hierarchical()` template — supervisor-workers pattern
67
+ - `SwarmGraph.fanOut()` template — parallel agent execution with reducer
68
+ - `SwarmGraph.pipeline()` template — linear chain with conditional transitions
69
+ - `SwarmGraph.peerNetwork()` template — decentralized agent handoffs
70
+ - `SwarmGraph.mapReduce()` template — parallel map with reducer
71
+ - `SwarmGraph.debate()` template — multi-round parallel debate with judge
72
+ - `SwarmGraph.hierarchicalMesh()` template — nested team coordination
73
+ - Lazy coordination auto-wiring (broker and pubsub) on `SwarmGraph`
74
+ - Handoff execution — agent `Handoff` returns converted to `Command` routing
75
+ - Retry-then-fallback — agents retry on failure, fall back to supervisor
76
+
77
+ ### Changed
78
+ - Replaced `SwarmLLM` with `ONIModel` in supervisor routing
79
+
80
+ ## [0.5.0] - 2026-03-04
81
+
82
+ ### Added
83
+ - `ONIModel` interface and core LLM types
84
+ - Anthropic LLM adapter
85
+ - OpenAI LLM adapter
86
+ - Ollama LLM adapter
87
+ - Google Gemini LLM adapter
88
+ - Models export path and re-exports
89
+ - Tool framework with `defineTool()` and `ToolContext`
90
+ - `AgentContext` and agent types
91
+ - `defineAgent()` declarative agent factory
92
+ - `agent()` functional agent factory
93
+ - `addAgent()` on `StateGraph` to wire agent nodes
94
+ - Request/response and pub/sub coordination patterns
95
+ - Tool permission guardrails
96
+ - Budget tracking and cost control guardrails
97
+ - Content filtering guardrails
98
+ - Audit trail and guardrails exports
99
+ - `EventBus` for structured lifecycle events
100
+ - Guardrails and event bus wired into compile/execution pipeline
101
+ - Integration tests for agents, tools, and guardrails
102
+
103
+ ### Removed
104
+ - Direct `openai` dependency (adapters are now bring-your-own-client)
105
+
106
+ ## [0.4.0] - 2026-03-04
107
+
108
+ ### Added
109
+ - `StateGraph` builder with `addNode()`, `addEdge()`, `addConditionalEdges()`
110
+ - Pregel execution engine (`ONIPregelRunner`) with parallel superstep execution
111
+ - `Command` and `Send` primitives for dynamic routing
112
+ - Subgraph support via `addSubgraph()`
113
+ - Functional API (`entrypoint`, `task`)
114
+ - `MemoryCheckpointer` and `NoopCheckpointer`
115
+ - `InMemoryStore` and `NamespacedStore` for shared key-value state
116
+ - Human-in-the-loop via `interrupt()` and `getUserInput()`
117
+ - Token streaming with `emitToken()` and `TokenStreamWriter`
118
+ - Stream modes: `values`, `updates`, `events`, `messages`, `custom`
119
+ - Graph inspection via `getGraphDef()`
120
+ - `createReactAgent` prebuilt for tool-calling loops
121
+ - `ToolNode` prebuilt for automatic tool dispatch
122
+ - Messages reducer (`messagesReducer`, `addMessages`, `removeMessages`)
123
+ - Retry policies with configurable backoff
124
+ - Swarm primitives: `AgentRegistry`, `AgentPool`, `Mailbox`, `Supervisor`
125
+ - Ephemeral channel support
126
+ - Map-reduce parallel fan-out pattern
package/README.md CHANGED
@@ -1,308 +1,109 @@
1
- # @oni.bot/core
1
+ <p align="center">
2
+ <strong>@oni.bot/core</strong>
3
+ </p>
2
4
 
3
- > The graph execution engine for agent swarms — build single agents or orchestrate multi-agent systems in TypeScript.
4
- > Zero dependencies. Full TypeScript generics. Pregel-based superstep engine. 7 swarm templates.
5
+ <h3 align="center">The graph execution engine for production agent swarms.</h3>
5
6
 
6
- Part of the **ONI Platform** (Open Neural Infrastructure).
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@oni.bot/core"><img src="https://img.shields.io/npm/v/@oni.bot/core.svg" alt="npm version" /></a>
9
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT License" /></a>
10
+ <img src="https://img.shields.io/badge/dependencies-0-brightgreen" alt="zero dependencies" />
11
+ </p>
7
12
 
8
13
  ---
9
14
 
10
- ## What It Is
11
-
12
- `@oni.bot/core` is a graph execution framework in TypeScript with production-ready swarm orchestration. Build single agents or multi-agent swarms with:
13
-
14
- - **State management** — typed channels with pluggable reducers (`lastValue`, `appendList`, `mergeObject`, `ephemeralValue`)
15
- - **Graph execution** — Pregel superstep model with parallel node execution, fan-out/fan-in, map-reduce
16
- - **5 stream modes** — `values`, `updates`, `debug`, `messages` (token-level), and `custom` events
17
- - **Checkpointing** — Memory, SQLite, PostgreSQL, or custom backends with time travel and fork
18
- - **Human-in-the-loop** — compile-time interrupts + runtime `interrupt()` with resume, typed input, approval, selection
19
- - **Messages** — smart reducer with deduplication, `RemoveMessage`, `UpdateMessage`, filtering, trimming
20
- - **Cross-thread Store** — namespaced KV store with semantic search for agent long-term memory
21
- - **Runtime context** — `getConfig()`, `getStore()`, `getStreamWriter()` via AsyncLocalStorage
22
- - **Swarm orchestration** — 7 swarm templates: hierarchical, fan-out, pipeline, peer-network, map-reduce, debate, hierarchical-mesh
23
- - **Functional API** — `task()`, `entrypoint()`, `pipe()`, `branch()` as alternatives to the builder pattern
24
- - **Prebuilt agents** — `createReactAgent()` with bring-your-own LLM
25
- - **Injected tools** — tools that auto-receive state + store from runtime context
26
- - **Graph inspection** — topology descriptors, Mermaid diagrams, cycle detection
27
-
28
- ---
29
-
30
- ## Installation
15
+ ## Install
31
16
 
32
17
  ```bash
33
18
  npm install @oni.bot/core
34
19
  ```
35
20
 
36
- **Optional peer dependencies:**
37
-
38
- ```bash
39
- npm install better-sqlite3 # for SqliteCheckpointer
40
- npm install pg # for PostgresCheckpointer
41
- ```
21
+ - **Zero runtime dependencies.** Self-contained TypeScript. No transitive supply-chain risk. Runs in Node.js 18+, serverless functions, and edge runtimes without adaptation.
22
+ - **5 model adapters via raw HTTP.** Anthropic, OpenAI, OpenRouter, Google, and Ollama — no vendor SDKs required.
23
+ - **21 exports.** Root package plus 20 named subpaths for precise tree shaking.
42
24
 
43
25
  ---
44
26
 
45
27
  ## Quick Start
46
28
 
47
- ### Minimal graph
48
-
49
29
  ```ts
50
- import { StateGraph, START, END, lastValue, appendList } from "@oni.bot/core";
30
+ import { StateGraph, START, END, lastValue, anthropic } from "@oni.bot/core";
31
+
32
+ type State = {
33
+ question: string;
34
+ answer: string;
35
+ };
51
36
 
52
- type MyState = { query: string; answer: string; log: string[] };
37
+ const model = anthropic("claude-sonnet-4-6");
53
38
 
54
- const graph = new StateGraph<MyState>({
39
+ const graph = new StateGraph<State>({
55
40
  channels: {
56
- query: lastValue(() => ""),
57
- answer: lastValue(() => ""),
58
- log: appendList(() => []),
41
+ question: lastValue<string>(() => ""),
42
+ answer: lastValue<string>(() => ""),
59
43
  },
60
44
  });
61
45
 
62
- graph.addNode("agent", async (state) => {
63
- return { answer: `Response to: ${state.query}`, log: ["agent ran"] };
46
+ graph.addNode("answer", async (state) => {
47
+ const response = await model.chat({
48
+ messages: [{ role: "user", content: state.question }],
49
+ });
50
+ return { answer: response.content as string };
64
51
  });
65
52
 
66
- graph.addEdge(START, "agent");
67
- graph.addEdge("agent", END);
53
+ graph.addEdge(START, "answer");
54
+ graph.addEdge("answer", END);
68
55
 
69
56
  const app = graph.compile();
70
- const result = await app.invoke({ query: "What is ONI?" });
71
- ```
72
-
73
- ### Streaming
74
-
75
- ```ts
76
- for await (const event of app.stream({ query: "hello" }, { streamMode: "updates" })) {
77
- console.log(event.node, event.data);
78
- }
79
57
 
80
- // Multiple modes simultaneously
81
- for await (const evt of app.stream(input, { streamMode: ["values", "messages"] })) {
82
- if (evt.mode === "messages") process.stdout.write(evt.data.chunk);
58
+ for await (const chunk of app.stream(
59
+ { question: "What is a Pregel execution model?" },
60
+ { streamMode: "values" },
61
+ )) {
62
+ console.log(chunk.answer);
83
63
  }
84
64
  ```
85
65
 
86
- ### Functional API
87
-
88
- ```ts
89
- import { entrypoint, lastValue } from "@oni.bot/core";
90
-
91
- const app = entrypoint(
92
- { channels: { query: lastValue(() => ""), answer: lastValue(() => "") } },
93
- async (state) => ({ answer: await myLLM(state.query) })
94
- );
95
-
96
- const result = await app.invoke({ query: "hello" });
97
- ```
98
-
99
- ---
100
-
101
- ## Swarm Templates
102
-
103
- Build multi-agent systems with pre-wired templates. Each template configures routing, coordination, and error handling automatically.
104
-
105
- ### Hierarchical (Supervisor -> Workers)
106
-
107
- ```ts
108
- import { SwarmGraph } from "@oni.bot/core/swarm";
109
-
110
- const swarm = SwarmGraph.hierarchical<MyState>({
111
- supervisor: { model: myModel, strategy: "llm", maxRounds: 10 },
112
- agents: [researcher, writer, critic],
113
- onError: "fallback",
114
- });
115
-
116
- const app = swarm.compile();
117
- const result = await app.invoke({ task: "Write a blog post about AI" });
118
- ```
119
-
120
- ### All 7 Templates
121
-
122
- | Template | Use case | Pattern |
123
- |---|---|---|
124
- | `SwarmGraph.hierarchical()` | Supervisor routes to workers | Supervisor -> Agent -> Supervisor -> END |
125
- | `SwarmGraph.fanOut()` | Parallel execution + aggregation | Send to all -> Collect -> Reduce |
126
- | `SwarmGraph.pipeline()` | Sequential processing chain | A -> B -> C -> END |
127
- | `SwarmGraph.peerNetwork()` | Agents hand off to each other | Dynamic peer-to-peer routing |
128
- | `SwarmGraph.mapReduce()` | Distribute N items across pool | Split -> AgentPool -> Collect -> Reduce |
129
- | `SwarmGraph.debate()` | Multi-round argumentation | Judge -> Debaters -> Judge -> consensus? |
130
- | `SwarmGraph.hierarchicalMesh()` | Nested supervisor teams | Coordinator -> Team subgraphs -> Coordinator |
131
-
132
- See `examples/swarm/` for complete runnable examples of each template.
133
-
134
- ### Single Agent — No Swarm Required
135
-
136
- The swarm layer is purely additive. If you just need one agent:
137
-
138
- ```ts
139
- import { defineAgent } from "@oni.bot/core/agents";
140
- import { anthropic } from "@oni.bot/core/models";
141
-
142
- const agent = defineAgent({
143
- name: "assistant",
144
- model: anthropic("claude-sonnet-4-6"),
145
- tools: [webSearch],
146
- systemPrompt: "You are a helpful assistant.",
147
- });
148
-
149
- const result = await agent.invoke({ messages: [{ role: "user", content: "Hello!" }] });
150
- ```
151
-
152
- Entry points at every level: `ONIModel` -> `defineAgent()` -> `StateGraph` -> `SwarmGraph`.
153
-
154
66
  ---
155
67
 
156
- ## Features at a Glance
157
-
158
- | Feature | Description | Example | Guide |
159
- |---|---|---|---|
160
- | Channels | Typed state with pluggable reducers | `examples/ephemeral-channels.ts` | [Section 2](docs/GUIDE.md#2-channels-deep-dive) |
161
- | Command routing | State update + routing in one return | `examples/command-routing.ts` | [Section 3](docs/GUIDE.md#3-edges-and-routing) |
162
- | Token streaming | `messages` mode + `getStreamWriter()` | `examples/messages-stream.ts` | [Section 4](docs/GUIDE.md#4-streaming) |
163
- | Multi-stream | Multiple stream modes simultaneously | `examples/multi-stream.ts` | [Section 4](docs/GUIDE.md#4-streaming) |
164
- | Custom events | Emit named events via StreamWriter | `examples/custom-stream.ts` | [Section 4](docs/GUIDE.md#4-streaming) |
165
- | Messages | Smart reducer, helpers, RemoveMessage | `examples/messages-reducer.ts` | [Section 5](docs/GUIDE.md#5-messages) |
166
- | Checkpointing | Memory, SQLite, PostgreSQL backends | `examples/time-travel.ts` | [Section 6](docs/GUIDE.md#6-checkpointing) |
167
- | HITL interrupts | `interrupt()`, `getUserApproval()` | `examples/hitl/` | [Section 7](docs/GUIDE.md#7-human-in-the-loop) |
168
- | Dynamic interrupts | Runtime breakpoint conditions | `examples/dynamic-interrupt.ts` | [Section 7](docs/GUIDE.md#7-human-in-the-loop) |
169
- | Cross-thread Store | Namespaced KV with semantic search | `examples/store-memory.ts` | [Section 8](docs/GUIDE.md#8-cross-thread-store) |
170
- | Subgraphs | Nested skeletons + Command.PARENT | `examples/subgraph.ts` | [Section 9](docs/GUIDE.md#9-subgraphs) |
171
- | Parallel fan-out | Static + dynamic (Send API) | `examples/parallel-fanout.ts` | [Section 10](docs/GUIDE.md#10-parallel-execution) |
172
- | Map-reduce | Send + fan-in barrier | `examples/map-reduce.ts` | [Section 10](docs/GUIDE.md#10-parallel-execution) |
173
- | Runtime context | `getConfig()`, `getStore()`, etc. | `examples/runtime-context.ts` | [Section 11](docs/GUIDE.md#11-runtime-context) |
174
- | Retry + cache | Per-node retry policy with backoff | `examples/retry-policy.ts` | [Section 12](docs/GUIDE.md#12-retry-and-cache) |
175
- | Functional API | `task`, `entrypoint`, `pipe`, `branch` | `examples/functional-api.ts` | [Section 13](docs/GUIDE.md#13-functional-api) |
176
- | ReAct agent | Prebuilt agent loop with tools | `examples/react-agent.ts` | [Section 14](docs/GUIDE.md#14-prebuilt-components) |
177
- | Graph inspection | Topology, Mermaid, cycle detection | `examples/graph-inspection.ts` | [Section 16](docs/GUIDE.md#16-graph-inspection) |
178
- | Time travel | `getHistory`, `getStateAt`, `forkFrom` | `examples/time-travel.ts` | [Section 17](docs/GUIDE.md#17-time-travel) |
179
- | Swarm | 7 templates + Supervisor, Handoff, retry-fallback, coordination | `examples/swarm/` | [Section 18](docs/GUIDE.md#18-swarm-orchestration) |
68
+ ## Sub-modules
180
69
 
181
- ---
182
-
183
- ## Core Concepts
184
-
185
- ### Channels
186
-
187
- Every state field has a **channel** — a reducer + default factory that controls how concurrent updates merge.
188
-
189
- ```ts
190
- import { lastValue, appendList, mergeObject, ephemeralValue } from "@oni.bot/core";
191
-
192
- const channels = {
193
- query: lastValue(() => ""), // last write wins
194
- messages: appendList(() => []), // arrays concatenate
195
- context: mergeObject(() => ({})), // shallow merge
196
- scratch: ephemeralValue(() => null), // resets each superstep
197
- };
198
- ```
199
-
200
- ### Nodes, edges, compile
201
-
202
- ```ts
203
- graph.addNode("agent", async (state, config?) => {
204
- return { answer: "partial update" }; // or Command, or void
205
- });
206
-
207
- graph.addEdge(START, "agent");
208
- graph.addConditionalEdges("agent", (state) => state.done ? END : "tools");
209
-
210
- const app = graph.compile({ checkpointer, store });
211
- ```
70
+ 21 entry points — import only what you use.
212
71
 
213
- ### Invoke / Stream / Batch
214
-
215
- ```ts
216
- const result = await app.invoke(input, { threadId: "t1" });
217
- const stream = app.stream(input, { streamMode: "updates" });
218
- const results = await app.batch([input1, input2]);
219
- ```
220
-
221
- For the full progressive tutorial, see **[docs/GUIDE.md](docs/GUIDE.md)**.
222
-
223
- ---
224
-
225
- ## Sub-module Exports
226
-
227
- Tree-shakeable sub-module imports for bundle optimization:
228
-
229
- | Import path | Contents |
72
+ | Subpath | Description |
230
73
  |---|---|
231
- | `@oni.bot/core` | Everything (116+ exports) |
232
- | `@oni.bot/core/prebuilt` | `createReactAgent`, `createToolNode`, `toolsCondition`, types |
233
- | `@oni.bot/core/swarm` | `SwarmGraph` (7 templates), `AgentRegistry`, `AgentPool`, `Handoff`, `Supervisor`, `Mailbox`, coordination |
234
- | `@oni.bot/core/hitl` | `interrupt`, `getUserInput`, `getUserApproval`, `getUserSelection`, session store |
235
- | `@oni.bot/core/store` | `BaseStore`, `InMemoryStore`, `NamespacedStore`, `AgentMemoryStore` |
236
- | `@oni.bot/core/messages` | `messagesChannel`, `messagesReducer`, helpers, `RemoveMessage`, `UpdateMessage` |
237
- | `@oni.bot/core/checkpointers` | `SqliteCheckpointer`, `PostgresCheckpointer`, `NamespacedCheckpointer` |
238
- | `@oni.bot/core/functional` | `task`, `entrypoint`, `pipe`, `branch` |
239
- | `@oni.bot/core/inspect` | `buildGraphDescriptor`, `toMermaidDetailed` |
240
- | `@oni.bot/core/streaming` | `emitToken`, `TokenStreamWriter`, `StreamWriterImpl` |
241
- | `@oni.bot/core/models` | `ONIModel`, `anthropic()`, `openai()` model factories |
242
- | `@oni.bot/core/agents` | `defineAgent`, `agent()`, `AgentContext`, types |
243
- | `@oni.bot/core/coordination` | `RequestReplyBroker`, `PubSub` coordination primitives |
244
- | `@oni.bot/core/guardrails` | `InputGuardrail`, `OutputGuardrail`, guardrail types |
245
- | `@oni.bot/core/tools` | `defineTool`, `createInjectedTool`, tool types |
246
-
247
- ---
248
-
249
- ## Architecture
250
-
251
- ```
252
- @oni.bot/core v0.6.0
253
- ├── StateGraph / MessageGraph ← fluent graph builder
254
- │ ├── addNode / addSubgraph ← nodes are async functions or compiled skeletons
255
- │ ├── addEdge / addConditional ← static + dynamic routing
256
- │ └── compile()
257
- │ └── ONIPregelRunner ← superstep execution engine
258
- │ ├── parallel node execution (Promise.all per superstep)
259
- │ ├── channel reducers (state merging)
260
- │ ├── edge resolution + Command routing
261
- │ ├── Send API (dynamic fan-out)
262
- │ ├── checkpointing (Memory / SQLite / Postgres / custom)
263
- │ ├── interrupt handling (boundary + in-node)
264
- │ ├── retry engine (exponential backoff)
265
- │ ├── runtime context (AsyncLocalStorage)
266
- │ └── stream writer (tokens + custom events + messages)
267
-
268
- ├── Messages ← smart reducer, dedup, RemoveMessage, UpdateMessage
269
- ├── HITL ← interrupt(), getUserInput, sessions, resume
270
- ├── Store ← BaseStore, InMemoryStore, NamespacedStore, AgentMemoryStore
271
- ├── Swarm ← SwarmGraph (7 templates), Supervisor, Handoff, AgentPool, coordination
272
- │ ├── Templates ← hierarchical, fanOut, pipeline, peerNetwork, mapReduce, debate, hierarchicalMesh
273
- │ ├── Coordination ← RequestReplyBroker, PubSub (lazy auto-wired)
274
- │ └── Retry ← retry-then-fallback error recovery
275
- ├── Functional ← task, entrypoint, pipe, branch
276
- ├── Prebuilt ← createReactAgent, createToolNode, toolsCondition
277
- ├── Inspect ← graph descriptors, Mermaid, cycle detection
278
- ├── Injected Tools ← createInjectedTool (state + store auto-injected)
279
- ├── Stream Events ← streamEvents v2 protocol
280
- └── Errors ← ONIError hierarchy, ONIInterrupt
281
- ```
74
+ | `@oni.bot/core` | Core engine: `StateGraph`, `START`, `END`, channels, `Command`, `Send` |
75
+ | `@oni.bot/core/prebuilt` | Prebuilt agents: `createReactAgent`, `defineAgent` |
76
+ | `@oni.bot/core/swarm` | Swarm templates: `SwarmGraph` (hierarchical, fan-out, pipeline, peer-network, map-reduce, debate, mesh) |
77
+ | `@oni.bot/core/hitl` | Human-in-the-loop: `interrupt`, `getUserInput`, `getUserApproval` |
78
+ | `@oni.bot/core/store` | Cross-thread KV store: `InMemoryStore`, `BaseStore`, `NamespacedStore` |
79
+ | `@oni.bot/core/messages` | Message channel primitives: `messagesChannel`, `MessageAnnotation` |
80
+ | `@oni.bot/core/checkpointers` | Persistence backends: `MemoryCheckpointer`, `SqliteCheckpointer` |
81
+ | `@oni.bot/core/functional` | Functional API: `task`, `entrypoint`, `pipe`, `branch` |
82
+ | `@oni.bot/core/inspect` | Graph inspection: `buildGraphDescriptor`, `toMermaid`, cycle detection |
83
+ | `@oni.bot/core/streaming` | Token streaming: `emitToken`, `getStreamWriter`, `StreamWriter` |
84
+ | `@oni.bot/core/models` | LLM adapters: `anthropic`, `openai`, `openrouter`, `google`, `ollama` |
85
+ | `@oni.bot/core/tools` | Tool definition: `defineTool`, `ToolSchema`, `ToolResult` |
86
+ | `@oni.bot/core/agents` | Agent builder: `defineAgent`, `AgentDefinition` |
87
+ | `@oni.bot/core/coordination` | Inter-agent messaging: `RequestReplyBroker`, `PubSub` |
88
+ | `@oni.bot/core/events` | Event bus: `EventBus`, 10 lifecycle event types |
89
+ | `@oni.bot/core/guardrails` | Budget and safety: `BudgetTracker`, `ContentFilter`, `PermissionGuard` |
90
+ | `@oni.bot/core/testing` | Test utilities: `mockModel`, `assertGraph`, `createTestHarness` |
91
+ | `@oni.bot/core/harness` | Agentic loop: `ONIHarness`, `AgentLoop`, `HooksEngine`, `ContextCompactor` |
92
+ | `@oni.bot/core/mcp` | MCP client: JSON-RPC/stdio tool bridge |
93
+ | `@oni.bot/core/lsp` | LSP client: language server protocol primitives |
94
+ | `@oni.bot/core/config` | Config loader: JSONC parsing, environment variable resolution |
282
95
 
283
96
  ---
284
97
 
285
- ## ONI Platform
286
-
287
- `@oni.bot/core` is the foundation layer. Other ONI packages build on top:
288
-
289
- | Package | Built on |
290
- |---|---|
291
- | `@oni/agentOS` | AgentOS ADE — multi-agent orchestration |
292
- | `@oni/vectorforge` | VectorForge — knowledge base & SOP retrieval |
293
- | `@oni/cic` | CIC Agent Assist — call center intelligence |
294
- | `@oni/oats` | OATS — Five9 AI Agent Assist integration |
295
-
296
- ---
98
+ ## Ecosystem
297
99
 
298
- ## Documentation
100
+ **Built on @oni.bot/core:**
299
101
 
300
- - **[Developer Guide](docs/GUIDE.md)**Progressive tutorial from zero to advanced (19 sections)
301
- - **[API Reference](docs/API.md)**Complete reference for all 116+ public exports
302
- - **[Examples](examples/)** — 30+ runnable example files covering every feature
102
+ - [`@oni.bot/code`](https://github.com/AP3X-Dev) — AI coding assistant CLI *(coming soon)*
103
+ - [`@oni.bot/sentinel`](https://github.com/AP3X-Dev) — Code analysis and review engine *(coming soon)*
303
104
 
304
105
  ---
305
106
 
306
107
  ## License
307
108
 
308
- MIT — ONI Platform
109
+ MIT — [AP3X Dev](https://github.com/AP3X-Dev)
package/SECURITY.md ADDED
@@ -0,0 +1,71 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ | ------- | ------------------ |
7
+ | 0.7.x | :white_check_mark: |
8
+ | < 0.7 | :x: |
9
+
10
+ ## Reporting a Vulnerability
11
+
12
+ If you discover a security vulnerability in `@oni.bot/core`, please report it responsibly:
13
+
14
+ 1. **Do not** open a public GitHub issue
15
+ 2. Email **security@oni.bot** with:
16
+ - Description of the vulnerability
17
+ - Steps to reproduce
18
+ - Potential impact
19
+ - Suggested fix (if any)
20
+ 3. You will receive acknowledgment within **48 hours**
21
+ 4. A fix will be released within **7 days** for critical issues
22
+
23
+ ## Security Considerations
24
+
25
+ ### Tool Execution
26
+
27
+ `@oni.bot/core` provides a tool execution framework. The framework itself does not execute arbitrary code, but user-defined node functions and tools can. Users are responsible for:
28
+
29
+ - Validating tool inputs before execution
30
+ - Using the built-in `Permissions` guardrail to restrict tool access
31
+ - Implementing appropriate sandboxing for untrusted tool code
32
+
33
+ ### Model API Keys
34
+
35
+ API keys for model providers (OpenAI, Anthropic, etc.) should be:
36
+
37
+ - Stored in environment variables, not in code
38
+ - Never logged or included in error messages
39
+ - Rotated regularly
40
+
41
+ ### Budget Enforcement
42
+
43
+ The `BudgetTracker` guardrail provides cost limits but should not be the sole control:
44
+
45
+ - Set conservative budget limits
46
+ - Monitor usage through the telemetry/audit system
47
+ - Implement server-side rate limiting for production deployments
48
+
49
+ ### Checkpoint Data
50
+
51
+ Checkpoint data may contain sensitive state. When using persistent checkpointers:
52
+
53
+ - Use encrypted storage for SQLite/PostgreSQL backends
54
+ - Implement TTL-based cleanup for old checkpoints
55
+ - Restrict access to checkpoint storage
56
+
57
+ ### Content Filtering
58
+
59
+ The guardrails module provides content filters (PII, topic). These are best-effort:
60
+
61
+ - Do not rely solely on built-in filters for compliance
62
+ - Layer additional filtering for sensitive domains (healthcare, finance)
63
+ - Audit filter effectiveness regularly
64
+
65
+ ## Dependencies
66
+
67
+ `@oni.bot/core` ships with **zero runtime dependencies**. Optional peer dependencies:
68
+
69
+ - `better-sqlite3` — for SQLite checkpointing (optional)
70
+
71
+ This minimizes supply chain attack surface.
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/checkpointers/sqlite.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAQzF,qBAAa,kBAAkB,CAAC,CAAC,CAAE,YAAW,eAAe,CAAC,CAAC,CAAC;IAC1C,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAvC,OAAO;WAEM,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IA2BhE,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAOvD,GAAG,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAYxC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IA6BjF,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAK7E,KAAK,IAAI,IAAI;IAEb,OAAO,CAAC,WAAW;CAYpB"}
1
+ {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/checkpointers/sqlite.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AASzF,qBAAa,kBAAkB,CAAC,CAAC,CAAE,YAAW,eAAe,CAAC,CAAC,CAAC;IAC1C,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAvC,OAAO;WAEM,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IA4BhE,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAOvD,GAAG,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAaxC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IA6BjF,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAK7E,KAAK,IAAI,IAAI;IAEb,OAAO,CAAC,WAAW;CA4BpB"}