byterover-cli 1.8.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -594
- package/bin/kill-daemon.js +78 -0
- package/bin/run.js +2 -2
- package/dist/agent/core/domain/blob/types.d.ts +8 -2
- package/dist/agent/core/domain/llm/index.d.ts +2 -2
- package/dist/agent/core/domain/llm/index.js +2 -2
- package/dist/agent/core/domain/llm/registry.d.ts +8 -0
- package/dist/agent/core/domain/llm/registry.js +387 -14
- package/dist/agent/core/domain/llm/schemas.d.ts +13 -13
- package/dist/agent/core/domain/llm/schemas.js +3 -3
- package/dist/agent/core/domain/llm/types.d.ts +15 -5
- package/dist/agent/core/domain/llm/types.js +8 -2
- package/dist/agent/core/domain/sandbox/types.d.ts +8 -0
- package/dist/agent/core/domain/session/session-metadata.d.ts +7 -2
- package/dist/agent/core/domain/session/session-metadata.js +14 -4
- package/dist/agent/core/domain/streaming/types.d.ts +2 -0
- package/dist/agent/core/domain/tools/constants.d.ts +3 -0
- package/dist/agent/core/domain/tools/constants.js +3 -0
- package/dist/agent/core/domain/tools/types.d.ts +2 -0
- package/dist/agent/core/interfaces/cipher-services.d.ts +2 -4
- package/dist/agent/core/interfaces/i-chat-session.d.ts +1 -1
- package/dist/agent/core/interfaces/i-cipher-agent.d.ts +70 -0
- package/dist/agent/core/interfaces/i-curate-service.d.ts +23 -8
- package/dist/agent/core/interfaces/i-history-storage.d.ts +8 -0
- package/dist/agent/core/interfaces/i-key-storage.d.ts +11 -0
- package/dist/agent/core/interfaces/i-llm-service.d.ts +1 -1
- package/dist/agent/core/interfaces/i-sandbox-service.d.ts +34 -0
- package/dist/agent/core/interfaces/i-session-persistence.d.ts +3 -36
- package/dist/agent/core/interfaces/i-session-persistence.js +1 -1
- package/dist/agent/core/interfaces/i-tool-provider.d.ts +10 -0
- package/dist/agent/core/interfaces/i-tool-scheduler.d.ts +9 -0
- package/dist/agent/infra/agent/agent-schemas.d.ts +20 -8
- package/dist/agent/infra/agent/agent-schemas.js +8 -4
- package/dist/agent/infra/agent/cipher-agent.d.ts +111 -2
- package/dist/agent/infra/agent/cipher-agent.js +322 -20
- package/dist/agent/infra/agent/interactive-loop.js +1 -5
- package/dist/agent/infra/agent/provider-update-config.d.ts +17 -0
- package/dist/agent/infra/agent/service-initializer.d.ts +24 -7
- package/dist/agent/infra/agent/service-initializer.js +85 -92
- package/dist/agent/infra/blob/blob-storage-factory.d.ts +3 -3
- package/dist/agent/infra/blob/blob-storage-factory.js +5 -5
- package/dist/agent/infra/blob/file-blob-storage.d.ts +96 -0
- package/dist/agent/infra/blob/file-blob-storage.js +454 -0
- package/dist/agent/infra/blob/index.d.ts +2 -3
- package/dist/agent/infra/blob/index.js +4 -6
- package/dist/agent/infra/file-system/file-system-service.js +6 -3
- package/dist/agent/infra/http/internal-llm-http-service.d.ts +9 -5
- package/dist/agent/infra/http/internal-llm-http-service.js +12 -7
- package/dist/agent/infra/llm/agent-llm-service.d.ts +423 -0
- package/dist/agent/infra/llm/agent-llm-service.js +1273 -0
- package/dist/agent/infra/llm/context/compaction/compaction-service.d.ts +14 -12
- package/dist/agent/infra/llm/context/compaction/compaction-service.js +26 -9
- package/dist/agent/infra/llm/context/compression/compression-helpers.d.ts +35 -0
- package/dist/agent/infra/llm/context/compression/compression-helpers.js +124 -0
- package/dist/agent/infra/llm/context/compression/escalated-compression.d.ts +62 -0
- package/dist/agent/infra/llm/context/compression/escalated-compression.js +144 -0
- package/dist/agent/infra/llm/context/compression/index.d.ts +3 -0
- package/dist/agent/infra/llm/context/compression/index.js +3 -0
- package/dist/agent/infra/llm/context/compression/reactive-overflow.d.ts +0 -27
- package/dist/agent/infra/llm/context/compression/reactive-overflow.js +5 -113
- package/dist/agent/infra/llm/context/context-manager.d.ts +64 -4
- package/dist/agent/infra/llm/context/context-manager.js +239 -104
- package/dist/agent/infra/llm/context/deferred-effects.d.ts +30 -0
- package/dist/agent/infra/llm/context/deferred-effects.js +40 -0
- package/dist/agent/infra/llm/formatters/gemini-formatter.d.ts +1 -1
- package/dist/agent/infra/llm/formatters/gemini-formatter.js +14 -10
- package/dist/agent/infra/llm/generators/ai-sdk-content-generator.d.ts +33 -0
- package/dist/agent/infra/llm/generators/ai-sdk-content-generator.js +166 -0
- package/dist/agent/infra/llm/generators/ai-sdk-message-converter.d.ts +20 -0
- package/dist/agent/infra/llm/generators/ai-sdk-message-converter.js +182 -0
- package/dist/agent/infra/llm/generators/index.d.ts +3 -3
- package/dist/agent/infra/llm/generators/index.js +3 -3
- package/dist/agent/infra/llm/generators/retryable-content-generator.d.ts +7 -0
- package/dist/agent/infra/llm/generators/retryable-content-generator.js +29 -5
- package/dist/agent/infra/llm/index.d.ts +1 -2
- package/dist/agent/infra/llm/index.js +2 -3
- package/dist/agent/infra/llm/model-capabilities.d.ts +1 -0
- package/dist/agent/infra/llm/model-capabilities.js +31 -0
- package/dist/agent/infra/llm/providers/anthropic.d.ts +7 -0
- package/dist/agent/infra/llm/providers/anthropic.js +27 -0
- package/dist/agent/infra/llm/providers/byterover.d.ts +9 -0
- package/dist/agent/infra/llm/providers/byterover.js +37 -0
- package/dist/agent/infra/llm/providers/cerebras.d.ts +7 -0
- package/dist/agent/infra/llm/providers/cerebras.js +31 -0
- package/dist/agent/infra/llm/providers/cohere.d.ts +7 -0
- package/dist/agent/infra/llm/providers/cohere.js +26 -0
- package/dist/agent/infra/llm/providers/deepinfra.d.ts +7 -0
- package/dist/agent/infra/llm/providers/deepinfra.js +26 -0
- package/dist/agent/infra/llm/providers/glm.d.ts +7 -0
- package/dist/agent/infra/llm/providers/glm.js +30 -0
- package/dist/agent/infra/llm/providers/google.d.ts +7 -0
- package/dist/agent/infra/llm/providers/google.js +25 -0
- package/dist/agent/infra/llm/providers/groq.d.ts +7 -0
- package/dist/agent/infra/llm/providers/groq.js +26 -0
- package/dist/agent/infra/llm/providers/index.d.ts +24 -0
- package/dist/agent/infra/llm/providers/index.js +73 -0
- package/dist/agent/infra/llm/providers/minimax.d.ts +7 -0
- package/dist/agent/infra/llm/providers/minimax.js +30 -0
- package/dist/agent/infra/llm/providers/mistral.d.ts +7 -0
- package/dist/agent/infra/llm/providers/mistral.js +26 -0
- package/dist/agent/infra/llm/providers/moonshot.d.ts +7 -0
- package/dist/agent/infra/llm/providers/moonshot.js +30 -0
- package/dist/agent/infra/llm/providers/openai-compatible.d.ts +9 -0
- package/dist/agent/infra/llm/providers/openai-compatible.js +30 -0
- package/dist/agent/infra/llm/providers/openai.d.ts +7 -0
- package/dist/agent/infra/llm/providers/openai.js +26 -0
- package/dist/agent/infra/llm/providers/openrouter.d.ts +7 -0
- package/dist/agent/infra/llm/providers/openrouter.js +26 -0
- package/dist/agent/infra/llm/providers/perplexity.d.ts +7 -0
- package/dist/agent/infra/llm/providers/perplexity.js +26 -0
- package/dist/agent/infra/llm/providers/togetherai.d.ts +7 -0
- package/dist/agent/infra/llm/providers/togetherai.js +26 -0
- package/dist/agent/infra/llm/providers/types.d.ts +77 -0
- package/dist/agent/infra/llm/providers/types.js +7 -0
- package/dist/agent/infra/llm/providers/vercel.d.ts +7 -0
- package/dist/agent/infra/llm/providers/vercel.js +32 -0
- package/dist/agent/infra/llm/providers/xai.d.ts +7 -0
- package/dist/agent/infra/llm/providers/xai.js +26 -0
- package/dist/agent/infra/llm/retry/retry-policy.d.ts +13 -0
- package/dist/agent/infra/llm/retry/retry-policy.js +207 -0
- package/dist/agent/infra/llm/tokenizers/openrouter-tokenizer.js +1 -1
- package/dist/agent/infra/llm/tool-output-processor.d.ts +16 -4
- package/dist/agent/infra/llm/tool-output-processor.js +61 -16
- package/dist/agent/infra/map/agentic-map-service.d.ts +97 -0
- package/dist/agent/infra/map/agentic-map-service.js +309 -0
- package/dist/agent/infra/map/context-tree-store.d.ts +94 -0
- package/dist/agent/infra/map/context-tree-store.js +278 -0
- package/dist/agent/infra/map/index.d.ts +4 -0
- package/dist/agent/infra/map/index.js +4 -0
- package/dist/agent/infra/map/llm-map-memory.d.ts +59 -0
- package/dist/agent/infra/map/llm-map-memory.js +187 -0
- package/dist/agent/infra/map/llm-map-service.d.ts +36 -0
- package/dist/agent/infra/map/llm-map-service.js +118 -0
- package/dist/agent/infra/map/map-shared.d.ts +140 -0
- package/dist/agent/infra/map/map-shared.js +325 -0
- package/dist/agent/infra/map/worker-pool.d.ts +45 -0
- package/dist/agent/infra/map/worker-pool.js +73 -0
- package/dist/agent/infra/sandbox/curate-result-collector.d.ts +30 -0
- package/dist/agent/infra/sandbox/curate-result-collector.js +39 -0
- package/dist/agent/infra/sandbox/curate-service.d.ts +4 -1
- package/dist/agent/infra/sandbox/curate-service.js +12 -3
- package/dist/agent/infra/sandbox/curation-helpers.d.ts +62 -0
- package/dist/agent/infra/sandbox/curation-helpers.js +219 -0
- package/dist/agent/infra/sandbox/local-sandbox.d.ts +13 -0
- package/dist/agent/infra/sandbox/local-sandbox.js +41 -4
- package/dist/agent/infra/sandbox/sandbox-service.d.ts +52 -5
- package/dist/agent/infra/sandbox/sandbox-service.js +133 -18
- package/dist/agent/infra/sandbox/tools-sdk.d.ts +89 -4
- package/dist/agent/infra/sandbox/tools-sdk.js +80 -4
- package/dist/agent/infra/session/chat-session.d.ts +1 -1
- package/dist/agent/infra/session/chat-session.js +2 -2
- package/dist/agent/infra/session/session-event-forwarder.js +6 -3
- package/dist/agent/infra/session/session-manager.d.ts +20 -3
- package/dist/agent/infra/session/session-manager.js +49 -12
- package/dist/agent/infra/session/session-metadata-store.d.ts +17 -10
- package/dist/agent/infra/session/session-metadata-store.js +12 -87
- package/dist/agent/infra/storage/file-key-storage.d.ts +142 -0
- package/dist/agent/infra/storage/file-key-storage.js +572 -0
- package/dist/agent/infra/storage/granular-history-storage.d.ts +1 -1
- package/dist/agent/infra/storage/granular-history-storage.js +1 -1
- package/dist/agent/infra/storage/message-storage-service.js +134 -22
- package/dist/agent/infra/system-prompt/contributors/context-tree-structure-contributor.d.ts +4 -0
- package/dist/agent/infra/system-prompt/contributors/context-tree-structure-contributor.js +44 -16
- package/dist/agent/infra/system-prompt/contributors/map-selection-contributor.d.ts +16 -0
- package/dist/agent/infra/system-prompt/contributors/map-selection-contributor.js +47 -0
- package/dist/agent/infra/tools/core-tool-scheduler.js +3 -1
- package/dist/agent/infra/tools/implementations/agentic-map-tool.d.ts +35 -0
- package/dist/agent/infra/tools/implementations/agentic-map-tool.js +156 -0
- package/dist/agent/infra/tools/implementations/code-exec-tool.js +44 -2
- package/dist/agent/infra/tools/implementations/curate-tool.d.ts +98 -32
- package/dist/agent/infra/tools/implementations/curate-tool.js +86 -23
- package/dist/agent/infra/tools/implementations/expand-knowledge-tool.d.ts +18 -0
- package/dist/agent/infra/tools/implementations/expand-knowledge-tool.js +43 -0
- package/dist/agent/infra/tools/implementations/llm-map-tool.d.ts +24 -0
- package/dist/agent/infra/tools/implementations/llm-map-tool.js +87 -0
- package/dist/agent/infra/tools/implementations/memory-path-matcher.d.ts +48 -0
- package/dist/agent/infra/tools/implementations/memory-path-matcher.js +217 -0
- package/dist/agent/infra/tools/implementations/memory-symbol-tree.d.ts +128 -0
- package/dist/agent/infra/tools/implementations/memory-symbol-tree.js +283 -0
- package/dist/agent/infra/tools/implementations/search-knowledge-service.d.ts +49 -6
- package/dist/agent/infra/tools/implementations/search-knowledge-service.js +393 -46
- package/dist/agent/infra/tools/implementations/search-knowledge-tool.d.ts +2 -1
- package/dist/agent/infra/tools/implementations/search-knowledge-tool.js +50 -6
- package/dist/agent/infra/tools/tool-manager.js +6 -0
- package/dist/agent/infra/tools/tool-provider.d.ts +12 -0
- package/dist/agent/infra/tools/tool-provider.js +78 -0
- package/dist/agent/infra/tools/tool-registry.d.ts +14 -0
- package/dist/agent/infra/tools/tool-registry.js +34 -2
- package/dist/agent/infra/transport/transport-event-bridge.d.ts +42 -0
- package/dist/agent/infra/transport/transport-event-bridge.js +90 -0
- package/dist/agent/infra/validation/workspace-validator.d.ts +3 -3
- package/dist/agent/infra/validation/workspace-validator.js +3 -8
- package/dist/agent/resources/prompts/curate-detail-preservation.yml +29 -1
- package/dist/agent/resources/prompts/system-prompt.yml +320 -102
- package/dist/agent/resources/tools/code_exec.txt +97 -0
- package/dist/agent/resources/tools/curate.txt +25 -13
- package/dist/agent/resources/tools/detect_domains.txt +4 -3
- package/dist/agent/resources/tools/expand_knowledge.txt +20 -0
- package/dist/oclif/commands/connectors/index.d.ts +12 -0
- package/dist/oclif/commands/connectors/index.js +53 -0
- package/dist/oclif/commands/connectors/install.d.ts +31 -0
- package/dist/oclif/commands/connectors/install.js +148 -0
- package/dist/oclif/commands/connectors/list.d.ts +5 -0
- package/dist/oclif/commands/connectors/list.js +8 -0
- package/dist/oclif/commands/curate/index.d.ts +25 -0
- package/dist/oclif/commands/curate/index.js +255 -0
- package/dist/oclif/commands/curate/view.d.ts +18 -0
- package/dist/oclif/commands/curate/view.js +104 -0
- package/dist/oclif/commands/debug.d.ts +35 -0
- package/dist/oclif/commands/debug.js +436 -0
- package/dist/oclif/commands/hub/index.d.ts +5 -0
- package/dist/oclif/commands/hub/index.js +7 -0
- package/dist/oclif/commands/hub/install.d.ts +23 -0
- package/dist/oclif/commands/hub/install.js +74 -0
- package/dist/oclif/commands/hub/list.d.ts +13 -0
- package/dist/oclif/commands/hub/list.js +65 -0
- package/dist/oclif/commands/hub/registry/add.d.ts +19 -0
- package/dist/oclif/commands/hub/registry/add.js +74 -0
- package/dist/oclif/commands/hub/registry/index.d.ts +5 -0
- package/dist/oclif/commands/hub/registry/index.js +7 -0
- package/dist/oclif/commands/hub/registry/list.d.ts +12 -0
- package/dist/oclif/commands/hub/registry/list.js +49 -0
- package/dist/oclif/commands/hub/registry/remove.d.ts +15 -0
- package/dist/oclif/commands/hub/registry/remove.js +46 -0
- package/dist/oclif/commands/login.d.ts +4 -0
- package/dist/oclif/commands/login.js +51 -31
- package/dist/oclif/commands/main.d.ts +3 -17
- package/dist/oclif/commands/main.js +16 -96
- package/dist/oclif/commands/mcp.js +24 -5
- package/dist/oclif/commands/model/index.d.ts +15 -0
- package/dist/oclif/commands/model/index.js +59 -0
- package/dist/oclif/commands/model/list.d.ts +17 -0
- package/dist/oclif/commands/model/list.js +89 -0
- package/dist/oclif/commands/model/switch.d.ts +21 -0
- package/dist/oclif/commands/model/switch.js +81 -0
- package/dist/oclif/commands/providers/connect.d.ts +26 -0
- package/dist/oclif/commands/providers/connect.js +119 -0
- package/dist/oclif/commands/providers/disconnect.d.ts +14 -0
- package/dist/oclif/commands/providers/disconnect.js +61 -0
- package/dist/oclif/commands/providers/index.d.ts +15 -0
- package/dist/oclif/commands/providers/index.js +59 -0
- package/dist/oclif/commands/providers/list.d.ts +12 -0
- package/dist/oclif/commands/providers/list.js +45 -0
- package/dist/oclif/commands/providers/switch.d.ts +17 -0
- package/dist/oclif/commands/providers/switch.js +61 -0
- package/dist/oclif/commands/pull.d.ts +1 -6
- package/dist/oclif/commands/pull.js +46 -49
- package/dist/oclif/commands/push.d.ts +1 -7
- package/dist/oclif/commands/push.js +66 -59
- package/dist/oclif/commands/query.d.ts +5 -7
- package/dist/oclif/commands/query.js +141 -43
- package/dist/oclif/commands/restart.d.ts +95 -0
- package/dist/oclif/commands/restart.js +333 -0
- package/dist/oclif/commands/space/list.d.ts +12 -0
- package/dist/oclif/commands/space/list.js +66 -0
- package/dist/oclif/commands/space/switch.d.ts +17 -0
- package/dist/oclif/commands/space/switch.js +87 -0
- package/dist/oclif/commands/status.d.ts +4 -9
- package/dist/oclif/commands/status.js +94 -49
- package/dist/oclif/hooks/prerun/validate-brv-config-version.d.ts +16 -11
- package/dist/oclif/hooks/prerun/validate-brv-config-version.js +67 -24
- package/dist/oclif/lib/daemon-client.d.ts +40 -0
- package/dist/oclif/lib/daemon-client.js +142 -0
- package/dist/oclif/lib/json-response.d.ts +9 -0
- package/dist/oclif/lib/json-response.js +10 -0
- package/dist/oclif/lib/task-client.d.ts +68 -0
- package/dist/oclif/lib/task-client.js +227 -0
- package/dist/server/config/environment.d.ts +1 -1
- package/dist/server/config/environment.js +2 -2
- package/dist/server/constants.d.ts +37 -1
- package/dist/server/constants.js +51 -2
- package/dist/server/core/domain/client/client-info.d.ts +82 -0
- package/dist/server/core/domain/client/client-info.js +87 -0
- package/dist/server/core/domain/entities/agent.d.ts +3 -6
- package/dist/server/core/domain/entities/agent.js +49 -54
- package/dist/server/core/domain/entities/brv-config.d.ts +31 -10
- package/dist/server/core/domain/entities/brv-config.js +68 -39
- package/dist/server/core/domain/entities/connector-type.d.ts +1 -11
- package/dist/server/core/domain/entities/connector-type.js +1 -10
- package/dist/server/core/domain/entities/context-tree-snapshot.d.ts +2 -11
- package/dist/server/core/domain/entities/curate-log-entry.d.ts +41 -0
- package/dist/server/core/domain/entities/curation-status.d.ts +28 -0
- package/dist/server/core/domain/entities/provider-config.d.ts +14 -1
- package/dist/server/core/domain/entities/provider-config.js +17 -6
- package/dist/server/core/domain/entities/provider-registry.d.ts +3 -1
- package/dist/server/core/domain/entities/provider-registry.js +216 -10
- package/dist/server/core/domain/errors/task-error.d.ts +17 -4
- package/dist/server/core/domain/errors/task-error.js +35 -10
- package/dist/server/core/domain/knowledge/markdown-writer.d.ts +58 -1
- package/dist/server/core/domain/knowledge/markdown-writer.js +288 -30
- package/dist/server/core/domain/knowledge/memory-scoring.d.ts +118 -0
- package/dist/server/core/domain/knowledge/memory-scoring.js +217 -0
- package/dist/server/core/domain/knowledge/relation-parser.d.ts +16 -0
- package/dist/server/core/domain/knowledge/relation-parser.js +21 -8
- package/dist/server/core/domain/knowledge/summary-types.d.ts +126 -0
- package/dist/server/core/domain/knowledge/summary-types.js +7 -0
- package/dist/server/core/domain/project/project-info.d.ts +54 -0
- package/dist/server/core/domain/project/project-info.js +62 -0
- package/dist/server/core/domain/transport/schemas.d.ts +93 -19
- package/dist/server/core/domain/transport/schemas.js +40 -1
- package/dist/server/core/domain/transport/task-info.d.ts +21 -0
- package/dist/server/core/interfaces/agent/i-agent-pool.d.ts +88 -0
- package/dist/server/core/interfaces/client/i-client-manager.d.ts +117 -0
- package/dist/server/core/interfaces/context-tree/i-context-file-reader.d.ts +5 -1
- package/dist/server/core/interfaces/context-tree/i-context-tree-archive-service.d.ts +30 -0
- package/dist/server/core/interfaces/context-tree/i-context-tree-manifest-service.d.ts +30 -0
- package/dist/server/core/interfaces/context-tree/i-context-tree-merger.d.ts +80 -0
- package/dist/server/core/interfaces/context-tree/i-context-tree-service.d.ts +5 -0
- package/dist/server/core/interfaces/context-tree/i-context-tree-snapshot-service.d.ts +15 -0
- package/dist/server/core/interfaces/context-tree/i-context-tree-summary-service.d.ts +29 -0
- package/dist/server/core/interfaces/daemon/i-agent-idle-timeout-policy.d.ts +39 -0
- package/dist/server/core/interfaces/daemon/i-daemon-resilience.d.ts +24 -0
- package/dist/server/core/interfaces/daemon/i-heartbeat-writer.d.ts +28 -0
- package/dist/server/core/interfaces/daemon/i-idle-timeout-policy.d.ts +34 -0
- package/dist/server/core/interfaces/daemon/i-shutdown-handler.d.ts +20 -0
- package/dist/server/core/interfaces/daemon/index.d.ts +4 -0
- package/dist/server/core/interfaces/daemon/index.js +2 -0
- package/dist/server/core/interfaces/executor/i-curate-executor.d.ts +2 -2
- package/dist/server/core/interfaces/executor/i-query-executor.d.ts +2 -2
- package/dist/server/core/interfaces/hub/i-hub-install-service.d.ts +45 -0
- package/dist/server/core/interfaces/hub/i-hub-install-service.js +1 -0
- package/dist/server/core/interfaces/hub/i-hub-keychain-store.d.ts +27 -0
- package/dist/server/core/interfaces/hub/i-hub-keychain-store.js +1 -0
- package/dist/server/core/interfaces/hub/i-hub-registry-config-store.d.ts +27 -0
- package/dist/server/core/interfaces/hub/i-hub-registry-config-store.js +1 -0
- package/dist/server/core/interfaces/hub/i-hub-registry-service.d.ts +30 -0
- package/dist/server/core/interfaces/hub/i-hub-registry-service.js +1 -0
- package/dist/server/core/interfaces/i-provider-config-store.d.ts +3 -1
- package/dist/server/core/interfaces/i-provider-model-fetcher.d.ts +59 -0
- package/dist/server/core/interfaces/i-provider-model-fetcher.js +7 -0
- package/dist/server/core/interfaces/process/i-task-lifecycle-hook.d.ts +27 -0
- package/dist/server/core/interfaces/process/i-task-lifecycle-hook.js +1 -0
- package/dist/server/core/interfaces/project/i-project-registry.d.ts +46 -0
- package/dist/server/core/interfaces/project/i-project-registry.js +1 -0
- package/dist/server/core/interfaces/routing/i-project-router.d.ts +45 -0
- package/dist/server/core/interfaces/routing/i-project-router.js +1 -0
- package/dist/server/core/interfaces/routing/index.d.ts +1 -0
- package/dist/server/core/interfaces/routing/index.js +1 -0
- package/dist/server/core/interfaces/session/i-session-reader.d.ts +13 -0
- package/dist/server/core/interfaces/session/i-session-reader.js +1 -0
- package/dist/server/core/interfaces/state/i-auth-state-store.d.ts +68 -0
- package/dist/server/core/interfaces/state/i-auth-state-store.js +1 -0
- package/dist/server/core/interfaces/state/i-project-state-loader.d.ts +110 -0
- package/dist/server/core/interfaces/state/i-project-state-loader.js +1 -0
- package/dist/server/core/interfaces/storage/i-curate-log-store.d.ts +20 -0
- package/dist/server/core/interfaces/storage/i-curate-log-store.js +1 -0
- package/dist/server/core/interfaces/storage/i-global-config-store.d.ts +1 -15
- package/dist/server/core/interfaces/storage/i-mcp-config-writer.d.ts +5 -1
- package/dist/server/core/interfaces/storage/i-project-config-store.d.ts +6 -1
- package/dist/server/core/interfaces/transport/i-transport-server.d.ts +12 -2
- package/dist/server/core/interfaces/usecase/i-curate-log-use-case.d.ts +12 -0
- package/dist/server/core/interfaces/usecase/i-curate-log-use-case.js +1 -0
- package/dist/server/infra/client/client-manager.d.ts +51 -0
- package/dist/server/infra/client/client-manager.js +144 -0
- package/dist/server/infra/cogit/context-tree-to-push-context-mapper.js +12 -5
- package/dist/server/infra/config/auto-init.d.ts +14 -0
- package/dist/server/infra/config/auto-init.js +18 -0
- package/dist/server/infra/config/file-config-store.d.ts +1 -0
- package/dist/server/infra/config/file-config-store.js +15 -7
- package/dist/server/infra/connectors/mcp/json-mcp-config-writer.d.ts +1 -2
- package/dist/server/infra/connectors/mcp/json-mcp-config-writer.js +9 -8
- package/dist/server/infra/connectors/mcp/mcp-connector-config.d.ts +29 -6
- package/dist/server/infra/connectors/mcp/mcp-connector-config.js +28 -1
- package/dist/server/infra/connectors/mcp/mcp-connector.js +5 -5
- package/dist/server/infra/connectors/mcp/toml-mcp-config-writer.d.ts +1 -2
- package/dist/server/infra/connectors/rules/rules-connector-config.d.ts +8 -0
- package/dist/server/infra/connectors/rules/rules-connector-config.js +8 -0
- package/dist/server/infra/connectors/rules/rules-connector.js +34 -7
- package/dist/server/infra/connectors/shared/constants.d.ts +5 -0
- package/dist/server/infra/connectors/shared/constants.js +12 -0
- package/dist/server/infra/connectors/shared/rule-segment-patcher.d.ts +29 -0
- package/dist/server/infra/connectors/shared/rule-segment-patcher.js +208 -0
- package/dist/server/infra/connectors/skill/skill-connector-config.d.ts +79 -20
- package/dist/server/infra/connectors/skill/skill-connector-config.js +74 -10
- package/dist/server/infra/connectors/skill/skill-connector.d.ts +35 -4
- package/dist/server/infra/connectors/skill/skill-connector.js +140 -39
- package/dist/server/infra/context-tree/children-hash.d.ts +20 -0
- package/dist/server/infra/context-tree/children-hash.js +22 -0
- package/dist/server/infra/context-tree/derived-artifact.d.ts +28 -0
- package/dist/server/infra/context-tree/derived-artifact.js +48 -0
- package/dist/server/infra/context-tree/file-context-file-reader.js +6 -2
- package/dist/server/infra/context-tree/file-context-tree-archive-service.d.ts +37 -0
- package/dist/server/infra/context-tree/file-context-tree-archive-service.js +219 -0
- package/dist/server/infra/context-tree/file-context-tree-manifest-service.d.ts +50 -0
- package/dist/server/infra/context-tree/file-context-tree-manifest-service.js +278 -0
- package/dist/server/infra/context-tree/file-context-tree-merger.d.ts +51 -0
- package/dist/server/infra/context-tree/file-context-tree-merger.js +265 -0
- package/dist/server/infra/context-tree/file-context-tree-service.d.ts +1 -0
- package/dist/server/infra/context-tree/file-context-tree-service.js +6 -1
- package/dist/server/infra/context-tree/file-context-tree-snapshot-service.d.ts +2 -4
- package/dist/server/infra/context-tree/file-context-tree-snapshot-service.js +31 -13
- package/dist/server/infra/context-tree/file-context-tree-summary-service.d.ts +44 -0
- package/dist/server/infra/context-tree/file-context-tree-summary-service.js +313 -0
- package/dist/server/infra/context-tree/file-context-tree-writer-service.js +5 -0
- package/dist/server/infra/context-tree/hash-utils.d.ts +6 -0
- package/dist/server/infra/context-tree/hash-utils.js +9 -0
- package/dist/server/infra/context-tree/prompts/summary-generation.d.ts +22 -0
- package/dist/server/infra/context-tree/prompts/summary-generation.js +45 -0
- package/dist/server/infra/context-tree/snapshot-diff.d.ts +19 -0
- package/dist/server/infra/context-tree/snapshot-diff.js +39 -0
- package/dist/server/infra/context-tree/summary-frontmatter.d.ts +24 -0
- package/dist/server/infra/context-tree/summary-frontmatter.js +111 -0
- package/dist/server/infra/daemon/agent-idle-timeout-policy.d.ts +36 -0
- package/dist/server/infra/daemon/agent-idle-timeout-policy.js +89 -0
- package/dist/server/infra/daemon/agent-logger.d.ts +10 -0
- package/dist/server/infra/daemon/agent-logger.js +22 -0
- package/dist/server/infra/daemon/agent-pool.d.ts +112 -0
- package/dist/server/infra/daemon/agent-pool.js +335 -0
- package/dist/server/infra/daemon/agent-process.d.ts +21 -0
- package/dist/server/infra/daemon/agent-process.js +598 -0
- package/dist/server/infra/daemon/brv-server.d.ts +23 -0
- package/dist/server/infra/daemon/brv-server.js +405 -0
- package/dist/server/infra/daemon/daemon-resilience.d.ts +34 -0
- package/dist/server/infra/daemon/daemon-resilience.js +100 -0
- package/dist/server/infra/daemon/heartbeat.d.ts +28 -0
- package/dist/server/infra/daemon/heartbeat.js +81 -0
- package/dist/server/infra/daemon/idle-timeout-policy.d.ts +38 -0
- package/dist/server/infra/daemon/idle-timeout-policy.js +91 -0
- package/dist/server/infra/daemon/index.d.ts +5 -0
- package/dist/server/infra/daemon/index.js +11 -0
- package/dist/server/infra/daemon/port-selector.d.ts +28 -0
- package/dist/server/infra/daemon/port-selector.js +45 -0
- package/dist/server/infra/daemon/project-task-queue.d.ts +54 -0
- package/dist/server/infra/daemon/project-task-queue.js +103 -0
- package/dist/server/infra/daemon/session-resolver.d.ts +26 -0
- package/dist/server/infra/daemon/session-resolver.js +88 -0
- package/dist/server/infra/daemon/shutdown-handler.d.ts +42 -0
- package/dist/server/infra/daemon/shutdown-handler.js +101 -0
- package/dist/server/infra/executor/curate-executor.d.ts +11 -2
- package/dist/server/infra/executor/curate-executor.js +135 -13
- package/dist/server/infra/executor/direct-search-responder.d.ts +11 -8
- package/dist/server/infra/executor/direct-search-responder.js +16 -14
- package/dist/server/infra/executor/folder-pack-executor.js +58 -17
- package/dist/server/infra/executor/pre-compaction/compaction-escalation.d.ts +6 -0
- package/dist/server/infra/executor/pre-compaction/compaction-escalation.js +6 -0
- package/dist/server/infra/executor/pre-compaction/index.d.ts +3 -0
- package/dist/server/infra/executor/pre-compaction/index.js +1 -0
- package/dist/server/infra/executor/pre-compaction/pre-compaction-service.d.ts +59 -0
- package/dist/server/infra/executor/pre-compaction/pre-compaction-service.js +124 -0
- package/dist/server/infra/executor/pre-compaction/prompts.d.ts +24 -0
- package/dist/server/infra/executor/pre-compaction/prompts.js +47 -0
- package/dist/server/infra/executor/query-executor.d.ts +26 -6
- package/dist/server/infra/executor/query-executor.js +181 -40
- package/dist/server/infra/http/authenticated-http-client.js +4 -0
- package/dist/server/infra/http/provider-model-fetcher-registry.d.ts +31 -0
- package/dist/server/infra/http/provider-model-fetcher-registry.js +117 -0
- package/dist/server/infra/http/provider-model-fetchers.d.ts +94 -0
- package/dist/server/infra/http/provider-model-fetchers.js +450 -0
- package/dist/server/infra/hub/composite-hub-registry-service.d.ts +17 -0
- package/dist/server/infra/hub/composite-hub-registry-service.js +54 -0
- package/dist/server/infra/hub/hub-auth-headers.d.ts +11 -0
- package/dist/server/infra/hub/hub-auth-headers.js +29 -0
- package/dist/server/infra/hub/hub-install-service.d.ts +22 -0
- package/dist/server/infra/hub/hub-install-service.js +99 -0
- package/dist/server/infra/hub/hub-keychain-store.d.ts +29 -0
- package/dist/server/infra/hub/hub-keychain-store.js +98 -0
- package/dist/server/infra/hub/hub-registry-config-store.d.ts +24 -0
- package/dist/server/infra/hub/hub-registry-config-store.js +92 -0
- package/dist/server/infra/hub/hub-registry-service.d.ts +33 -0
- package/dist/server/infra/hub/hub-registry-service.js +109 -0
- package/dist/server/infra/mcp/mcp-mode-detector.d.ts +21 -0
- package/dist/server/infra/mcp/mcp-mode-detector.js +25 -0
- package/dist/server/infra/mcp/mcp-server.d.ts +15 -9
- package/dist/server/infra/mcp/mcp-server.js +84 -98
- package/dist/server/infra/mcp/tools/brv-curate-tool.d.ts +5 -10
- package/dist/server/infra/mcp/tools/brv-curate-tool.js +47 -17
- package/dist/server/infra/mcp/tools/brv-query-tool.d.ts +4 -1
- package/dist/server/infra/mcp/tools/brv-query-tool.js +39 -12
- package/dist/server/infra/mcp/tools/index.d.ts +1 -0
- package/dist/server/infra/mcp/tools/index.js +1 -0
- package/dist/server/infra/mcp/tools/resolve-client-cwd.d.ts +17 -0
- package/dist/server/infra/mcp/tools/resolve-client-cwd.js +27 -0
- package/dist/server/infra/mcp/tools/task-result-waiter.js +6 -5
- package/dist/server/infra/process/broadcast-utils.d.ts +16 -0
- package/dist/server/infra/process/broadcast-utils.js +22 -0
- package/dist/server/infra/process/connection-coordinator.d.ts +85 -0
- package/dist/server/infra/process/connection-coordinator.js +333 -0
- package/dist/server/infra/process/curate-log-handler.d.ts +35 -0
- package/dist/server/infra/process/curate-log-handler.js +179 -0
- package/dist/server/infra/process/feature-handlers.d.ts +25 -0
- package/dist/server/infra/process/feature-handlers.js +165 -0
- package/dist/server/infra/process/index.d.ts +6 -7
- package/dist/server/infra/process/index.js +5 -6
- package/dist/server/infra/process/task-router.d.ts +139 -0
- package/dist/server/infra/process/task-router.js +503 -0
- package/dist/server/infra/process/transport-handlers.d.ts +55 -117
- package/dist/server/infra/process/transport-handlers.js +50 -437
- package/dist/server/infra/process/types.d.ts +5 -0
- package/dist/server/infra/process/types.js +1 -0
- package/dist/server/infra/project/project-registry.d.ts +37 -0
- package/dist/server/infra/project/project-registry.js +147 -0
- package/dist/server/infra/provider/env-provider-detector.d.ts +33 -0
- package/dist/server/infra/provider/env-provider-detector.js +52 -0
- package/dist/server/infra/provider/provider-config-resolver.d.ts +30 -0
- package/dist/server/infra/provider/provider-config-resolver.js +112 -0
- package/dist/server/infra/routing/project-router.d.ts +35 -0
- package/dist/server/infra/routing/project-router.js +60 -0
- package/dist/server/infra/session/session-reader.d.ts +18 -0
- package/dist/server/infra/session/session-reader.js +17 -0
- package/dist/server/infra/state/auth-state-store.d.ts +55 -0
- package/dist/server/infra/state/auth-state-store.js +111 -0
- package/dist/server/infra/state/project-state-loader.d.ts +69 -0
- package/dist/server/infra/state/project-state-loader.js +154 -0
- package/dist/server/infra/storage/file-curate-log-store.d.ts +61 -0
- package/dist/server/infra/storage/file-curate-log-store.js +198 -0
- package/dist/server/infra/storage/file-global-config-store.d.ts +0 -2
- package/dist/server/infra/storage/file-global-config-store.js +0 -19
- package/dist/server/infra/storage/file-onboarding-preference-store.d.ts +1 -1
- package/dist/server/infra/storage/file-onboarding-preference-store.js +7 -8
- package/dist/server/infra/storage/file-provider-config-store.d.ts +3 -2
- package/dist/server/infra/storage/file-provider-config-store.js +3 -3
- package/dist/server/infra/storage/file-provider-keychain-store.d.ts +31 -0
- package/dist/server/infra/storage/file-provider-keychain-store.js +110 -0
- package/dist/server/infra/storage/file-token-store.d.ts +2 -5
- package/dist/server/infra/storage/file-token-store.js +2 -5
- package/dist/server/infra/storage/provider-keychain-store.d.ts +2 -33
- package/dist/server/infra/storage/provider-keychain-store.js +4 -71
- package/dist/server/infra/storage/token-store.d.ts +3 -8
- package/dist/server/infra/storage/token-store.js +4 -11
- package/dist/server/infra/transport/agent-instance-discovery.d.ts +20 -0
- package/dist/server/infra/transport/agent-instance-discovery.js +32 -0
- package/dist/server/infra/transport/handlers/agent-dto-mapper.d.ts +6 -0
- package/dist/server/infra/transport/handlers/agent-dto-mapper.js +16 -0
- package/dist/server/infra/transport/handlers/auth-handler.d.ts +60 -0
- package/dist/server/infra/transport/handlers/auth-handler.js +257 -0
- package/dist/server/infra/transport/handlers/config-handler.d.ts +13 -0
- package/dist/server/infra/transport/handlers/config-handler.js +22 -0
- package/dist/server/infra/transport/handlers/connectors-handler.d.ts +23 -0
- package/dist/server/infra/transport/handlers/connectors-handler.js +73 -0
- package/dist/server/infra/transport/handlers/handler-types.d.ts +23 -0
- package/dist/server/infra/transport/handlers/handler-types.js +21 -0
- package/dist/server/infra/transport/handlers/hub-handler.d.ts +34 -0
- package/dist/server/infra/transport/handlers/hub-handler.js +218 -0
- package/dist/server/infra/transport/handlers/index.d.ts +26 -0
- package/dist/server/infra/transport/handlers/index.js +13 -0
- package/dist/server/infra/transport/handlers/init-handler.d.ts +50 -0
- package/dist/server/infra/transport/handlers/init-handler.js +157 -0
- package/dist/server/infra/transport/handlers/model-handler.d.ts +22 -0
- package/dist/server/infra/transport/handlers/model-handler.js +107 -0
- package/dist/server/infra/transport/handlers/provider-handler.d.ts +25 -0
- package/dist/server/infra/transport/handlers/provider-handler.js +101 -0
- package/dist/server/infra/transport/handlers/pull-handler.d.ts +35 -0
- package/dist/server/infra/transport/handlers/pull-handler.js +87 -0
- package/dist/server/infra/transport/handlers/push-handler.d.ts +37 -0
- package/dist/server/infra/transport/handlers/push-handler.js +109 -0
- package/dist/server/infra/transport/handlers/reset-handler.d.ts +23 -0
- package/dist/server/infra/transport/handlers/reset-handler.js +33 -0
- package/dist/server/infra/transport/handlers/space-handler.d.ts +44 -0
- package/dist/server/infra/transport/handlers/space-handler.js +206 -0
- package/dist/server/infra/transport/handlers/status-handler.d.ts +29 -0
- package/dist/server/infra/transport/handlers/status-handler.js +99 -0
- package/dist/server/infra/transport/index.d.ts +1 -1
- package/dist/server/infra/transport/index.js +0 -1
- package/dist/server/infra/transport/port-utils.d.ts +0 -35
- package/dist/server/infra/transport/port-utils.js +0 -62
- package/dist/server/infra/transport/socket-io-transport-server.d.ts +6 -1
- package/dist/server/infra/transport/socket-io-transport-server.js +30 -10
- package/dist/server/infra/transport/transport-connector.d.ts +13 -0
- package/dist/server/infra/transport/transport-connector.js +18 -0
- package/dist/server/infra/usecase/curate-log-use-case.d.ts +32 -0
- package/dist/server/infra/usecase/curate-log-use-case.js +142 -0
- package/dist/server/templates/sections/brv-instructions.md +8 -0
- package/dist/server/templates/sections/command-reference.md +5 -2
- package/dist/server/templates/sections/workflow.md +2 -0
- package/dist/server/templates/skill/SKILL.md +138 -59
- package/dist/server/utils/config-xdg-sync.d.ts +13 -0
- package/dist/server/utils/config-xdg-sync.js +25 -0
- package/dist/server/utils/curate-result-parser.d.ts +121 -0
- package/dist/server/utils/curate-result-parser.js +120 -0
- package/dist/server/utils/global-config-path.d.ts +1 -1
- package/dist/server/utils/global-config-path.js +5 -2
- package/dist/server/utils/global-data-path.d.ts +2 -2
- package/dist/server/utils/global-data-path.js +8 -3
- package/dist/server/utils/path-utils.d.ts +38 -0
- package/dist/server/utils/path-utils.js +92 -0
- package/dist/server/utils/process-logger.js +1 -1
- package/dist/server/utils/server-main-resolver.d.ts +9 -0
- package/dist/server/utils/server-main-resolver.js +17 -0
- package/dist/shared/constants/curation.d.ts +6 -0
- package/dist/shared/constants/curation.js +6 -0
- package/dist/shared/transport/events/agent-events.d.ts +16 -0
- package/dist/shared/transport/events/agent-events.js +10 -0
- package/dist/shared/transport/events/auth-events.d.ts +45 -0
- package/dist/shared/transport/events/auth-events.js +11 -0
- package/dist/shared/transport/events/config-events.d.ts +18 -0
- package/dist/shared/transport/events/config-events.js +5 -0
- package/dist/shared/transport/events/connector-events.d.ts +35 -0
- package/dist/shared/transport/events/connector-events.js +6 -0
- package/dist/shared/transport/events/hub-events.d.ts +62 -0
- package/dist/shared/transport/events/hub-events.js +10 -0
- package/dist/shared/transport/events/index.d.ts +123 -0
- package/dist/shared/transport/events/index.js +73 -0
- package/dist/shared/transport/events/init-events.d.ts +41 -0
- package/dist/shared/transport/events/init-events.js +8 -0
- package/dist/shared/transport/events/llm-events.d.ts +13 -0
- package/dist/shared/transport/events/llm-events.js +13 -0
- package/dist/shared/transport/events/model-events.d.ts +30 -0
- package/dist/shared/transport/events/model-events.js +5 -0
- package/dist/shared/transport/events/onboarding-events.d.ts +18 -0
- package/dist/shared/transport/events/onboarding-events.js +5 -0
- package/dist/shared/transport/events/provider-events.d.ts +44 -0
- package/dist/shared/transport/events/provider-events.js +8 -0
- package/dist/shared/transport/events/pull-events.d.ts +26 -0
- package/dist/shared/transport/events/pull-events.js +5 -0
- package/dist/shared/transport/events/push-events.d.ts +27 -0
- package/dist/shared/transport/events/push-events.js +5 -0
- package/dist/shared/transport/events/reset-events.d.ts +6 -0
- package/dist/shared/transport/events/reset-events.js +3 -0
- package/dist/shared/transport/events/session-events.d.ts +3 -0
- package/dist/shared/transport/events/session-events.js +3 -0
- package/dist/shared/transport/events/space-events.d.ts +30 -0
- package/dist/shared/transport/events/space-events.js +4 -0
- package/dist/shared/transport/events/status-events.d.ts +7 -0
- package/dist/shared/transport/events/status-events.js +3 -0
- package/dist/shared/transport/events/task-events.d.ts +19 -0
- package/dist/shared/transport/events/task-events.js +9 -0
- package/dist/shared/transport/types/auth-scheme.d.ts +1 -0
- package/dist/shared/transport/types/auth-scheme.js +1 -0
- package/dist/shared/transport/types/dto.d.ts +112 -0
- package/dist/shared/transport/types/dto.js +6 -0
- package/dist/shared/transport/types/index.d.ts +1 -0
- package/dist/shared/transport/types/index.js +1 -0
- package/dist/shared/types/agent.d.ts +5 -0
- package/dist/shared/types/agent.js +27 -0
- package/dist/shared/types/connector-type.d.ts +18 -0
- package/dist/shared/types/connector-type.js +26 -0
- package/dist/shared/types/context-tree-changes.d.ts +11 -0
- package/dist/shared/types/context-tree-changes.js +1 -0
- package/dist/shared/types/index.d.ts +3 -0
- package/dist/shared/types/index.js +2 -0
- package/dist/shared/utils/escalation-utils.d.ts +59 -0
- package/dist/shared/utils/escalation-utils.js +141 -0
- package/dist/tui/app/index.d.ts +9 -0
- package/dist/tui/app/index.js +4 -0
- package/dist/tui/app/layouts/main-layout.d.ts +14 -0
- package/dist/tui/app/layouts/main-layout.js +19 -0
- package/dist/tui/app/pages/config-provider-page.d.ts +8 -0
- package/dist/tui/app/pages/config-provider-page.js +19 -0
- package/dist/tui/app/pages/home-page.d.ts +8 -0
- package/dist/tui/app/pages/home-page.js +85 -0
- package/dist/tui/app/pages/login-page.d.ts +12 -0
- package/dist/tui/app/pages/login-page.js +87 -0
- package/dist/tui/app/pages/protected-routes.d.ts +8 -0
- package/dist/tui/app/pages/protected-routes.js +14 -0
- package/dist/tui/app/router.d.ts +11 -0
- package/dist/tui/app/router.js +21 -0
- package/dist/tui/components/command/command-output.d.ts +1 -1
- package/dist/tui/components/command/command-output.js +5 -7
- package/dist/tui/components/command/expanded-command-view.d.ts +1 -1
- package/dist/tui/components/command/expanded-command-view.js +5 -6
- package/dist/tui/components/command/live-streaming-output.d.ts +2 -4
- package/dist/tui/components/command/live-streaming-output.js +5 -19
- package/dist/tui/components/command-details.d.ts +1 -1
- package/dist/tui/components/command-details.js +3 -3
- package/dist/tui/components/command-input.js +84 -171
- package/dist/tui/components/command-item.d.ts +1 -1
- package/dist/tui/components/command-item.js +6 -7
- package/dist/tui/components/execution/execution-status.d.ts +1 -1
- package/dist/tui/components/execution/execution-tool.d.ts +1 -1
- package/dist/tui/components/execution/expanded-log-view.d.ts +1 -1
- package/dist/tui/components/execution/expanded-log-view.js +1 -1
- package/dist/tui/components/execution/log-item.d.ts +1 -1
- package/dist/tui/components/execution/log-item.js +1 -1
- package/dist/tui/components/footer.js +6 -4
- package/dist/tui/components/header.js +2 -2
- package/dist/tui/components/index.d.ts +0 -2
- package/dist/tui/components/index.js +0 -2
- package/dist/tui/components/init.d.ts +1 -1
- package/dist/tui/components/init.js +26 -32
- package/dist/tui/components/inline-prompts/inline-confirm.js +6 -1
- package/dist/tui/components/inline-prompts/inline-file-selector.d.ts +1 -1
- package/dist/tui/components/inline-prompts/inline-input.d.ts +6 -0
- package/dist/tui/components/inline-prompts/inline-input.js +53 -16
- package/dist/tui/components/inline-prompts/inline-search.d.ts +2 -2
- package/dist/tui/components/inline-prompts/inline-search.js +1 -1
- package/dist/tui/components/inline-prompts/inline-select.d.ts +1 -1
- package/dist/tui/components/inline-prompts/inline-select.js +1 -1
- package/dist/tui/components/message-item.d.ts +1 -1
- package/dist/tui/components/message-item.js +2 -2
- package/dist/tui/components/onboarding/welcome-box.d.ts +1 -8
- package/dist/tui/components/onboarding/welcome-box.js +11 -12
- package/dist/tui/components/onboarding-item.d.ts +1 -1
- package/dist/tui/components/selectable-list.d.ts +3 -1
- package/dist/tui/components/selectable-list.js +7 -15
- package/dist/tui/components/status-badge.js +1 -1
- package/dist/tui/components/suggestions.js +5 -18
- package/dist/tui/features/activity/hooks/index.d.ts +2 -0
- package/dist/tui/features/activity/hooks/index.js +2 -0
- package/dist/tui/features/activity/hooks/use-activity-logs.d.ts +18 -0
- package/dist/tui/features/activity/hooks/use-activity-logs.js +208 -0
- package/dist/tui/features/activity/hooks/use-feed-navigation.d.ts +24 -0
- package/dist/tui/features/activity/hooks/use-feed-navigation.js +43 -0
- package/dist/tui/features/activity/index.d.ts +1 -0
- package/dist/tui/features/activity/index.js +1 -0
- package/dist/tui/features/auth/api/get-auth-state.d.ts +16 -0
- package/dist/tui/features/auth/api/get-auth-state.js +21 -0
- package/dist/tui/features/auth/api/login.d.ts +3 -0
- package/dist/tui/features/auth/api/login.js +14 -0
- package/dist/tui/features/auth/api/logout.d.ts +8 -0
- package/dist/tui/features/auth/api/logout.js +24 -0
- package/dist/tui/features/auth/api/refresh-auth.d.ts +8 -0
- package/dist/tui/features/auth/api/refresh-auth.js +24 -0
- package/dist/tui/features/auth/components/auth-initializer.d.ts +10 -0
- package/dist/tui/features/auth/components/auth-initializer.js +82 -0
- package/dist/tui/features/auth/components/login-flow.d.ts +8 -0
- package/dist/tui/features/auth/components/login-flow.js +62 -0
- package/dist/tui/features/auth/components/logout-flow.d.ts +12 -0
- package/dist/tui/features/auth/components/logout-flow.js +81 -0
- package/dist/tui/features/auth/guards/auth-guard.d.ts +2 -0
- package/dist/tui/features/auth/guards/auth-guard.js +11 -0
- package/dist/tui/features/auth/stores/auth-store.d.ts +27 -0
- package/dist/tui/features/auth/stores/auth-store.js +29 -0
- package/dist/tui/features/commands/components/command-view.d.ts +17 -0
- package/dist/tui/features/commands/components/command-view.js +34 -0
- package/dist/tui/features/commands/definitions/connectors.d.ts +2 -0
- package/dist/tui/features/commands/definitions/connectors.js +9 -0
- package/dist/tui/features/commands/definitions/curate.d.ts +2 -0
- package/dist/tui/features/commands/definitions/curate.js +53 -0
- package/dist/tui/features/commands/definitions/exit.d.ts +2 -0
- package/dist/tui/features/commands/definitions/exit.js +9 -0
- package/dist/tui/features/commands/definitions/hub-list.d.ts +2 -0
- package/dist/tui/features/commands/definitions/hub-list.js +9 -0
- package/dist/tui/features/commands/definitions/hub-registry-add.d.ts +2 -0
- package/dist/tui/features/commands/definitions/hub-registry-add.js +36 -0
- package/dist/tui/features/commands/definitions/hub-registry-list.d.ts +2 -0
- package/dist/tui/features/commands/definitions/hub-registry-list.js +9 -0
- package/dist/tui/features/commands/definitions/hub-registry-remove.d.ts +2 -0
- package/dist/tui/features/commands/definitions/hub-registry-remove.js +25 -0
- package/dist/tui/features/commands/definitions/hub-registry.d.ts +2 -0
- package/dist/tui/features/commands/definitions/hub-registry.js +8 -0
- package/dist/tui/features/commands/definitions/hub.d.ts +2 -0
- package/dist/tui/features/commands/definitions/hub.js +7 -0
- package/dist/tui/features/commands/definitions/index.d.ts +8 -0
- package/dist/tui/features/commands/definitions/index.js +48 -0
- package/dist/tui/features/commands/definitions/login.d.ts +2 -0
- package/dist/tui/features/commands/definitions/login.js +12 -0
- package/dist/tui/features/commands/definitions/logout.d.ts +2 -0
- package/dist/tui/features/commands/definitions/logout.js +26 -0
- package/dist/tui/features/commands/definitions/model.d.ts +2 -0
- package/dist/tui/features/commands/definitions/model.js +9 -0
- package/dist/tui/features/commands/definitions/new.d.ts +2 -0
- package/dist/tui/features/commands/definitions/new.js +27 -0
- package/dist/tui/features/commands/definitions/providers.d.ts +2 -0
- package/dist/tui/features/commands/definitions/providers.js +9 -0
- package/dist/tui/features/commands/definitions/pull.d.ts +2 -0
- package/dist/tui/features/commands/definitions/pull.js +23 -0
- package/dist/tui/features/commands/definitions/push.d.ts +2 -0
- package/dist/tui/features/commands/definitions/push.js +29 -0
- package/dist/tui/features/commands/definitions/query.d.ts +2 -0
- package/dist/tui/features/commands/definitions/query.js +36 -0
- package/dist/tui/features/commands/definitions/reset.d.ts +2 -0
- package/dist/tui/features/commands/definitions/reset.js +22 -0
- package/dist/tui/features/commands/definitions/space-list.d.ts +2 -0
- package/dist/tui/features/commands/definitions/space-list.js +22 -0
- package/dist/tui/features/commands/definitions/space-switch.d.ts +2 -0
- package/dist/tui/features/commands/definitions/space-switch.js +9 -0
- package/dist/tui/features/commands/definitions/space.d.ts +2 -0
- package/dist/tui/features/commands/definitions/space.js +7 -0
- package/dist/tui/features/commands/definitions/status.d.ts +2 -0
- package/dist/tui/features/commands/definitions/status.js +11 -0
- package/dist/tui/features/commands/hooks/use-commands-controller.d.ts +38 -0
- package/dist/tui/features/commands/hooks/use-commands-controller.js +43 -0
- package/dist/tui/features/commands/hooks/use-slash-command-processor.d.ts +16 -0
- package/dist/tui/features/commands/hooks/use-slash-command-processor.js +134 -0
- package/dist/tui/features/commands/hooks/use-slash-completion.d.ts +30 -0
- package/dist/tui/features/commands/hooks/use-slash-completion.js +256 -0
- package/dist/tui/features/commands/stores/commands-store.d.ts +32 -0
- package/dist/tui/features/commands/stores/commands-store.js +23 -0
- package/dist/tui/features/commands/utils/arg-parser.d.ts +102 -0
- package/dist/tui/features/connectors/api/get-agent-config-paths.d.ts +18 -0
- package/dist/tui/features/connectors/api/get-agent-config-paths.js +17 -0
- package/dist/tui/features/connectors/api/get-agents.d.ts +16 -0
- package/dist/tui/features/connectors/api/get-agents.js +19 -0
- package/dist/tui/features/connectors/api/get-connectors.d.ts +16 -0
- package/dist/tui/features/connectors/api/get-connectors.js +17 -0
- package/dist/tui/features/connectors/api/install-connector.d.ts +14 -0
- package/dist/tui/features/connectors/api/install-connector.js +27 -0
- package/dist/tui/features/connectors/components/agent-search-step.d.ts +9 -0
- package/dist/tui/features/connectors/components/agent-search-step.js +18 -0
- package/dist/tui/features/connectors/components/confirm-switch-step.d.ts +10 -0
- package/dist/tui/features/connectors/components/confirm-switch-step.js +13 -0
- package/dist/tui/features/connectors/components/connector-list-step.d.ts +11 -0
- package/dist/tui/features/connectors/components/connector-list-step.js +29 -0
- package/dist/tui/features/connectors/components/connector-type-step.d.ts +13 -0
- package/dist/tui/features/connectors/components/connector-type-step.js +23 -0
- package/dist/tui/features/connectors/components/connectors-flow.d.ts +17 -0
- package/dist/tui/features/connectors/components/connectors-flow.js +179 -0
- package/dist/tui/features/connectors/utils/get-connector-name.d.ts +3 -0
- package/dist/tui/features/connectors/utils/get-connector-name.js +33 -0
- package/dist/tui/features/curate/api/create-curate-task.d.ts +22 -0
- package/dist/tui/features/curate/api/create-curate-task.js +40 -0
- package/dist/tui/features/curate/components/curate-flow.d.ts +20 -0
- package/dist/tui/features/curate/components/curate-flow.js +41 -0
- package/dist/tui/features/exit/components/exit-flow.d.ts +10 -0
- package/dist/tui/features/exit/components/exit-flow.js +19 -0
- package/dist/tui/features/hub/api/add-hub-registry.d.ts +15 -0
- package/dist/tui/features/hub/api/add-hub-registry.js +30 -0
- package/dist/tui/features/hub/api/get-hub-entries.d.ts +16 -0
- package/dist/tui/features/hub/api/get-hub-entries.js +17 -0
- package/dist/tui/features/hub/api/install-hub-entry.d.ts +14 -0
- package/dist/tui/features/hub/api/install-hub-entry.js +24 -0
- package/dist/tui/features/hub/api/list-hub-registries.d.ts +16 -0
- package/dist/tui/features/hub/api/list-hub-registries.js +17 -0
- package/dist/tui/features/hub/api/remove-hub-registry.d.ts +11 -0
- package/dist/tui/features/hub/api/remove-hub-registry.js +24 -0
- package/dist/tui/features/hub/components/hub-agent-step.d.ts +8 -0
- package/dist/tui/features/hub/components/hub-agent-step.js +14 -0
- package/dist/tui/features/hub/components/hub-detail-step.d.ts +10 -0
- package/dist/tui/features/hub/components/hub-detail-step.js +25 -0
- package/dist/tui/features/hub/components/hub-flow.d.ts +7 -0
- package/dist/tui/features/hub/components/hub-flow.js +90 -0
- package/dist/tui/features/hub/components/hub-list-step.d.ts +10 -0
- package/dist/tui/features/hub/components/hub-list-step.js +34 -0
- package/dist/tui/features/hub/components/hub-registry-add-view.d.ts +12 -0
- package/dist/tui/features/hub/components/hub-registry-add-view.js +36 -0
- package/dist/tui/features/hub/components/hub-registry-list-view.d.ts +7 -0
- package/dist/tui/features/hub/components/hub-registry-list-view.js +38 -0
- package/dist/tui/features/hub/components/hub-registry-remove-view.d.ts +8 -0
- package/dist/tui/features/hub/components/hub-registry-remove-view.js +17 -0
- package/dist/tui/features/model/api/get-models-by-providers.d.ts +20 -0
- package/dist/tui/features/model/api/get-models-by-providers.js +17 -0
- package/dist/tui/features/model/api/get-models.d.ts +20 -0
- package/dist/tui/features/model/api/get-models.js +17 -0
- package/dist/tui/features/model/api/set-active-model.d.ts +13 -0
- package/dist/tui/features/model/api/set-active-model.js +13 -0
- package/dist/tui/features/model/components/model-dialog.d.ts +67 -0
- package/dist/tui/features/model/components/model-dialog.js +96 -0
- package/dist/tui/features/model/components/model-flow.d.ts +17 -0
- package/dist/tui/features/model/components/model-flow.js +108 -0
- package/dist/tui/features/model/stores/model-store.d.ts +35 -0
- package/dist/tui/features/model/stores/model-store.js +26 -0
- package/dist/tui/features/onboarding/api/auto-setup-onboarding.d.ts +8 -0
- package/dist/tui/features/onboarding/api/auto-setup-onboarding.js +24 -0
- package/dist/tui/features/onboarding/api/complete-onboarding.d.ts +11 -0
- package/dist/tui/features/onboarding/api/complete-onboarding.js +24 -0
- package/dist/tui/features/onboarding/api/get-onboarding-state.d.ts +16 -0
- package/dist/tui/features/onboarding/api/get-onboarding-state.js +17 -0
- package/dist/tui/features/onboarding/hooks/use-app-view-mode.d.ts +27 -0
- package/dist/tui/features/onboarding/hooks/use-app-view-mode.js +36 -0
- package/dist/tui/features/onboarding/types.d.ts +7 -0
- package/dist/tui/features/onboarding/types.js +4 -0
- package/dist/tui/features/onboarding/utils.d.ts +28 -0
- package/dist/tui/features/onboarding/utils.js +76 -0
- package/dist/tui/features/provider/api/connect-provider.d.ts +13 -0
- package/dist/tui/features/provider/api/connect-provider.js +28 -0
- package/dist/tui/features/provider/api/disconnect-provider.d.ts +11 -0
- package/dist/tui/features/provider/api/disconnect-provider.js +26 -0
- package/dist/tui/features/provider/api/get-active-provider-config.d.ts +16 -0
- package/dist/tui/features/provider/api/get-active-provider-config.js +17 -0
- package/dist/tui/features/provider/api/get-providers.d.ts +16 -0
- package/dist/tui/features/provider/api/get-providers.js +17 -0
- package/dist/tui/features/provider/api/set-active-provider.d.ts +11 -0
- package/dist/tui/features/provider/api/set-active-provider.js +24 -0
- package/dist/tui/features/provider/api/validate-api-key.d.ts +12 -0
- package/dist/tui/features/provider/api/validate-api-key.js +13 -0
- package/dist/tui/features/provider/components/api-key-dialog.d.ts +41 -0
- package/dist/tui/features/provider/components/api-key-dialog.js +126 -0
- package/dist/tui/features/provider/components/base-url-dialog.d.ts +24 -0
- package/dist/tui/features/provider/components/base-url-dialog.js +77 -0
- package/dist/tui/features/provider/components/model-select-step.d.ts +20 -0
- package/dist/tui/features/provider/components/model-select-step.js +73 -0
- package/dist/tui/features/provider/components/provider-dialog.d.ts +29 -0
- package/dist/tui/features/provider/components/provider-dialog.js +20 -0
- package/dist/tui/features/provider/components/provider-flow.d.ts +25 -0
- package/dist/tui/features/provider/components/provider-flow.js +257 -0
- package/dist/tui/features/provider/stores/provider-store.d.ts +28 -0
- package/dist/tui/features/provider/stores/provider-store.js +22 -0
- package/dist/tui/features/pull/api/execute-pull.d.ts +11 -0
- package/dist/tui/features/pull/api/execute-pull.js +13 -0
- package/dist/tui/features/pull/api/prepare-pull.d.ts +20 -0
- package/dist/tui/features/pull/api/prepare-pull.js +17 -0
- package/dist/tui/features/pull/components/pull-flow.d.ts +12 -0
- package/dist/tui/features/pull/components/pull-flow.js +70 -0
- package/dist/tui/features/push/api/execute-push.d.ts +11 -0
- package/dist/tui/features/push/api/execute-push.js +13 -0
- package/dist/tui/features/push/api/prepare-push.d.ts +20 -0
- package/dist/tui/features/push/api/prepare-push.js +17 -0
- package/dist/tui/features/push/components/push-flow.d.ts +13 -0
- package/dist/tui/features/push/components/push-flow.js +86 -0
- package/dist/tui/features/query/api/create-query-task.d.ts +17 -0
- package/dist/tui/features/query/api/create-query-task.js +27 -0
- package/dist/tui/features/query/components/query-flow.d.ts +18 -0
- package/dist/tui/features/query/components/query-flow.js +36 -0
- package/dist/tui/features/reset/api/execute-reset.d.ts +8 -0
- package/dist/tui/features/reset/api/execute-reset.js +13 -0
- package/dist/tui/features/reset/components/reset-flow.d.ts +12 -0
- package/dist/tui/features/reset/components/reset-flow.js +44 -0
- package/dist/tui/features/session/components/new-session-flow.d.ts +12 -0
- package/dist/tui/features/session/components/new-session-flow.js +28 -0
- package/dist/tui/features/space/api/get-spaces.d.ts +16 -0
- package/dist/tui/features/space/api/get-spaces.js +17 -0
- package/dist/tui/features/space/api/switch-space.d.ts +11 -0
- package/dist/tui/features/space/api/switch-space.js +24 -0
- package/dist/tui/features/space/components/space-list-view.d.ts +12 -0
- package/dist/tui/features/space/components/space-list-view.js +56 -0
- package/dist/tui/features/space/components/space-switch-flow.d.ts +13 -0
- package/dist/tui/features/space/components/space-switch-flow.js +97 -0
- package/dist/tui/features/status/api/get-status.d.ts +16 -0
- package/dist/tui/features/status/api/get-status.js +17 -0
- package/dist/tui/features/status/components/status-view.d.ts +12 -0
- package/dist/tui/features/status/components/status-view.js +26 -0
- package/dist/tui/features/status/utils/format-status.d.ts +5 -0
- package/dist/tui/features/status/utils/format-status.js +62 -0
- package/dist/tui/features/tasks/components/task-subscription-initializer.d.ts +5 -0
- package/dist/tui/features/tasks/components/task-subscription-initializer.js +9 -0
- package/dist/tui/features/tasks/hooks/use-task-subscriptions.d.ts +5 -0
- package/dist/tui/features/tasks/hooks/use-task-subscriptions.js +74 -0
- package/dist/tui/features/tasks/stores/tasks-store.d.ts +92 -0
- package/dist/tui/features/tasks/stores/tasks-store.js +262 -0
- package/dist/tui/features/transport/components/transport-initializer.d.ts +13 -0
- package/dist/tui/features/transport/components/transport-initializer.js +107 -0
- package/dist/tui/features/transport/hooks/use-transport.d.ts +19 -0
- package/dist/tui/features/transport/hooks/use-transport.js +16 -0
- package/dist/tui/hooks/index.d.ts +14 -13
- package/dist/tui/hooks/index.js +15 -9
- package/dist/tui/hooks/use-terminal-breakpoint.js +3 -2
- package/dist/tui/lib/api-client.d.ts +20 -0
- package/dist/tui/lib/api-client.js +29 -0
- package/dist/tui/lib/environment.d.ts +18 -0
- package/dist/tui/lib/environment.js +18 -0
- package/dist/tui/lib/react-query.d.ts +17 -0
- package/dist/tui/lib/react-query.js +17 -0
- package/dist/tui/lib/transport-logger.d.ts +13 -0
- package/dist/tui/lib/transport-logger.js +40 -0
- package/dist/tui/providers/app-providers.d.ts +1 -16
- package/dist/tui/providers/app-providers.js +26 -4
- package/dist/tui/repl-startup.d.ts +1 -12
- package/dist/tui/repl-startup.js +6 -24
- package/dist/tui/stores/mode-store.d.ts +25 -0
- package/dist/tui/stores/mode-store.js +49 -0
- package/dist/tui/stores/theme-store.d.ts +43 -0
- package/dist/tui/stores/theme-store.js +39 -0
- package/dist/tui/stores/transport-store.d.ts +40 -0
- package/dist/tui/stores/transport-store.js +40 -0
- package/dist/tui/types/commands.d.ts +23 -91
- package/dist/tui/types/commands.js +1 -13
- package/dist/tui/types/index.d.ts +3 -4
- package/dist/tui/types/index.js +0 -2
- package/dist/tui/types/messages.d.ts +8 -1
- package/dist/tui/types/ui.d.ts +0 -5
- package/dist/tui/utils/error-messages.d.ts +22 -0
- package/dist/tui/utils/error-messages.js +45 -0
- package/dist/tui/utils/index.d.ts +2 -0
- package/dist/tui/utils/index.js +2 -0
- package/dist/tui/utils/input.d.ts +14 -0
- package/dist/tui/utils/input.js +17 -0
- package/dist/tui/utils/log.d.ts +1 -1
- package/node_modules/@campfirein/brv-transport-client/README.md +79 -338
- package/node_modules/@campfirein/brv-transport-client/dist/constants.d.ts +18 -3
- package/node_modules/@campfirein/brv-transport-client/dist/constants.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/constants.js +25 -4
- package/node_modules/@campfirein/brv-transport-client/dist/constants.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.d.ts +4 -9
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.js +9 -24
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/entities/instance-info.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.d.ts +20 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.js +30 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/connection-error.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.d.ts +3 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.js +4 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/errors/transport-error.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.d.ts +10 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.js +10 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/event-names.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.d.ts +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.js +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/events/index.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.d.ts +9 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.js +8 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/types.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/common.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/common.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/event-name-validator.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/event-name-validator.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/index.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/index.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/room-name-validator.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/room-name-validator.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/url-validator.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/domain/validators/url-validator.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory-config.d.ts +150 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory-config.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory-config.js +8 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory-config.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory.d.ts +9 -4
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-factory.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-logger.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client-logger.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-client.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-connection-state.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-connection-state.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-event-dispatcher.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-event-dispatcher.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-force-reconnect-manager.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-force-reconnect-manager.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-discovery.d.ts +9 -22
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-discovery.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-discovery.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-manager.d.ts +46 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-manager.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-manager.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-manager.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-reconnection-strategy.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-reconnection-strategy.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-room-manager.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-room-manager.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket-provider.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket-provider.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-socket.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-spawn-lock.d.ts +27 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-spawn-lock.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-spawn-lock.js +2 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-spawn-lock.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-wake-detector.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-wake-detector.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/index.d.ts +26 -16
- package/node_modules/@campfirein/brv-transport-client/dist/index.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/index.js +28 -18
- package/node_modules/@campfirein/brv-transport-client/dist/index.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.d.ts +49 -167
- package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.js +161 -260
- package/node_modules/@campfirein/brv-transport-client/dist/infra/client-factory.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/connection-state-manager.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-connector.d.ts +46 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-connector.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-connector.js +47 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-connector.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-discovery-sync.d.ts +41 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-discovery-sync.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-discovery-sync.js +48 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-discovery-sync.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-health.d.ts +37 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-health.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-health.js +35 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-health.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-instance-discovery.d.ts +22 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-instance-discovery.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-instance-discovery.js +83 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-instance-discovery.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-reconnector.d.ts +60 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-reconnector.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-reconnector.js +101 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-reconnector.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-spawner.d.ts +33 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-spawner.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-spawner.js +161 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/daemon-spawner.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/event-dispatcher.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/event-dispatcher.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/find-project-root.d.ts +11 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/find-project-root.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/find-project-root.js +31 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/find-project-root.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.d.ts +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.js +4 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/force-reconnect-manager.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/global-data-path.d.ts +12 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/global-data-path.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/global-data-path.js +38 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/global-data-path.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/global-instance-manager.d.ts +37 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/global-instance-manager.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/global-instance-manager.js +100 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/global-instance-manager.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/heartbeat-utils.d.ts +12 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/heartbeat-utils.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/heartbeat-utils.js +29 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/heartbeat-utils.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/no-op-client-logger.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/no-op-client-logger.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/process-utils.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/process-utils.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/reconnection-strategy.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/reconnection-strategy.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/resolve-server-path.d.ts +12 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/resolve-server-path.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/resolve-server-path.js +52 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/resolve-server-path.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/room-manager.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/room-manager.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.d.ts +2 -2
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.js +4 -2
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/index.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.d.ts +65 -3
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.js +44 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/schemas.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/types.d.ts +11 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/types.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/schemas/types.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.d.ts +32 -61
- package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.js +133 -37
- package/node_modules/@campfirein/brv-transport-client/dist/infra/socket-io-client.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/spawn-lock.d.ts +27 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/spawn-lock.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/spawn-lock.js +124 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/spawn-lock.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/utils/deep-freeze.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/utils/deep-freeze.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/wait-for-connected-client.d.ts +13 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/wait-for-connected-client.d.ts.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/wait-for-connected-client.js +33 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/wait-for-connected-client.js.map +1 -0
- package/node_modules/@campfirein/brv-transport-client/dist/infra/wake-detector.d.ts.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/wake-detector.js.map +1 -1
- package/node_modules/@campfirein/brv-transport-client/package.json +3 -12
- package/oclif.manifest.json +1215 -180
- package/package.json +56 -10
- package/dist/agent/infra/blob/migrations.d.ts +0 -63
- package/dist/agent/infra/blob/migrations.js +0 -148
- package/dist/agent/infra/blob/sqlite-blob-storage.d.ts +0 -82
- package/dist/agent/infra/blob/sqlite-blob-storage.js +0 -304
- package/dist/agent/infra/llm/generators/openrouter-content-generator.d.ts +0 -94
- package/dist/agent/infra/llm/generators/openrouter-content-generator.js +0 -280
- package/dist/agent/infra/llm/internal-llm-service.d.ts +0 -375
- package/dist/agent/infra/llm/internal-llm-service.js +0 -1079
- package/dist/agent/infra/llm/openrouter-llm-service.d.ts +0 -215
- package/dist/agent/infra/llm/openrouter-llm-service.js +0 -572
- package/dist/agent/infra/llm/stream-processor.d.ts +0 -178
- package/dist/agent/infra/llm/stream-processor.js +0 -350
- package/dist/agent/infra/llm/transformers/openrouter-stream-transformer.d.ts +0 -49
- package/dist/agent/infra/llm/transformers/openrouter-stream-transformer.js +0 -270
- package/dist/agent/infra/storage/blob-history-storage.d.ts +0 -76
- package/dist/agent/infra/storage/blob-history-storage.js +0 -178
- package/dist/agent/infra/storage/dual-format-history-storage.d.ts +0 -77
- package/dist/agent/infra/storage/dual-format-history-storage.js +0 -149
- package/dist/agent/infra/storage/sqlite-key-storage.d.ts +0 -105
- package/dist/agent/infra/storage/sqlite-key-storage.js +0 -404
- package/dist/oclif/commands/curate.d.ts +0 -21
- package/dist/oclif/commands/curate.js +0 -96
- package/dist/oclif/commands/init.d.ts +0 -18
- package/dist/oclif/commands/init.js +0 -129
- package/dist/server/core/domain/entities/context-tree-index.d.ts +0 -26
- package/dist/server/core/domain/entities/context-tree-index.js +0 -27
- package/dist/server/core/domain/entities/event.d.ts +0 -8
- package/dist/server/core/domain/entities/event.js +0 -25
- package/dist/server/core/domain/errors/ace-error.d.ts +0 -34
- package/dist/server/core/domain/errors/ace-error.js +0 -53
- package/dist/server/core/domain/errors/brv-config-version-error.d.ts +0 -16
- package/dist/server/core/domain/errors/brv-config-version-error.js +0 -21
- package/dist/server/core/domain/errors/core-process-error.d.ts +0 -27
- package/dist/server/core/domain/errors/core-process-error.js +0 -43
- package/dist/server/core/domain/instance/index.d.ts +0 -1
- package/dist/server/core/domain/instance/index.js +0 -1
- package/dist/server/core/domain/instance/types.d.ts +0 -57
- package/dist/server/core/domain/instance/types.js +0 -72
- package/dist/server/core/interfaces/instance/i-instance-discovery.d.ts +0 -45
- package/dist/server/core/interfaces/instance/i-instance-manager.d.ts +0 -58
- package/dist/server/core/interfaces/instance/index.d.ts +0 -2
- package/dist/server/core/interfaces/instance/index.js +0 -2
- package/dist/server/core/interfaces/noop-implementations.d.ts +0 -53
- package/dist/server/core/interfaces/noop-implementations.js +0 -62
- package/dist/server/core/interfaces/services/i-tracking-service.d.ts +0 -21
- package/dist/server/core/interfaces/usecase/i-connectors-use-case.d.ts +0 -3
- package/dist/server/core/interfaces/usecase/i-curate-use-case.d.ts +0 -14
- package/dist/server/core/interfaces/usecase/i-init-use-case.d.ts +0 -11
- package/dist/server/core/interfaces/usecase/i-login-use-case.d.ts +0 -6
- package/dist/server/core/interfaces/usecase/i-logout-use-case.d.ts +0 -5
- package/dist/server/core/interfaces/usecase/i-pull-use-case.d.ts +0 -7
- package/dist/server/core/interfaces/usecase/i-push-use-case.d.ts +0 -8
- package/dist/server/core/interfaces/usecase/i-query-use-case.d.ts +0 -11
- package/dist/server/core/interfaces/usecase/i-reset-use-case.d.ts +0 -6
- package/dist/server/core/interfaces/usecase/i-space-list-use-case.d.ts +0 -3
- package/dist/server/core/interfaces/usecase/i-space-switch-use-case.d.ts +0 -3
- package/dist/server/core/interfaces/usecase/i-status-use-case.d.ts +0 -6
- package/dist/server/infra/executor/task-processor.d.ts +0 -89
- package/dist/server/infra/executor/task-processor.js +0 -133
- package/dist/server/infra/instance/file-instance-discovery.d.ts +0 -31
- package/dist/server/infra/instance/file-instance-discovery.js +0 -84
- package/dist/server/infra/instance/file-instance-manager.d.ts +0 -46
- package/dist/server/infra/instance/file-instance-manager.js +0 -123
- package/dist/server/infra/instance/index.d.ts +0 -3
- package/dist/server/infra/instance/index.js +0 -3
- package/dist/server/infra/instance/process-utils.d.ts +0 -14
- package/dist/server/infra/instance/process-utils.js +0 -39
- package/dist/server/infra/process/agent-worker.d.ts +0 -20
- package/dist/server/infra/process/agent-worker.js +0 -1399
- package/dist/server/infra/process/inline-agent-executor.d.ts +0 -32
- package/dist/server/infra/process/inline-agent-executor.js +0 -278
- package/dist/server/infra/process/ipc-types.d.ts +0 -68
- package/dist/server/infra/process/ipc-types.js +0 -12
- package/dist/server/infra/process/parent-heartbeat.d.ts +0 -47
- package/dist/server/infra/process/parent-heartbeat.js +0 -118
- package/dist/server/infra/process/process-manager.d.ts +0 -242
- package/dist/server/infra/process/process-manager.js +0 -765
- package/dist/server/infra/process/task-queue-manager.d.ts +0 -125
- package/dist/server/infra/process/task-queue-manager.js +0 -185
- package/dist/server/infra/process/transport-worker.d.ts +0 -20
- package/dist/server/infra/process/transport-worker.js +0 -196
- package/dist/server/infra/storage/keychain-token-store.d.ts +0 -13
- package/dist/server/infra/storage/keychain-token-store.js +0 -42
- package/dist/server/infra/terminal/oclif-terminal.d.ts +0 -19
- package/dist/server/infra/terminal/oclif-terminal.js +0 -60
- package/dist/server/infra/terminal/repl-terminal.d.ts +0 -31
- package/dist/server/infra/terminal/repl-terminal.js +0 -116
- package/dist/server/infra/tracking/mixpanel-tracking-service.d.ts +0 -24
- package/dist/server/infra/tracking/mixpanel-tracking-service.js +0 -49
- package/dist/server/infra/transport/transport-factory.d.ts +0 -17
- package/dist/server/infra/transport/transport-factory.js +0 -31
- package/dist/server/infra/usecase/connectors-use-case.d.ts +0 -63
- package/dist/server/infra/usecase/connectors-use-case.js +0 -234
- package/dist/server/infra/usecase/curate-use-case.d.ts +0 -59
- package/dist/server/infra/usecase/curate-use-case.js +0 -274
- package/dist/server/infra/usecase/init-use-case.d.ts +0 -126
- package/dist/server/infra/usecase/init-use-case.js +0 -538
- package/dist/server/infra/usecase/login-use-case.d.ts +0 -30
- package/dist/server/infra/usecase/login-use-case.js +0 -127
- package/dist/server/infra/usecase/logout-use-case.d.ts +0 -19
- package/dist/server/infra/usecase/logout-use-case.js +0 -48
- package/dist/server/infra/usecase/pull-use-case.d.ts +0 -49
- package/dist/server/infra/usecase/pull-use-case.js +0 -147
- package/dist/server/infra/usecase/push-use-case.d.ts +0 -50
- package/dist/server/infra/usecase/push-use-case.js +0 -191
- package/dist/server/infra/usecase/query-use-case.d.ts +0 -73
- package/dist/server/infra/usecase/query-use-case.js +0 -420
- package/dist/server/infra/usecase/reset-use-case.d.ts +0 -21
- package/dist/server/infra/usecase/reset-use-case.js +0 -60
- package/dist/server/infra/usecase/space-list-use-case.d.ts +0 -27
- package/dist/server/infra/usecase/space-list-use-case.js +0 -64
- package/dist/server/infra/usecase/space-switch-use-case.d.ts +0 -26
- package/dist/server/infra/usecase/space-switch-use-case.js +0 -110
- package/dist/server/infra/usecase/status-use-case.d.ts +0 -75
- package/dist/server/infra/usecase/status-use-case.js +0 -268
- package/dist/server/templates/skill/TROUBLESHOOTING.md +0 -50
- package/dist/server/templates/skill/WORKFLOWS.md +0 -229
- package/dist/server/utils/environment-detector.d.ts +0 -20
- package/dist/server/utils/environment-detector.js +0 -92
- package/dist/tui/app.d.ts +0 -9
- package/dist/tui/app.js +0 -28
- package/dist/tui/commands/arg-parser.d.ts +0 -102
- package/dist/tui/commands/connectors-command.d.ts +0 -8
- package/dist/tui/commands/connectors-command.js +0 -49
- package/dist/tui/commands/curate-command.d.ts +0 -9
- package/dist/tui/commands/curate-command.js +0 -80
- package/dist/tui/commands/index.d.ts +0 -8
- package/dist/tui/commands/index.js +0 -45
- package/dist/tui/commands/init-command.d.ts +0 -7
- package/dist/tui/commands/init-command.js +0 -87
- package/dist/tui/commands/login-command.d.ts +0 -7
- package/dist/tui/commands/login-command.js +0 -50
- package/dist/tui/commands/logout-command.d.ts +0 -5
- package/dist/tui/commands/logout-command.js +0 -46
- package/dist/tui/commands/model-command.d.ts +0 -13
- package/dist/tui/commands/model-command.js +0 -212
- package/dist/tui/commands/new-command.d.ts +0 -14
- package/dist/tui/commands/new-command.js +0 -61
- package/dist/tui/commands/provider-command.d.ts +0 -13
- package/dist/tui/commands/provider-command.js +0 -181
- package/dist/tui/commands/pull-command.d.ts +0 -5
- package/dist/tui/commands/pull-command.js +0 -61
- package/dist/tui/commands/push-command.d.ts +0 -5
- package/dist/tui/commands/push-command.js +0 -66
- package/dist/tui/commands/query-command.d.ts +0 -5
- package/dist/tui/commands/query-command.js +0 -63
- package/dist/tui/commands/reset-command.d.ts +0 -5
- package/dist/tui/commands/reset-command.js +0 -61
- package/dist/tui/commands/space/index.d.ts +0 -5
- package/dist/tui/commands/space/index.js +0 -14
- package/dist/tui/commands/space/list-command.d.ts +0 -5
- package/dist/tui/commands/space/list-command.js +0 -70
- package/dist/tui/commands/space/switch-command.d.ts +0 -5
- package/dist/tui/commands/space/switch-command.js +0 -35
- package/dist/tui/commands/status-command.d.ts +0 -5
- package/dist/tui/commands/status-command.js +0 -39
- package/dist/tui/components/api-key-dialog.d.ts +0 -39
- package/dist/tui/components/api-key-dialog.js +0 -94
- package/dist/tui/components/message-list.d.ts +0 -16
- package/dist/tui/components/message-list.js +0 -120
- package/dist/tui/components/model-dialog.d.ts +0 -63
- package/dist/tui/components/model-dialog.js +0 -89
- package/dist/tui/components/provider-dialog.d.ts +0 -27
- package/dist/tui/components/provider-dialog.js +0 -31
- package/dist/tui/components/tab-bar.d.ts +0 -11
- package/dist/tui/components/tab-bar.js +0 -11
- package/dist/tui/constants.d.ts +0 -6
- package/dist/tui/constants.js +0 -8
- package/dist/tui/contexts/auth-context.d.ts +0 -33
- package/dist/tui/contexts/auth-context.js +0 -193
- package/dist/tui/contexts/commands-context.d.ts +0 -37
- package/dist/tui/contexts/commands-context.js +0 -65
- package/dist/tui/contexts/index.d.ts +0 -11
- package/dist/tui/contexts/index.js +0 -11
- package/dist/tui/contexts/mode-context.d.ts +0 -43
- package/dist/tui/contexts/mode-context.js +0 -70
- package/dist/tui/contexts/onboarding-context.d.ts +0 -49
- package/dist/tui/contexts/onboarding-context.js +0 -193
- package/dist/tui/contexts/services-context.d.ts +0 -32
- package/dist/tui/contexts/services-context.js +0 -27
- package/dist/tui/contexts/tasks-context.d.ts +0 -101
- package/dist/tui/contexts/tasks-context.js +0 -422
- package/dist/tui/contexts/theme-context.d.ts +0 -55
- package/dist/tui/contexts/theme-context.js +0 -62
- package/dist/tui/contexts/transport-context.d.ts +0 -29
- package/dist/tui/contexts/transport-context.js +0 -81
- package/dist/tui/hooks/use-activity-logs.d.ts +0 -18
- package/dist/tui/hooks/use-activity-logs.js +0 -207
- package/dist/tui/hooks/use-auth-polling.d.ts +0 -27
- package/dist/tui/hooks/use-auth-polling.js +0 -118
- package/dist/tui/hooks/use-onboarding-logs.d.ts +0 -17
- package/dist/tui/hooks/use-onboarding-logs.js +0 -26
- package/dist/tui/hooks/use-onboarding.d.ts +0 -7
- package/dist/tui/hooks/use-onboarding.js +0 -6
- package/dist/tui/hooks/use-slash-command-processor.d.ts +0 -16
- package/dist/tui/hooks/use-slash-command-processor.js +0 -132
- package/dist/tui/hooks/use-slash-completion.d.ts +0 -30
- package/dist/tui/hooks/use-slash-completion.js +0 -251
- package/dist/tui/index.d.ts +0 -1
- package/dist/tui/index.js +0 -1
- package/dist/tui/types.d.ts +0 -1
- package/dist/tui/types.js +0 -1
- package/dist/tui/utils/transport-client-helper.d.ts +0 -9
- package/dist/tui/utils/transport-client-helper.js +0 -99
- package/dist/tui/views/index.d.ts +0 -5
- package/dist/tui/views/index.js +0 -5
- package/dist/tui/views/init-view.d.ts +0 -15
- package/dist/tui/views/init-view.js +0 -41
- package/dist/tui/views/login-view.d.ts +0 -10
- package/dist/tui/views/login-view.js +0 -33
- package/dist/tui/views/main-view.d.ts +0 -12
- package/dist/tui/views/main-view.js +0 -20
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.d.ts +0 -19
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.d.ts.map +0 -1
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.js +0 -2
- package/node_modules/@campfirein/brv-transport-client/dist/core/interfaces/i-instance-reader.js.map +0 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.d.ts +0 -32
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.d.ts.map +0 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.js +0 -85
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-discovery.js.map +0 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.d.ts +0 -16
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.d.ts.map +0 -1
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.js +0 -47
- package/node_modules/@campfirein/brv-transport-client/dist/infra/file-instance-reader.js.map +0 -1
- /package/dist/{server/core/interfaces/instance/i-instance-discovery.js → agent/infra/agent/provider-update-config.js} +0 -0
- /package/dist/server/core/{interfaces/instance/i-instance-manager.js → domain/entities/curate-log-entry.js} +0 -0
- /package/dist/server/core/{interfaces/services/i-tracking-service.js → domain/entities/curation-status.js} +0 -0
- /package/dist/server/core/{interfaces/usecase/i-connectors-use-case.js → domain/transport/task-info.js} +0 -0
- /package/dist/server/core/interfaces/{usecase/i-curate-use-case.js → agent/i-agent-pool.js} +0 -0
- /package/dist/server/core/interfaces/{usecase/i-init-use-case.js → client/i-client-manager.js} +0 -0
- /package/dist/server/core/interfaces/{usecase/i-login-use-case.js → context-tree/i-context-tree-archive-service.js} +0 -0
- /package/dist/server/core/interfaces/{usecase/i-logout-use-case.js → context-tree/i-context-tree-manifest-service.js} +0 -0
- /package/dist/server/core/interfaces/{usecase/i-pull-use-case.js → context-tree/i-context-tree-merger.js} +0 -0
- /package/dist/server/core/interfaces/{usecase/i-push-use-case.js → context-tree/i-context-tree-summary-service.js} +0 -0
- /package/dist/server/core/interfaces/{usecase/i-query-use-case.js → daemon/i-agent-idle-timeout-policy.js} +0 -0
- /package/dist/server/core/interfaces/{usecase/i-reset-use-case.js → daemon/i-daemon-resilience.js} +0 -0
- /package/dist/server/core/interfaces/{usecase/i-space-list-use-case.js → daemon/i-heartbeat-writer.js} +0 -0
- /package/dist/server/core/interfaces/{usecase/i-space-switch-use-case.js → daemon/i-idle-timeout-policy.js} +0 -0
- /package/dist/server/core/interfaces/{usecase/i-status-use-case.js → daemon/i-shutdown-handler.js} +0 -0
- /package/dist/tui/{commands → features/commands/utils}/arg-parser.js +0 -0
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import { ConnectionError, ConnectionFailedError, connectToTransport, DAEMON_STOP_BUDGET_MS, DAEMON_STOP_POLL_INTERVAL_MS, DaemonInstanceDiscovery, discoverDaemon, ensureDaemonRunning, InstanceCrashedError, isProcessAlive, NoInstanceRunningError, } from '@campfirein/brv-transport-client';
|
|
2
|
+
import { Command, Flags } from '@oclif/core';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { existsSync, readdirSync, statSync } from 'node:fs';
|
|
5
|
+
import { platform } from 'node:os';
|
|
6
|
+
import { join } from 'node:path';
|
|
7
|
+
import { pathToFileURL } from 'node:url';
|
|
8
|
+
import { isDevelopment } from '../../server/config/environment.js';
|
|
9
|
+
import { getGlobalConfigDir } from '../../server/utils/global-config-path.js';
|
|
10
|
+
import { getGlobalDataDir } from '../../server/utils/global-data-path.js';
|
|
11
|
+
const MONITOR_REFRESH_MS = 2000;
|
|
12
|
+
const existsLabel = (exists) => (exists ? '' : chalk.yellow(' (not created)'));
|
|
13
|
+
/** Maximum items to show per list section before truncating with "... and N more". */
|
|
14
|
+
const RENDER_LIMIT = 5;
|
|
15
|
+
/**
|
|
16
|
+
* Find the most recently modified server-*.log in the daemon logs directory.
|
|
17
|
+
* Returns undefined if directory doesn't exist or has no matching files.
|
|
18
|
+
*/
|
|
19
|
+
const getCurrentDaemonLog = (logsDir) => {
|
|
20
|
+
try {
|
|
21
|
+
const files = readdirSync(logsDir)
|
|
22
|
+
.filter((f) => f.startsWith('server-') && f.endsWith('.log'))
|
|
23
|
+
.map((f) => ({ file: f, mtime: statSync(join(logsDir, f)).mtimeMs }))
|
|
24
|
+
.sort((a, b) => b.mtime - a.mtime);
|
|
25
|
+
return files.length > 0 ? join(logsDir, files[0].file) : undefined;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Wrap a file path in an OSC 8 terminal hyperlink.
|
|
33
|
+
* Clicking the path in a supported terminal opens it in the OS file manager.
|
|
34
|
+
* Unsupported terminals silently ignore the escape sequences.
|
|
35
|
+
*/
|
|
36
|
+
const fileHyperlink = (filePath) => {
|
|
37
|
+
if (!process.stdout.isTTY)
|
|
38
|
+
return filePath;
|
|
39
|
+
const url = pathToFileURL(filePath).href;
|
|
40
|
+
return `\u001B]8;;${url}\u001B\\${filePath}\u001B]8;;\u001B\\`;
|
|
41
|
+
};
|
|
42
|
+
export default class Debug extends Command {
|
|
43
|
+
static description = 'Live monitor for daemon internal state (development only)';
|
|
44
|
+
static examples = [
|
|
45
|
+
'<%= config.bin %> <%= command.id %>',
|
|
46
|
+
'<%= config.bin %> <%= command.id %> --format json',
|
|
47
|
+
'<%= config.bin %> <%= command.id %> --once',
|
|
48
|
+
];
|
|
49
|
+
static flags = {
|
|
50
|
+
force: Flags.boolean({
|
|
51
|
+
default: false,
|
|
52
|
+
description: 'Kill existing daemon and start fresh',
|
|
53
|
+
}),
|
|
54
|
+
format: Flags.string({
|
|
55
|
+
char: 'f',
|
|
56
|
+
default: 'tree',
|
|
57
|
+
description: 'Output format',
|
|
58
|
+
options: ['tree', 'json'],
|
|
59
|
+
}),
|
|
60
|
+
once: Flags.boolean({
|
|
61
|
+
default: false,
|
|
62
|
+
description: 'Print once and exit (no live monitoring)',
|
|
63
|
+
}),
|
|
64
|
+
};
|
|
65
|
+
static hidden = !isDevelopment();
|
|
66
|
+
clearScreen() {
|
|
67
|
+
if (process.stdout.isTTY) {
|
|
68
|
+
process.stdout.write('\u001B[2J\u001B[H');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
connect() {
|
|
72
|
+
// Debug commands should not register to avoid blocking daemon idle timeout
|
|
73
|
+
return connectToTransport(process.cwd(), { autoRegister: false, discovery: new DaemonInstanceDiscovery() });
|
|
74
|
+
}
|
|
75
|
+
ensureDaemon() {
|
|
76
|
+
return ensureDaemonRunning();
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Kill the running daemon and wait for it to die.
|
|
80
|
+
* Internal to debug --force. Returns the PID that was killed, or undefined if none found.
|
|
81
|
+
*/
|
|
82
|
+
async killExistingDaemon() {
|
|
83
|
+
const status = discoverDaemon();
|
|
84
|
+
// Collect PID from any variant that has one
|
|
85
|
+
const pid = status.running ? status.pid : status.reason === 'no_instance' ? undefined : status.pid;
|
|
86
|
+
if (pid === undefined || !isProcessAlive(pid))
|
|
87
|
+
return undefined;
|
|
88
|
+
try {
|
|
89
|
+
process.kill(pid, 'SIGTERM');
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return pid;
|
|
93
|
+
}
|
|
94
|
+
const deadline = Date.now() + DAEMON_STOP_BUDGET_MS;
|
|
95
|
+
while (Date.now() < deadline) {
|
|
96
|
+
if (!isProcessAlive(pid))
|
|
97
|
+
return pid;
|
|
98
|
+
// eslint-disable-next-line no-await-in-loop
|
|
99
|
+
await new Promise((resolve) => {
|
|
100
|
+
setTimeout(resolve, DAEMON_STOP_POLL_INTERVAL_MS);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
// SIGTERM didn't work — force kill
|
|
104
|
+
try {
|
|
105
|
+
process.kill(pid, 'SIGKILL');
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
// already dead
|
|
109
|
+
}
|
|
110
|
+
return pid;
|
|
111
|
+
}
|
|
112
|
+
async run() {
|
|
113
|
+
if (!isDevelopment()) {
|
|
114
|
+
this.error('brv debug is only available in development mode');
|
|
115
|
+
}
|
|
116
|
+
const { flags } = await this.parse(Debug);
|
|
117
|
+
const format = flags.format === 'json' ? 'json' : 'tree';
|
|
118
|
+
// JSON format always implies one-shot (useful for scripting / piping)
|
|
119
|
+
const oneShot = flags.once || format === 'json';
|
|
120
|
+
// --force: kill existing daemon, then start a fresh one
|
|
121
|
+
if (flags.force) {
|
|
122
|
+
await this.killExistingDaemon();
|
|
123
|
+
const ensureResult = await this.ensureDaemon();
|
|
124
|
+
if (!ensureResult.success) {
|
|
125
|
+
if (format === 'json') {
|
|
126
|
+
this.log(JSON.stringify({ reason: ensureResult.reason, running: false }, null, 2));
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
this.log(`Daemon failed to start: ${chalk.red(ensureResult.reason)}`);
|
|
130
|
+
this.log("Run 'brv restart' to force a clean restart.");
|
|
131
|
+
}
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// Connect to existing daemon (no auto-start)
|
|
136
|
+
let client;
|
|
137
|
+
try {
|
|
138
|
+
const result = await this.connect();
|
|
139
|
+
client = result.client;
|
|
140
|
+
await (oneShot ? this.renderOnce(client, format) : this.runMonitor(client));
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
if (error instanceof NoInstanceRunningError) {
|
|
144
|
+
this.log('No daemon is running. Start one with: brv');
|
|
145
|
+
}
|
|
146
|
+
else if (error instanceof InstanceCrashedError) {
|
|
147
|
+
this.log("Daemon has crashed. Run 'brv restart' to force a clean restart.");
|
|
148
|
+
}
|
|
149
|
+
else if (error instanceof ConnectionFailedError || error instanceof ConnectionError) {
|
|
150
|
+
this.log(`Failed to connect to daemon: ${error.message}`);
|
|
151
|
+
this.log("Run 'brv restart' if the daemon is unresponsive.");
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
155
|
+
this.log(`Error: ${message}`);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
finally {
|
|
159
|
+
if (client) {
|
|
160
|
+
await client.disconnect();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
delay(ms, signal) {
|
|
165
|
+
return new Promise((resolve) => {
|
|
166
|
+
if (signal.aborted) {
|
|
167
|
+
resolve();
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const timer = setTimeout(resolve, ms);
|
|
171
|
+
signal.addEventListener('abort', () => {
|
|
172
|
+
clearTimeout(timer);
|
|
173
|
+
resolve();
|
|
174
|
+
}, { once: true });
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
formatDuration(ms) {
|
|
178
|
+
const seconds = Math.floor(ms / 1000);
|
|
179
|
+
const minutes = Math.floor(seconds / 60);
|
|
180
|
+
const hours = Math.floor(minutes / 60);
|
|
181
|
+
if (hours > 0)
|
|
182
|
+
return `${hours}h ${minutes % 60}m`;
|
|
183
|
+
if (minutes > 0)
|
|
184
|
+
return `${minutes}m ${seconds % 60}s`;
|
|
185
|
+
return `${seconds}s`;
|
|
186
|
+
}
|
|
187
|
+
formatTimeAgo(timestamp) {
|
|
188
|
+
return this.formatDuration(Date.now() - timestamp) + ' ago';
|
|
189
|
+
}
|
|
190
|
+
renderAgentPool(lines, agentPool, agentIdleStatus) {
|
|
191
|
+
lines.push(`├── Agent Pool (${agentPool.size}/${agentPool.maxSize})`);
|
|
192
|
+
if (agentPool.entries.length === 0) {
|
|
193
|
+
lines.push('│ └── (empty)');
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const visible = agentPool.entries.slice(0, RENDER_LIMIT);
|
|
197
|
+
const hidden = agentPool.entries.length - visible.length;
|
|
198
|
+
for (const [i, entry] of visible.entries()) {
|
|
199
|
+
const isLast = i === visible.length - 1 && hidden === 0;
|
|
200
|
+
const prefix = isLast ? '│ └── ' : '│ ├── ';
|
|
201
|
+
const childPrefix = isLast ? '│ ' : '│ │ ';
|
|
202
|
+
const status = entry.hasActiveTask
|
|
203
|
+
? chalk.yellow('busy')
|
|
204
|
+
: entry.isIdle
|
|
205
|
+
? chalk.dim('idle')
|
|
206
|
+
: chalk.green('ready');
|
|
207
|
+
const idleInfo = agentIdleStatus.find((s) => s.projectPath === entry.projectPath);
|
|
208
|
+
const idleCountdown = idleInfo ? chalk.dim(` (kill in ${this.formatDuration(idleInfo.remainingMs)})`) : '';
|
|
209
|
+
lines.push(`${prefix}${entry.projectPath}`, `${childPrefix}├── PID: ${entry.childPid ?? 'unknown'}`, `${childPrefix}├── Status: ${status}${idleCountdown}`, `${childPrefix}├── Created: ${this.formatTimeAgo(entry.createdAt)}`, `${childPrefix}└── Last used: ${this.formatTimeAgo(entry.lastUsedAt)}`);
|
|
210
|
+
}
|
|
211
|
+
if (hidden > 0) {
|
|
212
|
+
lines.push(`│ └── ${chalk.dim(`... and ${hidden} more`)}`);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
renderClients(lines, clients) {
|
|
216
|
+
lines.push(`└── Connected Clients (${clients.length})`);
|
|
217
|
+
if (clients.length === 0) {
|
|
218
|
+
lines.push(' └── (none)');
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
const visible = clients.slice(0, RENDER_LIMIT);
|
|
222
|
+
const hidden = clients.length - visible.length;
|
|
223
|
+
for (const [i, client] of visible.entries()) {
|
|
224
|
+
const isLast = i === visible.length - 1 && hidden === 0;
|
|
225
|
+
const prefix = isLast ? ' └── ' : ' ├── ';
|
|
226
|
+
const childPrefix = isLast ? ' ' : ' │ ';
|
|
227
|
+
const typeLabel = client.agentName ? `${client.type} · ${client.agentName}` : client.type;
|
|
228
|
+
const typeColor = client.type === 'agent'
|
|
229
|
+
? chalk.cyan(typeLabel)
|
|
230
|
+
: client.type === 'tui'
|
|
231
|
+
? chalk.green(typeLabel)
|
|
232
|
+
: chalk.blue(typeLabel);
|
|
233
|
+
lines.push(`${prefix}${client.id} (${typeColor})`, `${childPrefix}└── Project: ${client.projectPath ?? chalk.dim('(no project)')}`);
|
|
234
|
+
}
|
|
235
|
+
if (hidden > 0) {
|
|
236
|
+
lines.push(` └── ${chalk.dim(`... and ${hidden} more`)}`);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
async renderOnce(client, format) {
|
|
240
|
+
const state = await client.requestWithAck('daemon:getState');
|
|
241
|
+
if (format === 'json') {
|
|
242
|
+
const paths = this.resolveStoragePaths();
|
|
243
|
+
this.log(JSON.stringify({ ...state, paths }, null, 2));
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
this.renderTree(state);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
renderStoragePaths(lines, daemonLogPath) {
|
|
250
|
+
const configDir = getGlobalConfigDir();
|
|
251
|
+
const dataDir = getGlobalDataDir();
|
|
252
|
+
const logsDir = join(dataDir, 'logs');
|
|
253
|
+
const projectsDir = join(dataDir, 'projects');
|
|
254
|
+
const currentLog = daemonLogPath ?? getCurrentDaemonLog(logsDir);
|
|
255
|
+
lines.push('├── Storage Paths');
|
|
256
|
+
if (configDir !== dataDir) {
|
|
257
|
+
lines.push(`│ ├── Config: ${fileHyperlink(configDir)}${existsLabel(existsSync(configDir))}`);
|
|
258
|
+
}
|
|
259
|
+
lines.push(`│ ├── Data: ${fileHyperlink(dataDir)}${existsLabel(existsSync(dataDir))}`, `│ ├── Projects: ${fileHyperlink(projectsDir)}${existsLabel(existsSync(projectsDir))}`, `│ ├── Logs: ${fileHyperlink(logsDir)}${existsLabel(existsSync(logsDir))}`, `│ ├── Current Log: ${currentLog ? fileHyperlink(currentLog) : chalk.dim('(none)')}`);
|
|
260
|
+
const overrides = [];
|
|
261
|
+
if (process.env.BRV_DATA_DIR) {
|
|
262
|
+
overrides.push({ name: 'BRV_DATA_DIR', value: process.env.BRV_DATA_DIR });
|
|
263
|
+
}
|
|
264
|
+
// XDG env vars only affect path resolution on Linux
|
|
265
|
+
if (platform() === 'linux') {
|
|
266
|
+
if (process.env.XDG_CONFIG_HOME) {
|
|
267
|
+
overrides.push({ name: 'XDG_CONFIG_HOME', value: process.env.XDG_CONFIG_HOME });
|
|
268
|
+
}
|
|
269
|
+
if (process.env.XDG_DATA_HOME) {
|
|
270
|
+
overrides.push({ name: 'XDG_DATA_HOME', value: process.env.XDG_DATA_HOME });
|
|
271
|
+
}
|
|
272
|
+
if (process.env.XDG_STATE_HOME) {
|
|
273
|
+
overrides.push({ name: 'XDG_STATE_HOME', value: process.env.XDG_STATE_HOME });
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if (overrides.length === 0) {
|
|
277
|
+
lines.push(`│ └── Overrides: ${chalk.dim('(none)')}`);
|
|
278
|
+
}
|
|
279
|
+
else if (overrides.length === 1) {
|
|
280
|
+
lines.push(`│ └── Overrides: ${chalk.cyan(`${overrides[0].name}=${overrides[0].value}`)}`);
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
lines.push('│ └── Overrides');
|
|
284
|
+
for (const [i, override] of overrides.entries()) {
|
|
285
|
+
const isLast = i === overrides.length - 1;
|
|
286
|
+
const prefix = isLast ? '│ └── ' : '│ ├── ';
|
|
287
|
+
lines.push(`${prefix}${chalk.cyan(`${override.name}=${override.value}`)}`);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
renderTasks(lines, tasks) {
|
|
292
|
+
lines.push(`├── Active Tasks (${tasks.activeTasks.length})`);
|
|
293
|
+
if (tasks.activeTasks.length === 0) {
|
|
294
|
+
lines.push('│ └── (none)');
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
const visible = tasks.activeTasks.slice(0, RENDER_LIMIT);
|
|
298
|
+
const hidden = tasks.activeTasks.length - visible.length;
|
|
299
|
+
for (const [i, task] of visible.entries()) {
|
|
300
|
+
const isLast = i === visible.length - 1 && hidden === 0;
|
|
301
|
+
const prefix = isLast ? '│ └── ' : '│ ├── ';
|
|
302
|
+
const childPrefix = isLast ? '│ ' : '│ │ ';
|
|
303
|
+
lines.push(`${prefix}${task.taskId}`, `${childPrefix}├── Type: ${task.type}`, `${childPrefix}├── Client: ${task.clientId}`, `${childPrefix}└── Project: ${task.projectPath ?? '(none)'}`);
|
|
304
|
+
}
|
|
305
|
+
if (hidden > 0) {
|
|
306
|
+
lines.push(`│ └── ${chalk.dim(`... and ${hidden} more`)}`);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
const completedTasks = tasks.completedTasks ?? [];
|
|
310
|
+
if (completedTasks.length > 0) {
|
|
311
|
+
lines.push(`├── Recently Completed (${completedTasks.length})`);
|
|
312
|
+
const visible = completedTasks.slice(0, RENDER_LIMIT);
|
|
313
|
+
const hidden = completedTasks.length - visible.length;
|
|
314
|
+
for (const [i, task] of visible.entries()) {
|
|
315
|
+
const isLast = i === visible.length - 1 && hidden === 0;
|
|
316
|
+
const prefix = isLast ? '│ └── ' : '│ ├── ';
|
|
317
|
+
const childPrefix = isLast ? '│ ' : '│ │ ';
|
|
318
|
+
lines.push(`${prefix}${chalk.dim(task.taskId)}`, `${childPrefix}├── Type: ${task.type}`, `${childPrefix}├── Completed: ${this.formatTimeAgo(task.completedAt)}`, `${childPrefix}└── Project: ${task.projectPath ?? '(none)'}`);
|
|
319
|
+
}
|
|
320
|
+
if (hidden > 0) {
|
|
321
|
+
lines.push(`│ └── ${chalk.dim(`... and ${hidden} more`)}`);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
renderTree(state) {
|
|
326
|
+
const { agentIdleStatus, agentPool, clients, daemon, daemonIdleStatus, tasks, transport } = state;
|
|
327
|
+
const lines = [];
|
|
328
|
+
// Root
|
|
329
|
+
lines.push(chalk.bold(`Daemon (PID: ${daemon.pid}, port: ${daemon.port}, uptime: ${this.formatDuration(daemon.uptime)}, v${daemon.version})`));
|
|
330
|
+
// Daemon idle status
|
|
331
|
+
if (daemonIdleStatus) {
|
|
332
|
+
const idleDuration = this.formatDuration(daemonIdleStatus.idleMs);
|
|
333
|
+
const remainingDuration = this.formatDuration(daemonIdleStatus.remainingMs);
|
|
334
|
+
const statusText = daemonIdleStatus.remainingMs > 0
|
|
335
|
+
? chalk.yellow(`Idle for ${idleDuration} (will shutdown in ${remainingDuration})`)
|
|
336
|
+
: chalk.red('Shutting down...');
|
|
337
|
+
lines.push(`├── Status: ${statusText}`);
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
lines.push(`├── Status: ${chalk.green('Active')} (${clients.length} clients connected)`);
|
|
341
|
+
}
|
|
342
|
+
// Storage Paths
|
|
343
|
+
this.renderStoragePaths(lines, daemon.logPath);
|
|
344
|
+
// Transport Server
|
|
345
|
+
lines.push('├── Transport Server', `│ ├── Status: ${transport.running ? chalk.green('Running') : chalk.red('Stopped')}`, `│ ├── Port: ${transport.port}`, `│ └── Connected sockets: ${transport.connectedSockets}`);
|
|
346
|
+
this.renderAgentPool(lines, agentPool, agentIdleStatus);
|
|
347
|
+
// Task Queue
|
|
348
|
+
lines.push('├── Task Queue');
|
|
349
|
+
if (agentPool.queue.length === 0) {
|
|
350
|
+
lines.push('│ └── (empty)');
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
const visibleQueue = agentPool.queue.slice(0, RENDER_LIMIT);
|
|
354
|
+
const hiddenQueue = agentPool.queue.length - visibleQueue.length;
|
|
355
|
+
for (const [i, q] of visibleQueue.entries()) {
|
|
356
|
+
const isLast = i === visibleQueue.length - 1 && hiddenQueue === 0;
|
|
357
|
+
const prefix = isLast ? '│ └── ' : '│ ├── ';
|
|
358
|
+
lines.push(`${prefix}${q.projectPath}: ${q.queueLength} queued`);
|
|
359
|
+
}
|
|
360
|
+
if (hiddenQueue > 0) {
|
|
361
|
+
lines.push(`│ └── ${chalk.dim(`... and ${hiddenQueue} more`)}`);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
this.renderTasks(lines, tasks);
|
|
365
|
+
this.renderClients(lines, clients);
|
|
366
|
+
this.log(lines.join('\n'));
|
|
367
|
+
}
|
|
368
|
+
resolveStoragePaths() {
|
|
369
|
+
const configDir = getGlobalConfigDir();
|
|
370
|
+
const dataDir = getGlobalDataDir();
|
|
371
|
+
const logsDir = join(dataDir, 'logs');
|
|
372
|
+
const projectsDir = join(dataDir, 'projects');
|
|
373
|
+
const overrides = [];
|
|
374
|
+
if (process.env.BRV_DATA_DIR) {
|
|
375
|
+
overrides.push({ name: 'BRV_DATA_DIR', value: process.env.BRV_DATA_DIR });
|
|
376
|
+
}
|
|
377
|
+
if (platform() === 'linux') {
|
|
378
|
+
if (process.env.XDG_CONFIG_HOME) {
|
|
379
|
+
overrides.push({ name: 'XDG_CONFIG_HOME', value: process.env.XDG_CONFIG_HOME });
|
|
380
|
+
}
|
|
381
|
+
if (process.env.XDG_DATA_HOME) {
|
|
382
|
+
overrides.push({ name: 'XDG_DATA_HOME', value: process.env.XDG_DATA_HOME });
|
|
383
|
+
}
|
|
384
|
+
if (process.env.XDG_STATE_HOME) {
|
|
385
|
+
overrides.push({ name: 'XDG_STATE_HOME', value: process.env.XDG_STATE_HOME });
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
return {
|
|
389
|
+
config: configDir === dataDir ? undefined : configDir,
|
|
390
|
+
currentLog: getCurrentDaemonLog(logsDir),
|
|
391
|
+
data: dataDir,
|
|
392
|
+
existence: {
|
|
393
|
+
config: existsSync(configDir),
|
|
394
|
+
data: existsSync(dataDir),
|
|
395
|
+
logs: existsSync(logsDir),
|
|
396
|
+
projects: existsSync(projectsDir),
|
|
397
|
+
},
|
|
398
|
+
logs: logsDir,
|
|
399
|
+
overrides,
|
|
400
|
+
projects: projectsDir,
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
async runMonitor(client) {
|
|
404
|
+
const abortController = new AbortController();
|
|
405
|
+
const stop = () => {
|
|
406
|
+
abortController.abort();
|
|
407
|
+
};
|
|
408
|
+
process.once('SIGINT', stop);
|
|
409
|
+
process.once('SIGTERM', stop);
|
|
410
|
+
const poll = async () => {
|
|
411
|
+
const state = await client.requestWithAck('daemon:getState');
|
|
412
|
+
this.clearScreen();
|
|
413
|
+
this.renderTree(state);
|
|
414
|
+
this.log(chalk.dim(`\nRefreshing every ${MONITOR_REFRESH_MS / 1000}s — press Ctrl+C to exit`));
|
|
415
|
+
await this.delay(MONITOR_REFRESH_MS, abortController.signal);
|
|
416
|
+
return !abortController.signal.aborted;
|
|
417
|
+
};
|
|
418
|
+
try {
|
|
419
|
+
// eslint-disable-next-line no-await-in-loop
|
|
420
|
+
while (!abortController.signal.aborted && (await poll())) {
|
|
421
|
+
// poll() handles fetch + render + delay
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
catch (error) {
|
|
425
|
+
if (!abortController.signal.aborted) {
|
|
426
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
427
|
+
this.log(chalk.red(`\nConnection to daemon lost: ${detail}`));
|
|
428
|
+
this.log("Run 'brv restart' to force a clean restart.");
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
finally {
|
|
432
|
+
process.removeListener('SIGINT', stop);
|
|
433
|
+
process.removeListener('SIGTERM', stop);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
import { type HubInstallResponse } from '../../../shared/transport/events/hub-events.js';
|
|
3
|
+
import { type DaemonClientOptions } from '../../lib/daemon-client.js';
|
|
4
|
+
export default class HubInstall extends Command {
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static description: string;
|
|
9
|
+
static examples: string[];
|
|
10
|
+
static flags: {
|
|
11
|
+
agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
registry: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
scope: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
};
|
|
16
|
+
protected executeInstall(params: {
|
|
17
|
+
agent?: string;
|
|
18
|
+
entryId: string;
|
|
19
|
+
registry?: string;
|
|
20
|
+
scope?: 'global' | 'project';
|
|
21
|
+
}, options?: DaemonClientOptions): Promise<HubInstallResponse>;
|
|
22
|
+
run(): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
2
|
+
import { SKILL_CONNECTOR_CONFIGS } from '../../../server/infra/connectors/skill/skill-connector-config.js';
|
|
3
|
+
import { HubEvents, } from '../../../shared/transport/events/hub-events.js';
|
|
4
|
+
import { formatConnectionError, withDaemonRetry } from '../../lib/daemon-client.js';
|
|
5
|
+
import { writeJsonResponse } from '../../lib/json-response.js';
|
|
6
|
+
export default class HubInstall extends Command {
|
|
7
|
+
static args = {
|
|
8
|
+
id: Args.string({
|
|
9
|
+
description: 'Entry ID to install',
|
|
10
|
+
required: true,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
static description = 'Install a skill or bundle from the hub';
|
|
14
|
+
static examples = [
|
|
15
|
+
'<%= config.bin %> hub install byterover-review --agent "Claude Code"',
|
|
16
|
+
'<%= config.bin %> hub install typescript-kickstart',
|
|
17
|
+
'<%= config.bin %> hub install byterover-review --registry myco',
|
|
18
|
+
];
|
|
19
|
+
static flags = {
|
|
20
|
+
agent: Flags.string({
|
|
21
|
+
char: 'a',
|
|
22
|
+
description: 'Target agent for skill install',
|
|
23
|
+
options: Object.keys(SKILL_CONNECTOR_CONFIGS),
|
|
24
|
+
}),
|
|
25
|
+
format: Flags.string({
|
|
26
|
+
char: 'f',
|
|
27
|
+
default: 'text',
|
|
28
|
+
description: 'Output format',
|
|
29
|
+
options: ['text', 'json'],
|
|
30
|
+
}),
|
|
31
|
+
registry: Flags.string({
|
|
32
|
+
char: 'r',
|
|
33
|
+
description: 'Registry to install from (when ID exists in multiple registries)',
|
|
34
|
+
}),
|
|
35
|
+
scope: Flags.string({
|
|
36
|
+
char: 's',
|
|
37
|
+
default: 'project',
|
|
38
|
+
description: 'Install scope for skills (global: home directory, project: current project)',
|
|
39
|
+
options: ['global', 'project'],
|
|
40
|
+
}),
|
|
41
|
+
};
|
|
42
|
+
async executeInstall(params, options) {
|
|
43
|
+
return withDaemonRetry(async (client) => client.requestWithAck(HubEvents.INSTALL, params), options);
|
|
44
|
+
}
|
|
45
|
+
async run() {
|
|
46
|
+
const { args, flags } = await this.parse(HubInstall);
|
|
47
|
+
const format = flags.format;
|
|
48
|
+
try {
|
|
49
|
+
const result = await this.executeInstall({
|
|
50
|
+
agent: flags.agent,
|
|
51
|
+
entryId: args.id,
|
|
52
|
+
registry: flags.registry,
|
|
53
|
+
scope: flags.scope,
|
|
54
|
+
});
|
|
55
|
+
if (format === 'json') {
|
|
56
|
+
writeJsonResponse({ command: 'hub install', data: result, success: result.success });
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this.log(result.message);
|
|
60
|
+
if (result.installedPath) {
|
|
61
|
+
this.log(`Location: ${result.installedPath}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
if (format === 'json') {
|
|
67
|
+
writeJsonResponse({ command: 'hub install', data: { error: formatConnectionError(error) }, success: false });
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.log(formatConnectionError(error));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
import { type HubListResponse } from '../../../shared/transport/events/hub-events.js';
|
|
3
|
+
import { type DaemonClientOptions } from '../../lib/daemon-client.js';
|
|
4
|
+
export default class HubList extends Command {
|
|
5
|
+
static description: string;
|
|
6
|
+
static examples: string[];
|
|
7
|
+
static flags: {
|
|
8
|
+
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
protected fetchList(options?: DaemonClientOptions): Promise<HubListResponse>;
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
private formatEntry;
|
|
13
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Command, Flags } from '@oclif/core';
|
|
2
|
+
import { HubEvents } from '../../../shared/transport/events/hub-events.js';
|
|
3
|
+
import { formatConnectionError, withDaemonRetry } from '../../lib/daemon-client.js';
|
|
4
|
+
import { writeJsonResponse } from '../../lib/json-response.js';
|
|
5
|
+
export default class HubList extends Command {
|
|
6
|
+
static description = 'List available skills & bundles from the hub';
|
|
7
|
+
static examples = ['<%= config.bin %> hub list', '<%= config.bin %> hub list --format json'];
|
|
8
|
+
static flags = {
|
|
9
|
+
format: Flags.string({
|
|
10
|
+
char: 'f',
|
|
11
|
+
default: 'text',
|
|
12
|
+
description: 'Output format',
|
|
13
|
+
options: ['text', 'json'],
|
|
14
|
+
}),
|
|
15
|
+
};
|
|
16
|
+
async fetchList(options) {
|
|
17
|
+
return withDaemonRetry(async (client) => client.requestWithAck(HubEvents.LIST), options);
|
|
18
|
+
}
|
|
19
|
+
async run() {
|
|
20
|
+
const { flags } = await this.parse(HubList);
|
|
21
|
+
const format = flags.format;
|
|
22
|
+
try {
|
|
23
|
+
const data = await this.fetchList();
|
|
24
|
+
if (format === 'json') {
|
|
25
|
+
const outputData = {
|
|
26
|
+
entries: data.entries.map((entry) => ({
|
|
27
|
+
id: entry.id,
|
|
28
|
+
registry: entry.registry,
|
|
29
|
+
type: entry.type,
|
|
30
|
+
version: entry.version,
|
|
31
|
+
description: entry.description, // eslint-disable-line perfectionist/sort-objects
|
|
32
|
+
category: entry.category, // eslint-disable-line perfectionist/sort-objects
|
|
33
|
+
})),
|
|
34
|
+
version: data.version,
|
|
35
|
+
};
|
|
36
|
+
writeJsonResponse({ command: 'hub list', data: outputData, success: true });
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
this.log(`BRV Hub (v${data.version}) - ${data.entries.length} entries\n`);
|
|
40
|
+
this.log('| ID | Type | Version | Description | Category |');
|
|
41
|
+
this.log('| --- | --- | --- | --- | --- |');
|
|
42
|
+
// Only show registry name if entries come from more than one registry
|
|
43
|
+
const registryNames = new Set(data.entries.map((e) => e.registry));
|
|
44
|
+
const showRegistry = registryNames.size > 1;
|
|
45
|
+
for (const entry of data.entries) {
|
|
46
|
+
this.log(this.formatEntry(entry, showRegistry));
|
|
47
|
+
}
|
|
48
|
+
this.log(`\nInstall: brv hub install <id> [--registry <name>]`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
if (format === 'json') {
|
|
53
|
+
writeJsonResponse({ command: 'hub list', data: { error: formatConnectionError(error) }, success: false });
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.log(formatConnectionError(error));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
formatEntry(entry, showRegistry) {
|
|
61
|
+
const type = entry.type === 'agent-skill' ? 'skill' : 'bundle';
|
|
62
|
+
const registry = showRegistry && entry.registry ? ` (${entry.registry})` : '';
|
|
63
|
+
return `| ${entry.id}${registry} | ${type} | v${entry.version} | ${entry.description} | ${entry.category} |`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
import { type HubRegistryAddRequest, type HubRegistryAddResponse } from '../../../../shared/transport/events/hub-events.js';
|
|
3
|
+
import { type DaemonClientOptions } from '../../../lib/daemon-client.js';
|
|
4
|
+
export default class HubRegistryAdd extends Command {
|
|
5
|
+
static args: {
|
|
6
|
+
name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static description: string;
|
|
9
|
+
static examples: string[];
|
|
10
|
+
static flags: {
|
|
11
|
+
'auth-scheme': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'header-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
url: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
};
|
|
17
|
+
protected executeAdd(params: HubRegistryAddRequest, options?: DaemonClientOptions): Promise<HubRegistryAddResponse>;
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|