@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.
- package/CHANGELOG.md +126 -0
- package/README.md +64 -263
- package/SECURITY.md +71 -0
- package/dist/checkpointers/sqlite.d.ts.map +1 -1
- package/dist/checkpointers/sqlite.js +42 -25
- package/dist/checkpointers/sqlite.js.map +1 -1
- package/dist/circuit-breaker.d.ts +20 -0
- package/dist/circuit-breaker.d.ts.map +1 -0
- package/dist/circuit-breaker.js +58 -0
- package/dist/circuit-breaker.js.map +1 -0
- package/dist/cli/build.d.ts +11 -0
- package/dist/cli/build.d.ts.map +1 -0
- package/dist/cli/build.js +61 -0
- package/dist/cli/build.js.map +1 -0
- package/dist/cli/dev.d.ts +5 -0
- package/dist/cli/dev.d.ts.map +1 -0
- package/dist/cli/dev.js +54 -0
- package/dist/cli/dev.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +21 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +4 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +34 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/inspect.d.ts +5 -0
- package/dist/cli/inspect.d.ts.map +1 -0
- package/dist/cli/inspect.js +85 -0
- package/dist/cli/inspect.js.map +1 -0
- package/dist/cli/router.d.ts +14 -0
- package/dist/cli/router.d.ts.map +1 -0
- package/dist/cli/router.js +107 -0
- package/dist/cli/router.js.map +1 -0
- package/dist/cli/run.d.ts +5 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +53 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/templates.d.ts +9 -0
- package/dist/cli/templates.d.ts.map +1 -0
- package/dist/cli/templates.js +159 -0
- package/dist/cli/templates.js.map +1 -0
- package/dist/cli/test.d.ts +3 -0
- package/dist/cli/test.d.ts.map +1 -0
- package/dist/cli/test.js +29 -0
- package/dist/cli/test.js.map +1 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +3 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +37 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +180 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/types.d.ts +74 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +5 -0
- package/dist/config/types.js.map +1 -0
- package/dist/coordination/pubsub.d.ts +4 -0
- package/dist/coordination/pubsub.d.ts.map +1 -1
- package/dist/coordination/pubsub.js +8 -0
- package/dist/coordination/pubsub.js.map +1 -1
- package/dist/coordination/request-reply.d.ts +3 -1
- package/dist/coordination/request-reply.d.ts.map +1 -1
- package/dist/coordination/request-reply.js +11 -2
- package/dist/coordination/request-reply.js.map +1 -1
- package/dist/dlq.d.ts +17 -0
- package/dist/dlq.d.ts.map +1 -0
- package/dist/dlq.js +41 -0
- package/dist/dlq.js.map +1 -0
- package/dist/errors.d.ts +43 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +179 -8
- package/dist/errors.js.map +1 -1
- package/dist/events/bridge.d.ts +17 -0
- package/dist/events/bridge.d.ts.map +1 -0
- package/dist/events/bridge.js +67 -0
- package/dist/events/bridge.js.map +1 -0
- package/dist/events/bus.d.ts +9 -0
- package/dist/events/bus.d.ts.map +1 -1
- package/dist/events/bus.js +39 -4
- package/dist/events/bus.js.map +1 -1
- package/dist/events/index.d.ts +2 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +2 -0
- package/dist/events/index.js.map +1 -1
- package/dist/events/types.d.ts +123 -1
- package/dist/events/types.d.ts.map +1 -1
- package/dist/graph.d.ts +17 -0
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js +29 -10
- package/dist/graph.js.map +1 -1
- package/dist/guardrails/types.d.ts +1 -1
- package/dist/guardrails/types.d.ts.map +1 -1
- package/dist/harness/agent-loop.d.ts +8 -0
- package/dist/harness/agent-loop.d.ts.map +1 -0
- package/dist/harness/agent-loop.js +524 -0
- package/dist/harness/agent-loop.js.map +1 -0
- package/dist/harness/context-compactor.d.ts +92 -0
- package/dist/harness/context-compactor.d.ts.map +1 -0
- package/dist/harness/context-compactor.js +201 -0
- package/dist/harness/context-compactor.js.map +1 -0
- package/dist/harness/harness.d.ts +41 -0
- package/dist/harness/harness.d.ts.map +1 -0
- package/dist/harness/harness.js +140 -0
- package/dist/harness/harness.js.map +1 -0
- package/dist/harness/hooks-engine.d.ts +77 -0
- package/dist/harness/hooks-engine.d.ts.map +1 -0
- package/dist/harness/hooks-engine.js +232 -0
- package/dist/harness/hooks-engine.js.map +1 -0
- package/dist/harness/index.d.ts +17 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +21 -0
- package/dist/harness/index.js.map +1 -0
- package/dist/harness/safety-gate.d.ts +29 -0
- package/dist/harness/safety-gate.d.ts.map +1 -0
- package/dist/harness/safety-gate.js +72 -0
- package/dist/harness/safety-gate.js.map +1 -0
- package/dist/harness/skill-loader.d.ts +76 -0
- package/dist/harness/skill-loader.d.ts.map +1 -0
- package/dist/harness/skill-loader.js +244 -0
- package/dist/harness/skill-loader.js.map +1 -0
- package/dist/harness/todo-module.d.ts +39 -0
- package/dist/harness/todo-module.d.ts.map +1 -0
- package/dist/harness/todo-module.js +179 -0
- package/dist/harness/todo-module.js.map +1 -0
- package/dist/harness/types.d.ts +100 -0
- package/dist/harness/types.d.ts.map +1 -0
- package/dist/harness/types.js +9 -0
- package/dist/harness/types.js.map +1 -0
- package/dist/harness/validate-args.d.ts +16 -0
- package/dist/harness/validate-args.d.ts.map +1 -0
- package/dist/harness/validate-args.js +132 -0
- package/dist/harness/validate-args.js.map +1 -0
- package/dist/hitl/interrupt.d.ts.map +1 -1
- package/dist/hitl/interrupt.js +7 -6
- package/dist/hitl/interrupt.js.map +1 -1
- package/dist/index.d.ts +16 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -13
- package/dist/index.js.map +1 -1
- package/dist/internal/timeout.d.ts +2 -0
- package/dist/internal/timeout.d.ts.map +1 -0
- package/dist/internal/timeout.js +16 -0
- package/dist/internal/timeout.js.map +1 -0
- package/dist/lsp/client.d.ts +70 -0
- package/dist/lsp/client.d.ts.map +1 -0
- package/dist/lsp/client.js +421 -0
- package/dist/lsp/client.js.map +1 -0
- package/dist/lsp/index.d.ts +77 -0
- package/dist/lsp/index.d.ts.map +1 -0
- package/dist/lsp/index.js +183 -0
- package/dist/lsp/index.js.map +1 -0
- package/dist/lsp/servers.d.ts +48 -0
- package/dist/lsp/servers.d.ts.map +1 -0
- package/dist/lsp/servers.js +108 -0
- package/dist/lsp/servers.js.map +1 -0
- package/dist/lsp/types.d.ts +142 -0
- package/dist/lsp/types.d.ts.map +1 -0
- package/dist/lsp/types.js +16 -0
- package/dist/lsp/types.js.map +1 -0
- package/dist/mcp/client.d.ts +56 -0
- package/dist/mcp/client.d.ts.map +1 -0
- package/dist/mcp/client.js +170 -0
- package/dist/mcp/client.js.map +1 -0
- package/dist/mcp/convert.d.ts +26 -0
- package/dist/mcp/convert.d.ts.map +1 -0
- package/dist/mcp/convert.js +56 -0
- package/dist/mcp/convert.js.map +1 -0
- package/dist/mcp/index.d.ts +21 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +19 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/transport.d.ts +56 -0
- package/dist/mcp/transport.d.ts.map +1 -0
- package/dist/mcp/transport.js +204 -0
- package/dist/mcp/transport.js.map +1 -0
- package/dist/mcp/types.d.ts +96 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +11 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/models/anthropic.d.ts.map +1 -1
- package/dist/models/anthropic.js +78 -41
- package/dist/models/anthropic.js.map +1 -1
- package/dist/models/google.d.ts.map +1 -1
- package/dist/models/google.js +54 -52
- package/dist/models/google.js.map +1 -1
- package/dist/models/http-error.d.ts +16 -0
- package/dist/models/http-error.d.ts.map +1 -0
- package/dist/models/http-error.js +67 -0
- package/dist/models/http-error.js.map +1 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +3 -0
- package/dist/models/index.js.map +1 -1
- package/dist/models/ollama.d.ts.map +1 -1
- package/dist/models/ollama.js +4 -3
- package/dist/models/ollama.js.map +1 -1
- package/dist/models/openai.d.ts.map +1 -1
- package/dist/models/openai.js +42 -45
- package/dist/models/openai.js.map +1 -1
- package/dist/models/openrouter.d.ts +26 -0
- package/dist/models/openrouter.d.ts.map +1 -0
- package/dist/models/openrouter.js +361 -0
- package/dist/models/openrouter.js.map +1 -0
- package/dist/models/sse.d.ts +9 -0
- package/dist/models/sse.d.ts.map +1 -0
- package/dist/models/sse.js +45 -0
- package/dist/models/sse.js.map +1 -0
- package/dist/models/types.d.ts +10 -0
- package/dist/models/types.d.ts.map +1 -1
- package/dist/oni-code/agent-registry.d.ts +73 -0
- package/dist/oni-code/agent-registry.d.ts.map +1 -0
- package/dist/oni-code/agent-registry.js +151 -0
- package/dist/oni-code/agent-registry.js.map +1 -0
- package/dist/oni-code/bin.d.ts +18 -0
- package/dist/oni-code/bin.d.ts.map +1 -0
- package/dist/oni-code/bin.js +78 -0
- package/dist/oni-code/bin.js.map +1 -0
- package/dist/oni-code/change-tracking.d.ts +28 -0
- package/dist/oni-code/change-tracking.d.ts.map +1 -0
- package/dist/oni-code/change-tracking.js +77 -0
- package/dist/oni-code/change-tracking.js.map +1 -0
- package/dist/oni-code/cli.d.ts +6 -0
- package/dist/oni-code/cli.d.ts.map +1 -0
- package/dist/oni-code/cli.js +30 -0
- package/dist/oni-code/cli.js.map +1 -0
- package/dist/oni-code/conductor.d.ts +203 -0
- package/dist/oni-code/conductor.d.ts.map +1 -0
- package/dist/oni-code/conductor.js +1547 -0
- package/dist/oni-code/conductor.js.map +1 -0
- package/dist/oni-code/config.d.ts +130 -0
- package/dist/oni-code/config.d.ts.map +1 -0
- package/dist/oni-code/config.js +264 -0
- package/dist/oni-code/config.js.map +1 -0
- package/dist/oni-code/context-files.d.ts +22 -0
- package/dist/oni-code/context-files.d.ts.map +1 -0
- package/dist/oni-code/context-files.js +156 -0
- package/dist/oni-code/context-files.js.map +1 -0
- package/dist/oni-code/cron/humanize.d.ts +26 -0
- package/dist/oni-code/cron/humanize.d.ts.map +1 -0
- package/dist/oni-code/cron/humanize.js +83 -0
- package/dist/oni-code/cron/humanize.js.map +1 -0
- package/dist/oni-code/cron/index.d.ts +10 -0
- package/dist/oni-code/cron/index.d.ts.map +1 -0
- package/dist/oni-code/cron/index.js +7 -0
- package/dist/oni-code/cron/index.js.map +1 -0
- package/dist/oni-code/cron/matcher.d.ts +29 -0
- package/dist/oni-code/cron/matcher.d.ts.map +1 -0
- package/dist/oni-code/cron/matcher.js +73 -0
- package/dist/oni-code/cron/matcher.js.map +1 -0
- package/dist/oni-code/cron/parser.d.ts +27 -0
- package/dist/oni-code/cron/parser.d.ts.map +1 -0
- package/dist/oni-code/cron/parser.js +149 -0
- package/dist/oni-code/cron/parser.js.map +1 -0
- package/dist/oni-code/cron/persistence.d.ts +21 -0
- package/dist/oni-code/cron/persistence.d.ts.map +1 -0
- package/dist/oni-code/cron/persistence.js +58 -0
- package/dist/oni-code/cron/persistence.js.map +1 -0
- package/dist/oni-code/cron/scheduler.d.ts +64 -0
- package/dist/oni-code/cron/scheduler.d.ts.map +1 -0
- package/dist/oni-code/cron/scheduler.js +188 -0
- package/dist/oni-code/cron/scheduler.js.map +1 -0
- package/dist/oni-code/cron/store.d.ts +46 -0
- package/dist/oni-code/cron/store.d.ts.map +1 -0
- package/dist/oni-code/cron/store.js +68 -0
- package/dist/oni-code/cron/store.js.map +1 -0
- package/dist/oni-code/env.d.ts +17 -0
- package/dist/oni-code/env.d.ts.map +1 -0
- package/dist/oni-code/env.js +51 -0
- package/dist/oni-code/env.js.map +1 -0
- package/dist/oni-code/file-reader.d.ts +28 -0
- package/dist/oni-code/file-reader.d.ts.map +1 -0
- package/dist/oni-code/file-reader.js +368 -0
- package/dist/oni-code/file-reader.js.map +1 -0
- package/dist/oni-code/file-watcher.d.ts +66 -0
- package/dist/oni-code/file-watcher.d.ts.map +1 -0
- package/dist/oni-code/file-watcher.js +167 -0
- package/dist/oni-code/file-watcher.js.map +1 -0
- package/dist/oni-code/loop-detector.d.ts +64 -0
- package/dist/oni-code/loop-detector.d.ts.map +1 -0
- package/dist/oni-code/loop-detector.js +163 -0
- package/dist/oni-code/loop-detector.js.map +1 -0
- package/dist/oni-code/permissions.d.ts +43 -0
- package/dist/oni-code/permissions.d.ts.map +1 -0
- package/dist/oni-code/permissions.js +98 -0
- package/dist/oni-code/permissions.js.map +1 -0
- package/dist/oni-code/planner.d.ts +26 -0
- package/dist/oni-code/planner.d.ts.map +1 -0
- package/dist/oni-code/planner.js +86 -0
- package/dist/oni-code/planner.js.map +1 -0
- package/dist/oni-code/plugin-loader.d.ts +103 -0
- package/dist/oni-code/plugin-loader.d.ts.map +1 -0
- package/dist/oni-code/plugin-loader.js +171 -0
- package/dist/oni-code/plugin-loader.js.map +1 -0
- package/dist/oni-code/process-tree.d.ts +44 -0
- package/dist/oni-code/process-tree.d.ts.map +1 -0
- package/dist/oni-code/process-tree.js +107 -0
- package/dist/oni-code/process-tree.js.map +1 -0
- package/dist/oni-code/progress-tracker.d.ts +40 -0
- package/dist/oni-code/progress-tracker.d.ts.map +1 -0
- package/dist/oni-code/progress-tracker.js +375 -0
- package/dist/oni-code/progress-tracker.js.map +1 -0
- package/dist/oni-code/scheduler.d.ts +56 -0
- package/dist/oni-code/scheduler.d.ts.map +1 -0
- package/dist/oni-code/scheduler.js +105 -0
- package/dist/oni-code/scheduler.js.map +1 -0
- package/dist/oni-code/session-fork.d.ts +146 -0
- package/dist/oni-code/session-fork.d.ts.map +1 -0
- package/dist/oni-code/session-fork.js +238 -0
- package/dist/oni-code/session-fork.js.map +1 -0
- package/dist/oni-code/session-stats.d.ts +72 -0
- package/dist/oni-code/session-stats.d.ts.map +1 -0
- package/dist/oni-code/session-stats.js +141 -0
- package/dist/oni-code/session-stats.js.map +1 -0
- package/dist/oni-code/session-title.d.ts +25 -0
- package/dist/oni-code/session-title.d.ts.map +1 -0
- package/dist/oni-code/session-title.js +67 -0
- package/dist/oni-code/session-title.js.map +1 -0
- package/dist/oni-code/shell-parser.d.ts +112 -0
- package/dist/oni-code/shell-parser.d.ts.map +1 -0
- package/dist/oni-code/shell-parser.js +657 -0
- package/dist/oni-code/shell-parser.js.map +1 -0
- package/dist/oni-code/summarizer.d.ts +27 -0
- package/dist/oni-code/summarizer.d.ts.map +1 -0
- package/dist/oni-code/summarizer.js +70 -0
- package/dist/oni-code/summarizer.js.map +1 -0
- package/dist/oni-code/swarm-checkpoint.d.ts +52 -0
- package/dist/oni-code/swarm-checkpoint.d.ts.map +1 -0
- package/dist/oni-code/swarm-checkpoint.js +71 -0
- package/dist/oni-code/swarm-checkpoint.js.map +1 -0
- package/dist/oni-code/swarm-runner.d.ts +173 -0
- package/dist/oni-code/swarm-runner.d.ts.map +1 -0
- package/dist/oni-code/swarm-runner.js +873 -0
- package/dist/oni-code/swarm-runner.js.map +1 -0
- package/dist/oni-code/system-prompt.d.ts +13 -0
- package/dist/oni-code/system-prompt.d.ts.map +1 -0
- package/dist/oni-code/system-prompt.js +64 -0
- package/dist/oni-code/system-prompt.js.map +1 -0
- package/dist/oni-code/task-evaluator.d.ts +73 -0
- package/dist/oni-code/task-evaluator.d.ts.map +1 -0
- package/dist/oni-code/task-evaluator.js +172 -0
- package/dist/oni-code/task-evaluator.js.map +1 -0
- package/dist/oni-code/tools/batch.d.ts +12 -0
- package/dist/oni-code/tools/batch.d.ts.map +1 -0
- package/dist/oni-code/tools/batch.js +116 -0
- package/dist/oni-code/tools/batch.js.map +1 -0
- package/dist/oni-code/tools/coding.d.ts +10 -0
- package/dist/oni-code/tools/coding.d.ts.map +1 -0
- package/dist/oni-code/tools/coding.js +557 -0
- package/dist/oni-code/tools/coding.js.map +1 -0
- package/dist/oni-code/tools/cron.d.ts +4 -0
- package/dist/oni-code/tools/cron.d.ts.map +1 -0
- package/dist/oni-code/tools/cron.js +120 -0
- package/dist/oni-code/tools/cron.js.map +1 -0
- package/dist/oni-code/tools/custom.d.ts +43 -0
- package/dist/oni-code/tools/custom.d.ts.map +1 -0
- package/dist/oni-code/tools/custom.js +115 -0
- package/dist/oni-code/tools/custom.js.map +1 -0
- package/dist/oni-code/tools/patch.d.ts +58 -0
- package/dist/oni-code/tools/patch.d.ts.map +1 -0
- package/dist/oni-code/tools/patch.js +247 -0
- package/dist/oni-code/tools/patch.js.map +1 -0
- package/dist/oni-code/tools/plan.d.ts +17 -0
- package/dist/oni-code/tools/plan.d.ts.map +1 -0
- package/dist/oni-code/tools/plan.js +48 -0
- package/dist/oni-code/tools/plan.js.map +1 -0
- package/dist/oni-code/tools/question.d.ts +17 -0
- package/dist/oni-code/tools/question.d.ts.map +1 -0
- package/dist/oni-code/tools/question.js +46 -0
- package/dist/oni-code/tools/question.js.map +1 -0
- package/dist/oni-code/tools/skill.d.ts +36 -0
- package/dist/oni-code/tools/skill.d.ts.map +1 -0
- package/dist/oni-code/tools/skill.js +132 -0
- package/dist/oni-code/tools/skill.js.map +1 -0
- package/dist/oni-code/tools/spawn-agents.d.ts +37 -0
- package/dist/oni-code/tools/spawn-agents.d.ts.map +1 -0
- package/dist/oni-code/tools/spawn-agents.js +91 -0
- package/dist/oni-code/tools/spawn-agents.js.map +1 -0
- package/dist/oni-code/tools/spawn-swarm.d.ts +70 -0
- package/dist/oni-code/tools/spawn-swarm.d.ts.map +1 -0
- package/dist/oni-code/tools/spawn-swarm.js +129 -0
- package/dist/oni-code/tools/spawn-swarm.js.map +1 -0
- package/dist/oni-code/tools/web.d.ts +11 -0
- package/dist/oni-code/tools/web.d.ts.map +1 -0
- package/dist/oni-code/tools/web.js +375 -0
- package/dist/oni-code/tools/web.js.map +1 -0
- package/dist/oni-code/topology-agent-builder.d.ts +22 -0
- package/dist/oni-code/topology-agent-builder.d.ts.map +1 -0
- package/dist/oni-code/topology-agent-builder.js +220 -0
- package/dist/oni-code/topology-agent-builder.js.map +1 -0
- package/dist/oni-code/topology-selector.d.ts +85 -0
- package/dist/oni-code/topology-selector.d.ts.map +1 -0
- package/dist/oni-code/topology-selector.js +338 -0
- package/dist/oni-code/topology-selector.js.map +1 -0
- package/dist/oni-code/ui/App.d.ts +10 -0
- package/dist/oni-code/ui/App.d.ts.map +1 -0
- package/dist/oni-code/ui/App.js +395 -0
- package/dist/oni-code/ui/App.js.map +1 -0
- package/dist/oni-code/ui/FooterPanel.d.ts +16 -0
- package/dist/oni-code/ui/FooterPanel.d.ts.map +1 -0
- package/dist/oni-code/ui/FooterPanel.js +56 -0
- package/dist/oni-code/ui/FooterPanel.js.map +1 -0
- package/dist/oni-code/ui/Header.d.ts +21 -0
- package/dist/oni-code/ui/Header.d.ts.map +1 -0
- package/dist/oni-code/ui/Header.js +105 -0
- package/dist/oni-code/ui/Header.js.map +1 -0
- package/dist/oni-code/ui/InputArea.d.ts +11 -0
- package/dist/oni-code/ui/InputArea.d.ts.map +1 -0
- package/dist/oni-code/ui/InputArea.js +82 -0
- package/dist/oni-code/ui/InputArea.js.map +1 -0
- package/dist/oni-code/ui/MessageBlock.d.ts +11 -0
- package/dist/oni-code/ui/MessageBlock.d.ts.map +1 -0
- package/dist/oni-code/ui/MessageBlock.js +103 -0
- package/dist/oni-code/ui/MessageBlock.js.map +1 -0
- package/dist/oni-code/ui/OutputPane.d.ts +12 -0
- package/dist/oni-code/ui/OutputPane.d.ts.map +1 -0
- package/dist/oni-code/ui/OutputPane.js +8 -0
- package/dist/oni-code/ui/OutputPane.js.map +1 -0
- package/dist/oni-code/ui/PermissionPrompt.d.ts +11 -0
- package/dist/oni-code/ui/PermissionPrompt.d.ts.map +1 -0
- package/dist/oni-code/ui/PermissionPrompt.js +48 -0
- package/dist/oni-code/ui/PermissionPrompt.js.map +1 -0
- package/dist/oni-code/ui/QuestionPrompt.d.ts +8 -0
- package/dist/oni-code/ui/QuestionPrompt.d.ts.map +1 -0
- package/dist/oni-code/ui/QuestionPrompt.js +9 -0
- package/dist/oni-code/ui/QuestionPrompt.js.map +1 -0
- package/dist/oni-code/ui/StatusLine.d.ts +14 -0
- package/dist/oni-code/ui/StatusLine.d.ts.map +1 -0
- package/dist/oni-code/ui/StatusLine.js +23 -0
- package/dist/oni-code/ui/StatusLine.js.map +1 -0
- package/dist/oni-code/ui/SwarmPanel.d.ts +9 -0
- package/dist/oni-code/ui/SwarmPanel.d.ts.map +1 -0
- package/dist/oni-code/ui/SwarmPanel.js +52 -0
- package/dist/oni-code/ui/SwarmPanel.js.map +1 -0
- package/dist/oni-code/ui/ToolCallBlock.d.ts +10 -0
- package/dist/oni-code/ui/ToolCallBlock.d.ts.map +1 -0
- package/dist/oni-code/ui/ToolCallBlock.js +21 -0
- package/dist/oni-code/ui/ToolCallBlock.js.map +1 -0
- package/dist/oni-code/ui/Toolbar.d.ts +8 -0
- package/dist/oni-code/ui/Toolbar.d.ts.map +1 -0
- package/dist/oni-code/ui/Toolbar.js +11 -0
- package/dist/oni-code/ui/Toolbar.js.map +1 -0
- package/dist/oni-code/ui/WelcomeBanner.d.ts +12 -0
- package/dist/oni-code/ui/WelcomeBanner.d.ts.map +1 -0
- package/dist/oni-code/ui/WelcomeBanner.js +24 -0
- package/dist/oni-code/ui/WelcomeBanner.js.map +1 -0
- package/dist/oni-code/ui/activity.d.ts +15 -0
- package/dist/oni-code/ui/activity.d.ts.map +1 -0
- package/dist/oni-code/ui/activity.js +252 -0
- package/dist/oni-code/ui/activity.js.map +1 -0
- package/dist/oni-code/ui/banner.d.ts +16 -0
- package/dist/oni-code/ui/banner.d.ts.map +1 -0
- package/dist/oni-code/ui/banner.js +132 -0
- package/dist/oni-code/ui/banner.js.map +1 -0
- package/dist/oni-code/ui/command-menu.d.ts +7 -0
- package/dist/oni-code/ui/command-menu.d.ts.map +1 -0
- package/dist/oni-code/ui/command-menu.js +20 -0
- package/dist/oni-code/ui/command-menu.js.map +1 -0
- package/dist/oni-code/ui/diff.d.ts +17 -0
- package/dist/oni-code/ui/diff.d.ts.map +1 -0
- package/dist/oni-code/ui/diff.js +37 -0
- package/dist/oni-code/ui/diff.js.map +1 -0
- package/dist/oni-code/ui/format.d.ts +41 -0
- package/dist/oni-code/ui/format.d.ts.map +1 -0
- package/dist/oni-code/ui/format.js +223 -0
- package/dist/oni-code/ui/format.js.map +1 -0
- package/dist/oni-code/ui/input.d.ts +28 -0
- package/dist/oni-code/ui/input.d.ts.map +1 -0
- package/dist/oni-code/ui/input.js +216 -0
- package/dist/oni-code/ui/input.js.map +1 -0
- package/dist/oni-code/ui/insights.d.ts +39 -0
- package/dist/oni-code/ui/insights.d.ts.map +1 -0
- package/dist/oni-code/ui/insights.js +193 -0
- package/dist/oni-code/ui/insights.js.map +1 -0
- package/dist/oni-code/ui/markdown.d.ts +9 -0
- package/dist/oni-code/ui/markdown.d.ts.map +1 -0
- package/dist/oni-code/ui/markdown.js +44 -0
- package/dist/oni-code/ui/markdown.js.map +1 -0
- package/dist/oni-code/ui/panels.d.ts +39 -0
- package/dist/oni-code/ui/panels.d.ts.map +1 -0
- package/dist/oni-code/ui/panels.js +209 -0
- package/dist/oni-code/ui/panels.js.map +1 -0
- package/dist/oni-code/ui/paste.d.ts +17 -0
- package/dist/oni-code/ui/paste.d.ts.map +1 -0
- package/dist/oni-code/ui/paste.js +45 -0
- package/dist/oni-code/ui/paste.js.map +1 -0
- package/dist/oni-code/ui/raw-spinner.d.ts +37 -0
- package/dist/oni-code/ui/raw-spinner.d.ts.map +1 -0
- package/dist/oni-code/ui/raw-spinner.js +121 -0
- package/dist/oni-code/ui/raw-spinner.js.map +1 -0
- package/dist/oni-code/ui/session.d.ts +44 -0
- package/dist/oni-code/ui/session.d.ts.map +1 -0
- package/dist/oni-code/ui/session.js +93 -0
- package/dist/oni-code/ui/session.js.map +1 -0
- package/dist/oni-code/ui/spinner.d.ts +7 -0
- package/dist/oni-code/ui/spinner.d.ts.map +1 -0
- package/dist/oni-code/ui/spinner.js +20 -0
- package/dist/oni-code/ui/spinner.js.map +1 -0
- package/dist/oni-code/ui/swarm-activity.d.ts +50 -0
- package/dist/oni-code/ui/swarm-activity.d.ts.map +1 -0
- package/dist/oni-code/ui/swarm-activity.js +233 -0
- package/dist/oni-code/ui/swarm-activity.js.map +1 -0
- package/dist/oni-code/ui/terminal-size.d.ts +18 -0
- package/dist/oni-code/ui/terminal-size.d.ts.map +1 -0
- package/dist/oni-code/ui/terminal-size.js +45 -0
- package/dist/oni-code/ui/terminal-size.js.map +1 -0
- package/dist/oni-code/ui/theme.d.ts +82 -0
- package/dist/oni-code/ui/theme.d.ts.map +1 -0
- package/dist/oni-code/ui/theme.js +101 -0
- package/dist/oni-code/ui/theme.js.map +1 -0
- package/dist/oni-code/ui/tool-utils.d.ts +10 -0
- package/dist/oni-code/ui/tool-utils.d.ts.map +1 -0
- package/dist/oni-code/ui/tool-utils.js +82 -0
- package/dist/oni-code/ui/tool-utils.js.map +1 -0
- package/dist/oni-code/ui/useTerminalSize.d.ts +3 -0
- package/dist/oni-code/ui/useTerminalSize.d.ts.map +1 -0
- package/dist/oni-code/ui/useTerminalSize.js +16 -0
- package/dist/oni-code/ui/useTerminalSize.js.map +1 -0
- package/dist/oni-code/workspace/change-tracker.d.ts +18 -0
- package/dist/oni-code/workspace/change-tracker.d.ts.map +1 -0
- package/dist/oni-code/workspace/change-tracker.js +67 -0
- package/dist/oni-code/workspace/change-tracker.js.map +1 -0
- package/dist/oni-code/workspace/conflict-detector.d.ts +12 -0
- package/dist/oni-code/workspace/conflict-detector.d.ts.map +1 -0
- package/dist/oni-code/workspace/conflict-detector.js +24 -0
- package/dist/oni-code/workspace/conflict-detector.js.map +1 -0
- package/dist/oni-code/workspace/file-snapshots.d.ts +39 -0
- package/dist/oni-code/workspace/file-snapshots.d.ts.map +1 -0
- package/dist/oni-code/workspace/file-snapshots.js +77 -0
- package/dist/oni-code/workspace/file-snapshots.js.map +1 -0
- package/dist/oni-code/workspace/index.d.ts +5 -0
- package/dist/oni-code/workspace/index.d.ts.map +1 -0
- package/dist/oni-code/workspace/index.js +5 -0
- package/dist/oni-code/workspace/index.js.map +1 -0
- package/dist/oni-code/workspace/project-map.d.ts +14 -0
- package/dist/oni-code/workspace/project-map.d.ts.map +1 -0
- package/dist/oni-code/workspace/project-map.js +91 -0
- package/dist/oni-code/workspace/project-map.js.map +1 -0
- package/dist/prebuilt/tool-node.d.ts.map +1 -1
- package/dist/prebuilt/tool-node.js +0 -1
- package/dist/prebuilt/tool-node.js.map +1 -1
- package/dist/pregel.d.ts +15 -1
- package/dist/pregel.d.ts.map +1 -1
- package/dist/pregel.js +199 -51
- package/dist/pregel.js.map +1 -1
- package/dist/retry.d.ts.map +1 -1
- package/dist/retry.js +16 -4
- package/dist/retry.js.map +1 -1
- package/dist/sentinel/config/index.d.ts +2 -0
- package/dist/sentinel/config/index.d.ts.map +1 -0
- package/dist/sentinel/config/index.js +2 -0
- package/dist/sentinel/config/index.js.map +1 -0
- package/dist/sentinel/config/schema.d.ts +4 -0
- package/dist/sentinel/config/schema.d.ts.map +1 -0
- package/dist/sentinel/config/schema.js +42 -0
- package/dist/sentinel/config/schema.js.map +1 -0
- package/dist/sentinel/debate/index.d.ts +6 -0
- package/dist/sentinel/debate/index.d.ts.map +1 -0
- package/dist/sentinel/debate/index.js +64 -0
- package/dist/sentinel/debate/index.js.map +1 -0
- package/dist/sentinel/debate/prompts.d.ts +4 -0
- package/dist/sentinel/debate/prompts.d.ts.map +1 -0
- package/dist/sentinel/debate/prompts.js +13 -0
- package/dist/sentinel/debate/prompts.js.map +1 -0
- package/dist/sentinel/fix/index.d.ts +6 -0
- package/dist/sentinel/fix/index.d.ts.map +1 -0
- package/dist/sentinel/fix/index.js +27 -0
- package/dist/sentinel/fix/index.js.map +1 -0
- package/dist/sentinel/fix/strategies.d.ts +9 -0
- package/dist/sentinel/fix/strategies.d.ts.map +1 -0
- package/dist/sentinel/fix/strategies.js +40 -0
- package/dist/sentinel/fix/strategies.js.map +1 -0
- package/dist/sentinel/index.d.ts +14 -0
- package/dist/sentinel/index.d.ts.map +1 -0
- package/dist/sentinel/index.js +22 -0
- package/dist/sentinel/index.js.map +1 -0
- package/dist/sentinel/integrations/cli.d.ts +10 -0
- package/dist/sentinel/integrations/cli.d.ts.map +1 -0
- package/dist/sentinel/integrations/cli.js +24 -0
- package/dist/sentinel/integrations/cli.js.map +1 -0
- package/dist/sentinel/integrations/index.d.ts +2 -0
- package/dist/sentinel/integrations/index.d.ts.map +1 -0
- package/dist/sentinel/integrations/index.js +2 -0
- package/dist/sentinel/integrations/index.js.map +1 -0
- package/dist/sentinel/memory/index.d.ts +16 -0
- package/dist/sentinel/memory/index.d.ts.map +1 -0
- package/dist/sentinel/memory/index.js +60 -0
- package/dist/sentinel/memory/index.js.map +1 -0
- package/dist/sentinel/report/console.d.ts +3 -0
- package/dist/sentinel/report/console.d.ts.map +1 -0
- package/dist/sentinel/report/console.js +27 -0
- package/dist/sentinel/report/console.js.map +1 -0
- package/dist/sentinel/report/github.d.ts +3 -0
- package/dist/sentinel/report/github.d.ts.map +1 -0
- package/dist/sentinel/report/github.js +36 -0
- package/dist/sentinel/report/github.js.map +1 -0
- package/dist/sentinel/report/index.d.ts +6 -0
- package/dist/sentinel/report/index.d.ts.map +1 -0
- package/dist/sentinel/report/index.js +15 -0
- package/dist/sentinel/report/index.js.map +1 -0
- package/dist/sentinel/report/sarif.d.ts +3 -0
- package/dist/sentinel/report/sarif.d.ts.map +1 -0
- package/dist/sentinel/report/sarif.js +29 -0
- package/dist/sentinel/report/sarif.js.map +1 -0
- package/dist/sentinel/sentinel.d.ts +17 -0
- package/dist/sentinel/sentinel.d.ts.map +1 -0
- package/dist/sentinel/sentinel.js +111 -0
- package/dist/sentinel/sentinel.js.map +1 -0
- package/dist/sentinel/swarm/agents.d.ts +6 -0
- package/dist/sentinel/swarm/agents.d.ts.map +1 -0
- package/dist/sentinel/swarm/agents.js +36 -0
- package/dist/sentinel/swarm/agents.js.map +1 -0
- package/dist/sentinel/swarm/index.d.ts +8 -0
- package/dist/sentinel/swarm/index.d.ts.map +1 -0
- package/dist/sentinel/swarm/index.js +74 -0
- package/dist/sentinel/swarm/index.js.map +1 -0
- package/dist/sentinel/swarm/prompts.d.ts +2 -0
- package/dist/sentinel/swarm/prompts.d.ts.map +1 -0
- package/dist/sentinel/swarm/prompts.js +24 -0
- package/dist/sentinel/swarm/prompts.js.map +1 -0
- package/dist/sentinel/swarm/topology.d.ts +10 -0
- package/dist/sentinel/swarm/topology.d.ts.map +1 -0
- package/dist/sentinel/swarm/topology.js +38 -0
- package/dist/sentinel/swarm/topology.js.map +1 -0
- package/dist/sentinel/triage/analyzers/complexity-analyzer.d.ts +7 -0
- package/dist/sentinel/triage/analyzers/complexity-analyzer.d.ts.map +1 -0
- package/dist/sentinel/triage/analyzers/complexity-analyzer.js +94 -0
- package/dist/sentinel/triage/analyzers/complexity-analyzer.js.map +1 -0
- package/dist/sentinel/triage/analyzers/custom-analyzer.d.ts +19 -0
- package/dist/sentinel/triage/analyzers/custom-analyzer.d.ts.map +1 -0
- package/dist/sentinel/triage/analyzers/custom-analyzer.js +268 -0
- package/dist/sentinel/triage/analyzers/custom-analyzer.js.map +1 -0
- package/dist/sentinel/triage/analyzers/dependency-analyzer.d.ts +26 -0
- package/dist/sentinel/triage/analyzers/dependency-analyzer.d.ts.map +1 -0
- package/dist/sentinel/triage/analyzers/dependency-analyzer.js +220 -0
- package/dist/sentinel/triage/analyzers/dependency-analyzer.js.map +1 -0
- package/dist/sentinel/triage/analyzers/diff-analyzer.d.ts +12 -0
- package/dist/sentinel/triage/analyzers/diff-analyzer.d.ts.map +1 -0
- package/dist/sentinel/triage/analyzers/diff-analyzer.js +19 -0
- package/dist/sentinel/triage/analyzers/diff-analyzer.js.map +1 -0
- package/dist/sentinel/triage/analyzers/index.d.ts +14 -0
- package/dist/sentinel/triage/analyzers/index.d.ts.map +1 -0
- package/dist/sentinel/triage/analyzers/index.js +25 -0
- package/dist/sentinel/triage/analyzers/index.js.map +1 -0
- package/dist/sentinel/triage/analyzers/pattern-analyzer.d.ts +7 -0
- package/dist/sentinel/triage/analyzers/pattern-analyzer.d.ts.map +1 -0
- package/dist/sentinel/triage/analyzers/pattern-analyzer.js +180 -0
- package/dist/sentinel/triage/analyzers/pattern-analyzer.js.map +1 -0
- package/dist/sentinel/triage/analyzers/security-analyzer.d.ts +7 -0
- package/dist/sentinel/triage/analyzers/security-analyzer.d.ts.map +1 -0
- package/dist/sentinel/triage/analyzers/security-analyzer.js +96 -0
- package/dist/sentinel/triage/analyzers/security-analyzer.js.map +1 -0
- package/dist/sentinel/triage/analyzers/ts-parser.d.ts +71 -0
- package/dist/sentinel/triage/analyzers/ts-parser.d.ts.map +1 -0
- package/dist/sentinel/triage/analyzers/ts-parser.js +323 -0
- package/dist/sentinel/triage/analyzers/ts-parser.js.map +1 -0
- package/dist/sentinel/triage/analyzers/typescript-analyzer.d.ts +7 -0
- package/dist/sentinel/triage/analyzers/typescript-analyzer.d.ts.map +1 -0
- package/dist/sentinel/triage/analyzers/typescript-analyzer.js +68 -0
- package/dist/sentinel/triage/analyzers/typescript-analyzer.js.map +1 -0
- package/dist/sentinel/triage/index.d.ts +10 -0
- package/dist/sentinel/triage/index.d.ts.map +1 -0
- package/dist/sentinel/triage/index.js +39 -0
- package/dist/sentinel/triage/index.js.map +1 -0
- package/dist/sentinel/triage/scorer.d.ts +9 -0
- package/dist/sentinel/triage/scorer.d.ts.map +1 -0
- package/dist/sentinel/triage/scorer.js +28 -0
- package/dist/sentinel/triage/scorer.js.map +1 -0
- package/dist/sentinel/types.d.ts +125 -0
- package/dist/sentinel/types.d.ts.map +1 -0
- package/dist/sentinel/types.js +6 -0
- package/dist/sentinel/types.js.map +1 -0
- package/dist/store/index.d.ts +5 -0
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +24 -1
- package/dist/store/index.js.map +1 -1
- package/dist/stream-events.js +2 -2
- package/dist/stream-events.js.map +1 -1
- package/dist/streaming.d.ts +13 -0
- package/dist/streaming.d.ts.map +1 -1
- package/dist/streaming.js +42 -0
- package/dist/streaming.js.map +1 -1
- package/dist/swarm/graph.d.ts +81 -2
- package/dist/swarm/graph.d.ts.map +1 -1
- package/dist/swarm/graph.js +517 -36
- package/dist/swarm/graph.js.map +1 -1
- package/dist/swarm/index.d.ts +10 -2
- package/dist/swarm/index.d.ts.map +1 -1
- package/dist/swarm/index.js +6 -1
- package/dist/swarm/index.js.map +1 -1
- package/dist/swarm/mermaid.d.ts +10 -0
- package/dist/swarm/mermaid.d.ts.map +1 -0
- package/dist/swarm/mermaid.js +64 -0
- package/dist/swarm/mermaid.js.map +1 -0
- package/dist/swarm/pool.d.ts +9 -1
- package/dist/swarm/pool.d.ts.map +1 -1
- package/dist/swarm/pool.js +58 -10
- package/dist/swarm/pool.js.map +1 -1
- package/dist/swarm/registry.d.ts +11 -1
- package/dist/swarm/registry.d.ts.map +1 -1
- package/dist/swarm/registry.js +17 -3
- package/dist/swarm/registry.js.map +1 -1
- package/dist/swarm/scaling.d.ts +95 -0
- package/dist/swarm/scaling.d.ts.map +1 -0
- package/dist/swarm/scaling.js +214 -0
- package/dist/swarm/scaling.js.map +1 -0
- package/dist/swarm/snapshot.d.ts +51 -0
- package/dist/swarm/snapshot.d.ts.map +1 -0
- package/dist/swarm/snapshot.js +115 -0
- package/dist/swarm/snapshot.js.map +1 -0
- package/dist/swarm/supervisor.d.ts.map +1 -1
- package/dist/swarm/supervisor.js +82 -4
- package/dist/swarm/supervisor.js.map +1 -1
- package/dist/swarm/tracer.d.ts +57 -0
- package/dist/swarm/tracer.d.ts.map +1 -0
- package/dist/swarm/tracer.js +138 -0
- package/dist/swarm/tracer.js.map +1 -0
- package/dist/swarm/types.d.ts +23 -1
- package/dist/swarm/types.d.ts.map +1 -1
- package/dist/swarm/types.js.map +1 -1
- package/dist/telemetry.d.ts +41 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +69 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/testing/index.d.ts +33 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +95 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/tools/types.d.ts +2 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- 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
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<strong>@oni.bot/core</strong>
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
>
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
**
|
|
37
|
-
|
|
38
|
-
|
|
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,
|
|
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
|
-
|
|
37
|
+
const model = anthropic("claude-sonnet-4-6");
|
|
53
38
|
|
|
54
|
-
const graph = new StateGraph<
|
|
39
|
+
const graph = new StateGraph<State>({
|
|
55
40
|
channels: {
|
|
56
|
-
|
|
57
|
-
answer:
|
|
58
|
-
log: appendList(() => []),
|
|
41
|
+
question: lastValue<string>(() => ""),
|
|
42
|
+
answer: lastValue<string>(() => ""),
|
|
59
43
|
},
|
|
60
44
|
});
|
|
61
45
|
|
|
62
|
-
graph.addNode("
|
|
63
|
-
|
|
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, "
|
|
67
|
-
graph.addEdge("
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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` |
|
|
232
|
-
| `@oni.bot/core/prebuilt` | `createReactAgent`, `
|
|
233
|
-
| `@oni.bot/core/swarm` | `SwarmGraph` (
|
|
234
|
-
| `@oni.bot/core/hitl` | `interrupt`, `getUserInput`, `getUserApproval
|
|
235
|
-
| `@oni.bot/core/store` |
|
|
236
|
-
| `@oni.bot/core/messages` |
|
|
237
|
-
| `@oni.bot/core/checkpointers` |
|
|
238
|
-
| `@oni.bot/core/functional` | `task`, `entrypoint`, `pipe`, `branch` |
|
|
239
|
-
| `@oni.bot/core/inspect` | `buildGraphDescriptor`, `
|
|
240
|
-
| `@oni.bot/core/streaming` | `emitToken`, `
|
|
241
|
-
| `@oni.bot/core/models` |
|
|
242
|
-
| `@oni.bot/core/
|
|
243
|
-
| `@oni.bot/core/
|
|
244
|
-
| `@oni.bot/core/
|
|
245
|
-
| `@oni.bot/core/
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
100
|
+
**Built on @oni.bot/core:**
|
|
299
101
|
|
|
300
|
-
-
|
|
301
|
-
-
|
|
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 —
|
|
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;
|
|
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"}
|