@spinabot/brigade 0.1.2 → 1.0.1
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/LICENSE +1 -1
- package/README.md +748 -88
- package/brigade.mjs +150 -73
- package/dist/agents/a2a-policy-canonicalize.d.ts +60 -0
- package/dist/agents/a2a-policy-canonicalize.d.ts.map +1 -0
- package/dist/agents/a2a-policy-canonicalize.js +103 -0
- package/dist/agents/a2a-policy-canonicalize.js.map +1 -0
- package/dist/agents/agent-event-bus.d.ts +221 -0
- package/dist/agents/agent-event-bus.d.ts.map +1 -0
- package/dist/agents/agent-event-bus.js +88 -0
- package/dist/agents/agent-event-bus.js.map +1 -0
- package/dist/agents/agent-events.d.ts +84 -0
- package/dist/agents/agent-events.d.ts.map +1 -0
- package/dist/agents/agent-events.js +309 -0
- package/dist/agents/agent-events.js.map +1 -0
- package/dist/agents/agent-events.types.d.ts +139 -0
- package/dist/agents/agent-events.types.d.ts.map +1 -0
- package/dist/agents/agent-events.types.js +27 -0
- package/dist/agents/agent-events.types.js.map +1 -0
- package/dist/agents/agent-loop.d.ts +145 -0
- package/dist/agents/agent-loop.d.ts.map +1 -0
- package/dist/agents/agent-loop.js +1938 -0
- package/dist/agents/agent-loop.js.map +1 -0
- package/dist/agents/agent-scope.d.ts +28 -0
- package/dist/agents/agent-scope.d.ts.map +1 -0
- package/dist/agents/agent-scope.js +39 -0
- package/dist/agents/agent-scope.js.map +1 -0
- package/dist/agents/approval-bridge.d.ts +139 -0
- package/dist/agents/approval-bridge.d.ts.map +1 -0
- package/dist/agents/approval-bridge.js +178 -0
- package/dist/agents/approval-bridge.js.map +1 -0
- package/dist/agents/carrow.d.ts +49 -0
- package/dist/agents/carrow.d.ts.map +1 -0
- package/dist/agents/carrow.js +57 -0
- package/dist/agents/carrow.js.map +1 -0
- package/dist/agents/channels/abort-triggers.d.ts +17 -0
- package/dist/agents/channels/abort-triggers.d.ts.map +1 -0
- package/dist/agents/channels/abort-triggers.js +52 -0
- package/dist/agents/channels/abort-triggers.js.map +1 -0
- package/dist/agents/channels/access-control/index.d.ts +5 -0
- package/dist/agents/channels/access-control/index.d.ts.map +1 -0
- package/dist/agents/channels/access-control/index.js +4 -0
- package/dist/agents/channels/access-control/index.js.map +1 -0
- package/dist/agents/channels/access-control/policy.d.ts +69 -0
- package/dist/agents/channels/access-control/policy.d.ts.map +1 -0
- package/dist/agents/channels/access-control/policy.js +123 -0
- package/dist/agents/channels/access-control/policy.js.map +1 -0
- package/dist/agents/channels/access-control/store.d.ts +86 -0
- package/dist/agents/channels/access-control/store.d.ts.map +1 -0
- package/dist/agents/channels/access-control/store.js +482 -0
- package/dist/agents/channels/access-control/store.js.map +1 -0
- package/dist/agents/channels/access-control/types.d.ts +52 -0
- package/dist/agents/channels/access-control/types.d.ts.map +1 -0
- package/dist/agents/channels/access-control/types.js +20 -0
- package/dist/agents/channels/access-control/types.js.map +1 -0
- package/dist/agents/channels/active-manager.d.ts +31 -0
- package/dist/agents/channels/active-manager.d.ts.map +1 -0
- package/dist/agents/channels/active-manager.js +41 -0
- package/dist/agents/channels/active-manager.js.map +1 -0
- package/dist/agents/channels/agent-switch-command.d.ts +53 -0
- package/dist/agents/channels/agent-switch-command.d.ts.map +1 -0
- package/dist/agents/channels/agent-switch-command.js +349 -0
- package/dist/agents/channels/agent-switch-command.js.map +1 -0
- package/dist/agents/channels/approval-router.d.ts +158 -0
- package/dist/agents/channels/approval-router.d.ts.map +1 -0
- package/dist/agents/channels/approval-router.js +446 -0
- package/dist/agents/channels/approval-router.js.map +1 -0
- package/dist/agents/channels/channel-entry-contract.d.ts +70 -0
- package/dist/agents/channels/channel-entry-contract.d.ts.map +1 -0
- package/dist/agents/channels/channel-entry-contract.js +48 -0
- package/dist/agents/channels/channel-entry-contract.js.map +1 -0
- package/dist/agents/channels/channel-plugin-manager.d.ts +86 -0
- package/dist/agents/channels/channel-plugin-manager.d.ts.map +1 -0
- package/dist/agents/channels/channel-plugin-manager.js +345 -0
- package/dist/agents/channels/channel-plugin-manager.js.map +1 -0
- package/dist/agents/channels/chat-type.d.ts +27 -0
- package/dist/agents/channels/chat-type.d.ts.map +1 -0
- package/dist/agents/channels/chat-type.js +33 -0
- package/dist/agents/channels/chat-type.js.map +1 -0
- package/dist/agents/channels/dedupe.d.ts +44 -0
- package/dist/agents/channels/dedupe.d.ts.map +1 -0
- package/dist/agents/channels/dedupe.js +80 -0
- package/dist/agents/channels/dedupe.js.map +1 -0
- package/dist/agents/channels/inbound-pipeline.d.ts +90 -0
- package/dist/agents/channels/inbound-pipeline.d.ts.map +1 -0
- package/dist/agents/channels/inbound-pipeline.js +721 -0
- package/dist/agents/channels/inbound-pipeline.js.map +1 -0
- package/dist/agents/channels/last-channel.d.ts +56 -0
- package/dist/agents/channels/last-channel.d.ts.map +1 -0
- package/dist/agents/channels/last-channel.js +65 -0
- package/dist/agents/channels/last-channel.js.map +1 -0
- package/dist/agents/channels/manager.d.ts +76 -0
- package/dist/agents/channels/manager.d.ts.map +1 -0
- package/dist/agents/channels/manager.js +132 -0
- package/dist/agents/channels/manager.js.map +1 -0
- package/dist/agents/channels/media-capture.d.ts +23 -0
- package/dist/agents/channels/media-capture.d.ts.map +1 -0
- package/dist/agents/channels/media-capture.js +40 -0
- package/dist/agents/channels/media-capture.js.map +1 -0
- package/dist/agents/channels/plugin-channel-manager-facade.d.ts +18 -0
- package/dist/agents/channels/plugin-channel-manager-facade.d.ts.map +1 -0
- package/dist/agents/channels/plugin-channel-manager-facade.js +52 -0
- package/dist/agents/channels/plugin-channel-manager-facade.js.map +1 -0
- package/dist/agents/channels/reply-sanitizer.d.ts +38 -0
- package/dist/agents/channels/reply-sanitizer.d.ts.map +1 -0
- package/dist/agents/channels/reply-sanitizer.js +94 -0
- package/dist/agents/channels/reply-sanitizer.js.map +1 -0
- package/dist/agents/channels/retryable-inbound.d.ts +31 -0
- package/dist/agents/channels/retryable-inbound.d.ts.map +1 -0
- package/dist/agents/channels/retryable-inbound.js +37 -0
- package/dist/agents/channels/retryable-inbound.js.map +1 -0
- package/dist/agents/channels/types.adapters.d.ts +399 -0
- package/dist/agents/channels/types.adapters.d.ts.map +1 -0
- package/dist/agents/channels/types.adapters.js +33 -0
- package/dist/agents/channels/types.adapters.js.map +1 -0
- package/dist/agents/channels/types.core.d.ts +134 -0
- package/dist/agents/channels/types.core.d.ts.map +1 -0
- package/dist/agents/channels/types.core.js +32 -0
- package/dist/agents/channels/types.core.js.map +1 -0
- package/dist/agents/channels/types.plugin.d.ts +78 -0
- package/dist/agents/channels/types.plugin.d.ts.map +1 -0
- package/dist/agents/channels/types.plugin.js +30 -0
- package/dist/agents/channels/types.plugin.js.map +1 -0
- package/dist/agents/channels/whatsapp/account-config.d.ts +50 -0
- package/dist/agents/channels/whatsapp/account-config.d.ts.map +1 -0
- package/dist/agents/channels/whatsapp/account-config.js +105 -0
- package/dist/agents/channels/whatsapp/account-config.js.map +1 -0
- package/dist/agents/channels/whatsapp/adapter.d.ts +22 -0
- package/dist/agents/channels/whatsapp/adapter.d.ts.map +1 -0
- package/dist/agents/channels/whatsapp/adapter.js +270 -0
- package/dist/agents/channels/whatsapp/adapter.js.map +1 -0
- package/dist/agents/channels/whatsapp/chunk.d.ts +26 -0
- package/dist/agents/channels/whatsapp/chunk.d.ts.map +1 -0
- package/dist/agents/channels/whatsapp/chunk.js +123 -0
- package/dist/agents/channels/whatsapp/chunk.js.map +1 -0
- package/dist/agents/channels/whatsapp/connection.d.ts +249 -0
- package/dist/agents/channels/whatsapp/connection.d.ts.map +1 -0
- package/dist/agents/channels/whatsapp/connection.js +1628 -0
- package/dist/agents/channels/whatsapp/connection.js.map +1 -0
- package/dist/agents/channels/whatsapp/convex-auth-state.d.ts +34 -0
- package/dist/agents/channels/whatsapp/convex-auth-state.d.ts.map +1 -0
- package/dist/agents/channels/whatsapp/convex-auth-state.js +168 -0
- package/dist/agents/channels/whatsapp/convex-auth-state.js.map +1 -0
- package/dist/agents/channels/whatsapp/format.d.ts +15 -0
- package/dist/agents/channels/whatsapp/format.d.ts.map +1 -0
- package/dist/agents/channels/whatsapp/format.js +66 -0
- package/dist/agents/channels/whatsapp/format.js.map +1 -0
- package/dist/agents/channels/whatsapp/inbound-extras.d.ts +30 -0
- package/dist/agents/channels/whatsapp/inbound-extras.d.ts.map +1 -0
- package/dist/agents/channels/whatsapp/inbound-extras.js +146 -0
- package/dist/agents/channels/whatsapp/inbound-extras.js.map +1 -0
- package/dist/agents/channels/whatsapp/index.d.ts +7 -0
- package/dist/agents/channels/whatsapp/index.d.ts.map +1 -0
- package/dist/agents/channels/whatsapp/index.js +7 -0
- package/dist/agents/channels/whatsapp/index.js.map +1 -0
- package/dist/agents/channels/whatsapp/media.d.ts +47 -0
- package/dist/agents/channels/whatsapp/media.d.ts.map +1 -0
- package/dist/agents/channels/whatsapp/media.js +192 -0
- package/dist/agents/channels/whatsapp/media.js.map +1 -0
- package/dist/agents/channels/whatsapp/module.d.ts +10 -0
- package/dist/agents/channels/whatsapp/module.d.ts.map +1 -0
- package/dist/agents/channels/whatsapp/module.js +17 -0
- package/dist/agents/channels/whatsapp/module.js.map +1 -0
- package/dist/agents/channels/whatsapp/plugin.d.ts +60 -0
- package/dist/agents/channels/whatsapp/plugin.d.ts.map +1 -0
- package/dist/agents/channels/whatsapp/plugin.js +238 -0
- package/dist/agents/channels/whatsapp/plugin.js.map +1 -0
- package/dist/agents/cmd-ism-guard.d.ts +47 -0
- package/dist/agents/cmd-ism-guard.d.ts.map +1 -0
- package/dist/agents/cmd-ism-guard.js +100 -0
- package/dist/agents/cmd-ism-guard.js.map +1 -0
- package/dist/agents/config-write-guard.d.ts +25 -0
- package/dist/agents/config-write-guard.d.ts.map +1 -0
- package/dist/agents/config-write-guard.js +95 -0
- package/dist/agents/config-write-guard.js.map +1 -0
- package/dist/agents/content-quality-retry.d.ts +66 -0
- package/dist/agents/content-quality-retry.d.ts.map +1 -0
- package/dist/agents/content-quality-retry.js +140 -0
- package/dist/agents/content-quality-retry.js.map +1 -0
- package/dist/agents/error-classifier.d.ts +89 -0
- package/dist/agents/error-classifier.d.ts.map +1 -0
- package/dist/agents/error-classifier.js +630 -0
- package/dist/agents/error-classifier.js.map +1 -0
- package/dist/agents/exec-gate.d.ts +113 -0
- package/dist/agents/exec-gate.d.ts.map +1 -0
- package/dist/agents/exec-gate.js +335 -0
- package/dist/agents/exec-gate.js.map +1 -0
- package/dist/agents/exec-session-allow.d.ts +30 -0
- package/dist/agents/exec-session-allow.d.ts.map +1 -0
- package/dist/agents/exec-session-allow.js +50 -0
- package/dist/agents/exec-session-allow.js.map +1 -0
- package/dist/agents/extensions/active-registry.d.ts +4 -0
- package/dist/agents/extensions/active-registry.d.ts.map +1 -0
- package/dist/agents/extensions/active-registry.js +18 -0
- package/dist/agents/extensions/active-registry.js.map +1 -0
- package/dist/agents/extensions/discovery.d.ts +84 -0
- package/dist/agents/extensions/discovery.d.ts.map +1 -0
- package/dist/agents/extensions/discovery.js +249 -0
- package/dist/agents/extensions/discovery.js.map +1 -0
- package/dist/agents/extensions/hook-runner.d.ts +67 -0
- package/dist/agents/extensions/hook-runner.d.ts.map +1 -0
- package/dist/agents/extensions/hook-runner.js +155 -0
- package/dist/agents/extensions/hook-runner.js.map +1 -0
- package/dist/agents/extensions/index.d.ts +15 -0
- package/dist/agents/extensions/index.d.ts.map +1 -0
- package/dist/agents/extensions/index.js +14 -0
- package/dist/agents/extensions/index.js.map +1 -0
- package/dist/agents/extensions/loader.d.ts +38 -0
- package/dist/agents/extensions/loader.d.ts.map +1 -0
- package/dist/agents/extensions/loader.js +142 -0
- package/dist/agents/extensions/loader.js.map +1 -0
- package/dist/agents/extensions/modules/arxiv.d.ts +28 -0
- package/dist/agents/extensions/modules/arxiv.d.ts.map +1 -0
- package/dist/agents/extensions/modules/arxiv.js +145 -0
- package/dist/agents/extensions/modules/arxiv.js.map +1 -0
- package/dist/agents/extensions/modules/brave.d.ts +28 -0
- package/dist/agents/extensions/modules/brave.d.ts.map +1 -0
- package/dist/agents/extensions/modules/brave.js +489 -0
- package/dist/agents/extensions/modules/brave.js.map +1 -0
- package/dist/agents/extensions/modules/duckduckgo.d.ts +27 -0
- package/dist/agents/extensions/modules/duckduckgo.d.ts.map +1 -0
- package/dist/agents/extensions/modules/duckduckgo.js +263 -0
- package/dist/agents/extensions/modules/duckduckgo.js.map +1 -0
- package/dist/agents/extensions/modules/exa.d.ts +19 -0
- package/dist/agents/extensions/modules/exa.d.ts.map +1 -0
- package/dist/agents/extensions/modules/exa.js +208 -0
- package/dist/agents/extensions/modules/exa.js.map +1 -0
- package/dist/agents/extensions/modules/firecrawl.d.ts +51 -0
- package/dist/agents/extensions/modules/firecrawl.d.ts.map +1 -0
- package/dist/agents/extensions/modules/firecrawl.js +280 -0
- package/dist/agents/extensions/modules/firecrawl.js.map +1 -0
- package/dist/agents/extensions/modules/github-search.d.ts +29 -0
- package/dist/agents/extensions/modules/github-search.d.ts.map +1 -0
- package/dist/agents/extensions/modules/github-search.js +197 -0
- package/dist/agents/extensions/modules/github-search.js.map +1 -0
- package/dist/agents/extensions/modules/hackernews.d.ts +17 -0
- package/dist/agents/extensions/modules/hackernews.d.ts.map +1 -0
- package/dist/agents/extensions/modules/hackernews.js +144 -0
- package/dist/agents/extensions/modules/hackernews.js.map +1 -0
- package/dist/agents/extensions/modules/index.d.ts +11 -0
- package/dist/agents/extensions/modules/index.d.ts.map +1 -0
- package/dist/agents/extensions/modules/index.js +64 -0
- package/dist/agents/extensions/modules/index.js.map +1 -0
- package/dist/agents/extensions/modules/npm-search.d.ts +15 -0
- package/dist/agents/extensions/modules/npm-search.d.ts.map +1 -0
- package/dist/agents/extensions/modules/npm-search.js +126 -0
- package/dist/agents/extensions/modules/npm-search.js.map +1 -0
- package/dist/agents/extensions/modules/ollama-search.d.ts +30 -0
- package/dist/agents/extensions/modules/ollama-search.d.ts.map +1 -0
- package/dist/agents/extensions/modules/ollama-search.js +171 -0
- package/dist/agents/extensions/modules/ollama-search.js.map +1 -0
- package/dist/agents/extensions/modules/perplexity.d.ts +19 -0
- package/dist/agents/extensions/modules/perplexity.d.ts.map +1 -0
- package/dist/agents/extensions/modules/perplexity.js +358 -0
- package/dist/agents/extensions/modules/perplexity.js.map +1 -0
- package/dist/agents/extensions/modules/searxng.d.ts +43 -0
- package/dist/agents/extensions/modules/searxng.d.ts.map +1 -0
- package/dist/agents/extensions/modules/searxng.js +191 -0
- package/dist/agents/extensions/modules/searxng.js.map +1 -0
- package/dist/agents/extensions/modules/tavily.d.ts +71 -0
- package/dist/agents/extensions/modules/tavily.d.ts.map +1 -0
- package/dist/agents/extensions/modules/tavily.js +330 -0
- package/dist/agents/extensions/modules/tavily.js.map +1 -0
- package/dist/agents/extensions/modules/web-provider-helpers.d.ts +89 -0
- package/dist/agents/extensions/modules/web-provider-helpers.d.ts.map +1 -0
- package/dist/agents/extensions/modules/web-provider-helpers.js +146 -0
- package/dist/agents/extensions/modules/web-provider-helpers.js.map +1 -0
- package/dist/agents/extensions/modules/web-search-filters.d.ts +62 -0
- package/dist/agents/extensions/modules/web-search-filters.d.ts.map +1 -0
- package/dist/agents/extensions/modules/web-search-filters.js +179 -0
- package/dist/agents/extensions/modules/web-search-filters.js.map +1 -0
- package/dist/agents/extensions/modules/wikipedia.d.ts +16 -0
- package/dist/agents/extensions/modules/wikipedia.d.ts.map +1 -0
- package/dist/agents/extensions/modules/wikipedia.js +138 -0
- package/dist/agents/extensions/modules/wikipedia.js.map +1 -0
- package/dist/agents/extensions/registry-cache.d.ts +74 -0
- package/dist/agents/extensions/registry-cache.d.ts.map +1 -0
- package/dist/agents/extensions/registry-cache.js +117 -0
- package/dist/agents/extensions/registry-cache.js.map +1 -0
- package/dist/agents/extensions/registry.d.ts +184 -0
- package/dist/agents/extensions/registry.d.ts.map +1 -0
- package/dist/agents/extensions/registry.js +512 -0
- package/dist/agents/extensions/registry.js.map +1 -0
- package/dist/agents/extensions/types.d.ts +1195 -0
- package/dist/agents/extensions/types.d.ts.map +1 -0
- package/dist/agents/extensions/types.js +28 -0
- package/dist/agents/extensions/types.js.map +1 -0
- package/dist/agents/gateway-call.d.ts +171 -0
- package/dist/agents/gateway-call.d.ts.map +1 -0
- package/dist/agents/gateway-call.js +74 -0
- package/dist/agents/gateway-call.js.map +1 -0
- package/dist/agents/heartbeat-runner.d.ts +100 -0
- package/dist/agents/heartbeat-runner.d.ts.map +1 -0
- package/dist/agents/heartbeat-runner.js +268 -0
- package/dist/agents/heartbeat-runner.js.map +1 -0
- package/dist/agents/heartbeat-scheduler.d.ts +56 -0
- package/dist/agents/heartbeat-scheduler.d.ts.map +1 -0
- package/dist/agents/heartbeat-scheduler.js +366 -0
- package/dist/agents/heartbeat-scheduler.js.map +1 -0
- package/dist/agents/heartbeat-wake.d.ts +99 -0
- package/dist/agents/heartbeat-wake.d.ts.map +1 -0
- package/dist/agents/heartbeat-wake.js +304 -0
- package/dist/agents/heartbeat-wake.js.map +1 -0
- package/dist/agents/identity-file.d.ts +26 -0
- package/dist/agents/identity-file.d.ts.map +1 -0
- package/dist/agents/identity-file.js +86 -0
- package/dist/agents/identity-file.js.map +1 -0
- package/dist/agents/identity-links.d.ts +44 -0
- package/dist/agents/identity-links.d.ts.map +1 -0
- package/dist/agents/identity-links.js +51 -0
- package/dist/agents/identity-links.js.map +1 -0
- package/dist/agents/loop/autonomous-agent.d.ts +55 -0
- package/dist/agents/loop/autonomous-agent.d.ts.map +1 -0
- package/dist/agents/loop/autonomous-agent.js +91 -0
- package/dist/agents/loop/autonomous-agent.js.map +1 -0
- package/dist/agents/loop/loop-guards.d.ts +95 -0
- package/dist/agents/loop/loop-guards.d.ts.map +1 -0
- package/dist/agents/loop/loop-guards.js +169 -0
- package/dist/agents/loop/loop-guards.js.map +1 -0
- package/dist/agents/loop/loop-runner.d.ts +72 -0
- package/dist/agents/loop/loop-runner.d.ts.map +1 -0
- package/dist/agents/loop/loop-runner.js +114 -0
- package/dist/agents/loop/loop-runner.js.map +1 -0
- package/dist/agents/memory/auto-recall.d.ts +69 -0
- package/dist/agents/memory/auto-recall.d.ts.map +1 -0
- package/dist/agents/memory/auto-recall.js +147 -0
- package/dist/agents/memory/auto-recall.js.map +1 -0
- package/dist/agents/memory/behavior-review.d.ts +68 -0
- package/dist/agents/memory/behavior-review.d.ts.map +1 -0
- package/dist/agents/memory/behavior-review.js +131 -0
- package/dist/agents/memory/behavior-review.js.map +1 -0
- package/dist/agents/memory/consolidate.d.ts +62 -0
- package/dist/agents/memory/consolidate.d.ts.map +1 -0
- package/dist/agents/memory/consolidate.js +275 -0
- package/dist/agents/memory/consolidate.js.map +1 -0
- package/dist/agents/memory/contradiction.d.ts +44 -0
- package/dist/agents/memory/contradiction.d.ts.map +1 -0
- package/dist/agents/memory/contradiction.js +86 -0
- package/dist/agents/memory/contradiction.js.map +1 -0
- package/dist/agents/memory/curator.d.ts +22 -0
- package/dist/agents/memory/curator.d.ts.map +1 -0
- package/dist/agents/memory/curator.js +52 -0
- package/dist/agents/memory/curator.js.map +1 -0
- package/dist/agents/memory/decay.d.ts +32 -0
- package/dist/agents/memory/decay.d.ts.map +1 -0
- package/dist/agents/memory/decay.js +86 -0
- package/dist/agents/memory/decay.js.map +1 -0
- package/dist/agents/memory/dream.d.ts +52 -0
- package/dist/agents/memory/dream.d.ts.map +1 -0
- package/dist/agents/memory/dream.js +192 -0
- package/dist/agents/memory/dream.js.map +1 -0
- package/dist/agents/memory/embedder-providers.d.ts +114 -0
- package/dist/agents/memory/embedder-providers.d.ts.map +1 -0
- package/dist/agents/memory/embedder-providers.js +213 -0
- package/dist/agents/memory/embedder-providers.js.map +1 -0
- package/dist/agents/memory/embedder.d.ts +84 -0
- package/dist/agents/memory/embedder.d.ts.map +1 -0
- package/dist/agents/memory/embedder.js +218 -0
- package/dist/agents/memory/embedder.js.map +1 -0
- package/dist/agents/memory/eval/asr-bench.d.ts +33 -0
- package/dist/agents/memory/eval/asr-bench.d.ts.map +1 -0
- package/dist/agents/memory/eval/asr-bench.js +129 -0
- package/dist/agents/memory/eval/asr-bench.js.map +1 -0
- package/dist/agents/memory/eval/capabilities.d.ts +97 -0
- package/dist/agents/memory/eval/capabilities.d.ts.map +1 -0
- package/dist/agents/memory/eval/capabilities.js +210 -0
- package/dist/agents/memory/eval/capabilities.js.map +1 -0
- package/dist/agents/memory/eval/gold-export.d.ts +44 -0
- package/dist/agents/memory/eval/gold-export.d.ts.map +1 -0
- package/dist/agents/memory/eval/gold-export.js +85 -0
- package/dist/agents/memory/eval/gold-export.js.map +1 -0
- package/dist/agents/memory/eval/gold-hard.d.ts +35 -0
- package/dist/agents/memory/eval/gold-hard.d.ts.map +1 -0
- package/dist/agents/memory/eval/gold-hard.js +113 -0
- package/dist/agents/memory/eval/gold-hard.js.map +1 -0
- package/dist/agents/memory/eval/gold-rich.d.ts +33 -0
- package/dist/agents/memory/eval/gold-rich.d.ts.map +1 -0
- package/dist/agents/memory/eval/gold-rich.js +82 -0
- package/dist/agents/memory/eval/gold-rich.js.map +1 -0
- package/dist/agents/memory/eval/gold-synthetic.d.ts +19 -0
- package/dist/agents/memory/eval/gold-synthetic.d.ts.map +1 -0
- package/dist/agents/memory/eval/gold-synthetic.js +65 -0
- package/dist/agents/memory/eval/gold-synthetic.js.map +1 -0
- package/dist/agents/memory/eval/gold.d.ts +73 -0
- package/dist/agents/memory/eval/gold.d.ts.map +1 -0
- package/dist/agents/memory/eval/gold.js +174 -0
- package/dist/agents/memory/eval/gold.js.map +1 -0
- package/dist/agents/memory/eval/harness.d.ts +110 -0
- package/dist/agents/memory/eval/harness.d.ts.map +1 -0
- package/dist/agents/memory/eval/harness.js +123 -0
- package/dist/agents/memory/eval/harness.js.map +1 -0
- package/dist/agents/memory/eval/metrics.d.ts +71 -0
- package/dist/agents/memory/eval/metrics.d.ts.map +1 -0
- package/dist/agents/memory/eval/metrics.js +169 -0
- package/dist/agents/memory/eval/metrics.js.map +1 -0
- package/dist/agents/memory/event-log.d.ts +52 -0
- package/dist/agents/memory/event-log.d.ts.map +1 -0
- package/dist/agents/memory/event-log.js +65 -0
- package/dist/agents/memory/event-log.js.map +1 -0
- package/dist/agents/memory/extract.d.ts +155 -0
- package/dist/agents/memory/extract.d.ts.map +1 -0
- package/dist/agents/memory/extract.js +571 -0
- package/dist/agents/memory/extract.js.map +1 -0
- package/dist/agents/memory/governance.d.ts +45 -0
- package/dist/agents/memory/governance.d.ts.map +1 -0
- package/dist/agents/memory/governance.js +113 -0
- package/dist/agents/memory/governance.js.map +1 -0
- package/dist/agents/memory/graph-export.d.ts +59 -0
- package/dist/agents/memory/graph-export.d.ts.map +1 -0
- package/dist/agents/memory/graph-export.js +181 -0
- package/dist/agents/memory/graph-export.js.map +1 -0
- package/dist/agents/memory/graph-recall.d.ts +42 -0
- package/dist/agents/memory/graph-recall.d.ts.map +1 -0
- package/dist/agents/memory/graph-recall.js +165 -0
- package/dist/agents/memory/graph-recall.js.map +1 -0
- package/dist/agents/memory/graph.d.ts +92 -0
- package/dist/agents/memory/graph.d.ts.map +1 -0
- package/dist/agents/memory/graph.js +266 -0
- package/dist/agents/memory/graph.js.map +1 -0
- package/dist/agents/memory/host-ports.d.ts +27 -0
- package/dist/agents/memory/host-ports.d.ts.map +1 -0
- package/dist/agents/memory/host-ports.js +31 -0
- package/dist/agents/memory/host-ports.js.map +1 -0
- package/dist/agents/memory/hybrid.d.ts +46 -0
- package/dist/agents/memory/hybrid.d.ts.map +1 -0
- package/dist/agents/memory/hybrid.js +184 -0
- package/dist/agents/memory/hybrid.js.map +1 -0
- package/dist/agents/memory/index.d.ts +13 -0
- package/dist/agents/memory/index.d.ts.map +1 -0
- package/dist/agents/memory/index.js +13 -0
- package/dist/agents/memory/index.js.map +1 -0
- package/dist/agents/memory/json-scan.d.ts +14 -0
- package/dist/agents/memory/json-scan.d.ts.map +1 -0
- package/dist/agents/memory/json-scan.js +47 -0
- package/dist/agents/memory/json-scan.js.map +1 -0
- package/dist/agents/memory/links.d.ts +92 -0
- package/dist/agents/memory/links.d.ts.map +1 -0
- package/dist/agents/memory/links.js +140 -0
- package/dist/agents/memory/links.js.map +1 -0
- package/dist/agents/memory/maintenance.d.ts +18 -0
- package/dist/agents/memory/maintenance.d.ts.map +1 -0
- package/dist/agents/memory/maintenance.js +66 -0
- package/dist/agents/memory/maintenance.js.map +1 -0
- package/dist/agents/memory/memory-mcp-server.d.ts +39 -0
- package/dist/agents/memory/memory-mcp-server.d.ts.map +1 -0
- package/dist/agents/memory/memory-mcp-server.js +122 -0
- package/dist/agents/memory/memory-mcp-server.js.map +1 -0
- package/dist/agents/memory/memory-mcp.d.ts +34 -0
- package/dist/agents/memory/memory-mcp.d.ts.map +1 -0
- package/dist/agents/memory/memory-mcp.js +130 -0
- package/dist/agents/memory/memory-mcp.js.map +1 -0
- package/dist/agents/memory/plugin-runtime.d.ts +133 -0
- package/dist/agents/memory/plugin-runtime.d.ts.map +1 -0
- package/dist/agents/memory/plugin-runtime.js +149 -0
- package/dist/agents/memory/plugin-runtime.js.map +1 -0
- package/dist/agents/memory/query.d.ts +50 -0
- package/dist/agents/memory/query.d.ts.map +1 -0
- package/dist/agents/memory/query.js +94 -0
- package/dist/agents/memory/query.js.map +1 -0
- package/dist/agents/memory/records.d.ts +617 -0
- package/dist/agents/memory/records.d.ts.map +1 -0
- package/dist/agents/memory/records.js +1327 -0
- package/dist/agents/memory/records.js.map +1 -0
- package/dist/agents/memory/reembed.d.ts +42 -0
- package/dist/agents/memory/reembed.d.ts.map +1 -0
- package/dist/agents/memory/reembed.js +60 -0
- package/dist/agents/memory/reembed.js.map +1 -0
- package/dist/agents/memory/relationship-extract.d.ts +259 -0
- package/dist/agents/memory/relationship-extract.d.ts.map +1 -0
- package/dist/agents/memory/relationship-extract.js +454 -0
- package/dist/agents/memory/relationship-extract.js.map +1 -0
- package/dist/agents/memory/rerank.d.ts +37 -0
- package/dist/agents/memory/rerank.d.ts.map +1 -0
- package/dist/agents/memory/rerank.js +43 -0
- package/dist/agents/memory/rerank.js.map +1 -0
- package/dist/agents/memory/scoring.d.ts +85 -0
- package/dist/agents/memory/scoring.d.ts.map +1 -0
- package/dist/agents/memory/scoring.js +139 -0
- package/dist/agents/memory/scoring.js.map +1 -0
- package/dist/agents/memory/self-improve.d.ts +56 -0
- package/dist/agents/memory/self-improve.d.ts.map +1 -0
- package/dist/agents/memory/self-improve.js +98 -0
- package/dist/agents/memory/self-improve.js.map +1 -0
- package/dist/agents/memory/self-review.d.ts +68 -0
- package/dist/agents/memory/self-review.d.ts.map +1 -0
- package/dist/agents/memory/self-review.js +109 -0
- package/dist/agents/memory/self-review.js.map +1 -0
- package/dist/agents/memory/storage.d.ts +156 -0
- package/dist/agents/memory/storage.d.ts.map +1 -0
- package/dist/agents/memory/storage.js +359 -0
- package/dist/agents/memory/storage.js.map +1 -0
- package/dist/agents/memory/tideline.d.ts +203 -0
- package/dist/agents/memory/tideline.d.ts.map +1 -0
- package/dist/agents/memory/tideline.js +189 -0
- package/dist/agents/memory/tideline.js.map +1 -0
- package/dist/agents/memory/vault.d.ts +142 -0
- package/dist/agents/memory/vault.d.ts.map +1 -0
- package/dist/agents/memory/vault.js +787 -0
- package/dist/agents/memory/vault.js.map +1 -0
- package/dist/agents/memory/write-gate.d.ts +76 -0
- package/dist/agents/memory/write-gate.d.ts.map +1 -0
- package/dist/agents/memory/write-gate.js +140 -0
- package/dist/agents/memory/write-gate.js.map +1 -0
- package/dist/agents/mid-turn-switch.d.ts +25 -0
- package/dist/agents/mid-turn-switch.d.ts.map +1 -0
- package/dist/agents/mid-turn-switch.js +103 -0
- package/dist/agents/mid-turn-switch.js.map +1 -0
- package/dist/agents/model-fallback.d.ts +50 -0
- package/dist/agents/model-fallback.d.ts.map +1 -0
- package/dist/agents/model-fallback.js +226 -0
- package/dist/agents/model-fallback.js.map +1 -0
- package/dist/agents/model-resolution.d.ts +38 -0
- package/dist/agents/model-resolution.d.ts.map +1 -0
- package/dist/agents/model-resolution.js +155 -0
- package/dist/agents/model-resolution.js.map +1 -0
- package/dist/agents/org/a2a-adapter.d.ts +49 -0
- package/dist/agents/org/a2a-adapter.d.ts.map +1 -0
- package/dist/agents/org/a2a-adapter.js +92 -0
- package/dist/agents/org/a2a-adapter.js.map +1 -0
- package/dist/agents/org/assets/mascots/README.md +34 -0
- package/dist/agents/org/assets/mascots/Untitled-1.png +0 -0
- package/dist/agents/org/assets/mascots/brigade_biceps.png +0 -0
- package/dist/agents/org/audit-log.d.ts +22 -0
- package/dist/agents/org/audit-log.d.ts.map +1 -0
- package/dist/agents/org/audit-log.js +37 -0
- package/dist/agents/org/audit-log.js.map +1 -0
- package/dist/agents/org/auto-derive.d.ts +22 -0
- package/dist/agents/org/auto-derive.d.ts.map +1 -0
- package/dist/agents/org/auto-derive.js +66 -0
- package/dist/agents/org/auto-derive.js.map +1 -0
- package/dist/agents/org/delivery-kind.d.ts +89 -0
- package/dist/agents/org/delivery-kind.d.ts.map +1 -0
- package/dist/agents/org/delivery-kind.js +149 -0
- package/dist/agents/org/delivery-kind.js.map +1 -0
- package/dist/agents/org/derive-graph.d.ts +34 -0
- package/dist/agents/org/derive-graph.d.ts.map +1 -0
- package/dist/agents/org/derive-graph.js +266 -0
- package/dist/agents/org/derive-graph.js.map +1 -0
- package/dist/agents/org/lints.d.ts +21 -0
- package/dist/agents/org/lints.d.ts.map +1 -0
- package/dist/agents/org/lints.js +133 -0
- package/dist/agents/org/lints.js.map +1 -0
- package/dist/agents/org/pride-html.d.ts +61 -0
- package/dist/agents/org/pride-html.d.ts.map +1 -0
- package/dist/agents/org/pride-html.js +565 -0
- package/dist/agents/org/pride-html.js.map +1 -0
- package/dist/agents/org/pride-image.d.ts +101 -0
- package/dist/agents/org/pride-image.d.ts.map +1 -0
- package/dist/agents/org/pride-image.js +210 -0
- package/dist/agents/org/pride-image.js.map +1 -0
- package/dist/agents/org/pride-taunts.d.ts +47 -0
- package/dist/agents/org/pride-taunts.d.ts.map +1 -0
- package/dist/agents/org/pride-taunts.js +411 -0
- package/dist/agents/org/pride-taunts.js.map +1 -0
- package/dist/agents/org/pride-template.d.ts +272 -0
- package/dist/agents/org/pride-template.d.ts.map +1 -0
- package/dist/agents/org/pride-template.js +892 -0
- package/dist/agents/org/pride-template.js.map +1 -0
- package/dist/agents/org/pride-themes.d.ts +80 -0
- package/dist/agents/org/pride-themes.d.ts.map +1 -0
- package/dist/agents/org/pride-themes.js +7596 -0
- package/dist/agents/org/pride-themes.js.map +1 -0
- package/dist/agents/org/structured-errors.d.ts +47 -0
- package/dist/agents/org/structured-errors.d.ts.map +1 -0
- package/dist/agents/org/structured-errors.js +97 -0
- package/dist/agents/org/structured-errors.js.map +1 -0
- package/dist/agents/org/types.d.ts +139 -0
- package/dist/agents/org/types.d.ts.map +1 -0
- package/dist/agents/org/types.js +43 -0
- package/dist/agents/org/types.js.map +1 -0
- package/dist/agents/org/validate.d.ts +36 -0
- package/dist/agents/org/validate.d.ts.map +1 -0
- package/dist/agents/org/validate.js +135 -0
- package/dist/agents/org/validate.js.map +1 -0
- package/dist/agents/path-write-guard.d.ts +82 -0
- package/dist/agents/path-write-guard.d.ts.map +1 -0
- package/dist/agents/path-write-guard.js +722 -0
- package/dist/agents/path-write-guard.js.map +1 -0
- package/dist/agents/payload-mutators.d.ts +175 -0
- package/dist/agents/payload-mutators.d.ts.map +1 -0
- package/dist/agents/payload-mutators.js +994 -0
- package/dist/agents/payload-mutators.js.map +1 -0
- package/dist/agents/pending-system-events.d.ts +76 -0
- package/dist/agents/pending-system-events.d.ts.map +1 -0
- package/dist/agents/pending-system-events.js +115 -0
- package/dist/agents/pending-system-events.js.map +1 -0
- package/dist/agents/provider-attribution.d.ts +19 -0
- package/dist/agents/provider-attribution.d.ts.map +1 -0
- package/dist/agents/provider-attribution.js +62 -0
- package/dist/agents/provider-attribution.js.map +1 -0
- package/dist/agents/quality/slop-detector.d.ts +40 -0
- package/dist/agents/quality/slop-detector.d.ts.map +1 -0
- package/dist/agents/quality/slop-detector.js +108 -0
- package/dist/agents/quality/slop-detector.js.map +1 -0
- package/dist/agents/quality/slop-index.d.ts +27 -0
- package/dist/agents/quality/slop-index.d.ts.map +1 -0
- package/dist/agents/quality/slop-index.js +124 -0
- package/dist/agents/quality/slop-index.js.map +1 -0
- package/dist/agents/retry-policy.d.ts +38 -0
- package/dist/agents/retry-policy.d.ts.map +1 -0
- package/dist/agents/retry-policy.js +276 -0
- package/dist/agents/retry-policy.js.map +1 -0
- package/dist/agents/routing/account-id.d.ts +43 -0
- package/dist/agents/routing/account-id.d.ts.map +1 -0
- package/dist/agents/routing/account-id.js +103 -0
- package/dist/agents/routing/account-id.js.map +1 -0
- package/dist/agents/routing/bindings.d.ts +20 -0
- package/dist/agents/routing/bindings.d.ts.map +1 -0
- package/dist/agents/routing/bindings.js +22 -0
- package/dist/agents/routing/bindings.js.map +1 -0
- package/dist/agents/routing/dm-scope-warning.d.ts +37 -0
- package/dist/agents/routing/dm-scope-warning.d.ts.map +1 -0
- package/dist/agents/routing/dm-scope-warning.js +110 -0
- package/dist/agents/routing/dm-scope-warning.js.map +1 -0
- package/dist/agents/routing/identity-links.d.ts +45 -0
- package/dist/agents/routing/identity-links.d.ts.map +1 -0
- package/dist/agents/routing/identity-links.js +85 -0
- package/dist/agents/routing/identity-links.js.map +1 -0
- package/dist/agents/routing/resolve-route.d.ts +91 -0
- package/dist/agents/routing/resolve-route.d.ts.map +1 -0
- package/dist/agents/routing/resolve-route.js +653 -0
- package/dist/agents/routing/resolve-route.js.map +1 -0
- package/dist/agents/routing/session-key.d.ts +168 -0
- package/dist/agents/routing/session-key.d.ts.map +1 -0
- package/dist/agents/routing/session-key.js +268 -0
- package/dist/agents/routing/session-key.js.map +1 -0
- package/dist/agents/sanitize-surrogates.d.ts +30 -0
- package/dist/agents/sanitize-surrogates.d.ts.map +1 -0
- package/dist/agents/sanitize-surrogates.js +56 -0
- package/dist/agents/sanitize-surrogates.js.map +1 -0
- package/dist/agents/session-context.d.ts +80 -0
- package/dist/agents/session-context.d.ts.map +1 -0
- package/dist/agents/session-context.js +76 -0
- package/dist/agents/session-context.js.map +1 -0
- package/dist/agents/session-event-prompt.d.ts +124 -0
- package/dist/agents/session-event-prompt.d.ts.map +1 -0
- package/dist/agents/session-event-prompt.js +179 -0
- package/dist/agents/session-event-prompt.js.map +1 -0
- package/dist/agents/session-inbox.d.ts +129 -0
- package/dist/agents/session-inbox.d.ts.map +1 -0
- package/dist/agents/session-inbox.js +492 -0
- package/dist/agents/session-inbox.js.map +1 -0
- package/dist/agents/session-registry.d.ts +148 -0
- package/dist/agents/session-registry.d.ts.map +1 -0
- package/dist/agents/session-registry.js +405 -0
- package/dist/agents/session-registry.js.map +1 -0
- package/dist/agents/session-wiring.d.ts +214 -0
- package/dist/agents/session-wiring.d.ts.map +1 -0
- package/dist/agents/session-wiring.js +278 -0
- package/dist/agents/session-wiring.js.map +1 -0
- package/dist/agents/session-write-lock.d.ts +15 -0
- package/dist/agents/session-write-lock.d.ts.map +1 -0
- package/dist/agents/session-write-lock.js +15 -0
- package/dist/agents/session-write-lock.js.map +1 -0
- package/dist/agents/skills/agent-filter.d.ts +43 -0
- package/dist/agents/skills/agent-filter.d.ts.map +1 -0
- package/dist/agents/skills/agent-filter.js +89 -0
- package/dist/agents/skills/agent-filter.js.map +1 -0
- package/dist/agents/skills/discovery.d.ts +97 -0
- package/dist/agents/skills/discovery.d.ts.map +1 -0
- package/dist/agents/skills/discovery.js +136 -0
- package/dist/agents/skills/discovery.js.map +1 -0
- package/dist/agents/skills/eligibility.d.ts +118 -0
- package/dist/agents/skills/eligibility.d.ts.map +1 -0
- package/dist/agents/skills/eligibility.js +280 -0
- package/dist/agents/skills/eligibility.js.map +1 -0
- package/dist/agents/skills/grant.d.ts +70 -0
- package/dist/agents/skills/grant.d.ts.map +1 -0
- package/dist/agents/skills/grant.js +106 -0
- package/dist/agents/skills/grant.js.map +1 -0
- package/dist/agents/skills/index.d.ts +35 -0
- package/dist/agents/skills/index.d.ts.map +1 -0
- package/dist/agents/skills/index.js +88 -0
- package/dist/agents/skills/index.js.map +1 -0
- package/dist/agents/skills/install-spec.d.ts +51 -0
- package/dist/agents/skills/install-spec.d.ts.map +1 -0
- package/dist/agents/skills/install-spec.js +21 -0
- package/dist/agents/skills/install-spec.js.map +1 -0
- package/dist/agents/skills/install.d.ts +68 -0
- package/dist/agents/skills/install.d.ts.map +1 -0
- package/dist/agents/skills/install.js +206 -0
- package/dist/agents/skills/install.js.map +1 -0
- package/dist/agents/skills/org-access.d.ts +27 -0
- package/dist/agents/skills/org-access.d.ts.map +1 -0
- package/dist/agents/skills/org-access.js +87 -0
- package/dist/agents/skills/org-access.js.map +1 -0
- package/dist/agents/skills/skill-consolidate.d.ts +76 -0
- package/dist/agents/skills/skill-consolidate.d.ts.map +1 -0
- package/dist/agents/skills/skill-consolidate.js +264 -0
- package/dist/agents/skills/skill-consolidate.js.map +1 -0
- package/dist/agents/skills/skill-curator.d.ts +91 -0
- package/dist/agents/skills/skill-curator.d.ts.map +1 -0
- package/dist/agents/skills/skill-curator.js +239 -0
- package/dist/agents/skills/skill-curator.js.map +1 -0
- package/dist/agents/skills/skill-manifest.d.ts +35 -0
- package/dist/agents/skills/skill-manifest.d.ts.map +1 -0
- package/dist/agents/skills/skill-manifest.js +82 -0
- package/dist/agents/skills/skill-manifest.js.map +1 -0
- package/dist/agents/skills/skill-review.d.ts +91 -0
- package/dist/agents/skills/skill-review.d.ts.map +1 -0
- package/dist/agents/skills/skill-review.js +271 -0
- package/dist/agents/skills/skill-review.js.map +1 -0
- package/dist/agents/skills/skill-usage.d.ts +81 -0
- package/dist/agents/skills/skill-usage.d.ts.map +1 -0
- package/dist/agents/skills/skill-usage.js +208 -0
- package/dist/agents/skills/skill-usage.js.map +1 -0
- package/dist/agents/skills/status.d.ts +68 -0
- package/dist/agents/skills/status.d.ts.map +1 -0
- package/dist/agents/skills/status.js +147 -0
- package/dist/agents/skills/status.js.map +1 -0
- package/dist/agents/skills/update-config.d.ts +32 -0
- package/dist/agents/skills/update-config.d.ts.map +1 -0
- package/dist/agents/skills/update-config.js +53 -0
- package/dist/agents/skills/update-config.js.map +1 -0
- package/dist/agents/slash-commands.d.ts +25 -0
- package/dist/agents/slash-commands.d.ts.map +1 -0
- package/dist/agents/slash-commands.js +151 -0
- package/dist/agents/slash-commands.js.map +1 -0
- package/dist/agents/smart-compaction.d.ts +105 -0
- package/dist/agents/smart-compaction.d.ts.map +1 -0
- package/dist/agents/smart-compaction.js +355 -0
- package/dist/agents/smart-compaction.js.map +1 -0
- package/dist/agents/stream-wrappers.d.ts +20 -0
- package/dist/agents/stream-wrappers.d.ts.map +1 -0
- package/dist/agents/stream-wrappers.js +307 -0
- package/dist/agents/stream-wrappers.js.map +1 -0
- package/dist/agents/subagent-abort-cascade.d.ts +31 -0
- package/dist/agents/subagent-abort-cascade.d.ts.map +1 -0
- package/dist/agents/subagent-abort-cascade.js +124 -0
- package/dist/agents/subagent-abort-cascade.js.map +1 -0
- package/dist/agents/subagent-announce-delivery.d.ts +83 -0
- package/dist/agents/subagent-announce-delivery.d.ts.map +1 -0
- package/dist/agents/subagent-announce-delivery.js +159 -0
- package/dist/agents/subagent-announce-delivery.js.map +1 -0
- package/dist/agents/subagent-budget.d.ts +36 -0
- package/dist/agents/subagent-budget.d.ts.map +1 -0
- package/dist/agents/subagent-budget.js +93 -0
- package/dist/agents/subagent-budget.js.map +1 -0
- package/dist/agents/subagent-completion-bridge.d.ts +42 -0
- package/dist/agents/subagent-completion-bridge.d.ts.map +1 -0
- package/dist/agents/subagent-completion-bridge.js +338 -0
- package/dist/agents/subagent-completion-bridge.js.map +1 -0
- package/dist/agents/subagent-lifecycle-events.d.ts +31 -0
- package/dist/agents/subagent-lifecycle-events.d.ts.map +1 -0
- package/dist/agents/subagent-lifecycle-events.js +21 -0
- package/dist/agents/subagent-lifecycle-events.js.map +1 -0
- package/dist/agents/subagent-policy.d.ts +206 -0
- package/dist/agents/subagent-policy.d.ts.map +1 -0
- package/dist/agents/subagent-policy.js +295 -0
- package/dist/agents/subagent-policy.js.map +1 -0
- package/dist/agents/subagent-registry-completion.d.ts +69 -0
- package/dist/agents/subagent-registry-completion.d.ts.map +1 -0
- package/dist/agents/subagent-registry-completion.js +128 -0
- package/dist/agents/subagent-registry-completion.js.map +1 -0
- package/dist/agents/subagent-registry.d.ts +85 -0
- package/dist/agents/subagent-registry.d.ts.map +1 -0
- package/dist/agents/subagent-registry.js +215 -0
- package/dist/agents/subagent-registry.js.map +1 -0
- package/dist/agents/subagent-registry.types.d.ts +94 -0
- package/dist/agents/subagent-registry.types.d.ts.map +1 -0
- package/dist/agents/subagent-registry.types.js +19 -0
- package/dist/agents/subagent-registry.types.js.map +1 -0
- package/dist/agents/subagent-runner.d.ts +75 -0
- package/dist/agents/subagent-runner.d.ts.map +1 -0
- package/dist/agents/subagent-runner.js +358 -0
- package/dist/agents/subagent-runner.js.map +1 -0
- package/dist/agents/subagent-spawn-abort-marker.d.ts +46 -0
- package/dist/agents/subagent-spawn-abort-marker.d.ts.map +1 -0
- package/dist/agents/subagent-spawn-abort-marker.js +81 -0
- package/dist/agents/subagent-spawn-abort-marker.js.map +1 -0
- package/dist/agents/subagent-spawn.d.ts +104 -0
- package/dist/agents/subagent-spawn.d.ts.map +1 -0
- package/dist/agents/subagent-spawn.js +358 -0
- package/dist/agents/subagent-spawn.js.map +1 -0
- package/dist/agents/thinking-fallback.d.ts +49 -0
- package/dist/agents/thinking-fallback.d.ts.map +1 -0
- package/dist/agents/thinking-fallback.js +97 -0
- package/dist/agents/thinking-fallback.js.map +1 -0
- package/dist/agents/tool-guard.d.ts +71 -0
- package/dist/agents/tool-guard.d.ts.map +1 -0
- package/dist/agents/tool-guard.js +154 -0
- package/dist/agents/tool-guard.js.map +1 -0
- package/dist/agents/tool-loop-detector.d.ts +115 -0
- package/dist/agents/tool-loop-detector.d.ts.map +1 -0
- package/dist/agents/tool-loop-detector.js +0 -0
- package/dist/agents/tool-loop-detector.js.map +1 -0
- package/dist/agents/tool-summaries.d.ts +3 -0
- package/dist/agents/tool-summaries.d.ts.map +1 -0
- package/dist/agents/tool-summaries.js +78 -0
- package/dist/agents/tool-summaries.js.map +1 -0
- package/dist/agents/tools/agents-list-tool.d.ts +51 -0
- package/dist/agents/tools/agents-list-tool.d.ts.map +1 -0
- package/dist/agents/tools/agents-list-tool.js +167 -0
- package/dist/agents/tools/agents-list-tool.js.map +1 -0
- package/dist/agents/tools/browser.d.ts +144 -0
- package/dist/agents/tools/browser.d.ts.map +1 -0
- package/dist/agents/tools/browser.js +1538 -0
- package/dist/agents/tools/browser.js.map +1 -0
- package/dist/agents/tools/common.d.ts +208 -0
- package/dist/agents/tools/common.d.ts.map +1 -0
- package/dist/agents/tools/common.js +405 -0
- package/dist/agents/tools/common.js.map +1 -0
- package/dist/agents/tools/composio-tool.d.ts +179 -0
- package/dist/agents/tools/composio-tool.d.ts.map +1 -0
- package/dist/agents/tools/composio-tool.js +474 -0
- package/dist/agents/tools/composio-tool.js.map +1 -0
- package/dist/agents/tools/cron-tool.d.ts +187 -0
- package/dist/agents/tools/cron-tool.d.ts.map +1 -0
- package/dist/agents/tools/cron-tool.js +985 -0
- package/dist/agents/tools/cron-tool.js.map +1 -0
- package/dist/agents/tools/find-tool.d.ts +55 -0
- package/dist/agents/tools/find-tool.d.ts.map +1 -0
- package/dist/agents/tools/find-tool.js +163 -0
- package/dist/agents/tools/find-tool.js.map +1 -0
- package/dist/agents/tools/generate-image-tool.d.ts +77 -0
- package/dist/agents/tools/generate-image-tool.d.ts.map +1 -0
- package/dist/agents/tools/generate-image-tool.js +421 -0
- package/dist/agents/tools/generate-image-tool.js.map +1 -0
- package/dist/agents/tools/index.d.ts +14 -0
- package/dist/agents/tools/index.d.ts.map +1 -0
- package/dist/agents/tools/index.js +12 -0
- package/dist/agents/tools/index.js.map +1 -0
- package/dist/agents/tools/manage-access-tool.d.ts +64 -0
- package/dist/agents/tools/manage-access-tool.d.ts.map +1 -0
- package/dist/agents/tools/manage-access-tool.js +188 -0
- package/dist/agents/tools/manage-access-tool.js.map +1 -0
- package/dist/agents/tools/manage-agent-tool.d.ts +50 -0
- package/dist/agents/tools/manage-agent-tool.d.ts.map +1 -0
- package/dist/agents/tools/manage-agent-tool.js +232 -0
- package/dist/agents/tools/manage-agent-tool.js.map +1 -0
- package/dist/agents/tools/manage-channel-access-tool.d.ts +44 -0
- package/dist/agents/tools/manage-channel-access-tool.d.ts.map +1 -0
- package/dist/agents/tools/manage-channel-access-tool.js +144 -0
- package/dist/agents/tools/manage-channel-access-tool.js.map +1 -0
- package/dist/agents/tools/manage-memory-tool.d.ts +30 -0
- package/dist/agents/tools/manage-memory-tool.d.ts.map +1 -0
- package/dist/agents/tools/manage-memory-tool.js +309 -0
- package/dist/agents/tools/manage-memory-tool.js.map +1 -0
- package/dist/agents/tools/manage-provider-tool.d.ts +65 -0
- package/dist/agents/tools/manage-provider-tool.d.ts.map +1 -0
- package/dist/agents/tools/manage-provider-tool.js +249 -0
- package/dist/agents/tools/manage-provider-tool.js.map +1 -0
- package/dist/agents/tools/manage-skill-tool.d.ts +121 -0
- package/dist/agents/tools/manage-skill-tool.d.ts.map +1 -0
- package/dist/agents/tools/manage-skill-tool.js +722 -0
- package/dist/agents/tools/manage-skill-tool.js.map +1 -0
- package/dist/agents/tools/memory-tools.d.ts +172 -0
- package/dist/agents/tools/memory-tools.d.ts.map +1 -0
- package/dist/agents/tools/memory-tools.js +561 -0
- package/dist/agents/tools/memory-tools.js.map +1 -0
- package/dist/agents/tools/oauth-authorize-tool.d.ts +94 -0
- package/dist/agents/tools/oauth-authorize-tool.d.ts.map +1 -0
- package/dist/agents/tools/oauth-authorize-tool.js +670 -0
- package/dist/agents/tools/oauth-authorize-tool.js.map +1 -0
- package/dist/agents/tools/org-tool.d.ts +208 -0
- package/dist/agents/tools/org-tool.d.ts.map +1 -0
- package/dist/agents/tools/org-tool.js +790 -0
- package/dist/agents/tools/org-tool.js.map +1 -0
- package/dist/agents/tools/registry.d.ts +146 -0
- package/dist/agents/tools/registry.d.ts.map +1 -0
- package/dist/agents/tools/registry.js +396 -0
- package/dist/agents/tools/registry.js.map +1 -0
- package/dist/agents/tools/send-media-tool.d.ts +92 -0
- package/dist/agents/tools/send-media-tool.d.ts.map +1 -0
- package/dist/agents/tools/send-media-tool.js +512 -0
- package/dist/agents/tools/send-media-tool.js.map +1 -0
- package/dist/agents/tools/send-message-tool.d.ts +84 -0
- package/dist/agents/tools/send-message-tool.d.ts.map +1 -0
- package/dist/agents/tools/send-message-tool.js +226 -0
- package/dist/agents/tools/send-message-tool.js.map +1 -0
- package/dist/agents/tools/sessions/history.d.ts +53 -0
- package/dist/agents/tools/sessions/history.d.ts.map +1 -0
- package/dist/agents/tools/sessions/history.js +138 -0
- package/dist/agents/tools/sessions/history.js.map +1 -0
- package/dist/agents/tools/sessions/index.d.ts +92 -0
- package/dist/agents/tools/sessions/index.d.ts.map +1 -0
- package/dist/agents/tools/sessions/index.js +125 -0
- package/dist/agents/tools/sessions/index.js.map +1 -0
- package/dist/agents/tools/sessions/list.d.ts +53 -0
- package/dist/agents/tools/sessions/list.d.ts.map +1 -0
- package/dist/agents/tools/sessions/list.js +134 -0
- package/dist/agents/tools/sessions/list.js.map +1 -0
- package/dist/agents/tools/sessions/resolve-access.d.ts +34 -0
- package/dist/agents/tools/sessions/resolve-access.d.ts.map +1 -0
- package/dist/agents/tools/sessions/resolve-access.js +67 -0
- package/dist/agents/tools/sessions/resolve-access.js.map +1 -0
- package/dist/agents/tools/sessions/send.d.ts +68 -0
- package/dist/agents/tools/sessions/send.d.ts.map +1 -0
- package/dist/agents/tools/sessions/send.js +556 -0
- package/dist/agents/tools/sessions/send.js.map +1 -0
- package/dist/agents/tools/sessions/shared.d.ts +145 -0
- package/dist/agents/tools/sessions/shared.d.ts.map +1 -0
- package/dist/agents/tools/sessions/shared.js +352 -0
- package/dist/agents/tools/sessions/shared.js.map +1 -0
- package/dist/agents/tools/sessions/spawn.d.ts +71 -0
- package/dist/agents/tools/sessions/spawn.d.ts.map +1 -0
- package/dist/agents/tools/sessions/spawn.js +132 -0
- package/dist/agents/tools/sessions/spawn.js.map +1 -0
- package/dist/agents/tools/spawn-agent-tool.d.ts +87 -0
- package/dist/agents/tools/spawn-agent-tool.d.ts.map +1 -0
- package/dist/agents/tools/spawn-agent-tool.js +189 -0
- package/dist/agents/tools/spawn-agent-tool.js.map +1 -0
- package/dist/agents/tools/spawn-agents-tool.d.ts +75 -0
- package/dist/agents/tools/spawn-agents-tool.d.ts.map +1 -0
- package/dist/agents/tools/spawn-agents-tool.js +267 -0
- package/dist/agents/tools/spawn-agents-tool.js.map +1 -0
- package/dist/agents/tools/types.d.ts +55 -0
- package/dist/agents/tools/types.d.ts.map +1 -0
- package/dist/agents/tools/types.js +28 -0
- package/dist/agents/tools/types.js.map +1 -0
- package/dist/agents/tools/web-fetch-utils.d.ts +114 -0
- package/dist/agents/tools/web-fetch-utils.d.ts.map +1 -0
- package/dist/agents/tools/web-fetch-utils.js +560 -0
- package/dist/agents/tools/web-fetch-utils.js.map +1 -0
- package/dist/agents/tools/web-fetch.d.ts +97 -0
- package/dist/agents/tools/web-fetch.d.ts.map +1 -0
- package/dist/agents/tools/web-fetch.js +369 -0
- package/dist/agents/tools/web-fetch.js.map +1 -0
- package/dist/agents/tools/web-retry.d.ts +55 -0
- package/dist/agents/tools/web-retry.d.ts.map +1 -0
- package/dist/agents/tools/web-retry.js +172 -0
- package/dist/agents/tools/web-retry.js.map +1 -0
- package/dist/agents/tools/web-search.d.ts +96 -0
- package/dist/agents/tools/web-search.d.ts.map +1 -0
- package/dist/agents/tools/web-search.js +459 -0
- package/dist/agents/tools/web-search.js.map +1 -0
- package/dist/agents/tools/web-shared.d.ts +123 -0
- package/dist/agents/tools/web-shared.d.ts.map +1 -0
- package/dist/agents/tools/web-shared.js +207 -0
- package/dist/agents/tools/web-shared.js.map +1 -0
- package/dist/assets/brigade-favicon.png +0 -0
- package/dist/auth/profile-cooldown.d.ts +105 -0
- package/dist/auth/profile-cooldown.d.ts.map +1 -0
- package/dist/auth/profile-cooldown.js +466 -0
- package/dist/auth/profile-cooldown.js.map +1 -0
- package/dist/auth/profiles.d.ts +93 -0
- package/dist/auth/profiles.d.ts.map +1 -0
- package/dist/auth/profiles.js +321 -0
- package/dist/auth/profiles.js.map +1 -0
- package/dist/buildstamp.json +1 -0
- package/dist/cli/argv.d.ts +20 -0
- package/dist/cli/argv.d.ts.map +1 -0
- package/dist/cli/argv.js +47 -0
- package/dist/cli/argv.js.map +1 -0
- package/dist/cli/commands/agent.d.ts +19 -0
- package/dist/cli/commands/agent.d.ts.map +1 -0
- package/dist/cli/commands/agent.js +297 -0
- package/dist/cli/commands/agent.js.map +1 -0
- package/dist/cli/commands/agents-bindings.d.ts +80 -0
- package/dist/cli/commands/agents-bindings.d.ts.map +1 -0
- package/dist/cli/commands/agents-bindings.js +252 -0
- package/dist/cli/commands/agents-bindings.js.map +1 -0
- package/dist/cli/commands/agents-cmd.d.ts +160 -0
- package/dist/cli/commands/agents-cmd.d.ts.map +1 -0
- package/dist/cli/commands/agents-cmd.js +1199 -0
- package/dist/cli/commands/agents-cmd.js.map +1 -0
- package/dist/cli/commands/agents-config.d.ts +102 -0
- package/dist/cli/commands/agents-config.d.ts.map +1 -0
- package/dist/cli/commands/agents-config.js +294 -0
- package/dist/cli/commands/agents-config.js.map +1 -0
- package/dist/cli/commands/agents-shared.d.ts +57 -0
- package/dist/cli/commands/agents-shared.d.ts.map +1 -0
- package/dist/cli/commands/agents-shared.js +83 -0
- package/dist/cli/commands/agents-shared.js.map +1 -0
- package/dist/cli/commands/backup.d.ts +36 -0
- package/dist/cli/commands/backup.d.ts.map +1 -0
- package/dist/cli/commands/backup.js +244 -0
- package/dist/cli/commands/backup.js.map +1 -0
- package/dist/cli/commands/channels.d.ts +106 -0
- package/dist/cli/commands/channels.d.ts.map +1 -0
- package/dist/cli/commands/channels.js +830 -0
- package/dist/cli/commands/channels.js.map +1 -0
- package/dist/cli/commands/chat.d.ts +43 -0
- package/dist/cli/commands/chat.d.ts.map +1 -0
- package/dist/cli/commands/chat.js +84 -0
- package/dist/cli/commands/chat.js.map +1 -0
- package/dist/cli/commands/config-cmd.d.ts +62 -0
- package/dist/cli/commands/config-cmd.d.ts.map +1 -0
- package/dist/cli/commands/config-cmd.js +404 -0
- package/dist/cli/commands/config-cmd.js.map +1 -0
- package/dist/cli/commands/connect.d.ts +73 -0
- package/dist/cli/commands/connect.d.ts.map +1 -0
- package/dist/cli/commands/connect.js +1952 -0
- package/dist/cli/commands/connect.js.map +1 -0
- package/dist/cli/commands/cron.d.ts +58 -0
- package/dist/cli/commands/cron.d.ts.map +1 -0
- package/dist/cli/commands/cron.js +250 -0
- package/dist/cli/commands/cron.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +25 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +618 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/encrypt-cmd.d.ts +12 -0
- package/dist/cli/commands/encrypt-cmd.d.ts.map +1 -0
- package/dist/cli/commands/encrypt-cmd.js +119 -0
- package/dist/cli/commands/encrypt-cmd.js.map +1 -0
- package/dist/cli/commands/exec-cmd.d.ts +55 -0
- package/dist/cli/commands/exec-cmd.d.ts.map +1 -0
- package/dist/cli/commands/exec-cmd.js +253 -0
- package/dist/cli/commands/exec-cmd.js.map +1 -0
- package/dist/cli/commands/gateway-install.d.ts +21 -0
- package/dist/cli/commands/gateway-install.d.ts.map +1 -0
- package/dist/cli/commands/gateway-install.js +71 -0
- package/dist/cli/commands/gateway-install.js.map +1 -0
- package/dist/cli/commands/gateway-supervise.d.ts +102 -0
- package/dist/cli/commands/gateway-supervise.d.ts.map +1 -0
- package/dist/cli/commands/gateway-supervise.js +194 -0
- package/dist/cli/commands/gateway-supervise.js.map +1 -0
- package/dist/cli/commands/gateway.d.ts +58 -0
- package/dist/cli/commands/gateway.d.ts.map +1 -0
- package/dist/cli/commands/gateway.js +497 -0
- package/dist/cli/commands/gateway.js.map +1 -0
- package/dist/cli/commands/logs.d.ts +14 -0
- package/dist/cli/commands/logs.d.ts.map +1 -0
- package/dist/cli/commands/logs.js +93 -0
- package/dist/cli/commands/logs.js.map +1 -0
- package/dist/cli/commands/mcp-cmd.d.ts +4 -0
- package/dist/cli/commands/mcp-cmd.d.ts.map +1 -0
- package/dist/cli/commands/mcp-cmd.js +30 -0
- package/dist/cli/commands/mcp-cmd.js.map +1 -0
- package/dist/cli/commands/onboard-config.d.ts +23 -0
- package/dist/cli/commands/onboard-config.d.ts.map +1 -0
- package/dist/cli/commands/onboard-config.js +33 -0
- package/dist/cli/commands/onboard-config.js.map +1 -0
- package/dist/cli/commands/onboard.d.ts +48 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -0
- package/dist/cli/commands/onboard.js +397 -0
- package/dist/cli/commands/onboard.js.map +1 -0
- package/dist/cli/commands/org-cmd.d.ts +87 -0
- package/dist/cli/commands/org-cmd.d.ts.map +1 -0
- package/dist/cli/commands/org-cmd.js +394 -0
- package/dist/cli/commands/org-cmd.js.map +1 -0
- package/dist/cli/commands/org-cmd.templates.d.ts +66 -0
- package/dist/cli/commands/org-cmd.templates.d.ts.map +1 -0
- package/dist/cli/commands/org-cmd.templates.js +145 -0
- package/dist/cli/commands/org-cmd.templates.js.map +1 -0
- package/dist/cli/commands/org-slash.d.ts +107 -0
- package/dist/cli/commands/org-slash.d.ts.map +1 -0
- package/dist/cli/commands/org-slash.js +263 -0
- package/dist/cli/commands/org-slash.js.map +1 -0
- package/dist/cli/commands/pairing.d.ts +33 -0
- package/dist/cli/commands/pairing.d.ts.map +1 -0
- package/dist/cli/commands/pairing.js +155 -0
- package/dist/cli/commands/pairing.js.map +1 -0
- package/dist/cli/commands/secrets-audit.d.ts +17 -0
- package/dist/cli/commands/secrets-audit.d.ts.map +1 -0
- package/dist/cli/commands/secrets-audit.js +109 -0
- package/dist/cli/commands/secrets-audit.js.map +1 -0
- package/dist/cli/commands/sessions.d.ts +22 -0
- package/dist/cli/commands/sessions.d.ts.map +1 -0
- package/dist/cli/commands/sessions.js +99 -0
- package/dist/cli/commands/sessions.js.map +1 -0
- package/dist/cli/commands/skills.d.ts +17 -0
- package/dist/cli/commands/skills.d.ts.map +1 -0
- package/dist/cli/commands/skills.js +100 -0
- package/dist/cli/commands/skills.js.map +1 -0
- package/dist/cli/commands/status.d.ts +26 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +252 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/store-cmd.d.ts +36 -0
- package/dist/cli/commands/store-cmd.d.ts.map +1 -0
- package/dist/cli/commands/store-cmd.js +405 -0
- package/dist/cli/commands/store-cmd.js.map +1 -0
- package/dist/cli/flows/web-setup.d.ts +47 -0
- package/dist/cli/flows/web-setup.d.ts.map +1 -0
- package/dist/cli/flows/web-setup.js +324 -0
- package/dist/cli/flows/web-setup.js.map +1 -0
- package/dist/cli/program/build-program.d.ts +3 -0
- package/dist/cli/program/build-program.d.ts.map +1 -0
- package/dist/cli/program/build-program.js +1326 -0
- package/dist/cli/program/build-program.js.map +1 -0
- package/dist/cli/run-main.d.ts +2 -0
- package/dist/cli/run-main.d.ts.map +1 -0
- package/dist/cli/run-main.js +63 -0
- package/dist/cli/run-main.js.map +1 -0
- package/dist/config/agent-limits.d.ts +22 -0
- package/dist/config/agent-limits.d.ts.map +1 -0
- package/dist/config/agent-limits.js +34 -0
- package/dist/config/agent-limits.js.map +1 -0
- package/dist/config/io.d.ts +378 -0
- package/dist/config/io.d.ts.map +1 -0
- package/dist/config/io.js +602 -0
- package/dist/config/io.js.map +1 -0
- package/dist/config/paths.d.ts +80 -0
- package/dist/config/paths.d.ts.map +1 -0
- package/dist/config/paths.js +342 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/config/types.d.ts +12 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +12 -0
- package/dist/config/types.js.map +1 -0
- package/dist/core/agent-dispatcher.d.ts +91 -0
- package/dist/core/agent-dispatcher.d.ts.map +1 -0
- package/dist/core/agent-dispatcher.js +251 -0
- package/dist/core/agent-dispatcher.js.map +1 -0
- package/dist/core/agent-events-stream.d.ts +76 -0
- package/dist/core/agent-events-stream.d.ts.map +1 -0
- package/dist/core/agent-events-stream.js +185 -0
- package/dist/core/agent-events-stream.js.map +1 -0
- package/dist/core/agent-runtime-persist.d.ts +53 -0
- package/dist/core/agent-runtime-persist.d.ts.map +1 -0
- package/dist/core/agent-runtime-persist.js +114 -0
- package/dist/core/agent-runtime-persist.js.map +1 -0
- package/dist/core/auth-bridge.d.ts +8 -0
- package/dist/core/auth-bridge.d.ts.map +1 -0
- package/dist/core/auth-bridge.js +102 -0
- package/dist/core/auth-bridge.js.map +1 -0
- package/dist/core/auth-error.d.ts +49 -0
- package/dist/core/auth-error.d.ts.map +1 -0
- package/dist/core/auth-error.js.map +1 -0
- package/dist/core/brigade-config.d.ts +205 -0
- package/dist/core/brigade-config.d.ts.map +1 -0
- package/dist/core/brigade-config.js +58 -6
- package/dist/core/brigade-config.js.map +1 -0
- package/dist/core/config.d.ts +17 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +92 -246
- package/dist/core/config.js.map +1 -0
- package/dist/core/console-stream.d.ts +52 -0
- package/dist/core/console-stream.d.ts.map +1 -0
- package/dist/core/console-stream.js +49 -3
- package/dist/core/console-stream.js.map +1 -0
- package/dist/core/daemon/launchd.d.ts +19 -0
- package/dist/core/daemon/launchd.d.ts.map +1 -0
- package/dist/core/daemon/launchd.js +117 -0
- package/dist/core/daemon/launchd.js.map +1 -0
- package/dist/core/daemon/schtasks.d.ts +23 -0
- package/dist/core/daemon/schtasks.d.ts.map +1 -0
- package/dist/core/daemon/schtasks.js +139 -0
- package/dist/core/daemon/schtasks.js.map +1 -0
- package/dist/core/daemon/service.d.ts +56 -0
- package/dist/core/daemon/service.d.ts.map +1 -0
- package/dist/core/daemon/service.js +54 -0
- package/dist/core/daemon/service.js.map +1 -0
- package/dist/core/daemon/systemd.d.ts +19 -0
- package/dist/core/daemon/systemd.d.ts.map +1 -0
- package/dist/core/daemon/systemd.js +117 -0
- package/dist/core/daemon/systemd.js.map +1 -0
- package/dist/core/event-logger.d.ts +74 -0
- package/dist/core/event-logger.d.ts.map +1 -0
- package/dist/core/event-logger.js +299 -6
- package/dist/core/event-logger.js.map +1 -0
- package/dist/core/exec-approvals.d.ts +178 -0
- package/dist/core/exec-approvals.d.ts.map +1 -0
- package/dist/core/exec-approvals.js +591 -266
- package/dist/core/exec-approvals.js.map +1 -0
- package/dist/core/extension-lifecycle.d.ts +27 -0
- package/dist/core/extension-lifecycle.d.ts.map +1 -0
- package/dist/core/extension-lifecycle.js +45 -0
- package/dist/core/extension-lifecycle.js.map +1 -0
- package/dist/core/gateway-caller-impl.d.ts +42 -0
- package/dist/core/gateway-caller-impl.d.ts.map +1 -0
- package/dist/core/gateway-caller-impl.js +95 -0
- package/dist/core/gateway-caller-impl.js.map +1 -0
- package/dist/core/gateway-lock.d.ts +88 -0
- package/dist/core/gateway-lock.d.ts.map +1 -0
- package/dist/core/gateway-lock.js +204 -0
- package/dist/core/gateway-lock.js.map +1 -0
- package/dist/core/gateway-probe.d.ts +148 -0
- package/dist/core/gateway-probe.d.ts.map +1 -0
- package/dist/core/gateway-probe.js +319 -0
- package/dist/core/gateway-probe.js.map +1 -0
- package/dist/core/gateway-spawn.d.ts +40 -0
- package/dist/core/gateway-spawn.d.ts.map +1 -0
- package/dist/core/gateway-spawn.js +156 -0
- package/dist/core/gateway-spawn.js.map +1 -0
- package/dist/core/model-caps.d.ts +85 -0
- package/dist/core/model-caps.d.ts.map +1 -0
- package/dist/core/model-caps.js +88 -2
- package/dist/core/model-caps.js.map +1 -0
- package/dist/core/port-inspect.d.ts +37 -0
- package/dist/core/port-inspect.d.ts.map +1 -0
- package/dist/core/port-inspect.js +165 -0
- package/dist/core/port-inspect.js.map +1 -0
- package/dist/core/server-lanes.d.ts +25 -0
- package/dist/core/server-lanes.d.ts.map +1 -0
- package/dist/core/server-lanes.js +31 -0
- package/dist/core/server-lanes.js.map +1 -0
- package/dist/core/server-methods/cron.d.ts +104 -0
- package/dist/core/server-methods/cron.d.ts.map +1 -0
- package/dist/core/server-methods/cron.js +183 -0
- package/dist/core/server-methods/cron.js.map +1 -0
- package/dist/core/server-methods/health.d.ts +36 -0
- package/dist/core/server-methods/health.d.ts.map +1 -0
- package/dist/core/server-methods/health.js +51 -0
- package/dist/core/server-methods/health.js.map +1 -0
- package/dist/core/server-methods/org.d.ts +93 -0
- package/dist/core/server-methods/org.d.ts.map +1 -0
- package/dist/core/server-methods/org.js +95 -0
- package/dist/core/server-methods/org.js.map +1 -0
- package/dist/core/server-methods/sessions.d.ts +133 -0
- package/dist/core/server-methods/sessions.d.ts.map +1 -0
- package/dist/core/server-methods/sessions.js +209 -0
- package/dist/core/server-methods/sessions.js.map +1 -0
- package/dist/core/server.d.ts +46 -0
- package/dist/core/server.d.ts.map +1 -0
- package/dist/core/server.js +4716 -249
- package/dist/core/server.js.map +1 -0
- package/dist/core/system-prompt.d.ts +92 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +180 -1584
- package/dist/core/system-prompt.js.map +1 -0
- package/dist/core/version.d.ts +4 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +8 -13
- package/dist/core/version.js.map +1 -0
- package/dist/core/webhook-guards.d.ts +131 -0
- package/dist/core/webhook-guards.d.ts.map +1 -0
- package/dist/core/webhook-guards.js +283 -0
- package/dist/core/webhook-guards.js.map +1 -0
- package/dist/core/ws-subscription-filter.d.ts +9 -0
- package/dist/core/ws-subscription-filter.d.ts.map +1 -0
- package/dist/core/ws-subscription-filter.js +39 -0
- package/dist/core/ws-subscription-filter.js.map +1 -0
- package/dist/cron/active-service.d.ts +30 -0
- package/dist/cron/active-service.d.ts.map +1 -0
- package/dist/cron/active-service.js +48 -0
- package/dist/cron/active-service.js.map +1 -0
- package/dist/cron/isolated-agent/run-executor.d.ts +49 -0
- package/dist/cron/isolated-agent/run-executor.d.ts.map +1 -0
- package/dist/cron/isolated-agent/run-executor.js +343 -0
- package/dist/cron/isolated-agent/run-executor.js.map +1 -0
- package/dist/cron/isolated-agent/run.d.ts +27 -0
- package/dist/cron/isolated-agent/run.d.ts.map +1 -0
- package/dist/cron/isolated-agent/run.js +29 -0
- package/dist/cron/isolated-agent/run.js.map +1 -0
- package/dist/cron/normalize.d.ts +103 -0
- package/dist/cron/normalize.d.ts.map +1 -0
- package/dist/cron/normalize.js +376 -0
- package/dist/cron/normalize.js.map +1 -0
- package/dist/cron/parse.d.ts +27 -0
- package/dist/cron/parse.d.ts.map +1 -0
- package/dist/cron/parse.js +55 -0
- package/dist/cron/parse.js.map +1 -0
- package/dist/cron/reminder-context.d.ts +78 -0
- package/dist/cron/reminder-context.d.ts.map +1 -0
- package/dist/cron/reminder-context.js +167 -0
- package/dist/cron/reminder-context.js.map +1 -0
- package/dist/cron/run-log.d.ts +48 -0
- package/dist/cron/run-log.d.ts.map +1 -0
- package/dist/cron/run-log.js +225 -0
- package/dist/cron/run-log.js.map +1 -0
- package/dist/cron/schedule.d.ts +46 -0
- package/dist/cron/schedule.d.ts.map +1 -0
- package/dist/cron/schedule.js +144 -0
- package/dist/cron/schedule.js.map +1 -0
- package/dist/cron/service/jobs.d.ts +138 -0
- package/dist/cron/service/jobs.d.ts.map +1 -0
- package/dist/cron/service/jobs.js +370 -0
- package/dist/cron/service/jobs.js.map +1 -0
- package/dist/cron/service/locked.d.ts +46 -0
- package/dist/cron/service/locked.d.ts.map +1 -0
- package/dist/cron/service/locked.js +54 -0
- package/dist/cron/service/locked.js.map +1 -0
- package/dist/cron/service/ops.d.ts +124 -0
- package/dist/cron/service/ops.d.ts.map +1 -0
- package/dist/cron/service/ops.js +415 -0
- package/dist/cron/service/ops.js.map +1 -0
- package/dist/cron/service/state.d.ts +254 -0
- package/dist/cron/service/state.d.ts.map +1 -0
- package/dist/cron/service/state.js +50 -0
- package/dist/cron/service/state.js.map +1 -0
- package/dist/cron/service/store.d.ts +65 -0
- package/dist/cron/service/store.d.ts.map +1 -0
- package/dist/cron/service/store.js +350 -0
- package/dist/cron/service/store.js.map +1 -0
- package/dist/cron/service/timer.d.ts +113 -0
- package/dist/cron/service/timer.d.ts.map +1 -0
- package/dist/cron/service/timer.js +1081 -0
- package/dist/cron/service/timer.js.map +1 -0
- package/dist/cron/session-reaper.d.ts +62 -0
- package/dist/cron/session-reaper.d.ts.map +1 -0
- package/dist/cron/session-reaper.js +152 -0
- package/dist/cron/session-reaper.js.map +1 -0
- package/dist/cron/session-target.d.ts +56 -0
- package/dist/cron/session-target.d.ts.map +1 -0
- package/dist/cron/session-target.js +96 -0
- package/dist/cron/session-target.js.map +1 -0
- package/dist/cron/stagger.d.ts +34 -0
- package/dist/cron/stagger.d.ts.map +1 -0
- package/dist/cron/stagger.js +69 -0
- package/dist/cron/stagger.js.map +1 -0
- package/dist/cron/types.d.ts +287 -0
- package/dist/cron/types.d.ts.map +1 -0
- package/dist/cron/types.js +22 -0
- package/dist/cron/types.js.map +1 -0
- package/dist/cron/validate-timestamp.d.ts +33 -0
- package/dist/cron/validate-timestamp.d.ts.map +1 -0
- package/dist/cron/validate-timestamp.js +54 -0
- package/dist/cron/validate-timestamp.js.map +1 -0
- package/dist/entry.d.ts +2 -0
- package/dist/entry.d.ts.map +1 -0
- package/dist/entry.js +57 -0
- package/dist/entry.js.map +1 -0
- package/dist/extension-sdk.d.ts +28 -0
- package/dist/extension-sdk.d.ts.map +1 -0
- package/dist/extension-sdk.js +26 -0
- package/dist/extension-sdk.js.map +1 -0
- package/dist/identity/device.d.ts +19 -0
- package/dist/identity/device.d.ts.map +1 -0
- package/dist/identity/device.js +88 -0
- package/dist/identity/device.js.map +1 -0
- package/dist/infra/backoff.d.ts +24 -0
- package/dist/infra/backoff.d.ts.map +1 -0
- package/dist/infra/backoff.js +48 -0
- package/dist/infra/backoff.js.map +1 -0
- package/dist/infra/errors.d.ts +35 -0
- package/dist/infra/errors.d.ts.map +1 -0
- package/dist/infra/errors.js +54 -0
- package/dist/infra/errors.js.map +1 -0
- package/dist/infra/fs/atomic-rename.d.ts +31 -0
- package/dist/infra/fs/atomic-rename.d.ts.map +1 -0
- package/dist/infra/fs/atomic-rename.js +75 -0
- package/dist/infra/fs/atomic-rename.js.map +1 -0
- package/dist/infra/json-file.d.ts +25 -0
- package/dist/infra/json-file.d.ts.map +1 -0
- package/dist/infra/json-file.js +49 -0
- package/dist/infra/json-file.js.map +1 -0
- package/dist/infra/json-utf8-bytes.d.ts +14 -0
- package/dist/infra/json-utf8-bytes.d.ts.map +1 -0
- package/dist/infra/json-utf8-bytes.js +20 -0
- package/dist/infra/json-utf8-bytes.js.map +1 -0
- package/dist/infra/net/dns-pinning.d.ts +66 -0
- package/dist/infra/net/dns-pinning.d.ts.map +1 -0
- package/dist/infra/net/dns-pinning.js +128 -0
- package/dist/infra/net/dns-pinning.js.map +1 -0
- package/dist/infra/net/fetch-guard.d.ts +85 -0
- package/dist/infra/net/fetch-guard.d.ts.map +1 -0
- package/dist/infra/net/fetch-guard.js +439 -0
- package/dist/infra/net/fetch-guard.js.map +1 -0
- package/dist/infra/prototype-keys.d.ts +19 -0
- package/dist/infra/prototype-keys.d.ts.map +1 -0
- package/dist/infra/prototype-keys.js +22 -0
- package/dist/infra/prototype-keys.js.map +1 -0
- package/dist/integrations/ollama.d.ts +67 -0
- package/dist/integrations/ollama.d.ts.map +1 -0
- package/dist/integrations/ollama.js +53 -0
- package/dist/integrations/ollama.js.map +1 -0
- package/dist/integrations/provider-discovery.d.ts +66 -0
- package/dist/integrations/provider-discovery.d.ts.map +1 -0
- package/dist/integrations/provider-discovery.js +166 -0
- package/dist/integrations/provider-discovery.js.map +1 -0
- package/dist/logging/redact.d.ts +28 -0
- package/dist/logging/redact.d.ts.map +1 -0
- package/dist/logging/redact.js +51 -0
- package/dist/logging/redact.js.map +1 -0
- package/dist/logging/subsystem-logger.d.ts +77 -0
- package/dist/logging/subsystem-logger.d.ts.map +1 -0
- package/dist/logging/subsystem-logger.js +577 -0
- package/dist/logging/subsystem-logger.js.map +1 -0
- package/dist/logging/subsystem.d.ts +13 -0
- package/dist/logging/subsystem.d.ts.map +1 -0
- package/dist/logging/subsystem.js +12 -0
- package/dist/logging/subsystem.js.map +1 -0
- package/dist/process/command-queue.d.ts +152 -0
- package/dist/process/command-queue.d.ts.map +1 -0
- package/dist/process/command-queue.js +420 -0
- package/dist/process/command-queue.js.map +1 -0
- package/dist/process/lanes.d.ts +102 -0
- package/dist/process/lanes.d.ts.map +1 -0
- package/dist/process/lanes.js +117 -0
- package/dist/process/lanes.js.map +1 -0
- package/dist/process/session-lane.d.ts +31 -0
- package/dist/process/session-lane.d.ts.map +1 -0
- package/dist/process/session-lane.js +45 -0
- package/dist/process/session-lane.js.map +1 -0
- package/dist/protocol/errors.d.ts +35 -0
- package/dist/protocol/errors.d.ts.map +1 -0
- package/dist/protocol/errors.js +36 -0
- package/dist/protocol/errors.js.map +1 -0
- package/dist/protocol/handshake.d.ts +101 -0
- package/dist/protocol/handshake.d.ts.map +1 -0
- package/dist/protocol/handshake.js +49 -0
- package/dist/protocol/handshake.js.map +1 -0
- package/dist/protocol/messages.d.ts +68 -0
- package/dist/protocol/messages.d.ts.map +1 -0
- package/dist/protocol/messages.js +20 -0
- package/dist/protocol/messages.js.map +1 -0
- package/dist/protocol/methods.d.ts +312 -0
- package/dist/protocol/methods.d.ts.map +1 -0
- package/dist/protocol/methods.js +16 -0
- package/dist/protocol/methods.js.map +1 -0
- package/dist/protocol.d.ts +598 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +12 -0
- package/dist/protocol.js.map +1 -0
- package/dist/providers/auth-methods.d.ts +82 -0
- package/dist/providers/auth-methods.d.ts.map +1 -0
- package/dist/providers/auth-methods.js +180 -0
- package/dist/providers/auth-methods.js.map +1 -0
- package/dist/providers/catalog.d.ts +85 -0
- package/dist/providers/catalog.d.ts.map +1 -0
- package/dist/providers/catalog.js +41 -0
- package/dist/providers/catalog.js.map +1 -0
- package/dist/providers/validate-key.d.ts +42 -0
- package/dist/providers/validate-key.d.ts.map +1 -0
- package/dist/providers/validate-key.js.map +1 -0
- package/dist/security/external-content.d.ts +67 -0
- package/dist/security/external-content.d.ts.map +1 -0
- package/dist/security/external-content.js +80 -0
- package/dist/security/external-content.js.map +1 -0
- package/dist/security/injection-patterns.d.ts +33 -0
- package/dist/security/injection-patterns.d.ts.map +1 -0
- package/dist/security/injection-patterns.js +97 -0
- package/dist/security/injection-patterns.js.map +1 -0
- package/dist/security/media-path-guard.d.ts +25 -0
- package/dist/security/media-path-guard.d.ts.map +1 -0
- package/dist/security/media-path-guard.js +98 -0
- package/dist/security/media-path-guard.js.map +1 -0
- package/dist/security/terminal-input-sanitizer.d.ts +30 -0
- package/dist/security/terminal-input-sanitizer.d.ts.map +1 -0
- package/dist/security/terminal-input-sanitizer.js +70 -0
- package/dist/security/terminal-input-sanitizer.js.map +1 -0
- package/dist/sessions/bootstrap-marker.d.ts +5 -0
- package/dist/sessions/bootstrap-marker.d.ts.map +1 -0
- package/dist/sessions/bootstrap-marker.js +120 -0
- package/dist/sessions/bootstrap-marker.js.map +1 -0
- package/dist/sessions/session-file-repair.d.ts +12 -0
- package/dist/sessions/session-file-repair.d.ts.map +1 -0
- package/dist/sessions/session-file-repair.js +155 -0
- package/dist/sessions/session-file-repair.js.map +1 -0
- package/dist/sessions/session-key-utils.d.ts +54 -0
- package/dist/sessions/session-key-utils.d.ts.map +1 -0
- package/dist/sessions/session-key-utils.js +133 -0
- package/dist/sessions/session-key-utils.js.map +1 -0
- package/dist/sessions/session-manager-factory.d.ts +21 -0
- package/dist/sessions/session-manager-factory.d.ts.map +1 -0
- package/dist/sessions/session-manager-factory.js +142 -0
- package/dist/sessions/session-manager-factory.js.map +1 -0
- package/dist/sessions/session-store.d.ts +154 -0
- package/dist/sessions/session-store.d.ts.map +1 -0
- package/dist/sessions/session-store.js +498 -0
- package/dist/sessions/session-store.js.map +1 -0
- package/dist/sessions/session-write-lock.d.ts +10 -0
- package/dist/sessions/session-write-lock.d.ts.map +1 -0
- package/dist/sessions/session-write-lock.js +167 -0
- package/dist/sessions/session-write-lock.js.map +1 -0
- package/dist/sessions/transcript-reader.d.ts +37 -0
- package/dist/sessions/transcript-reader.d.ts.map +1 -0
- package/dist/sessions/transcript-reader.js +136 -0
- package/dist/sessions/transcript-reader.js.map +1 -0
- package/dist/sessions/transcript-repair.d.ts +16 -0
- package/dist/sessions/transcript-repair.d.ts.map +1 -0
- package/dist/sessions/transcript-repair.js +214 -0
- package/dist/sessions/transcript-repair.js.map +1 -0
- package/dist/shared/global-singleton.d.ts +27 -0
- package/dist/shared/global-singleton.d.ts.map +1 -0
- package/dist/shared/global-singleton.js +35 -0
- package/dist/shared/global-singleton.js.map +1 -0
- package/dist/shared/string-coerce.d.ts +12 -0
- package/dist/shared/string-coerce.d.ts.map +1 -0
- package/dist/shared/string-coerce.js +12 -0
- package/dist/shared/string-coerce.js.map +1 -0
- package/dist/storage/boot.d.ts +28 -0
- package/dist/storage/boot.d.ts.map +1 -0
- package/dist/storage/boot.js +588 -0
- package/dist/storage/boot.js.map +1 -0
- package/dist/storage/config-cache.d.ts +23 -0
- package/dist/storage/config-cache.d.ts.map +1 -0
- package/dist/storage/config-cache.js +58 -0
- package/dist/storage/config-cache.js.map +1 -0
- package/dist/storage/convex/auth-store.d.ts +52 -0
- package/dist/storage/convex/auth-store.d.ts.map +1 -0
- package/dist/storage/convex/auth-store.js +282 -0
- package/dist/storage/convex/auth-store.js.map +1 -0
- package/dist/storage/convex/blob-store.d.ts +20 -0
- package/dist/storage/convex/blob-store.d.ts.map +1 -0
- package/dist/storage/convex/blob-store.js +74 -0
- package/dist/storage/convex/blob-store.js.map +1 -0
- package/dist/storage/convex/channel-store.d.ts +112 -0
- package/dist/storage/convex/channel-store.d.ts.map +1 -0
- package/dist/storage/convex/channel-store.js +267 -0
- package/dist/storage/convex/channel-store.js.map +1 -0
- package/dist/storage/convex/client.d.ts +53 -0
- package/dist/storage/convex/client.d.ts.map +1 -0
- package/dist/storage/convex/client.js +121 -0
- package/dist/storage/convex/client.js.map +1 -0
- package/dist/storage/convex/config-store.d.ts +29 -0
- package/dist/storage/convex/config-store.d.ts.map +1 -0
- package/dist/storage/convex/config-store.js +205 -0
- package/dist/storage/convex/config-store.js.map +1 -0
- package/dist/storage/convex/cron-store.d.ts +86 -0
- package/dist/storage/convex/cron-store.d.ts.map +1 -0
- package/dist/storage/convex/cron-store.js +428 -0
- package/dist/storage/convex/cron-store.js.map +1 -0
- package/dist/storage/convex/exec-approval-store.d.ts +38 -0
- package/dist/storage/convex/exec-approval-store.d.ts.map +1 -0
- package/dist/storage/convex/exec-approval-store.js +147 -0
- package/dist/storage/convex/exec-approval-store.js.map +1 -0
- package/dist/storage/convex/extension-store.d.ts +28 -0
- package/dist/storage/convex/extension-store.d.ts.map +1 -0
- package/dist/storage/convex/extension-store.js +39 -0
- package/dist/storage/convex/extension-store.js.map +1 -0
- package/dist/storage/convex/index.d.ts +35 -0
- package/dist/storage/convex/index.d.ts.map +1 -0
- package/dist/storage/convex/index.js +141 -0
- package/dist/storage/convex/index.js.map +1 -0
- package/dist/storage/convex/instance-store.d.ts +37 -0
- package/dist/storage/convex/instance-store.d.ts.map +1 -0
- package/dist/storage/convex/instance-store.js +88 -0
- package/dist/storage/convex/instance-store.js.map +1 -0
- package/dist/storage/convex/log-store.d.ts +36 -0
- package/dist/storage/convex/log-store.d.ts.map +1 -0
- package/dist/storage/convex/log-store.js +213 -0
- package/dist/storage/convex/log-store.js.map +1 -0
- package/dist/storage/convex/memory-store.d.ts +50 -0
- package/dist/storage/convex/memory-store.d.ts.map +1 -0
- package/dist/storage/convex/memory-store.js +537 -0
- package/dist/storage/convex/memory-store.js.map +1 -0
- package/dist/storage/convex/message-store.d.ts +32 -0
- package/dist/storage/convex/message-store.d.ts.map +1 -0
- package/dist/storage/convex/message-store.js +272 -0
- package/dist/storage/convex/message-store.js.map +1 -0
- package/dist/storage/convex/org-store.d.ts +46 -0
- package/dist/storage/convex/org-store.d.ts.map +1 -0
- package/dist/storage/convex/org-store.js +101 -0
- package/dist/storage/convex/org-store.js.map +1 -0
- package/dist/storage/convex/session-store.d.ts +44 -0
- package/dist/storage/convex/session-store.d.ts.map +1 -0
- package/dist/storage/convex/session-store.js +257 -0
- package/dist/storage/convex/session-store.js.map +1 -0
- package/dist/storage/convex/skill-store.d.ts +49 -0
- package/dist/storage/convex/skill-store.d.ts.map +1 -0
- package/dist/storage/convex/skill-store.js +84 -0
- package/dist/storage/convex/skill-store.js.map +1 -0
- package/dist/storage/convex/subagent-store.d.ts +28 -0
- package/dist/storage/convex/subagent-store.d.ts.map +1 -0
- package/dist/storage/convex/subagent-store.js +83 -0
- package/dist/storage/convex/subagent-store.js.map +1 -0
- package/dist/storage/convex/workspace-store.d.ts +25 -0
- package/dist/storage/convex/workspace-store.d.ts.map +1 -0
- package/dist/storage/convex/workspace-store.js +127 -0
- package/dist/storage/convex/workspace-store.js.map +1 -0
- package/dist/storage/cron-cache.d.ts +17 -0
- package/dist/storage/cron-cache.d.ts.map +1 -0
- package/dist/storage/cron-cache.js +67 -0
- package/dist/storage/cron-cache.js.map +1 -0
- package/dist/storage/encryption.d.ts +69 -0
- package/dist/storage/encryption.d.ts.map +1 -0
- package/dist/storage/encryption.js +389 -0
- package/dist/storage/encryption.js.map +1 -0
- package/dist/storage/factory-reset.d.ts +7 -0
- package/dist/storage/factory-reset.d.ts.map +1 -0
- package/dist/storage/factory-reset.js +34 -0
- package/dist/storage/factory-reset.js.map +1 -0
- package/dist/storage/facts-cache.d.ts +24 -0
- package/dist/storage/facts-cache.d.ts.map +1 -0
- package/dist/storage/facts-cache.js +110 -0
- package/dist/storage/facts-cache.js.map +1 -0
- package/dist/storage/flush.d.ts +4 -0
- package/dist/storage/flush.d.ts.map +1 -0
- package/dist/storage/flush.js +128 -0
- package/dist/storage/flush.js.map +1 -0
- package/dist/storage/instance-admin.d.ts +52 -0
- package/dist/storage/instance-admin.d.ts.map +1 -0
- package/dist/storage/instance-admin.js +91 -0
- package/dist/storage/instance-admin.js.map +1 -0
- package/dist/storage/local/auth-store.d.ts +44 -0
- package/dist/storage/local/auth-store.d.ts.map +1 -0
- package/dist/storage/local/auth-store.js +252 -0
- package/dist/storage/local/auth-store.js.map +1 -0
- package/dist/storage/local/blob-store.d.ts +14 -0
- package/dist/storage/local/blob-store.d.ts.map +1 -0
- package/dist/storage/local/blob-store.js +87 -0
- package/dist/storage/local/blob-store.js.map +1 -0
- package/dist/storage/local/channel-store.d.ts +107 -0
- package/dist/storage/local/channel-store.d.ts.map +1 -0
- package/dist/storage/local/channel-store.js +147 -0
- package/dist/storage/local/channel-store.js.map +1 -0
- package/dist/storage/local/config-store.d.ts +23 -0
- package/dist/storage/local/config-store.d.ts.map +1 -0
- package/dist/storage/local/config-store.js +98 -0
- package/dist/storage/local/config-store.js.map +1 -0
- package/dist/storage/local/cron-store.d.ts +30 -0
- package/dist/storage/local/cron-store.d.ts.map +1 -0
- package/dist/storage/local/cron-store.js +186 -0
- package/dist/storage/local/cron-store.js.map +1 -0
- package/dist/storage/local/exec-approval-store.d.ts +41 -0
- package/dist/storage/local/exec-approval-store.d.ts.map +1 -0
- package/dist/storage/local/exec-approval-store.js +78 -0
- package/dist/storage/local/exec-approval-store.js.map +1 -0
- package/dist/storage/local/extension-store.d.ts +13 -0
- package/dist/storage/local/extension-store.d.ts.map +1 -0
- package/dist/storage/local/extension-store.js +36 -0
- package/dist/storage/local/extension-store.js.map +1 -0
- package/dist/storage/local/file-watcher.d.ts +24 -0
- package/dist/storage/local/file-watcher.d.ts.map +1 -0
- package/dist/storage/local/file-watcher.js +141 -0
- package/dist/storage/local/file-watcher.js.map +1 -0
- package/dist/storage/local/index.d.ts +33 -0
- package/dist/storage/local/index.d.ts.map +1 -0
- package/dist/storage/local/index.js +143 -0
- package/dist/storage/local/index.js.map +1 -0
- package/dist/storage/local/instance-store.d.ts +30 -0
- package/dist/storage/local/instance-store.d.ts.map +1 -0
- package/dist/storage/local/instance-store.js +83 -0
- package/dist/storage/local/instance-store.js.map +1 -0
- package/dist/storage/local/log-store.d.ts +27 -0
- package/dist/storage/local/log-store.d.ts.map +1 -0
- package/dist/storage/local/log-store.js +185 -0
- package/dist/storage/local/log-store.js.map +1 -0
- package/dist/storage/local/memory-store.d.ts +39 -0
- package/dist/storage/local/memory-store.d.ts.map +1 -0
- package/dist/storage/local/memory-store.js +258 -0
- package/dist/storage/local/memory-store.js.map +1 -0
- package/dist/storage/local/message-store.d.ts +27 -0
- package/dist/storage/local/message-store.d.ts.map +1 -0
- package/dist/storage/local/message-store.js +253 -0
- package/dist/storage/local/message-store.js.map +1 -0
- package/dist/storage/local/org-store.d.ts +39 -0
- package/dist/storage/local/org-store.d.ts.map +1 -0
- package/dist/storage/local/org-store.js +155 -0
- package/dist/storage/local/org-store.js.map +1 -0
- package/dist/storage/local/session-store.d.ts +30 -0
- package/dist/storage/local/session-store.d.ts.map +1 -0
- package/dist/storage/local/session-store.js +82 -0
- package/dist/storage/local/session-store.js.map +1 -0
- package/dist/storage/local/skill-store.d.ts +40 -0
- package/dist/storage/local/skill-store.d.ts.map +1 -0
- package/dist/storage/local/skill-store.js +121 -0
- package/dist/storage/local/skill-store.js.map +1 -0
- package/dist/storage/local/subagent-store.d.ts +20 -0
- package/dist/storage/local/subagent-store.d.ts.map +1 -0
- package/dist/storage/local/subagent-store.js +71 -0
- package/dist/storage/local/subagent-store.js.map +1 -0
- package/dist/storage/local/workspace-store.d.ts +22 -0
- package/dist/storage/local/workspace-store.d.ts.map +1 -0
- package/dist/storage/local/workspace-store.js +190 -0
- package/dist/storage/local/workspace-store.js.map +1 -0
- package/dist/storage/migrate.d.ts +64 -0
- package/dist/storage/migrate.d.ts.map +1 -0
- package/dist/storage/migrate.js +585 -0
- package/dist/storage/migrate.js.map +1 -0
- package/dist/storage/runtime-context.d.ts +35 -0
- package/dist/storage/runtime-context.d.ts.map +1 -0
- package/dist/storage/runtime-context.js +145 -0
- package/dist/storage/runtime-context.js.map +1 -0
- package/dist/storage/sentinel.d.ts +28 -0
- package/dist/storage/sentinel.d.ts.map +1 -0
- package/dist/storage/sentinel.js +98 -0
- package/dist/storage/sentinel.js.map +1 -0
- package/dist/storage/session-cache.d.ts +15 -0
- package/dist/storage/session-cache.d.ts.map +1 -0
- package/dist/storage/session-cache.js +81 -0
- package/dist/storage/session-cache.js.map +1 -0
- package/dist/storage/store.d.ts +745 -0
- package/dist/storage/store.d.ts.map +1 -0
- package/dist/storage/store.js +36 -0
- package/dist/storage/store.js.map +1 -0
- package/dist/storage/strict-guard.d.ts +17 -0
- package/dist/storage/strict-guard.d.ts.map +1 -0
- package/dist/storage/strict-guard.js +200 -0
- package/dist/storage/strict-guard.js.map +1 -0
- package/dist/storage/workspace-live-mirror.d.ts +33 -0
- package/dist/storage/workspace-live-mirror.d.ts.map +1 -0
- package/dist/storage/workspace-live-mirror.js +207 -0
- package/dist/storage/workspace-live-mirror.js.map +1 -0
- package/dist/system-prompt/assembler.d.ts +113 -0
- package/dist/system-prompt/assembler.d.ts.map +1 -0
- package/dist/system-prompt/assembler.js +649 -0
- package/dist/system-prompt/assembler.js.map +1 -0
- package/dist/system-prompt/bootstrap-budget.d.ts +22 -0
- package/dist/system-prompt/bootstrap-budget.d.ts.map +1 -0
- package/dist/system-prompt/bootstrap-budget.js +83 -0
- package/dist/system-prompt/bootstrap-budget.js.map +1 -0
- package/dist/system-prompt/cache-boundary.d.ts +13 -0
- package/dist/system-prompt/cache-boundary.d.ts.map +1 -0
- package/dist/system-prompt/cache-boundary.js +56 -0
- package/dist/system-prompt/cache-boundary.js.map +1 -0
- package/dist/system-prompt/cache-stability.d.ts +3 -0
- package/dist/system-prompt/cache-stability.d.ts.map +1 -0
- package/dist/system-prompt/cache-stability.js +18 -0
- package/dist/system-prompt/cache-stability.js.map +1 -0
- package/dist/system-prompt/guidance.d.ts +147 -0
- package/dist/system-prompt/guidance.d.ts.map +1 -0
- package/dist/system-prompt/guidance.js +352 -0
- package/dist/system-prompt/guidance.js.map +1 -0
- package/dist/system-prompt/identity-defaults.d.ts +50 -0
- package/dist/system-prompt/identity-defaults.d.ts.map +1 -0
- package/dist/system-prompt/identity-defaults.js +119 -0
- package/dist/system-prompt/identity-defaults.js.map +1 -0
- package/dist/system-prompt/org/escalation-inbox.d.ts +53 -0
- package/dist/system-prompt/org/escalation-inbox.d.ts.map +1 -0
- package/dist/system-prompt/org/escalation-inbox.js +71 -0
- package/dist/system-prompt/org/escalation-inbox.js.map +1 -0
- package/dist/system-prompt/org/receiver-hint.d.ts +72 -0
- package/dist/system-prompt/org/receiver-hint.d.ts.map +1 -0
- package/dist/system-prompt/org/receiver-hint.js +116 -0
- package/dist/system-prompt/org/receiver-hint.js.map +1 -0
- package/dist/system-prompt/org/render-org-block.d.ts +42 -0
- package/dist/system-prompt/org/render-org-block.d.ts.map +1 -0
- package/dist/system-prompt/org/render-org-block.js +57 -0
- package/dist/system-prompt/org/render-org-block.js.map +1 -0
- package/dist/system-prompt/org/sub-agent-anchor.d.ts +30 -0
- package/dist/system-prompt/org/sub-agent-anchor.d.ts.map +1 -0
- package/dist/system-prompt/org/sub-agent-anchor.js +36 -0
- package/dist/system-prompt/org/sub-agent-anchor.js.map +1 -0
- package/dist/system-prompt/override.d.ts +7 -0
- package/dist/system-prompt/override.d.ts.map +1 -0
- package/dist/system-prompt/override.js +13 -0
- package/dist/system-prompt/override.js.map +1 -0
- package/dist/system-prompt/pi-injection.d.ts +5 -0
- package/dist/system-prompt/pi-injection.d.ts.map +1 -0
- package/dist/system-prompt/pi-injection.js +33 -0
- package/dist/system-prompt/pi-injection.js.map +1 -0
- package/dist/system-prompt/runtime-params.d.ts +34 -0
- package/dist/system-prompt/runtime-params.d.ts.map +1 -0
- package/dist/system-prompt/runtime-params.js +108 -0
- package/dist/system-prompt/runtime-params.js.map +1 -0
- package/dist/system-prompt/sanitize.d.ts +7 -0
- package/dist/system-prompt/sanitize.d.ts.map +1 -0
- package/dist/system-prompt/sanitize.js +31 -0
- package/dist/system-prompt/sanitize.js.map +1 -0
- package/dist/system-prompt/types.d.ts +7 -0
- package/dist/system-prompt/types.d.ts.map +1 -0
- package/dist/system-prompt/types.js +3 -0
- package/dist/system-prompt/types.js.map +1 -0
- package/dist/system-prompt/workspace-loader.d.ts +12 -0
- package/dist/system-prompt/workspace-loader.d.ts.map +1 -0
- package/dist/system-prompt/workspace-loader.js +115 -0
- package/dist/system-prompt/workspace-loader.js.map +1 -0
- package/dist/tideline/advanced.d.ts +25 -0
- package/dist/tideline/advanced.d.ts.map +1 -0
- package/dist/tideline/advanced.js +34 -0
- package/dist/tideline/advanced.js.map +1 -0
- package/dist/tideline/eval.d.ts +19 -0
- package/dist/tideline/eval.d.ts.map +1 -0
- package/dist/tideline/eval.js +24 -0
- package/dist/tideline/eval.js.map +1 -0
- package/dist/tideline/host-ports.standalone.d.ts +49 -0
- package/dist/tideline/host-ports.standalone.d.ts.map +1 -0
- package/dist/tideline/host-ports.standalone.js +61 -0
- package/dist/tideline/host-ports.standalone.js.map +1 -0
- package/dist/tideline/index.d.ts +34 -0
- package/dist/tideline/index.d.ts.map +1 -0
- package/dist/tideline/index.js +42 -0
- package/dist/tideline/index.js.map +1 -0
- package/dist/tui/approval-prompt.d.ts +73 -0
- package/dist/tui/approval-prompt.d.ts.map +1 -0
- package/dist/tui/approval-prompt.js +272 -0
- package/dist/tui/approval-prompt.js.map +1 -0
- package/dist/tui/client.d.ts +89 -0
- package/dist/tui/client.d.ts.map +1 -0
- package/dist/tui/client.js.map +1 -0
- package/dist/ui/brand-frames-cli.d.ts +19 -0
- package/dist/ui/brand-frames-cli.d.ts.map +1 -0
- package/dist/ui/brand-frames-cli.js +8 -13
- package/dist/ui/brand-frames-cli.js.map +1 -0
- package/dist/ui/brand.d.ts +41 -0
- package/dist/ui/brand.d.ts.map +1 -0
- package/dist/ui/brand.js +28 -6
- package/dist/ui/brand.js.map +1 -0
- package/dist/ui/editor.d.ts +30 -0
- package/dist/ui/editor.d.ts.map +1 -0
- package/dist/ui/editor.js +73 -0
- package/dist/ui/editor.js.map +1 -0
- package/dist/ui/format-session.d.ts +68 -0
- package/dist/ui/format-session.d.ts.map +1 -0
- package/dist/ui/format-session.js +181 -0
- package/dist/ui/format-session.js.map +1 -0
- package/dist/ui/markdown.d.ts +48 -0
- package/dist/ui/markdown.d.ts.map +1 -0
- package/dist/ui/markdown.js +60 -0
- package/dist/ui/markdown.js.map +1 -0
- package/dist/ui/onboard-storage-mode.d.ts +17 -0
- package/dist/ui/onboard-storage-mode.d.ts.map +1 -0
- package/dist/ui/onboard-storage-mode.js +638 -0
- package/dist/ui/onboard-storage-mode.js.map +1 -0
- package/dist/ui/onboarding.d.ts +97 -0
- package/dist/ui/onboarding.d.ts.map +1 -0
- package/dist/ui/onboarding.js +259 -111
- package/dist/ui/onboarding.js.map +1 -0
- package/dist/ui/searchable-select.d.ts +48 -0
- package/dist/ui/searchable-select.d.ts.map +1 -0
- package/dist/ui/searchable-select.js +108 -0
- package/dist/ui/searchable-select.js.map +1 -0
- package/dist/ui/syntax-theme.d.ts +30 -0
- package/dist/ui/syntax-theme.d.ts.map +1 -0
- package/dist/ui/syntax-theme.js +72 -0
- package/dist/ui/syntax-theme.js.map +1 -0
- package/dist/ui/terminal-cleanup.d.ts +46 -0
- package/dist/ui/terminal-cleanup.d.ts.map +1 -0
- package/dist/ui/terminal-cleanup.js +17 -5
- package/dist/ui/terminal-cleanup.js.map +1 -0
- package/dist/ui/theme.d.ts +21 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +66 -2
- package/dist/ui/theme.js.map +1 -0
- package/dist/ui/tool-result.d.ts +47 -0
- package/dist/ui/tool-result.d.ts.map +1 -0
- package/dist/ui/tool-result.js +100 -0
- package/dist/ui/tool-result.js.map +1 -0
- package/dist/utils/delivery-context.d.ts +50 -0
- package/dist/utils/delivery-context.d.ts.map +1 -0
- package/dist/utils/delivery-context.js +82 -0
- package/dist/utils/delivery-context.js.map +1 -0
- package/dist/utils/message-channel.d.ts +60 -0
- package/dist/utils/message-channel.d.ts.map +1 -0
- package/dist/utils/message-channel.js +103 -0
- package/dist/utils/message-channel.js.map +1 -0
- package/dist/utils/string-coerce.d.ts +50 -0
- package/dist/utils/string-coerce.d.ts.map +1 -0
- package/dist/utils/string-coerce.js +101 -0
- package/dist/utils/string-coerce.js.map +1 -0
- package/dist/version.d.ts +20 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +54 -0
- package/dist/version.js.map +1 -0
- package/dist/workspace/bootstrap.d.ts +12 -0
- package/dist/workspace/bootstrap.d.ts.map +1 -0
- package/dist/workspace/bootstrap.js +123 -0
- package/dist/workspace/bootstrap.js.map +1 -0
- package/dist/workspace/fs-utils.d.ts +2 -0
- package/dist/workspace/fs-utils.d.ts.map +1 -0
- package/dist/workspace/fs-utils.js +14 -0
- package/dist/workspace/fs-utils.js.map +1 -0
- package/dist/workspace/git-init.d.ts +5 -0
- package/dist/workspace/git-init.d.ts.map +1 -0
- package/dist/workspace/git-init.js +71 -0
- package/dist/workspace/git-init.js.map +1 -0
- package/dist/workspace/state.d.ts +13 -0
- package/dist/workspace/state.d.ts.map +1 -0
- package/dist/workspace/state.js +128 -0
- package/dist/workspace/state.js.map +1 -0
- package/dist/workspace/template-loader.d.ts +15 -0
- package/dist/workspace/template-loader.d.ts.map +1 -0
- package/dist/workspace/template-loader.js +214 -0
- package/dist/workspace/template-loader.js.map +1 -0
- package/package.json +173 -68
- package/scripts/build-done.mjs +125 -0
- package/scripts/run-brigade.mjs +208 -0
- package/skills/1password/SKILL.md +70 -0
- package/skills/1password/references/cli-examples.md +29 -0
- package/skills/1password/references/get-started.md +17 -0
- package/skills/apple-notes/SKILL.md +77 -0
- package/skills/apple-reminders/SKILL.md +118 -0
- package/skills/bear-notes/SKILL.md +107 -0
- package/skills/blogwatcher/SKILL.md +69 -0
- package/skills/blucli/SKILL.md +47 -0
- package/skills/bluebubbles/SKILL.md +136 -0
- package/skills/camsnap/SKILL.md +45 -0
- package/skills/canvas/SKILL.md +204 -0
- package/skills/coding-agent/SKILL.md +316 -0
- package/skills/discord/SKILL.md +197 -0
- package/skills/eightctl/SKILL.md +50 -0
- package/skills/gemini/SKILL.md +43 -0
- package/skills/gh-issues/SKILL.md +885 -0
- package/skills/gifgrep/SKILL.md +79 -0
- package/skills/git-commit/SKILL.md +40 -0
- package/skills/github/SKILL.md +163 -0
- package/skills/gog/SKILL.md +116 -0
- package/skills/goplaces/SKILL.md +52 -0
- package/skills/healthcheck/SKILL.md +245 -0
- package/skills/himalaya/SKILL.md +257 -0
- package/skills/himalaya/references/configuration.md +184 -0
- package/skills/himalaya/references/message-composition.md +199 -0
- package/skills/imsg/SKILL.md +122 -0
- package/skills/lead-scout/SKILL.md +46 -0
- package/skills/mcporter/SKILL.md +61 -0
- package/skills/model-usage/SKILL.md +69 -0
- package/skills/nano-pdf/SKILL.md +38 -0
- package/skills/node-connect/SKILL.md +142 -0
- package/skills/notion/SKILL.md +174 -0
- package/skills/oauth-setup/SKILL.md +55 -0
- package/skills/obsidian/SKILL.md +81 -0
- package/skills/openai-whisper/SKILL.md +38 -0
- package/skills/openai-whisper-api/SKILL.md +62 -0
- package/skills/openai-whisper-api/scripts/transcribe.sh +88 -0
- package/skills/openhue/SKILL.md +112 -0
- package/skills/oracle/SKILL.md +125 -0
- package/skills/ordercli/SKILL.md +78 -0
- package/skills/peekaboo/SKILL.md +190 -0
- package/skills/sag/SKILL.md +87 -0
- package/skills/session-logs/SKILL.md +151 -0
- package/skills/share-skills/SKILL.md +72 -0
- package/skills/sherpa-onnx-tts/SKILL.md +109 -0
- package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
- package/skills/skill-creator/SKILL.md +372 -0
- package/skills/skill-creator/license.txt +202 -0
- package/skills/skill-creator/scripts/init_skill.py +378 -0
- package/skills/skill-creator/scripts/package_skill.py +139 -0
- package/skills/skill-creator/scripts/quick_validate.py +159 -0
- package/skills/skill-creator/scripts/test_package_skill.py +160 -0
- package/skills/skill-creator/scripts/test_quick_validate.py +72 -0
- package/skills/slack/SKILL.md +144 -0
- package/skills/songsee/SKILL.md +49 -0
- package/skills/sonoscli/SKILL.md +65 -0
- package/skills/spotify-player/SKILL.md +64 -0
- package/skills/summarize/SKILL.md +87 -0
- package/skills/taskflow/SKILL.md +149 -0
- package/skills/taskflow-inbox-triage/SKILL.md +119 -0
- package/skills/things-mac/SKILL.md +86 -0
- package/skills/tmux/SKILL.md +170 -0
- package/skills/tmux/scripts/find-sessions.sh +112 -0
- package/skills/tmux/scripts/wait-for-text.sh +83 -0
- package/skills/trello/SKILL.md +108 -0
- package/skills/video-frames/SKILL.md +46 -0
- package/skills/video-frames/scripts/frame.sh +81 -0
- package/skills/voice-call/SKILL.md +45 -0
- package/skills/wacli/SKILL.md +72 -0
- package/skills/weather/SKILL.md +129 -0
- package/skills/xurl/SKILL.md +461 -0
- package/templates/workspace/AGENTS.md +223 -0
- package/templates/workspace/BOOTSTRAP.md +64 -0
- package/templates/workspace/HEARTBEAT.md +15 -0
- package/templates/workspace/IDENTITY.md +31 -0
- package/templates/workspace/SOUL.md +47 -0
- package/templates/workspace/TOOLS.md +48 -0
- package/templates/workspace/USER.md +25 -0
- package/CHANGELOG.md +0 -48
- package/SECURITY.md +0 -208
- package/assets/brigade-wordmark.png +0 -0
- package/dist/cli/chat-cmd.js +0 -191
- package/dist/cli/config-cmd.js +0 -171
- package/dist/cli/connect-cmd.js +0 -487
- package/dist/cli/doctor-cmd.js +0 -387
- package/dist/cli/gateway-cmd.js +0 -155
- package/dist/cli.js +0 -328
- package/dist/core/agent.js +0 -1123
- package/dist/core/auth-label.js +0 -147
- package/dist/core/cli-error.js +0 -94
- package/dist/core/error-classifier.js +0 -354
- package/dist/core/provider-payload-mutators.js +0 -517
- package/dist/core/provider-quirks.js +0 -285
- package/dist/core/smart-compaction.js +0 -209
- package/dist/core/system-prompt-defaults.js +0 -264
- package/dist/core/system-prompt-guidance.js +0 -271
- package/dist/index.js +0 -32
- package/dist/ui/brand-frames.js +0 -36
- package/dist/ui/chat.js +0 -1008
|
@@ -0,0 +1,1326 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { formatVersion } from "../../version.js";
|
|
3
|
+
// ─────────────────────────── exit drain ───────────────────────────
|
|
4
|
+
// Every command action terminates with `await exitAfterFlush(code)` instead
|
|
5
|
+
// of a bare `process.exit(code)`. In convex mode the storage adapters batch
|
|
6
|
+
// mutations onto write-behind chains; a short-lived CLI command that mutates
|
|
7
|
+
// then exits immediately would terminate the process before the enqueued
|
|
8
|
+
// write reached the backend (a silent lost write — `brigade exec allow`,
|
|
9
|
+
// `brigade config set`, `brigade channels allow`, …). Draining first closes
|
|
10
|
+
// that window. Filesystem mode + read-only commands drain already-settled
|
|
11
|
+
// chains, so this is free there.
|
|
12
|
+
async function exitAfterFlush(code) {
|
|
13
|
+
try {
|
|
14
|
+
const { flushAllPendingWrites } = await import("../../storage/flush.js");
|
|
15
|
+
await flushAllPendingWrites();
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
// Never let a drain failure block process termination.
|
|
19
|
+
}
|
|
20
|
+
process.exit(code);
|
|
21
|
+
}
|
|
22
|
+
// ─────────────────────────── storage boot hook ───────────────────────────
|
|
23
|
+
// One preAction hook initialises the RuntimeContext (mode sentinel → store →
|
|
24
|
+
// `store.init()`) before ANY command action runs. Subsystems then reach
|
|
25
|
+
// storage via `getRuntimeContext().store` without re-resolving mode.
|
|
26
|
+
//
|
|
27
|
+
// Three tiers:
|
|
28
|
+
// • BOOT_SKIP — commands that must run BEFORE a context exists.
|
|
29
|
+
// `onboard` creates the mode sentinel; it builds its own
|
|
30
|
+
// store after the wizard picks a mode.
|
|
31
|
+
// • BOOT_OPTIONAL — diagnostic / repair / reconfigure commands. They boot
|
|
32
|
+
// when the backend is healthy but keep working when it
|
|
33
|
+
// isn't — a broken convex deployment must never brick
|
|
34
|
+
// the tools an operator uses to fix it (`doctor`,
|
|
35
|
+
// `status`, `gateway stop`, `store mode set`, `migrate`).
|
|
36
|
+
// • everything else — workloads (tui, agent, gateway run, connect, config,
|
|
37
|
+
// channels, cron, agents, org, exec). Boot failure is
|
|
38
|
+
// fatal with the storage layer's operator-facing error.
|
|
39
|
+
const BOOT_SKIP = new Set(["onboard"]);
|
|
40
|
+
const BOOT_OPTIONAL_PREFIXES = [
|
|
41
|
+
"doctor",
|
|
42
|
+
"status",
|
|
43
|
+
"gateway status",
|
|
44
|
+
"gateway stop",
|
|
45
|
+
"gateway install",
|
|
46
|
+
"gateway uninstall",
|
|
47
|
+
"gateway restart",
|
|
48
|
+
"gateway supervise",
|
|
49
|
+
"store",
|
|
50
|
+
"encrypt",
|
|
51
|
+
"migrate",
|
|
52
|
+
"backup",
|
|
53
|
+
];
|
|
54
|
+
/** "gateway status"-style path for the action command (root name elided). */
|
|
55
|
+
function commandPath(cmd) {
|
|
56
|
+
const parts = [];
|
|
57
|
+
let cur = cmd;
|
|
58
|
+
while (cur && cur.name() !== "brigade") {
|
|
59
|
+
parts.unshift(cur.name());
|
|
60
|
+
cur = cur.parent;
|
|
61
|
+
}
|
|
62
|
+
return parts.join(" ");
|
|
63
|
+
}
|
|
64
|
+
function isBootOptional(path) {
|
|
65
|
+
return BOOT_OPTIONAL_PREFIXES.some((p) => path === p || path.startsWith(`${p} `));
|
|
66
|
+
}
|
|
67
|
+
// Lazy command-registration pattern. Each subcommand's real body (action
|
|
68
|
+
// handler) lives in a separate module under `src/cli/commands/`. Commander
|
|
69
|
+
// still needs each command DECLARED at the program level so `brigade
|
|
70
|
+
// --help` lists all of them, BUT the heavy import chain (Pi SDK init,
|
|
71
|
+
// model registry, TUI widgets, gateway server, ws stack, etc.) only loads
|
|
72
|
+
// when the user actually picks that command.
|
|
73
|
+
//
|
|
74
|
+
// In practice: `brigade onboard` doesn't pay for chat/gateway/connect's
|
|
75
|
+
// import time, and `brigade tui` doesn't pay for gateway's. The savings
|
|
76
|
+
// matter most on a cold `brigade --help` (now sub-100ms) and on
|
|
77
|
+
// short-lived invocations like `brigade --version` (handled by the
|
|
78
|
+
// fast-path in entry.ts before we even reach this builder).
|
|
79
|
+
//
|
|
80
|
+
// Primitive #1/#2 surface (onboard + agent + tui) is unchanged in shape;
|
|
81
|
+
// gateway + connect were lifted from the published v0.1.3 codebase. The
|
|
82
|
+
// status / doctor / config / gateway-subcommands surfaces give Brigade
|
|
83
|
+
// the canonical `brigade <status|doctor|config|gateway run|gateway
|
|
84
|
+
// status|gateway stop>` shape — Brigade-sized ports, no plugin/daemon-
|
|
85
|
+
// installer scope creep.
|
|
86
|
+
export function buildProgram() {
|
|
87
|
+
const program = new Command();
|
|
88
|
+
program
|
|
89
|
+
.name("brigade")
|
|
90
|
+
.description("🦁 Brigade — your personal AI crew")
|
|
91
|
+
.version(formatVersion(), "-v, --version", "show brigade version");
|
|
92
|
+
// exitOverride lets runMain decide how to surface help/no-args, instead of
|
|
93
|
+
// Commander killing the process directly with exit(1).
|
|
94
|
+
program.exitOverride();
|
|
95
|
+
// Storage boot — fires for every action in the command tree (Commander
|
|
96
|
+
// propagates program-level hooks to subcommands). Help/version never reach
|
|
97
|
+
// an action, so they stay storage-free. The import is dynamic to keep the
|
|
98
|
+
// `brigade --help` fast-path from paying for the storage layer.
|
|
99
|
+
program.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
100
|
+
const path = commandPath(actionCommand);
|
|
101
|
+
if (BOOT_SKIP.has(path))
|
|
102
|
+
return;
|
|
103
|
+
const { bootRuntimeContext } = await import("../../storage/boot.js");
|
|
104
|
+
try {
|
|
105
|
+
await bootRuntimeContext();
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
if (isBootOptional(path)) {
|
|
109
|
+
process.stderr.write(`brigade: storage backend unavailable — continuing without it (${err.message})\n`);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
throw err;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
// Each command does the same dance:
|
|
116
|
+
// 1. Declare the subcommand + its options (synchronous; cheap).
|
|
117
|
+
// 2. Inside .action(), dynamic-import the command's runner.
|
|
118
|
+
// 3. Call the runner with the parsed options.
|
|
119
|
+
//
|
|
120
|
+
// The dynamic import is what makes this lazy — Node only resolves +
|
|
121
|
+
// executes the runner module when the user actually picks the command.
|
|
122
|
+
program
|
|
123
|
+
.command("onboard")
|
|
124
|
+
.description("Pick a provider and model — interactive Pi-TUI wizard")
|
|
125
|
+
// Commander's `--no-X` pattern: with no third arg the option defaults to
|
|
126
|
+
// `true`, and passing `--no-env-detect` flips it to `false`. Passing an
|
|
127
|
+
// explicit `false` default broke the inverted semantics — it pinned the
|
|
128
|
+
// value to `false` regardless of what the user typed, so env-detection
|
|
129
|
+
// was silently OFF on every `brigade onboard` run. Drop the default.
|
|
130
|
+
.option("--no-env-detect", "ignore API keys from the shell environment")
|
|
131
|
+
.option("--secret-input-mode <mode>", "how accepted env-keys persist: 'plaintext' (default, copies value into Brigade's local config) or 'ref' (stores a keyRef; literal value never lands on disk)", "plaintext")
|
|
132
|
+
.action(async (opts) => {
|
|
133
|
+
const { runOnboardCommand } = await import("../commands/onboard.js");
|
|
134
|
+
const mode = opts.secretInputMode === "ref" ? "ref" : "plaintext";
|
|
135
|
+
const code = await runOnboardCommand({
|
|
136
|
+
noEnvDetect: opts.envDetect === false,
|
|
137
|
+
secretInputMode: mode,
|
|
138
|
+
});
|
|
139
|
+
await exitAfterFlush(code);
|
|
140
|
+
});
|
|
141
|
+
program
|
|
142
|
+
.command("agent")
|
|
143
|
+
.description("Drive a single turn through the agent pipeline")
|
|
144
|
+
.allowUnknownOption()
|
|
145
|
+
.helpOption(false)
|
|
146
|
+
.action(async () => {
|
|
147
|
+
const { registerAgentCommand } = await import("../commands/agent.js");
|
|
148
|
+
const sub = new Command();
|
|
149
|
+
registerAgentCommand(sub);
|
|
150
|
+
await sub.parseAsync(process.argv);
|
|
151
|
+
});
|
|
152
|
+
program
|
|
153
|
+
.command("tui", { isDefault: true })
|
|
154
|
+
.description("Launch the Brigade chat TUI (auto-starts the gateway if needed)")
|
|
155
|
+
// Positional agent id — the npm-friendly spelling. `npm run tui <agent>`
|
|
156
|
+
// passes the bare word straight through (no `--` dance), and even
|
|
157
|
+
// `npm run tui --agent <agent>` works because npm strips its own
|
|
158
|
+
// `--agent` config flag and forwards just `<agent>` as this positional.
|
|
159
|
+
// The `--agent <id>` flag below is the equivalent for `brigade tui`.
|
|
160
|
+
.argument("[agent]", "agent id to bind at startup (positional alias for --agent)")
|
|
161
|
+
// Same Commander `--no-X` pattern as `onboard` above — no third arg.
|
|
162
|
+
.option("--no-env-detect", "ignore API keys from the shell environment")
|
|
163
|
+
.option("-h, --host <host>", "gateway host to connect to / spawn on (default: 127.0.0.1)")
|
|
164
|
+
.option("-p, --port <port>", "gateway port (default: 7777)", (v) => parseInt(v, 10))
|
|
165
|
+
.option("--agent <id>", "bind the TUI to this agent at startup (skips the /agent step)")
|
|
166
|
+
.action(async (agentArg, opts) => {
|
|
167
|
+
const { runChatCommand } = await import("../commands/chat.js");
|
|
168
|
+
// Flag wins over positional when both are given; otherwise the
|
|
169
|
+
// positional (npm path) supplies the binding.
|
|
170
|
+
const agentId = opts.agent ?? agentArg;
|
|
171
|
+
await runChatCommand({
|
|
172
|
+
noEnvDetect: opts.envDetect === false,
|
|
173
|
+
host: opts.host,
|
|
174
|
+
port: opts.port,
|
|
175
|
+
...(agentId ? { agentId } : {}),
|
|
176
|
+
});
|
|
177
|
+
// Hold the action handler open — `runChatCommand` resolves once the
|
|
178
|
+
// editor is wired; without this pin, the entry-point exit hook
|
|
179
|
+
// would kill the chat before the user could type. The chat itself
|
|
180
|
+
// terminates on /exit / Ctrl+D / two-Ctrl+C.
|
|
181
|
+
await new Promise(() => { });
|
|
182
|
+
});
|
|
183
|
+
/* ────────────────────── gateway parent + subcommands ────────────────────── */
|
|
184
|
+
// `brigade gateway <run|status|stop|...>`. The bare `brigade gateway`
|
|
185
|
+
// invocation stays back-compat — it dispatches to `run`. status/stop
|
|
186
|
+
// are quick reads of port 7777 + the PID file, so they don't need the
|
|
187
|
+
// Pi SDK or the gateway server module to load.
|
|
188
|
+
const gw = program.command("gateway").description("Run or manage the Brigade gateway (WebSocket daemon)");
|
|
189
|
+
gw.option("-p, --port <port>", "TCP port to bind", (v) => parseInt(v, 10))
|
|
190
|
+
.option("-h, --host <host>", "host/interface to bind")
|
|
191
|
+
.option("-V, --verbose", "raise log level to debug")
|
|
192
|
+
.option("-q, --quiet", "disable the console stream entirely")
|
|
193
|
+
.option("--log-level <level>", "trace|debug|info|warn|error|fatal")
|
|
194
|
+
.action(async (opts) => {
|
|
195
|
+
// Bare `brigade gateway` = `brigade gateway run` (back-compat).
|
|
196
|
+
const { runGatewayCommand } = await import("../commands/gateway.js");
|
|
197
|
+
await runGatewayCommand({
|
|
198
|
+
port: opts.port,
|
|
199
|
+
host: opts.host,
|
|
200
|
+
verbose: opts.verbose,
|
|
201
|
+
quiet: opts.quiet,
|
|
202
|
+
logLevel: opts.logLevel,
|
|
203
|
+
});
|
|
204
|
+
await new Promise(() => { });
|
|
205
|
+
});
|
|
206
|
+
gw.command("run")
|
|
207
|
+
.description("Run the gateway in the foreground (alias for bare `gateway`)")
|
|
208
|
+
.option("-p, --port <port>", "TCP port to bind", (v) => parseInt(v, 10))
|
|
209
|
+
.option("-h, --host <host>", "host/interface to bind")
|
|
210
|
+
.option("-V, --verbose", "raise log level to debug")
|
|
211
|
+
.option("-q, --quiet", "disable the console stream entirely")
|
|
212
|
+
.option("--log-level <level>", "trace|debug|info|warn|error|fatal")
|
|
213
|
+
.action(async (opts) => {
|
|
214
|
+
const { runGatewayCommand } = await import("../commands/gateway.js");
|
|
215
|
+
await runGatewayCommand({
|
|
216
|
+
port: opts.port,
|
|
217
|
+
host: opts.host,
|
|
218
|
+
verbose: opts.verbose,
|
|
219
|
+
quiet: opts.quiet,
|
|
220
|
+
logLevel: opts.logLevel,
|
|
221
|
+
});
|
|
222
|
+
await new Promise(() => { });
|
|
223
|
+
});
|
|
224
|
+
gw.command("status")
|
|
225
|
+
.description("Probe the running gateway and print its state")
|
|
226
|
+
.option("-h, --host <host>", "gateway host (default: 127.0.0.1)")
|
|
227
|
+
.option("-p, --port <port>", "gateway port (default: 7777)", (v) => parseInt(v, 10))
|
|
228
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
229
|
+
.action(async (opts) => {
|
|
230
|
+
const { runGatewayStatusCommand } = await import("../commands/gateway.js");
|
|
231
|
+
await exitAfterFlush(await runGatewayStatusCommand(opts));
|
|
232
|
+
});
|
|
233
|
+
gw.command("stop")
|
|
234
|
+
.description("Send SIGTERM to the running gateway and wait for it to exit")
|
|
235
|
+
.option("--timeout <ms>", "max ms to wait for shutdown (default: 5000)", (v) => parseInt(v, 10))
|
|
236
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
237
|
+
.action(async (opts) => {
|
|
238
|
+
const { runGatewayStopCommand } = await import("../commands/gateway.js");
|
|
239
|
+
await exitAfterFlush(await runGatewayStopCommand(opts));
|
|
240
|
+
});
|
|
241
|
+
// OS-service installer: macOS launchd / Linux systemd-user / Windows Task
|
|
242
|
+
// Scheduler. The supervisor IS the restart loop; the gateway survives reboots
|
|
243
|
+
// and crashes via the OS-native mechanism.
|
|
244
|
+
gw.command("install")
|
|
245
|
+
.description("Install Brigade as an OS service (launchd / systemd / Task Scheduler)")
|
|
246
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
247
|
+
.action(async (opts) => {
|
|
248
|
+
const { runGatewayInstall } = await import("../commands/gateway-install.js");
|
|
249
|
+
await exitAfterFlush(await runGatewayInstall({ json: opts.json }));
|
|
250
|
+
});
|
|
251
|
+
gw.command("uninstall")
|
|
252
|
+
.description("Remove the OS-service registration (the unit file and the supervisor entry)")
|
|
253
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
254
|
+
.action(async (opts) => {
|
|
255
|
+
const { runGatewayUninstall } = await import("../commands/gateway-install.js");
|
|
256
|
+
await exitAfterFlush(await runGatewayUninstall({ json: opts.json }));
|
|
257
|
+
});
|
|
258
|
+
gw.command("restart")
|
|
259
|
+
.description("Restart the installed Brigade service (stop + start)")
|
|
260
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
261
|
+
.action(async (opts) => {
|
|
262
|
+
const { runGatewayRestart } = await import("../commands/gateway-install.js");
|
|
263
|
+
await exitAfterFlush(await runGatewayRestart({ json: opts.json }));
|
|
264
|
+
});
|
|
265
|
+
// Out-of-process watchdog. Reads the gateway's heartbeat file every N
|
|
266
|
+
// seconds; if the gateway's event loop is wedged (alive process, stale
|
|
267
|
+
// heartbeat), kills + respawns it. Use `--once` for a single check; use
|
|
268
|
+
// the looping form under `nohup` / systemd / launchd for continuous
|
|
269
|
+
// supervision.
|
|
270
|
+
gw.command("supervise")
|
|
271
|
+
.description("Watch the gateway heartbeat and respawn on wedge (use --once for a single check)")
|
|
272
|
+
.option("--interval <ms>", "polling interval (default: 30000ms)", (v) => parseInt(v, 10))
|
|
273
|
+
.option("--max-stale <ms>", "max heartbeat age before treating gateway as wedged (default: 90000ms)", (v) => parseInt(v, 10))
|
|
274
|
+
.option("--max-respawns <n>", "respawn cap inside --respawn-window (default: 12)", (v) => parseInt(v, 10))
|
|
275
|
+
.option("--respawn-window <ms>", "rolling window for the respawn cap (default: 3600000ms / 1h)", (v) => parseInt(v, 10))
|
|
276
|
+
.option("--once", "run a single check then exit (default: loop forever)", false)
|
|
277
|
+
.option("--json", "emit JSON lines instead of human-readable text", false)
|
|
278
|
+
.action(async (opts) => {
|
|
279
|
+
const { runGatewaySupervise } = await import("../commands/gateway-supervise.js");
|
|
280
|
+
await exitAfterFlush(await runGatewaySupervise({
|
|
281
|
+
intervalMs: opts.interval,
|
|
282
|
+
maxStaleMs: opts.maxStale,
|
|
283
|
+
maxRespawnsPerWindow: opts.maxRespawns,
|
|
284
|
+
respawnWindowMs: opts.respawnWindow,
|
|
285
|
+
once: opts.once,
|
|
286
|
+
json: opts.json,
|
|
287
|
+
}));
|
|
288
|
+
});
|
|
289
|
+
/* ─────────────────────────────── connect ─────────────────────────────── */
|
|
290
|
+
program
|
|
291
|
+
.command("connect")
|
|
292
|
+
.description("Connect to a running Brigade gateway from a thin TUI client.\n" +
|
|
293
|
+
" Examples:\n" +
|
|
294
|
+
" brigade connect # default 127.0.0.1:7777\n" +
|
|
295
|
+
" brigade connect marketing-lead # open bound to that agent\n" +
|
|
296
|
+
" brigade connect --agent marketing-lead # same, flag form\n" +
|
|
297
|
+
" brigade connect --host 192.168.1.5 -p 7777\n" +
|
|
298
|
+
" brigade connect --timeout 120000")
|
|
299
|
+
.argument("[agent]", "agent id to bind at startup (positional alias for --agent)")
|
|
300
|
+
.option("-h, --host <host>", "gateway host (default: 127.0.0.1)")
|
|
301
|
+
.option("-p, --port <port>", "gateway port", (v) => parseInt(v, 10))
|
|
302
|
+
.option("--timeout <ms>", "request timeout in ms", (v) => parseInt(v, 10))
|
|
303
|
+
.option("--agent <id>", "bind the TUI to this agent at startup (skips the /agent step)")
|
|
304
|
+
.action(async (agentArg, opts) => {
|
|
305
|
+
const { runConnectCommand } = await import("../commands/connect.js");
|
|
306
|
+
const agentId = opts.agent ?? agentArg;
|
|
307
|
+
await runConnectCommand({
|
|
308
|
+
host: opts.host,
|
|
309
|
+
port: opts.port,
|
|
310
|
+
requestTimeoutMs: opts.timeout,
|
|
311
|
+
...(agentId ? { agentId } : {}),
|
|
312
|
+
});
|
|
313
|
+
await new Promise(() => { });
|
|
314
|
+
});
|
|
315
|
+
/* ─────────────────────────────── status ─────────────────────────────── */
|
|
316
|
+
program
|
|
317
|
+
.command("status")
|
|
318
|
+
.description("Print a snapshot of Brigade configuration, sessions, and gateway state")
|
|
319
|
+
.option("-h, --host <host>", "gateway host to probe (default: 127.0.0.1)")
|
|
320
|
+
.option("-p, --port <port>", "gateway port to probe (default: 7777)", (v) => parseInt(v, 10))
|
|
321
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
322
|
+
.action(async (opts) => {
|
|
323
|
+
const { runStatusCommand } = await import("../commands/status.js");
|
|
324
|
+
await runStatusCommand({ host: opts.host, port: opts.port, json: opts.json });
|
|
325
|
+
});
|
|
326
|
+
/* ─────────────────────────────── doctor ─────────────────────────────── */
|
|
327
|
+
program
|
|
328
|
+
.command("doctor")
|
|
329
|
+
.description("Run health checks against your Brigade install, providers, workspace, and the gateway.\n" +
|
|
330
|
+
" Examples:\n" +
|
|
331
|
+
" brigade doctor # human-readable output\n" +
|
|
332
|
+
" brigade doctor --json # machine-readable\n" +
|
|
333
|
+
" brigade doctor --strict # exit 1 on warnings (CI mode)")
|
|
334
|
+
.option("-h, --host <host>", "gateway host to probe (default: 127.0.0.1)")
|
|
335
|
+
.option("-p, --port <port>", "gateway port to probe (default: 7777)", (v) => parseInt(v, 10))
|
|
336
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
337
|
+
.option("--strict", "exit non-zero on warnings (CI mode)", false)
|
|
338
|
+
.action(async (opts) => {
|
|
339
|
+
const { runDoctorCommand } = await import("../commands/doctor.js");
|
|
340
|
+
await exitAfterFlush(await runDoctorCommand({ host: opts.host, port: opts.port, json: opts.json, strict: opts.strict }));
|
|
341
|
+
});
|
|
342
|
+
/* ─────────────────────────────── config ─────────────────────────────── */
|
|
343
|
+
// `brigade config <list|get|set|unset|file>`. No schema/validate
|
|
344
|
+
// subcommands — Brigade's TypeBox schema is private and validation
|
|
345
|
+
// runs automatically on every write.
|
|
346
|
+
const cfg = program.command("config").description("Read or modify your Brigade configuration");
|
|
347
|
+
cfg
|
|
348
|
+
.command("list")
|
|
349
|
+
.description("Print the full config (secrets redacted)")
|
|
350
|
+
.option("--json", "emit JSON only (no header)", false)
|
|
351
|
+
.option("--no-redact", "show raw values including secrets (use carefully)", false)
|
|
352
|
+
.action(async (opts) => {
|
|
353
|
+
const { runConfigList } = await import("../commands/config-cmd.js");
|
|
354
|
+
await exitAfterFlush(await runConfigList({ json: opts.json, noRedact: opts.redact === false }));
|
|
355
|
+
});
|
|
356
|
+
cfg
|
|
357
|
+
.command("get <path>")
|
|
358
|
+
.description("Read a value by dot-notation key.\n" +
|
|
359
|
+
" Examples:\n" +
|
|
360
|
+
" brigade config get agents.defaults.provider\n" +
|
|
361
|
+
" brigade config get agents.defaults.model.fallbacks[0]\n" +
|
|
362
|
+
' brigade config get \'secrets.providers["my.vault"]\'')
|
|
363
|
+
.option("--json", "emit JSON instead of bare-string output", false)
|
|
364
|
+
.action(async (rawPath, opts) => {
|
|
365
|
+
const { runConfigGet } = await import("../commands/config-cmd.js");
|
|
366
|
+
await exitAfterFlush(await runConfigGet(rawPath, { json: opts.json }));
|
|
367
|
+
});
|
|
368
|
+
cfg
|
|
369
|
+
.command("set <path> <value>")
|
|
370
|
+
.description("Write a value (JSON5-parsed by default; falls back to string).\n" +
|
|
371
|
+
" Examples:\n" +
|
|
372
|
+
" brigade config set agents.defaults.provider openai\n" +
|
|
373
|
+
" brigade config set agents.defaults.thinking medium\n" +
|
|
374
|
+
' brigade config set agents.defaults.model.fallbacks \'["claude-sonnet-4-6", "gpt-5"]\'\n' +
|
|
375
|
+
" brigade config set gateway.port 7777 --strict-json")
|
|
376
|
+
.option("--strict-json", "require strict JSON syntax for the value", false)
|
|
377
|
+
.option("--dry-run", "show what would be written without persisting", false)
|
|
378
|
+
.option("--json", "emit JSON status instead of human text", false)
|
|
379
|
+
.action(async (rawPath, rawValue, opts) => {
|
|
380
|
+
const { runConfigSet } = await import("../commands/config-cmd.js");
|
|
381
|
+
await exitAfterFlush(await runConfigSet(rawPath, rawValue, {
|
|
382
|
+
strictJson: opts.strictJson,
|
|
383
|
+
dryRun: opts.dryRun,
|
|
384
|
+
json: opts.json,
|
|
385
|
+
}));
|
|
386
|
+
});
|
|
387
|
+
cfg
|
|
388
|
+
.command("unset <path>")
|
|
389
|
+
.description("Remove a key by dot-notation path.\n" +
|
|
390
|
+
" Example: brigade config unset agents.defaults.thinking")
|
|
391
|
+
.option("--json", "emit JSON status instead of human text", false)
|
|
392
|
+
.action(async (rawPath, opts) => {
|
|
393
|
+
const { runConfigUnset } = await import("../commands/config-cmd.js");
|
|
394
|
+
await exitAfterFlush(await runConfigUnset(rawPath, { json: opts.json }));
|
|
395
|
+
});
|
|
396
|
+
cfg
|
|
397
|
+
.command("file")
|
|
398
|
+
.description("Print the absolute path to your Brigade config file")
|
|
399
|
+
.option("--json", "emit JSON instead of bare-path output", false)
|
|
400
|
+
.action(async (opts) => {
|
|
401
|
+
const { runConfigFile } = await import("../commands/config-cmd.js");
|
|
402
|
+
await exitAfterFlush(await runConfigFile({ json: opts.json }));
|
|
403
|
+
});
|
|
404
|
+
cfg
|
|
405
|
+
.command("schema")
|
|
406
|
+
.description("Print the Brigade config TypeBox schema as JSON")
|
|
407
|
+
.action(async () => {
|
|
408
|
+
const { runConfigSchema } = await import("../commands/config-cmd.js");
|
|
409
|
+
await exitAfterFlush(await runConfigSchema());
|
|
410
|
+
});
|
|
411
|
+
cfg
|
|
412
|
+
.command("validate")
|
|
413
|
+
.description("Validate your Brigade config against the schema; exit non-zero on issues")
|
|
414
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
415
|
+
.action(async (opts) => {
|
|
416
|
+
const { runConfigValidate } = await import("../commands/config-cmd.js");
|
|
417
|
+
await exitAfterFlush(await runConfigValidate({ json: opts.json }));
|
|
418
|
+
});
|
|
419
|
+
/* ───────────────────────────── channels ───────────────────────────── */
|
|
420
|
+
// Manage messaging channels (WhatsApp today, more later). `link` runs the
|
|
421
|
+
// adapter directly to pair a device — the gateway must be stopped first so
|
|
422
|
+
// the two don't fight over the same socket. `enable`/`disable` only touch
|
|
423
|
+
// brigade.json (cheap; the gateway picks up the flag on next boot/reload).
|
|
424
|
+
const channels = program
|
|
425
|
+
.command("channels")
|
|
426
|
+
.description("Manage messaging channels (link, status, enable/disable)");
|
|
427
|
+
channels
|
|
428
|
+
.command("list")
|
|
429
|
+
.description("List every available channel with its enabled/linked status")
|
|
430
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
431
|
+
.action(async (opts) => {
|
|
432
|
+
const { runChannelsList } = await import("../commands/channels.js");
|
|
433
|
+
await exitAfterFlush(await runChannelsList({ json: opts.json }));
|
|
434
|
+
});
|
|
435
|
+
channels
|
|
436
|
+
.command("status")
|
|
437
|
+
.description("Show one channel's enabled / linked / configured / authDir / gateway state")
|
|
438
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
439
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
440
|
+
.action(async (opts) => {
|
|
441
|
+
const { runChannelsStatus } = await import("../commands/channels.js");
|
|
442
|
+
await exitAfterFlush(await runChannelsStatus({ channel: opts.channel }, { json: opts.json }));
|
|
443
|
+
});
|
|
444
|
+
channels
|
|
445
|
+
.command("link")
|
|
446
|
+
.description("Pair a device with a channel (e.g. scan a WhatsApp QR).\n" +
|
|
447
|
+
" Requires the gateway to be stopped so the channel socket isn't shared.\n" +
|
|
448
|
+
" Use --force to overwrite an existing link or recover from an interrupted previous link.\n" +
|
|
449
|
+
" Example: brigade channels link --channel whatsapp")
|
|
450
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
451
|
+
.option("--timeout <ms>", "max time to wait for pairing (default 180000)", (v) => parseInt(v, 10))
|
|
452
|
+
.option("--force", "clear any previous link state and start a fresh pair", false)
|
|
453
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
454
|
+
.action(async (opts) => {
|
|
455
|
+
const { runChannelsLink } = await import("../commands/channels.js");
|
|
456
|
+
await exitAfterFlush(await runChannelsLink({ channel: opts.channel, timeoutMs: opts.timeout, force: opts.force }, { json: opts.json }));
|
|
457
|
+
});
|
|
458
|
+
channels
|
|
459
|
+
.command("unlink")
|
|
460
|
+
.description("Disable a channel and erase its on-disk auth state.\n" +
|
|
461
|
+
" Requires the gateway to be stopped.")
|
|
462
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
463
|
+
.option("-y, --yes", "skip the confirmation prompt", false)
|
|
464
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
465
|
+
.action(async (opts) => {
|
|
466
|
+
const { runChannelsUnlink } = await import("../commands/channels.js");
|
|
467
|
+
await exitAfterFlush(await runChannelsUnlink({ channel: opts.channel, yes: opts.yes }, { json: opts.json }));
|
|
468
|
+
});
|
|
469
|
+
channels
|
|
470
|
+
.command("enable")
|
|
471
|
+
.description("Enable this channel in your Brigade config (no link)")
|
|
472
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
473
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
474
|
+
.action(async (opts) => {
|
|
475
|
+
const { runChannelsEnable } = await import("../commands/channels.js");
|
|
476
|
+
await exitAfterFlush(await runChannelsEnable({ channel: opts.channel }, { json: opts.json }));
|
|
477
|
+
});
|
|
478
|
+
channels
|
|
479
|
+
.command("disable")
|
|
480
|
+
.description("Disable this channel in your Brigade config (credentials untouched)")
|
|
481
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
482
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
483
|
+
.action(async (opts) => {
|
|
484
|
+
const { runChannelsDisable } = await import("../commands/channels.js");
|
|
485
|
+
await exitAfterFlush(await runChannelsDisable({ channel: opts.channel }, { json: opts.json }));
|
|
486
|
+
});
|
|
487
|
+
// `channels allow <list|add|remove>` — manage the per-channel allow-from list.
|
|
488
|
+
// Pairs with `brigade pairing approve <CODE>` (which adds approved senders).
|
|
489
|
+
const channelsAllow = channels
|
|
490
|
+
.command("allow")
|
|
491
|
+
.description("Manage the per-channel allow-from list (senders permitted to DM the agent)");
|
|
492
|
+
channelsAllow
|
|
493
|
+
.command("list")
|
|
494
|
+
.description("Print the channel's allow-from list")
|
|
495
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
496
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
497
|
+
.action(async (opts) => {
|
|
498
|
+
const { runChannelsAllowList } = await import("../commands/channels.js");
|
|
499
|
+
await exitAfterFlush(await runChannelsAllowList({ channel: opts.channel }, { json: opts.json }));
|
|
500
|
+
});
|
|
501
|
+
channelsAllow
|
|
502
|
+
.command("add <id>")
|
|
503
|
+
.description("Add a sender to the allow-from list (e.g. an E.164 phone number)")
|
|
504
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
505
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
506
|
+
.action(async (id, opts) => {
|
|
507
|
+
const { runChannelsAllowAdd } = await import("../commands/channels.js");
|
|
508
|
+
await exitAfterFlush(await runChannelsAllowAdd({ id, channel: opts.channel }, { json: opts.json }));
|
|
509
|
+
});
|
|
510
|
+
channelsAllow
|
|
511
|
+
.command("remove <id>")
|
|
512
|
+
.description("Remove a sender from the allow-from list")
|
|
513
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
514
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
515
|
+
.action(async (id, opts) => {
|
|
516
|
+
const { runChannelsAllowRemove } = await import("../commands/channels.js");
|
|
517
|
+
await exitAfterFlush(await runChannelsAllowRemove({ id, channel: opts.channel }, { json: opts.json }));
|
|
518
|
+
});
|
|
519
|
+
// `channels add` — credential-prompt wizard for token-based channels
|
|
520
|
+
// (Slack/Telegram/Discord shape). Each adapter declares its credential
|
|
521
|
+
// keys via `setup.credentialKeys`; the wizard prompts for each in turn,
|
|
522
|
+
// honours env-var pre-fills, and persists into brigade.json. WhatsApp
|
|
523
|
+
// and other QR/OAuth channels redirect operators to `channels link`.
|
|
524
|
+
channels
|
|
525
|
+
.command("add")
|
|
526
|
+
.description("Walk the channel's setup wizard and save credentials to your Brigade config.\n" +
|
|
527
|
+
" QR/OAuth channels (e.g. WhatsApp) use `channels link` instead.\n" +
|
|
528
|
+
" Examples:\n" +
|
|
529
|
+
" brigade channels add --channel slack\n" +
|
|
530
|
+
" brigade channels add --channel slack --non-interactive # env-vars only")
|
|
531
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
532
|
+
.option("--non-interactive", "fail unless every credential is provided via its declared env var (CI mode)", false)
|
|
533
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
534
|
+
.action(async (opts) => {
|
|
535
|
+
const { runChannelsAdd } = await import("../commands/channels.js");
|
|
536
|
+
await exitAfterFlush(await runChannelsAdd({ channel: opts.channel, nonInteractive: opts.nonInteractive }, { json: opts.json }));
|
|
537
|
+
});
|
|
538
|
+
/* ───────────────────────────── sessions ───────────────────────────── */
|
|
539
|
+
// Inspect + GC the JSONL transcripts under ~/.brigade/agents/<id>/sessions/.
|
|
540
|
+
const sessions = program
|
|
541
|
+
.command("sessions")
|
|
542
|
+
.description("List + clean up agent session transcripts");
|
|
543
|
+
sessions
|
|
544
|
+
.command("list")
|
|
545
|
+
.description("Show every session for an agent (newest first)")
|
|
546
|
+
.option("--agent <id>", "agent id (default: main)")
|
|
547
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
548
|
+
.action(async (opts) => {
|
|
549
|
+
const { runSessionsList } = await import("../commands/sessions.js");
|
|
550
|
+
await exitAfterFlush(await runSessionsList({ agent: opts.agent }, { json: opts.json }));
|
|
551
|
+
});
|
|
552
|
+
sessions
|
|
553
|
+
.command("cleanup")
|
|
554
|
+
.description("Delete session transcripts older than --older-than (e.g. 30d / 12h)")
|
|
555
|
+
.requiredOption("--older-than <duration>", "max age before a session is deleted (e.g. 30d)")
|
|
556
|
+
.option("--agent <id>", "agent id (default: main)")
|
|
557
|
+
.option("--dry-run", "show what would be deleted without removing anything", false)
|
|
558
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
559
|
+
.action(async (opts) => {
|
|
560
|
+
const { runSessionsCleanup } = await import("../commands/sessions.js");
|
|
561
|
+
await exitAfterFlush(await runSessionsCleanup({ agent: opts.agent, olderThan: opts.olderThan, dryRun: opts.dryRun }, { json: opts.json }));
|
|
562
|
+
});
|
|
563
|
+
/* ───────────────────────────── skills ───────────────────────────── */
|
|
564
|
+
const skills = program.command("skills").description("Inspect installed Brigade skills");
|
|
565
|
+
skills
|
|
566
|
+
.command("list")
|
|
567
|
+
.description("Show every discovered skill (bundled + workspace)")
|
|
568
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
569
|
+
.action(async (opts) => {
|
|
570
|
+
const { runSkillsList } = await import("../commands/skills.js");
|
|
571
|
+
await exitAfterFlush(await runSkillsList({ json: opts.json }));
|
|
572
|
+
});
|
|
573
|
+
skills
|
|
574
|
+
.command("info <name>")
|
|
575
|
+
.description("Print a skill's full body (SKILL.md)")
|
|
576
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
577
|
+
.action(async (name, opts) => {
|
|
578
|
+
const { runSkillsInfo } = await import("../commands/skills.js");
|
|
579
|
+
await exitAfterFlush(await runSkillsInfo({ name }, { json: opts.json }));
|
|
580
|
+
});
|
|
581
|
+
/* ───────────────────────────── logs ───────────────────────────── */
|
|
582
|
+
program
|
|
583
|
+
.command("logs")
|
|
584
|
+
.description("Tail today's gateway log file (--follow streams new lines)")
|
|
585
|
+
.option("--follow", "follow appended lines (Ctrl+C to stop)", false)
|
|
586
|
+
.option("--limit <n>", "how many trailing lines to print first (default 50)", (v) => parseInt(v, 10))
|
|
587
|
+
.option("--json", "emit raw JSON lines instead of one-line formatted output", false)
|
|
588
|
+
.action(async (opts) => {
|
|
589
|
+
const { runLogsCommand } = await import("../commands/logs.js");
|
|
590
|
+
await exitAfterFlush(await runLogsCommand({ follow: opts.follow, limit: opts.limit }, { json: opts.json }));
|
|
591
|
+
});
|
|
592
|
+
/* ───────────────────────────── secrets ───────────────────────────── */
|
|
593
|
+
const secrets = program
|
|
594
|
+
.command("secrets")
|
|
595
|
+
.description("Find suspected leaked credentials inside your Brigade install");
|
|
596
|
+
secrets
|
|
597
|
+
.command("audit")
|
|
598
|
+
.description("Scan your Brigade install for plaintext-key shapes (sk-…, Bearer …, …)")
|
|
599
|
+
.option("--strict", "exit non-zero on findings (CI mode)", false)
|
|
600
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
601
|
+
.action(async (opts) => {
|
|
602
|
+
const { runSecretsAudit } = await import("../commands/secrets-audit.js");
|
|
603
|
+
await exitAfterFlush(await runSecretsAudit({ strict: opts.strict }, { json: opts.json }));
|
|
604
|
+
});
|
|
605
|
+
/* ───────────────────────────── pairing ───────────────────────────── */
|
|
606
|
+
// `brigade pairing <list|approve|revoke>` — operator-side review of the
|
|
607
|
+
// pending-code list. Strangers' DMs to a `pairing`-policy channel get an
|
|
608
|
+
// 8-char code; the operator approves it here to add them to the allow-from
|
|
609
|
+
// list, or revokes to drop without granting access.
|
|
610
|
+
const pairing = program
|
|
611
|
+
.command("pairing")
|
|
612
|
+
.description("Review and approve/revoke pending channel pairing codes");
|
|
613
|
+
pairing
|
|
614
|
+
.command("list")
|
|
615
|
+
.description("Show pending pairing codes for a channel")
|
|
616
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
617
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
618
|
+
.action(async (opts) => {
|
|
619
|
+
const { runPairingList } = await import("../commands/pairing.js");
|
|
620
|
+
await exitAfterFlush(await runPairingList({ channel: opts.channel }, { json: opts.json }));
|
|
621
|
+
});
|
|
622
|
+
pairing
|
|
623
|
+
.command("approve <code>")
|
|
624
|
+
.description("Approve a pending code (moves the sender into the allow-from list)")
|
|
625
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
626
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
627
|
+
.action(async (code, opts) => {
|
|
628
|
+
const { runPairingApprove } = await import("../commands/pairing.js");
|
|
629
|
+
await exitAfterFlush(await runPairingApprove({ code, channel: opts.channel }, { json: opts.json }));
|
|
630
|
+
});
|
|
631
|
+
pairing
|
|
632
|
+
.command("revoke <code>")
|
|
633
|
+
.description("Drop a pending code without approving it")
|
|
634
|
+
.option("--channel <id>", "channel id (auto-picked when only one is available)")
|
|
635
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
636
|
+
.action(async (code, opts) => {
|
|
637
|
+
const { runPairingRevoke } = await import("../commands/pairing.js");
|
|
638
|
+
await exitAfterFlush(await runPairingRevoke({ code, channel: opts.channel }, { json: opts.json }));
|
|
639
|
+
});
|
|
640
|
+
/* ───────────────────────────── backup ───────────────────────────── */
|
|
641
|
+
// Snapshot / verify / restore the entire ~/.brigade directory so an operator
|
|
642
|
+
// can migrate hosts or disaster-recover. Refuses to run while the gateway is
|
|
643
|
+
// alive (locks would fight) unless --force is passed.
|
|
644
|
+
const backup = program
|
|
645
|
+
.command("backup")
|
|
646
|
+
.description("Snapshot, verify, and restore your Brigade install as a single .tar.gz");
|
|
647
|
+
backup
|
|
648
|
+
.command("create")
|
|
649
|
+
.description("Write a sha256-manifest'd .tar.gz snapshot of your Brigade install")
|
|
650
|
+
.option("--output <path>", "where to write the archive (default: ./brigade-backup-<ts>.tar.gz)")
|
|
651
|
+
.option("--force", "back up even if the gateway is running (risk: torn writes)", false)
|
|
652
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
653
|
+
.action(async (opts) => {
|
|
654
|
+
const { runBackupCreate } = await import("../commands/backup.js");
|
|
655
|
+
await exitAfterFlush(await runBackupCreate({ output: opts.output, force: opts.force }, { json: opts.json }));
|
|
656
|
+
});
|
|
657
|
+
backup
|
|
658
|
+
.command("verify <archive>")
|
|
659
|
+
.description("Re-hash every entry in an archive against its manifest; exit non-zero on mismatch")
|
|
660
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
661
|
+
.action(async (archive, opts) => {
|
|
662
|
+
const { runBackupVerify } = await import("../commands/backup.js");
|
|
663
|
+
await exitAfterFlush(await runBackupVerify({ archive }, { json: opts.json }));
|
|
664
|
+
});
|
|
665
|
+
backup
|
|
666
|
+
.command("restore <archive>")
|
|
667
|
+
.description("Extract an archive into your Brigade install (or --target). Refuses if target exists without --force")
|
|
668
|
+
.option("--target <path>", "where to extract (default: your Brigade install directory)")
|
|
669
|
+
.option("--force", "overwrite an existing target / restore while gateway is running", false)
|
|
670
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
671
|
+
.action(async (archive, opts) => {
|
|
672
|
+
const { runBackupRestore } = await import("../commands/backup.js");
|
|
673
|
+
await exitAfterFlush(await runBackupRestore({ archive, target: opts.target, force: opts.force }, { json: opts.json }));
|
|
674
|
+
});
|
|
675
|
+
/* ───────────────────────────── exec ───────────────────────────── */
|
|
676
|
+
// CRUD over the bash-tool approval allowlist at
|
|
677
|
+
// ~/.brigade/exec-approvals.json. Brigade gates every bash command
|
|
678
|
+
// through this list — agents cannot run shell commands until the
|
|
679
|
+
// operator explicitly approves them with `brigade exec allow`.
|
|
680
|
+
const exec = program
|
|
681
|
+
.command("exec")
|
|
682
|
+
.description("Manage the bash-tool approval allowlist used by Brigade");
|
|
683
|
+
exec
|
|
684
|
+
.command("list")
|
|
685
|
+
.description("Print all approved commands + patterns")
|
|
686
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
687
|
+
.option("--agent <id>", "agent id whose allowlist to inspect", "main")
|
|
688
|
+
.action(async (opts) => {
|
|
689
|
+
const { runExecList } = await import("../commands/exec-cmd.js");
|
|
690
|
+
await exitAfterFlush(await runExecList({ json: opts.json, agentId: opts.agent }));
|
|
691
|
+
});
|
|
692
|
+
exec
|
|
693
|
+
.command("allow <command...>")
|
|
694
|
+
.description("Approve an exact bash command.\n" +
|
|
695
|
+
" Example: brigade exec allow ls -la\n" +
|
|
696
|
+
" Tip: quote complex commands so the shell doesn't reinterpret them.")
|
|
697
|
+
.option("--json", "emit JSON status instead of human text", false)
|
|
698
|
+
.option("--agent <id>", "agent id whose allowlist to mutate", "main")
|
|
699
|
+
.action(async (parts, opts) => {
|
|
700
|
+
const { runExecAllow } = await import("../commands/exec-cmd.js");
|
|
701
|
+
await exitAfterFlush(await runExecAllow(parts.join(" "), { json: opts.json, agentId: opts.agent }));
|
|
702
|
+
});
|
|
703
|
+
exec
|
|
704
|
+
.command("allow-pattern <regex>")
|
|
705
|
+
.description('Approve a regex pattern of bash commands.\n' +
|
|
706
|
+
" Examples:\n" +
|
|
707
|
+
" brigade exec allow-pattern '^git (status|diff|log)( |$)'\n" +
|
|
708
|
+
" brigade exec allow-pattern '^cat package\\.json$'")
|
|
709
|
+
.option("--json", "emit JSON status instead of human text", false)
|
|
710
|
+
.option("--agent <id>", "agent id whose allowlist to mutate", "main")
|
|
711
|
+
.action(async (regex, opts) => {
|
|
712
|
+
const { runExecAllowPattern } = await import("../commands/exec-cmd.js");
|
|
713
|
+
await exitAfterFlush(await runExecAllowPattern(regex, { json: opts.json, agentId: opts.agent }));
|
|
714
|
+
});
|
|
715
|
+
exec
|
|
716
|
+
.command("remove <value...>")
|
|
717
|
+
.description("Remove an exact command OR a pattern from the allowlist.\n" +
|
|
718
|
+
" Brigade looks in both commands AND patterns; if the value is in either, it's dropped.")
|
|
719
|
+
.option("--json", "emit JSON status instead of human text", false)
|
|
720
|
+
.option("--agent <id>", "agent id whose allowlist to mutate", "main")
|
|
721
|
+
.action(async (parts, opts) => {
|
|
722
|
+
const { runExecRemove } = await import("../commands/exec-cmd.js");
|
|
723
|
+
await exitAfterFlush(await runExecRemove(parts.join(" "), { json: opts.json, agentId: opts.agent }));
|
|
724
|
+
});
|
|
725
|
+
exec
|
|
726
|
+
.command("deny-test <command...>")
|
|
727
|
+
.description("Show how the gate would classify a command (allow / prompt / deny).\n" +
|
|
728
|
+
" Useful for sanity-checking before approving.")
|
|
729
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
730
|
+
.option("--agent <id>", "agent id whose allowlist to consult", "main")
|
|
731
|
+
.action(async (parts, opts) => {
|
|
732
|
+
const { runExecDenyTest } = await import("../commands/exec-cmd.js");
|
|
733
|
+
await exitAfterFlush(await runExecDenyTest(parts.join(" "), { json: opts.json, agentId: opts.agent }));
|
|
734
|
+
});
|
|
735
|
+
exec
|
|
736
|
+
.command("file")
|
|
737
|
+
.description("Print the absolute path to exec-approvals.json")
|
|
738
|
+
.option("--json", "emit JSON instead of bare-path output", false)
|
|
739
|
+
.option("--agent <id>", "agent id whose allowlist path to print", "main")
|
|
740
|
+
.action(async (opts) => {
|
|
741
|
+
const { runExecFile } = await import("../commands/exec-cmd.js");
|
|
742
|
+
await exitAfterFlush(await runExecFile({ json: opts.json, agentId: opts.agent }));
|
|
743
|
+
});
|
|
744
|
+
// ──────────────── cron ────────────────
|
|
745
|
+
// Scheduled jobs: list / add / edit / remove / enable / disable / run / runs / status.
|
|
746
|
+
// All subcommands talk DIRECTLY to ~/.brigade/cron.json — the per-storePath
|
|
747
|
+
// lock in cron/service/locked.ts serialises against a running gateway, so
|
|
748
|
+
// there's no double-write race even with both processes touching the file.
|
|
749
|
+
const cron = program.command("cron").description("Manage scheduled cron jobs");
|
|
750
|
+
cron
|
|
751
|
+
.command("status")
|
|
752
|
+
.description("Show cron service status (job count, next wake time)")
|
|
753
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
754
|
+
.action(async (opts) => {
|
|
755
|
+
const { runCronStatus } = await import("../commands/cron.js");
|
|
756
|
+
await exitAfterFlush(await runCronStatus({ json: opts.json }));
|
|
757
|
+
});
|
|
758
|
+
cron
|
|
759
|
+
.command("list")
|
|
760
|
+
.description("List cron jobs (enabled only by default)")
|
|
761
|
+
.option("--all", "include disabled jobs", false)
|
|
762
|
+
.option("--query <text>", "filter by name / description / id substring")
|
|
763
|
+
.option("--limit <n>", "max rows (default 50, max 200)", (v) => parseInt(v, 10))
|
|
764
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
765
|
+
.action(async (opts) => {
|
|
766
|
+
const { runCronList } = await import("../commands/cron.js");
|
|
767
|
+
await exitAfterFlush(await runCronList({
|
|
768
|
+
...(opts.all !== undefined ? { all: opts.all } : {}),
|
|
769
|
+
...(opts.query !== undefined ? { query: opts.query } : {}),
|
|
770
|
+
...(opts.limit !== undefined ? { limit: opts.limit } : {}),
|
|
771
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
772
|
+
}));
|
|
773
|
+
});
|
|
774
|
+
cron
|
|
775
|
+
.command("add")
|
|
776
|
+
.description("Add a cron job (one of --at / --every / --cron required, plus --message or --system-event)")
|
|
777
|
+
.requiredOption("--name <name>", "human-readable label for this job")
|
|
778
|
+
.option("--description <text>", "longer description shown by `cron list`")
|
|
779
|
+
.option("--disabled", "create the job in disabled state", false)
|
|
780
|
+
.option("--at <iso-or-ms>", "one-shot fire time (ISO 8601 or ms-epoch)")
|
|
781
|
+
.option("--every <duration>", 'recurring interval, e.g. "5m" / "1h" / "30s"')
|
|
782
|
+
.option("--cron <expr>", 'cron expression (5/6/7-field), e.g. "0 9 * * *"')
|
|
783
|
+
.option("--tz <iana>", "timezone for --cron (default: host timezone)")
|
|
784
|
+
.option("--target <target>", '"main" | "isolated" | "session:<id>" (default: by payload)')
|
|
785
|
+
.option("--message <text>", "agent-turn payload — the prompt the cron sends to the model")
|
|
786
|
+
.option("--system-event <text>", "system-event payload — text injected into the main session")
|
|
787
|
+
.option("--model <id>", "model override for agent-turn payloads")
|
|
788
|
+
.option("--thinking <level>", '"off" | "low" | "medium" | "high"')
|
|
789
|
+
.option("--timeout-seconds <n>", "per-run timeout", (v) => parseInt(v, 10))
|
|
790
|
+
.option("--tools <csv>", "comma-separated tool allowlist (agent-turn only)")
|
|
791
|
+
.option("--light-context", "drop ALL workspace bootstrap files for a minimal prompt", false)
|
|
792
|
+
.option("--deliver", "set delivery.mode to announce (default: by payload)", false)
|
|
793
|
+
.option("--no-deliver", "set delivery.mode to none (silence)", false)
|
|
794
|
+
.option("--channel <id>", "delivery channel id")
|
|
795
|
+
.option("--to <recipient>", "delivery recipient (channel-specific)")
|
|
796
|
+
.option("--account <id>", "delivery account id")
|
|
797
|
+
.option("--best-effort-deliver", "tolerate delivery failures", false)
|
|
798
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
799
|
+
.action(async (opts) => {
|
|
800
|
+
const { runCronAdd } = await import("../commands/cron.js");
|
|
801
|
+
const job = buildCronJobCreateFromCliOpts(opts);
|
|
802
|
+
if (typeof job === "string") {
|
|
803
|
+
process.stderr.write(`cron add: ${job}\n`);
|
|
804
|
+
await exitAfterFlush(1);
|
|
805
|
+
return; // unreachable at runtime; restores `job` narrowing for tsc
|
|
806
|
+
}
|
|
807
|
+
await exitAfterFlush(await runCronAdd({
|
|
808
|
+
job,
|
|
809
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
810
|
+
}));
|
|
811
|
+
});
|
|
812
|
+
cron
|
|
813
|
+
.command("edit <jobId>")
|
|
814
|
+
.description("Patch fields of an existing cron job")
|
|
815
|
+
.option("--name <name>", "rename the job")
|
|
816
|
+
.option("--description <text>", "set the description")
|
|
817
|
+
.option("--enable", "enable the job", false)
|
|
818
|
+
.option("--disable", "disable the job", false)
|
|
819
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
820
|
+
.action(async (jobId, opts) => {
|
|
821
|
+
const { runCronEdit } = await import("../commands/cron.js");
|
|
822
|
+
const patch = {};
|
|
823
|
+
if (opts.name !== undefined)
|
|
824
|
+
patch.name = opts.name;
|
|
825
|
+
if (opts.description !== undefined)
|
|
826
|
+
patch.description = opts.description;
|
|
827
|
+
if (opts.enable && opts.disable) {
|
|
828
|
+
process.stderr.write("cron edit: --enable and --disable are mutually exclusive\n");
|
|
829
|
+
await exitAfterFlush(1);
|
|
830
|
+
}
|
|
831
|
+
if (opts.enable)
|
|
832
|
+
patch.enabled = true;
|
|
833
|
+
if (opts.disable)
|
|
834
|
+
patch.enabled = false;
|
|
835
|
+
await exitAfterFlush(await runCronEdit({
|
|
836
|
+
jobId,
|
|
837
|
+
patch,
|
|
838
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
839
|
+
}));
|
|
840
|
+
});
|
|
841
|
+
cron
|
|
842
|
+
.command("rm <jobId>")
|
|
843
|
+
.alias("remove")
|
|
844
|
+
.alias("delete")
|
|
845
|
+
.description("Delete a cron job")
|
|
846
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
847
|
+
.action(async (jobId, opts) => {
|
|
848
|
+
const { runCronRemove } = await import("../commands/cron.js");
|
|
849
|
+
await exitAfterFlush(await runCronRemove({ jobId, ...(opts.json !== undefined ? { json: opts.json } : {}) }));
|
|
850
|
+
});
|
|
851
|
+
cron
|
|
852
|
+
.command("enable <jobId>")
|
|
853
|
+
.description("Enable a disabled cron job")
|
|
854
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
855
|
+
.action(async (jobId, opts) => {
|
|
856
|
+
const { runCronEnable } = await import("../commands/cron.js");
|
|
857
|
+
await exitAfterFlush(await runCronEnable({ jobId, ...(opts.json !== undefined ? { json: opts.json } : {}) }));
|
|
858
|
+
});
|
|
859
|
+
cron
|
|
860
|
+
.command("disable <jobId>")
|
|
861
|
+
.description("Disable an enabled cron job")
|
|
862
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
863
|
+
.action(async (jobId, opts) => {
|
|
864
|
+
const { runCronDisable } = await import("../commands/cron.js");
|
|
865
|
+
await exitAfterFlush(await runCronDisable({ jobId, ...(opts.json !== undefined ? { json: opts.json } : {}) }));
|
|
866
|
+
});
|
|
867
|
+
cron
|
|
868
|
+
.command("run <jobId>")
|
|
869
|
+
.description("Fire a cron job now (enqueues for the next gateway tick)")
|
|
870
|
+
.option("--due", "only run if the job is past its next-fire time", false)
|
|
871
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
872
|
+
.action(async (jobId, opts) => {
|
|
873
|
+
const { runCronRunCmd } = await import("../commands/cron.js");
|
|
874
|
+
await exitAfterFlush(await runCronRunCmd({
|
|
875
|
+
jobId,
|
|
876
|
+
mode: opts.due ? "due" : "force",
|
|
877
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
878
|
+
}));
|
|
879
|
+
});
|
|
880
|
+
cron
|
|
881
|
+
.command("runs <jobId>")
|
|
882
|
+
.description("Show cron run history (most-recent first)")
|
|
883
|
+
.option("--limit <n>", "max entries (default 50)", (v) => parseInt(v, 10))
|
|
884
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
885
|
+
.action(async (jobId, opts) => {
|
|
886
|
+
const { runCronRuns } = await import("../commands/cron.js");
|
|
887
|
+
await exitAfterFlush(await runCronRuns({
|
|
888
|
+
jobId,
|
|
889
|
+
...(opts.limit !== undefined ? { limit: opts.limit } : {}),
|
|
890
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
891
|
+
}));
|
|
892
|
+
});
|
|
893
|
+
/* ──────────────────────────── agents ──────────────────────────── */
|
|
894
|
+
// CRUD over the isolated-agent surface: each agent has its own workspace,
|
|
895
|
+
// auth profiles, exec allowlist, sessions, and optional channel/account
|
|
896
|
+
// routing bindings. `brigade.json` stores agents as a keyed map under
|
|
897
|
+
// `cfg.agents.<id>` and bindings under `cfg.bindings.entries[]`.
|
|
898
|
+
//
|
|
899
|
+
// Bare `brigade agents` defaults to `list` so a no-arg invocation shows
|
|
900
|
+
// every configured agent (parity with the reference codebase shape).
|
|
901
|
+
// `--bind` is repeatable: Commander collects every occurrence into an
|
|
902
|
+
// array via the collectStrings accumulator below.
|
|
903
|
+
const collectStrings = (value, previous = []) => [...previous, value];
|
|
904
|
+
const agents = program
|
|
905
|
+
.command("agents")
|
|
906
|
+
.description("Manage isolated agents (workspace + auth + routing)")
|
|
907
|
+
.action(async () => {
|
|
908
|
+
const { runAgentsList } = await import("../commands/agents-cmd.js");
|
|
909
|
+
await exitAfterFlush(await runAgentsList({}));
|
|
910
|
+
});
|
|
911
|
+
agents
|
|
912
|
+
.command("list")
|
|
913
|
+
.description("List every configured agent (default subcommand)")
|
|
914
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
915
|
+
.option("--bindings", "include routing bindings per agent", false)
|
|
916
|
+
.action(async (opts) => {
|
|
917
|
+
const { runAgentsList } = await import("../commands/agents-cmd.js");
|
|
918
|
+
await exitAfterFlush(await runAgentsList({ json: opts.json, bindings: opts.bindings }));
|
|
919
|
+
});
|
|
920
|
+
agents
|
|
921
|
+
.command("bindings")
|
|
922
|
+
.description("List routing bindings (optionally filtered by --agent)")
|
|
923
|
+
.option("--agent <id>", "show bindings owned by this agent only")
|
|
924
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
925
|
+
.action(async (opts) => {
|
|
926
|
+
const { runAgentsBindings } = await import("../commands/agents-cmd.js");
|
|
927
|
+
await exitAfterFlush(await runAgentsBindings({
|
|
928
|
+
...(opts.agent !== undefined ? { agent: opts.agent } : {}),
|
|
929
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
930
|
+
}));
|
|
931
|
+
});
|
|
932
|
+
agents
|
|
933
|
+
.command("bind")
|
|
934
|
+
.description("Claim channel/account routing slots for an agent")
|
|
935
|
+
.requiredOption("--agent <id>", "agent id to bind slots to")
|
|
936
|
+
.option("--bind <spec>", 'binding spec — "<channel>" or "<channel>:<accountId>" (repeatable)', collectStrings, [])
|
|
937
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
938
|
+
.action(async (opts) => {
|
|
939
|
+
const { runAgentsBind } = await import("../commands/agents-cmd.js");
|
|
940
|
+
await exitAfterFlush(await runAgentsBind({
|
|
941
|
+
agent: opts.agent,
|
|
942
|
+
bind: opts.bind,
|
|
943
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
944
|
+
}));
|
|
945
|
+
});
|
|
946
|
+
agents
|
|
947
|
+
.command("unbind")
|
|
948
|
+
.description("Release channel/account routing slots from an agent")
|
|
949
|
+
.requiredOption("--agent <id>", "agent id to unbind slots from")
|
|
950
|
+
.option("--bind <spec>", 'binding spec — "<channel>" or "<channel>:<accountId>" (repeatable)', collectStrings, [])
|
|
951
|
+
.option("--all", "remove every binding owned by --agent", false)
|
|
952
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
953
|
+
.action(async (opts) => {
|
|
954
|
+
const { runAgentsUnbind } = await import("../commands/agents-cmd.js");
|
|
955
|
+
await exitAfterFlush(await runAgentsUnbind({
|
|
956
|
+
agent: opts.agent,
|
|
957
|
+
bind: opts.bind,
|
|
958
|
+
...(opts.all !== undefined ? { all: opts.all } : {}),
|
|
959
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
960
|
+
}));
|
|
961
|
+
});
|
|
962
|
+
agents
|
|
963
|
+
.command("add [name]")
|
|
964
|
+
.description("Create a new isolated agent (defaults workspace to ~/.brigade/agents/<id>/workspace/)")
|
|
965
|
+
.option("--workspace <dir>", "workspace directory for this agent (default: ~/.brigade/agents/<id>/workspace/)")
|
|
966
|
+
.option("--model <id>", "default model for this agent")
|
|
967
|
+
.option("--provider <id>", "default provider for this agent")
|
|
968
|
+
.option("--agent-dir <dir>", "override the on-disk agent directory")
|
|
969
|
+
.option("--bind <spec>", 'attach a channel/account binding at create time (repeatable)', collectStrings, [])
|
|
970
|
+
.option("--non-interactive", "explicit flag for the CI/automation path", false)
|
|
971
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
972
|
+
.action(async (name, opts) => {
|
|
973
|
+
const { runAgentsAdd } = await import("../commands/agents-cmd.js");
|
|
974
|
+
await exitAfterFlush(await runAgentsAdd({
|
|
975
|
+
...(name !== undefined ? { name } : {}),
|
|
976
|
+
...(opts.workspace !== undefined ? { workspace: opts.workspace } : {}),
|
|
977
|
+
...(opts.model !== undefined ? { model: opts.model } : {}),
|
|
978
|
+
...(opts.provider !== undefined ? { provider: opts.provider } : {}),
|
|
979
|
+
...(opts.agentDir !== undefined ? { agentDir: opts.agentDir } : {}),
|
|
980
|
+
bind: opts.bind,
|
|
981
|
+
...(opts.nonInteractive !== undefined ? { nonInteractive: opts.nonInteractive } : {}),
|
|
982
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
983
|
+
}));
|
|
984
|
+
});
|
|
985
|
+
agents
|
|
986
|
+
.command("set-identity")
|
|
987
|
+
.description("Set or refresh an agent's identity (name / theme / emoji / avatar)")
|
|
988
|
+
.requiredOption("--agent <id>", "agent id to update")
|
|
989
|
+
.option("--workspace <dir>", "workspace directory whose IDENTITY.md to consult")
|
|
990
|
+
.option("--identity-file <path>", "explicit IDENTITY.md path to read")
|
|
991
|
+
.option("--from-identity", "load identity fields from IDENTITY.md in the workspace", false)
|
|
992
|
+
.option("--name <name>", "display name override")
|
|
993
|
+
.option("--theme <theme>", "theme override")
|
|
994
|
+
.option("--emoji <emoji>", "emoji override")
|
|
995
|
+
.option("--avatar <path>", "avatar path override")
|
|
996
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
997
|
+
.action(async (opts) => {
|
|
998
|
+
const { runAgentsSetIdentity } = await import("../commands/agents-cmd.js");
|
|
999
|
+
await exitAfterFlush(await runAgentsSetIdentity({
|
|
1000
|
+
agent: opts.agent,
|
|
1001
|
+
...(opts.workspace !== undefined ? { workspace: opts.workspace } : {}),
|
|
1002
|
+
...(opts.identityFile !== undefined ? { identityFile: opts.identityFile } : {}),
|
|
1003
|
+
...(opts.fromIdentity !== undefined ? { fromIdentity: opts.fromIdentity } : {}),
|
|
1004
|
+
...(opts.name !== undefined ? { name: opts.name } : {}),
|
|
1005
|
+
...(opts.theme !== undefined ? { theme: opts.theme } : {}),
|
|
1006
|
+
...(opts.emoji !== undefined ? { emoji: opts.emoji } : {}),
|
|
1007
|
+
...(opts.avatar !== undefined ? { avatar: opts.avatar } : {}),
|
|
1008
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
1009
|
+
}));
|
|
1010
|
+
});
|
|
1011
|
+
agents
|
|
1012
|
+
.command("delete <id>")
|
|
1013
|
+
.description("Delete an agent + its workspace/sessions (requires --force)")
|
|
1014
|
+
.option("--force", "skip the safety prompt and actually delete", false)
|
|
1015
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
1016
|
+
.action(async (id, opts) => {
|
|
1017
|
+
const { runAgentsDelete } = await import("../commands/agents-cmd.js");
|
|
1018
|
+
await exitAfterFlush(await runAgentsDelete({
|
|
1019
|
+
id,
|
|
1020
|
+
...(opts.force !== undefined ? { force: opts.force } : {}),
|
|
1021
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
1022
|
+
}));
|
|
1023
|
+
});
|
|
1024
|
+
/* ─────────────────────────────── org ─────────────────────────────── */
|
|
1025
|
+
// Stage C — `brigade org <init|show|explain|doctor>`. ADDITIVE: when
|
|
1026
|
+
// cfg.org is absent these commands either print a friendly "no org"
|
|
1027
|
+
// banner (show/explain/doctor) or seed a starter file (init). The
|
|
1028
|
+
// existing CLI surface is untouched; the four subcommands sit beside
|
|
1029
|
+
// `brigade agents` rather than replacing any field.
|
|
1030
|
+
const org = program
|
|
1031
|
+
.command("org")
|
|
1032
|
+
.description("Manage the optional virtual-office layer (cfg.org). When unset, Brigade behaves exactly as before.");
|
|
1033
|
+
org
|
|
1034
|
+
.command("init")
|
|
1035
|
+
.description("Write a starter cfg.org block + open $EDITOR on brigade.json")
|
|
1036
|
+
.option("--template <id>", "starter template: solo | family | company | custom (default: solo)", "solo")
|
|
1037
|
+
.option("--skip-editor", "do not spawn $EDITOR after writing", false)
|
|
1038
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
1039
|
+
.action(async (opts) => {
|
|
1040
|
+
const { runOrgInit } = await import("../commands/org-cmd.js");
|
|
1041
|
+
await exitAfterFlush(await runOrgInit({
|
|
1042
|
+
template: opts.template,
|
|
1043
|
+
...(opts.skipEditor !== undefined ? { skipEditor: opts.skipEditor } : {}),
|
|
1044
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
1045
|
+
}));
|
|
1046
|
+
});
|
|
1047
|
+
org
|
|
1048
|
+
.command("show")
|
|
1049
|
+
.description("Print an ASCII tree of the current org (cfg.org)")
|
|
1050
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
1051
|
+
.action(async (opts) => {
|
|
1052
|
+
const { runOrgShow } = await import("../commands/org-cmd.js");
|
|
1053
|
+
await exitAfterFlush(await runOrgShow({ ...(opts.json !== undefined ? { json: opts.json } : {}) }));
|
|
1054
|
+
});
|
|
1055
|
+
org
|
|
1056
|
+
.command("explain <from> <to>")
|
|
1057
|
+
.description("Show whether `from` can talk to `to` and why (derivation chain or denial reason)")
|
|
1058
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
1059
|
+
.action(async (from, to, opts) => {
|
|
1060
|
+
const { runOrgExplain } = await import("../commands/org-cmd.js");
|
|
1061
|
+
await exitAfterFlush(await runOrgExplain({ from, to, ...(opts.json !== undefined ? { json: opts.json } : {}) }));
|
|
1062
|
+
});
|
|
1063
|
+
org
|
|
1064
|
+
.command("doctor")
|
|
1065
|
+
.description("Run the org lints (single-member dept, dangling overrides, depth > 5, …)")
|
|
1066
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
1067
|
+
.action(async (opts) => {
|
|
1068
|
+
const { runOrgDoctor } = await import("../commands/org-cmd.js");
|
|
1069
|
+
await exitAfterFlush(await runOrgDoctor({ ...(opts.json !== undefined ? { json: opts.json } : {}) }));
|
|
1070
|
+
});
|
|
1071
|
+
/* ─────────────────────────────── store ─────────────────────────────── */
|
|
1072
|
+
// Phase 2 storage toggle — inspect or flip the mode.sentinel that pins
|
|
1073
|
+
// Brigade to filesystem vs convex. `brigade store mode show` reports the
|
|
1074
|
+
// active mode (and probes the URL on convex mode in `brigade doctor`).
|
|
1075
|
+
// `brigade store mode set <mode>` rewrites the sentinel. Data migration
|
|
1076
|
+
// between modes lands as `brigade store migrate` in a later PR.
|
|
1077
|
+
const store = program
|
|
1078
|
+
.command("store")
|
|
1079
|
+
.description("Inspect or flip Brigade's storage backend (filesystem / convex)");
|
|
1080
|
+
const storeMode = store.command("mode").description("Manage the storage-mode sentinel");
|
|
1081
|
+
storeMode
|
|
1082
|
+
.command("show")
|
|
1083
|
+
.description("Print the active storage mode (and Convex URL if applicable)")
|
|
1084
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
1085
|
+
.action(async (opts) => {
|
|
1086
|
+
const { runStoreModeShow } = await import("../commands/store-cmd.js");
|
|
1087
|
+
await exitAfterFlush(await runStoreModeShow({ ...(opts.json !== undefined ? { json: opts.json } : {}) }));
|
|
1088
|
+
});
|
|
1089
|
+
storeMode
|
|
1090
|
+
.command("set <mode>")
|
|
1091
|
+
.description("Pin the storage mode for this machine.\n" +
|
|
1092
|
+
" Examples:\n" +
|
|
1093
|
+
" brigade store mode set filesystem\n" +
|
|
1094
|
+
" brigade store mode set convex --convex-url http://127.0.0.1:3210")
|
|
1095
|
+
.option("--convex-url <url>", "deployment URL (required when <mode> is convex)")
|
|
1096
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
1097
|
+
.action(async (mode, opts) => {
|
|
1098
|
+
const { runStoreModeSet } = await import("../commands/store-cmd.js");
|
|
1099
|
+
await exitAfterFlush(await runStoreModeSet({
|
|
1100
|
+
mode,
|
|
1101
|
+
...(opts.convexUrl !== undefined ? { convexUrl: opts.convexUrl } : {}),
|
|
1102
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
1103
|
+
}));
|
|
1104
|
+
});
|
|
1105
|
+
store
|
|
1106
|
+
.command("reset")
|
|
1107
|
+
.description("Factory-reset the convex backend: permanently erase every stored record,\n" +
|
|
1108
|
+
"remove the mode pin, and set the encryption key aside so the next onboard\n" +
|
|
1109
|
+
"starts truly fresh. (Wiping ~/.brigade alone RESTORES — this erases.)")
|
|
1110
|
+
.option("--convex-url <url>", "deployment URL (defaults to the pinned sentinel URL)")
|
|
1111
|
+
.option("--yes", "skip the interactive confirmation", false)
|
|
1112
|
+
.option("--purge-local", "also delete the local Brigade folder", false)
|
|
1113
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
1114
|
+
.action(async (opts) => {
|
|
1115
|
+
const { runStoreReset } = await import("../commands/store-cmd.js");
|
|
1116
|
+
await exitAfterFlush(await runStoreReset({
|
|
1117
|
+
...(opts.convexUrl !== undefined ? { convexUrl: opts.convexUrl } : {}),
|
|
1118
|
+
...(opts.yes !== undefined ? { yes: opts.yes } : {}),
|
|
1119
|
+
...(opts.purgeLocal !== undefined ? { purgeLocal: opts.purgeLocal } : {}),
|
|
1120
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
1121
|
+
}));
|
|
1122
|
+
});
|
|
1123
|
+
/* ───────────────────────────── encrypt ───────────────────────────── */
|
|
1124
|
+
// At-rest encryption for Convex byte columns. Operator-supplied master
|
|
1125
|
+
// key via `BRIGADE_ENCRYPTION_KEY` (hex). When unset, payloads pass
|
|
1126
|
+
// through unencrypted; when set, every credential / persona / memory
|
|
1127
|
+
// fact / cron payload / transcript record is sealed before it hits the
|
|
1128
|
+
// backend. See src/storage/encryption.ts.
|
|
1129
|
+
const encrypt = program
|
|
1130
|
+
.command("encrypt")
|
|
1131
|
+
.description("Manage Brigade's at-rest encryption key (AES-256-GCM)");
|
|
1132
|
+
encrypt
|
|
1133
|
+
.command("status")
|
|
1134
|
+
.description("Report whether the encryption key is configured + run a self-check")
|
|
1135
|
+
.option("--json", "emit JSON instead of human text", false)
|
|
1136
|
+
.action(async (opts) => {
|
|
1137
|
+
const { runEncryptStatus } = await import("../commands/encrypt-cmd.js");
|
|
1138
|
+
await exitAfterFlush(await runEncryptStatus(opts));
|
|
1139
|
+
});
|
|
1140
|
+
encrypt
|
|
1141
|
+
.command("init")
|
|
1142
|
+
.description("Generate a fresh 32-byte master key")
|
|
1143
|
+
.option("--json", "emit JSON instead of human text", false)
|
|
1144
|
+
.action(async (opts) => {
|
|
1145
|
+
const { runEncryptInit } = await import("../commands/encrypt-cmd.js");
|
|
1146
|
+
await exitAfterFlush(await runEncryptInit(opts));
|
|
1147
|
+
});
|
|
1148
|
+
encrypt
|
|
1149
|
+
.command("test")
|
|
1150
|
+
.description("Round-trip a sample string through seal/open to verify the key")
|
|
1151
|
+
.option("--json", "emit JSON instead of human text", false)
|
|
1152
|
+
.action(async (opts) => {
|
|
1153
|
+
const { runEncryptTest } = await import("../commands/encrypt-cmd.js");
|
|
1154
|
+
await exitAfterFlush(await runEncryptTest(opts));
|
|
1155
|
+
});
|
|
1156
|
+
store
|
|
1157
|
+
.command("migrate")
|
|
1158
|
+
.description("Copy your Brigade data between storage backends.\n" +
|
|
1159
|
+
" Examples:\n" +
|
|
1160
|
+
" brigade store migrate --to convex --convex-url http://127.0.0.1:3210\n" +
|
|
1161
|
+
" brigade store migrate --to filesystem\n" +
|
|
1162
|
+
" brigade store migrate --to convex --dry-run")
|
|
1163
|
+
.requiredOption("--to <mode>", "destination mode: filesystem | convex")
|
|
1164
|
+
.option("--convex-url <url>", "deployment URL")
|
|
1165
|
+
.option("--dry-run", "report what would be copied without writing", false)
|
|
1166
|
+
.option("--skip-verify", "skip sha256 verification (faster)", false)
|
|
1167
|
+
.option("--keep-source", "after --to convex, keep the local filesystem copy (default: wipe it once the copy is verified)", false)
|
|
1168
|
+
.option("--json", "emit JSON instead of human-readable text", false)
|
|
1169
|
+
.action(async (opts) => {
|
|
1170
|
+
const { runStoreMigrateCmd } = await import("../commands/store-cmd.js");
|
|
1171
|
+
await exitAfterFlush(await runStoreMigrateCmd({
|
|
1172
|
+
to: opts.to,
|
|
1173
|
+
...(opts.convexUrl !== undefined ? { convexUrl: opts.convexUrl } : {}),
|
|
1174
|
+
...(opts.dryRun !== undefined ? { dryRun: opts.dryRun } : {}),
|
|
1175
|
+
...(opts.skipVerify !== undefined ? { skipVerify: opts.skipVerify } : {}),
|
|
1176
|
+
...(opts.keepSource !== undefined ? { keepSource: opts.keepSource } : {}),
|
|
1177
|
+
...(opts.json !== undefined ? { json: opts.json } : {}),
|
|
1178
|
+
}));
|
|
1179
|
+
});
|
|
1180
|
+
// `brigade mcp` — serve this agent's long-term memory as an MCP server over
|
|
1181
|
+
// stdio (add / search / context), owner-bound. Point an MCP client at
|
|
1182
|
+
// `brigade mcp` as the command.
|
|
1183
|
+
program
|
|
1184
|
+
.command("mcp")
|
|
1185
|
+
.description("Serve your long-term memory as an MCP server over stdio (add / search / context).\n" +
|
|
1186
|
+
" Point an MCP client at: brigade mcp")
|
|
1187
|
+
.option("--agent <id>", "agent whose memory to serve (default: main)")
|
|
1188
|
+
.action(async (opts) => {
|
|
1189
|
+
const { runMemoryMcpServerCli } = await import("../commands/mcp-cmd.js");
|
|
1190
|
+
await exitAfterFlush(await runMemoryMcpServerCli({ ...(opts.agent ? { agentId: opts.agent } : {}) }));
|
|
1191
|
+
});
|
|
1192
|
+
return program;
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Translate the flat CLI flag set into a `CronJobCreate`. Returns the
|
|
1196
|
+
* structured object on success, or a string error message that the caller
|
|
1197
|
+
* prints to stderr before exiting non-zero. Validation of the schedule /
|
|
1198
|
+
* payload pairing happens server-side in `assertSupportedJobSpec`; this
|
|
1199
|
+
* helper just owns the flag-shape conversion.
|
|
1200
|
+
*/
|
|
1201
|
+
function buildCronJobCreateFromCliOpts(opts) {
|
|
1202
|
+
// Schedule resolution — exactly one of --at / --every / --cron.
|
|
1203
|
+
const scheduleKindsSpecified = [opts.at, opts.every, opts.cron].filter((v) => v !== undefined).length;
|
|
1204
|
+
if (scheduleKindsSpecified === 0) {
|
|
1205
|
+
return "one of --at, --every, or --cron must be provided";
|
|
1206
|
+
}
|
|
1207
|
+
if (scheduleKindsSpecified > 1) {
|
|
1208
|
+
return "only one of --at, --every, --cron may be provided";
|
|
1209
|
+
}
|
|
1210
|
+
let schedule;
|
|
1211
|
+
if (opts.at !== undefined) {
|
|
1212
|
+
const ms = parseAtSpec(opts.at);
|
|
1213
|
+
if (ms === null)
|
|
1214
|
+
return `invalid --at value: ${opts.at}`;
|
|
1215
|
+
schedule = { kind: "at", at: ms };
|
|
1216
|
+
}
|
|
1217
|
+
else if (opts.every !== undefined) {
|
|
1218
|
+
const ms = parseDurationToMs(opts.every);
|
|
1219
|
+
if (ms === null)
|
|
1220
|
+
return `invalid --every value: ${opts.every}`;
|
|
1221
|
+
schedule = { kind: "every", everyMs: ms };
|
|
1222
|
+
}
|
|
1223
|
+
else {
|
|
1224
|
+
schedule = {
|
|
1225
|
+
kind: "cron",
|
|
1226
|
+
expr: opts.cron,
|
|
1227
|
+
...(opts.tz !== undefined ? { tz: opts.tz } : {}),
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
// Payload resolution — exactly one of --message / --system-event.
|
|
1231
|
+
if ((opts.message === undefined) === (opts.systemEvent === undefined)) {
|
|
1232
|
+
return "exactly one of --message or --system-event must be provided";
|
|
1233
|
+
}
|
|
1234
|
+
let payload;
|
|
1235
|
+
if (opts.systemEvent !== undefined) {
|
|
1236
|
+
payload = { kind: "systemEvent", text: opts.systemEvent };
|
|
1237
|
+
}
|
|
1238
|
+
else {
|
|
1239
|
+
const thinking = (opts.thinking === "off" || opts.thinking === "low" ||
|
|
1240
|
+
opts.thinking === "medium" || opts.thinking === "high") ? opts.thinking : undefined;
|
|
1241
|
+
const toolsAllow = opts.tools
|
|
1242
|
+
? opts.tools.split(",").map((s) => s.trim()).filter((s) => s.length > 0)
|
|
1243
|
+
: undefined;
|
|
1244
|
+
payload = {
|
|
1245
|
+
kind: "agentTurn",
|
|
1246
|
+
message: opts.message,
|
|
1247
|
+
...(opts.model !== undefined ? { model: opts.model } : {}),
|
|
1248
|
+
...(thinking !== undefined ? { thinking } : {}),
|
|
1249
|
+
...(opts.timeoutSeconds !== undefined ? { timeoutSeconds: opts.timeoutSeconds } : {}),
|
|
1250
|
+
...(toolsAllow !== undefined ? { toolsAllow } : {}),
|
|
1251
|
+
...(opts.lightContext === true ? { lightContext: true } : {}),
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
// sessionTarget — explicit override or fall back to the payload-driven default.
|
|
1255
|
+
let sessionTarget;
|
|
1256
|
+
if (opts.target !== undefined) {
|
|
1257
|
+
if (opts.target === "main" || opts.target === "isolated") {
|
|
1258
|
+
sessionTarget = opts.target;
|
|
1259
|
+
}
|
|
1260
|
+
else if (opts.target.startsWith("session:")) {
|
|
1261
|
+
sessionTarget = opts.target;
|
|
1262
|
+
}
|
|
1263
|
+
else {
|
|
1264
|
+
return `invalid --target value: ${opts.target} (expected "main" | "isolated" | "session:<id>")`;
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
else {
|
|
1268
|
+
sessionTarget = payload.kind === "systemEvent" ? "main" : "isolated";
|
|
1269
|
+
}
|
|
1270
|
+
// Optional delivery block — only built when one of the flags was supplied.
|
|
1271
|
+
const hasDeliveryFlag = opts.deliver || opts.channel || opts.to || opts.account || opts.bestEffortDeliver;
|
|
1272
|
+
const delivery = hasDeliveryFlag
|
|
1273
|
+
? {
|
|
1274
|
+
mode: (opts.deliver ? "announce" : "none"),
|
|
1275
|
+
...(opts.channel !== undefined ? { channel: opts.channel } : {}),
|
|
1276
|
+
...(opts.to !== undefined ? { to: opts.to } : {}),
|
|
1277
|
+
...(opts.account !== undefined ? { accountId: opts.account } : {}),
|
|
1278
|
+
...(opts.bestEffortDeliver === true ? { bestEffort: true } : {}),
|
|
1279
|
+
}
|
|
1280
|
+
: undefined;
|
|
1281
|
+
return {
|
|
1282
|
+
name: opts.name,
|
|
1283
|
+
...(opts.description !== undefined ? { description: opts.description } : {}),
|
|
1284
|
+
enabled: opts.disabled !== true,
|
|
1285
|
+
schedule,
|
|
1286
|
+
sessionTarget,
|
|
1287
|
+
payload,
|
|
1288
|
+
...(delivery !== undefined ? { delivery } : {}),
|
|
1289
|
+
};
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* Parse `--at` — accepts ISO 8601 (`2026-06-15T09:00:00Z`) OR raw ms-epoch.
|
|
1293
|
+
* Returns ms-since-epoch, or null on parse failure.
|
|
1294
|
+
*/
|
|
1295
|
+
function parseAtSpec(input) {
|
|
1296
|
+
const trimmed = input.trim();
|
|
1297
|
+
// Try numeric first — operators frequently pipe `date +%s000` or similar.
|
|
1298
|
+
const numeric = Number(trimmed);
|
|
1299
|
+
if (Number.isFinite(numeric) && trimmed.match(/^\d+$/)) {
|
|
1300
|
+
return Math.floor(numeric);
|
|
1301
|
+
}
|
|
1302
|
+
const parsed = Date.parse(trimmed);
|
|
1303
|
+
if (!Number.isFinite(parsed))
|
|
1304
|
+
return null;
|
|
1305
|
+
return parsed;
|
|
1306
|
+
}
|
|
1307
|
+
/** Parse `--every 5m / 1h / 30s / 2w` → ms. Returns null on parse failure. */
|
|
1308
|
+
function parseDurationToMs(input) {
|
|
1309
|
+
const m = input.trim().match(/^(\d+)\s*(s|m|h|d|w)$/i);
|
|
1310
|
+
if (!m)
|
|
1311
|
+
return null;
|
|
1312
|
+
const n = Number(m[1]);
|
|
1313
|
+
const unit = (m[2] ?? "m").toLowerCase();
|
|
1314
|
+
const multiplier = {
|
|
1315
|
+
s: 1_000,
|
|
1316
|
+
m: 60_000,
|
|
1317
|
+
h: 3_600_000,
|
|
1318
|
+
d: 86_400_000,
|
|
1319
|
+
w: 604_800_000,
|
|
1320
|
+
};
|
|
1321
|
+
const mul = multiplier[unit];
|
|
1322
|
+
if (mul === undefined)
|
|
1323
|
+
return null;
|
|
1324
|
+
return n * mul;
|
|
1325
|
+
}
|
|
1326
|
+
//# sourceMappingURL=build-program.js.map
|