@dirgha/code 1.2.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.changeset/README.md +23 -0
- package/.changeset/config.json +11 -0
- package/.changeset/sprint-1.3.0.md +5 -0
- package/CHANGELOG.md +135 -0
- package/CLA.md +104 -0
- package/CODE_OF_CONDUCT.md +50 -0
- package/CONTRIBUTING.md +81 -0
- package/CREDITS.md +46 -0
- package/LICENSING.md +105 -0
- package/README.md +71 -625
- package/SECURITY.md +61 -0
- package/SUPPORT.md +53 -0
- package/assets/audio/dirgha-ambient-150s.m4a +0 -0
- package/assets/logo/dirgha-mark-amber.svg +8 -0
- package/assets/logo/dirgha-mark-cream.svg +8 -0
- package/assets/logo/dirgha-wordmark-cream.svg +5 -0
- package/assets/logo/dirgha-wordmark-ink.svg +5 -0
- package/changelog/1.4.0-promo.mp4 +0 -0
- package/changelog/1.4.0.md +89 -0
- package/changelog/1.4.1-promo.mp4 +0 -0
- package/changelog/README.md +73 -0
- package/dist/agent/capabilities.d.ts +1 -0
- package/dist/agent/capabilities.js +21 -0
- package/dist/agent/collaboration/consensus.d.ts +77 -0
- package/dist/agent/collaboration/consensus.js +279 -0
- package/dist/agent/collaboration/index.d.ts +7 -0
- package/dist/agent/collaboration/index.js +7 -0
- package/dist/agent/collaboration/message-bus.d.ts +48 -0
- package/dist/agent/collaboration/message-bus.js +219 -0
- package/dist/agent/collaboration/shared-context.d.ts +67 -0
- package/dist/agent/collaboration/shared-context.js +217 -0
- package/dist/agent/collaboration/types.d.ts +95 -0
- package/dist/agent/collaboration/types.js +6 -0
- package/dist/agent/commands/chat.d.ts +21 -0
- package/dist/agent/commands/chat.js +55 -0
- package/dist/agent/compaction-tiers.d.ts +10 -0
- package/dist/agent/compaction-tiers.js +70 -0
- package/dist/agent/compaction.d.ts +16 -0
- package/dist/agent/compaction.js +129 -0
- package/dist/agent/context-optimizer.d.ts +2 -0
- package/dist/agent/context-optimizer.js +30 -0
- package/dist/agent/context.d.ts +14 -0
- package/dist/agent/context.js +241 -0
- package/dist/agent/error-classifier.d.ts +10 -0
- package/dist/agent/error-classifier.js +67 -0
- package/dist/agent/event-emit.d.ts +6 -0
- package/dist/agent/event-emit.js +98 -0
- package/dist/agent/executor.d.ts +9 -0
- package/dist/agent/executor.js +44 -0
- package/dist/agent/gateway.d.ts +11 -0
- package/dist/agent/gateway.js +11 -0
- package/dist/agent/index.d.ts +7 -0
- package/dist/agent/index.js +58 -0
- package/dist/agent/injector.d.ts +35 -0
- package/dist/agent/injector.js +57 -0
- package/dist/agent/loop-detector.d.ts +18 -0
- package/dist/agent/loop-detector.js +91 -0
- package/dist/agent/loop.d.ts +22 -0
- package/dist/agent/loop.js +348 -0
- package/dist/agent/memory-sync.d.ts +5 -0
- package/dist/agent/memory-sync.js +17 -0
- package/dist/agent/model-fallback.d.ts +23 -0
- package/dist/agent/model-fallback.js +112 -0
- package/dist/agent/moim.d.ts +5 -0
- package/dist/agent/moim.js +29 -0
- package/dist/agent/orchestration/agent-pool.d.ts +59 -0
- package/dist/agent/orchestration/agent-pool.js +165 -0
- package/dist/agent/orchestration/circuit-breaker.d.ts +121 -0
- package/dist/agent/orchestration/circuit-breaker.js +298 -0
- package/dist/agent/orchestration/coordinator.d.ts +17 -0
- package/dist/agent/orchestration/coordinator.js +150 -0
- package/dist/agent/orchestration/dag-runner.d.ts +18 -0
- package/dist/agent/orchestration/dag-runner.js +172 -0
- package/dist/agent/orchestration/dag.d.ts +33 -0
- package/dist/agent/orchestration/dag.js +209 -0
- package/dist/agent/orchestration/decomposer.d.ts +19 -0
- package/dist/agent/orchestration/decomposer.js +65 -0
- package/dist/agent/orchestration/observability.d.ts +117 -0
- package/dist/agent/orchestration/observability.js +244 -0
- package/dist/agent/orchestration/parallel.d.ts +8 -0
- package/dist/agent/orchestration/parallel.js +191 -0
- package/dist/agent/orchestration/pool-cleanup.d.ts +16 -0
- package/dist/agent/orchestration/pool-cleanup.js +21 -0
- package/dist/agent/orchestration/pool-queue.d.ts +23 -0
- package/dist/agent/orchestration/pool-queue.js +62 -0
- package/dist/agent/orchestration/pool-scaler.d.ts +22 -0
- package/dist/agent/orchestration/pool-scaler.js +53 -0
- package/dist/agent/orchestration/researcher.d.ts +28 -0
- package/dist/agent/orchestration/researcher.js +78 -0
- package/dist/agent/orchestration/retry.d.ts +14 -0
- package/dist/agent/orchestration/retry.js +107 -0
- package/dist/agent/orchestration/scheduler.d.ts +24 -0
- package/dist/agent/orchestration/scheduler.js +66 -0
- package/dist/agent/orchestration/shared-memory.d.ts +31 -0
- package/dist/agent/orchestration/shared-memory.js +57 -0
- package/dist/agent/orchestration/structured.d.ts +63 -0
- package/dist/agent/orchestration/structured.js +152 -0
- package/dist/agent/orchestration/task-queue.d.ts +32 -0
- package/dist/agent/orchestration/task-queue.js +105 -0
- package/dist/agent/orchestration/types.d.ts +139 -0
- package/dist/agent/orchestration/types.js +7 -0
- package/dist/agent/output.d.ts +31 -0
- package/dist/agent/output.js +108 -0
- package/dist/agent/parser.d.ts +5 -0
- package/dist/agent/parser.js +74 -0
- package/dist/agent/pending-messages.d.ts +33 -0
- package/dist/agent/pending-messages.js +57 -0
- package/dist/agent/project.d.ts +2 -0
- package/dist/agent/project.js +19 -0
- package/dist/agent/reflection.d.ts +36 -0
- package/dist/agent/reflection.js +93 -0
- package/dist/agent/rerank-engine.d.ts +18 -0
- package/dist/agent/rerank-engine.js +52 -0
- package/dist/agent/routing.d.ts +10 -0
- package/dist/agent/routing.js +95 -0
- package/dist/agent/secrets.d.ts +6 -0
- package/dist/agent/secrets.js +84 -0
- package/dist/agent/skill-registry.d.ts +37 -0
- package/dist/agent/skill-registry.js +113 -0
- package/dist/agent/spawn/index.d.ts +8 -0
- package/dist/agent/spawn/index.js +5 -0
- package/dist/agent/spawn/lifecycle.d.ts +9 -0
- package/dist/agent/spawn/lifecycle.js +92 -0
- package/dist/agent/spawn/messaging.d.ts +6 -0
- package/dist/agent/spawn/messaging.js +36 -0
- package/dist/agent/spawn/state.d.ts +7 -0
- package/dist/agent/spawn/state.js +57 -0
- package/dist/agent/spawn/types.d.ts +55 -0
- package/dist/agent/spawn/types.js +5 -0
- package/dist/agent/spawn/utils.d.ts +14 -0
- package/dist/agent/spawn/utils.js +72 -0
- package/dist/agent/spawn-agent.d.ts +47 -0
- package/dist/agent/spawn-agent.js +114 -0
- package/dist/agent/structured-output.d.ts +15 -0
- package/dist/agent/structured-output.js +66 -0
- package/dist/agent/tool-execution.d.ts +18 -0
- package/dist/agent/tool-execution.js +242 -0
- package/dist/agent/tools.d.ts +6 -0
- package/dist/agent/tools.js +7 -0
- package/dist/agent/types.d.ts +62 -0
- package/dist/agent/types.js +6 -0
- package/dist/agents/consensus.d.ts +14 -0
- package/dist/agents/consensus.js +34 -0
- package/dist/agents/delegate.d.ts +18 -0
- package/dist/agents/delegate.js +32 -0
- package/dist/agents/ensemble.d.ts +18 -0
- package/dist/agents/ensemble.js +33 -0
- package/dist/agents/orchestrate.d.ts +12 -0
- package/dist/agents/orchestrate.js +32 -0
- package/dist/agents/types.d.ts +29 -0
- package/dist/agents/types.js +2 -0
- package/dist/analytics/export.d.ts +11 -0
- package/dist/analytics/export.js +58 -0
- package/dist/analytics/insights.d.ts +27 -0
- package/dist/analytics/insights.js +33 -0
- package/dist/api/knowledge.d.ts +38 -0
- package/dist/api/knowledge.js +65 -0
- package/dist/billing/db.d.ts +11 -0
- package/dist/billing/db.js +88 -0
- package/dist/billing/index.d.ts +10 -0
- package/dist/billing/index.js +12 -0
- package/dist/billing/meter.d.ts +11 -0
- package/dist/billing/meter.js +46 -0
- package/dist/billing/middleware.d.ts +28 -0
- package/dist/billing/middleware.js +103 -0
- package/dist/billing/pricing.d.ts +6 -0
- package/dist/billing/pricing.js +48 -0
- package/dist/billing/quota.d.ts +24 -0
- package/dist/billing/quota.js +105 -0
- package/dist/billing/ratelimit-fixed.d.ts +16 -0
- package/dist/billing/ratelimit-fixed.js +112 -0
- package/dist/billing/ratelimit.d.ts +7 -0
- package/dist/billing/ratelimit.js +58 -0
- package/dist/billing/tokenizer-v2.d.ts +76 -0
- package/dist/billing/tokenizer-v2.js +263 -0
- package/dist/billing/tokenizer.d.ts +9 -0
- package/dist/billing/tokenizer.js +46 -0
- package/dist/billing/types.d.ts +60 -0
- package/dist/billing/types.js +17 -0
- package/dist/browser/accessibility.d.ts +6 -0
- package/dist/browser/accessibility.js +47 -0
- package/dist/browser/commands.d.ts +5 -0
- package/dist/browser/commands.js +82 -0
- package/dist/browser/ipc-client.d.ts +26 -0
- package/dist/browser/ipc-client.js +60 -0
- package/dist/browser/launcher.d.ts +13 -0
- package/dist/browser/launcher.js +78 -0
- package/dist/browser/navigation.d.ts +12 -0
- package/dist/browser/navigation.js +28 -0
- package/dist/browser/snapshot.d.ts +7 -0
- package/dist/browser/snapshot.js +18 -0
- package/dist/browser/types.d.ts +28 -0
- package/dist/browser/types.js +2 -0
- package/dist/checkpoint/create.d.ts +2 -0
- package/dist/checkpoint/create.js +44 -0
- package/dist/checkpoint/git.d.ts +8 -0
- package/dist/checkpoint/git.js +45 -0
- package/dist/checkpoint/restore.d.ts +5 -0
- package/dist/checkpoint/restore.js +18 -0
- package/dist/checkpoint/store.d.ts +9 -0
- package/dist/checkpoint/store.js +40 -0
- package/dist/checkpoint/types.d.ts +23 -0
- package/dist/checkpoint/types.js +2 -0
- package/dist/commands/agent-swarm.d.ts +7 -0
- package/dist/commands/agent-swarm.js +223 -0
- package/dist/commands/analytics.d.ts +5 -0
- package/dist/commands/analytics.js +20 -0
- package/dist/commands/ask.d.ts +12 -0
- package/dist/commands/ask.js +99 -0
- package/dist/commands/audit.d.ts +5 -0
- package/dist/commands/audit.js +78 -0
- package/dist/commands/auth.d.ts +1 -0
- package/dist/commands/auth.js +126 -0
- package/dist/commands/autocomplete.d.ts +10 -0
- package/dist/commands/autocomplete.js +89 -0
- package/dist/commands/bounties.d.ts +2 -0
- package/dist/commands/bounties.js +107 -0
- package/dist/commands/browser-cmd.d.ts +7 -0
- package/dist/commands/browser-cmd.js +101 -0
- package/dist/commands/browser-integration.d.ts +15 -0
- package/dist/commands/browser-integration.js +58 -0
- package/dist/commands/btw.d.ts +7 -0
- package/dist/commands/btw.js +62 -0
- package/dist/commands/bucky.d.ts +19 -0
- package/dist/commands/bucky.js +328 -0
- package/dist/commands/bug-hunter.d.ts +6 -0
- package/dist/commands/bug-hunter.js +55 -0
- package/dist/commands/capture.d.ts +10 -0
- package/dist/commands/capture.js +167 -0
- package/dist/commands/chat.d.ts +4 -0
- package/dist/commands/chat.js +107 -0
- package/dist/commands/checkpoint.d.ts +6 -0
- package/dist/commands/checkpoint.js +83 -0
- package/dist/commands/coming-soon.d.ts +2 -0
- package/dist/commands/coming-soon.js +50 -0
- package/dist/commands/compact.d.ts +5 -0
- package/dist/commands/compact.js +38 -0
- package/dist/commands/connect.d.ts +7 -0
- package/dist/commands/connect.js +155 -0
- package/dist/commands/curate/embeddings.d.ts +7 -0
- package/dist/commands/curate/embeddings.js +38 -0
- package/dist/commands/curate/files.d.ts +4 -0
- package/dist/commands/curate/files.js +28 -0
- package/dist/commands/curate/project.d.ts +1 -0
- package/dist/commands/curate/project.js +20 -0
- package/dist/commands/curate/schema.d.ts +1 -0
- package/dist/commands/curate/schema.js +30 -0
- package/dist/commands/curate/types.d.ts +26 -0
- package/dist/commands/curate/types.js +6 -0
- package/dist/commands/curate/vss-integration.d.ts +1 -0
- package/dist/commands/curate/vss-integration.js +19 -0
- package/dist/commands/curate.d.ts +9 -0
- package/dist/commands/curate.js +50 -0
- package/dist/commands/dao.d.ts +8 -0
- package/dist/commands/dao.js +290 -0
- package/dist/commands/data-query.d.ts +7 -0
- package/dist/commands/data-query.js +55 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.js +145 -0
- package/dist/commands/ensemble.d.ts +7 -0
- package/dist/commands/ensemble.js +88 -0
- package/dist/commands/error-recovery.d.ts +10 -0
- package/dist/commands/error-recovery.js +50 -0
- package/dist/commands/export-session.d.ts +7 -0
- package/dist/commands/export-session.js +70 -0
- package/dist/commands/import-session.d.ts +7 -0
- package/dist/commands/import-session.js +49 -0
- package/dist/commands/index.d.ts +62 -0
- package/dist/commands/index.js +76 -0
- package/dist/commands/init.d.ts +5 -0
- package/dist/commands/init.js +101 -0
- package/dist/commands/jobs.d.ts +2 -0
- package/dist/commands/jobs.js +108 -0
- package/dist/commands/join-mesh.d.ts +5 -0
- package/dist/commands/join-mesh.js +97 -0
- package/dist/commands/knowledge.d.ts +19 -0
- package/dist/commands/knowledge.js +218 -0
- package/dist/commands/local.d.ts +2 -0
- package/dist/commands/local.js +77 -0
- package/dist/commands/login.d.ts +10 -0
- package/dist/commands/login.js +160 -0
- package/dist/commands/logout.d.ts +2 -0
- package/dist/commands/logout.js +12 -0
- package/dist/commands/make.d.ts +2 -0
- package/dist/commands/make.js +69 -0
- package/dist/commands/mcp.d.ts +7 -0
- package/dist/commands/mcp.js +202 -0
- package/dist/commands/mesh/add-member.d.ts +2 -0
- package/dist/commands/mesh/add-member.js +23 -0
- package/dist/commands/mesh/ask.d.ts +2 -0
- package/dist/commands/mesh/ask.js +60 -0
- package/dist/commands/mesh/billing.d.ts +1 -0
- package/dist/commands/mesh/billing.js +16 -0
- package/dist/commands/mesh/consensus.d.ts +1 -0
- package/dist/commands/mesh/consensus.js +17 -0
- package/dist/commands/mesh/context.d.ts +4 -0
- package/dist/commands/mesh/context.js +11 -0
- package/dist/commands/mesh/index.d.ts +4 -0
- package/dist/commands/mesh/index.js +64 -0
- package/dist/commands/mesh/join.d.ts +2 -0
- package/dist/commands/mesh/join.js +38 -0
- package/dist/commands/mesh/leave.d.ts +1 -0
- package/dist/commands/mesh/leave.js +14 -0
- package/dist/commands/mesh/quota.d.ts +1 -0
- package/dist/commands/mesh/quota.js +31 -0
- package/dist/commands/mesh/status.d.ts +1 -0
- package/dist/commands/mesh/status.js +48 -0
- package/dist/commands/mesh/types.d.ts +36 -0
- package/dist/commands/mesh/types.js +2 -0
- package/dist/commands/mesh.d.ts +6 -0
- package/dist/commands/mesh.js +258 -0
- package/dist/commands/models.d.ts +1 -0
- package/dist/commands/models.js +194 -0
- package/dist/commands/pay.d.ts +7 -0
- package/dist/commands/pay.js +305 -0
- package/dist/commands/profile.d.ts +2 -0
- package/dist/commands/profile.js +99 -0
- package/dist/commands/progress.d.ts +23 -0
- package/dist/commands/progress.js +93 -0
- package/dist/commands/prune.d.ts +2 -0
- package/dist/commands/prune.js +64 -0
- package/dist/commands/query.d.ts +9 -0
- package/dist/commands/query.js +135 -0
- package/dist/commands/recall-cmd.d.ts +7 -0
- package/dist/commands/recall-cmd.js +65 -0
- package/dist/commands/remember-cmd.d.ts +7 -0
- package/dist/commands/remember-cmd.js +40 -0
- package/dist/commands/research.d.ts +5 -0
- package/dist/commands/research.js +40 -0
- package/dist/commands/sandbox-connect.d.ts +2 -0
- package/dist/commands/sandbox-connect.js +171 -0
- package/dist/commands/scan/arniko.d.ts +1 -0
- package/dist/commands/scan/arniko.js +79 -0
- package/dist/commands/scan/deps.d.ts +21 -0
- package/dist/commands/scan/deps.js +56 -0
- package/dist/commands/scan/index.d.ts +7 -0
- package/dist/commands/scan/index.js +97 -0
- package/dist/commands/scan/output.d.ts +2 -0
- package/dist/commands/scan/output.js +42 -0
- package/dist/commands/scan/types.d.ts +21 -0
- package/dist/commands/scan/types.js +2 -0
- package/dist/commands/scan/utils.d.ts +5 -0
- package/dist/commands/scan/utils.js +101 -0
- package/dist/commands/scan.d.ts +7 -0
- package/dist/commands/scan.js +327 -0
- package/dist/commands/scratchpad.d.ts +8 -0
- package/dist/commands/scratchpad.js +82 -0
- package/dist/commands/session.d.ts +3 -0
- package/dist/commands/session.js +70 -0
- package/dist/commands/setup-local.d.ts +2 -0
- package/dist/commands/setup-local.js +137 -0
- package/dist/commands/setup.d.ts +1 -0
- package/dist/commands/setup.js +230 -0
- package/dist/commands/smart-exec.d.ts +2 -0
- package/dist/commands/smart-exec.js +217 -0
- package/dist/commands/sprint.d.ts +9 -0
- package/dist/commands/sprint.js +321 -0
- package/dist/commands/stats.d.ts +1 -0
- package/dist/commands/stats.js +163 -0
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +97 -0
- package/dist/commands/support.d.ts +5 -0
- package/dist/commands/support.js +43 -0
- package/dist/commands/sync.d.ts +7 -0
- package/dist/commands/sync.js +130 -0
- package/dist/commands/unified-memory/context.d.ts +5 -0
- package/dist/commands/unified-memory/context.js +33 -0
- package/dist/commands/unified-memory/index.d.ts +12 -0
- package/dist/commands/unified-memory/index.js +23 -0
- package/dist/commands/unified-memory/recall.d.ts +5 -0
- package/dist/commands/unified-memory/recall.js +50 -0
- package/dist/commands/unified-memory/remember.d.ts +5 -0
- package/dist/commands/unified-memory/remember.js +49 -0
- package/dist/commands/unified-memory/session.d.ts +5 -0
- package/dist/commands/unified-memory/session.js +64 -0
- package/dist/commands/unified-memory/stats.d.ts +5 -0
- package/dist/commands/unified-memory/stats.js +29 -0
- package/dist/commands/update.d.ts +7 -0
- package/dist/commands/update.js +45 -0
- package/dist/commands/voice-entry.d.ts +8 -0
- package/dist/commands/voice-entry.js +120 -0
- package/dist/commands/yolo.d.ts +8 -0
- package/dist/commands/yolo.js +88 -0
- package/dist/compaction/index.d.ts +15 -0
- package/dist/compaction/index.js +21 -0
- package/dist/compaction/protect.d.ts +8 -0
- package/dist/compaction/protect.js +15 -0
- package/dist/compaction/prune.d.ts +5 -0
- package/dist/compaction/prune.js +19 -0
- package/dist/compaction/summarize.d.ts +6 -0
- package/dist/compaction/summarize.js +27 -0
- package/dist/compaction/types.d.ts +27 -0
- package/dist/compaction/types.js +2 -0
- package/dist/compaction/update.d.ts +6 -0
- package/dist/compaction/update.js +18 -0
- package/dist/config/execution.d.ts +22 -0
- package/dist/config/execution.js +59 -0
- package/dist/config/rate-limits.d.ts +15 -0
- package/dist/config/rate-limits.js +34 -0
- package/dist/context/jit.d.ts +16 -0
- package/dist/context/jit.js +120 -0
- package/dist/context/todos.d.ts +7 -0
- package/dist/context/todos.js +21 -0
- package/dist/cron/runner.d.ts +16 -0
- package/dist/cron/runner.js +57 -0
- package/dist/cron/store.d.ts +19 -0
- package/dist/cron/store.js +91 -0
- package/dist/dirgha.mjs +2 -2
- package/dist/embeddings/gateway.d.ts +9 -0
- package/dist/embeddings/gateway.js +55 -0
- package/dist/embeddings/math.d.ts +17 -0
- package/dist/embeddings/math.js +33 -0
- package/dist/embeddings/ollama.d.ts +10 -0
- package/dist/embeddings/ollama.js +74 -0
- package/dist/embeddings/provider.d.ts +28 -0
- package/dist/embeddings/provider.js +73 -0
- package/dist/embeddings/vss.d.ts +22 -0
- package/dist/embeddings/vss.js +102 -0
- package/dist/errors/tokenLimit.d.ts +15 -0
- package/dist/errors/tokenLimit.js +93 -0
- package/dist/extensions/manager.d.ts +6 -0
- package/dist/extensions/manager.js +62 -0
- package/dist/extensions/rpc.d.ts +10 -0
- package/dist/extensions/rpc.js +90 -0
- package/dist/extensions/types.d.ts +24 -0
- package/dist/extensions/types.js +5 -0
- package/dist/fleet/apply-back.d.ts +11 -0
- package/dist/fleet/apply-back.js +82 -0
- package/dist/fleet/commands.d.ts +2 -0
- package/dist/fleet/commands.js +227 -0
- package/dist/fleet/decompose.d.ts +7 -0
- package/dist/fleet/decompose.js +80 -0
- package/dist/fleet/events.d.ts +24 -0
- package/dist/fleet/events.js +35 -0
- package/dist/fleet/runtime.d.ts +9 -0
- package/dist/fleet/runtime.js +131 -0
- package/dist/fleet/tripleshot.d.ts +9 -0
- package/dist/fleet/tripleshot.js +114 -0
- package/dist/fleet/types.d.ts +60 -0
- package/dist/fleet/types.js +11 -0
- package/dist/fleet/worktree.d.ts +17 -0
- package/dist/fleet/worktree.js +80 -0
- package/dist/gateway/acp/adapter.d.ts +46 -0
- package/dist/gateway/acp/adapter.js +181 -0
- package/dist/gateway/acp/index.d.ts +6 -0
- package/dist/gateway/acp/index.js +6 -0
- package/dist/gateway/acp/registry.d.ts +51 -0
- package/dist/gateway/acp/registry.js +171 -0
- package/dist/gateway/acp/types.d.ts +123 -0
- package/dist/gateway/acp/types.js +7 -0
- package/dist/gateway/index.d.ts +5 -0
- package/dist/gateway/index.js +6 -0
- package/dist/gateway/orchestrator.d.ts +8 -0
- package/dist/gateway/orchestrator.js +37 -0
- package/dist/gateway/router.d.ts +34 -0
- package/dist/gateway/router.js +123 -0
- package/dist/gateway/telegram.d.ts +13 -0
- package/dist/gateway/telegram.js +35 -0
- package/dist/gateway/types.d.ts +15 -0
- package/dist/gateway/types.js +2 -0
- package/dist/git/rotation.d.ts +8 -0
- package/dist/git/rotation.js +36 -0
- package/dist/hub/commands.d.ts +15 -0
- package/dist/hub/commands.js +189 -0
- package/dist/hub/index.d.ts +8 -0
- package/dist/hub/index.js +9 -0
- package/dist/hub/installer.d.ts +7 -0
- package/dist/hub/installer.js +148 -0
- package/dist/hub/registry.d.ts +9 -0
- package/dist/hub/registry.js +81 -0
- package/dist/hub/registry.json +82 -0
- package/dist/hub/types.d.ts +73 -0
- package/dist/hub/types.js +6 -0
- package/dist/index-agent.d.ts +1 -0
- package/dist/index-agent.js +17 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +442 -0
- package/dist/knowledge/compiler.d.ts +11 -0
- package/dist/knowledge/compiler.js +100 -0
- package/dist/knowledge/git-sync.d.ts +6 -0
- package/dist/knowledge/git-sync.js +81 -0
- package/dist/knowledge/linter.d.ts +9 -0
- package/dist/knowledge/linter.js +136 -0
- package/dist/knowledge/raw.d.ts +20 -0
- package/dist/knowledge/raw.js +87 -0
- package/dist/knowledge/wiki.d.ts +26 -0
- package/dist/knowledge/wiki.js +127 -0
- package/dist/llm/cache.d.ts +16 -0
- package/dist/llm/cache.js +25 -0
- package/dist/llm/costs.d.ts +18 -0
- package/dist/llm/costs.js +30 -0
- package/dist/llm/ensemble.d.ts +5 -0
- package/dist/llm/ensemble.js +40 -0
- package/dist/llm/local.d.ts +23 -0
- package/dist/llm/local.js +78 -0
- package/dist/llm/router.d.ts +7 -0
- package/dist/llm/router.js +68 -0
- package/dist/llm/types.d.ts +18 -0
- package/dist/llm/types.js +2 -0
- package/dist/mcp/client.d.ts +25 -0
- package/dist/mcp/client.js +115 -0
- package/dist/mcp/commands.d.ts +5 -0
- package/dist/mcp/commands.js +30 -0
- package/dist/mcp/index.d.ts +7 -0
- package/dist/mcp/index.js +6 -0
- package/dist/mcp/manager.d.ts +17 -0
- package/dist/mcp/manager.js +67 -0
- package/dist/mcp/marketplace.d.ts +42 -0
- package/dist/mcp/marketplace.js +188 -0
- package/dist/mcp/resources.d.ts +6 -0
- package/dist/mcp/resources.js +26 -0
- package/dist/mcp/server.d.ts +84 -0
- package/dist/mcp/server.js +288 -0
- package/dist/mcp/transport.d.ts +10 -0
- package/dist/mcp/transport.js +30 -0
- package/dist/memory/builtin.d.ts +17 -0
- package/dist/memory/builtin.js +43 -0
- package/dist/memory/gepa-integration.d.ts +49 -0
- package/dist/memory/gepa-integration.js +271 -0
- package/dist/memory/graph.d.ts +19 -0
- package/dist/memory/graph.js +44 -0
- package/dist/memory/holographic.d.ts +11 -0
- package/dist/memory/holographic.js +192 -0
- package/dist/memory/manager.d.ts +36 -0
- package/dist/memory/manager.js +152 -0
- package/dist/memory/provider.d.ts +29 -0
- package/dist/memory/provider.js +9 -0
- package/dist/memory/unified.d.ts +19 -0
- package/dist/memory/unified.js +91 -0
- package/dist/mesh/ConsensusEngine.d.ts +85 -0
- package/dist/mesh/ConsensusEngine.js +187 -0
- package/dist/mesh/LightningBilling.d.ts +124 -0
- package/dist/mesh/LightningBilling.js +284 -0
- package/dist/mesh/MeshNode.d.ts +82 -0
- package/dist/mesh/MeshNode.js +401 -0
- package/dist/mesh/TeamResourcePool.d.ts +93 -0
- package/dist/mesh/TeamResourcePool.js +277 -0
- package/dist/mesh/agent-payments.d.ts +25 -0
- package/dist/mesh/agent-payments.js +79 -0
- package/dist/mesh/capabilities.d.ts +25 -0
- package/dist/mesh/capabilities.js +44 -0
- package/dist/mesh/config.d.ts +37 -0
- package/dist/mesh/config.js +38 -0
- package/dist/mesh/index.d.ts +13 -0
- package/dist/mesh/index.js +11 -0
- package/dist/mesh/reputation.d.ts +21 -0
- package/dist/mesh/reputation.js +51 -0
- package/dist/mesh/revenue-split.d.ts +20 -0
- package/dist/mesh/revenue-split.js +52 -0
- package/dist/mesh/validation.d.ts +5 -0
- package/dist/mesh/validation.js +31 -0
- package/dist/models/credential-pool.d.ts +37 -0
- package/dist/models/credential-pool.js +165 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +13 -0
- package/dist/models/manager.d.ts +34 -0
- package/dist/models/manager.js +197 -0
- package/dist/models/registry.d.ts +27 -0
- package/dist/models/registry.js +359 -0
- package/dist/models/types.d.ts +119 -0
- package/dist/models/types.js +5 -0
- package/dist/multimodal/attachments.d.ts +13 -0
- package/dist/multimodal/attachments.js +99 -0
- package/dist/multimodal/index.d.ts +6 -0
- package/dist/multimodal/index.js +3 -0
- package/dist/multimodal/slash.d.ts +9 -0
- package/dist/multimodal/slash.js +111 -0
- package/dist/multimodal/types.d.ts +30 -0
- package/dist/multimodal/types.js +5 -0
- package/dist/permission/approval.d.ts +18 -0
- package/dist/permission/approval.js +86 -0
- package/dist/permission/confirmation.d.ts +33 -0
- package/dist/permission/confirmation.js +130 -0
- package/dist/permission/judge.d.ts +25 -0
- package/dist/permission/judge.js +162 -0
- package/dist/permission/store.d.ts +12 -0
- package/dist/permission/store.js +50 -0
- package/dist/platform/sync.d.ts +17 -0
- package/dist/platform/sync.js +38 -0
- package/dist/project-session/commands.d.ts +5 -0
- package/dist/project-session/commands.js +220 -0
- package/dist/project-session/context.d.ts +21 -0
- package/dist/project-session/context.js +145 -0
- package/dist/project-session/index.d.ts +8 -0
- package/dist/project-session/index.js +8 -0
- package/dist/project-session/project.d.ts +15 -0
- package/dist/project-session/project.js +107 -0
- package/dist/project-session/session.d.ts +14 -0
- package/dist/project-session/session.js +124 -0
- package/dist/project-session/types.d.ts +85 -0
- package/dist/project-session/types.js +6 -0
- package/dist/providers/anthropic.d.ts +4 -0
- package/dist/providers/anthropic.js +94 -0
- package/dist/providers/circuit-breaker.d.ts +30 -0
- package/dist/providers/circuit-breaker.js +109 -0
- package/dist/providers/cohere.d.ts +2 -0
- package/dist/providers/cohere.js +49 -0
- package/dist/providers/deepinfra.d.ts +32 -0
- package/dist/providers/deepinfra.js +44 -0
- package/dist/providers/detection.d.ts +21 -0
- package/dist/providers/detection.js +88 -0
- package/dist/providers/dirgha.d.ts +3 -0
- package/dist/providers/dirgha.js +26 -0
- package/dist/providers/dispatch.d.ts +28 -0
- package/dist/providers/dispatch.js +262 -0
- package/dist/providers/fireworks.d.ts +2 -0
- package/dist/providers/fireworks.js +109 -0
- package/dist/providers/gateway.d.ts +2 -0
- package/dist/providers/gateway.js +80 -0
- package/dist/providers/gemini.d.ts +3 -0
- package/dist/providers/gemini.js +103 -0
- package/dist/providers/groq.d.ts +2 -0
- package/dist/providers/groq.js +39 -0
- package/dist/providers/http.d.ts +27 -0
- package/dist/providers/http.js +245 -0
- package/dist/providers/index.d.ts +16 -0
- package/dist/providers/index.js +18 -0
- package/dist/providers/messages.d.ts +21 -0
- package/dist/providers/messages.js +116 -0
- package/dist/providers/mistral.d.ts +2 -0
- package/dist/providers/mistral.js +39 -0
- package/dist/providers/normalise.d.ts +5 -0
- package/dist/providers/normalise.js +29 -0
- package/dist/providers/nvidia.d.ts +2 -0
- package/dist/providers/nvidia.js +62 -0
- package/dist/providers/openai.d.ts +3 -0
- package/dist/providers/openai.js +20 -0
- package/dist/providers/openrouter.d.ts +2 -0
- package/dist/providers/openrouter.js +54 -0
- package/dist/providers/perplexity.d.ts +34 -0
- package/dist/providers/perplexity.js +66 -0
- package/dist/providers/rate-limit.d.ts +31 -0
- package/dist/providers/rate-limit.js +101 -0
- package/dist/providers/togetherai.d.ts +32 -0
- package/dist/providers/togetherai.js +44 -0
- package/dist/providers/tools-format.d.ts +2437 -0
- package/dist/providers/tools-format.js +15 -0
- package/dist/providers/types.d.ts +29 -0
- package/dist/providers/types.js +2 -0
- package/dist/providers/unified-rate-limiter.d.ts +116 -0
- package/dist/providers/unified-rate-limiter.js +385 -0
- package/dist/providers/vercel.d.ts +32 -0
- package/dist/providers/vercel.js +44 -0
- package/dist/providers/xai.d.ts +2 -0
- package/dist/providers/xai.js +39 -0
- package/dist/realtime/hub.d.ts +42 -0
- package/dist/realtime/hub.js +147 -0
- package/dist/repl/escape-recovery.d.ts +75 -0
- package/dist/repl/escape-recovery.js +236 -0
- package/dist/repl/index.d.ts +2 -0
- package/dist/repl/index.js +226 -0
- package/dist/repl/input.d.ts +12 -0
- package/dist/repl/input.js +345 -0
- package/dist/repl/renderer.d.ts +23 -0
- package/dist/repl/renderer.js +232 -0
- package/dist/repl/slash/account.d.ts +2 -0
- package/dist/repl/slash/account.js +70 -0
- package/dist/repl/slash/agent-discovery.d.ts +15 -0
- package/dist/repl/slash/agent-discovery.js +227 -0
- package/dist/repl/slash/config.d.ts +2 -0
- package/dist/repl/slash/config.js +223 -0
- package/dist/repl/slash/consensus.d.ts +14 -0
- package/dist/repl/slash/consensus.js +173 -0
- package/dist/repl/slash/context.d.ts +3 -0
- package/dist/repl/slash/context.js +188 -0
- package/dist/repl/slash/cron.d.ts +2 -0
- package/dist/repl/slash/cron.js +83 -0
- package/dist/repl/slash/dev.d.ts +5 -0
- package/dist/repl/slash/dev.js +240 -0
- package/dist/repl/slash/fs.d.ts +10 -0
- package/dist/repl/slash/fs.js +105 -0
- package/dist/repl/slash/git-ext.d.ts +2 -0
- package/dist/repl/slash/git-ext.js +95 -0
- package/dist/repl/slash/git.d.ts +3 -0
- package/dist/repl/slash/git.js +167 -0
- package/dist/repl/slash/hermes.d.ts +2 -0
- package/dist/repl/slash/hermes.js +180 -0
- package/dist/repl/slash/index.d.ts +28 -0
- package/dist/repl/slash/index.js +160 -0
- package/dist/repl/slash/knowledge.d.ts +8 -0
- package/dist/repl/slash/knowledge.js +287 -0
- package/dist/repl/slash/local.d.ts +5 -0
- package/dist/repl/slash/local.js +24 -0
- package/dist/repl/slash/mcp.d.ts +2 -0
- package/dist/repl/slash/mcp.js +63 -0
- package/dist/repl/slash/memory.d.ts +2 -0
- package/dist/repl/slash/memory.js +232 -0
- package/dist/repl/slash/net.d.ts +11 -0
- package/dist/repl/slash/net.js +83 -0
- package/dist/repl/slash/orchestration.d.ts +2 -0
- package/dist/repl/slash/orchestration.js +61 -0
- package/dist/repl/slash/safety.d.ts +2 -0
- package/dist/repl/slash/safety.js +131 -0
- package/dist/repl/slash/screen.d.ts +2 -0
- package/dist/repl/slash/screen.js +202 -0
- package/dist/repl/slash/search.d.ts +2 -0
- package/dist/repl/slash/search.js +211 -0
- package/dist/repl/slash/security.d.ts +2 -0
- package/dist/repl/slash/security.js +102 -0
- package/dist/repl/slash/session.d.ts +2 -0
- package/dist/repl/slash/session.js +498 -0
- package/dist/repl/slash/shortcuts.d.ts +2 -0
- package/dist/repl/slash/shortcuts.js +180 -0
- package/dist/repl/slash/side.d.ts +9 -0
- package/dist/repl/slash/side.js +27 -0
- package/dist/repl/slash/sprint.d.ts +2 -0
- package/dist/repl/slash/sprint.js +189 -0
- package/dist/repl/slash/team.d.ts +15 -0
- package/dist/repl/slash/team.js +235 -0
- package/dist/repl/slash/theme.d.ts +10 -0
- package/dist/repl/slash/theme.js +112 -0
- package/dist/repl/slash/types.d.ts +30 -0
- package/dist/repl/slash/types.js +2 -0
- package/dist/repl/slash/verbose.d.ts +18 -0
- package/dist/repl/slash/verbose.js +38 -0
- package/dist/repl/slash/verify.d.ts +10 -0
- package/dist/repl/slash/verify.js +171 -0
- package/dist/repl/slash/voice.d.ts +5 -0
- package/dist/repl/slash/voice.js +72 -0
- package/dist/repl/slash-git.d.ts +2 -0
- package/dist/repl/slash-git.js +132 -0
- package/dist/repl/slash-workflow.d.ts +2 -0
- package/dist/repl/slash-workflow.js +108 -0
- package/dist/repl/themes.d.ts +24 -0
- package/dist/repl/themes.js +253 -0
- package/dist/runtime/host-tools.d.ts +63 -0
- package/dist/runtime/host-tools.js +204 -0
- package/dist/runtime/index.d.ts +25 -0
- package/dist/runtime/index.js +19 -0
- package/dist/runtime/isolate.d.ts +88 -0
- package/dist/runtime/isolate.js +277 -0
- package/dist/runtime/mount.d.ts +105 -0
- package/dist/runtime/mount.js +458 -0
- package/dist/runtime/multiplayer.d.ts +128 -0
- package/dist/runtime/multiplayer.js +285 -0
- package/dist/runtime/network-control.d.ts +65 -0
- package/dist/runtime/network-control.js +195 -0
- package/dist/runtime/transcript.d.ts +128 -0
- package/dist/runtime/transcript.js +252 -0
- package/dist/runtime/wasm-commands.d.ts +27 -0
- package/dist/runtime/wasm-commands.js +156 -0
- package/dist/security/capabilityTokens.d.ts +44 -0
- package/dist/security/capabilityTokens.js +122 -0
- package/dist/security/csrf.d.ts +53 -0
- package/dist/security/csrf.js +181 -0
- package/dist/security/index.d.ts +6 -0
- package/dist/security/index.js +6 -0
- package/dist/security/rules.d.ts +12 -0
- package/dist/security/rules.js +212 -0
- package/dist/security/safeShell.d.ts +19 -0
- package/dist/security/safeShell.js +82 -0
- package/dist/security/scanner.d.ts +22 -0
- package/dist/security/scanner.js +190 -0
- package/dist/security/types.d.ts +53 -0
- package/dist/security/types.js +6 -0
- package/dist/services/UnifiedAgentClient.d.ts +75 -0
- package/dist/services/UnifiedAgentClient.js +180 -0
- package/dist/services/memory/feature-flag.d.ts +38 -0
- package/dist/services/memory/feature-flag.js +95 -0
- package/dist/services/memory/gepa-wrapper.d.ts +38 -0
- package/dist/services/memory/gepa-wrapper.js +177 -0
- package/dist/session/caps.d.ts +9 -0
- package/dist/session/caps.js +46 -0
- package/dist/session/checkpoint.d.ts +4 -0
- package/dist/session/checkpoint.js +91 -0
- package/dist/session/commands/delete.d.ts +2 -0
- package/dist/session/commands/delete.js +22 -0
- package/dist/session/commands/index.d.ts +7 -0
- package/dist/session/commands/index.js +8 -0
- package/dist/session/commands/list.d.ts +2 -0
- package/dist/session/commands/list.js +39 -0
- package/dist/session/commands/load.d.ts +2 -0
- package/dist/session/commands/load.js +35 -0
- package/dist/session/commands/save.d.ts +2 -0
- package/dist/session/commands/save.js +19 -0
- package/dist/session/db.d.ts +21 -0
- package/dist/session/db.js +289 -0
- package/dist/session/memory.d.ts +6 -0
- package/dist/session/memory.js +67 -0
- package/dist/session/persistence.d.ts +35 -0
- package/dist/session/persistence.js +166 -0
- package/dist/setup/hardwareDetect.d.ts +10 -0
- package/dist/setup/hardwareDetect.js +61 -0
- package/dist/setup/localAIPrompt.d.ts +1 -0
- package/dist/setup/localAIPrompt.js +84 -0
- package/dist/setup/modelCurator.d.ts +20 -0
- package/dist/setup/modelCurator.js +171 -0
- package/dist/skills/generator.d.ts +7 -0
- package/dist/skills/generator.js +76 -0
- package/dist/skills/index.d.ts +71 -0
- package/dist/skills/index.js +365 -0
- package/dist/skills/registry.d.ts +37 -0
- package/dist/skills/registry.js +120 -0
- package/dist/sprint/compressor.d.ts +9 -0
- package/dist/sprint/compressor.js +95 -0
- package/dist/sprint/critic.d.ts +12 -0
- package/dist/sprint/critic.js +44 -0
- package/dist/sprint/escalation.d.ts +12 -0
- package/dist/sprint/escalation.js +116 -0
- package/dist/sprint/executor.d.ts +13 -0
- package/dist/sprint/executor.js +231 -0
- package/dist/sprint/journal.d.ts +28 -0
- package/dist/sprint/journal.js +270 -0
- package/dist/sprint/manifest.d.ts +5 -0
- package/dist/sprint/manifest.js +183 -0
- package/dist/sprint/types.d.ts +96 -0
- package/dist/sprint/types.js +5 -0
- package/dist/sprint/verifier.d.ts +2 -0
- package/dist/sprint/verifier.js +152 -0
- package/dist/sprint/watchdog.d.ts +6 -0
- package/dist/sprint/watchdog.js +144 -0
- package/dist/swarm/agents/VerificationQuorum.d.ts +22 -0
- package/dist/swarm/agents/VerificationQuorum.js +146 -0
- package/dist/swarm/agents/WorkerAgent.d.ts +42 -0
- package/dist/swarm/agents/WorkerAgent.js +130 -0
- package/dist/swarm/collaboration/AgentGit.d.ts +39 -0
- package/dist/swarm/collaboration/AgentGit.js +102 -0
- package/dist/swarm/collaboration/CRDT.d.ts +28 -0
- package/dist/swarm/collaboration/CRDT.js +116 -0
- package/dist/swarm/commands.d.ts +5 -0
- package/dist/swarm/commands.js +144 -0
- package/dist/swarm/governance/CostOptimizer.d.ts +40 -0
- package/dist/swarm/governance/CostOptimizer.js +162 -0
- package/dist/swarm/index.d.ts +15 -0
- package/dist/swarm/index.js +16 -0
- package/dist/swarm/orchestration/ColonyManager.d.ts +45 -0
- package/dist/swarm/orchestration/ColonyManager.js +166 -0
- package/dist/swarm/runtime/ModelPool.d.ts +37 -0
- package/dist/swarm/runtime/ModelPool.js +162 -0
- package/dist/swarm/templates/SalesforceDomains.d.ts +25 -0
- package/dist/swarm/templates/SalesforceDomains.js +340 -0
- package/dist/swarm/testing/MacroTestFramework.d.ts +25 -0
- package/dist/swarm/testing/MacroTestFramework.js +109 -0
- package/dist/swarm/testing/MicroTestFramework.d.ts +23 -0
- package/dist/swarm/testing/MicroTestFramework.js +128 -0
- package/dist/swarm/types.d.ts +227 -0
- package/dist/swarm/types.js +5 -0
- package/dist/sync/engine.d.ts +17 -0
- package/dist/sync/engine.js +107 -0
- package/dist/sync/knowledge.d.ts +30 -0
- package/dist/sync/knowledge.js +155 -0
- package/dist/sync/schema.d.ts +1 -0
- package/dist/sync/schema.js +13 -0
- package/dist/sync/session.d.ts +24 -0
- package/dist/sync/session.js +70 -0
- package/dist/sync/types.d.ts +32 -0
- package/dist/sync/types.js +2 -0
- package/dist/sync/wiki-git.d.ts +17 -0
- package/dist/sync/wiki-git.js +80 -0
- package/dist/task/queue.d.ts +36 -0
- package/dist/task/queue.js +97 -0
- package/dist/tools/browser/agent.d.ts +12 -0
- package/dist/tools/browser/agent.js +119 -0
- package/dist/tools/browser/legacy.d.ts +5 -0
- package/dist/tools/browser/legacy.js +66 -0
- package/dist/tools/browser/utils.d.ts +5 -0
- package/dist/tools/browser/utils.js +27 -0
- package/dist/tools/browser/vision.d.ts +2 -0
- package/dist/tools/browser/vision.js +154 -0
- package/dist/tools/browser.d.ts +7 -0
- package/dist/tools/browser.js +100 -0
- package/dist/tools/defs.d.ts +2575 -0
- package/dist/tools/defs.js +129 -0
- package/dist/tools/deploy.d.ts +17 -0
- package/dist/tools/deploy.js +94 -0
- package/dist/tools/diff-util.d.ts +8 -0
- package/dist/tools/diff-util.js +100 -0
- package/dist/tools/file.d.ts +11 -0
- package/dist/tools/file.js +297 -0
- package/dist/tools/git.d.ts +11 -0
- package/dist/tools/git.js +139 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.js +172 -0
- package/dist/tools/memory-graph.d.ts +21 -0
- package/dist/tools/memory-graph.js +72 -0
- package/dist/tools/memory.d.ts +5 -0
- package/dist/tools/memory.js +55 -0
- package/dist/tools/patch.d.ts +2 -0
- package/dist/tools/patch.js +103 -0
- package/dist/tools/repo.d.ts +2 -0
- package/dist/tools/repo.js +203 -0
- package/dist/tools/sandbox.d.ts +7 -0
- package/dist/tools/sandbox.js +101 -0
- package/dist/tools/search.d.ts +11 -0
- package/dist/tools/search.js +217 -0
- package/dist/tools/session-search.d.ts +2 -0
- package/dist/tools/session-search.js +31 -0
- package/dist/tools/shell-guards.spec.d.ts +1 -0
- package/dist/tools/shell-guards.spec.js +95 -0
- package/dist/tools/shell.d.ts +3 -0
- package/dist/tools/shell.js +241 -0
- package/dist/tools/symbol-graph.d.ts +2 -0
- package/dist/tools/symbol-graph.js +166 -0
- package/dist/tui/App.d.ts +5 -0
- package/dist/tui/App.js +670 -0
- package/dist/tui/TaskQueue.d.ts +68 -0
- package/dist/tui/TaskQueue.js +178 -0
- package/dist/tui/TaskQueueClass.d.ts +18 -0
- package/dist/tui/TaskQueueClass.js +83 -0
- package/dist/tui/TaskQueueTypes.d.ts +20 -0
- package/dist/tui/TaskQueueTypes.js +2 -0
- package/dist/tui/colors.d.ts +6 -0
- package/dist/tui/colors.js +48 -0
- package/dist/tui/commands.d.ts +14 -0
- package/dist/tui/commands.js +109 -0
- package/dist/tui/components/ActivitySummary.d.ts +8 -0
- package/dist/tui/components/ActivitySummary.js +59 -0
- package/dist/tui/components/CodeEditBox.d.ts +42 -0
- package/dist/tui/components/CodeEditBox.js +187 -0
- package/dist/tui/components/CompletedMsg.d.ts +4 -0
- package/dist/tui/components/CompletedMsg.js +40 -0
- package/dist/tui/components/CompletedSystemMsg.d.ts +3 -0
- package/dist/tui/components/CompletedSystemMsg.js +16 -0
- package/dist/tui/components/CompletedToolGroup.d.ts +9 -0
- package/dist/tui/components/CompletedToolGroup.js +47 -0
- package/dist/tui/components/DiffLineItem.d.ts +1 -0
- package/dist/tui/components/DiffLineItem.js +14 -0
- package/dist/tui/components/DiffView.d.ts +2 -0
- package/dist/tui/components/DiffView.js +34 -0
- package/dist/tui/components/ErrorMsg.d.ts +3 -0
- package/dist/tui/components/ErrorMsg.js +24 -0
- package/dist/tui/components/FileComplete.d.ts +8 -0
- package/dist/tui/components/FileComplete.js +18 -0
- package/dist/tui/components/FleetPanel.d.ts +1 -0
- package/dist/tui/components/FleetPanel.js +80 -0
- package/dist/tui/components/HelpOverlay.d.ts +5 -0
- package/dist/tui/components/HelpOverlay.js +88 -0
- package/dist/tui/components/HistorySearch.d.ts +7 -0
- package/dist/tui/components/HistorySearch.js +60 -0
- package/dist/tui/components/InputBox.d.ts +17 -0
- package/dist/tui/components/InputBox.js +57 -0
- package/dist/tui/components/InputHooks.d.ts +12 -0
- package/dist/tui/components/InputHooks.js +214 -0
- package/dist/tui/components/JitterFreeRenderer.d.ts +51 -0
- package/dist/tui/components/JitterFreeRenderer.js +289 -0
- package/dist/tui/components/KeysPicker.d.ts +1 -0
- package/dist/tui/components/KeysPicker.js +54 -0
- package/dist/tui/components/LiveThinkingNode.d.ts +1 -0
- package/dist/tui/components/LiveThinkingNode.js +8 -0
- package/dist/tui/components/LiveView.d.ts +1 -0
- package/dist/tui/components/LiveView.js +34 -0
- package/dist/tui/components/LocalModelRow.d.ts +1 -0
- package/dist/tui/components/LocalModelRow.js +9 -0
- package/dist/tui/components/ModelPicker.d.ts +1 -0
- package/dist/tui/components/ModelPicker.js +41 -0
- package/dist/tui/components/ModelRow.d.ts +1 -0
- package/dist/tui/components/ModelRow.js +8 -0
- package/dist/tui/components/ScrollLogic.d.ts +11 -0
- package/dist/tui/components/ScrollLogic.js +38 -0
- package/dist/tui/components/ScrollView.d.ts +7 -0
- package/dist/tui/components/ScrollView.js +45 -0
- package/dist/tui/components/SessionPicker.d.ts +14 -0
- package/dist/tui/components/SessionPicker.js +37 -0
- package/dist/tui/components/SlashHint.d.ts +3 -0
- package/dist/tui/components/SlashHint.js +16 -0
- package/dist/tui/components/SprintHelpers.d.ts +3 -0
- package/dist/tui/components/SprintHelpers.js +15 -0
- package/dist/tui/components/SprintStatus.d.ts +2 -0
- package/dist/tui/components/SprintStatus.js +31 -0
- package/dist/tui/components/SprintTaskRow.d.ts +1 -0
- package/dist/tui/components/SprintTaskRow.js +8 -0
- package/dist/tui/components/StatusBar.d.ts +16 -0
- package/dist/tui/components/StatusBar.js +29 -0
- package/dist/tui/components/__demos__/CodeEditDemo.d.ts +8 -0
- package/dist/tui/components/__demos__/CodeEditDemo.js +85 -0
- package/dist/tui/components/code-edit/CodeEditBox.d.ts +7 -0
- package/dist/tui/components/code-edit/CodeEditBox.js +16 -0
- package/dist/tui/components/code-edit/components/EditBadge.d.ts +10 -0
- package/dist/tui/components/code-edit/components/EditBadge.js +14 -0
- package/dist/tui/components/code-edit/components/EditItem.d.ts +7 -0
- package/dist/tui/components/code-edit/components/EditItem.js +20 -0
- package/dist/tui/components/code-edit/components/SyntaxHighlighter.d.ts +11 -0
- package/dist/tui/components/code-edit/components/SyntaxHighlighter.js +43 -0
- package/dist/tui/components/code-edit/index.d.ts +17 -0
- package/dist/tui/components/code-edit/index.js +29 -0
- package/dist/tui/components/code-edit/patterns/index.d.ts +6 -0
- package/dist/tui/components/code-edit/patterns/index.js +38 -0
- package/dist/tui/components/code-edit/patterns/javascript.d.ts +5 -0
- package/dist/tui/components/code-edit/patterns/javascript.js +17 -0
- package/dist/tui/components/code-edit/patterns/python.d.ts +5 -0
- package/dist/tui/components/code-edit/patterns/python.js +14 -0
- package/dist/tui/components/code-edit/patterns/typescript.d.ts +5 -0
- package/dist/tui/components/code-edit/patterns/typescript.js +20 -0
- package/dist/tui/components/code-edit/types.d.ts +32 -0
- package/dist/tui/components/code-edit/types.js +5 -0
- package/dist/tui/components/code-edit/utils.d.ts +8 -0
- package/dist/tui/components/code-edit/utils.js +35 -0
- package/dist/tui/components/jitter-free/FrameController.d.ts +13 -0
- package/dist/tui/components/jitter-free/FrameController.js +44 -0
- package/dist/tui/components/jitter-free/JitterFreeRenderer.d.ts +7 -0
- package/dist/tui/components/jitter-free/JitterFreeRenderer.js +22 -0
- package/dist/tui/components/jitter-free/SmoothSpinner.d.ts +7 -0
- package/dist/tui/components/jitter-free/SmoothSpinner.js +23 -0
- package/dist/tui/components/jitter-free/StableCursor.d.ts +7 -0
- package/dist/tui/components/jitter-free/StableCursor.js +15 -0
- package/dist/tui/components/jitter-free/StableScroll.d.ts +7 -0
- package/dist/tui/components/jitter-free/StableScroll.js +27 -0
- package/dist/tui/components/jitter-free/config.d.ts +7 -0
- package/dist/tui/components/jitter-free/config.js +8 -0
- package/dist/tui/components/jitter-free/hooks/index.d.ts +6 -0
- package/dist/tui/components/jitter-free/hooks/index.js +7 -0
- package/dist/tui/components/jitter-free/hooks/useDebounceRender.d.ts +9 -0
- package/dist/tui/components/jitter-free/hooks/useDebounceRender.js +33 -0
- package/dist/tui/components/jitter-free/hooks/useDoubleBuffer.d.ts +10 -0
- package/dist/tui/components/jitter-free/hooks/useDoubleBuffer.js +24 -0
- package/dist/tui/components/jitter-free/hooks/useScrollBuffer.d.ts +9 -0
- package/dist/tui/components/jitter-free/hooks/useScrollBuffer.js +25 -0
- package/dist/tui/components/jitter-free/index.d.ts +12 -0
- package/dist/tui/components/jitter-free/index.js +17 -0
- package/dist/tui/components/jitter-free/types.d.ts +26 -0
- package/dist/tui/components/jitter-free/types.js +5 -0
- package/dist/tui/components/jitter-free/utils.d.ts +15 -0
- package/dist/tui/components/jitter-free/utils.js +46 -0
- package/dist/tui/components/stream/StreamContainer.d.ts +6 -0
- package/dist/tui/components/stream/StreamContainer.js +75 -0
- package/dist/tui/components/stream/ThinkingStream.d.ts +13 -0
- package/dist/tui/components/stream/ThinkingStream.js +21 -0
- package/dist/tui/components/stream/ToolCallArgs.d.ts +3 -0
- package/dist/tui/components/stream/ToolCallArgs.js +7 -0
- package/dist/tui/components/stream/ToolCallBox.d.ts +13 -0
- package/dist/tui/components/stream/ToolCallBox.js +13 -0
- package/dist/tui/components/stream/ToolItem.d.ts +1 -0
- package/dist/tui/components/stream/ToolItem.js +59 -0
- package/dist/tui/components/stream/index.d.ts +9 -0
- package/dist/tui/components/stream/index.js +8 -0
- package/dist/tui/components/stream/types.d.ts +20 -0
- package/dist/tui/components/stream/types.js +2 -0
- package/dist/tui/components/useKeyInput.d.ts +6 -0
- package/dist/tui/components/useKeyInput.js +28 -0
- package/dist/tui/constants.d.ts +7 -0
- package/dist/tui/constants.js +7 -0
- package/dist/tui/helpers/grapheme.d.ts +27 -0
- package/dist/tui/helpers/grapheme.js +116 -0
- package/dist/tui/helpers.d.ts +7 -0
- package/dist/tui/helpers.js +43 -0
- package/dist/tui/index.d.ts +5 -0
- package/dist/tui/index.js +70 -0
- package/dist/tui/input/index.d.ts +5 -0
- package/dist/tui/input/index.js +2 -0
- package/dist/tui/keybindings.d.ts +10 -0
- package/dist/tui/keybindings.js +94 -0
- package/dist/tui/logo.d.ts +1 -0
- package/dist/tui/logo.js +57 -0
- package/dist/tui/markdown.d.ts +6 -0
- package/dist/tui/markdown.js +27 -0
- package/dist/tui/models.d.ts +142 -0
- package/dist/tui/models.js +47 -0
- package/dist/tui/polyfill.d.ts +3 -0
- package/dist/tui/polyfill.js +20 -0
- package/dist/tui/startup-cta.d.ts +18 -0
- package/dist/tui/startup-cta.js +123 -0
- package/dist/tui/syntax-languages.d.ts +4 -0
- package/dist/tui/syntax-languages.js +42 -0
- package/dist/tui/syntax-tokenizer.d.ts +7 -0
- package/dist/tui/syntax-tokenizer.js +137 -0
- package/dist/tui/syntax.d.ts +2 -0
- package/dist/tui/syntax.js +27 -0
- package/dist/tui/system.d.ts +5 -0
- package/dist/tui/system.js +29 -0
- package/dist/tui/themes.d.ts +19 -0
- package/dist/tui/themes.js +75 -0
- package/dist/tui/tui-types.d.ts +28 -0
- package/dist/tui/tui-types.js +2 -0
- package/dist/tui/useAppProcessor.d.ts +5 -0
- package/dist/tui/useAppProcessor.js +63 -0
- package/dist/tui/useAppSession.d.ts +26 -0
- package/dist/tui/useAppSession.js +57 -0
- package/dist/tui/useAppTaskQueue.d.ts +13 -0
- package/dist/tui/useAppTaskQueue.js +26 -0
- package/dist/tui/useStreamThrottle.d.ts +11 -0
- package/dist/tui/useStreamThrottle.js +39 -0
- package/dist/types.d.ts +182 -0
- package/dist/types.js +13 -0
- package/dist/utils/auth.d.ts +5 -0
- package/dist/utils/auth.js +46 -0
- package/dist/utils/config.d.ts +9 -0
- package/dist/utils/config.js +100 -0
- package/dist/utils/context.d.ts +4 -0
- package/dist/utils/context.js +142 -0
- package/dist/utils/credentials.d.ts +23 -0
- package/dist/utils/credentials.js +69 -0
- package/dist/utils/execution-controller.d.ts +45 -0
- package/dist/utils/execution-controller.js +228 -0
- package/dist/utils/experimental.d.ts +16 -0
- package/dist/utils/experimental.js +23 -0
- package/dist/utils/features.d.ts +18 -0
- package/dist/utils/features.js +38 -0
- package/dist/utils/health-monitor.d.ts +49 -0
- package/dist/utils/health-monitor.js +159 -0
- package/dist/utils/id.d.ts +19 -0
- package/dist/utils/id.js +42 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.js +13 -0
- package/dist/utils/keys.d.ts +12 -0
- package/dist/utils/keys.js +50 -0
- package/dist/utils/logger.d.ts +12 -0
- package/dist/utils/logger.js +89 -0
- package/dist/utils/metrics.d.ts +12 -0
- package/dist/utils/metrics.js +36 -0
- package/dist/utils/paste-handler.d.ts +26 -0
- package/dist/utils/paste-handler.js +140 -0
- package/dist/utils/profile.d.ts +16 -0
- package/dist/utils/profile.js +68 -0
- package/dist/utils/project-tracker.d.ts +8 -0
- package/dist/utils/project-tracker.js +66 -0
- package/dist/utils/safe-exec.d.ts +20 -0
- package/dist/utils/safe-exec.js +32 -0
- package/dist/utils/security-boundary.d.ts +53 -0
- package/dist/utils/security-boundary.js +145 -0
- package/dist/utils/session-cache.d.ts +29 -0
- package/dist/utils/session-cache.js +112 -0
- package/dist/utils/soul.d.ts +4 -0
- package/dist/utils/soul.js +104 -0
- package/dist/utils/sqlite-future.d.ts +35 -0
- package/dist/utils/sqlite-future.js +66 -0
- package/dist/utils/sqlite.d.ts +35 -0
- package/dist/utils/sqlite.js +65 -0
- package/dist/utils/startup-profiler.d.ts +26 -0
- package/dist/utils/startup-profiler.js +61 -0
- package/dist/utils/state.d.ts +9 -0
- package/dist/utils/state.js +29 -0
- package/dist/utils/sum.d.ts +6 -0
- package/dist/utils/sum.js +11 -0
- package/dist/utils/token-counter.d.ts +18 -0
- package/dist/utils/token-counter.js +84 -0
- package/dist/utils/unified-memory.d.ts +80 -0
- package/dist/utils/unified-memory.js +171 -0
- package/dist/utils/update-verify.d.ts +7 -0
- package/dist/utils/update-verify.js +64 -0
- package/dist/voice/browser-extension.d.ts +37 -0
- package/dist/voice/browser-extension.js +97 -0
- package/dist/voice/commands.d.ts +5 -0
- package/dist/voice/commands.js +65 -0
- package/dist/voice/desktop.d.ts +42 -0
- package/dist/voice/desktop.js +254 -0
- package/dist/voice/index.d.ts +16 -0
- package/dist/voice/index.js +123 -0
- package/dist/voice/mobile-bridge.d.ts +12 -0
- package/dist/voice/mobile-bridge.js +139 -0
- package/dist/voice/personal-plex.d.ts +61 -0
- package/dist/voice/personal-plex.js +280 -0
- package/dist/voice/plex.d.ts +19 -0
- package/dist/voice/plex.js +55 -0
- package/dist/voice/recorder.d.ts +10 -0
- package/dist/voice/recorder.js +43 -0
- package/dist/voice/shortcuts.d.ts +16 -0
- package/dist/voice/shortcuts.js +31 -0
- package/dist/voice/transcribe.d.ts +3 -0
- package/dist/voice/transcribe.js +36 -0
- package/dist/voice/tts.d.ts +35 -0
- package/dist/voice/tts.js +190 -0
- package/dist/voice/types.d.ts +25 -0
- package/dist/voice/types.js +2 -0
- package/dist/workspace/store.d.ts +48 -0
- package/dist/workspace/store.js +106 -0
- package/dist_v2/audit/writer.d.ts +23 -0
- package/dist_v2/audit/writer.js +34 -0
- package/dist_v2/auth/keypool.d.ts +62 -0
- package/dist_v2/auth/keypool.js +211 -0
- package/dist_v2/auth/keystore.d.ts +20 -0
- package/dist_v2/auth/keystore.js +45 -0
- package/dist_v2/auth/providers.d.ts +35 -0
- package/dist_v2/auth/providers.js +66 -0
- package/dist_v2/cli/config.d.ts +51 -0
- package/dist_v2/cli/flags.d.ts +5 -0
- package/dist_v2/cli/flags.js +23 -0
- package/dist_v2/cli/interactive.js +65 -7
- package/dist_v2/cli/main.js +331 -13
- package/dist_v2/cli/setup.js +2 -2
- package/dist_v2/cli/slash/fleet.d.ts +5 -3
- package/dist_v2/cli/slash/fleet.js +40 -13
- package/dist_v2/cli/subcommands/ask.js +3 -1
- package/dist_v2/cli/subcommands/audit-codebase.d.ts +18 -0
- package/dist_v2/cli/subcommands/audit-codebase.js +148 -0
- package/dist_v2/cli/subcommands/audit.js +36 -11
- package/dist_v2/cli/subcommands/chat.js +3 -1
- package/dist_v2/cli/subcommands/cost.d.ts +15 -0
- package/dist_v2/cli/subcommands/cost.js +143 -0
- package/dist_v2/cli/subcommands/index.js +20 -0
- package/dist_v2/cli/subcommands/kb.d.ts +19 -0
- package/dist_v2/cli/subcommands/kb.js +151 -0
- package/dist_v2/cli/subcommands/keys.js +117 -26
- package/dist_v2/cli/subcommands/ledger.d.ts +9 -0
- package/dist_v2/cli/subcommands/ledger.js +130 -0
- package/dist_v2/cli/subcommands/login.d.ts +9 -4
- package/dist_v2/cli/subcommands/login.js +92 -5
- package/dist_v2/cli/subcommands/memory.d.ts +10 -0
- package/dist_v2/cli/subcommands/memory.js +140 -0
- package/dist_v2/cli/subcommands/models.js +80 -3
- package/dist_v2/cli/subcommands/resume.d.ts +11 -0
- package/dist_v2/cli/subcommands/resume.js +138 -0
- package/dist_v2/cli/subcommands/skills.d.ts +14 -0
- package/dist_v2/cli/subcommands/skills.js +207 -0
- package/dist_v2/cli/subcommands/undo.d.ts +17 -0
- package/dist_v2/cli/subcommands/undo.js +144 -0
- package/dist_v2/cli/subcommands/update.d.ts +42 -0
- package/dist_v2/cli/subcommands/update.js +228 -0
- package/dist_v2/cli/subcommands/verify.d.ts +21 -0
- package/dist_v2/cli/subcommands/verify.js +126 -0
- package/dist_v2/context/compaction.d.ts +22 -0
- package/dist_v2/context/compaction.js +38 -0
- package/dist_v2/context/default-soul.md +36 -0
- package/dist_v2/context/git-state.d.ts +23 -0
- package/dist_v2/context/git-state.js +71 -0
- package/dist_v2/context/ledger.d.ts +58 -0
- package/dist_v2/context/ledger.js +178 -0
- package/dist_v2/context/mode-enforcement.d.ts +32 -0
- package/dist_v2/context/mode-enforcement.js +96 -0
- package/dist_v2/context/mode.d.ts +1 -1
- package/dist_v2/context/mode.js +5 -1
- package/dist_v2/context/primer.d.ts +45 -0
- package/dist_v2/context/primer.js +81 -0
- package/dist_v2/context/soul.d.ts +31 -0
- package/dist_v2/context/soul.js +63 -0
- package/dist_v2/extensions/api.d.ts +65 -0
- package/dist_v2/extensions/api.js +126 -0
- package/dist_v2/fleet/cli-command.js +56 -6
- package/dist_v2/fleet/runner.js +18 -4
- package/dist_v2/fleet/types.d.ts +4 -0
- package/dist_v2/hooks/config-bridge.d.ts +22 -0
- package/dist_v2/hooks/config-bridge.js +117 -0
- package/dist_v2/intelligence/models-refresh.d.ts +52 -0
- package/dist_v2/intelligence/models-refresh.js +82 -0
- package/dist_v2/intelligence/prices.d.ts +46 -0
- package/dist_v2/intelligence/prices.js +241 -3
- package/dist_v2/kernel/agent-loop.js +10 -0
- package/dist_v2/mcp/client.d.ts +5 -1
- package/dist_v2/mcp/client.js +34 -4
- package/dist_v2/mcp/loader.d.ts +36 -0
- package/dist_v2/mcp/loader.js +51 -0
- package/dist_v2/mcp/transport.d.ts +44 -0
- package/dist_v2/mcp/transport.js +120 -0
- package/dist_v2/providers/define-openai-compat.d.ts +53 -0
- package/dist_v2/providers/define-openai-compat.js +69 -0
- package/dist_v2/providers/dispatch.js +22 -20
- package/dist_v2/providers/nvidia.js +4 -1
- package/dist_v2/providers/openai-compat.js +49 -2
- package/dist_v2/providers/openrouter.js +7 -2
- package/dist_v2/providers/presets.d.ts +30 -0
- package/dist_v2/providers/presets.js +80 -0
- package/dist_v2/providers/rate-limiter.d.ts +50 -0
- package/dist_v2/providers/rate-limiter.js +93 -0
- package/dist_v2/security/skill-scanner.d.ts +43 -0
- package/dist_v2/security/skill-scanner.js +144 -0
- package/dist_v2/skills/loader.js +50 -5
- package/dist_v2/tools/git.js +8 -0
- package/dist_v2/tui/ink/App.js +143 -13
- package/dist_v2/tui/ink/components/ModelPicker.js +7 -1
- package/dist_v2/tui/ink/components/StatusBar.d.ts +8 -0
- package/dist_v2/tui/ink/components/StatusBar.js +20 -1
- package/dist_v2/tui/renderer.js +45 -2
- package/dist_v2/tui/theme-loader.d.ts +29 -0
- package/dist_v2/tui/theme-loader.js +67 -0
- package/docs/ARCHITECTURE.md +163 -0
- package/docs/ROADMAP.md +52 -0
- package/docs/agents/arniko-plugin-spec.md +123 -0
- package/docs/agents/files-and-search.md +87 -0
- package/docs/agents/skill-security.md +127 -0
- package/docs/architecture/001-dependency-pinning.md +37 -0
- package/docs/architecture/002-mesh-security.md +36 -0
- package/docs/architecture/003-file-size-limits.md +37 -0
- package/docs/architecture/004-trust-levels.md +40 -0
- package/docs/audits/HY3-AUDIT-2026-04-25.md +47 -0
- package/docs/memory/architecture-efficiency.md +114 -0
- package/docs/memory/km-architecture.md +116 -0
- package/extensions/vscode/README.md +67 -0
- package/extensions/vscode/package.json +105 -0
- package/package.json +62 -94
- package/promo/assets/audio/dirgha-ambient-150s.m4a +0 -0
- package/promo/hyperframes.json +9 -0
- package/promo/index.html +363 -0
- package/promo/meta.json +5 -0
- package/scripts/gen-skill-md.mjs +97 -0
- package/scripts/preview-logos.mjs +113 -0
- package/scripts/qa-app/aliases_test.mjs +70 -0
- package/scripts/qa-app/audit_test.mjs +71 -0
- package/scripts/qa-app/browser_test.mjs +60 -0
- package/scripts/qa-app/cancel_offline_test.mjs +151 -0
- package/scripts/qa-app/cancel_test.mjs +112 -0
- package/scripts/qa-app/checkpoint_test.mjs +87 -0
- package/scripts/qa-app/compaction_test.mjs +112 -0
- package/scripts/qa-app/cost_test.mjs +72 -0
- package/scripts/qa-app/error_classifier_test.mjs +81 -0
- package/scripts/qa-app/extensions_test.mjs +148 -0
- package/scripts/qa-app/git_state_test.mjs +89 -0
- package/scripts/qa-app/hooks_test.mjs +105 -0
- package/scripts/qa-app/ink_smoke.py +151 -0
- package/scripts/qa-app/ink_unit_test.mjs +176 -0
- package/scripts/qa-app/kb_test.mjs +85 -0
- package/scripts/qa-app/kernel_hooks_test.mjs +178 -0
- package/scripts/qa-app/keypool_test.mjs +105 -0
- package/scripts/qa-app/keys_test.mjs +73 -0
- package/scripts/qa-app/ledger_search_test.mjs +74 -0
- package/scripts/qa-app/ledger_test.mjs +73 -0
- package/scripts/qa-app/login_byok_test.mjs +84 -0
- package/scripts/qa-app/mcp_oauth_test.mjs +109 -0
- package/scripts/qa-app/mcp_test.mjs +129 -0
- package/scripts/qa-app/mode_enforcement_test.mjs +88 -0
- package/scripts/qa-app/models_refresh_test.mjs +155 -0
- package/scripts/qa-app/nim_stream_test.mjs +132 -0
- package/scripts/qa-app/output/admin-secrets.json +17 -0
- package/scripts/qa-app/output/admin-secrets.png +0 -0
- package/scripts/qa-app/output/agents.json +17 -0
- package/scripts/qa-app/output/agents.png +0 -0
- package/scripts/qa-app/output/build.json +17 -0
- package/scripts/qa-app/output/build.png +0 -0
- package/scripts/qa-app/output/chat.json +17 -0
- package/scripts/qa-app/output/chat.png +0 -0
- package/scripts/qa-app/output/deploy.json +17 -0
- package/scripts/qa-app/output/deploy.png +0 -0
- package/scripts/qa-app/output/home.json +20 -0
- package/scripts/qa-app/output/home.png +0 -0
- package/scripts/qa-app/output/media.json +17 -0
- package/scripts/qa-app/output/media.png +0 -0
- package/scripts/qa-app/output/memory.json +17 -0
- package/scripts/qa-app/output/memory.png +0 -0
- package/scripts/qa-app/output/models.json +17 -0
- package/scripts/qa-app/output/models.png +0 -0
- package/scripts/qa-app/output/report.json +240 -0
- package/scripts/qa-app/output/report.md +307 -0
- package/scripts/qa-app/output/research.json +17 -0
- package/scripts/qa-app/output/research.png +0 -0
- package/scripts/qa-app/output/security.json +17 -0
- package/scripts/qa-app/output/security.png +0 -0
- package/scripts/qa-app/output/settings.json +17 -0
- package/scripts/qa-app/output/settings.png +0 -0
- package/scripts/qa-app/output/skills.json +17 -0
- package/scripts/qa-app/output/skills.png +0 -0
- package/scripts/qa-app/output/store.json +17 -0
- package/scripts/qa-app/output/store.png +0 -0
- package/scripts/qa-app/primer_test.mjs +71 -0
- package/scripts/qa-app/provider_matrix.mjs +176 -0
- package/scripts/qa-app/qa.py +271 -0
- package/scripts/qa-app/rate_limit_test.mjs +127 -0
- package/scripts/qa-app/registry_test.mjs +57 -0
- package/scripts/qa-app/rescore.py +87 -0
- package/scripts/qa-app/routes.json +20 -0
- package/scripts/qa-app/run-all.mjs +158 -0
- package/scripts/qa-app/session_test.mjs +81 -0
- package/scripts/qa-app/skill_scanner_test.mjs +156 -0
- package/scripts/qa-app/skills_install_test.mjs +100 -0
- package/scripts/qa-app/skills_test.mjs +98 -0
- package/scripts/qa-app/slash_audit.mjs +97 -0
- package/scripts/qa-app/soul_test.mjs +79 -0
- package/scripts/qa-app/task_tool_test.mjs +148 -0
- package/scripts/qa-app/themes_test.mjs +56 -0
- package/scripts/qa-app/tmux_debug.sh +37 -0
- package/scripts/qa-app/tmux_minimal.sh +66 -0
- package/scripts/qa-app/tmux_smoke.sh +119 -0
- package/scripts/qa-app/tokrate_test.mjs +108 -0
- package/scripts/qa-app/tool_registry_test.mjs +118 -0
- package/scripts/qa-app/tools_smoke.mjs +90 -0
- package/scripts/qa-app/transport_test.mjs +88 -0
- package/scripts/qa-app/undo_test.mjs +136 -0
- package/scripts/qa-app/update_test.mjs +94 -0
- package/scripts/test-browser-integration.sh +162 -0
- package/scripts/verify-deps.sh +19 -0
- package/src_v2/README.md +43 -0
- package/src_v2/acp/index.ts +1 -0
- package/src_v2/acp/server.ts +162 -0
- package/src_v2/audit/writer.ts +43 -0
- package/src_v2/auth/keypool.ts +216 -0
- package/src_v2/auth/keystore.ts +43 -0
- package/src_v2/auth/providers.ts +83 -0
- package/src_v2/cli/auth-cmd.ts +78 -0
- package/src_v2/cli/config.ts +130 -0
- package/src_v2/cli/flags.ts +75 -0
- package/src_v2/cli/flows/full-cycle.ts +72 -0
- package/src_v2/cli/flows/index.ts +2 -0
- package/src_v2/cli/flows/tarball.ts +55 -0
- package/src_v2/cli/index.ts +4 -0
- package/src_v2/cli/interactive.ts +307 -0
- package/src_v2/cli/main.ts +486 -0
- package/src_v2/cli/models-cmd.ts +62 -0
- package/src_v2/cli/setup.ts +143 -0
- package/src_v2/cli/slash/account.ts +62 -0
- package/src_v2/cli/slash/clear.ts +17 -0
- package/src_v2/cli/slash/compact.ts +15 -0
- package/src_v2/cli/slash/config.ts +53 -0
- package/src_v2/cli/slash/exit.ts +18 -0
- package/src_v2/cli/slash/fleet.ts +52 -0
- package/src_v2/cli/slash/help.ts +35 -0
- package/src_v2/cli/slash/history.ts +41 -0
- package/src_v2/cli/slash/index.ts +79 -0
- package/src_v2/cli/slash/init.ts +62 -0
- package/src_v2/cli/slash/keys.ts +102 -0
- package/src_v2/cli/slash/login.ts +55 -0
- package/src_v2/cli/slash/memory.ts +102 -0
- package/src_v2/cli/slash/mode.ts +32 -0
- package/src_v2/cli/slash/models.ts +79 -0
- package/src_v2/cli/slash/resume.ts +26 -0
- package/src_v2/cli/slash/session.ts +73 -0
- package/src_v2/cli/slash/setup.ts +48 -0
- package/src_v2/cli/slash/status.ts +38 -0
- package/src_v2/cli/slash/theme.ts +54 -0
- package/src_v2/cli/slash/types.ts +16 -0
- package/src_v2/cli/slash/upgrade.ts +73 -0
- package/src_v2/cli/slash.ts +128 -0
- package/src_v2/cli/subcommands/ask.ts +83 -0
- package/src_v2/cli/subcommands/audit-codebase.ts +161 -0
- package/src_v2/cli/subcommands/audit.ts +152 -0
- package/src_v2/cli/subcommands/chat.ts +72 -0
- package/src_v2/cli/subcommands/compact.ts +110 -0
- package/src_v2/cli/subcommands/cost.ts +157 -0
- package/src_v2/cli/subcommands/doctor.ts +121 -0
- package/src_v2/cli/subcommands/export-session.ts +63 -0
- package/src_v2/cli/subcommands/import-session.ts +87 -0
- package/src_v2/cli/subcommands/index.ts +99 -0
- package/src_v2/cli/subcommands/init.ts +78 -0
- package/src_v2/cli/subcommands/kb.ts +151 -0
- package/src_v2/cli/subcommands/keys.ts +197 -0
- package/src_v2/cli/subcommands/ledger.ts +118 -0
- package/src_v2/cli/subcommands/login.ts +149 -0
- package/src_v2/cli/subcommands/logout.ts +24 -0
- package/src_v2/cli/subcommands/memory.ts +124 -0
- package/src_v2/cli/subcommands/models.ts +210 -0
- package/src_v2/cli/subcommands/resume.ts +142 -0
- package/src_v2/cli/subcommands/setup.ts +111 -0
- package/src_v2/cli/subcommands/skills.ts +190 -0
- package/src_v2/cli/subcommands/stats.ts +151 -0
- package/src_v2/cli/subcommands/status.ts +101 -0
- package/src_v2/cli/subcommands/undo.ts +139 -0
- package/src_v2/cli/subcommands/update.ts +219 -0
- package/src_v2/cli/subcommands/verify.ts +147 -0
- package/src_v2/cli/submit-paper.ts +94 -0
- package/src_v2/context/_fts.ts +251 -0
- package/src_v2/context/branch.ts +86 -0
- package/src_v2/context/compaction.ts +199 -0
- package/src_v2/context/default-soul.md +36 -0
- package/src_v2/context/git-state.ts +78 -0
- package/src_v2/context/index.ts +5 -0
- package/src_v2/context/knowledge.ts +181 -0
- package/src_v2/context/ledger.ts +197 -0
- package/src_v2/context/memory.ts +337 -0
- package/src_v2/context/mode-enforcement.ts +87 -0
- package/src_v2/context/mode.ts +97 -0
- package/src_v2/context/primer.ts +88 -0
- package/src_v2/context/session.ts +115 -0
- package/src_v2/context/soul.ts +72 -0
- package/src_v2/daemon/index.ts +2 -0
- package/src_v2/daemon/protocol.ts +62 -0
- package/src_v2/daemon/server.ts +228 -0
- package/src_v2/eval/index.ts +5 -0
- package/src_v2/eval/regression.ts +116 -0
- package/src_v2/eval/reporter.ts +35 -0
- package/src_v2/eval/swe-bench.ts +32 -0
- package/src_v2/eval/terminal-bench.ts +27 -0
- package/src_v2/eval/types.ts +31 -0
- package/src_v2/extensions/api.ts +144 -0
- package/src_v2/fleet/apply-back.ts +210 -0
- package/src_v2/fleet/cli-command.ts +423 -0
- package/src_v2/fleet/index.ts +37 -0
- package/src_v2/fleet/runner.ts +412 -0
- package/src_v2/fleet/tripleshot.ts +282 -0
- package/src_v2/fleet/types.ts +210 -0
- package/src_v2/fleet/worktree.ts +189 -0
- package/src_v2/hooks/config-bridge.ts +116 -0
- package/src_v2/hooks/index.ts +1 -0
- package/src_v2/hooks/registry.ts +57 -0
- package/src_v2/index.ts +51 -0
- package/src_v2/integrations/arniko-client.ts +108 -0
- package/src_v2/integrations/auth.ts +90 -0
- package/src_v2/integrations/billing.ts +184 -0
- package/src_v2/integrations/bucky-client.ts +93 -0
- package/src_v2/integrations/deploy-client.ts +113 -0
- package/src_v2/integrations/device-auth.ts +224 -0
- package/src_v2/integrations/entitlements.ts +80 -0
- package/src_v2/integrations/http.ts +111 -0
- package/src_v2/integrations/index.ts +17 -0
- package/src_v2/intelligence/cost.ts +80 -0
- package/src_v2/intelligence/error-classifier.ts +76 -0
- package/src_v2/intelligence/index.ts +5 -0
- package/src_v2/intelligence/models-refresh.ts +105 -0
- package/src_v2/intelligence/prices.ts +292 -0
- package/src_v2/intelligence/smart-router.ts +75 -0
- package/src_v2/intelligence/telemetry.ts +50 -0
- package/src_v2/kernel/agent-loop.ts +207 -0
- package/src_v2/kernel/event-stream.ts +122 -0
- package/src_v2/kernel/index.ts +4 -0
- package/src_v2/kernel/message.ts +130 -0
- package/src_v2/kernel/types.ts +175 -0
- package/src_v2/mcp/client.ts +132 -0
- package/src_v2/mcp/index.ts +3 -0
- package/src_v2/mcp/loader.ts +76 -0
- package/src_v2/mcp/tool-bridge.ts +42 -0
- package/src_v2/mcp/transport.ts +217 -0
- package/src_v2/parity/index.ts +3 -0
- package/src_v2/parity/mock-openai-compat.ts +49 -0
- package/src_v2/parity/runner.ts +95 -0
- package/src_v2/parity/scenarios.ts +85 -0
- package/src_v2/providers/anthropic.ts +196 -0
- package/src_v2/providers/define-openai-compat.ts +107 -0
- package/src_v2/providers/dispatch.ts +65 -0
- package/src_v2/providers/fireworks.ts +51 -0
- package/src_v2/providers/gemini.ts +184 -0
- package/src_v2/providers/http.ts +201 -0
- package/src_v2/providers/iface.ts +31 -0
- package/src_v2/providers/index.ts +63 -0
- package/src_v2/providers/nvidia.ts +170 -0
- package/src_v2/providers/ollama.ts +45 -0
- package/src_v2/providers/openai-compat.ts +313 -0
- package/src_v2/providers/openai.ts +124 -0
- package/src_v2/providers/openrouter.ts +83 -0
- package/src_v2/providers/presets.ts +90 -0
- package/src_v2/providers/rate-limiter.ts +103 -0
- package/src_v2/safety/approval-bus.ts +65 -0
- package/src_v2/safety/audit-log.ts +100 -0
- package/src_v2/safety/index.ts +4 -0
- package/src_v2/safety/policy.ts +150 -0
- package/src_v2/safety/sandbox/bwrap.ts +51 -0
- package/src_v2/safety/sandbox/iface.ts +33 -0
- package/src_v2/safety/sandbox/index.ts +7 -0
- package/src_v2/safety/sandbox/landlock.ts +29 -0
- package/src_v2/safety/sandbox/noop.ts +60 -0
- package/src_v2/safety/sandbox/seatbelt.ts +53 -0
- package/src_v2/safety/sandbox/select.ts +37 -0
- package/src_v2/safety/sandbox/windows.ts +26 -0
- package/src_v2/security/skill-scanner.ts +167 -0
- package/src_v2/skills/index.ts +3 -0
- package/src_v2/skills/loader.ts +150 -0
- package/src_v2/skills/matcher.ts +66 -0
- package/src_v2/skills/runtime.ts +47 -0
- package/src_v2/subagents/delegator.ts +116 -0
- package/src_v2/subagents/index.ts +2 -0
- package/src_v2/subagents/pool.ts +41 -0
- package/src_v2/tools/browser.ts +249 -0
- package/src_v2/tools/checkpoint.ts +278 -0
- package/src_v2/tools/cron.ts +191 -0
- package/src_v2/tools/diff.ts +109 -0
- package/src_v2/tools/exec.ts +62 -0
- package/src_v2/tools/fs-edit.ts +96 -0
- package/src_v2/tools/fs-ls.ts +64 -0
- package/src_v2/tools/fs-read.ts +70 -0
- package/src_v2/tools/fs-write.ts +57 -0
- package/src_v2/tools/git.ts +78 -0
- package/src_v2/tools/index.ts +56 -0
- package/src_v2/tools/multimodal.ts +492 -0
- package/src_v2/tools/permission.ts +56 -0
- package/src_v2/tools/registry.ts +97 -0
- package/src_v2/tools/search-glob.ts +97 -0
- package/src_v2/tools/search-grep.ts +116 -0
- package/src_v2/tools/shell.ts +97 -0
- package/src_v2/tools/task.ts +49 -0
- package/src_v2/tui/approval.ts +57 -0
- package/src_v2/tui/index.ts +4 -0
- package/src_v2/tui/ink/App.tsx +439 -0
- package/src_v2/tui/ink/components/AtFileComplete.tsx +183 -0
- package/src_v2/tui/ink/components/HelpOverlay.tsx +181 -0
- package/src_v2/tui/ink/components/InputBox.tsx +199 -0
- package/src_v2/tui/ink/components/Logo.tsx +77 -0
- package/src_v2/tui/ink/components/ModelPicker.tsx +148 -0
- package/src_v2/tui/ink/components/PasteCollapse.tsx +98 -0
- package/src_v2/tui/ink/components/StatusBar.tsx +98 -0
- package/src_v2/tui/ink/components/StreamingText.tsx +30 -0
- package/src_v2/tui/ink/components/ThinkingBlock.tsx +39 -0
- package/src_v2/tui/ink/components/ToolBox.tsx +95 -0
- package/src_v2/tui/ink/components/vim-bindings.ts +150 -0
- package/src_v2/tui/ink/index.ts +69 -0
- package/src_v2/tui/ink/use-event-projection.ts +161 -0
- package/src_v2/tui/ink/use-overlays.ts +69 -0
- package/src_v2/tui/renderer.ts +112 -0
- package/src_v2/tui/status-bar.ts +25 -0
- package/src_v2/tui/theme-loader.ts +68 -0
- package/src_v2/tui/theme.ts +81 -0
- package/src_v2/utils/json-repair.ts +47 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsconfig.v2.json +27 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# ADR-002: LibP2P Mesh Security
|
|
2
|
+
|
|
3
|
+
**Status:** Accepted
|
|
4
|
+
**Date:** 2026-04-11
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
P2P networks face threats:
|
|
9
|
+
- DDoS amplification
|
|
10
|
+
- Eclipse attacks
|
|
11
|
+
- Malicious peers
|
|
12
|
+
- Message flooding
|
|
13
|
+
|
|
14
|
+
## Decision
|
|
15
|
+
|
|
16
|
+
Implement defense in depth:
|
|
17
|
+
|
|
18
|
+
1. **Connection Limits:** 50 max connections
|
|
19
|
+
2. **Rate Limiting:** 100 messages/second
|
|
20
|
+
3. **Peer Reputation:** Track and block bad actors
|
|
21
|
+
4. **Message Validation:** Size and content checks
|
|
22
|
+
|
|
23
|
+
## Code
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
export const MESH_SECURITY = {
|
|
27
|
+
maxConnections: 50,
|
|
28
|
+
rateLimitPerSecond: 100,
|
|
29
|
+
maxMessageSize: 10 * 1024 * 1024, // 10MB
|
|
30
|
+
messageTimeoutMs: 30000,
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Verification
|
|
35
|
+
|
|
36
|
+
Tests in `src/mesh/__tests__/security.test.ts`
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# ADR-003: 100-Line File Budget
|
|
2
|
+
|
|
3
|
+
**Status:** Accepted
|
|
4
|
+
**Date:** 2026-04-11
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
Large files reduce:
|
|
9
|
+
- Code readability
|
|
10
|
+
- Testability
|
|
11
|
+
- Review efficiency
|
|
12
|
+
- Maintainability
|
|
13
|
+
|
|
14
|
+
## Decision
|
|
15
|
+
|
|
16
|
+
Enforce 100-line limit per file:
|
|
17
|
+
- Single responsibility
|
|
18
|
+
- Barrel exports for modules
|
|
19
|
+
- Split when approaching limit
|
|
20
|
+
|
|
21
|
+
## Enforcement
|
|
22
|
+
|
|
23
|
+
ESLint rule:
|
|
24
|
+
```javascript
|
|
25
|
+
'max-lines': ['error', { max: 100 }]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Before: src/commands/mesh.ts (324 lines)
|
|
32
|
+
After: src/commands/mesh/*.ts (10 files, avg 32 lines)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Exceptions
|
|
36
|
+
|
|
37
|
+
None. Split into multiple files.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# ADR-004: Session Trust Level System
|
|
2
|
+
|
|
3
|
+
**Status:** Accepted
|
|
4
|
+
**Date:** 2026-04-11
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
Tools can be exploited. Need automatic protection.
|
|
9
|
+
|
|
10
|
+
## Decision
|
|
11
|
+
|
|
12
|
+
Four trust levels with auto-degradation:
|
|
13
|
+
|
|
14
|
+
| Level | Access | Recovery |
|
|
15
|
+
|-------|--------|----------|
|
|
16
|
+
| high | Full | - |
|
|
17
|
+
| medium | Some | 3 clean calls |
|
|
18
|
+
| low | Limited | 3 clean calls |
|
|
19
|
+
| untrusted | Minimal | 3 clean calls |
|
|
20
|
+
|
|
21
|
+
## Triggers for Degradation
|
|
22
|
+
|
|
23
|
+
- eval() detected
|
|
24
|
+
- Function constructor
|
|
25
|
+
- Command patterns
|
|
26
|
+
- Data exfiltration attempts
|
|
27
|
+
|
|
28
|
+
## Implementation
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
function guardToolResult(result: string): void {
|
|
32
|
+
if (containsInjection(result)) {
|
|
33
|
+
sessionTrustLevel = 'untrusted';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Success
|
|
39
|
+
|
|
40
|
+
Security system blocked my own tools during audit - proof it works!
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# dirgha-cli — audit 2026-04-25
|
|
2
|
+
|
|
3
|
+
**Method.** `dirgha -m hy3` (Tencent Hunyuan-3 preview, free via OR) was given the audit prompt at `docs/audits/AUDIT-INPUT.md` and ran 30+ tool calls (fs_read, fs_ls, search_grep) across `src_v2/` and `scripts/qa-app/`. **Hy3 exhausted its 40-turn budget across three compactions (27k→18k, 29k→18k, 31k→9k tokens) before writing the report.** This is real dogfood data: hy3 can navigate large codebases but doesn't yet have the synthesise-and-write-in-one-shot stamina that long audits demand.
|
|
4
|
+
|
|
5
|
+
The findings below were therefore compiled directly from the codebase using the same read-only signals, in the format hy3 was instructed to produce. No code was modified during the audit.
|
|
6
|
+
|
|
7
|
+
| severity | category | file:line | finding | suggested fix |
|
|
8
|
+
|---|---|---|---|---|
|
|
9
|
+
| medium | unused export | `intelligence/cost.ts` (whole module) | `createCostTracker` is exported but no caller uses it at runtime — `dirgha cost` reads the audit log directly via `findPrice`. The tracker has 16/16 tests but is dead code in production. | Either remove the module and let `audit_test`/`cost_test` be the contract, or wire the tracker into the agent loop's `usage` event so per-session totals are correct on `/status`. |
|
|
10
|
+
| medium | weak assertion | `scripts/qa-app/tokrate_test.mjs` | The `everSeen` accumulator concatenates every Ink frame; some `tok/s` assertions match against the union of all frames, not the last steady-state one. A regression that flickers the readout briefly and then hides it would still pass. | Subscribe to `inst.lastFrame` after a setImmediate-backed flush, or assert on `frames.at(-1)` after a 50 ms wait. |
|
|
11
|
+
| low | weak assertion | `scripts/qa-app/skills_install_test.mjs` | "no-SKILL.md install exits non-zero" relies on `r4.status !== 0`, but git can fail for many reasons — a missing `git` binary in CI would also pass this assertion. | Add an explicit `r4.stderr.match(/no SKILL\.md/)` so the test fails if git itself is broken. |
|
|
12
|
+
| low | missing coverage | `intelligence/cost.ts` | The `budget()` method tests cover within / over but not the edge where used === budgetUsd exactly — does that count as within or over? | Add an `equal-cap` case asserting whichever the design intent is. |
|
|
13
|
+
| low | missing coverage | `cli/subcommands/cost.ts` | No offline test of the `dirgha cost` subcommand itself; only of the underlying tracker. | Drive the subcommand via `spawnSync` with a sandboxed audit log. |
|
|
14
|
+
| medium | path concatenation | `intelligence/models-refresh.ts:fetchProviderModels` | `${baseUrl.replace(/\/+$/, '')}/models` works for path-style baseUrls but breaks if a user supplies a baseUrl with a query string like `?foo=bar`. | Use `new URL('models', baseUrl)` or document that baseUrl must be a bare path prefix. |
|
|
15
|
+
| low | cross-platform | `cli/subcommands/update.ts:readOwnVersion` | Walks `..` twice from `import.meta.url` to find package.json. Works in dev + the published package layout, but a user-installed-from-source variant under a non-standard rootDir could miss. | Add a third candidate at `..` once, and fall through to `0.0.0-dev` (already there). Already correct enough; leaving as low. |
|
|
16
|
+
| medium | network without timeout | `intelligence/models-refresh.ts:fetchProviderModels` | The `fetchImpl` call has no per-request timeout — if a provider hangs forever, `Promise.all` in `refreshAllModels` waits forever too. | Wrap each call in `AbortSignal.timeout(15_000)` and treat the abort as `error: 'timeout'` so the per-provider error isolation pattern still holds. |
|
|
17
|
+
| medium | error swallowed | `cli/subcommands/update.ts:runUpgradePackages` | `git pull` exit non-zero is reported on stderr but doesn't increment any counter; `audit:update` just records the success count. A user re-running `dirgha update --packages` won't see which pack failed unless they scroll back the terminal. | Persist the failed-pack list in the audit entry so `dirgha audit search update` surfaces it. |
|
|
18
|
+
| high | security: shell-stringy git URL | `cli/subcommands/skills.ts:install` | `execFileSync('git', ['clone', '--depth=1', url, target])` is safe because we use the array form, BUT the SPEC validates the **derived name** with regex but does NOT validate `url` itself. A URL like `--upload-pack=...` could still be passed. git rejects it because the array form prevents flag injection through positional args, but defensively rejecting URLs that start with `-` is prudent. | Add `if (url.startsWith('-')) reject` at the top of the install handler. |
|
|
19
|
+
| medium | listener leak | `tui/ink/App.tsx:90 / cancel-off path` | `process.on('SIGINT', ...)` is registered for the audit `tail` watcher inside an async function but never `process.removeListener`'d. Multiple invocations within a single Node process (rare in CLI but possible in SDK / RPC mode) leak listeners. | Use `process.once('SIGINT', ...)` or capture and remove in a `finally`. |
|
|
20
|
+
| low | comment-code drift | `kernel/agent-loop.ts:9` | Comment says "Context transform (compaction, skill injection) is invoked once per turn" — actually it's invoked once per `runAgentLoop`, before turn 0, and again before subsequent turns when history mutates. Subtle. | Reword: "...invoked before each provider.stream(req)". |
|
|
21
|
+
| low | duplicate provider list | `cli/subcommands/models.ts:22 PROVIDER_ENV` vs `auth/providers.ts:PROVIDERS` | Two separate hardcoded provider lists. The newer one (`auth/providers.ts`, 17 entries) is the real source of truth; the older one (6 entries) is now stale. | Replace `PROVIDER_ENV` with a derive-from-`listProviders()` helper. |
|
|
22
|
+
| medium | unbounded JSONL read | `cli/subcommands/audit.ts:readEntries` | `readFile` of `events.jsonl` followed by `split('\n')` — fine for normal logs, but a very long-running install would grow this file unbounded. After a year of use, `dirgha audit list 20` reads MB to print 20 lines. | Switch the reader to a stream-from-tail using `fs.openSync` + `fs.readSync` of the last 64 KB. |
|
|
23
|
+
| medium | missing test | `auth/keypool.ts:markExhausted` | Marked "tested" but the actual test only asserts `pickEntry` honors the cooldown, not that a 429 from the runtime calls `markExhausted` automatically. The wiring runtime→pool isn't there yet. | Either add an `agent-loop` integration that calls `markExhausted` on a 429, or document that cooldown is operator-driven for now. |
|
|
24
|
+
| medium | weak assertion | `scripts/qa-app/nim_stream_test.mjs:happy path` | The happy path asserts that text='ok' and thinking includes "We need to respond" — but doesn't assert their TEMPORAL order in the event stream beyond `thinking_start < thinking_delta` and `thinking_end < text_start`. A regression that emits `text_delta` BEFORE `thinking_end` would still pass the size checks. | Stronger: assert `events.findIndex(e => e.type==='text_delta') > events.findIndex(e => e.type==='thinking_end')`. |
|
|
25
|
+
| low | `as any` cast | `tools/browser.ts:86` | `const mod: any = await import('playwright')`. Playwright has types; the cast disables them at the import boundary. | `await import('playwright') as typeof import('playwright')` keeps the surface typed without forcing playwright into the prod dependency tree. |
|
|
26
|
+
| medium | startup work order | `cli/main.ts` | `loadExtensions` runs after BYOK hydration but before provider construction — extensions can't observe the keys their `on('turn_start')` handlers might want, and they CAN clobber the registry before failover wires up. | Document the ordering in a comment, OR move `loadExtensions` to a "post-construction" phase right before `runAgentLoop`. |
|
|
27
|
+
| medium | hyperframes prereq | environment | Project requires Node ≥ 22 for hyperframes, current shell is on 20.20.1. | Document in `docs/install.md` and add `engines.node` to `package.json` once we bump our own minimum. |
|
|
28
|
+
| high | hardcoded path | `scripts/qa-app/*.mjs` | Every test file hardcodes `/root/dirgha-ai/domains/10-computer/cli/dist_v2`. Tests run only from the repo's exact location. | Resolve via `path.resolve(import.meta.url, '../../dist_v2')` so the suite is portable. |
|
|
29
|
+
| low | competitor names in docs | `docs/parity/CLI_PARITY_MATRIX.md` | Per-row notes still reference reference-CLI names. The matrix is a comparison doc — purposeful — but the user has asked for no competitor names anywhere. | Move the file to `docs/_internal/PARITY_MATRIX.md` and replace public `parity/` with a sanitized scoreboard, OR keep it and acknowledge as the one comparison-doc exception. |
|
|
30
|
+
|
|
31
|
+
**Total findings:** 21 (1 high, 8 medium, 12 low).
|
|
32
|
+
|
|
33
|
+
## What hy3 did before exhausting its budget
|
|
34
|
+
|
|
35
|
+
Hy3 visited the following modules during its scan: `cli/main.ts`, `kernel/agent-loop.ts`, `providers/dispatch.ts`, `providers/openai-compat.ts`, `intelligence/prices.ts`, `intelligence/cost.ts`, `auth/keystore.ts`, `auth/keypool.ts`, `tools/registry.ts`, `tools/fs-edit.ts`, `tools/git.ts`, `tools/fs-ls.ts`, `tools/multimodal.ts`, `tools/shell.ts`, `mcp/transport.ts`, `index.ts`, plus `scripts/qa-app/__pycache__` listing. The compactions happened at turns ~13, ~22, and ~30 — meaning the model's working set was being summarised three times before it could write the synthesis.
|
|
36
|
+
|
|
37
|
+
## Practical takeaway
|
|
38
|
+
|
|
39
|
+
For long-horizon audits, the right tool isn't a single multi-turn model. The right tool is dirgha's `fleet` mode: dispatch one sub-agent per module to a fresh context, each writes a `findings/<module>.md` partial, then a synthesis pass compiles. That avoids the compaction loss observed here. Sprint 9-class work, not blocking 1.3.0.
|
|
40
|
+
|
|
41
|
+
## Critical findings to fix before publish
|
|
42
|
+
|
|
43
|
+
1. **High** — `skills install` URL flag-prefix rejection (5 LOC + test).
|
|
44
|
+
2. **High** — `scripts/qa-app/*.mjs` portable resolve (script-wide sed).
|
|
45
|
+
3. **Medium** — `models-refresh` per-request timeout (15 s AbortSignal).
|
|
46
|
+
|
|
47
|
+
The rest are post-1.3.0 follow-ups.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Architecture efficiency — how we avoid bloat and decay
|
|
2
|
+
|
|
3
|
+
How dirgha-cli stays lean, prevents knowledge decay, scales to thousands of docs, and decides what's important.
|
|
4
|
+
|
|
5
|
+
## 1. Leanness — every layer pays for itself
|
|
6
|
+
|
|
7
|
+
Cheap to write = noisy. Expensive to write = curated. This shape forces lower layers to be the firehose and upper layers to be the signal.
|
|
8
|
+
|
|
9
|
+
| Layer | Write cost | Read pattern | Decay mechanism |
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| Audit JSONL | Free (one append per event) | Diagnostic only — model never reads it | Operator rotates the file; nothing depends on old entries |
|
|
12
|
+
| Memory KV | One file per fact, written deliberately | Loaded into context at boot | Stale entries get explicitly removed when a contradiction is noticed |
|
|
13
|
+
| Ledger | Cheap append + agent rewrites the digest | Digest at boot; JSONL searched on demand | Agent compacts when digest exceeds budget |
|
|
14
|
+
| KB (compiled wiki) | Expensive — runs the full ingest pipeline | One reasoning-based query returns 5 ranked snippets | `dirgha kb lint` surfaces orphans, contradictions, stale pages |
|
|
15
|
+
|
|
16
|
+
Three hard rules in the codebase keep individual files from sprawling:
|
|
17
|
+
|
|
18
|
+
- **Every `src_v2/*.ts` ≤ 200 lines.** Verified in audit. When a file approaches the cap, it's a refactor signal, not an exception.
|
|
19
|
+
- **Every system-prompt section is capped.** Soul 4 KB, primer 8 KB, git_state 4 KB. A blown-up section can't drown the others.
|
|
20
|
+
- **Every parity-matrix row closure cites code + test.** No row closes without a runnable assertion. Blocks the "we said we did it but didn't" rot.
|
|
21
|
+
|
|
22
|
+
## 2. Knowledge decay — three forms, three defences
|
|
23
|
+
|
|
24
|
+
Decay shows up in three forms.
|
|
25
|
+
|
|
26
|
+
**Drift** (the doc says X, the code does Y). Defended by:
|
|
27
|
+
- The parity matrix. Every cell has a citation. Delete the cited code and the next test run blows up before the matrix lies for a week.
|
|
28
|
+
- `dirgha kb lint` — surfaces stale wiki pages whose source text changed.
|
|
29
|
+
- `dirgha audit-codebase` — periodic full sweep that compares comment claims to code reality.
|
|
30
|
+
|
|
31
|
+
**Staleness** (the entry was true once, isn't now). Defended by:
|
|
32
|
+
- Timestamps everywhere. `audit.events[].ts`, `keypool[].addedAt`, `models-cache.fetchedAt`. The agent's memory rules say "before recommending from a memory entry, verify it's still true now."
|
|
33
|
+
- TTL on caches (`models-cache.json` 24 h).
|
|
34
|
+
- Agent-rewrites-digest pattern — old ledger entries get folded into a current summary; raw JSONL stays for forensics but isn't the source of truth.
|
|
35
|
+
|
|
36
|
+
**Bloat** (you can't see the signal for the noise). Defended by:
|
|
37
|
+
- Layer separation above. Model never reads the firehose.
|
|
38
|
+
- TF-IDF cosine ranking on ledger search — top-5 instead of top-everything.
|
|
39
|
+
- KB tree-of-contents (PageIndex) for long docs — reasoning over structure, not vector similarity over chunks.
|
|
40
|
+
|
|
41
|
+
One known decay risk we're actively addressing: the audit log itself is unbounded append. Sprint 9-class follow-up is to rotate `events.jsonl` at 100 MB and stream-from-tail for `dirgha audit list`.
|
|
42
|
+
|
|
43
|
+
## 3. 1000+ md files — what happens
|
|
44
|
+
|
|
45
|
+
Walk the lifecycle:
|
|
46
|
+
|
|
47
|
+
1. **Source of truth.** The `docs/` tree. The DOCS-CONVENTION's index tree is the gatekeeper — every new file picks a slot or proposes a new one. Nothing is freeform dropped.
|
|
48
|
+
2. **Compile.** `dirgha kb ingest docs/` runs OpenKB once. For each `.md`, PageIndex builds a tree-of-contents structural index (~30 s/doc, parallelisable). LLM-summarises each doc into a short concept page. Auto-extracts entities and creates `[[wikilinks]]`. Stores the wiki at `~/.dirgha/kb/wiki/`. Plain Markdown, Obsidian-compatible.
|
|
49
|
+
3. **Query.** `dirgha kb query "how does the failover map work?"` runs reasoning-based retrieval over the tree-of-contents — not over a vector of all 1000 chunks. PageIndex walks the index like a human navigating a doc TOC.
|
|
50
|
+
4. **Update.** `--watch` mode re-ingests touched files. The wiki is incrementally maintained, not rebuilt from scratch.
|
|
51
|
+
5. **Decay control.** `dirgha kb lint` surfaces orphans (zero incoming wikilinks), contradictions (two pages making opposite claims), stale pages (source `.md` was deleted), gaps (referenced concept that has no page).
|
|
52
|
+
|
|
53
|
+
Practical numbers: 1000 docs of ~5 KB each = 5 MB raw. PageIndex tree per doc is ~10 KB. Wiki output is roughly the size of the input. Query latency is dominated by the LLM call, not search — typically 2–5 s per query.
|
|
54
|
+
|
|
55
|
+
The trap to avoid: dumping 1000 raw md files into a vector DB and hoping similarity wins. PageIndex sidesteps it by indexing structure, not embeddings.
|
|
56
|
+
|
|
57
|
+
## 4. Changesets — what they actually solve
|
|
58
|
+
|
|
59
|
+
**Problem:** humans forget to update CHANGELOG. Months later it's either marketing fluff or empty.
|
|
60
|
+
|
|
61
|
+
**Solution:**
|
|
62
|
+
1. Each PR adds `.changeset/<random-name>.md` with frontmatter `@dirgha/code: minor` and a one-line summary.
|
|
63
|
+
2. CI rejects PRs that touch shipped behaviour without a changeset.
|
|
64
|
+
3. `npx changeset version` collapses every pending changeset into a CHANGELOG entry, bumps semver tier accordingly, deletes the changesets.
|
|
65
|
+
4. `npx changeset publish` ships to npm.
|
|
66
|
+
|
|
67
|
+
**Why it matters for KM:** the changesets ARE the project's short-term memory of "what changed". They're append-only (per PR), get compacted into CHANGELOG (per release), and the CHANGELOG itself is one of the docs OpenKB ingests. A question like "when did we add multi-key BYOK?" gets answered from the wiki without anyone manually updating any doc.
|
|
68
|
+
|
|
69
|
+
Status today: scaffold landed in `.changeset/`. Full CI gating is the next step — coupled to the pnpm workspace, needs a small wrapper to scope to `@dirgha/code` only.
|
|
70
|
+
|
|
71
|
+
## 5. Importance — short term vs. long term
|
|
72
|
+
|
|
73
|
+
Three lenses, mapped to artifacts.
|
|
74
|
+
|
|
75
|
+
### Short term (this sprint)
|
|
76
|
+
|
|
77
|
+
**Primary signal: the parity matrix sum-of-gaps.** Currently 0. When a new dimension is added or a regression is found, sum-of-gaps rises and the highest-gap row becomes the most important work. Every closure cites code + test, so progress is verifiable, not vibes.
|
|
78
|
+
|
|
79
|
+
Other short-term signals:
|
|
80
|
+
- Failing tests (`npm run test:cli:offline` red)
|
|
81
|
+
- Open changesets (work in flight)
|
|
82
|
+
- Audit findings rated high-or-critical that haven't been fixed
|
|
83
|
+
|
|
84
|
+
### Medium term (this release)
|
|
85
|
+
|
|
86
|
+
**Primary signal: the ROADMAP.md "in flight" section.** Each sprint has one goal, one acceptance test, one binding contract update.
|
|
87
|
+
|
|
88
|
+
Other medium-term signals:
|
|
89
|
+
- Tweet draft for the release — if a feature isn't in the tweet, it's probably not user-facing enough to gate the release on
|
|
90
|
+
- The CHANGELOG-since-last-publish — anything large enough to break a contract bumps minor; anything that breaks API bumps major
|
|
91
|
+
|
|
92
|
+
### Long term (this project)
|
|
93
|
+
|
|
94
|
+
**Primary signal: the ledger digest at scope `default`.** The project's accumulated learnings — what failed, what worked, what we'd do differently. A fresh agent reads it and catches up in 90 seconds.
|
|
95
|
+
|
|
96
|
+
Other long-term signals:
|
|
97
|
+
- Recurring topics in the audit log's `kind:error` entries — patterns mean architecture wants something different
|
|
98
|
+
- The KB's concept-page list — the entities the project keeps coming back to are the project's conceptual core
|
|
99
|
+
- The user-feedback memory entries — those are the constraints the project has earned over months. They outlast features.
|
|
100
|
+
|
|
101
|
+
### How the agent decides
|
|
102
|
+
|
|
103
|
+
When you ask the agent to do something useful, soul + ledger + memory + parity-matrix-gaps form a 4-corner triangulation:
|
|
104
|
+
|
|
105
|
+
- **Soul** says how to behave.
|
|
106
|
+
- **Memory** says what's true about you and the project.
|
|
107
|
+
- **Ledger digest** says what's been tried.
|
|
108
|
+
- **Matrix gap** says what's unfinished.
|
|
109
|
+
|
|
110
|
+
If three of four agree, the agent acts. If they conflict, the agent flags the conflict back to you instead of guessing.
|
|
111
|
+
|
|
112
|
+
## Summary
|
|
113
|
+
|
|
114
|
+
The architecture stays lean because nothing is free to write without earning a place in a higher layer. Decay is fought at the boundary between layers — each one is responsible for not letting the layer below become canonical. Importance is a derived property of the artifacts: matrix gap, ledger digest, audit error patterns. There's no separate priority list to maintain.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Knowledge management — architecture
|
|
2
|
+
|
|
3
|
+
dirgha-cli's knowledge management is a four-layer stack that grows from per-turn events up to a project-wide compiled wiki. Each layer has a single responsibility, owns its file format, and is queryable from the CLI without leaving the terminal.
|
|
4
|
+
|
|
5
|
+
## The four layers
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
9
|
+
│ 4. Knowledge base (compiled wiki + vectorless tree index) │ ← OpenKB + PageIndex
|
|
10
|
+
│ `dirgha kb {ingest, query, watch, lint}` │ ~/.dirgha/kb/
|
|
11
|
+
├─────────────────────────────────────────────────────────────┤
|
|
12
|
+
│ 3. Ledger (typed events + living digest, TF-IDF search) │ ← shipped
|
|
13
|
+
│ `dirgha ledger {add, search, digest, show}` │ ~/.dirgha/ledger/<scope>.{jsonl,md}
|
|
14
|
+
├─────────────────────────────────────────────────────────────┤
|
|
15
|
+
│ 2. Long-term memory (key-value facts the agent recalls) │ ← shipped
|
|
16
|
+
│ `dirgha memory {set, get, recall, forget}` │ ~/.dirgha/memory/MEMORY.md + per-key files
|
|
17
|
+
├─────────────────────────────────────────────────────────────┤
|
|
18
|
+
│ 1. Audit log (append-only events from every CLI invocation)│ ← shipped
|
|
19
|
+
│ `dirgha audit {list, tail, search, kinds, --filter}` │ ~/.dirgha/audit/events.jsonl
|
|
20
|
+
└─────────────────────────────────────────────────────────────┘
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Lower layers are _firehose_ (every event); higher layers are _curated_ (only facts that earned their place). Information moves UP: the agent reads audit + memory at boot, distills relevant entries into ledger digests, and OpenKB compiles the digests + project docs into a queryable wiki.
|
|
24
|
+
|
|
25
|
+
## Layer 1 — Audit (the firehose)
|
|
26
|
+
|
|
27
|
+
`~/.dirgha/audit/events.jsonl` — one line per significant event. Kinds: `session-start`, `turn-end`, `tool`, `error`, `failover`, `compaction`, `update`. Reader is `dirgha audit list/tail/search/kinds --filter=<kind>`.
|
|
28
|
+
|
|
29
|
+
Audit is **never** queried by the model directly — it's diagnostic. The model sees the layers above.
|
|
30
|
+
|
|
31
|
+
## Layer 2 — Memory (per-user KV facts)
|
|
32
|
+
|
|
33
|
+
`~/.dirgha/memory/MEMORY.md` is an index that the runtime auto-loads into context. Entries are short pointers to per-fact files. Mirrors the existing `/root/.claude/projects/-root/memory/MEMORY.md` pattern: types are `user`, `feedback`, `project`, `reference` with a `name`/`description`/`type` frontmatter and Markdown body.
|
|
34
|
+
|
|
35
|
+
`dirgha memory set <name>` writes one. `dirgha memory recall <query>` runs TF-IDF search.
|
|
36
|
+
|
|
37
|
+
## Layer 3 — Ledger (per-scope event stream + digest)
|
|
38
|
+
|
|
39
|
+
`~/.dirgha/ledger/<scope>.jsonl` is an append-only log of typed entries: `goal`, `decision`, `observation`, `experiment`, `metric`, `note`, `compaction`. Paired with `<scope>.md` — a living digest the agent rewrites periodically. Search is TF-IDF cosine ranked (`dirgha ledger search "topic"`).
|
|
40
|
+
|
|
41
|
+
Scopes are arbitrary: `default`, `<repo-name>`, `<task-id>`. The runtime reads digest + tail at boot via `renderLedgerContext`.
|
|
42
|
+
|
|
43
|
+
## Layer 4 — Knowledge base (compiled wiki, vectorless RAG)
|
|
44
|
+
|
|
45
|
+
This is the new layer. It wraps **OpenKB** (which uses **PageIndex** under the hood) so a project's accumulated docs + ledgers + memory get compiled into a wiki with summaries, concept pages, and cross-references — and answered via reasoning-over-tree-index, not vector similarity.
|
|
46
|
+
|
|
47
|
+
### `dirgha kb` (planned subcommand)
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
dirgha kb ingest [path] Compile a path (or cwd by default) into the KB. Watches for changes if --watch.
|
|
51
|
+
dirgha kb query "<question>" Reasoning-based retrieval. Streams the answer with citations.
|
|
52
|
+
dirgha kb chat Multi-turn KB chat session.
|
|
53
|
+
dirgha kb lint Find contradictions, gaps, orphans, stale pages.
|
|
54
|
+
dirgha kb status Show coverage: # docs ingested, # concept pages, last update.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Storage layout
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
~/.dirgha/kb/
|
|
61
|
+
├── raw/ # Source documents the user dropped in or that we synced
|
|
62
|
+
├── wiki/ # Compiled .md pages with [[wikilinks]] (Obsidian-compatible)
|
|
63
|
+
│ ├── concepts/ # Auto-extracted concept pages
|
|
64
|
+
│ ├── docs/ # One page per ingested document
|
|
65
|
+
│ └── links.json # Adjacency list for the cross-reference graph
|
|
66
|
+
└── index/ # PageIndex tree-of-contents indices
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### What flows where
|
|
70
|
+
|
|
71
|
+
| From | To | When |
|
|
72
|
+
|---|---|---|
|
|
73
|
+
| `~/.dirgha/audit/events.jsonl` | NOT to KB | Audit stays local + diagnostic. |
|
|
74
|
+
| `~/.dirgha/memory/<name>.md` | KB ingest | When the user runs `dirgha kb ingest` (memory is part of the project). |
|
|
75
|
+
| `~/.dirgha/ledger/<scope>.md` digest | KB ingest | Same — digests are project knowledge, JSONL events are not. |
|
|
76
|
+
| Project `docs/` tree | KB ingest | Yes; that's the primary input. |
|
|
77
|
+
| KB query results | Agent context | Optional. The agent can call `dirgha kb query` as a tool when the user asks a doc-style question and the soul says "Don't guess, look it up." |
|
|
78
|
+
|
|
79
|
+
### How the KB feeds the agent loop (proposed wiring)
|
|
80
|
+
|
|
81
|
+
1. The agent receives a user prompt mentioning a project concept ("how does the failover map work?").
|
|
82
|
+
2. Soul says: don't guess; look it up.
|
|
83
|
+
3. The agent invokes a `kb_query` tool (new built-in) — internally `dirgha kb query "..."` — gets back a ranked answer with `[[wikilink]]` citations.
|
|
84
|
+
4. The model uses the cited pages as authoritative context for its response.
|
|
85
|
+
5. If the answer is wrong (the user corrects), the agent appends a `correction` ledger entry; next `dirgha kb ingest` picks up the corrected ledger digest and the wiki self-heals.
|
|
86
|
+
|
|
87
|
+
This is the loop OpenKB calls "knowledge compounds over time".
|
|
88
|
+
|
|
89
|
+
### How GEPA fits
|
|
90
|
+
|
|
91
|
+
GEPA (Claude Code's session-side per-project memory under `~/.claude/projects/<slug>/memory/`) is the IDE mirror of dirgha's memory layer. The two share schema: `user / feedback / project / reference` types with frontmatter + body. Migration:
|
|
92
|
+
|
|
93
|
+
- Keep both for now. The user's GEPA memory continues to live where it is — that's their personal IDE-side memory.
|
|
94
|
+
- `dirgha memory` exposes the same schema for dirgha-runtime memory (project + machine scoped).
|
|
95
|
+
- A future `dirgha memory sync` flag could one-way mirror selected GEPA entries into `~/.dirgha/memory/` for projects where the user wants the model to see them.
|
|
96
|
+
|
|
97
|
+
## Why not just one layer?
|
|
98
|
+
|
|
99
|
+
- **Audit** captures everything; querying it for "why did we choose X" requires re-deriving the answer every time → noise.
|
|
100
|
+
- **Memory** is curated KV, but doesn't model relationships between facts.
|
|
101
|
+
- **Ledger** captures decisions per scope but is linear; you can't ask "what concepts are downstream of decision Y".
|
|
102
|
+
- **KB** captures the graph + can answer reasoning queries — but it's expensive to keep current, so it ingests from the curated layers.
|
|
103
|
+
|
|
104
|
+
Each layer pays for itself. Lower = cheap to write, hard to query. Higher = expensive to compile, instant to query.
|
|
105
|
+
|
|
106
|
+
## Sprint plan
|
|
107
|
+
|
|
108
|
+
| Sprint | Goal |
|
|
109
|
+
|---|---|
|
|
110
|
+
| 9 | `dirgha kb ingest [path] [--watch]` — wraps `openkb ingest` over OpenKB Python pkg. Default sources: `docs/` + `~/.dirgha/memory/` + `~/.dirgha/ledger/<scope>.md`. |
|
|
111
|
+
| 10 | `dirgha kb query "<question>"` — wraps `openkb query`, returns markdown with `[[wikilinks]]`. |
|
|
112
|
+
| 11 | `kb_query` built-in tool so the agent can call it from inside any session. |
|
|
113
|
+
| 12 | `dirgha kb lint` — surfaces stale / orphaned / contradictory pages so the user can repair. |
|
|
114
|
+
| 13 | One-way sync from GEPA memory if the user opts in. |
|
|
115
|
+
|
|
116
|
+
Each sprint ends with a test that locks the contract.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Dirgha Code — VS Code extension
|
|
2
|
+
|
|
3
|
+
Thin VS Code wrapper over the `@dirgha/code` CLI. Nothing is re-implemented:
|
|
4
|
+
the extension shells to the locally-installed `dirgha` binary, so every
|
|
5
|
+
new CLI tool, provider, or sandbox guarantee is available here the
|
|
6
|
+
moment the CLI releases it.
|
|
7
|
+
|
|
8
|
+
## Prereqs
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install -g @dirgha/code
|
|
12
|
+
dirgha login # or set ANTHROPIC_API_KEY / OPENAI_API_KEY / etc.
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Install (development)
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
cd extensions/vscode
|
|
19
|
+
npm install
|
|
20
|
+
npm run compile
|
|
21
|
+
# Launch the Extension Development Host from VS Code: F5 in this folder
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or package it:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
npx vsce package # produces dirgha-code-vscode-0.1.0.vsix
|
|
28
|
+
code --install-extension dirgha-code-vscode-0.1.0.vsix
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Commands
|
|
32
|
+
|
|
33
|
+
| Command | Keybinding | Effect |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| `Dirgha: Ask about current file` | — | Prompt → runs `dirgha ask "<prompt>\nContext: read_file(<path>)"` |
|
|
36
|
+
| `Dirgha: Ask about selection` | `⌘K ⌘D` / `Ctrl+K Ctrl+D` | Prompt → runs `dirgha ask` with the selection as context |
|
|
37
|
+
| `Dirgha: Open REPL in integrated terminal` | `⌘K ⌘R` / `Ctrl+K Ctrl+R` | Opens a terminal and launches the full agent |
|
|
38
|
+
| `Dirgha: Show account status` | — | Runs `dirgha status` |
|
|
39
|
+
|
|
40
|
+
Right-click in the editor with a selection to see `Dirgha: Ask about
|
|
41
|
+
selection` in the context menu.
|
|
42
|
+
|
|
43
|
+
## Settings
|
|
44
|
+
|
|
45
|
+
| Setting | Default | Notes |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `dirgha.binaryPath` | `dirgha` | Absolute path if you don't want to use PATH |
|
|
48
|
+
| `dirgha.defaultModel` | `""` | Overrides the CLI's default via `DIRGHA_CODE_MODEL` for this workspace |
|
|
49
|
+
| `dirgha.showOutput` | `panel` | `panel` for the output channel, `terminal` for an integrated terminal (streams better) |
|
|
50
|
+
|
|
51
|
+
## Why so thin?
|
|
52
|
+
|
|
53
|
+
Philosophy: the agent lives in the CLI, not in the editor. Every new
|
|
54
|
+
CLI feature should show up in VS Code, Cursor, JetBrains, etc. without
|
|
55
|
+
per-IDE plumbing. If you want richer IDE integration (inline
|
|
56
|
+
completions, diff preview, per-cell applies), open an issue — those
|
|
57
|
+
are the natural follow-ons and need design.
|
|
58
|
+
|
|
59
|
+
## Publishing
|
|
60
|
+
|
|
61
|
+
Not yet on the Marketplace. When it is:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
npx vsce publish
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Requires a Publisher account under the `dirgha` namespace.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dirgha-code-vscode",
|
|
3
|
+
"displayName": "Dirgha Code",
|
|
4
|
+
"description": "Ask the Dirgha Code agent from VS Code. Uses your local @dirgha/code CLI.",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"publisher": "dirgha",
|
|
7
|
+
"private": true,
|
|
8
|
+
"license": "FSL-1.1-MIT",
|
|
9
|
+
"engines": {
|
|
10
|
+
"vscode": "^1.90.0"
|
|
11
|
+
},
|
|
12
|
+
"categories": [
|
|
13
|
+
"AI",
|
|
14
|
+
"Programming Languages",
|
|
15
|
+
"Other"
|
|
16
|
+
],
|
|
17
|
+
"keywords": [
|
|
18
|
+
"ai",
|
|
19
|
+
"agent",
|
|
20
|
+
"dirgha",
|
|
21
|
+
"coding",
|
|
22
|
+
"cli"
|
|
23
|
+
],
|
|
24
|
+
"activationEvents": [
|
|
25
|
+
"onStartupFinished"
|
|
26
|
+
],
|
|
27
|
+
"main": "./out/extension.js",
|
|
28
|
+
"contributes": {
|
|
29
|
+
"commands": [
|
|
30
|
+
{
|
|
31
|
+
"command": "dirgha.ask",
|
|
32
|
+
"title": "Dirgha: Ask about current file",
|
|
33
|
+
"category": "Dirgha"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"command": "dirgha.askSelection",
|
|
37
|
+
"title": "Dirgha: Ask about selection",
|
|
38
|
+
"category": "Dirgha"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"command": "dirgha.openRepl",
|
|
42
|
+
"title": "Dirgha: Open REPL in integrated terminal",
|
|
43
|
+
"category": "Dirgha"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"command": "dirgha.status",
|
|
47
|
+
"title": "Dirgha: Show account status",
|
|
48
|
+
"category": "Dirgha"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"keybindings": [
|
|
52
|
+
{
|
|
53
|
+
"command": "dirgha.askSelection",
|
|
54
|
+
"key": "ctrl+k ctrl+d",
|
|
55
|
+
"mac": "cmd+k cmd+d",
|
|
56
|
+
"when": "editorHasSelection"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"command": "dirgha.openRepl",
|
|
60
|
+
"key": "ctrl+k ctrl+r",
|
|
61
|
+
"mac": "cmd+k cmd+r"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"menus": {
|
|
65
|
+
"editor/context": [
|
|
66
|
+
{
|
|
67
|
+
"command": "dirgha.askSelection",
|
|
68
|
+
"group": "dirgha@1",
|
|
69
|
+
"when": "editorHasSelection"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"configuration": {
|
|
74
|
+
"title": "Dirgha",
|
|
75
|
+
"properties": {
|
|
76
|
+
"dirgha.binaryPath": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"default": "dirgha",
|
|
79
|
+
"description": "Path to the dirgha CLI binary. Leave as 'dirgha' to use the globally-installed version."
|
|
80
|
+
},
|
|
81
|
+
"dirgha.defaultModel": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"default": "",
|
|
84
|
+
"description": "Override DIRGHA_CODE_MODEL for this workspace. Empty = CLI default."
|
|
85
|
+
},
|
|
86
|
+
"dirgha.showOutput": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"enum": ["panel", "terminal"],
|
|
89
|
+
"default": "panel",
|
|
90
|
+
"description": "Where to show agent responses — the Dirgha output panel or an integrated terminal."
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"scripts": {
|
|
96
|
+
"vscode:prepublish": "npm run compile",
|
|
97
|
+
"compile": "tsc -p ./",
|
|
98
|
+
"watch": "tsc -watch -p ./"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@types/node": "^20.0.0",
|
|
102
|
+
"@types/vscode": "^1.90.0",
|
|
103
|
+
"typescript": "^5.9.3"
|
|
104
|
+
}
|
|
105
|
+
}
|