@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,129 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { program } from "commander";
|
|
4
|
+
import { getCliVersion } from "../src/lib/version.js";
|
|
5
|
+
import { registerCommands } from "../src/cli.js";
|
|
6
|
+
import { resolveProfile, resolveConfigFromProfile, getAllProfiles, addPathToProfile } from "../src/lib/config/index.js";
|
|
7
|
+
import { runSetup } from "../src/commands/setup/workflow.js";
|
|
8
|
+
import { connectUsingProfile, resolveCodexAppServer, resolveConnectConcurrency, resolveIsolated, resolvePartialStreaming, } from "../src/commands/connect/workflow.js";
|
|
9
|
+
import { promptUnmatchedFolder } from "../src/commands/setup/prompts.js";
|
|
10
|
+
import { normalizeCommandArgv } from "../src/lib/argv.js";
|
|
11
|
+
import chalk from "chalk";
|
|
12
|
+
// EPIPE guard: a downstream reader (`| head`, `| jq`) may close the pipe while we
|
|
13
|
+
// are still writing, which would otherwise surface as an unhandled Node stack.
|
|
14
|
+
process.stdout.on("error", () => { });
|
|
15
|
+
program
|
|
16
|
+
.name("convoy")
|
|
17
|
+
.description("CLI agent for Convoy - connect your repo to the web app")
|
|
18
|
+
.version(getCliVersion())
|
|
19
|
+
.enablePositionalOptions()
|
|
20
|
+
.option("--url <url>", "Convex backend URL (overrides config)")
|
|
21
|
+
.option("--api-key <key>", "API key (overrides config)")
|
|
22
|
+
.option("--profile <name>", "Profile key (for profile lookup)")
|
|
23
|
+
.option("--project <id>", "Project ID (overrides config)")
|
|
24
|
+
.option("--buffered", "Send whole agent events only, instead of streaming partial (delta) events for live token streaming in the web UI")
|
|
25
|
+
.option("--isolated", "Run agents in an OS-level sandbox restricted to the profile's paths (Claude Code and Codex only)")
|
|
26
|
+
.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)");
|
|
27
|
+
registerCommands(program);
|
|
28
|
+
// Default action: check config and either setup or connect
|
|
29
|
+
program.action(async (options) => {
|
|
30
|
+
const cwd = process.cwd();
|
|
31
|
+
// Try to resolve profile using new config system
|
|
32
|
+
const resolution = resolveProfile(cwd, {
|
|
33
|
+
profile: options.profile,
|
|
34
|
+
url: options.url,
|
|
35
|
+
apiKey: options.apiKey,
|
|
36
|
+
projectId: options.project,
|
|
37
|
+
});
|
|
38
|
+
// If no profile found, prompt user to create or select one
|
|
39
|
+
if (resolution.source === "none" || !resolution.profile) {
|
|
40
|
+
const profiles = getAllProfiles();
|
|
41
|
+
if (profiles.length === 0) {
|
|
42
|
+
// No profiles exist at all - run setup
|
|
43
|
+
await runSetup({
|
|
44
|
+
url: options.url,
|
|
45
|
+
apiKey: options.apiKey,
|
|
46
|
+
profile: options.profile,
|
|
47
|
+
project: options.project,
|
|
48
|
+
});
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
// Profiles exist but none match - three-way prompt
|
|
52
|
+
const choice = await promptUnmatchedFolder(profiles);
|
|
53
|
+
if (choice.action === "create") {
|
|
54
|
+
await runSetup({
|
|
55
|
+
url: options.url,
|
|
56
|
+
apiKey: options.apiKey,
|
|
57
|
+
profile: options.profile,
|
|
58
|
+
project: options.project,
|
|
59
|
+
});
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const selectedProfile = profiles.find((p) => p.key === choice.key);
|
|
63
|
+
if (!selectedProfile) {
|
|
64
|
+
console.error(chalk.red("Selected profile not found"));
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
let paths = selectedProfile.profile.paths;
|
|
68
|
+
if (choice.action === "add-folder") {
|
|
69
|
+
addPathToProfile(choice.key, cwd);
|
|
70
|
+
// Include the newly added path (in-memory copy is stale after disk write)
|
|
71
|
+
const resolved = path.resolve(cwd);
|
|
72
|
+
if (!paths.some((p) => path.resolve(p) === resolved)) {
|
|
73
|
+
paths = [...paths, resolved];
|
|
74
|
+
}
|
|
75
|
+
console.log(chalk.green("✓") + ` Added folder to profile "${choice.key}"`);
|
|
76
|
+
}
|
|
77
|
+
await connectUsingProfile({
|
|
78
|
+
profileKey: choice.key,
|
|
79
|
+
profileName: selectedProfile.profile.name,
|
|
80
|
+
convexUrl: selectedProfile.profile.url,
|
|
81
|
+
apiKey: selectedProfile.profile.api_key,
|
|
82
|
+
projectId: selectedProfile.profile.project_id,
|
|
83
|
+
paths,
|
|
84
|
+
concurrency: resolveConnectConcurrency(undefined, selectedProfile.profile.concurrency),
|
|
85
|
+
partialStreaming: resolvePartialStreaming(options.buffered, selectedProfile.profile.streaming),
|
|
86
|
+
isolated: resolveIsolated(options.isolated, selectedProfile.profile.isolated),
|
|
87
|
+
codexAppServer: resolveCodexAppServer(options.codexExec),
|
|
88
|
+
});
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
// Profile found - get resolved config with overrides applied
|
|
92
|
+
const config = resolveConfigFromProfile(cwd, {
|
|
93
|
+
url: options.url,
|
|
94
|
+
apiKey: options.apiKey,
|
|
95
|
+
profile: options.profile,
|
|
96
|
+
projectId: options.project,
|
|
97
|
+
});
|
|
98
|
+
// If all config is present, connect directly
|
|
99
|
+
if (config.convexUrl && config.apiKey && config.projectId) {
|
|
100
|
+
if (!resolution.key) {
|
|
101
|
+
console.error(chalk.red("\nResolved profile key is missing."));
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
await connectUsingProfile({
|
|
105
|
+
profileKey: resolution.key,
|
|
106
|
+
profileName: resolution.profile.name,
|
|
107
|
+
convexUrl: config.convexUrl,
|
|
108
|
+
apiKey: config.apiKey,
|
|
109
|
+
projectId: config.projectId,
|
|
110
|
+
paths: resolution.profile.paths,
|
|
111
|
+
resolutionSource: resolution.source,
|
|
112
|
+
concurrency: resolveConnectConcurrency(undefined, resolution.profile.concurrency),
|
|
113
|
+
partialStreaming: resolvePartialStreaming(options.buffered, resolution.profile.streaming),
|
|
114
|
+
isolated: resolveIsolated(options.isolated, resolution.profile.isolated),
|
|
115
|
+
codexAppServer: resolveCodexAppServer(options.codexExec),
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
// Missing some config - run setup
|
|
120
|
+
await runSetup({
|
|
121
|
+
url: options.url,
|
|
122
|
+
apiKey: options.apiKey,
|
|
123
|
+
profile: options.profile,
|
|
124
|
+
project: options.project,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
program.parse(normalizeCommandArgv(process.argv));
|
|
129
|
+
//# sourceMappingURL=convoy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convoy.js","sourceRoot":"","sources":["../../bin/convoy.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACxH,OAAO,EAA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xB,OAAO,EAAE,OAAO,CAAC,OAAO;SACzB,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opensana",
|
|
3
|
+
"description": "Opensana plugins for Claude Code",
|
|
4
|
+
"owner": {
|
|
5
|
+
"name": "Opensana"
|
|
6
|
+
},
|
|
7
|
+
"plugins": [
|
|
8
|
+
{
|
|
9
|
+
"name": "opensana",
|
|
10
|
+
"source": "./opensana",
|
|
11
|
+
"description": "Opensana task management via MCP — manage projects and tasks directly from Claude Code."
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Opensana Tasks Skill (Claude Code + Codex)
|
|
2
|
+
|
|
3
|
+
Manage your Opensana projects and tasks directly from Claude Code or Codex via MCP (Model Context Protocol).
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
This skill provides workflows that help you:
|
|
8
|
+
|
|
9
|
+
- **Set up the Opensana MCP connection** — API key creation, `.mcp.json` configuration, verification
|
|
10
|
+
- **Manage tasks from the terminal** — create, update, search, delete, and organize tasks
|
|
11
|
+
- **Look up tasks by reference** — use Jira-style refs like `WEB-42` to quickly find tasks
|
|
12
|
+
- **Integrate with your dev workflow** — update task status as you code, create tasks for discovered bugs, track sprint progress
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
### Recommended (OpenSana CLI)
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
convoy init skill
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Choose target CLI(s) interactively (`claude`, `codex`) or use flags:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
convoy init skill --cli claude --scope project
|
|
26
|
+
convoy init skill --cli codex --codex-scope project
|
|
27
|
+
convoy init skill --cli claude,codex --scope local --codex-scope user
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Codex destinations:
|
|
31
|
+
|
|
32
|
+
- `project` scope: `.agents/skills/opensana-tasks`
|
|
33
|
+
- `user` scope: `${CODEX_HOME:-~/.codex}/skills/opensana-tasks`
|
|
34
|
+
|
|
35
|
+
### Claude plugin install (manual)
|
|
36
|
+
|
|
37
|
+
### From local path
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
claude plugins install --plugin-dir /path/to/plugins/opensana
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### From GitHub (after pushing)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
claude plugins install <github-url>/plugins/opensana
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Prerequisites
|
|
50
|
+
|
|
51
|
+
1. An Opensana account with at least one project
|
|
52
|
+
2. An API key from **Settings > API Keys** in the Opensana web UI
|
|
53
|
+
|
|
54
|
+
## Quick start
|
|
55
|
+
|
|
56
|
+
After installing the skill, ask your agent to set up Opensana MCP:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
set up Opensana MCP
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Claude will walk you through configuring `.mcp.json` with your deployment URL and API key.
|
|
63
|
+
|
|
64
|
+
Once connected, you can use natural language:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
list my tasks
|
|
68
|
+
create a task "Fix login redirect" with high priority
|
|
69
|
+
mark WEB-42 as done
|
|
70
|
+
what tasks are in progress?
|
|
71
|
+
search tasks for "authentication"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Package structure
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
opensana/
|
|
78
|
+
├── .claude-plugin/
|
|
79
|
+
│ └── plugin.json
|
|
80
|
+
├── skills/
|
|
81
|
+
│ └── tasks/
|
|
82
|
+
│ ├── SKILL.md # Core skill (process contract for task work)
|
|
83
|
+
│ └── references/
|
|
84
|
+
│ └── mcp-setup.md # Detailed setup & API key management
|
|
85
|
+
└── README.md
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Available MCP tools
|
|
89
|
+
|
|
90
|
+
The Opensana MCP server exposes tools for projects, task CRUD and search, comments, external links (commits/branches/PRs), Lists, and document artifacts. Agents discover the exact tool names and parameters from the MCP connection itself; the skill intentionally documents the working process rather than the API surface.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: opensana-tasks
|
|
3
|
+
description: >-
|
|
4
|
+
This skill should be used when the user asks to manage tasks, create/update
|
|
5
|
+
tasks or subtasks, search tasks, look up tasks by ref, work with task
|
|
6
|
+
artifacts (plans, reviews, implementation summaries, handoff docs), or set
|
|
7
|
+
up the Opensana MCP connection.
|
|
8
|
+
version: 0.6.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Working with Opensana Tasks
|
|
12
|
+
|
|
13
|
+
Opensana is a project management platform exposed to agents through an MCP server. The server provides tools for projects, task CRUD and search, comments, external links (commits, branches, pull requests, URLs), Lists, and document artifacts. Discover exact tool names and parameters from the MCP connection itself — this skill describes the working process, not the API.
|
|
14
|
+
|
|
15
|
+
- Tasks use Jira-style refs: `{PROJECT_ALIAS}-{number}` (for example `WEB-42`).
|
|
16
|
+
- The MCP connection is usually pre-scoped to one project (`?project=` in the server URL), so tools work without a `projectId`. Only call `list_projects` when the user explicitly asks about other projects.
|
|
17
|
+
- If no Opensana tools are available in the session, set up the connection first — see `references/mcp-setup.md`.
|
|
18
|
+
|
|
19
|
+
## Artifact Model
|
|
20
|
+
|
|
21
|
+
Artifacts are durable documents attached to a task. They are the persistent execution context shared between sessions and agents — chat history disappears, artifacts don't.
|
|
22
|
+
|
|
23
|
+
Two content types, chosen at creation and immutable afterwards:
|
|
24
|
+
|
|
25
|
+
- **markdown** (default) — editable in the web UI
|
|
26
|
+
- **html** — render-only in the UI (sandboxed iframe with full-page view); must be self-contained (inline CSS/JS, no external app access). Use for visual deliverables: reports, dashboards, interactive previews.
|
|
27
|
+
|
|
28
|
+
Default artifact set per task:
|
|
29
|
+
|
|
30
|
+
- Canonical rolling docs, updated in place: `Plan`, `Implementation Summary`, `Handoff` (always markdown)
|
|
31
|
+
- Snapshot docs, one per pass: `Code Review - <date>` (and optional `Risk Review - <date>`)
|
|
32
|
+
|
|
33
|
+
Editing rules:
|
|
34
|
+
|
|
35
|
+
- Prefer the targeted string-replace tool over full-content rewrites for small edits (checklist ticks, corrections).
|
|
36
|
+
- Use plain human names (`Plan`, not `plan-v2-final`).
|
|
37
|
+
|
|
38
|
+
## Task Workflow Contract
|
|
39
|
+
|
|
40
|
+
Every gate below is mandatory for task-scoped work. If a gate is missed, self-correct immediately: perform the missed step, then record the correction in the next task comment.
|
|
41
|
+
|
|
42
|
+
### 1. Pickup
|
|
43
|
+
|
|
44
|
+
Before working on a task: resolve it by ref/ID, list its artifacts, and read `Plan` plus the latest review artifact.
|
|
45
|
+
|
|
46
|
+
### 2. Plan
|
|
47
|
+
|
|
48
|
+
1. Create or update the single canonical `Plan` artifact **before** sending the final plan response — and again whenever decisions change materially during discussion.
|
|
49
|
+
2. For repeat cycles, keep the same artifact and append iterations: a `Current Plan (Iteration N)` section, with earlier iterations preserved as plan history.
|
|
50
|
+
3. End the plan with this exact section and keep it ticked as work progresses:
|
|
51
|
+
|
|
52
|
+
```md
|
|
53
|
+
## Task Workflow
|
|
54
|
+
|
|
55
|
+
- [ ] Plan artifact attached/updated
|
|
56
|
+
- [ ] Planning comment posted (TLDR + key decisions)
|
|
57
|
+
- [ ] Status set to in-progress when implementation starts
|
|
58
|
+
- [ ] Implementation executed
|
|
59
|
+
- [ ] `Implementation Summary` artifact updated
|
|
60
|
+
- [ ] Completion/status-transition comment posted
|
|
61
|
+
- [ ] Status moved to review (or done if explicitly approved)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
4. Cite the artifact (name + id) in the final response.
|
|
65
|
+
|
|
66
|
+
### 3. Implement
|
|
67
|
+
|
|
68
|
+
1. Read the current `Plan` first.
|
|
69
|
+
2. Set the task status to the project's in-progress status **before the first implementation action** (file edit, patch, implementation test run). This ordering is a hard rule.
|
|
70
|
+
3. Execute the work.
|
|
71
|
+
4. Update `Implementation Summary`: what changed, tests run and outcomes, known gaps/risks.
|
|
72
|
+
5. Move the task to the review status (or done only when explicitly approved).
|
|
73
|
+
|
|
74
|
+
### 4. Link work to the task
|
|
75
|
+
|
|
76
|
+
Attach a link the moment work becomes visible outside Opensana, using the external-link tool with a deterministic link id (for example `github-pr-<owner>-<repo>-<number>`, `commit-<sha>`) so repeated upserts update the link in place instead of duplicating it.
|
|
77
|
+
|
|
78
|
+
- After committing — even before pushing — attach a `commit` link. Derive its URL from the `origin` remote and the sha (for example `https://github.com/<owner>/<repo>/commit/<sha>`) and attach it rather than waiting for a push; the agent does not control if or when the commit reaches the remote, so assume it will. Title it with the commit subject.
|
|
79
|
+
- After opening a pull request, attach a `pull_request` link titled with the PR title. A task that spans several PRs gets one link per PR.
|
|
80
|
+
- Attach a `url` link for a related upstream issue or a design/docs page when one is known.
|
|
81
|
+
- Never delete or relabel a link when a PR merges or closes. Links are pointers; their live state is read at the destination, and Opensana deliberately stores no PR open/merged/closed status.
|
|
82
|
+
- Tasks hold up to 20 links; that cap is fine for normal use.
|
|
83
|
+
|
|
84
|
+
### 5. Review
|
|
85
|
+
|
|
86
|
+
1. Create a new snapshot artifact (`Code Review - <YYYY-MM-DD>`) with findings, severity, and actionable fixes.
|
|
87
|
+
2. When later asked to "address the review", read that artifact first.
|
|
88
|
+
|
|
89
|
+
### 6. Handoff
|
|
90
|
+
|
|
91
|
+
Before ending a session or transferring to another agent, update `Handoff` with: current status, what is done, what remains, blockers/assumptions, exact next steps, and references to the latest plan/review artifacts.
|
|
92
|
+
|
|
93
|
+
## Comment Policy
|
|
94
|
+
|
|
95
|
+
Comments are notifications; artifacts hold the detail. Post comments only at milestone boundaries:
|
|
96
|
+
|
|
97
|
+
- end of a planning, implementation, or review pass
|
|
98
|
+
- status transitions (in-progress → review / done / blocked)
|
|
99
|
+
- handoff to another person or agent
|
|
100
|
+
|
|
101
|
+
Never comment for every intermediate artifact save.
|
|
102
|
+
|
|
103
|
+
Milestone comment shape (address the assignee directly if one exists):
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
For @Assignee: execution pass completed; ready for review.
|
|
107
|
+
Added: ...
|
|
108
|
+
Removed: ... (or "none")
|
|
109
|
+
Changed: ...
|
|
110
|
+
Why: ...
|
|
111
|
+
Evidence: artifacts updated ('Implementation Summary', 'Plan'); checks run.
|
|
112
|
+
Next: explicit owner/action.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Planning exception: right after the first `Plan` artifact creation, post a short comment with only `TLDR` and `Key decisions`. Subsequent material plan changes use the changelog shape above.
|
|
116
|
+
|
|
117
|
+
## Rules of Thumb
|
|
118
|
+
|
|
119
|
+
- One task, many iterations: keep using the same parent task for follow-up work on the same feature; start a new `Plan` iteration instead of a new task.
|
|
120
|
+
- Ask before creating subtasks. Suggest one only when work has separate acceptance criteria or could ship independently.
|
|
121
|
+
- Status names vary per project; the tool schemas reflect what is enabled for the connected project. Typical flow: planning status → in-progress → in-review → done, with blocked for stalls.
|
|
122
|
+
- Domain failures surface as MCP tool errors; correct the input and retry rather than abandoning a gate.
|
|
123
|
+
|
|
124
|
+
## Pre-Response Checklist
|
|
125
|
+
|
|
126
|
+
Before sending a final response for task-scoped work, verify:
|
|
127
|
+
|
|
128
|
+
1. Task resolved and confirmed (ref/id)
|
|
129
|
+
2. Relevant canonical artifact updated (planning → `Plan`, implementation → `Implementation Summary`, handoff → `Handoff`)
|
|
130
|
+
3. `## Task Workflow` checklist in `Plan` is current and consistent with actual status/comments
|
|
131
|
+
4. Status transitions happened at the right time (in-progress before the first implementation action)
|
|
132
|
+
5. Milestone comment posted if a pass completed
|
|
133
|
+
6. Response cites artifact evidence (name/id)
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Opensana MCP Setup Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Opensana exposes a JSON-RPC 2.0 MCP endpoint at `/api/mcp` on its Convex deployment. Authentication uses user-scoped API keys passed as Bearer tokens.
|
|
6
|
+
|
|
7
|
+
## Step 1: Create an API Key
|
|
8
|
+
|
|
9
|
+
1. Log in to Opensana web UI
|
|
10
|
+
2. Navigate to **Settings > API Keys**
|
|
11
|
+
3. Click **Create API Key**
|
|
12
|
+
4. Set a descriptive name (e.g., "Claude Code MCP")
|
|
13
|
+
5. Set an expiration date (maximum 1 year)
|
|
14
|
+
6. Copy the key immediately — it is shown only once
|
|
15
|
+
|
|
16
|
+
### API Key Details
|
|
17
|
+
|
|
18
|
+
- Format: `sk_user_{32 random base64 characters}`
|
|
19
|
+
- Scope: User-level — grants access to all projects the user can access
|
|
20
|
+
- Maximum: 10 active keys per user
|
|
21
|
+
- Storage: Keys are SHA-256 hashed server-side (not recoverable)
|
|
22
|
+
- Tracking: `lastUsedAt` timestamp recorded on each use
|
|
23
|
+
|
|
24
|
+
## Step 2: Configure MCP Client
|
|
25
|
+
|
|
26
|
+
### Claude Code (project-scoped — recommended)
|
|
27
|
+
|
|
28
|
+
Scope the MCP connection to a specific Opensana project by adding `?project=` to the URL. This way all tools automatically use that project — no need to pass `projectId` on every call.
|
|
29
|
+
|
|
30
|
+
The `?project=` parameter accepts two formats:
|
|
31
|
+
|
|
32
|
+
- **`org-slug/ALIAS`** (recommended) — uses the same org slug and project alias from your web UI URL (e.g., `acme/WEB` from `/o/acme/WEB/...`)
|
|
33
|
+
- **Convex document ID** — the raw project ID (e.g., from `list_projects`)
|
|
34
|
+
|
|
35
|
+
Create or edit `.mcp.json` in the project root:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"mcpServers": {
|
|
40
|
+
"opensana": {
|
|
41
|
+
"type": "http",
|
|
42
|
+
"url": "https://<YOUR_DEPLOYMENT>.convex.site/api/mcp?project=<ORG_SLUG>/<PROJECT_ALIAS>",
|
|
43
|
+
"headers": {
|
|
44
|
+
"Authorization": "Bearer sk_user_<YOUR_API_KEY>"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Replace `<ORG_SLUG>` with your organization slug and `<PROJECT_ALIAS>` with the project alias (e.g., `acme/WEB`).
|
|
52
|
+
|
|
53
|
+
### Claude Code (global — multi-project)
|
|
54
|
+
|
|
55
|
+
Edit `~/.claude/mcp.json` to make Opensana available in all projects without scoping to a specific project. You'll need to pass `projectId` to each tool call, or call `list_projects` first to discover project IDs:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"opensana": {
|
|
61
|
+
"type": "http",
|
|
62
|
+
"url": "https://<YOUR_DEPLOYMENT>.convex.site/api/mcp",
|
|
63
|
+
"headers": {
|
|
64
|
+
"Authorization": "Bearer sk_user_<YOUR_API_KEY>"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Other MCP Clients
|
|
72
|
+
|
|
73
|
+
Any MCP-compatible client can connect. The endpoint accepts standard JSON-RPC 2.0 over HTTP POST:
|
|
74
|
+
|
|
75
|
+
- **URL**: `https://<DEPLOYMENT>.convex.site/api/mcp` (append `?project=<ID>` for project-scoped access)
|
|
76
|
+
- **Method**: POST
|
|
77
|
+
- **Headers**: `Authorization: Bearer sk_user_...`, `Content-Type: application/json`
|
|
78
|
+
- **CORS**: Supported (OPTIONS preflight handled)
|
|
79
|
+
|
|
80
|
+
## Step 3: Verify Connection
|
|
81
|
+
|
|
82
|
+
After configuring, verify by calling `list_projects`. If it returns project data, the connection is working.
|
|
83
|
+
|
|
84
|
+
Manual verification with curl:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
CONVEX_URL="https://<YOUR_DEPLOYMENT>.convex.site"
|
|
88
|
+
API_KEY="sk_user_<YOUR_KEY>"
|
|
89
|
+
|
|
90
|
+
# Test initialize (handshake)
|
|
91
|
+
curl -X POST "$CONVEX_URL/api/mcp" \
|
|
92
|
+
-H "Authorization: Bearer $API_KEY" \
|
|
93
|
+
-H "Content-Type: application/json" \
|
|
94
|
+
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'
|
|
95
|
+
|
|
96
|
+
# Test listing tools
|
|
97
|
+
curl -X POST "$CONVEX_URL/api/mcp" \
|
|
98
|
+
-H "Authorization: Bearer $API_KEY" \
|
|
99
|
+
-H "Content-Type: application/json" \
|
|
100
|
+
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
|
|
101
|
+
|
|
102
|
+
# Test listing projects
|
|
103
|
+
curl -X POST "$CONVEX_URL/api/mcp" \
|
|
104
|
+
-H "Authorization: Bearer $API_KEY" \
|
|
105
|
+
-H "Content-Type: application/json" \
|
|
106
|
+
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_projects"}}'
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## API Key Management
|
|
110
|
+
|
|
111
|
+
### Revoking a Key
|
|
112
|
+
|
|
113
|
+
Navigate to **Settings > API Keys** and click **Revoke** on the target key. Revocation is immediate — all MCP connections using that key will start receiving 401 errors.
|
|
114
|
+
|
|
115
|
+
### Rotating a Key
|
|
116
|
+
|
|
117
|
+
1. Create a new API key
|
|
118
|
+
2. Update MCP configuration with the new key
|
|
119
|
+
3. Verify the new key works
|
|
120
|
+
4. Revoke the old key
|
|
121
|
+
|
|
122
|
+
### Security Best Practices
|
|
123
|
+
|
|
124
|
+
- Use separate API keys for different machines/contexts
|
|
125
|
+
- Set the shortest practical expiration
|
|
126
|
+
- Revoke keys immediately when no longer needed
|
|
127
|
+
- Never commit API keys to version control — use environment variables or `.mcp.json` in `.gitignore`
|
|
128
|
+
- The `.mcp.json` file may contain secrets; ensure it is gitignored
|
|
129
|
+
|
|
130
|
+
## Troubleshooting
|
|
131
|
+
|
|
132
|
+
### 401 Unauthorized
|
|
133
|
+
|
|
134
|
+
- Verify the API key is correct and not expired
|
|
135
|
+
- Confirm the `Authorization` header includes the `Bearer ` prefix (with space)
|
|
136
|
+
- Check that the key has not been revoked in Settings > API Keys
|
|
137
|
+
|
|
138
|
+
### 403 Forbidden
|
|
139
|
+
|
|
140
|
+
- The API key's user does not have access to the requested project
|
|
141
|
+
- Verify project membership in the Opensana web UI
|
|
142
|
+
- Org owners/admins have implicit access to all org projects
|
|
143
|
+
|
|
144
|
+
### Connection Refused / Timeout
|
|
145
|
+
|
|
146
|
+
- Verify the Convex deployment URL is correct
|
|
147
|
+
- Check that the URL ends with `/api/mcp` (not just `/api/`)
|
|
148
|
+
- Ensure network connectivity to the Convex deployment
|
|
149
|
+
|
|
150
|
+
### Empty Project List
|
|
151
|
+
|
|
152
|
+
- The API key user may not be a member of any organization or project
|
|
153
|
+
- Check organization and project memberships in the web UI
|
|
154
|
+
|
|
155
|
+
### Tool Not Found
|
|
156
|
+
|
|
157
|
+
- Verify the MCP config `url` field points to the correct endpoint
|
|
158
|
+
- Run `tools/list` to see all available tools
|
|
159
|
+
- Tool names are case-sensitive: `list_projects`, not `listProjects`
|
|
160
|
+
|
|
161
|
+
### Stale Data
|
|
162
|
+
|
|
163
|
+
- MCP queries reflect real-time data from Convex
|
|
164
|
+
- If data seems stale, verify the correct deployment URL (dev vs production)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ChunkStreamPolicy, ContentChunk } from "../runtimes/contracts.js";
|
|
2
|
+
/**
|
|
3
|
+
* A chunk stamped with its agent-side emit time. The server would otherwise
|
|
4
|
+
* date every chunk in a batch by its own append time, which collapses the span
|
|
5
|
+
* of any tool call that resolves inside one flush window.
|
|
6
|
+
*/
|
|
7
|
+
export type StampedContentChunk = ContentChunk & {
|
|
8
|
+
timestamp: number;
|
|
9
|
+
};
|
|
10
|
+
export interface ChunkFlushBufferOptions {
|
|
11
|
+
/** Sends one batch upstream. Called with at least one chunk, never concurrently. */
|
|
12
|
+
send: (chunks: StampedContentChunk[]) => Promise<void>;
|
|
13
|
+
/** Runtime coalescing/deferral policy; null = flush every chunk immediately. */
|
|
14
|
+
policy: ChunkStreamPolicy | null;
|
|
15
|
+
flushIntervalMs?: number;
|
|
16
|
+
maxBufferBytes?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ChunkFlushBuffer {
|
|
19
|
+
enqueue(chunk: ContentChunk): void;
|
|
20
|
+
/** First send error, if any. Checked by the producer loop to abort early. */
|
|
21
|
+
readonly failure: Error | null;
|
|
22
|
+
/** Flush remaining chunks and wait for all sends. Rejects on send failure. */
|
|
23
|
+
drain(): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Discard buffered chunks and prevent any further sends. Called on the
|
|
26
|
+
* error path so a stray flush cannot land after the fail mutation.
|
|
27
|
+
*/
|
|
28
|
+
stop(): void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Outgoing transport buffer implementing the OS-991 delta protocol:
|
|
32
|
+
* one in-flight send per message, buffering while in flight, batched sends,
|
|
33
|
+
* coalescing of consecutive deltas, immediate flush for non-deferrable chunks.
|
|
34
|
+
*/
|
|
35
|
+
export declare function createChunkFlushBuffer(options: ChunkFlushBufferOptions): ChunkFlushBuffer;
|