@useconvoy/cli 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +90 -0
- package/README.md +495 -0
- package/dist/bin/convoy.d.ts +2 -0
- package/dist/bin/convoy.js +129 -0
- package/dist/bin/convoy.js.map +1 -0
- package/dist/marketplace/.claude-plugin/marketplace.json +14 -0
- package/dist/marketplace/opensana/.claude-plugin/plugin.json +5 -0
- package/dist/marketplace/opensana/README.md +90 -0
- package/dist/marketplace/opensana/skills/tasks/SKILL.md +133 -0
- package/dist/marketplace/opensana/skills/tasks/references/mcp-setup.md +164 -0
- package/dist/src/agent/app/chunk-flush-buffer.d.ts +35 -0
- package/dist/src/agent/app/chunk-flush-buffer.js +133 -0
- package/dist/src/agent/app/chunk-flush-buffer.js.map +1 -0
- package/dist/src/agent/app/chunk-scrub.d.ts +9 -0
- package/dist/src/agent/app/chunk-scrub.js +120 -0
- package/dist/src/agent/app/chunk-scrub.js.map +1 -0
- package/dist/src/agent/app/interaction-router.d.ts +16 -0
- package/dist/src/agent/app/interaction-router.js +29 -0
- package/dist/src/agent/app/interaction-router.js.map +1 -0
- package/dist/src/agent/app/runner.d.ts +41 -0
- package/dist/src/agent/app/runner.js +353 -0
- package/dist/src/agent/app/runner.js.map +1 -0
- package/dist/src/agent/app/runtime-config.d.ts +3 -0
- package/dist/src/agent/app/runtime-config.js +4 -0
- package/dist/src/agent/app/runtime-config.js.map +1 -0
- package/dist/src/agent/app/thread-attachment-cache.d.ts +17 -0
- package/dist/src/agent/app/thread-attachment-cache.js +124 -0
- package/dist/src/agent/app/thread-attachment-cache.js.map +1 -0
- package/dist/src/agent/app/thread-processor.d.ts +40 -0
- package/dist/src/agent/app/thread-processor.js +792 -0
- package/dist/src/agent/app/thread-processor.js.map +1 -0
- package/dist/src/agent/app/worktree-op-processor.d.ts +27 -0
- package/dist/src/agent/app/worktree-op-processor.js +173 -0
- package/dist/src/agent/app/worktree-op-processor.js.map +1 -0
- package/dist/src/agent/runtimes/agent-instructions.d.ts +16 -0
- package/dist/src/agent/runtimes/agent-instructions.js +33 -0
- package/dist/src/agent/runtimes/agent-instructions.js.map +1 -0
- package/dist/src/agent/runtimes/claudeCode/continuation.d.ts +1 -0
- package/dist/src/agent/runtimes/claudeCode/continuation.js +30 -0
- package/dist/src/agent/runtimes/claudeCode/continuation.js.map +1 -0
- package/dist/src/agent/runtimes/claudeCode/detect.d.ts +12 -0
- package/dist/src/agent/runtimes/claudeCode/detect.js +109 -0
- package/dist/src/agent/runtimes/claudeCode/detect.js.map +1 -0
- package/dist/src/agent/runtimes/claudeCode/interactions.d.ts +13 -0
- package/dist/src/agent/runtimes/claudeCode/interactions.js +167 -0
- package/dist/src/agent/runtimes/claudeCode/interactions.js.map +1 -0
- package/dist/src/agent/runtimes/claudeCode/models.d.ts +3 -0
- package/dist/src/agent/runtimes/claudeCode/models.js +16 -0
- package/dist/src/agent/runtimes/claudeCode/models.js.map +1 -0
- package/dist/src/agent/runtimes/claudeCode/prompts.d.ts +1 -0
- package/dist/src/agent/runtimes/claudeCode/prompts.js +5 -0
- package/dist/src/agent/runtimes/claudeCode/prompts.js.map +1 -0
- package/dist/src/agent/runtimes/claudeCode/runner.d.ts +32 -0
- package/dist/src/agent/runtimes/claudeCode/runner.js +941 -0
- package/dist/src/agent/runtimes/claudeCode/runner.js.map +1 -0
- package/dist/src/agent/runtimes/claudeCode/runtime.d.ts +2 -0
- package/dist/src/agent/runtimes/claudeCode/runtime.js +126 -0
- package/dist/src/agent/runtimes/claudeCode/runtime.js.map +1 -0
- package/dist/src/agent/runtimes/claudeCode/streaming.d.ts +8 -0
- package/dist/src/agent/runtimes/claudeCode/streaming.js +88 -0
- package/dist/src/agent/runtimes/claudeCode/streaming.js.map +1 -0
- package/dist/src/agent/runtimes/codex/app-server-rpc.d.ts +26 -0
- package/dist/src/agent/runtimes/codex/app-server-rpc.js +109 -0
- package/dist/src/agent/runtimes/codex/app-server-rpc.js.map +1 -0
- package/dist/src/agent/runtimes/codex/app-server-runner.d.ts +59 -0
- package/dist/src/agent/runtimes/codex/app-server-runner.js +688 -0
- package/dist/src/agent/runtimes/codex/app-server-runner.js.map +1 -0
- package/dist/src/agent/runtimes/codex/commands.d.ts +23 -0
- package/dist/src/agent/runtimes/codex/commands.js +25 -0
- package/dist/src/agent/runtimes/codex/commands.js.map +1 -0
- package/dist/src/agent/runtimes/codex/detect.d.ts +5 -0
- package/dist/src/agent/runtimes/codex/detect.js +17 -0
- package/dist/src/agent/runtimes/codex/detect.js.map +1 -0
- package/dist/src/agent/runtimes/codex/models.d.ts +2 -0
- package/dist/src/agent/runtimes/codex/models.js +4 -0
- package/dist/src/agent/runtimes/codex/models.js.map +1 -0
- package/dist/src/agent/runtimes/codex/runner.d.ts +46 -0
- package/dist/src/agent/runtimes/codex/runner.js +298 -0
- package/dist/src/agent/runtimes/codex/runner.js.map +1 -0
- package/dist/src/agent/runtimes/codex/runtime.d.ts +10 -0
- package/dist/src/agent/runtimes/codex/runtime.js +73 -0
- package/dist/src/agent/runtimes/codex/runtime.js.map +1 -0
- package/dist/src/agent/runtimes/contracts.d.ts +215 -0
- package/dist/src/agent/runtimes/contracts.js +33 -0
- package/dist/src/agent/runtimes/contracts.js.map +1 -0
- package/dist/src/agent/runtimes/cursor/commands.d.ts +7 -0
- package/dist/src/agent/runtimes/cursor/commands.js +39 -0
- package/dist/src/agent/runtimes/cursor/commands.js.map +1 -0
- package/dist/src/agent/runtimes/cursor/detect.d.ts +17 -0
- package/dist/src/agent/runtimes/cursor/detect.js +54 -0
- package/dist/src/agent/runtimes/cursor/detect.js.map +1 -0
- package/dist/src/agent/runtimes/cursor/models.d.ts +9 -0
- package/dist/src/agent/runtimes/cursor/models.js +97 -0
- package/dist/src/agent/runtimes/cursor/models.js.map +1 -0
- package/dist/src/agent/runtimes/cursor/runner.d.ts +36 -0
- package/dist/src/agent/runtimes/cursor/runner.js +293 -0
- package/dist/src/agent/runtimes/cursor/runner.js.map +1 -0
- package/dist/src/agent/runtimes/cursor/runtime.d.ts +2 -0
- package/dist/src/agent/runtimes/cursor/runtime.js +48 -0
- package/dist/src/agent/runtimes/cursor/runtime.js.map +1 -0
- package/dist/src/agent/runtimes/cursor/streaming.d.ts +8 -0
- package/dist/src/agent/runtimes/cursor/streaming.js +78 -0
- package/dist/src/agent/runtimes/cursor/streaming.js.map +1 -0
- package/dist/src/agent/runtimes/debug.d.ts +8 -0
- package/dist/src/agent/runtimes/debug.js +19 -0
- package/dist/src/agent/runtimes/debug.js.map +1 -0
- package/dist/src/agent/runtimes/message-format.d.ts +6 -0
- package/dist/src/agent/runtimes/message-format.js +31 -0
- package/dist/src/agent/runtimes/message-format.js.map +1 -0
- package/dist/src/agent/runtimes/opencode/client.d.ts +82 -0
- package/dist/src/agent/runtimes/opencode/client.js +109 -0
- package/dist/src/agent/runtimes/opencode/client.js.map +1 -0
- package/dist/src/agent/runtimes/opencode/detect.d.ts +18 -0
- package/dist/src/agent/runtimes/opencode/detect.js +100 -0
- package/dist/src/agent/runtimes/opencode/detect.js.map +1 -0
- package/dist/src/agent/runtimes/opencode/json.d.ts +4 -0
- package/dist/src/agent/runtimes/opencode/json.js +17 -0
- package/dist/src/agent/runtimes/opencode/json.js.map +1 -0
- package/dist/src/agent/runtimes/opencode/runner.d.ts +50 -0
- package/dist/src/agent/runtimes/opencode/runner.js +598 -0
- package/dist/src/agent/runtimes/opencode/runner.js.map +1 -0
- package/dist/src/agent/runtimes/opencode/runtime.d.ts +9 -0
- package/dist/src/agent/runtimes/opencode/runtime.js +82 -0
- package/dist/src/agent/runtimes/opencode/runtime.js.map +1 -0
- package/dist/src/agent/runtimes/opencode/server.d.ts +36 -0
- package/dist/src/agent/runtimes/opencode/server.js +210 -0
- package/dist/src/agent/runtimes/opencode/server.js.map +1 -0
- package/dist/src/agent/runtimes/opencode/streaming.d.ts +7 -0
- package/dist/src/agent/runtimes/opencode/streaming.js +47 -0
- package/dist/src/agent/runtimes/opencode/streaming.js.map +1 -0
- package/dist/src/agent/runtimes/registry.d.ts +10 -0
- package/dist/src/agent/runtimes/registry.js +48 -0
- package/dist/src/agent/runtimes/registry.js.map +1 -0
- package/dist/src/agent/sdk/adapters/adapter-interface.d.ts +2 -0
- package/dist/src/agent/sdk/adapters/adapter-interface.js +4 -0
- package/dist/src/agent/sdk/adapters/adapter-interface.js.map +1 -0
- package/dist/src/agent/sdk/adapters/claude/claude-adapter.d.ts +9 -0
- package/dist/src/agent/sdk/adapters/claude/claude-adapter.js +95 -0
- package/dist/src/agent/sdk/adapters/claude/claude-adapter.js.map +1 -0
- package/dist/src/agent/sdk/adapters/codex/codex-adapter.d.ts +10 -0
- package/dist/src/agent/sdk/adapters/codex/codex-adapter.js +87 -0
- package/dist/src/agent/sdk/adapters/codex/codex-adapter.js.map +1 -0
- package/dist/src/agent/sdk/adapters/executable-resolution.d.ts +2 -0
- package/dist/src/agent/sdk/adapters/executable-resolution.js +50 -0
- package/dist/src/agent/sdk/adapters/executable-resolution.js.map +1 -0
- package/dist/src/agent/sdk/adapters/generic/generic-subprocess-adapter.d.ts +11 -0
- package/dist/src/agent/sdk/adapters/generic/generic-subprocess-adapter.js +61 -0
- package/dist/src/agent/sdk/adapters/generic/generic-subprocess-adapter.js.map +1 -0
- package/dist/src/agent/sdk/adapters/provider-registry.d.ts +8 -0
- package/dist/src/agent/sdk/adapters/provider-registry.js +32 -0
- package/dist/src/agent/sdk/adapters/provider-registry.js.map +1 -0
- package/dist/src/agent/sdk/constants.d.ts +5 -0
- package/dist/src/agent/sdk/constants.js +29 -0
- package/dist/src/agent/sdk/constants.js.map +1 -0
- package/dist/src/agent/sdk/index.d.ts +2 -0
- package/dist/src/agent/sdk/index.js +2 -0
- package/dist/src/agent/sdk/index.js.map +1 -0
- package/dist/src/agent/sdk/run-handle.d.ts +22 -0
- package/dist/src/agent/sdk/run-handle.js +90 -0
- package/dist/src/agent/sdk/run-handle.js.map +1 -0
- package/dist/src/agent/sdk/runtime/isolation-env.d.ts +9 -0
- package/dist/src/agent/sdk/runtime/isolation-env.js +39 -0
- package/dist/src/agent/sdk/runtime/isolation-env.js.map +1 -0
- package/dist/src/agent/sdk/runtime/line-parser.d.ts +11 -0
- package/dist/src/agent/sdk/runtime/line-parser.js +59 -0
- package/dist/src/agent/sdk/runtime/line-parser.js.map +1 -0
- package/dist/src/agent/sdk/runtime/output-pump.d.ts +20 -0
- package/dist/src/agent/sdk/runtime/output-pump.js +88 -0
- package/dist/src/agent/sdk/runtime/output-pump.js.map +1 -0
- package/dist/src/agent/sdk/runtime/process-group.d.ts +9 -0
- package/dist/src/agent/sdk/runtime/process-group.js +69 -0
- package/dist/src/agent/sdk/runtime/process-group.js.map +1 -0
- package/dist/src/agent/sdk/runtime/provider-supervisor-entrypoint.d.ts +1 -0
- package/dist/src/agent/sdk/runtime/provider-supervisor-entrypoint.js +3 -0
- package/dist/src/agent/sdk/runtime/provider-supervisor-entrypoint.js.map +1 -0
- package/dist/src/agent/sdk/runtime/provider-supervisor.d.ts +1 -0
- package/dist/src/agent/sdk/runtime/provider-supervisor.js +190 -0
- package/dist/src/agent/sdk/runtime/provider-supervisor.js.map +1 -0
- package/dist/src/agent/sdk/runtime/spawn-process.d.ts +7 -0
- package/dist/src/agent/sdk/runtime/spawn-process.js +16 -0
- package/dist/src/agent/sdk/runtime/spawn-process.js.map +1 -0
- package/dist/src/agent/sdk/runtime/spawn-supervised-process.d.ts +17 -0
- package/dist/src/agent/sdk/runtime/spawn-supervised-process.js +203 -0
- package/dist/src/agent/sdk/runtime/spawn-supervised-process.js.map +1 -0
- package/dist/src/agent/sdk/runtime/supervisor-protocol.d.ts +29 -0
- package/dist/src/agent/sdk/runtime/supervisor-protocol.js +90 -0
- package/dist/src/agent/sdk/runtime/supervisor-protocol.js.map +1 -0
- package/dist/src/agent/sdk/runtime/timeouts.d.ts +24 -0
- package/dist/src/agent/sdk/runtime/timeouts.js +65 -0
- package/dist/src/agent/sdk/runtime/timeouts.js.map +1 -0
- package/dist/src/agent/sdk/session-manager.d.ts +38 -0
- package/dist/src/agent/sdk/session-manager.js +557 -0
- package/dist/src/agent/sdk/session-manager.js.map +1 -0
- package/dist/src/agent/sdk/transport/json-stream-decoder.d.ts +6 -0
- package/dist/src/agent/sdk/transport/json-stream-decoder.js +29 -0
- package/dist/src/agent/sdk/transport/json-stream-decoder.js.map +1 -0
- package/dist/src/agent/sdk/transport/line-text-decoder.d.ts +6 -0
- package/dist/src/agent/sdk/transport/line-text-decoder.js +9 -0
- package/dist/src/agent/sdk/transport/line-text-decoder.js.map +1 -0
- package/dist/src/agent/sdk/transport/pty-contract.d.ts +12 -0
- package/dist/src/agent/sdk/transport/pty-contract.js +2 -0
- package/dist/src/agent/sdk/transport/pty-contract.js.map +1 -0
- package/dist/src/agent/sdk/types.d.ts +194 -0
- package/dist/src/agent/sdk/types.js +2 -0
- package/dist/src/agent/sdk/types.js.map +1 -0
- package/dist/src/agent/sdk/versioning/provider-version.d.ts +9 -0
- package/dist/src/agent/sdk/versioning/provider-version.js +41 -0
- package/dist/src/agent/sdk/versioning/provider-version.js.map +1 -0
- package/dist/src/cli.d.ts +7 -0
- package/dist/src/cli.js +56 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/commands/config/command.d.ts +2 -0
- package/dist/src/commands/config/command.js +150 -0
- package/dist/src/commands/config/command.js.map +1 -0
- package/dist/src/commands/connect/command.d.ts +4 -0
- package/dist/src/commands/connect/command.js +19 -0
- package/dist/src/commands/connect/command.js.map +1 -0
- package/dist/src/commands/connect/workflow.d.ts +92 -0
- package/dist/src/commands/connect/workflow.js +381 -0
- package/dist/src/commands/connect/workflow.js.map +1 -0
- package/dist/src/commands/devcontainer/command.d.ts +2 -0
- package/dist/src/commands/devcontainer/command.js +49 -0
- package/dist/src/commands/devcontainer/command.js.map +1 -0
- package/dist/src/commands/devcontainer/install.d.ts +46 -0
- package/dist/src/commands/devcontainer/install.js +107 -0
- package/dist/src/commands/devcontainer/install.js.map +1 -0
- package/dist/src/commands/init/config/claude-mcp.d.ts +27 -0
- package/dist/src/commands/init/config/claude-mcp.js +56 -0
- package/dist/src/commands/init/config/claude-mcp.js.map +1 -0
- package/dist/src/commands/init/config/codex-mcp.d.ts +12 -0
- package/dist/src/commands/init/config/codex-mcp.js +83 -0
- package/dist/src/commands/init/config/codex-mcp.js.map +1 -0
- package/dist/src/commands/init/config/opencode-mcp.d.ts +16 -0
- package/dist/src/commands/init/config/opencode-mcp.js +55 -0
- package/dist/src/commands/init/config/opencode-mcp.js.map +1 -0
- package/dist/src/commands/init/errors.d.ts +3 -0
- package/dist/src/commands/init/errors.js +7 -0
- package/dist/src/commands/init/errors.js.map +1 -0
- package/dist/src/commands/init/index.d.ts +9 -0
- package/dist/src/commands/init/index.js +10 -0
- package/dist/src/commands/init/index.js.map +1 -0
- package/dist/src/commands/init/io/file-copy.d.ts +18 -0
- package/dist/src/commands/init/io/file-copy.js +129 -0
- package/dist/src/commands/init/io/file-copy.js.map +1 -0
- package/dist/src/commands/init/marketplace.d.ts +8 -0
- package/dist/src/commands/init/marketplace.js +25 -0
- package/dist/src/commands/init/marketplace.js.map +1 -0
- package/dist/src/commands/init/mcp-service.d.ts +2 -0
- package/dist/src/commands/init/mcp-service.js +66 -0
- package/dist/src/commands/init/mcp-service.js.map +1 -0
- package/dist/src/commands/init/parsers.d.ts +4 -0
- package/dist/src/commands/init/parsers.js +40 -0
- package/dist/src/commands/init/parsers.js.map +1 -0
- package/dist/src/commands/init/prompts.d.ts +4 -0
- package/dist/src/commands/init/prompts.js +72 -0
- package/dist/src/commands/init/prompts.js.map +1 -0
- package/dist/src/commands/init/skill-service.d.ts +2 -0
- package/dist/src/commands/init/skill-service.js +36 -0
- package/dist/src/commands/init/skill-service.js.map +1 -0
- package/dist/src/commands/init/summary.d.ts +2 -0
- package/dist/src/commands/init/summary.js +22 -0
- package/dist/src/commands/init/summary.js.map +1 -0
- package/dist/src/commands/init/targets/claude.d.ts +4 -0
- package/dist/src/commands/init/targets/claude.js +178 -0
- package/dist/src/commands/init/targets/claude.js.map +1 -0
- package/dist/src/commands/init/targets/codex.d.ts +4 -0
- package/dist/src/commands/init/targets/codex.js +75 -0
- package/dist/src/commands/init/targets/codex.js.map +1 -0
- package/dist/src/commands/init/targets/driver.d.ts +28 -0
- package/dist/src/commands/init/targets/driver.js +2 -0
- package/dist/src/commands/init/targets/driver.js.map +1 -0
- package/dist/src/commands/init/targets/opencode.d.ts +4 -0
- package/dist/src/commands/init/targets/opencode.js +77 -0
- package/dist/src/commands/init/targets/opencode.js.map +1 -0
- package/dist/src/commands/init/targets/registry.d.ts +4 -0
- package/dist/src/commands/init/targets/registry.js +15 -0
- package/dist/src/commands/init/targets/registry.js.map +1 -0
- package/dist/src/commands/init/types.d.ts +30 -0
- package/dist/src/commands/init/types.js +7 -0
- package/dist/src/commands/init/types.js.map +1 -0
- package/dist/src/commands/init.d.ts +3 -0
- package/dist/src/commands/init.js +143 -0
- package/dist/src/commands/init.js.map +1 -0
- package/dist/src/commands/keys/command.d.ts +2 -0
- package/dist/src/commands/keys/command.js +154 -0
- package/dist/src/commands/keys/command.js.map +1 -0
- package/dist/src/commands/labels/create.d.ts +2 -0
- package/dist/src/commands/labels/create.js +31 -0
- package/dist/src/commands/labels/create.js.map +1 -0
- package/dist/src/commands/labels/delete.d.ts +2 -0
- package/dist/src/commands/labels/delete.js +51 -0
- package/dist/src/commands/labels/delete.js.map +1 -0
- package/dist/src/commands/labels/formatters.d.ts +4 -0
- package/dist/src/commands/labels/formatters.js +6 -0
- package/dist/src/commands/labels/formatters.js.map +1 -0
- package/dist/src/commands/labels/index.d.ts +2 -0
- package/dist/src/commands/labels/index.js +13 -0
- package/dist/src/commands/labels/index.js.map +1 -0
- package/dist/src/commands/labels/list.d.ts +2 -0
- package/dist/src/commands/labels/list.js +29 -0
- package/dist/src/commands/labels/list.js.map +1 -0
- package/dist/src/commands/labels/resolve.d.ts +9 -0
- package/dist/src/commands/labels/resolve.js +23 -0
- package/dist/src/commands/labels/resolve.js.map +1 -0
- package/dist/src/commands/labels/update.d.ts +2 -0
- package/dist/src/commands/labels/update.js +37 -0
- package/dist/src/commands/labels/update.js.map +1 -0
- package/dist/src/commands/lists/constants.d.ts +7 -0
- package/dist/src/commands/lists/constants.js +14 -0
- package/dist/src/commands/lists/constants.js.map +1 -0
- package/dist/src/commands/lists/create.d.ts +2 -0
- package/dist/src/commands/lists/create.js +45 -0
- package/dist/src/commands/lists/create.js.map +1 -0
- package/dist/src/commands/lists/index.d.ts +2 -0
- package/dist/src/commands/lists/index.js +10 -0
- package/dist/src/commands/lists/index.js.map +1 -0
- package/dist/src/commands/lists/list.d.ts +2 -0
- package/dist/src/commands/lists/list.js +66 -0
- package/dist/src/commands/lists/list.js.map +1 -0
- package/dist/src/commands/lists/resolve.d.ts +11 -0
- package/dist/src/commands/lists/resolve.js +24 -0
- package/dist/src/commands/lists/resolve.js.map +1 -0
- package/dist/src/commands/lists/update.d.ts +2 -0
- package/dist/src/commands/lists/update.js +61 -0
- package/dist/src/commands/lists/update.js.map +1 -0
- package/dist/src/commands/login/command.d.ts +8 -0
- package/dist/src/commands/login/command.js +20 -0
- package/dist/src/commands/login/command.js.map +1 -0
- package/dist/src/commands/orgs/index.d.ts +2 -0
- package/dist/src/commands/orgs/index.js +6 -0
- package/dist/src/commands/orgs/index.js.map +1 -0
- package/dist/src/commands/orgs/list.d.ts +2 -0
- package/dist/src/commands/orgs/list.js +29 -0
- package/dist/src/commands/orgs/list.js.map +1 -0
- package/dist/src/commands/paths/command.d.ts +2 -0
- package/dist/src/commands/paths/command.js +90 -0
- package/dist/src/commands/paths/command.js.map +1 -0
- package/dist/src/commands/profiles/index.d.ts +2 -0
- package/dist/src/commands/profiles/index.js +6 -0
- package/dist/src/commands/profiles/index.js.map +1 -0
- package/dist/src/commands/profiles/list.d.ts +2 -0
- package/dist/src/commands/profiles/list.js +50 -0
- package/dist/src/commands/profiles/list.js.map +1 -0
- package/dist/src/commands/project-agents/create.d.ts +2 -0
- package/dist/src/commands/project-agents/create.js +53 -0
- package/dist/src/commands/project-agents/create.js.map +1 -0
- package/dist/src/commands/project-agents/index.d.ts +2 -0
- package/dist/src/commands/project-agents/index.js +10 -0
- package/dist/src/commands/project-agents/index.js.map +1 -0
- package/dist/src/commands/project-agents/list.d.ts +2 -0
- package/dist/src/commands/project-agents/list.js +30 -0
- package/dist/src/commands/project-agents/list.js.map +1 -0
- package/dist/src/commands/project-agents/parsers.d.ts +16 -0
- package/dist/src/commands/project-agents/parsers.js +80 -0
- package/dist/src/commands/project-agents/parsers.js.map +1 -0
- package/dist/src/commands/project-agents/update.d.ts +2 -0
- package/dist/src/commands/project-agents/update.js +74 -0
- package/dist/src/commands/project-agents/update.js.map +1 -0
- package/dist/src/commands/projects/index.d.ts +2 -0
- package/dist/src/commands/projects/index.js +6 -0
- package/dist/src/commands/projects/index.js.map +1 -0
- package/dist/src/commands/projects/list.d.ts +2 -0
- package/dist/src/commands/projects/list.js +41 -0
- package/dist/src/commands/projects/list.js.map +1 -0
- package/dist/src/commands/prompts/create.d.ts +2 -0
- package/dist/src/commands/prompts/create.js +48 -0
- package/dist/src/commands/prompts/create.js.map +1 -0
- package/dist/src/commands/prompts/formatters.d.ts +4 -0
- package/dist/src/commands/prompts/formatters.js +7 -0
- package/dist/src/commands/prompts/formatters.js.map +1 -0
- package/dist/src/commands/prompts/index.d.ts +2 -0
- package/dist/src/commands/prompts/index.js +11 -0
- package/dist/src/commands/prompts/index.js.map +1 -0
- package/dist/src/commands/prompts/list.d.ts +2 -0
- package/dist/src/commands/prompts/list.js +34 -0
- package/dist/src/commands/prompts/list.js.map +1 -0
- package/dist/src/commands/prompts/parsers.d.ts +9 -0
- package/dist/src/commands/prompts/parsers.js +12 -0
- package/dist/src/commands/prompts/parsers.js.map +1 -0
- package/dist/src/commands/prompts/resolve.d.ts +17 -0
- package/dist/src/commands/prompts/resolve.js +43 -0
- package/dist/src/commands/prompts/resolve.js.map +1 -0
- package/dist/src/commands/prompts/update.d.ts +2 -0
- package/dist/src/commands/prompts/update.js +58 -0
- package/dist/src/commands/prompts/update.js.map +1 -0
- package/dist/src/commands/setup/command.d.ts +2 -0
- package/dist/src/commands/setup/command.js +15 -0
- package/dist/src/commands/setup/command.js.map +1 -0
- package/dist/src/commands/setup/prompts.d.ts +66 -0
- package/dist/src/commands/setup/prompts.js +199 -0
- package/dist/src/commands/setup/prompts.js.map +1 -0
- package/dist/src/commands/setup/workflow.d.ts +17 -0
- package/dist/src/commands/setup/workflow.js +141 -0
- package/dist/src/commands/setup/workflow.js.map +1 -0
- package/dist/src/commands/status/command.d.ts +2 -0
- package/dist/src/commands/status/command.js +83 -0
- package/dist/src/commands/status/command.js.map +1 -0
- package/dist/src/commands/task-types/index.d.ts +2 -0
- package/dist/src/commands/task-types/index.js +6 -0
- package/dist/src/commands/task-types/index.js.map +1 -0
- package/dist/src/commands/task-types/list.d.ts +2 -0
- package/dist/src/commands/task-types/list.js +32 -0
- package/dist/src/commands/task-types/list.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/comments/add.d.ts +2 -0
- package/dist/src/commands/tasks/artifacts/comments/add.js +32 -0
- package/dist/src/commands/tasks/artifacts/comments/add.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/comments/formatters.d.ts +7 -0
- package/dist/src/commands/tasks/artifacts/comments/formatters.js +32 -0
- package/dist/src/commands/tasks/artifacts/comments/formatters.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/comments/index.d.ts +2 -0
- package/dist/src/commands/tasks/artifacts/comments/index.js +13 -0
- package/dist/src/commands/tasks/artifacts/comments/index.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/comments/list.d.ts +2 -0
- package/dist/src/commands/tasks/artifacts/comments/list.js +24 -0
- package/dist/src/commands/tasks/artifacts/comments/list.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/comments/parsers.d.ts +6 -0
- package/dist/src/commands/tasks/artifacts/comments/parsers.js +8 -0
- package/dist/src/commands/tasks/artifacts/comments/parsers.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/comments/reply.d.ts +2 -0
- package/dist/src/commands/tasks/artifacts/comments/reply.js +23 -0
- package/dist/src/commands/tasks/artifacts/comments/reply.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/comments/resolve.d.ts +3 -0
- package/dist/src/commands/tasks/artifacts/comments/resolve.js +26 -0
- package/dist/src/commands/tasks/artifacts/comments/resolve.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/create.d.ts +2 -0
- package/dist/src/commands/tasks/artifacts/create.js +63 -0
- package/dist/src/commands/tasks/artifacts/create.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/delete.d.ts +2 -0
- package/dist/src/commands/tasks/artifacts/delete.js +27 -0
- package/dist/src/commands/tasks/artifacts/delete.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/get.d.ts +2 -0
- package/dist/src/commands/tasks/artifacts/get.js +54 -0
- package/dist/src/commands/tasks/artifacts/get.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/index.d.ts +2 -0
- package/dist/src/commands/tasks/artifacts/index.js +18 -0
- package/dist/src/commands/tasks/artifacts/index.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/list.d.ts +2 -0
- package/dist/src/commands/tasks/artifacts/list.js +31 -0
- package/dist/src/commands/tasks/artifacts/list.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/parsers.d.ts +13 -0
- package/dist/src/commands/tasks/artifacts/parsers.js +24 -0
- package/dist/src/commands/tasks/artifacts/parsers.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/replace.d.ts +2 -0
- package/dist/src/commands/tasks/artifacts/replace.js +62 -0
- package/dist/src/commands/tasks/artifacts/replace.js.map +1 -0
- package/dist/src/commands/tasks/artifacts/update.d.ts +2 -0
- package/dist/src/commands/tasks/artifacts/update.js +55 -0
- package/dist/src/commands/tasks/artifacts/update.js.map +1 -0
- package/dist/src/commands/tasks/attach.d.ts +2 -0
- package/dist/src/commands/tasks/attach.js +70 -0
- package/dist/src/commands/tasks/attach.js.map +1 -0
- package/dist/src/commands/tasks/attachments/delete.d.ts +2 -0
- package/dist/src/commands/tasks/attachments/delete.js +61 -0
- package/dist/src/commands/tasks/attachments/delete.js.map +1 -0
- package/dist/src/commands/tasks/attachments/download.d.ts +2 -0
- package/dist/src/commands/tasks/attachments/download.js +42 -0
- package/dist/src/commands/tasks/attachments/download.js.map +1 -0
- package/dist/src/commands/tasks/attachments/formatters.d.ts +5 -0
- package/dist/src/commands/tasks/attachments/formatters.js +18 -0
- package/dist/src/commands/tasks/attachments/formatters.js.map +1 -0
- package/dist/src/commands/tasks/attachments/index.d.ts +2 -0
- package/dist/src/commands/tasks/attachments/index.js +11 -0
- package/dist/src/commands/tasks/attachments/index.js.map +1 -0
- package/dist/src/commands/tasks/attachments/list.d.ts +2 -0
- package/dist/src/commands/tasks/attachments/list.js +36 -0
- package/dist/src/commands/tasks/attachments/list.js.map +1 -0
- package/dist/src/commands/tasks/attachments/resolve.d.ts +6 -0
- package/dist/src/commands/tasks/attachments/resolve.js +15 -0
- package/dist/src/commands/tasks/attachments/resolve.js.map +1 -0
- package/dist/src/commands/tasks/attachments/transfer.d.ts +11 -0
- package/dist/src/commands/tasks/attachments/transfer.js +71 -0
- package/dist/src/commands/tasks/attachments/transfer.js.map +1 -0
- package/dist/src/commands/tasks/comments/add.d.ts +2 -0
- package/dist/src/commands/tasks/comments/add.js +44 -0
- package/dist/src/commands/tasks/comments/add.js.map +1 -0
- package/dist/src/commands/tasks/comments/index.d.ts +2 -0
- package/dist/src/commands/tasks/comments/index.js +6 -0
- package/dist/src/commands/tasks/comments/index.js.map +1 -0
- package/dist/src/commands/tasks/create.d.ts +2 -0
- package/dist/src/commands/tasks/create.js +77 -0
- package/dist/src/commands/tasks/create.js.map +1 -0
- package/dist/src/commands/tasks/delete.d.ts +2 -0
- package/dist/src/commands/tasks/delete.js +31 -0
- package/dist/src/commands/tasks/delete.js.map +1 -0
- package/dist/src/commands/tasks/formatters.d.ts +25 -0
- package/dist/src/commands/tasks/formatters.js +40 -0
- package/dist/src/commands/tasks/formatters.js.map +1 -0
- package/dist/src/commands/tasks/get.d.ts +2 -0
- package/dist/src/commands/tasks/get.js +94 -0
- package/dist/src/commands/tasks/get.js.map +1 -0
- package/dist/src/commands/tasks/hydrate.d.ts +20 -0
- package/dist/src/commands/tasks/hydrate.js +47 -0
- package/dist/src/commands/tasks/hydrate.js.map +1 -0
- package/dist/src/commands/tasks/index.d.ts +2 -0
- package/dist/src/commands/tasks/index.js +33 -0
- package/dist/src/commands/tasks/index.js.map +1 -0
- package/dist/src/commands/tasks/links.d.ts +4 -0
- package/dist/src/commands/tasks/links.js +121 -0
- package/dist/src/commands/tasks/links.js.map +1 -0
- package/dist/src/commands/tasks/list.d.ts +2 -0
- package/dist/src/commands/tasks/list.js +47 -0
- package/dist/src/commands/tasks/list.js.map +1 -0
- package/dist/src/commands/tasks/move-to-list.d.ts +2 -0
- package/dist/src/commands/tasks/move-to-list.js +41 -0
- package/dist/src/commands/tasks/move-to-list.js.map +1 -0
- package/dist/src/commands/tasks/move.d.ts +2 -0
- package/dist/src/commands/tasks/move.js +61 -0
- package/dist/src/commands/tasks/move.js.map +1 -0
- package/dist/src/commands/tasks/parsers.d.ts +22 -0
- package/dist/src/commands/tasks/parsers.js +118 -0
- package/dist/src/commands/tasks/parsers.js.map +1 -0
- package/dist/src/commands/tasks/refs.d.ts +2 -0
- package/dist/src/commands/tasks/refs.js +89 -0
- package/dist/src/commands/tasks/refs.js.map +1 -0
- package/dist/src/commands/tasks/resolve.d.ts +20 -0
- package/dist/src/commands/tasks/resolve.js +57 -0
- package/dist/src/commands/tasks/resolve.js.map +1 -0
- package/dist/src/commands/tasks/search.d.ts +2 -0
- package/dist/src/commands/tasks/search.js +110 -0
- package/dist/src/commands/tasks/search.js.map +1 -0
- package/dist/src/commands/tasks/update.d.ts +2 -0
- package/dist/src/commands/tasks/update.js +101 -0
- package/dist/src/commands/tasks/update.js.map +1 -0
- package/dist/src/commands/test-helpers.d.ts +2 -0
- package/dist/src/commands/test-helpers.js +6 -0
- package/dist/src/commands/test-helpers.js.map +1 -0
- package/dist/src/commands/threads/create.d.ts +2 -0
- package/dist/src/commands/threads/create.js +99 -0
- package/dist/src/commands/threads/create.js.map +1 -0
- package/dist/src/commands/threads/formatters.d.ts +10 -0
- package/dist/src/commands/threads/formatters.js +17 -0
- package/dist/src/commands/threads/formatters.js.map +1 -0
- package/dist/src/commands/threads/get.d.ts +2 -0
- package/dist/src/commands/threads/get.js +53 -0
- package/dist/src/commands/threads/get.js.map +1 -0
- package/dist/src/commands/threads/index.d.ts +2 -0
- package/dist/src/commands/threads/index.js +14 -0
- package/dist/src/commands/threads/index.js.map +1 -0
- package/dist/src/commands/threads/list.d.ts +2 -0
- package/dist/src/commands/threads/list.js +69 -0
- package/dist/src/commands/threads/list.js.map +1 -0
- package/dist/src/commands/threads/messages.d.ts +2 -0
- package/dist/src/commands/threads/messages.js +59 -0
- package/dist/src/commands/threads/messages.js.map +1 -0
- package/dist/src/commands/threads/parsers.d.ts +5 -0
- package/dist/src/commands/threads/parsers.js +19 -0
- package/dist/src/commands/threads/parsers.js.map +1 -0
- package/dist/src/commands/threads/send.d.ts +2 -0
- package/dist/src/commands/threads/send.js +49 -0
- package/dist/src/commands/threads/send.js.map +1 -0
- package/dist/src/commands/threads/spawn-target.d.ts +29 -0
- package/dist/src/commands/threads/spawn-target.js +62 -0
- package/dist/src/commands/threads/spawn-target.js.map +1 -0
- package/dist/src/convex/_generated/ai/ai-files.state.json +6 -0
- package/dist/src/convex/_generated/ai/guidelines.md +371 -0
- package/dist/src/convex/_generated/api.d.ts +598 -0
- package/dist/src/convex/_generated/api.js +23 -0
- package/dist/src/convex/_generated/dataModel.d.ts +60 -0
- package/dist/src/convex/_generated/server.d.ts +143 -0
- package/dist/src/convex/_generated/server.js +93 -0
- package/dist/src/lib/argv.d.ts +1 -0
- package/dist/src/lib/argv.js +7 -0
- package/dist/src/lib/argv.js.map +1 -0
- package/dist/src/lib/browser-login.d.ts +43 -0
- package/dist/src/lib/browser-login.js +216 -0
- package/dist/src/lib/browser-login.js.map +1 -0
- package/dist/src/lib/config/convex-client.d.ts +41 -0
- package/dist/src/lib/config/convex-client.js +53 -0
- package/dist/src/lib/config/convex-client.js.map +1 -0
- package/dist/src/lib/config/index.d.ts +7 -0
- package/dist/src/lib/config/index.js +13 -0
- package/dist/src/lib/config/index.js.map +1 -0
- package/dist/src/lib/config/profile.d.ts +40 -0
- package/dist/src/lib/config/profile.js +155 -0
- package/dist/src/lib/config/profile.js.map +1 -0
- package/dist/src/lib/config/provider-keys.d.ts +47 -0
- package/dist/src/lib/config/provider-keys.js +97 -0
- package/dist/src/lib/config/provider-keys.js.map +1 -0
- package/dist/src/lib/config/toml.d.ts +78 -0
- package/dist/src/lib/config/toml.js +228 -0
- package/dist/src/lib/config/toml.js.map +1 -0
- package/dist/src/lib/config/types.d.ts +98 -0
- package/dist/src/lib/config/types.js +65 -0
- package/dist/src/lib/config/types.js.map +1 -0
- package/dist/src/lib/config/validate.d.ts +30 -0
- package/dist/src/lib/config/validate.js +66 -0
- package/dist/src/lib/config/validate.js.map +1 -0
- package/dist/src/lib/connect-events.d.ts +42 -0
- package/dist/src/lib/connect-events.js +65 -0
- package/dist/src/lib/connect-events.js.map +1 -0
- package/dist/src/lib/constants.d.ts +20 -0
- package/dist/src/lib/constants.js +27 -0
- package/dist/src/lib/constants.js.map +1 -0
- package/dist/src/lib/content-type.d.ts +1 -0
- package/dist/src/lib/content-type.js +27 -0
- package/dist/src/lib/content-type.js.map +1 -0
- package/dist/src/lib/convex-error.d.ts +12 -0
- package/dist/src/lib/convex-error.js +33 -0
- package/dist/src/lib/convex-error.js.map +1 -0
- package/dist/src/lib/git/checkpoint.d.ts +74 -0
- package/dist/src/lib/git/checkpoint.js +210 -0
- package/dist/src/lib/git/checkpoint.js.map +1 -0
- package/dist/src/lib/git/exec.d.ts +23 -0
- package/dist/src/lib/git/exec.js +46 -0
- package/dist/src/lib/git/exec.js.map +1 -0
- package/dist/src/lib/git/file-index.d.ts +8 -0
- package/dist/src/lib/git/file-index.js +125 -0
- package/dist/src/lib/git/file-index.js.map +1 -0
- package/dist/src/lib/git/index.d.ts +5 -0
- package/dist/src/lib/git/index.js +6 -0
- package/dist/src/lib/git/index.js.map +1 -0
- package/dist/src/lib/git/repo.d.ts +32 -0
- package/dist/src/lib/git/repo.js +95 -0
- package/dist/src/lib/git/repo.js.map +1 -0
- package/dist/src/lib/git/worktrees.d.ts +49 -0
- package/dist/src/lib/git/worktrees.js +97 -0
- package/dist/src/lib/git/worktrees.js.map +1 -0
- package/dist/src/lib/global-options.d.ts +3 -0
- package/dist/src/lib/global-options.js +8 -0
- package/dist/src/lib/global-options.js.map +1 -0
- package/dist/src/lib/id.d.ts +3 -0
- package/dist/src/lib/id.js +14 -0
- package/dist/src/lib/id.js.map +1 -0
- package/dist/src/lib/one-shot-command.d.ts +7 -0
- package/dist/src/lib/one-shot-command.js +30 -0
- package/dist/src/lib/one-shot-command.js.map +1 -0
- package/dist/src/lib/one-shot-config.d.ts +3 -0
- package/dist/src/lib/one-shot-config.js +7 -0
- package/dist/src/lib/one-shot-config.js.map +1 -0
- package/dist/src/lib/output.d.ts +10 -0
- package/dist/src/lib/output.js +27 -0
- package/dist/src/lib/output.js.map +1 -0
- package/dist/src/lib/pagination.d.ts +16 -0
- package/dist/src/lib/pagination.js +45 -0
- package/dist/src/lib/pagination.js.map +1 -0
- package/dist/src/lib/parsers.d.ts +2 -0
- package/dist/src/lib/parsers.js +21 -0
- package/dist/src/lib/parsers.js.map +1 -0
- package/dist/src/lib/project-resolution.d.ts +41 -0
- package/dist/src/lib/project-resolution.js +84 -0
- package/dist/src/lib/project-resolution.js.map +1 -0
- package/dist/src/lib/pull-requests.d.ts +47 -0
- package/dist/src/lib/pull-requests.js +305 -0
- package/dist/src/lib/pull-requests.js.map +1 -0
- package/dist/src/lib/skill-install-guidance.d.ts +5 -0
- package/dist/src/lib/skill-install-guidance.js +41 -0
- package/dist/src/lib/skill-install-guidance.js.map +1 -0
- package/dist/src/lib/text-input.d.ts +18 -0
- package/dist/src/lib/text-input.js +36 -0
- package/dist/src/lib/text-input.js.map +1 -0
- package/dist/src/lib/thread-attachments.d.ts +21 -0
- package/dist/src/lib/thread-attachments.js +104 -0
- package/dist/src/lib/thread-attachments.js.map +1 -0
- package/dist/src/lib/url.d.ts +13 -0
- package/dist/src/lib/url.js +25 -0
- package/dist/src/lib/url.js.map +1 -0
- package/dist/src/lib/version.d.ts +2 -0
- package/dist/src/lib/version.js +33 -0
- package/dist/src/lib/version.js.map +1 -0
- package/dist/templates/devcontainer/Dockerfile +95 -0
- package/dist/templates/devcontainer/README.md +129 -0
- package/dist/templates/devcontainer/devcontainer.json +92 -0
- package/dist/templates/devcontainer/init-firewall.sh +271 -0
- package/package.json +79 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import type { ChildProcess } from "child_process";
|
|
2
|
+
export type ProviderId = "claude" | "codex" | "opencode" | "amp" | "cursor" | "droid" | "factory" | "coderabbit" | "gemini" | "generic";
|
|
3
|
+
export type TransportMode = "json-stream" | "line-text" | "pty";
|
|
4
|
+
export type CleanupPolicy = "always" | "never" | "on-success";
|
|
5
|
+
export interface RunLimits {
|
|
6
|
+
maxConcurrentRuns: number;
|
|
7
|
+
maxRunsPerWorkingDir: number;
|
|
8
|
+
startupTimeoutMs: number;
|
|
9
|
+
idleTimeoutMs: number;
|
|
10
|
+
maxRunTimeoutMs: number;
|
|
11
|
+
terminateGraceMs: number;
|
|
12
|
+
forceKillGraceMs: number;
|
|
13
|
+
maxLineBytesStdout: number;
|
|
14
|
+
maxLineBytesStderr: number;
|
|
15
|
+
maxEventQueueDepth: number;
|
|
16
|
+
maxRawFrameBytes: number;
|
|
17
|
+
terminateAfterResultMs: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ProviderVersionInfo {
|
|
20
|
+
raw: string;
|
|
21
|
+
normalized: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ProviderCapabilities {
|
|
24
|
+
supportsJsonStream: boolean;
|
|
25
|
+
supportsResume: boolean;
|
|
26
|
+
supportsInterrupt: boolean;
|
|
27
|
+
supportsPty: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface ResolvedExecutable {
|
|
30
|
+
command: string;
|
|
31
|
+
argsPrefix?: string[];
|
|
32
|
+
source: "configured" | "bundled" | "path";
|
|
33
|
+
}
|
|
34
|
+
export interface SpawnSpec {
|
|
35
|
+
command: string;
|
|
36
|
+
args: string[];
|
|
37
|
+
cwd: string;
|
|
38
|
+
env?: Record<string, string | undefined>;
|
|
39
|
+
transportMode: TransportMode;
|
|
40
|
+
detached?: boolean;
|
|
41
|
+
bootstrapInput?: unknown[];
|
|
42
|
+
closeStdinAfterSpawn?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export type ProviderInput = {
|
|
45
|
+
type: "user_text";
|
|
46
|
+
text: string;
|
|
47
|
+
} | {
|
|
48
|
+
type: "control";
|
|
49
|
+
payload: unknown;
|
|
50
|
+
} | {
|
|
51
|
+
type: "stdin_line";
|
|
52
|
+
line: string;
|
|
53
|
+
};
|
|
54
|
+
export type TransportEventKind = "process_started" | "stdout" | "stderr" | "spawn_error" | "exit" | "cancelled" | "timeout";
|
|
55
|
+
export interface EventEnvelopeBase {
|
|
56
|
+
runId: string;
|
|
57
|
+
provider: ProviderId;
|
|
58
|
+
providerVersion: string;
|
|
59
|
+
sequence: number;
|
|
60
|
+
timestamp: number;
|
|
61
|
+
}
|
|
62
|
+
export interface TransportEventEnvelope extends EventEnvelopeBase {
|
|
63
|
+
layer: "transport";
|
|
64
|
+
kind: TransportEventKind;
|
|
65
|
+
stream?: "stdout" | "stderr";
|
|
66
|
+
payload?: unknown;
|
|
67
|
+
truncated?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface RawFrameEnvelope extends EventEnvelopeBase {
|
|
70
|
+
transportMode: TransportMode;
|
|
71
|
+
stream: "stdout" | "stderr";
|
|
72
|
+
payload: unknown;
|
|
73
|
+
truncated: boolean;
|
|
74
|
+
}
|
|
75
|
+
export type EnvelopeEvent = TransportEventEnvelope;
|
|
76
|
+
export interface RunMetric {
|
|
77
|
+
runId: string;
|
|
78
|
+
name: string;
|
|
79
|
+
value: number;
|
|
80
|
+
tags?: Record<string, string>;
|
|
81
|
+
}
|
|
82
|
+
export interface HostCallbacks {
|
|
83
|
+
onTransportEvent?(event: TransportEventEnvelope): void | Promise<void>;
|
|
84
|
+
onRawFrame?(frame: RawFrameEnvelope): void | Promise<void>;
|
|
85
|
+
onMetric?(metric: RunMetric): void | Promise<void>;
|
|
86
|
+
}
|
|
87
|
+
export interface ProviderConfig {
|
|
88
|
+
executablePath?: string;
|
|
89
|
+
bundledBinaryPath?: string;
|
|
90
|
+
commandCandidates?: string[];
|
|
91
|
+
allowNpxFallback?: boolean;
|
|
92
|
+
envOverrides?: Record<string, string>;
|
|
93
|
+
}
|
|
94
|
+
export interface RunRequest {
|
|
95
|
+
providerId: ProviderId;
|
|
96
|
+
cwd: string;
|
|
97
|
+
prompt?: string;
|
|
98
|
+
transportMode?: TransportMode;
|
|
99
|
+
isolationMode?: "sandboxed" | "inherit";
|
|
100
|
+
providerConfig?: ProviderConfig;
|
|
101
|
+
providerOptions?: Record<string, unknown>;
|
|
102
|
+
signal?: AbortSignal;
|
|
103
|
+
}
|
|
104
|
+
export interface RunSnapshot {
|
|
105
|
+
runId: string;
|
|
106
|
+
providerId: ProviderId;
|
|
107
|
+
cwd: string;
|
|
108
|
+
startedAt: number;
|
|
109
|
+
}
|
|
110
|
+
export type RunStatus = "completed" | "failed" | "cancelled" | "timeout";
|
|
111
|
+
export interface RunFinalState {
|
|
112
|
+
runId: string;
|
|
113
|
+
providerId: ProviderId;
|
|
114
|
+
status: RunStatus;
|
|
115
|
+
exitCode: number | null;
|
|
116
|
+
signal: NodeJS.Signals | null;
|
|
117
|
+
reason?: string;
|
|
118
|
+
}
|
|
119
|
+
export interface RunHandle {
|
|
120
|
+
readonly runId: string;
|
|
121
|
+
readonly providerId: ProviderId;
|
|
122
|
+
events(): AsyncIterable<EnvelopeEvent>;
|
|
123
|
+
send(input: ProviderInput): Promise<void>;
|
|
124
|
+
interrupt(): Promise<void>;
|
|
125
|
+
terminate(reason?: string): Promise<void>;
|
|
126
|
+
wait(): Promise<RunFinalState>;
|
|
127
|
+
}
|
|
128
|
+
export interface CliExecutionSdk {
|
|
129
|
+
startRun(request: RunRequest): Promise<RunHandle>;
|
|
130
|
+
listRunning(): RunSnapshot[];
|
|
131
|
+
cancelRun(runId: string, reason?: string): Promise<void>;
|
|
132
|
+
shutdown(): Promise<void>;
|
|
133
|
+
}
|
|
134
|
+
export interface ResolveExecutableContext {
|
|
135
|
+
providerId: ProviderId;
|
|
136
|
+
providerConfig?: ProviderConfig;
|
|
137
|
+
}
|
|
138
|
+
export interface DetectVersionContext {
|
|
139
|
+
resolvedExecutable: ResolvedExecutable;
|
|
140
|
+
cwd: string;
|
|
141
|
+
env: Record<string, string | undefined>;
|
|
142
|
+
}
|
|
143
|
+
export interface DetectCapabilitiesContext {
|
|
144
|
+
resolvedExecutable: ResolvedExecutable;
|
|
145
|
+
cwd: string;
|
|
146
|
+
env: Record<string, string | undefined>;
|
|
147
|
+
version: ProviderVersionInfo;
|
|
148
|
+
}
|
|
149
|
+
export interface BuildSpawnSpecContext {
|
|
150
|
+
runId: string;
|
|
151
|
+
cwd: string;
|
|
152
|
+
prompt?: string;
|
|
153
|
+
transportMode: TransportMode;
|
|
154
|
+
resolvedExecutable: ResolvedExecutable;
|
|
155
|
+
version: ProviderVersionInfo;
|
|
156
|
+
capabilities: ProviderCapabilities;
|
|
157
|
+
providerConfig?: ProviderConfig;
|
|
158
|
+
providerOptions?: Record<string, unknown>;
|
|
159
|
+
env: Record<string, string | undefined>;
|
|
160
|
+
}
|
|
161
|
+
export interface HandleInputContext {
|
|
162
|
+
child: ChildProcess;
|
|
163
|
+
input: ProviderInput;
|
|
164
|
+
}
|
|
165
|
+
export interface InterruptContext {
|
|
166
|
+
child: ChildProcess;
|
|
167
|
+
}
|
|
168
|
+
export interface TerminateContext {
|
|
169
|
+
child: ChildProcess;
|
|
170
|
+
reason?: string;
|
|
171
|
+
}
|
|
172
|
+
export interface ProviderAdapter {
|
|
173
|
+
readonly id: ProviderId;
|
|
174
|
+
readonly defaultTransportMode: TransportMode;
|
|
175
|
+
resolveExecutable(ctx: ResolveExecutableContext): Promise<ResolvedExecutable>;
|
|
176
|
+
detectVersion(ctx: DetectVersionContext): Promise<ProviderVersionInfo>;
|
|
177
|
+
detectCapabilities(ctx: DetectCapabilitiesContext): Promise<ProviderCapabilities>;
|
|
178
|
+
buildSpawnSpec(ctx: BuildSpawnSpecContext): Promise<SpawnSpec>;
|
|
179
|
+
handleInput?(ctx: HandleInputContext): Promise<void>;
|
|
180
|
+
interrupt?(ctx: InterruptContext): Promise<void>;
|
|
181
|
+
terminate?(ctx: TerminateContext): Promise<void>;
|
|
182
|
+
}
|
|
183
|
+
export interface DecodedTransportFrame {
|
|
184
|
+
stream: "stdout" | "stderr";
|
|
185
|
+
payload: unknown;
|
|
186
|
+
parsed: unknown;
|
|
187
|
+
truncated: boolean;
|
|
188
|
+
}
|
|
189
|
+
export interface IsolationContext {
|
|
190
|
+
rootDir: string;
|
|
191
|
+
homeDir: string;
|
|
192
|
+
env: Record<string, string | undefined>;
|
|
193
|
+
cleanup: () => Promise<void>;
|
|
194
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/agent/sdk/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ParsedVersion {
|
|
2
|
+
major: number;
|
|
3
|
+
minor: number;
|
|
4
|
+
patch: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function normalizeProviderVersion(raw: string | undefined): string;
|
|
7
|
+
export declare function parseVersion(value: string): ParsedVersion;
|
|
8
|
+
export declare function compareVersions(a: string, b: string): number;
|
|
9
|
+
export declare function satisfiesVersionRange(version: string, range: string): boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const VERSION_REGEX = /(\d+)\.(\d+)\.(\d+)/;
|
|
2
|
+
export function normalizeProviderVersion(raw) {
|
|
3
|
+
if (!raw)
|
|
4
|
+
return "0.0.0";
|
|
5
|
+
const match = raw.match(VERSION_REGEX);
|
|
6
|
+
if (!match)
|
|
7
|
+
return "0.0.0";
|
|
8
|
+
return `${match[1]}.${match[2]}.${match[3]}`;
|
|
9
|
+
}
|
|
10
|
+
export function parseVersion(value) {
|
|
11
|
+
const normalized = normalizeProviderVersion(value);
|
|
12
|
+
const [major, minor, patch] = normalized.split(".").map(Number);
|
|
13
|
+
return { major, minor, patch };
|
|
14
|
+
}
|
|
15
|
+
export function compareVersions(a, b) {
|
|
16
|
+
const left = parseVersion(a);
|
|
17
|
+
const right = parseVersion(b);
|
|
18
|
+
if (left.major !== right.major)
|
|
19
|
+
return left.major - right.major;
|
|
20
|
+
if (left.minor !== right.minor)
|
|
21
|
+
return left.minor - right.minor;
|
|
22
|
+
return left.patch - right.patch;
|
|
23
|
+
}
|
|
24
|
+
export function satisfiesVersionRange(version, range) {
|
|
25
|
+
if (range === "*" || range.trim() === "")
|
|
26
|
+
return true;
|
|
27
|
+
const normalizedVersion = normalizeProviderVersion(version);
|
|
28
|
+
if (range.startsWith(">=")) {
|
|
29
|
+
const min = normalizeProviderVersion(range.slice(2));
|
|
30
|
+
return compareVersions(normalizedVersion, min) >= 0;
|
|
31
|
+
}
|
|
32
|
+
if (range.startsWith("^")) {
|
|
33
|
+
const base = parseVersion(range.slice(1));
|
|
34
|
+
const candidate = parseVersion(normalizedVersion);
|
|
35
|
+
if (candidate.major !== base.major)
|
|
36
|
+
return false;
|
|
37
|
+
return compareVersions(normalizedVersion, `${base.major}.${base.minor}.${base.patch}`) >= 0;
|
|
38
|
+
}
|
|
39
|
+
return normalizedVersion === normalizeProviderVersion(range);
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=provider-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-version.js","sourceRoot":"","sources":["../../../../../src/agent/sdk/versioning/provider-version.ts"],"names":[],"mappings":"AAMA,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAE5C,MAAM,UAAU,wBAAwB,CAAC,GAAuB;IAC9D,IAAI,CAAC,GAAG;QAAE,OAAO,OAAO,CAAC;IACzB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACvC,IAAI,CAAC,KAAK;QAAE,OAAO,OAAO,CAAC;IAC3B,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,MAAM,UAAU,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IACnD,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,CAAS,EAAE,CAAS;IAClD,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;IAE9B,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAChE,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAChE,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAAe,EAAE,KAAa;IAClE,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAEtD,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAC5D,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3B,MAAM,GAAG,GAAG,wBAAwB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,OAAO,eAAe,CAAC,iBAAiB,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,MAAM,SAAS,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC;QAClD,IAAI,SAAS,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QACjD,OAAO,eAAe,CAAC,iBAAiB,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC;IAC9F,CAAC;IAED,OAAO,iBAAiB,KAAK,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Add global CLI options (--profile, --url, --api-key, --project) to a command.
|
|
4
|
+
* These mirror the root program options so they can be placed after subcommands.
|
|
5
|
+
*/
|
|
6
|
+
export declare function addGlobalOptions<T extends Command>(cmd: T): T;
|
|
7
|
+
export declare function registerCommands(program: Command): void;
|
package/dist/src/cli.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { configCommand } from "./commands/config/command.js";
|
|
2
|
+
import { setupCommand } from "./commands/setup/command.js";
|
|
3
|
+
import { loginCommand } from "./commands/login/command.js";
|
|
4
|
+
import { connectCommand } from "./commands/connect/command.js";
|
|
5
|
+
import { statusCommand } from "./commands/status/command.js";
|
|
6
|
+
import { pathsCommand } from "./commands/paths/command.js";
|
|
7
|
+
import { keysCommand } from "./commands/keys/command.js";
|
|
8
|
+
import { projectsCommand } from "./commands/projects/index.js";
|
|
9
|
+
import { initCommand } from "./commands/init.js";
|
|
10
|
+
import { devcontainerCommand } from "./commands/devcontainer/command.js";
|
|
11
|
+
import { orgsCommand } from "./commands/orgs/index.js";
|
|
12
|
+
import { tasksCommand } from "./commands/tasks/index.js";
|
|
13
|
+
import { listsCommand } from "./commands/lists/index.js";
|
|
14
|
+
import { labelsCommand } from "./commands/labels/index.js";
|
|
15
|
+
import { taskTypesCommand } from "./commands/task-types/index.js";
|
|
16
|
+
import { projectAgentsCommand } from "./commands/project-agents/index.js";
|
|
17
|
+
import { promptsCommand } from "./commands/prompts/index.js";
|
|
18
|
+
import { threadsCommand } from "./commands/threads/index.js";
|
|
19
|
+
import { profilesCommand } from "./commands/profiles/index.js";
|
|
20
|
+
/**
|
|
21
|
+
* Add global CLI options (--profile, --url, --api-key, --project) to a command.
|
|
22
|
+
* These mirror the root program options so they can be placed after subcommands.
|
|
23
|
+
*/
|
|
24
|
+
export function addGlobalOptions(cmd) {
|
|
25
|
+
return cmd
|
|
26
|
+
.option("--profile <name>", "Profile key (for profile lookup)")
|
|
27
|
+
.option("--url <url>", "Convex backend URL (overrides config)")
|
|
28
|
+
.option("--api-key <key>", "API key (overrides config)")
|
|
29
|
+
.option("--project <id>", "Project ID (overrides config)");
|
|
30
|
+
}
|
|
31
|
+
export function registerCommands(program) {
|
|
32
|
+
// Setup and config commands
|
|
33
|
+
program.addCommand(setupCommand);
|
|
34
|
+
program.addCommand(loginCommand);
|
|
35
|
+
program.addCommand(configCommand);
|
|
36
|
+
program.addCommand(statusCommand);
|
|
37
|
+
program.addCommand(pathsCommand);
|
|
38
|
+
program.addCommand(keysCommand);
|
|
39
|
+
// Agent commands
|
|
40
|
+
program.addCommand(connectCommand);
|
|
41
|
+
// Integration commands
|
|
42
|
+
program.addCommand(initCommand);
|
|
43
|
+
program.addCommand(devcontainerCommand);
|
|
44
|
+
// Nested commands
|
|
45
|
+
program.addCommand(orgsCommand);
|
|
46
|
+
program.addCommand(projectsCommand);
|
|
47
|
+
program.addCommand(listsCommand);
|
|
48
|
+
program.addCommand(labelsCommand);
|
|
49
|
+
program.addCommand(taskTypesCommand);
|
|
50
|
+
program.addCommand(projectAgentsCommand);
|
|
51
|
+
program.addCommand(promptsCommand);
|
|
52
|
+
program.addCommand(threadsCommand);
|
|
53
|
+
program.addCommand(profilesCommand);
|
|
54
|
+
program.addCommand(tasksCommand);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAA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CAAC,WAAW,CAAC,CAAC;IAChC,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAExC,kBAAkB;IAClB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAChC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IACpC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IACjC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAClC,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IACrC,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACzC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IACnC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IACnC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAEpC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { confirm } from "@inquirer/prompts";
|
|
4
|
+
import { getAllProfiles, getConfigPath, configExists, deleteProfileByKey, resolveProfile, setDefaultProfile, getDefaultProfileKey, } from "../../lib/config/index.js";
|
|
5
|
+
import { addGlobalOptions } from "../../cli.js";
|
|
6
|
+
/**
|
|
7
|
+
* List all profiles
|
|
8
|
+
*/
|
|
9
|
+
const listCommand = new Command("list")
|
|
10
|
+
.alias("ls")
|
|
11
|
+
.description("List all configured profiles")
|
|
12
|
+
.action(async () => {
|
|
13
|
+
const profiles = getAllProfiles();
|
|
14
|
+
const configPath = getConfigPath();
|
|
15
|
+
const defaultKey = getDefaultProfileKey();
|
|
16
|
+
if (profiles.length === 0) {
|
|
17
|
+
console.log(chalk.yellow("\nNo profiles configured."));
|
|
18
|
+
console.log(chalk.dim(`Config file: ${configPath}`));
|
|
19
|
+
console.log(chalk.dim("\nRun 'convoy setup' to create a profile."));
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
console.log(chalk.bold("\nConfigured Profiles:\n"));
|
|
23
|
+
for (const { key, profile } of profiles) {
|
|
24
|
+
const isDefault = key === defaultKey;
|
|
25
|
+
const defaultMarker = isDefault ? chalk.yellow(" (default)") : "";
|
|
26
|
+
const maskedKey = profile.api_key
|
|
27
|
+
? `${profile.api_key.substring(0, 10)}...${profile.api_key.substring(profile.api_key.length - 4)}`
|
|
28
|
+
: "???";
|
|
29
|
+
console.log(` ${chalk.green(key)}${defaultMarker}`);
|
|
30
|
+
console.log(` Name: ${profile.name}`);
|
|
31
|
+
console.log(` URL: ${chalk.cyan(profile.url)}`);
|
|
32
|
+
console.log(` Project ID: ${chalk.dim(profile.project_id)}`);
|
|
33
|
+
console.log(` Paths:`);
|
|
34
|
+
for (const p of profile.paths) {
|
|
35
|
+
console.log(` ${chalk.dim(p)}`);
|
|
36
|
+
}
|
|
37
|
+
console.log(` API Key: ${chalk.dim(maskedKey)}`);
|
|
38
|
+
console.log();
|
|
39
|
+
}
|
|
40
|
+
console.log(chalk.dim(`Config file: ${configPath}`));
|
|
41
|
+
});
|
|
42
|
+
/**
|
|
43
|
+
* Show resolved profile for current directory
|
|
44
|
+
*/
|
|
45
|
+
const showCommand = addGlobalOptions(new Command("show")
|
|
46
|
+
.description("Show resolved profile for current directory")).action(async (_options, cmd) => {
|
|
47
|
+
const cwd = process.cwd();
|
|
48
|
+
const resolution = resolveProfile(cwd, {
|
|
49
|
+
profile: cmd.optsWithGlobals().profile,
|
|
50
|
+
});
|
|
51
|
+
console.log(chalk.bold("\nProfile Resolution\n"));
|
|
52
|
+
console.log(` Current directory: ${chalk.dim(cwd)}`);
|
|
53
|
+
console.log();
|
|
54
|
+
if (!resolution.profile) {
|
|
55
|
+
console.log(chalk.yellow(" No profile matches this directory."));
|
|
56
|
+
console.log(chalk.dim("\n Run 'convoy setup' to create a profile for this folder,"));
|
|
57
|
+
console.log(chalk.dim(" or 'convoy connect' to select an existing profile."));
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
console.log(` Matched profile: ${chalk.green(resolution.key)}`);
|
|
61
|
+
console.log(` Resolution: via ${chalk.cyan(resolution.source)}`);
|
|
62
|
+
console.log();
|
|
63
|
+
console.log(chalk.underline(" Profile Details:"));
|
|
64
|
+
console.log(` Name: ${resolution.profile.name}`);
|
|
65
|
+
console.log(` URL: ${chalk.cyan(resolution.profile.url)}`);
|
|
66
|
+
console.log(` Project ID: ${chalk.dim(resolution.profile.project_id)}`);
|
|
67
|
+
console.log(` Paths:`);
|
|
68
|
+
for (const p of resolution.profile.paths) {
|
|
69
|
+
console.log(` ${chalk.dim(p)}`);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
/**
|
|
73
|
+
* Delete a profile
|
|
74
|
+
*/
|
|
75
|
+
const deleteCommand = new Command("delete")
|
|
76
|
+
.alias("rm")
|
|
77
|
+
.description("Delete a profile")
|
|
78
|
+
.argument("<key>", "Profile key to delete")
|
|
79
|
+
.option("-f, --force", "Skip confirmation")
|
|
80
|
+
.action(async (key, options) => {
|
|
81
|
+
const profiles = getAllProfiles();
|
|
82
|
+
const profile = profiles.find((p) => p.key === key);
|
|
83
|
+
if (!profile) {
|
|
84
|
+
console.error(chalk.red(`\nProfile "${key}" not found.`));
|
|
85
|
+
console.log(chalk.dim("\nAvailable profiles:"));
|
|
86
|
+
for (const p of profiles) {
|
|
87
|
+
console.log(` - ${p.key}`);
|
|
88
|
+
}
|
|
89
|
+
process.exit(1);
|
|
90
|
+
}
|
|
91
|
+
if (!options.force) {
|
|
92
|
+
const shouldDelete = await confirm({
|
|
93
|
+
message: `Delete profile "${key}" (${profile.profile.name})?`,
|
|
94
|
+
default: false,
|
|
95
|
+
});
|
|
96
|
+
if (!shouldDelete) {
|
|
97
|
+
console.log(chalk.dim("\nCancelled."));
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
deleteProfileByKey(key);
|
|
102
|
+
console.log(chalk.green("✓") + ` Profile "${key}" deleted.`);
|
|
103
|
+
});
|
|
104
|
+
/**
|
|
105
|
+
* Set default profile
|
|
106
|
+
*/
|
|
107
|
+
const defaultCommand = new Command("default")
|
|
108
|
+
.description("Set the default profile")
|
|
109
|
+
.argument("<key>", "Profile key to set as default")
|
|
110
|
+
.action(async (key) => {
|
|
111
|
+
const profiles = getAllProfiles();
|
|
112
|
+
const profile = profiles.find((p) => p.key === key);
|
|
113
|
+
if (!profile) {
|
|
114
|
+
console.error(chalk.red(`\nProfile "${key}" not found.`));
|
|
115
|
+
console.log(chalk.dim("\nAvailable profiles:"));
|
|
116
|
+
for (const p of profiles) {
|
|
117
|
+
console.log(` - ${p.key}`);
|
|
118
|
+
}
|
|
119
|
+
process.exit(1);
|
|
120
|
+
}
|
|
121
|
+
setDefaultProfile(key);
|
|
122
|
+
console.log(chalk.green("✓") + ` Default profile set to "${key}".`);
|
|
123
|
+
});
|
|
124
|
+
export const configCommand = new Command("config")
|
|
125
|
+
.description("Manage profiles")
|
|
126
|
+
.addCommand(listCommand)
|
|
127
|
+
.addCommand(showCommand)
|
|
128
|
+
.addCommand(deleteCommand)
|
|
129
|
+
.addCommand(defaultCommand)
|
|
130
|
+
.action(async () => {
|
|
131
|
+
// Default action: show help
|
|
132
|
+
if (!configExists()) {
|
|
133
|
+
console.log(chalk.yellow("\nNo config file found."));
|
|
134
|
+
console.log(chalk.dim(`Expected at: ${getConfigPath()}`));
|
|
135
|
+
console.log(chalk.dim("\nRun 'convoy setup' to create a profile."));
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
// Show summary
|
|
139
|
+
const profiles = getAllProfiles();
|
|
140
|
+
console.log(chalk.bold("\nProfile Summary\n"));
|
|
141
|
+
console.log(` ${profiles.length} profile(s) configured`);
|
|
142
|
+
console.log(chalk.dim(` Config: ${getConfigPath()}`));
|
|
143
|
+
console.log();
|
|
144
|
+
console.log("Commands:");
|
|
145
|
+
console.log(" convoy config list List all profiles");
|
|
146
|
+
console.log(" convoy config show Show resolved profile for cwd");
|
|
147
|
+
console.log(" convoy config delete Delete a profile");
|
|
148
|
+
console.log(" convoy config default Set default profile");
|
|
149
|
+
});
|
|
150
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/commands/config/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KACpC,KAAK,CAAC,IAAI,CAAC;KACX,WAAW,CAAC,8BAA8B,CAAC;KAC3C,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,QAAQ,GAAG,cAAc,EAAE,CAAC;IAClC,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;IAE1C,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,gBAAgB,UAAU,EAAE,CAAC,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC,CAAC;QACpE,OAAO;IACT,CAAC;IAED,OAAO,CAAC,GA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AK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC,MAAM,wBAAwB,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC;IACvD,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACzB,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;IACtE,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;IACzD,OAAO,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { addGlobalOptions } from "../../cli.js";
|
|
3
|
+
import { DEFAULT_CONNECT_CONCURRENCY, parseConnectConcurrencyOption, runConnectCommandAction, } from "./workflow.js";
|
|
4
|
+
export const connectCommand = addGlobalOptions(new Command("connect")
|
|
5
|
+
.description("Start agent connection (long-running)")
|
|
6
|
+
.option("--repo <path>", "Path to repository (defaults to current directory)")
|
|
7
|
+
.option("--name <name>", "Connection name (defaults to folder name)")
|
|
8
|
+
.option("-s, --stream <path>", "Stream from a JSONL file instead of running a real agent")
|
|
9
|
+
.option("-d, --delay <ms>", "Delay between streamed lines in ms (default: 1500)")
|
|
10
|
+
.option("-c, --concurrency <n>", `Max simultaneous chat subprocesses (profile setting or default: ${DEFAULT_CONNECT_CONCURRENCY})`)
|
|
11
|
+
.option("--buffered", "Send whole agent events only, instead of streaming partial (delta) events for live token streaming in the web UI")
|
|
12
|
+
.option("--isolated", "Run agents in an OS-level sandbox restricted to the profile's paths (Claude Code and Codex only)")
|
|
13
|
+
.option("--codex-exec", "Run Codex through non-interactive `codex exec --json` instead of the app-server transport (no mid-run approvals, plan mode, steering, or context-window meter)")
|
|
14
|
+
.option("--provider-key <name>", "Use this [keys.<name>] provider key for this run, overriding the profile's assigned key (not persisted)")
|
|
15
|
+
.option("--json", "Emit machine-readable NDJSON status events on stdout for supervisors; human logs move to stderr")).action(async (options, cmd) => {
|
|
16
|
+
await runConnectCommandAction(options, cmd);
|
|
17
|
+
});
|
|
18
|
+
export { DEFAULT_CONNECT_CONCURRENCY, parseConnectConcurrencyOption };
|
|
19
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/commands/connect/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,eAAe,CAAC;AAevB,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAC5C,IAAI,OAAO,CAAC,SAAS,CAAC;KACnB,WAAW,CAAC,uCAAuC,CAAC;KACpD,MAAM,CAAC,eAAe,EAAE,oDAAoD,CAAC;KAC7E,MAAM,CAAC,eAAe,EAAE,2CAA2C,CAAC;KACpE,MAAM,CAAC,qBAAqB,EAAE,0DAA0D,CAAC;KACzF,MAAM,CAAC,kBAAkB,EAAE,oDAAoD,CAAC;KAChF,MAAM,CACL,uBAAuB,EACvB,mEAAmE,2BAA2B,GAAG,CAClG;KACA,MAAM,CACL,YAAY,EACZ,kHAAkH,CACnH;KACA,MAAM,CACL,YAAY,EACZ,kGAAkG,CACnG;KACA,MAAM,CACL,cAAc,EACd,gKAAgK,CACjK;KACA,MAAM,CACL,uBAAuB,EACvB,yGAAyG,CAC1G;KACA,MAAM,CACL,QAAQ,EACR,iGAAiG,CAClG,CACJ,CAAC,MAAM,CAAC,KAAK,EAAE,OAAuB,EAAE,GAAY,EAAE,EAAE;IACvD,MAAM,uBAAuB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC;AAEH,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { type ResolvedProviderKey } from "../../lib/config/index.js";
|
|
3
|
+
interface ConnectOptions {
|
|
4
|
+
repo?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
stream?: string;
|
|
7
|
+
delay?: string;
|
|
8
|
+
concurrency?: string;
|
|
9
|
+
buffered?: boolean;
|
|
10
|
+
isolated?: boolean;
|
|
11
|
+
codexExec?: boolean;
|
|
12
|
+
json?: boolean;
|
|
13
|
+
providerKey?: string;
|
|
14
|
+
}
|
|
15
|
+
interface RunConnectConfig {
|
|
16
|
+
convexUrl: string;
|
|
17
|
+
apiKey: string;
|
|
18
|
+
projectId: string;
|
|
19
|
+
paths?: string[];
|
|
20
|
+
connectionName?: string;
|
|
21
|
+
profileKey?: string;
|
|
22
|
+
force?: boolean;
|
|
23
|
+
streamFile?: string;
|
|
24
|
+
streamDelayMs?: number;
|
|
25
|
+
concurrency?: number;
|
|
26
|
+
partialStreaming?: boolean;
|
|
27
|
+
isolated?: boolean;
|
|
28
|
+
codexAppServer?: boolean;
|
|
29
|
+
jsonEvents?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare const DEFAULT_CONNECT_CONCURRENCY = 5;
|
|
32
|
+
/**
|
|
33
|
+
* Partial streaming and the Codex app-server transport are on by default
|
|
34
|
+
* (OS-1659) — they are the experience the web app is built around. Each has a
|
|
35
|
+
* single opt-out flag (`--buffered`, `--codex-exec`); there is no positive
|
|
36
|
+
* twin, because passing nothing already means "on".
|
|
37
|
+
*/
|
|
38
|
+
export declare const DEFAULT_PARTIAL_STREAMING = true;
|
|
39
|
+
export declare const DEFAULT_CODEX_APP_SERVER = true;
|
|
40
|
+
/**
|
|
41
|
+
* `--buffered` turns streaming off for the run; otherwise the profile's
|
|
42
|
+
* `streaming` config decides. Undefined means "unset" — `runConnect` applies
|
|
43
|
+
* the default (on).
|
|
44
|
+
*/
|
|
45
|
+
export declare function resolvePartialStreaming(buffered: boolean | undefined, profileStreaming: boolean | undefined): boolean | undefined;
|
|
46
|
+
/** `--isolated` flag wins; otherwise the profile's `isolated` config; default off (OS-1242). */
|
|
47
|
+
export declare function resolveIsolated(flag: boolean | undefined, profileIsolated: boolean | undefined): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* `--codex-exec` runs Codex through `codex exec --json` instead of the
|
|
50
|
+
* app-server transport. Undefined means "unset" — `runConnect` applies the
|
|
51
|
+
* default (app-server).
|
|
52
|
+
*/
|
|
53
|
+
export declare function resolveCodexAppServer(codexExec: boolean | undefined): boolean | undefined;
|
|
54
|
+
export declare function parseConnectConcurrencyOption(value: string | undefined): number;
|
|
55
|
+
/** Explicit flag wins, then the profile setting, then the runtime default. */
|
|
56
|
+
export declare function resolveConnectConcurrency(flagConcurrency: number | undefined, profileConcurrency: number | undefined): number;
|
|
57
|
+
interface ConnectConfigSummary {
|
|
58
|
+
profileKey: string;
|
|
59
|
+
profileName: string;
|
|
60
|
+
convexUrl: string;
|
|
61
|
+
apiKey: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
paths: string[];
|
|
64
|
+
resolutionSource?: string;
|
|
65
|
+
}
|
|
66
|
+
export declare function logConnectConfigSummary(summary: ConnectConfigSummary): void;
|
|
67
|
+
interface ConnectWithProfileConfig {
|
|
68
|
+
profileKey: string;
|
|
69
|
+
profileName: string;
|
|
70
|
+
convexUrl: string;
|
|
71
|
+
apiKey: string;
|
|
72
|
+
projectId: string;
|
|
73
|
+
paths: string[];
|
|
74
|
+
providerKey?: ResolvedProviderKey;
|
|
75
|
+
resolutionSource?: string;
|
|
76
|
+
connectionName?: string;
|
|
77
|
+
streamFile?: string;
|
|
78
|
+
streamDelayMs?: number;
|
|
79
|
+
concurrency?: number;
|
|
80
|
+
partialStreaming?: boolean;
|
|
81
|
+
isolated?: boolean;
|
|
82
|
+
codexAppServer?: boolean;
|
|
83
|
+
jsonEvents?: boolean;
|
|
84
|
+
}
|
|
85
|
+
export declare function connectUsingProfile(config: ConnectWithProfileConfig): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Run the agent connection (reusable function)
|
|
88
|
+
* This starts a long-running process that connects to the backend
|
|
89
|
+
*/
|
|
90
|
+
export declare function runConnect(config: RunConnectConfig): Promise<void>;
|
|
91
|
+
export declare function runConnectCommandAction(options: ConnectOptions, cmd: Command): Promise<void>;
|
|
92
|
+
export {};
|