@spinabot/brigade 0.1.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +746 -93
- 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 +90 -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 +581 -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 -41
- 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,892 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brigade Pride hierarchy template — the single source of truth for
|
|
3
|
+
* org-chart rendering.
|
|
4
|
+
*
|
|
5
|
+
* Brigade taunt: "Run it like a pride, not a pyramid." The display is
|
|
6
|
+
* deliberately flattened to THREE tiers regardless of how deep the
|
|
7
|
+
* underlying org graph nests:
|
|
8
|
+
*
|
|
9
|
+
* Tier 1 — Higher Office: the `topOrder` agent (exactly 1).
|
|
10
|
+
* Tier 2 — Department leads: direct reports of `topOrder` that are
|
|
11
|
+
* heads of a department (resolved via
|
|
12
|
+
* `cfg.org.departmentHeads` pin, OR computed as the most-
|
|
13
|
+
* senior member of each department — i.e. the member with
|
|
14
|
+
* the shortest manager-chain to `topOrder`, tiebroken
|
|
15
|
+
* alphabetically).
|
|
16
|
+
* Tier 3 — Team: every other member of each department, FLATTENED.
|
|
17
|
+
* Middle managers that sit between a department lead and a
|
|
18
|
+
* leaf agent are HIDDEN by display — the leaf appears
|
|
19
|
+
* directly under its lead. The derived A2A graph is NOT
|
|
20
|
+
* changed; only the chart is collapsed.
|
|
21
|
+
*
|
|
22
|
+
* Callers:
|
|
23
|
+
*
|
|
24
|
+
* - TUI `/org` slash command
|
|
25
|
+
* - Channel handlers (WhatsApp, Slack, Discord — anywhere a
|
|
26
|
+
* monospace code block renders)
|
|
27
|
+
* - Model-facing `org({action:"show"})` tool
|
|
28
|
+
*
|
|
29
|
+
* All three call into the same `renderPrideChart` (or its channel
|
|
30
|
+
* wrapper) so the chart shape can never drift between surfaces.
|
|
31
|
+
*
|
|
32
|
+
* NO breaking changes are introduced to the `/agents` slash command or
|
|
33
|
+
* the `agents_list` tool — they keep their existing flat output. The
|
|
34
|
+
* Pride chart is an ADDITIVE rendering layer.
|
|
35
|
+
*/
|
|
36
|
+
import { Chalk } from "chalk";
|
|
37
|
+
// A dedicated chalk instance with color forced ON, used when callers
|
|
38
|
+
// explicitly opt into ANSI (`ansi: true`). The default exported
|
|
39
|
+
// `chalk` autodetects TTY and disables itself under tests / pipes /
|
|
40
|
+
// non-TTY channels — which would silently drop styling for callers
|
|
41
|
+
// that asked for it. Forcing level=2 (256-color) gives us a stable
|
|
42
|
+
// escape sequence regardless of the runtime.
|
|
43
|
+
const ansiChalk = new Chalk({ level: 2 });
|
|
44
|
+
import { pickFooterRule, pickStory, pickTaunt, } from "./pride-taunts.js";
|
|
45
|
+
// ─── Brigade taunt strings (compat shims for prior callers) ─────────
|
|
46
|
+
/**
|
|
47
|
+
* Legacy single-value constants — kept as compat shims so any caller
|
|
48
|
+
* that imported the literal strings doesn't break. The chart itself
|
|
49
|
+
* now rotates via `pickTaunt()` / `pickFooterRule()` from the bank in
|
|
50
|
+
* `pride-taunts.ts` (145 taunts, 48 footer rules, 142 stories — all
|
|
51
|
+
* M-word-banned, anonymised, internet-researched).
|
|
52
|
+
*
|
|
53
|
+
* Prefer the bank pickers for new code; these literals stay only so
|
|
54
|
+
* older imports don't snap.
|
|
55
|
+
*/
|
|
56
|
+
export const BRIGADE_TAUNT = "Run it like a pride, not a pyramid.";
|
|
57
|
+
export const BRIGADE_FOOTER_RULE = "No managers, just leads and the team.";
|
|
58
|
+
/**
|
|
59
|
+
* Note printed by `/org` when `cfg.org` is absent. Tests pin both the
|
|
60
|
+
* `brigade org init` reference and the `/agents` redirect so neither
|
|
61
|
+
* can be silently dropped.
|
|
62
|
+
*/
|
|
63
|
+
export const PRIDE_CHART_FLAT_CREW_NOTE = [
|
|
64
|
+
"No virtual office is configured yet — your crew is flat.",
|
|
65
|
+
"Run `brigade org init --template company` to scaffold a Pride hierarchy,",
|
|
66
|
+
"or use `/agents` to see the flat roster as-is.",
|
|
67
|
+
].join("\n");
|
|
68
|
+
/**
|
|
69
|
+
* Departments slugs that ARE the Higher Office (executive/leadership).
|
|
70
|
+
* Members in these depts are auto-promoted to the Higher Office band
|
|
71
|
+
* and their dept is suppressed from Tier 2 (it would otherwise
|
|
72
|
+
* double-bill — the executive dept IS Higher Office).
|
|
73
|
+
*/
|
|
74
|
+
const HIGHER_OFFICE_DEPT_SLUGS = new Set([
|
|
75
|
+
"executive",
|
|
76
|
+
"exec",
|
|
77
|
+
"leadership",
|
|
78
|
+
"higher-office",
|
|
79
|
+
"office",
|
|
80
|
+
]);
|
|
81
|
+
/**
|
|
82
|
+
* Role-name regex matching the C-suite. Word-boundary anchored so
|
|
83
|
+
* "Chief of Staff" matches, "Engineering Lead" does NOT, and
|
|
84
|
+
* "President of Sales" matches. Case-insensitive.
|
|
85
|
+
*/
|
|
86
|
+
const C_SUITE_ROLE_RE = /^\s*(chief\b|ceo\b|cfo\b|coo\b|cto\b|cio\b|cmo\b|cso\b|cpo\b|cro\b|chro\b|president\b)/i;
|
|
87
|
+
/**
|
|
88
|
+
* Determine whether a member belongs in the Higher Office tier.
|
|
89
|
+
*
|
|
90
|
+
* Rules (in evaluation order):
|
|
91
|
+
* 1. The graph's `topOrder` is ALWAYS in Higher Office (even if its
|
|
92
|
+
* dept/role doesn't match the rules below — defensive).
|
|
93
|
+
* 2. Department slug is in the executive set
|
|
94
|
+
* (`HIGHER_OFFICE_DEPT_SLUGS`).
|
|
95
|
+
* 3. Role matches the C-suite regex
|
|
96
|
+
* (`Chief X Officer` / `CEO` / `CFO` / `COO` / `CTO` / `CIO`
|
|
97
|
+
* / `CMO` / `CSO` / `CPO` / `CRO` / `CHRO` / `President`).
|
|
98
|
+
*
|
|
99
|
+
* Tests pin: changing this rule changes the chart shape, so the rule
|
|
100
|
+
* is exported for direct unit testing.
|
|
101
|
+
*/
|
|
102
|
+
export function isHigherOfficeMember(id, topOrderId, member) {
|
|
103
|
+
if (id === topOrderId)
|
|
104
|
+
return true;
|
|
105
|
+
if (!member)
|
|
106
|
+
return false;
|
|
107
|
+
const slug = (member.department ?? "").toLowerCase().trim();
|
|
108
|
+
if (HIGHER_OFFICE_DEPT_SLUGS.has(slug))
|
|
109
|
+
return true;
|
|
110
|
+
if (member.role && C_SUITE_ROLE_RE.test(member.role))
|
|
111
|
+
return true;
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Flatten an OrgGraph to the 3-tier Pride shape.
|
|
116
|
+
*
|
|
117
|
+
* Rules (re-stated for clarity):
|
|
118
|
+
* 1. Tier 1 is always exactly `graph.topOrder` (or, defensively, the
|
|
119
|
+
* first member when the topOrder reference is broken).
|
|
120
|
+
* 2. For each department, the lead is resolved by, in order:
|
|
121
|
+
* a. Operator pin (`cfg.org.departmentHeads[slug]`) — but the
|
|
122
|
+
* graph type doesn't carry that pin, so callers that have it
|
|
123
|
+
* should pre-resolve and call `flattenToThreeTiersWithPins`;
|
|
124
|
+
* the bare flatten falls through to (b) when no pin map is
|
|
125
|
+
* supplied. See `flattenToThreeTiers` below — the bare form
|
|
126
|
+
* uses (b) only.
|
|
127
|
+
* b. Most-senior member: shortest manager-chain length to
|
|
128
|
+
* `topOrder`. Tiebroken alphabetically by id.
|
|
129
|
+
* c. If neither (a) nor (b) yield a member, the first
|
|
130
|
+
* alphabetical member of the department is the implicit
|
|
131
|
+
* lead.
|
|
132
|
+
* 3. Every other member of the department is placed in `team`,
|
|
133
|
+
* ALPHABETICAL by id. Middle managers and sub-middle managers
|
|
134
|
+
* collapse — they appear as ordinary team members under the
|
|
135
|
+
* lead.
|
|
136
|
+
* 4. A member whose manager-chain does NOT terminate at `topOrder`
|
|
137
|
+
* (orphaned) is folded into the closest department: walk up the
|
|
138
|
+
* reportsTo chain until an ancestor that IS a department lead is
|
|
139
|
+
* reached, and place the member in that lead's department. If no
|
|
140
|
+
* such ancestor exists, the member's own `member.department`
|
|
141
|
+
* bucket is used. If even that fails, the bucket "unassigned" is
|
|
142
|
+
* synthesised.
|
|
143
|
+
*/
|
|
144
|
+
export function flattenToThreeTiers(graph) {
|
|
145
|
+
return flattenToThreeTiersWithPins(graph, undefined);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Same as `flattenToThreeTiers`, but allows the caller (CLI / TUI /
|
|
149
|
+
* channel) to supply the `cfg.org.departmentHeads` pin map so the
|
|
150
|
+
* lead-resolution rule can honour operator-authored pins.
|
|
151
|
+
*/
|
|
152
|
+
export function flattenToThreeTiersWithPins(graph, departmentHeads) {
|
|
153
|
+
const memberEntries = Object.entries(graph.members);
|
|
154
|
+
// ── Tier 1 — resolve top order. Fall back to first alphabetical
|
|
155
|
+
// member when the graph's `topOrder` reference is broken (defensive;
|
|
156
|
+
// shouldn't happen for a validated graph, but the render path must
|
|
157
|
+
// never crash on a stale read).
|
|
158
|
+
let topOrderId = graph.topOrder;
|
|
159
|
+
if (!graph.members[topOrderId]) {
|
|
160
|
+
const sorted = memberEntries.map(([id]) => id).sort();
|
|
161
|
+
topOrderId = sorted[0] ?? topOrderId;
|
|
162
|
+
}
|
|
163
|
+
const topMember = graph.members[topOrderId];
|
|
164
|
+
const topOrder = topMember
|
|
165
|
+
? {
|
|
166
|
+
id: topOrderId,
|
|
167
|
+
...(topMember.role !== undefined ? { role: topMember.role } : {}),
|
|
168
|
+
...(topMember.bio !== undefined ? { bio: topMember.bio } : {}),
|
|
169
|
+
}
|
|
170
|
+
: { id: topOrderId };
|
|
171
|
+
// Single-member org → no departments, no co-execs to promote.
|
|
172
|
+
if (memberEntries.length <= 1) {
|
|
173
|
+
return { higherOffice: [topOrder], topOrder, departments: [] };
|
|
174
|
+
}
|
|
175
|
+
// ── Tier 1 (multi-member) — promote c-suite to Higher Office.
|
|
176
|
+
// Pre-compute depth-to-topOrder so we can stable-sort co-execs.
|
|
177
|
+
const depth = computeDepthToTopOrder(graph, topOrderId);
|
|
178
|
+
const promotedIds = new Set([topOrderId]);
|
|
179
|
+
for (const [id, m] of memberEntries) {
|
|
180
|
+
if (id === topOrderId)
|
|
181
|
+
continue;
|
|
182
|
+
if (isHigherOfficeMember(id, topOrderId, m)) {
|
|
183
|
+
promotedIds.add(id);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
const coExecIds = [...promotedIds]
|
|
187
|
+
.filter((id) => id !== topOrderId)
|
|
188
|
+
.sort((a, b) => {
|
|
189
|
+
const da = depth[a] ?? Number.POSITIVE_INFINITY;
|
|
190
|
+
const db = depth[b] ?? Number.POSITIVE_INFINITY;
|
|
191
|
+
if (da !== db)
|
|
192
|
+
return da - db;
|
|
193
|
+
return a.localeCompare(b);
|
|
194
|
+
});
|
|
195
|
+
const higherOffice = [
|
|
196
|
+
topOrder,
|
|
197
|
+
...coExecIds.map((id) => toPrideMember(graph, id)),
|
|
198
|
+
];
|
|
199
|
+
// ── Tier 2 + Tier 3 — bucket every NON-PROMOTED member into a
|
|
200
|
+
// department, then resolve the lead. Members already in Higher
|
|
201
|
+
// Office (CEO + c-suite) are excluded so they don't double-bill as
|
|
202
|
+
// department leads (which was the structural middle-manager-render
|
|
203
|
+
// bug that promoted them existed to fix).
|
|
204
|
+
const buckets = {};
|
|
205
|
+
const ensureBucket = (slug) => {
|
|
206
|
+
const existing = buckets[slug];
|
|
207
|
+
if (existing)
|
|
208
|
+
return existing;
|
|
209
|
+
const created = [];
|
|
210
|
+
buckets[slug] = created;
|
|
211
|
+
return created;
|
|
212
|
+
};
|
|
213
|
+
// Seed buckets from the inverse index. Skip (a) promoted members
|
|
214
|
+
// (they're in Higher Office now) and (b) executive-dept slugs
|
|
215
|
+
// themselves (they ARE Higher Office; rendering as Tier 2 would
|
|
216
|
+
// double-bill). Stragglers under exec slugs (a rare config — a
|
|
217
|
+
// non-c-suite member parked in dept=executive) fold into
|
|
218
|
+
// "unassigned" so they still surface somewhere.
|
|
219
|
+
for (const [slug, ids] of Object.entries(graph.departments)) {
|
|
220
|
+
const isExecSlug = HIGHER_OFFICE_DEPT_SLUGS.has(slug.toLowerCase().trim());
|
|
221
|
+
if (isExecSlug) {
|
|
222
|
+
// Re-bucket non-promoted members of an exec slug to "unassigned"
|
|
223
|
+
// — they're orphans of the new tier rule.
|
|
224
|
+
for (const id of ids) {
|
|
225
|
+
if (promotedIds.has(id))
|
|
226
|
+
continue;
|
|
227
|
+
ensureBucket("unassigned").push(id);
|
|
228
|
+
}
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
ensureBucket(slug);
|
|
232
|
+
for (const id of ids) {
|
|
233
|
+
if (promotedIds.has(id))
|
|
234
|
+
continue;
|
|
235
|
+
ensureBucket(slug).push(id);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
// Members whose own department isn't in the inverse index (shouldn't
|
|
239
|
+
// happen, but defensive) are folded into an "unassigned" bucket.
|
|
240
|
+
for (const [id, m] of memberEntries) {
|
|
241
|
+
if (promotedIds.has(id))
|
|
242
|
+
continue;
|
|
243
|
+
const rawSlug = m.department || "unassigned";
|
|
244
|
+
const slug = HIGHER_OFFICE_DEPT_SLUGS.has(rawSlug.toLowerCase().trim())
|
|
245
|
+
? "unassigned"
|
|
246
|
+
: rawSlug;
|
|
247
|
+
const bucket = buckets[slug];
|
|
248
|
+
if (!bucket) {
|
|
249
|
+
ensureBucket(slug).push(id);
|
|
250
|
+
}
|
|
251
|
+
else if (!bucket.includes(id)) {
|
|
252
|
+
bucket.push(id);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
// Sort every bucket alphabetically — the Pride chart is order-stable.
|
|
256
|
+
for (const slug of Object.keys(buckets)) {
|
|
257
|
+
const b = buckets[slug];
|
|
258
|
+
if (b)
|
|
259
|
+
b.sort();
|
|
260
|
+
}
|
|
261
|
+
// Build the dept records.
|
|
262
|
+
const departments = [];
|
|
263
|
+
const slugs = Object.keys(buckets).sort();
|
|
264
|
+
for (const slug of slugs) {
|
|
265
|
+
const ids = buckets[slug] ?? [];
|
|
266
|
+
if (ids.length === 0)
|
|
267
|
+
continue;
|
|
268
|
+
// Resolve the lead.
|
|
269
|
+
let leadId;
|
|
270
|
+
// (a) Operator pin.
|
|
271
|
+
const pinned = departmentHeads?.[slug];
|
|
272
|
+
if (pinned && ids.includes(pinned)) {
|
|
273
|
+
leadId = pinned;
|
|
274
|
+
}
|
|
275
|
+
// (b) Most-senior member: minimum depth-to-topOrder, tiebroken
|
|
276
|
+
// alphabetically (ids are already sorted, so the linear scan picks
|
|
277
|
+
// the alphabetical winner on a tie).
|
|
278
|
+
if (!leadId) {
|
|
279
|
+
let bestDepth = Number.POSITIVE_INFINITY;
|
|
280
|
+
for (const id of ids) {
|
|
281
|
+
const d = depth[id] ?? Number.POSITIVE_INFINITY;
|
|
282
|
+
if (d < bestDepth) {
|
|
283
|
+
bestDepth = d;
|
|
284
|
+
leadId = id;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
// (c) Fallback: first alphabetical member.
|
|
289
|
+
if (!leadId)
|
|
290
|
+
leadId = ids[0];
|
|
291
|
+
if (!leadId)
|
|
292
|
+
continue;
|
|
293
|
+
const teamIds = ids.filter((id) => id !== leadId);
|
|
294
|
+
departments.push({
|
|
295
|
+
slug,
|
|
296
|
+
lead: toPrideMember(graph, leadId),
|
|
297
|
+
team: teamIds.map((id) => toPrideMember(graph, id)),
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
return { higherOffice, topOrder, departments };
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Render the Pride chart as a single string. Default opts are
|
|
304
|
+
* `{ emoji: true, ansi: true }`.
|
|
305
|
+
*/
|
|
306
|
+
export function renderPrideChart(graph, opts = {}) {
|
|
307
|
+
return renderPrideChartWithPins(graph, undefined, opts);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Render variant that accepts the operator pin map. Use this from the
|
|
311
|
+
* TUI / CLI / channel layer where `cfg.org.departmentHeads` is
|
|
312
|
+
* already in scope.
|
|
313
|
+
*/
|
|
314
|
+
export function renderPrideChartWithPins(graph, departmentHeads, opts = {}) {
|
|
315
|
+
const emoji = opts.emoji ?? true;
|
|
316
|
+
const ansi = opts.ansi ?? true;
|
|
317
|
+
const crewName = (opts.crewName ?? "").trim();
|
|
318
|
+
// Bank pickers rotate per-call. Default RNG is live; tests pin via
|
|
319
|
+
// `createSeededRng(seed)`. One `rng` reference is reused for taunt,
|
|
320
|
+
// footer-rule, story selection AND the story-inclusion coin-flip so
|
|
321
|
+
// the same seed yields the same chart deterministically.
|
|
322
|
+
const rng = opts.rng ?? Math.random;
|
|
323
|
+
const storyMode = opts.story ?? "auto";
|
|
324
|
+
const flat = flattenToThreeTiersWithPins(graph, departmentHeads);
|
|
325
|
+
const tokens = pickTokens(emoji);
|
|
326
|
+
const paint = makePainter(ansi);
|
|
327
|
+
const lines = [];
|
|
328
|
+
// ── Header ──────────────────────────────────────────────────────
|
|
329
|
+
const headerLabel = "The Pride";
|
|
330
|
+
const headerCrew = crewName ? ` · ${crewName}` : "";
|
|
331
|
+
lines.push(` ${paint.lion(tokens.lion)} ${paint.heading(headerLabel)}${headerCrew}`);
|
|
332
|
+
lines.push(` ${paint.taunt(pickTaunt(rng))}`);
|
|
333
|
+
lines.push("");
|
|
334
|
+
// ── Higher Office ──────────────────────────────────────────────
|
|
335
|
+
// Renders every Higher Office member, not just topOrder. Index 0
|
|
336
|
+
// (topOrder) keeps the 👑 glyph; co-execs get the smaller ✦
|
|
337
|
+
// marker. The Pride policy still holds (no middle managers) — c-suite
|
|
338
|
+
// members appear here BECAUSE they're peers of the top, not below.
|
|
339
|
+
lines.push(` ${paint.bar(SECTION_BAR)}${paint.section("Higher Office")}`);
|
|
340
|
+
flat.higherOffice.forEach((member, idx) => {
|
|
341
|
+
const glyph = idx === 0 ? tokens.crown : tokens.coExec;
|
|
342
|
+
lines.push(` ${paint.crown(glyph)} ${paint.id(member.id)}${member.role ? ` · ${paint.role(member.role)}` : ""}`);
|
|
343
|
+
if (member.bio) {
|
|
344
|
+
lines.push(` ${paint.bio(member.bio)}`);
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
lines.push("");
|
|
348
|
+
// ── Departments ─────────────────────────────────────────────────
|
|
349
|
+
if (flat.departments.length > 0) {
|
|
350
|
+
lines.push(` ${paint.bar(SECTION_BAR)}${paint.section("Departments")}`);
|
|
351
|
+
lines.push("");
|
|
352
|
+
for (const dept of flat.departments) {
|
|
353
|
+
lines.push(` ${paint.dept(tokens.dept)} ${paint.deptSlug(dept.slug)}`);
|
|
354
|
+
lines.push(` Lead: ${paint.id(dept.lead.id)}${dept.lead.role ? ` · ${paint.role(dept.lead.role)}` : ""}`);
|
|
355
|
+
if (dept.team.length > 0) {
|
|
356
|
+
lines.push(` Team:`);
|
|
357
|
+
for (const member of dept.team) {
|
|
358
|
+
lines.push(` · ${paint.id(member.id)}${member.role ? ` · ${paint.role(member.role)}` : ""}`);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
lines.push("");
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
// ── Footer ──────────────────────────────────────────────────────
|
|
365
|
+
lines.push(` ${paint.rule("──")}`);
|
|
366
|
+
lines.push(` ${paint.bolt(tokens.bolt)} ${paint.footer(pickFooterRule(rng))}`);
|
|
367
|
+
// ── Story (optional) ────────────────────────────────────────────
|
|
368
|
+
// `auto`: 50% chance of including a story, gated by rng().
|
|
369
|
+
// `always`: include unconditionally.
|
|
370
|
+
// `never`: skip the story footer entirely.
|
|
371
|
+
// Drawing the gate AFTER the taunt + footer picks so seeded tests
|
|
372
|
+
// get a stable include/skip decision per seed.
|
|
373
|
+
const includeStory = storyMode === "always" ||
|
|
374
|
+
(storyMode === "auto" && rng() < 0.5);
|
|
375
|
+
if (includeStory) {
|
|
376
|
+
const story = pickStory(rng);
|
|
377
|
+
lines.push("");
|
|
378
|
+
lines.push(` ${paint.bookmark(emoji ? "📖" : ">")} ${paint.storyHead(`${story.name} · ${story.role}`)}`);
|
|
379
|
+
// Story body indented under the headline. Wraps naturally at the
|
|
380
|
+
// 240-char cap that pride-taunts enforces, so we don't need to
|
|
381
|
+
// soft-wrap here.
|
|
382
|
+
lines.push(` ${paint.story(story.story)}`);
|
|
383
|
+
}
|
|
384
|
+
return lines.join("\n");
|
|
385
|
+
}
|
|
386
|
+
// ─── Tree render (org-chart style with connector glyphs) ───────────
|
|
387
|
+
/**
|
|
388
|
+
* Render the Pride chart as a TREE with branch connectors (`├──`, `└──`,
|
|
389
|
+
* vertical-line continuation). Same data + same taunt/footer/story bank
|
|
390
|
+
* as `renderPrideChart`, but a more visual layout suited to wide
|
|
391
|
+
* monospace terminals (TUI default). Channels keep the tight list form
|
|
392
|
+
* because tree connectors look noisy on narrow mobile screens.
|
|
393
|
+
*
|
|
394
|
+
* Layout:
|
|
395
|
+
*
|
|
396
|
+
* 🦁 The Pride
|
|
397
|
+
* <taunt>
|
|
398
|
+
*
|
|
399
|
+
* 👑 alex · Chief Executive Officer
|
|
400
|
+
* │
|
|
401
|
+
* ├── 🏛 engineering · priya · Engineering Lead
|
|
402
|
+
* │ ├── keshav · Inventory Specialist
|
|
403
|
+
* │ └── jordan · Senior Engineer
|
|
404
|
+
* │
|
|
405
|
+
* ├── 🏛 ops · rex · Operations Lead
|
|
406
|
+
* │ └── zen · Logistics
|
|
407
|
+
* │
|
|
408
|
+
* └── 🏛 strategy · demand-planner · Strategy Lead
|
|
409
|
+
*
|
|
410
|
+
* ──
|
|
411
|
+
* ⚡ <footer rule>
|
|
412
|
+
*
|
|
413
|
+
* 📖 <name> · <role> (optional, 50% gated)
|
|
414
|
+
* <story>
|
|
415
|
+
*
|
|
416
|
+
* ASCII fallback (emoji:false) swaps connectors to `|--` / `'--` / `|`
|
|
417
|
+
* for terminals that don't render box-drawing chars.
|
|
418
|
+
*/
|
|
419
|
+
export function renderPrideTree(graph, opts = {}) {
|
|
420
|
+
return renderPrideTreeWithPins(graph, undefined, opts);
|
|
421
|
+
}
|
|
422
|
+
export function renderPrideTreeWithPins(graph, departmentHeads, opts = {}) {
|
|
423
|
+
const emoji = opts.emoji ?? true;
|
|
424
|
+
const ansi = opts.ansi ?? true;
|
|
425
|
+
const crewName = (opts.crewName ?? "").trim();
|
|
426
|
+
const rng = opts.rng ?? Math.random;
|
|
427
|
+
const storyMode = opts.story ?? "auto";
|
|
428
|
+
const flat = flattenToThreeTiersWithPins(graph, departmentHeads);
|
|
429
|
+
const tokens = pickTokens(emoji);
|
|
430
|
+
const paint = makePainter(ansi);
|
|
431
|
+
const connectors = pickConnectors(emoji);
|
|
432
|
+
const lines = [];
|
|
433
|
+
// ── Header ──────────────────────────────────────────────────────
|
|
434
|
+
const headerLabel = "The Pride";
|
|
435
|
+
const headerCrew = crewName ? ` · ${crewName}` : "";
|
|
436
|
+
lines.push(` ${paint.lion(tokens.lion)} ${paint.heading(headerLabel)}${headerCrew}`);
|
|
437
|
+
lines.push(` ${paint.taunt(pickTaunt(rng))}`);
|
|
438
|
+
lines.push("");
|
|
439
|
+
// ── Higher Office (Tier 1) ──────────────────────────────────────
|
|
440
|
+
// Top-of-org first with 👑, then any c-suite co-execs (CFO/COO/etc.)
|
|
441
|
+
// as sibling lines with the ✦ marker. Pride policy is reinforced:
|
|
442
|
+
// c-suite members are PEERS of the top, not middle managers of a
|
|
443
|
+
// dept they happened to be tagged with.
|
|
444
|
+
flat.higherOffice.forEach((member, idx) => {
|
|
445
|
+
const glyph = idx === 0 ? tokens.crown : tokens.coExec;
|
|
446
|
+
lines.push(` ${paint.crown(glyph)} ${paint.id(member.id)}${member.role ? ` · ${paint.role(member.role)}` : ""}`);
|
|
447
|
+
});
|
|
448
|
+
// Vertical drop-down to the first department branch, only when
|
|
449
|
+
// there ARE departments below.
|
|
450
|
+
if (flat.departments.length > 0) {
|
|
451
|
+
lines.push(` ${paint.tree(connectors.vertical)}`);
|
|
452
|
+
}
|
|
453
|
+
// ── Departments + their team members ────────────────────────────
|
|
454
|
+
flat.departments.forEach((dept, deptIdx) => {
|
|
455
|
+
const isLastDept = deptIdx === flat.departments.length - 1;
|
|
456
|
+
const deptBranch = isLastDept ? connectors.lastBranch : connectors.branch;
|
|
457
|
+
// Children indent: empty 4-char slot under last branch, `│ ` under
|
|
458
|
+
// non-last so the vertical line continues alongside the dept's team.
|
|
459
|
+
const childPrefix = isLastDept ? connectors.lastIndent : connectors.indent;
|
|
460
|
+
const deptHeader = ` ${paint.tree(deptBranch)} ${paint.dept(tokens.dept)} ${paint.deptSlug(dept.slug)}` +
|
|
461
|
+
` · ${paint.id(dept.lead.id)}` +
|
|
462
|
+
(dept.lead.role ? ` · ${paint.role(dept.lead.role)}` : "");
|
|
463
|
+
lines.push(deptHeader);
|
|
464
|
+
// Team members under the lead, with their own ├── / └── connectors.
|
|
465
|
+
dept.team.forEach((member, memberIdx) => {
|
|
466
|
+
const isLastMember = memberIdx === dept.team.length - 1;
|
|
467
|
+
const memberBranch = isLastMember ? connectors.lastBranch : connectors.branch;
|
|
468
|
+
lines.push(` ${paint.tree(childPrefix)}${paint.tree(memberBranch)} ${paint.id(member.id)}${member.role ? ` · ${paint.role(member.role)}` : ""}`);
|
|
469
|
+
});
|
|
470
|
+
// Blank-line separator between departments — except after the last
|
|
471
|
+
// dept (the `──` footer follows).
|
|
472
|
+
if (!isLastDept) {
|
|
473
|
+
lines.push(` ${paint.tree(connectors.continuation)}`);
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
// ── Footer ──────────────────────────────────────────────────────
|
|
477
|
+
lines.push("");
|
|
478
|
+
lines.push(` ${paint.rule("──")}`);
|
|
479
|
+
lines.push(` ${paint.bolt(tokens.bolt)} ${paint.footer(pickFooterRule(rng))}`);
|
|
480
|
+
// ── Story (optional) ────────────────────────────────────────────
|
|
481
|
+
const includeStory = storyMode === "always" || (storyMode === "auto" && rng() < 0.5);
|
|
482
|
+
if (includeStory) {
|
|
483
|
+
const story = pickStory(rng);
|
|
484
|
+
lines.push("");
|
|
485
|
+
lines.push(` ${paint.bookmark(emoji ? "📖" : ">")} ${paint.storyHead(`${story.name} · ${story.role}`)}`);
|
|
486
|
+
lines.push(` ${paint.story(story.story)}`);
|
|
487
|
+
}
|
|
488
|
+
return lines.join("\n");
|
|
489
|
+
}
|
|
490
|
+
function pickConnectors(emoji) {
|
|
491
|
+
if (emoji) {
|
|
492
|
+
return {
|
|
493
|
+
vertical: "│",
|
|
494
|
+
branch: "├──",
|
|
495
|
+
lastBranch: "└──",
|
|
496
|
+
indent: "│ ",
|
|
497
|
+
lastIndent: " ",
|
|
498
|
+
continuation: "│",
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
return {
|
|
502
|
+
vertical: "|",
|
|
503
|
+
branch: "|--",
|
|
504
|
+
lastBranch: "'--",
|
|
505
|
+
indent: "| ",
|
|
506
|
+
lastIndent: " ",
|
|
507
|
+
continuation: "|",
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
// ─── Columnar render (horizontal org-chart with boxes + spine) ──────
|
|
511
|
+
/**
|
|
512
|
+
* Render the Pride chart as a HORIZONTAL org-chart with boxes and a
|
|
513
|
+
* branching spine — the "real org chart" look from common BI tools.
|
|
514
|
+
* Top-of-org sits centered above the spine; department leads sit in a
|
|
515
|
+
* row below; team members listed as bullets under each lead.
|
|
516
|
+
*
|
|
517
|
+
* 🦁 The Pride
|
|
518
|
+
* <taunt>
|
|
519
|
+
*
|
|
520
|
+
* ┌─────────────────────┐
|
|
521
|
+
* │ 👑 alex │
|
|
522
|
+
* │ Chief of Staff │
|
|
523
|
+
* └──────────┬──────────┘
|
|
524
|
+
* │
|
|
525
|
+
* ┌────────────────┼────────────────┐
|
|
526
|
+
* │ │ │
|
|
527
|
+
* ┌────────┴────────┐ ┌─────┴───────────┐ ┌──┴──────────────┐
|
|
528
|
+
* │ 🏛 eng │ │ 🏛 ops │ │ 🏛 strat │
|
|
529
|
+
* │ priya │ │ rex │ │ planner │
|
|
530
|
+
* │ Eng Lead │ │ Ops Lead │ │ Strat Lead │
|
|
531
|
+
* └─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
532
|
+
* • keshav • zen (no team)
|
|
533
|
+
* Inv Specialist Logistics
|
|
534
|
+
* • jordan
|
|
535
|
+
* QA
|
|
536
|
+
*
|
|
537
|
+
* ──
|
|
538
|
+
* ⚡ <footer rule>
|
|
539
|
+
*
|
|
540
|
+
* Uses box-drawing glyphs (┌─┐│└─┘├┤┬┴┼) with emoji enabled, falls
|
|
541
|
+
* back to ASCII (+ - |) otherwise. Same 3-tier flatten, same taunt +
|
|
542
|
+
* footer bank as `renderPrideChart` / `renderPrideTree`.
|
|
543
|
+
*
|
|
544
|
+
* Width: ~57 chars for 3 departments at COL_WIDTH=17, fits in standard
|
|
545
|
+
* 80-col terminals. For >4 departments the horizontal layout starts to
|
|
546
|
+
* exceed common widths; callers should prefer `renderPrideTree` (vertical)
|
|
547
|
+
* or `renderPrideChart` (list) when `process.stdout.columns < width`.
|
|
548
|
+
*/
|
|
549
|
+
export function renderPrideColumns(graph, opts = {}) {
|
|
550
|
+
return renderPrideColumnsWithPins(graph, undefined, opts);
|
|
551
|
+
}
|
|
552
|
+
export function renderPrideColumnsWithPins(graph, departmentHeads, opts = {}) {
|
|
553
|
+
const emoji = opts.emoji ?? true;
|
|
554
|
+
const ansi = opts.ansi ?? true;
|
|
555
|
+
const crewName = (opts.crewName ?? "").trim();
|
|
556
|
+
const rng = opts.rng ?? Math.random;
|
|
557
|
+
const storyMode = opts.story ?? "auto";
|
|
558
|
+
const flat = flattenToThreeTiersWithPins(graph, departmentHeads);
|
|
559
|
+
const tokens = pickTokens(emoji);
|
|
560
|
+
const paint = makePainter(ansi);
|
|
561
|
+
const bx = pickBoxChars(emoji);
|
|
562
|
+
// Layout geometry — deterministic. Fits 3 depts in ~57 cols.
|
|
563
|
+
const COL_WIDTH = 17;
|
|
564
|
+
const GUTTER = 3;
|
|
565
|
+
const N = flat.departments.length;
|
|
566
|
+
const totalWidth = N === 0 ? COL_WIDTH : N * COL_WIDTH + (N - 1) * GUTTER;
|
|
567
|
+
const topBoxWidth = Math.min(totalWidth, COL_WIDTH + 4);
|
|
568
|
+
const topPad = Math.max(0, Math.floor((totalWidth - topBoxWidth) / 2));
|
|
569
|
+
const topBoxCenterX = topPad + Math.floor(topBoxWidth / 2);
|
|
570
|
+
const colCenters = [];
|
|
571
|
+
for (let i = 0; i < N; i++) {
|
|
572
|
+
colCenters.push(i * (COL_WIDTH + GUTTER) + Math.floor(COL_WIDTH / 2));
|
|
573
|
+
}
|
|
574
|
+
const lines = [];
|
|
575
|
+
// Header
|
|
576
|
+
const headerLabel = "The Pride";
|
|
577
|
+
const headerCrew = crewName ? ` · ${crewName}` : "";
|
|
578
|
+
lines.push(centerInWidth(`${tokens.lion} ${headerLabel}${headerCrew}`, totalWidth, paint.lion));
|
|
579
|
+
lines.push(centerInWidth(pickTaunt(rng), totalWidth, paint.taunt));
|
|
580
|
+
lines.push("");
|
|
581
|
+
// Top-of-org box. Now houses the entire Higher Office band: CEO
|
|
582
|
+
// first with 👑, then any c-suite co-execs (CFO/COO/etc.) on
|
|
583
|
+
// their own line with the ✦ marker. The box grows taller as the
|
|
584
|
+
// org adds c-suite members; spine drop still anchors to the
|
|
585
|
+
// bottom-center so dept connections stay aligned.
|
|
586
|
+
const topInner = [
|
|
587
|
+
`${tokens.crown} ${flat.topOrder.id}`,
|
|
588
|
+
flat.topOrder.role ?? "",
|
|
589
|
+
];
|
|
590
|
+
for (let i = 1; i < flat.higherOffice.length; i++) {
|
|
591
|
+
const ce = flat.higherOffice[i];
|
|
592
|
+
if (!ce)
|
|
593
|
+
continue;
|
|
594
|
+
topInner.push(`${tokens.coExec} ${ce.id}${ce.role ? ` · ${ce.role}` : ""}`);
|
|
595
|
+
}
|
|
596
|
+
const topBox = renderBoxLines(topInner, topBoxWidth, bx, paint, {
|
|
597
|
+
bottomCenterChar: N > 0 ? bx.t : undefined,
|
|
598
|
+
});
|
|
599
|
+
for (const ln of topBox) {
|
|
600
|
+
lines.push(" ".repeat(topPad) + ln);
|
|
601
|
+
}
|
|
602
|
+
if (N > 0) {
|
|
603
|
+
// Vertical drop from top-box bottom into the spine row
|
|
604
|
+
lines.push(" ".repeat(topBoxCenterX) + paint.tree(bx.v));
|
|
605
|
+
// Horizontal spine: ┌─┬──...──┬─┐ with ┼ where top-drop meets a dept center
|
|
606
|
+
lines.push(buildSpineLine(colCenters, topBoxCenterX, totalWidth, bx, paint));
|
|
607
|
+
// Drops from spine to each dept-box top
|
|
608
|
+
const drops = [];
|
|
609
|
+
let lastEnd = 0;
|
|
610
|
+
for (const x of colCenters) {
|
|
611
|
+
drops.push(" ".repeat(x - lastEnd));
|
|
612
|
+
drops.push(paint.tree(bx.v));
|
|
613
|
+
lastEnd = x + 1;
|
|
614
|
+
}
|
|
615
|
+
lines.push(drops.join(""));
|
|
616
|
+
// Dept boxes side by side. Top edge of each box gets a ┴ where the drop
|
|
617
|
+
// lands, so the spine + box connect cleanly.
|
|
618
|
+
const deptBoxes = flat.departments.map((d) => renderBoxLines([
|
|
619
|
+
`${tokens.dept} ${d.slug}`,
|
|
620
|
+
d.lead.id,
|
|
621
|
+
d.lead.role ?? "",
|
|
622
|
+
], COL_WIDTH, bx, paint, { topCenterChar: bx.bottomT }));
|
|
623
|
+
const boxHeight = deptBoxes[0]?.length ?? 0;
|
|
624
|
+
for (let row = 0; row < boxHeight; row++) {
|
|
625
|
+
const parts = [];
|
|
626
|
+
for (let i = 0; i < N; i++) {
|
|
627
|
+
if (i > 0)
|
|
628
|
+
parts.push(" ".repeat(GUTTER));
|
|
629
|
+
const box = deptBoxes[i];
|
|
630
|
+
parts.push(box?.[row] ?? "");
|
|
631
|
+
}
|
|
632
|
+
lines.push(parts.join(""));
|
|
633
|
+
}
|
|
634
|
+
// Team members under each column. Two visual lines per member: bullet+id
|
|
635
|
+
// then a faint role line indented two more. Columns with no team show
|
|
636
|
+
// "(no team)" once on row 0; columns shorter than maxTeam pad with blanks.
|
|
637
|
+
const maxTeam = Math.max(0, ...flat.departments.map((d) => d.team.length));
|
|
638
|
+
for (let row = 0; row < maxTeam; row++) {
|
|
639
|
+
const bulletParts = [];
|
|
640
|
+
const roleParts = [];
|
|
641
|
+
let anyRoleThisRow = false;
|
|
642
|
+
for (let i = 0; i < N; i++) {
|
|
643
|
+
if (i > 0) {
|
|
644
|
+
bulletParts.push(" ".repeat(GUTTER));
|
|
645
|
+
roleParts.push(" ".repeat(GUTTER));
|
|
646
|
+
}
|
|
647
|
+
const dept = flat.departments[i];
|
|
648
|
+
const m = dept?.team[row];
|
|
649
|
+
if (m) {
|
|
650
|
+
bulletParts.push(padRight(` • ${m.id}`, COL_WIDTH));
|
|
651
|
+
if (m.role) {
|
|
652
|
+
roleParts.push(padRight(` ${m.role}`, COL_WIDTH));
|
|
653
|
+
anyRoleThisRow = true;
|
|
654
|
+
}
|
|
655
|
+
else {
|
|
656
|
+
roleParts.push(" ".repeat(COL_WIDTH));
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
else if (row === 0 && dept && dept.team.length === 0) {
|
|
660
|
+
bulletParts.push(padRight(" (no team)", COL_WIDTH));
|
|
661
|
+
roleParts.push(" ".repeat(COL_WIDTH));
|
|
662
|
+
}
|
|
663
|
+
else {
|
|
664
|
+
bulletParts.push(" ".repeat(COL_WIDTH));
|
|
665
|
+
roleParts.push(" ".repeat(COL_WIDTH));
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
lines.push(bulletParts.join(""));
|
|
669
|
+
if (anyRoleThisRow)
|
|
670
|
+
lines.push(roleParts.join(""));
|
|
671
|
+
}
|
|
672
|
+
// Edge: every dept empty AND maxTeam=0 → render a single "(no team)"
|
|
673
|
+
// row so the operator sees that explicitly rather than a blank gap.
|
|
674
|
+
if (maxTeam === 0 && N > 0) {
|
|
675
|
+
const parts = [];
|
|
676
|
+
for (let i = 0; i < N; i++) {
|
|
677
|
+
if (i > 0)
|
|
678
|
+
parts.push(" ".repeat(GUTTER));
|
|
679
|
+
parts.push(padRight(" (no team)", COL_WIDTH));
|
|
680
|
+
}
|
|
681
|
+
lines.push(parts.join(""));
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
// Footer
|
|
685
|
+
lines.push("");
|
|
686
|
+
lines.push(` ${paint.rule("──")}`);
|
|
687
|
+
lines.push(` ${paint.bolt(tokens.bolt)} ${paint.footer(pickFooterRule(rng))}`);
|
|
688
|
+
// Optional story
|
|
689
|
+
const includeStory = storyMode === "always" || (storyMode === "auto" && rng() < 0.5);
|
|
690
|
+
if (includeStory) {
|
|
691
|
+
const story = pickStory(rng);
|
|
692
|
+
lines.push("");
|
|
693
|
+
lines.push(` ${paint.bookmark(emoji ? "📖" : ">")} ${paint.storyHead(`${story.name} · ${story.role}`)}`);
|
|
694
|
+
lines.push(` ${paint.story(story.story)}`);
|
|
695
|
+
}
|
|
696
|
+
return lines.join("\n");
|
|
697
|
+
}
|
|
698
|
+
function pickBoxChars(emoji) {
|
|
699
|
+
if (emoji) {
|
|
700
|
+
return {
|
|
701
|
+
tl: "┌", tr: "┐", bl: "└", br: "┘",
|
|
702
|
+
h: "─", v: "│",
|
|
703
|
+
t: "┬", bottomT: "┴", leftT: "├", rightT: "┤",
|
|
704
|
+
cross: "┼",
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
return {
|
|
708
|
+
tl: "+", tr: "+", bl: "+", br: "+",
|
|
709
|
+
h: "-", v: "|",
|
|
710
|
+
t: "+", bottomT: "+", leftT: "+", rightT: "+",
|
|
711
|
+
cross: "+",
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
function renderBoxLines(innerLines, width, bx, paint, opts = {}) {
|
|
715
|
+
const innerWidth = Math.max(0, width - 2);
|
|
716
|
+
const centerIdx = Math.floor(width / 2);
|
|
717
|
+
const lines = [];
|
|
718
|
+
const topEdge = bx.tl + bx.h.repeat(innerWidth) + bx.tr;
|
|
719
|
+
const topRendered = opts.topCenterChar && centerIdx > 0 && centerIdx < width - 1
|
|
720
|
+
? topEdge.slice(0, centerIdx) + opts.topCenterChar + topEdge.slice(centerIdx + 1)
|
|
721
|
+
: topEdge;
|
|
722
|
+
lines.push(paint.tree(topRendered));
|
|
723
|
+
for (const ln of innerLines) {
|
|
724
|
+
const visible = ln.length <= innerWidth ? ln : ln.slice(0, innerWidth);
|
|
725
|
+
const padded = visible + " ".repeat(Math.max(0, innerWidth - visible.length));
|
|
726
|
+
lines.push(paint.tree(bx.v) + padded + paint.tree(bx.v));
|
|
727
|
+
}
|
|
728
|
+
const botEdge = bx.bl + bx.h.repeat(innerWidth) + bx.br;
|
|
729
|
+
const botRendered = opts.bottomCenterChar && centerIdx > 0 && centerIdx < width - 1
|
|
730
|
+
? botEdge.slice(0, centerIdx) + opts.bottomCenterChar + botEdge.slice(centerIdx + 1)
|
|
731
|
+
: botEdge;
|
|
732
|
+
lines.push(paint.tree(botRendered));
|
|
733
|
+
return lines;
|
|
734
|
+
}
|
|
735
|
+
function buildSpineLine(colCenters, topX, totalWidth, bx, paint) {
|
|
736
|
+
if (colCenters.length === 0)
|
|
737
|
+
return "";
|
|
738
|
+
const minX = colCenters[0];
|
|
739
|
+
const maxX = colCenters[colCenters.length - 1];
|
|
740
|
+
if (colCenters.length === 1) {
|
|
741
|
+
const arr = new Array(totalWidth).fill(" ");
|
|
742
|
+
arr[minX] = bx.bottomT;
|
|
743
|
+
return paint.tree(arr.join(""));
|
|
744
|
+
}
|
|
745
|
+
const chars = new Array(totalWidth).fill(" ");
|
|
746
|
+
for (let x = minX; x <= maxX; x++)
|
|
747
|
+
chars[x] = bx.h;
|
|
748
|
+
chars[minX] = bx.tl;
|
|
749
|
+
chars[maxX] = bx.tr;
|
|
750
|
+
for (let i = 1; i < colCenters.length - 1; i++) {
|
|
751
|
+
chars[colCenters[i]] = bx.t;
|
|
752
|
+
}
|
|
753
|
+
if (topX > minX && topX < maxX) {
|
|
754
|
+
chars[topX] = colCenters.includes(topX) ? bx.cross : bx.bottomT;
|
|
755
|
+
}
|
|
756
|
+
else if (topX === minX) {
|
|
757
|
+
chars[minX] = bx.leftT;
|
|
758
|
+
}
|
|
759
|
+
else if (topX === maxX) {
|
|
760
|
+
chars[maxX] = bx.rightT;
|
|
761
|
+
}
|
|
762
|
+
return paint.tree(chars.join(""));
|
|
763
|
+
}
|
|
764
|
+
function centerInWidth(text, width, paint) {
|
|
765
|
+
const len = text.length;
|
|
766
|
+
if (len >= width)
|
|
767
|
+
return paint(text);
|
|
768
|
+
const left = Math.floor((width - len) / 2);
|
|
769
|
+
return " ".repeat(left) + paint(text);
|
|
770
|
+
}
|
|
771
|
+
function padRight(s, width) {
|
|
772
|
+
if (s.length >= width)
|
|
773
|
+
return s.slice(0, width);
|
|
774
|
+
return s + " ".repeat(width - s.length);
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* Channel-safe variant: forces `emoji: true, ansi: false` and wraps
|
|
778
|
+
* the output in a triple-backtick monospace code block. WhatsApp,
|
|
779
|
+
* Slack, and Discord all render this as a monospace block.
|
|
780
|
+
*/
|
|
781
|
+
export function renderPrideChartForChannel(graph, opts = {}) {
|
|
782
|
+
const inner = renderPrideChart(graph, { ...opts, emoji: true, ansi: false });
|
|
783
|
+
return ["```", inner, "```"].join("\n");
|
|
784
|
+
}
|
|
785
|
+
// ─── Internals ──────────────────────────────────────────────────────
|
|
786
|
+
const SECTION_BAR = "▌"; // ▌
|
|
787
|
+
function pickTokens(emoji) {
|
|
788
|
+
if (emoji) {
|
|
789
|
+
return {
|
|
790
|
+
lion: "\u{1f981}", // 🦁
|
|
791
|
+
crown: "\u{1f451}", // 👑
|
|
792
|
+
coExec: "✦", // ✦ — four-pointed star, visually below the crown
|
|
793
|
+
dept: "\u{1f3db}", // 🏛
|
|
794
|
+
bolt: "⚡", // ⚡
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
return {
|
|
798
|
+
lion: "*",
|
|
799
|
+
crown: "[TOP]",
|
|
800
|
+
coExec: "[CXO]",
|
|
801
|
+
dept: "[DEPT]",
|
|
802
|
+
bolt: "!",
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
function makePainter(ansi) {
|
|
806
|
+
if (!ansi) {
|
|
807
|
+
const passthrough = (s) => s;
|
|
808
|
+
return {
|
|
809
|
+
lion: passthrough,
|
|
810
|
+
heading: passthrough,
|
|
811
|
+
taunt: passthrough,
|
|
812
|
+
bar: passthrough,
|
|
813
|
+
section: passthrough,
|
|
814
|
+
crown: passthrough,
|
|
815
|
+
id: passthrough,
|
|
816
|
+
role: passthrough,
|
|
817
|
+
bio: passthrough,
|
|
818
|
+
dept: passthrough,
|
|
819
|
+
deptSlug: passthrough,
|
|
820
|
+
rule: passthrough,
|
|
821
|
+
bolt: passthrough,
|
|
822
|
+
footer: passthrough,
|
|
823
|
+
bookmark: passthrough,
|
|
824
|
+
storyHead: passthrough,
|
|
825
|
+
story: passthrough,
|
|
826
|
+
tree: passthrough,
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
return {
|
|
830
|
+
lion: (s) => ansiChalk.yellow(s),
|
|
831
|
+
heading: (s) => ansiChalk.bold.yellow(s),
|
|
832
|
+
taunt: (s) => ansiChalk.dim(s),
|
|
833
|
+
bar: (s) => ansiChalk.yellow(s),
|
|
834
|
+
section: (s) => ansiChalk.bold(s),
|
|
835
|
+
crown: (s) => ansiChalk.yellow(s),
|
|
836
|
+
id: (s) => ansiChalk.cyan(s),
|
|
837
|
+
role: (s) => ansiChalk.white(s),
|
|
838
|
+
bio: (s) => ansiChalk.dim(s),
|
|
839
|
+
dept: (s) => ansiChalk.yellow(s),
|
|
840
|
+
deptSlug: (s) => ansiChalk.bold.cyan(s),
|
|
841
|
+
rule: (s) => ansiChalk.dim(s),
|
|
842
|
+
bolt: (s) => ansiChalk.yellow(s),
|
|
843
|
+
footer: (s) => ansiChalk.dim(s),
|
|
844
|
+
bookmark: (s) => ansiChalk.magenta(s),
|
|
845
|
+
storyHead: (s) => ansiChalk.bold.magenta(s),
|
|
846
|
+
story: (s) => ansiChalk.italic.dim(s),
|
|
847
|
+
tree: (s) => ansiChalk.dim(s),
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
function toPrideMember(graph, id) {
|
|
851
|
+
const m = graph.members[id];
|
|
852
|
+
return {
|
|
853
|
+
id,
|
|
854
|
+
...(m?.role !== undefined ? { role: m.role } : {}),
|
|
855
|
+
...(m?.bio !== undefined ? { bio: m.bio } : {}),
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* For every member, compute the manager-chain length to `topOrder`.
|
|
860
|
+
* Members whose chain doesn't terminate at `topOrder` get `Infinity`.
|
|
861
|
+
* topOrder itself has depth 0.
|
|
862
|
+
*/
|
|
863
|
+
function computeDepthToTopOrder(graph, topOrderId) {
|
|
864
|
+
const depth = {};
|
|
865
|
+
for (const id of Object.keys(graph.members)) {
|
|
866
|
+
depth[id] = computeOne(graph, id, topOrderId);
|
|
867
|
+
}
|
|
868
|
+
return depth;
|
|
869
|
+
}
|
|
870
|
+
function computeOne(graph, id, topOrderId) {
|
|
871
|
+
if (id === topOrderId)
|
|
872
|
+
return 0;
|
|
873
|
+
let steps = 0;
|
|
874
|
+
let cursor = id;
|
|
875
|
+
const seen = new Set();
|
|
876
|
+
while (cursor) {
|
|
877
|
+
if (seen.has(cursor))
|
|
878
|
+
return Number.POSITIVE_INFINITY; // cycle defense
|
|
879
|
+
seen.add(cursor);
|
|
880
|
+
const m = graph.members[cursor];
|
|
881
|
+
if (!m)
|
|
882
|
+
return Number.POSITIVE_INFINITY;
|
|
883
|
+
if (cursor === topOrderId)
|
|
884
|
+
return steps;
|
|
885
|
+
cursor = m.reportsTo;
|
|
886
|
+
steps += 1;
|
|
887
|
+
if (steps > 1024)
|
|
888
|
+
return Number.POSITIVE_INFINITY; // runaway defense
|
|
889
|
+
}
|
|
890
|
+
return Number.POSITIVE_INFINITY;
|
|
891
|
+
}
|
|
892
|
+
//# sourceMappingURL=pride-template.js.map
|