@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,32 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { addGlobalOptions } from "../../cli.js";
|
|
4
|
+
import { api } from "../../convex/_generated/api.js";
|
|
5
|
+
import { runOneShotCommand } from "../../lib/one-shot-command.js";
|
|
6
|
+
import { addOutputOptions, printOutput, resolveOutputMode } from "../../lib/output.js";
|
|
7
|
+
import { resolveProjectFromCommand } from "../../lib/project-resolution.js";
|
|
8
|
+
function formatTaskType(taskType) {
|
|
9
|
+
return `${chalk.cyan(taskType.key.padEnd(16))} ${taskType.name} ${chalk.dim(`${taskType.icon} ${taskType.color}`)}`;
|
|
10
|
+
}
|
|
11
|
+
export const listTaskTypesCommand = addGlobalOptions(addOutputOptions(new Command("list")
|
|
12
|
+
.description("List task types available in a project")
|
|
13
|
+
.option("--org <org>", "Organization ID or slug (used with --project alias)"))).action(async (options, cmd) => {
|
|
14
|
+
await runOneShotCommand(cmd, async ({ client, config }) => {
|
|
15
|
+
const outputMode = resolveOutputMode(options);
|
|
16
|
+
const { projectId } = await resolveProjectFromCommand(client, config, cmd, options.org);
|
|
17
|
+
const taskTypes = await client.query(api.tasks.core.listTypes, {
|
|
18
|
+
projectId,
|
|
19
|
+
});
|
|
20
|
+
printOutput(outputMode, taskTypes, (value) => {
|
|
21
|
+
if (value.length === 0) {
|
|
22
|
+
console.log(chalk.dim("No task types found."));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
console.log(chalk.bold(`Task types (${value.length}):`));
|
|
26
|
+
for (const taskType of value) {
|
|
27
|
+
console.log(` ${formatTaskType(taskType)}`);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/task-types/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAsB,MAAM,qBAAqB,CAAC;AAC3G,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAQ5E,SAAS,cAAc,CAAC,QAAyB;IAC/C,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,QAAQ,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC;AACtH,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAClD,gBAAgB,CACd,IA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/_generated/api.js";
|
|
4
|
+
import { addGlobalOptions } from "../../../../cli.js";
|
|
5
|
+
import { parseId } from "../../../../lib/id.js";
|
|
6
|
+
import { runOneShotCommand } from "../../../../lib/one-shot-command.js";
|
|
7
|
+
import { addOutputOptions, printOutput, resolveOutputMode, } from "../../../../lib/output.js";
|
|
8
|
+
export const addArtifactCommentCommand = addGlobalOptions(addOutputOptions(new Command("add")
|
|
9
|
+
.description("Comment on a text snippet in a markdown artifact")
|
|
10
|
+
.argument("<artifactId>", "Artifact ID")
|
|
11
|
+
.requiredOption("--anchor <text>", "Exact snippet from the artifact content to attach the comment to")
|
|
12
|
+
.option("--occurrence <n>", "Which match of the anchor text to use when it appears multiple times (1-based, default 1)")
|
|
13
|
+
.requiredOption("-m, --message <text>", "Comment body (markdown)"))).action(async (artifactId, options, cmd) => {
|
|
14
|
+
await runOneShotCommand(cmd, async ({ client }) => {
|
|
15
|
+
const outputMode = resolveOutputMode(options);
|
|
16
|
+
// Number() rejects trailing garbage ("2x") that parseInt would swallow.
|
|
17
|
+
const occurrence = options.occurrence === undefined ? undefined : Number(options.occurrence);
|
|
18
|
+
if (occurrence !== undefined && (!Number.isInteger(occurrence) || occurrence < 1)) {
|
|
19
|
+
throw new Error("--occurrence must be a positive integer");
|
|
20
|
+
}
|
|
21
|
+
const commentId = await client.mutation(api.tasks.artifactComments.create, {
|
|
22
|
+
artifactId: parseId(artifactId, "artifactId"),
|
|
23
|
+
content: options.message,
|
|
24
|
+
anchorText: options.anchor,
|
|
25
|
+
...(occurrence !== undefined && { anchorOccurrence: occurrence }),
|
|
26
|
+
});
|
|
27
|
+
printOutput(outputMode, { commentId }, (value) => {
|
|
28
|
+
console.log(chalk.green(`Comment created: ${value.commentId}`));
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=add.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../../../../src/commands/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IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC7D,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE;YACzE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,YAAY,CAAC;YAC7C,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,UAAU,EAAE,OAAO,CAAC,MAAM;YAC1B,GAAG,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC;SAClE,CAAC,CAAC;QAEH,WAAW,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE;YAC/C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ArtifactCommentItem } from "./parsers.js";
|
|
2
|
+
export interface ArtifactCommentThread {
|
|
3
|
+
root: ArtifactCommentItem;
|
|
4
|
+
replies: ArtifactCommentItem[];
|
|
5
|
+
}
|
|
6
|
+
export declare function groupCommentThreads(comments: ArtifactCommentItem[]): ArtifactCommentThread[];
|
|
7
|
+
export declare function printCommentThreads(threads: ArtifactCommentThread[]): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
export function groupCommentThreads(comments) {
|
|
3
|
+
const repliesByParent = new Map();
|
|
4
|
+
for (const comment of comments) {
|
|
5
|
+
if (!comment.parentId)
|
|
6
|
+
continue;
|
|
7
|
+
const list = repliesByParent.get(comment.parentId) ?? [];
|
|
8
|
+
list.push(comment);
|
|
9
|
+
repliesByParent.set(comment.parentId, list);
|
|
10
|
+
}
|
|
11
|
+
return comments.filter((comment) => !comment.parentId).map((root) => ({ root, replies: repliesByParent.get(root._id) ?? [] }));
|
|
12
|
+
}
|
|
13
|
+
export function printCommentThreads(threads) {
|
|
14
|
+
if (threads.length === 0) {
|
|
15
|
+
console.log("No comments.");
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
for (const { root, replies } of threads) {
|
|
19
|
+
const status = root.status ?? "open";
|
|
20
|
+
const statusLabel = status === "resolved" ? chalk.green("[resolved]") : chalk.yellow("[open]");
|
|
21
|
+
console.log(`\n${statusLabel} ${chalk.bold(root.authorName)} ${chalk.dim(new Date(root.createdAt).toISOString())} ${chalk.dim(root._id)}`);
|
|
22
|
+
if (root.anchor?.text) {
|
|
23
|
+
console.log(chalk.dim(` > ${root.anchor.text}`));
|
|
24
|
+
}
|
|
25
|
+
console.log(` ${root.content}`);
|
|
26
|
+
for (const reply of replies) {
|
|
27
|
+
console.log(` ${chalk.dim("↳")} ${chalk.bold(reply.authorName)} ${chalk.dim(reply._id)}: ${reply.content}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
console.log();
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=formatters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../../../../src/commands/tasks/artifacts/comments/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,UAAU,mBAAmB,CAAC,QAA+B;IACjE,MAAM,eAAe,GAAG,IAAI,GAAG,EAAiC,CAAC;IACjE,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,QAAQ;YAAE,SAAS;QAChC,MAAM,IAAI,GAAG,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACzD,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnB,eAAe,CAAC,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;QACpD,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QACjC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/G,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,EAAE,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { listArtifactCommentsCommand } from "./list.js";
|
|
3
|
+
import { addArtifactCommentCommand } from "./add.js";
|
|
4
|
+
import { replyArtifactCommentCommand } from "./reply.js";
|
|
5
|
+
import { resolveArtifactCommentsCommand, unresolveArtifactCommentsCommand, } from "./resolve.js";
|
|
6
|
+
export const artifactCommentsCommand = new Command("comments")
|
|
7
|
+
.description("Artifact comment commands")
|
|
8
|
+
.addCommand(listArtifactCommentsCommand)
|
|
9
|
+
.addCommand(addArtifactCommentCommand)
|
|
10
|
+
.addCommand(replyArtifactCommentCommand)
|
|
11
|
+
.addCommand(resolveArtifactCommentsCommand)
|
|
12
|
+
.addCommand(unresolveArtifactCommentsCommand);
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/commands/tasks/artifacts/comments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,GACjC,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;KAC3D,WAAW,CAAC,2BAA2B,CAAC;KACxC,UAAU,CAAC,2BAA2B,CAAC;KACvC,UAAU,CAAC,yBAAyB,CAAC;KACrC,UAAU,CAAC,2BAA2B,CAAC;KACvC,UAAU,CAAC,8BAA8B,CAAC;KAC1C,UAAU,CAAC,gCAAgC,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { api } from "../../../../convex/_generated/api.js";
|
|
3
|
+
import { addGlobalOptions } from "../../../../cli.js";
|
|
4
|
+
import { parseId } from "../../../../lib/id.js";
|
|
5
|
+
import { runOneShotCommand } from "../../../../lib/one-shot-command.js";
|
|
6
|
+
import { addOutputOptions, printOutput, resolveOutputMode, } from "../../../../lib/output.js";
|
|
7
|
+
import { groupCommentThreads, printCommentThreads } from "./formatters.js";
|
|
8
|
+
import { parseCommentStatus } from "./parsers.js";
|
|
9
|
+
export const listArtifactCommentsCommand = addGlobalOptions(addOutputOptions(new Command("list")
|
|
10
|
+
.description("List an artifact's comment threads")
|
|
11
|
+
.argument("<artifactId>", "Artifact ID")
|
|
12
|
+
.option("--status <status>", "Only threads with this root status (open|resolved)"))).action(async (artifactId, options, cmd) => {
|
|
13
|
+
await runOneShotCommand(cmd, async ({ client }) => {
|
|
14
|
+
const outputMode = resolveOutputMode(options);
|
|
15
|
+
const status = options.status === undefined ? undefined : parseCommentStatus(options.status);
|
|
16
|
+
const comments = await client.query(api.tasks.artifactComments.listByArtifact, {
|
|
17
|
+
artifactId: parseId(artifactId, "artifactId"),
|
|
18
|
+
...(status !== undefined && { status }),
|
|
19
|
+
});
|
|
20
|
+
const threads = groupCommentThreads(comments);
|
|
21
|
+
printOutput(outputMode, threads, printCommentThreads);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../../src/commands/tasks/artifacts/comments/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,iBAAiB,GAElB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAMlD,MAAM,CAAC,MAAM,2BAA2B,GAAG,gBAAgB,CACzD,gBAAgB,CACd,IAAI,OAAO,CAAC,MAAM,CAAC;KAChB,WAAW,CAAC,oCAAoC,CAAC;KACjD,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC;KACvC,MAAM,CAAC,mBAAmB,EAAE,oDAAoD,CAAC,CACrF,CACF,CAAC,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,OAAoC,EAAE,GAAY,EAAE,EAAE;IACxF,MAAM,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAChD,MAAM,UAAU,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAE7F,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,cAAc,EAAE;YAC7E,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,YAAY,CAAC;YAC7C,GAAG,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;SACxC,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QAE9C,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FunctionReturnType } from "convex/server";
|
|
2
|
+
import type { api } from "../../../../convex/_generated/api.js";
|
|
3
|
+
export type ArtifactCommentItem = FunctionReturnType<typeof api.tasks.artifactComments.listByArtifact>[number];
|
|
4
|
+
export declare const COMMENT_STATUSES: readonly ["open", "resolved"];
|
|
5
|
+
export type ArtifactCommentStatus = (typeof COMMENT_STATUSES)[number];
|
|
6
|
+
export declare function parseCommentStatus(value: string): ArtifactCommentStatus;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const COMMENT_STATUSES = ["open", "resolved"];
|
|
2
|
+
export function parseCommentStatus(value) {
|
|
3
|
+
if (!COMMENT_STATUSES.includes(value)) {
|
|
4
|
+
throw new Error(`--status must be one of: ${COMMENT_STATUSES.join(", ")}`);
|
|
5
|
+
}
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=parsers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../../../../../src/commands/tasks/artifacts/comments/parsers.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,UAAU,CAAU,CAAC;AAG9D,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,IAAI,CAAE,gBAAsC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7D,MAAM,IAAI,KAAK,CAAC,4BAA4B,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,KAA8B,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { api } from "../../../../convex/_generated/api.js";
|
|
4
|
+
import { addGlobalOptions } from "../../../../cli.js";
|
|
5
|
+
import { parseId } from "../../../../lib/id.js";
|
|
6
|
+
import { runOneShotCommand } from "../../../../lib/one-shot-command.js";
|
|
7
|
+
import { addOutputOptions, printOutput, resolveOutputMode, } from "../../../../lib/output.js";
|
|
8
|
+
export const replyArtifactCommentCommand = addGlobalOptions(addOutputOptions(new Command("reply")
|
|
9
|
+
.description("Reply to a root artifact comment")
|
|
10
|
+
.argument("<commentId>", "Root comment ID to reply to")
|
|
11
|
+
.requiredOption("-m, --message <text>", "Reply body (markdown)"))).action(async (commentId, options, cmd) => {
|
|
12
|
+
await runOneShotCommand(cmd, async ({ client }) => {
|
|
13
|
+
const outputMode = resolveOutputMode(options);
|
|
14
|
+
const replyId = await client.mutation(api.tasks.artifactComments.reply, {
|
|
15
|
+
parentId: parseId(commentId, "commentId"),
|
|
16
|
+
content: options.message,
|
|
17
|
+
});
|
|
18
|
+
printOutput(outputMode, { commentId: replyId }, (value) => {
|
|
19
|
+
console.log(chalk.green(`Reply created: ${value.commentId}`));
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=reply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reply.js","sourceRoot":"","sources":["../../../../../../src/commands/tasks/artifacts/comments/reply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,E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CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { api } from "../../../../convex/_generated/api.js";
|
|
4
|
+
import { addGlobalOptions } from "../../../../cli.js";
|
|
5
|
+
import { parseId } from "../../../../lib/id.js";
|
|
6
|
+
import { runOneShotCommand } from "../../../../lib/one-shot-command.js";
|
|
7
|
+
import { addOutputOptions, printOutput, resolveOutputMode, } from "../../../../lib/output.js";
|
|
8
|
+
function makeStatusCommand(name, status, verb) {
|
|
9
|
+
return addGlobalOptions(addOutputOptions(new Command(name)
|
|
10
|
+
.description(`${verb} root artifact comments (atomic batch)`)
|
|
11
|
+
.argument("<commentIds...>", "Root comment IDs"))).action(async (commentIds, options, cmd) => {
|
|
12
|
+
await runOneShotCommand(cmd, async ({ client }) => {
|
|
13
|
+
const outputMode = resolveOutputMode(options);
|
|
14
|
+
await client.mutation(api.tasks.artifactComments.setStatus, {
|
|
15
|
+
commentIds: commentIds.map((id) => parseId(id, "commentId")),
|
|
16
|
+
status,
|
|
17
|
+
});
|
|
18
|
+
printOutput(outputMode, { commentIds, status }, (value) => {
|
|
19
|
+
console.log(chalk.green(`${verb}d ${value.commentIds.length} comment${value.commentIds.length === 1 ? "" : "s"}.`));
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export const resolveArtifactCommentsCommand = makeStatusCommand("resolve", "resolved", "Resolve");
|
|
25
|
+
export const unresolveArtifactCommentsCommand = makeStatusCommand("unresolve", "open", "Unresolve");
|
|
26
|
+
//# sourceMappingURL=resolve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../../../../../src/commands/tasks/artifacts/comments/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OA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AC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAC1F,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,8BAA8B,GAAG,iBAAiB,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;AAClG,MAAM,CAAC,MAAM,gCAAgC,GAAG,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { api } from "../../../convex/_generated/api.js";
|
|
4
|
+
import { addGlobalOptions } from "../../../cli.js";
|
|
5
|
+
import { parseId } from "../../../lib/id.js";
|
|
6
|
+
import { runOneShotCommand } from "../../../lib/one-shot-command.js";
|
|
7
|
+
import { addOutputOptions, printOutput, resolveOutputMode, } from "../../../lib/output.js";
|
|
8
|
+
import { resolveArtifactContent } from "./parsers.js";
|
|
9
|
+
const ARTIFACT_CONTENT_TYPES = ["markdown", "html"];
|
|
10
|
+
function parseContentType(value) {
|
|
11
|
+
if (value === undefined) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
if (!ARTIFACT_CONTENT_TYPES.includes(value)) {
|
|
15
|
+
throw new Error(`--content-type must be one of: ${ARTIFACT_CONTENT_TYPES.join(", ")}`);
|
|
16
|
+
}
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
export const createTaskArtifactCommand = addGlobalOptions(addOutputOptions(new Command("create")
|
|
20
|
+
.description("Create a document artifact (markdown or html) on a task")
|
|
21
|
+
.argument("<taskId>", "Task ID")
|
|
22
|
+
.requiredOption("--name <name>", "Artifact name")
|
|
23
|
+
.option("--content <content>", "Artifact content")
|
|
24
|
+
.option("--content-file <path>", "Read artifact content from a file")
|
|
25
|
+
.option("--content-type <type>", "Artifact content type: markdown or html (default: markdown)")
|
|
26
|
+
.option("--run-id <id>", "Optional run identifier"))).action(async (taskId, options, cmd) => {
|
|
27
|
+
await runOneShotCommand(cmd, async ({ client }) => {
|
|
28
|
+
const outputMode = resolveOutputMode(options);
|
|
29
|
+
const content = resolveArtifactContent(options, false);
|
|
30
|
+
const contentType = parseContentType(options.contentType);
|
|
31
|
+
const createArgs = {
|
|
32
|
+
taskId: parseId(taskId, "taskId"),
|
|
33
|
+
name: options.name,
|
|
34
|
+
};
|
|
35
|
+
if (content !== undefined) {
|
|
36
|
+
createArgs.content = content;
|
|
37
|
+
}
|
|
38
|
+
if (contentType !== undefined) {
|
|
39
|
+
createArgs.contentType = contentType;
|
|
40
|
+
}
|
|
41
|
+
if (options.runId !== undefined) {
|
|
42
|
+
createArgs.runId = options.runId;
|
|
43
|
+
}
|
|
44
|
+
const artifactId = await client.mutation(api.tasks.artifacts.createTaskArtifact, createArgs);
|
|
45
|
+
const artifact = await client.query(api.tasks.artifacts.getTaskArtifact, {
|
|
46
|
+
artifactId,
|
|
47
|
+
});
|
|
48
|
+
if (!artifact) {
|
|
49
|
+
throw new Error("Artifact created but could not be reloaded.");
|
|
50
|
+
}
|
|
51
|
+
const payload = {
|
|
52
|
+
artifactId,
|
|
53
|
+
artifact,
|
|
54
|
+
};
|
|
55
|
+
printOutput(outputMode, payload, (value) => {
|
|
56
|
+
console.log(chalk.green("✓") + " Artifact created");
|
|
57
|
+
console.log(` ${value.artifact.name}`);
|
|
58
|
+
console.log(` ID: ${value.artifactId}`);
|
|
59
|
+
console.log();
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/artifacts/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAA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C,KAAK,CAAC,GAAG,CAAC,GAAG,mBAAmB,CAAC,CAAC;YACpD,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;YACxC,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;YACzC,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { api } from "../../../convex/_generated/api.js";
|
|
4
|
+
import { addGlobalOptions } from "../../../cli.js";
|
|
5
|
+
import { parseId } from "../../../lib/id.js";
|
|
6
|
+
import { runOneShotCommand } from "../../../lib/one-shot-command.js";
|
|
7
|
+
import { addOutputOptions, printOutput, resolveOutputMode, } from "../../../lib/output.js";
|
|
8
|
+
export const deleteTaskArtifactCommand = addGlobalOptions(addOutputOptions(new Command("delete")
|
|
9
|
+
.description("Delete an artifact")
|
|
10
|
+
.argument("<artifactId>", "Artifact ID"))).action(async (artifactId, options, cmd) => {
|
|
11
|
+
await runOneShotCommand(cmd, async ({ client }) => {
|
|
12
|
+
const outputMode = resolveOutputMode(options);
|
|
13
|
+
const parsedArtifactId = parseId(artifactId, "artifactId");
|
|
14
|
+
await client.mutation(api.tasks.artifacts.deleteTaskArtifact, {
|
|
15
|
+
artifactId: parsedArtifactId,
|
|
16
|
+
});
|
|
17
|
+
const payload = {
|
|
18
|
+
artifactId: parsedArtifactId,
|
|
19
|
+
};
|
|
20
|
+
printOutput(outputMode, payload, () => {
|
|
21
|
+
console.log(chalk.green("✓") + " Artifact deleted");
|
|
22
|
+
console.log(` ID: ${parsedArtifactId}`);
|
|
23
|
+
console.log();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=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GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,mBAAmB,CAAC,CAAC;YACpD,OAAO,CAAC,GAAG,CAAC,SAAS,gBAAgB,EAAE,CAAC,CAAC;YACzC,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { api } from "../../../convex/_generated/api.js";
|
|
4
|
+
import { addGlobalOptions } from "../../../cli.js";
|
|
5
|
+
import { parseId } from "../../../lib/id.js";
|
|
6
|
+
import { runOneShotCommand } from "../../../lib/one-shot-command.js";
|
|
7
|
+
import { addOutputOptions, printOutput, resolveOutputMode, } from "../../../lib/output.js";
|
|
8
|
+
import { parseCommentStatus } from "./comments/parsers.js";
|
|
9
|
+
import { groupCommentThreads, printCommentThreads, } from "./comments/formatters.js";
|
|
10
|
+
export const getTaskArtifactCommand = addGlobalOptions(addOutputOptions(new Command("get")
|
|
11
|
+
.description("Get a document artifact by ID")
|
|
12
|
+
.argument("<artifactId>", "Artifact ID")
|
|
13
|
+
.option("--comments", "Include the artifact's comment threads")
|
|
14
|
+
.option("--comments-status <status>", "With --comments, only threads with this root status (open|resolved)"))).action(async (artifactId, options, cmd) => {
|
|
15
|
+
await runOneShotCommand(cmd, async ({ client }) => {
|
|
16
|
+
const outputMode = resolveOutputMode(options);
|
|
17
|
+
const id = parseId(artifactId, "artifactId");
|
|
18
|
+
const artifact = await client.query(api.tasks.artifacts.getTaskArtifact, {
|
|
19
|
+
artifactId: id,
|
|
20
|
+
});
|
|
21
|
+
if (!artifact) {
|
|
22
|
+
throw new Error("Artifact not found or not accessible.");
|
|
23
|
+
}
|
|
24
|
+
let threads;
|
|
25
|
+
if (options.comments) {
|
|
26
|
+
const status = options.commentsStatus === undefined
|
|
27
|
+
? undefined
|
|
28
|
+
: parseCommentStatus(options.commentsStatus);
|
|
29
|
+
const comments = await client.query(api.tasks.artifactComments.listByArtifact, {
|
|
30
|
+
artifactId: id,
|
|
31
|
+
...(status !== undefined && { status }),
|
|
32
|
+
});
|
|
33
|
+
threads = groupCommentThreads(comments);
|
|
34
|
+
}
|
|
35
|
+
printOutput(outputMode, threads === undefined ? artifact : { ...artifact, comments: threads }, (value) => {
|
|
36
|
+
console.log(chalk.bold(`\n${value.name}`));
|
|
37
|
+
console.log(` ID: ${value._id}`);
|
|
38
|
+
console.log(` Task ID: ${value.taskId}`);
|
|
39
|
+
console.log(` File: ${value.fileName}`);
|
|
40
|
+
console.log(` Type: ${value.contentType ?? "markdown"}`);
|
|
41
|
+
console.log(` Source: ${value.source}`);
|
|
42
|
+
console.log(` Run ID: ${value.runId ?? "None"}`);
|
|
43
|
+
console.log(` Updated: ${new Date(value.updatedAt).toISOString()}`);
|
|
44
|
+
console.log();
|
|
45
|
+
console.log(value.content.length > 0 ? value.content : "(empty)");
|
|
46
|
+
console.log();
|
|
47
|
+
if (threads !== undefined) {
|
|
48
|
+
console.log(chalk.bold(`Comments (${threads.length})`));
|
|
49
|
+
printCommentThreads(threads);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/artifacts/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CA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,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAClE,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC1B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACxD,mBAAmB,CAAC,OAAO,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { listTaskArtifactsCommand } from "./list.js";
|
|
3
|
+
import { getTaskArtifactCommand } from "./get.js";
|
|
4
|
+
import { createTaskArtifactCommand } from "./create.js";
|
|
5
|
+
import { updateTaskArtifactCommand } from "./update.js";
|
|
6
|
+
import { replaceTaskArtifactCommand } from "./replace.js";
|
|
7
|
+
import { deleteTaskArtifactCommand } from "./delete.js";
|
|
8
|
+
import { artifactCommentsCommand } from "./comments/index.js";
|
|
9
|
+
export const taskArtifactsCommand = new Command("artifacts")
|
|
10
|
+
.description("Task artifact commands")
|
|
11
|
+
.addCommand(listTaskArtifactsCommand)
|
|
12
|
+
.addCommand(getTaskArtifactCommand)
|
|
13
|
+
.addCommand(createTaskArtifactCommand)
|
|
14
|
+
.addCommand(updateTaskArtifactCommand)
|
|
15
|
+
.addCommand(replaceTaskArtifactCommand)
|
|
16
|
+
.addCommand(deleteTaskArtifactCommand)
|
|
17
|
+
.addCommand(artifactCommentsCommand);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/artifacts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC;KACzD,WAAW,CAAC,wBAAwB,CAAC;KACrC,UAAU,CAAC,wBAAwB,CAAC;KACpC,UAAU,CAAC,sBAAsB,CAAC;KAClC,UAAU,CAAC,yBAAyB,CAAC;KACrC,UAAU,CAAC,yBAAyB,CAAC;KACrC,UAAU,CAAC,0BAA0B,CAAC;KACtC,UAAU,CAAC,yBAAyB,CAAC;KACrC,UAAU,CAAC,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { api } from "../../../convex/_generated/api.js";
|
|
4
|
+
import { addGlobalOptions } from "../../../cli.js";
|
|
5
|
+
import { parseId } from "../../../lib/id.js";
|
|
6
|
+
import { runOneShotCommand } from "../../../lib/one-shot-command.js";
|
|
7
|
+
import { addOutputOptions, printOutput, resolveOutputMode, } from "../../../lib/output.js";
|
|
8
|
+
import { formatArtifactSummaryLine } from "../formatters.js";
|
|
9
|
+
export const listTaskArtifactsCommand = addGlobalOptions(addOutputOptions(new Command("list")
|
|
10
|
+
.description("List document artifacts for a task")
|
|
11
|
+
.argument("<taskId>", "Task ID"))).action(async (taskId, options, cmd) => {
|
|
12
|
+
await runOneShotCommand(cmd, async ({ client }) => {
|
|
13
|
+
const outputMode = resolveOutputMode(options);
|
|
14
|
+
const artifacts = await client.query(api.tasks.artifacts.listTaskArtifactsByTask, {
|
|
15
|
+
taskId: parseId(taskId, "taskId"),
|
|
16
|
+
});
|
|
17
|
+
printOutput(outputMode, artifacts, (value) => {
|
|
18
|
+
console.log(chalk.bold(`\nArtifacts for ${taskId}`));
|
|
19
|
+
if (value.length === 0) {
|
|
20
|
+
console.log(" (none)");
|
|
21
|
+
console.log();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
for (const artifact of value) {
|
|
25
|
+
console.log(` - ${formatArtifactSummaryLine(artifact)}`);
|
|
26
|
+
}
|
|
27
|
+
console.log();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/artifacts/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,iBAAiB,GAElB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAgB,CACtD,gBAAgB,CACd,IAAI,OAAO,CAAC,MAAM,CAAC;KAChB,WAAW,CAAC,oCAAoC,CAAC;KACjD,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,CACnC,CACF,CAAC,MAAM,CAAC,KAAK,EAAE,MAAc,EAAE,OAAiC,EAAE,GAAY,EAAE,EAAE;IACjF,MAAM,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAChD,MAAM,UAAU,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC9C,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,uBAAuB,EAAE;YAChF,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC;SAClC,CAAC,CAAC;QAEH,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;YAC3C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAC,CAAC;YACrD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBACxB,OAAO,CAAC,GAAG,EAAE,CAAC;gBACd,OAAO;YACT,CAAC;YAED,KAAK,MAAM,QAAQ,IAAI,KAAK,EAAE,CAAC;gBAC7B,OAAO,CAAC,GAAG,CAAC,OAAO,yBAAyB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC5D,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { OutputOptions } from "../../../lib/output.js";
|
|
2
|
+
export { resolveRequiredStringInput } from "../../../lib/text-input.js";
|
|
3
|
+
export interface ArtifactContentOptions extends OutputOptions {
|
|
4
|
+
content?: string;
|
|
5
|
+
contentFile?: string;
|
|
6
|
+
clearContent?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ArtifactRunIdOptions {
|
|
9
|
+
runId?: string;
|
|
10
|
+
clearRunId?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function resolveArtifactContent(options: ArtifactContentOptions, allowClear: boolean): string | undefined;
|
|
13
|
+
export declare function validateRunIdOptions(options: ArtifactRunIdOptions): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { readTextFile } from "../../../lib/text-input.js";
|
|
2
|
+
import { validateNoConflict } from "../parsers.js";
|
|
3
|
+
export { resolveRequiredStringInput } from "../../../lib/text-input.js";
|
|
4
|
+
export function resolveArtifactContent(options, allowClear) {
|
|
5
|
+
validateNoConflict(options.content !== undefined, options.contentFile !== undefined, "Cannot use --content and --content-file together");
|
|
6
|
+
if (allowClear) {
|
|
7
|
+
validateNoConflict(options.clearContent === true, options.content !== undefined, "Cannot use --content and --clear-content together");
|
|
8
|
+
validateNoConflict(options.clearContent === true, options.contentFile !== undefined, "Cannot use --content-file and --clear-content together");
|
|
9
|
+
}
|
|
10
|
+
if (options.content !== undefined) {
|
|
11
|
+
return options.content;
|
|
12
|
+
}
|
|
13
|
+
if (options.contentFile !== undefined) {
|
|
14
|
+
return readTextFile(options.contentFile, "content");
|
|
15
|
+
}
|
|
16
|
+
if (allowClear && options.clearContent === true) {
|
|
17
|
+
return "";
|
|
18
|
+
}
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
export function validateRunIdOptions(options) {
|
|
22
|
+
validateNoConflict(options.clearRunId === true, options.runId !== undefined, "Cannot use --run-id and --clear-run-id together");
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=parsers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/artifacts/parsers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAaxE,MAAM,UAAU,sBAAsB,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