@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,62 @@
|
|
|
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 { resolveRequiredStringInput } from "./parsers.js";
|
|
9
|
+
export const replaceTaskArtifactCommand = addGlobalOptions(addOutputOptions(new Command("replace")
|
|
10
|
+
.description("Replace an exact string in artifact content")
|
|
11
|
+
.argument("<artifactId>", "Artifact ID")
|
|
12
|
+
.option("--old-string <text>", "Exact existing string to replace")
|
|
13
|
+
.option("--old-string-file <path>", "Read exact existing string from a file")
|
|
14
|
+
.option("--new-string <text>", "Replacement string")
|
|
15
|
+
.option("--new-string-file <path>", "Read replacement string from a file")
|
|
16
|
+
.option("--replace-all", "Replace every occurrence"))).action(async (artifactId, options, cmd) => {
|
|
17
|
+
await runOneShotCommand(cmd, async ({ client }) => {
|
|
18
|
+
const outputMode = resolveOutputMode(options);
|
|
19
|
+
const oldString = resolveRequiredStringInput({
|
|
20
|
+
inlineValue: options.oldString,
|
|
21
|
+
filePath: options.oldStringFile,
|
|
22
|
+
inlineLabel: "--old-string",
|
|
23
|
+
fileLabel: "--old-string-file",
|
|
24
|
+
displayName: "old string",
|
|
25
|
+
});
|
|
26
|
+
const newString = resolveRequiredStringInput({
|
|
27
|
+
inlineValue: options.newString,
|
|
28
|
+
filePath: options.newStringFile,
|
|
29
|
+
inlineLabel: "--new-string",
|
|
30
|
+
fileLabel: "--new-string-file",
|
|
31
|
+
displayName: "new string",
|
|
32
|
+
});
|
|
33
|
+
if (oldString.length === 0) {
|
|
34
|
+
throw new Error("oldString must be non-empty.");
|
|
35
|
+
}
|
|
36
|
+
const parsedArtifactId = parseId(artifactId, "artifactId");
|
|
37
|
+
const mutationArgs = {
|
|
38
|
+
artifactId: parsedArtifactId,
|
|
39
|
+
oldString,
|
|
40
|
+
newString,
|
|
41
|
+
replaceAll: options.replaceAll === true,
|
|
42
|
+
};
|
|
43
|
+
await client.mutation(api.tasks.artifacts.replaceInTaskArtifact, mutationArgs);
|
|
44
|
+
const artifact = await client.query(api.tasks.artifacts.getTaskArtifact, {
|
|
45
|
+
artifactId: parsedArtifactId,
|
|
46
|
+
});
|
|
47
|
+
if (!artifact) {
|
|
48
|
+
throw new Error("Artifact updated but could not be reloaded.");
|
|
49
|
+
}
|
|
50
|
+
const payload = {
|
|
51
|
+
artifactId: parsedArtifactId,
|
|
52
|
+
artifact,
|
|
53
|
+
};
|
|
54
|
+
printOutput(outputMode, payload, (value) => {
|
|
55
|
+
console.log(chalk.green("✓") + " Artifact updated");
|
|
56
|
+
console.log(` ${value.artifact.name}`);
|
|
57
|
+
console.log(` ID: ${value.artifactId}`);
|
|
58
|
+
console.log();
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=replace.js.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,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,55 @@
|
|
|
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, validateRunIdOptions } from "./parsers.js";
|
|
9
|
+
export const updateTaskArtifactCommand = addGlobalOptions(addOutputOptions(new Command("update")
|
|
10
|
+
.description("Update artifact fields")
|
|
11
|
+
.argument("<artifactId>", "Artifact ID")
|
|
12
|
+
.option("--name <name>", "Artifact name")
|
|
13
|
+
.option("--content <content>", "Artifact content")
|
|
14
|
+
.option("--content-file <path>", "Read artifact content from a file")
|
|
15
|
+
.option("--clear-content", "Clear artifact content")
|
|
16
|
+
.option("--run-id <id>", "Optional run identifier")
|
|
17
|
+
.option("--clear-run-id", "Clear run identifier"))).action(async (artifactId, options, cmd) => {
|
|
18
|
+
await runOneShotCommand(cmd, async ({ client }) => {
|
|
19
|
+
const outputMode = resolveOutputMode(options);
|
|
20
|
+
const content = resolveArtifactContent(options, true);
|
|
21
|
+
validateRunIdOptions(options);
|
|
22
|
+
const updates = {
|
|
23
|
+
...(options.name !== undefined && { name: options.name }),
|
|
24
|
+
...(content !== undefined && { content }),
|
|
25
|
+
...(options.runId !== undefined && { runId: options.runId }),
|
|
26
|
+
...(options.clearRunId === true && { runId: null }),
|
|
27
|
+
};
|
|
28
|
+
if (Object.keys(updates).length === 0) {
|
|
29
|
+
throw new Error("No updates provided. Pass at least one field to change.");
|
|
30
|
+
}
|
|
31
|
+
const parsedArtifactId = parseId(artifactId, "artifactId");
|
|
32
|
+
const mutationArgs = {
|
|
33
|
+
artifactId: parsedArtifactId,
|
|
34
|
+
...updates,
|
|
35
|
+
};
|
|
36
|
+
await client.mutation(api.tasks.artifacts.updateTaskArtifact, mutationArgs);
|
|
37
|
+
const artifact = await client.query(api.tasks.artifacts.getTaskArtifact, {
|
|
38
|
+
artifactId: parsedArtifactId,
|
|
39
|
+
});
|
|
40
|
+
if (!artifact) {
|
|
41
|
+
throw new Error("Artifact updated but could not be reloaded.");
|
|
42
|
+
}
|
|
43
|
+
const payload = {
|
|
44
|
+
artifactId: parsedArtifactId,
|
|
45
|
+
artifact,
|
|
46
|
+
};
|
|
47
|
+
printOutput(outputMode, payload, (value) => {
|
|
48
|
+
console.log(chalk.green("✓") + " Artifact updated");
|
|
49
|
+
console.log(` ${value.artifact.name}`);
|
|
50
|
+
console.log(` ID: ${value.artifactId}`);
|
|
51
|
+
console.log();
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/artifacts/update.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;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,M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ACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { addGlobalOptions } from "../../cli.js";
|
|
4
|
+
import { runOneShotCommand } from "../../lib/one-shot-command.js";
|
|
5
|
+
import { addOutputOptions, printOutput, resolveOutputMode } from "../../lib/output.js";
|
|
6
|
+
import { formatFileSize } from "./attachments/formatters.js";
|
|
7
|
+
import { resolveTaskIdForAttachmentCommand } from "./attachments/resolve.js";
|
|
8
|
+
import { uploadTaskAttachmentFile } from "./attachments/transfer.js";
|
|
9
|
+
function getErrorMessage(error) {
|
|
10
|
+
return error instanceof Error ? error.message : String(error);
|
|
11
|
+
}
|
|
12
|
+
export const attachTaskCommand = addGlobalOptions(addOutputOptions(new Command("attach")
|
|
13
|
+
.description("Upload one or more files to a task")
|
|
14
|
+
.argument("<taskId>", "Task ID or ref")
|
|
15
|
+
.argument("<files...>", "Files to upload")
|
|
16
|
+
.option("--org <org>", "Organization ID or slug (used with --project alias)"))).action(async (taskId, files, options, cmd) => {
|
|
17
|
+
await runOneShotCommand(cmd, async ({ client, config }) => {
|
|
18
|
+
const outputMode = resolveOutputMode(options);
|
|
19
|
+
const resolvedTaskId = await resolveTaskIdForAttachmentCommand({
|
|
20
|
+
client,
|
|
21
|
+
config,
|
|
22
|
+
cmd,
|
|
23
|
+
taskIdOrRef: taskId,
|
|
24
|
+
org: options.org,
|
|
25
|
+
});
|
|
26
|
+
const uploads = [];
|
|
27
|
+
const failures = [];
|
|
28
|
+
for (const file of files) {
|
|
29
|
+
try {
|
|
30
|
+
uploads.push(await uploadTaskAttachmentFile(client, resolvedTaskId, file));
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
failures.push({
|
|
34
|
+
file,
|
|
35
|
+
error: getErrorMessage(error),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const payload = {
|
|
40
|
+
taskId: resolvedTaskId,
|
|
41
|
+
attachments: uploads,
|
|
42
|
+
failures,
|
|
43
|
+
};
|
|
44
|
+
printOutput(outputMode, payload, (value) => {
|
|
45
|
+
if (value.failures.length === 0) {
|
|
46
|
+
console.log(chalk.green("✓") + ` Uploaded ${value.attachments.length} attachment(s)`);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
console.log(chalk.yellow("!") + ` Uploaded ${value.attachments.length} attachment(s), ${value.failures.length} failed`);
|
|
50
|
+
}
|
|
51
|
+
if (value.attachments.length > 0) {
|
|
52
|
+
console.log(" Uploaded:");
|
|
53
|
+
for (const attachment of value.attachments) {
|
|
54
|
+
console.log(` - ${attachment.fileName} (${attachment.attachmentId}) ${formatFileSize(attachment.fileSize)} ${attachment.contentType}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (value.failures.length > 0) {
|
|
58
|
+
console.log(" Failed:");
|
|
59
|
+
for (const failure of value.failures) {
|
|
60
|
+
console.log(` - ${failure.file}: ${failure.error}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
console.log();
|
|
64
|
+
});
|
|
65
|
+
if (failures.length > 0) {
|
|
66
|
+
process.exitCode = 1;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=attach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attach.js","sourceRoot":"","sources":["../../../../src/commands/tasks/attach.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAsB,MAAM,qBAAqB,CAAC;AAC3G,OAAO,EAAE,cAAc,EAAE,M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,EAAE,CAAC;oBACrC,OAAO,CAAC,GAAG,CAAC,SAAS,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;gBACzD,CAAC;YACH,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { confirm } from "@inquirer/prompts";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import { api } from "../../../convex/_generated/api.js";
|
|
5
|
+
import { addGlobalOptions } from "../../../cli.js";
|
|
6
|
+
import { parseId } from "../../../lib/id.js";
|
|
7
|
+
import { runOneShotCommand } from "../../../lib/one-shot-command.js";
|
|
8
|
+
import { addOutputOptions, printOutput, resolveOutputMode } from "../../../lib/output.js";
|
|
9
|
+
import { findTaskAttachment, listTaskAttachments, resolveTaskIdForAttachmentCommand } from "./resolve.js";
|
|
10
|
+
export const deleteTaskAttachmentCommand = addGlobalOptions(addOutputOptions(new Command("delete")
|
|
11
|
+
.description("Delete a task file attachment")
|
|
12
|
+
.argument("<taskId>", "Task ID or ref")
|
|
13
|
+
.argument("<attachmentId>", "Attachment ID")
|
|
14
|
+
.option("--org <org>", "Organization ID or slug (used with --project alias)")
|
|
15
|
+
.option("-y, --yes", "Skip confirmation"))).action(async (taskId, attachmentId, options, cmd) => {
|
|
16
|
+
await runOneShotCommand(cmd, async ({ client, config }) => {
|
|
17
|
+
const outputMode = resolveOutputMode(options);
|
|
18
|
+
const resolvedTaskId = await resolveTaskIdForAttachmentCommand({
|
|
19
|
+
client,
|
|
20
|
+
config,
|
|
21
|
+
cmd,
|
|
22
|
+
taskIdOrRef: taskId,
|
|
23
|
+
org: options.org,
|
|
24
|
+
});
|
|
25
|
+
const parsedAttachmentId = parseId(attachmentId, "attachmentId");
|
|
26
|
+
const attachments = await listTaskAttachments(client, resolvedTaskId);
|
|
27
|
+
const attachment = findTaskAttachment(attachments, parsedAttachmentId);
|
|
28
|
+
if (!options.yes) {
|
|
29
|
+
const shouldDelete = await confirm({
|
|
30
|
+
message: `Delete attachment "${attachment.fileName}"?`,
|
|
31
|
+
default: false,
|
|
32
|
+
});
|
|
33
|
+
if (!shouldDelete) {
|
|
34
|
+
const payload = {
|
|
35
|
+
taskId: resolvedTaskId,
|
|
36
|
+
attachmentId: parsedAttachmentId,
|
|
37
|
+
deleted: false,
|
|
38
|
+
};
|
|
39
|
+
printOutput(outputMode, payload, () => {
|
|
40
|
+
console.log(chalk.dim("\nCancelled."));
|
|
41
|
+
console.log();
|
|
42
|
+
});
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
await client.mutation(api.tasks.attachments.deleteTaskAttachment, {
|
|
47
|
+
attachmentId: parsedAttachmentId,
|
|
48
|
+
});
|
|
49
|
+
const payload = {
|
|
50
|
+
taskId: resolvedTaskId,
|
|
51
|
+
attachmentId: parsedAttachmentId,
|
|
52
|
+
deleted: true,
|
|
53
|
+
};
|
|
54
|
+
printOutput(outputMode, payload, (value) => {
|
|
55
|
+
console.log(chalk.green("✓") + " Attachment deleted");
|
|
56
|
+
console.log(` ID: ${value.attachmentId}`);
|
|
57
|
+
console.log();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/attachments/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK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AAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { addGlobalOptions } from "../../../cli.js";
|
|
4
|
+
import { parseId } from "../../../lib/id.js";
|
|
5
|
+
import { runOneShotCommand } from "../../../lib/one-shot-command.js";
|
|
6
|
+
import { printOutput, resolveOutputMode } from "../../../lib/output.js";
|
|
7
|
+
import { downloadTaskAttachment } from "./transfer.js";
|
|
8
|
+
import { findTaskAttachment, listTaskAttachments, resolveTaskIdForAttachmentCommand } from "./resolve.js";
|
|
9
|
+
export const downloadTaskAttachmentCommand = addGlobalOptions(new Command("download")
|
|
10
|
+
.description("Download a task file attachment")
|
|
11
|
+
.argument("<taskId>", "Task ID or ref")
|
|
12
|
+
.argument("<attachmentId>", "Attachment ID")
|
|
13
|
+
.option("--org <org>", "Organization ID or slug (used with --project alias)")
|
|
14
|
+
.option("--output <path>", "Output file path (default: current directory with original filename)")
|
|
15
|
+
.option("--json", "Print JSON output")).action(async (taskId, attachmentId, options, cmd) => {
|
|
16
|
+
await runOneShotCommand(cmd, async ({ client, config }) => {
|
|
17
|
+
const outputMode = resolveOutputMode({ json: options.json });
|
|
18
|
+
const resolvedTaskId = await resolveTaskIdForAttachmentCommand({
|
|
19
|
+
client,
|
|
20
|
+
config,
|
|
21
|
+
cmd,
|
|
22
|
+
taskIdOrRef: taskId,
|
|
23
|
+
org: options.org,
|
|
24
|
+
});
|
|
25
|
+
const parsedAttachmentId = parseId(attachmentId, "attachmentId");
|
|
26
|
+
const attachments = await listTaskAttachments(client, resolvedTaskId);
|
|
27
|
+
const attachment = findTaskAttachment(attachments, parsedAttachmentId);
|
|
28
|
+
const outputPath = await downloadTaskAttachment(attachment, options.output);
|
|
29
|
+
const payload = {
|
|
30
|
+
taskId: resolvedTaskId,
|
|
31
|
+
attachmentId: parsedAttachmentId,
|
|
32
|
+
outputPath,
|
|
33
|
+
};
|
|
34
|
+
printOutput(outputMode, payload, (value) => {
|
|
35
|
+
console.log(chalk.green("✓") + " Attachment downloaded");
|
|
36
|
+
console.log(` ID: ${value.attachmentId}`);
|
|
37
|
+
console.log(` Path: ${value.outputPath}`);
|
|
38
|
+
console.log();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=download.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/attachments/download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,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,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,iCAAiC,EAAE,MAAM,cAAc,CAAC;AAQ1G,MAAM,CAAC,MAAM,6BAA6B,GAAG,gBAAgB,CAC3D,IAAI,OAAO,CAAC,UAAU,CAAC;KACpB,WAAW,CAAC,iCAAiC,CAAC;KAC9C,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;KACtC,QAAQ,CAAC,gBAAgB,EAAE,eAAe,CAAC;KAC3C,MAAM,CAAC,aAAa,EAAE,qDAAqD,CAAC;KAC5E,MAAM,CAAC,iBAAiB,EAAE,sEAAsE,CAAC;KACjG,MAAM,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CACzC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAc,EAAE,YAAoB,EAAE,OAAsC,EAAE,GAAY,EAAE,EAAE;IAC5G,MAAM,iBAAiB,CA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|
|
3
|
+
export type TaskAttachmentSummary = FunctionReturnType<typeof api.tasks.attachments.listTaskAttachmentsByTask>[number];
|
|
4
|
+
export declare function formatFileSize(bytes: number): string;
|
|
5
|
+
export declare function formatAttachmentSummaryLine(attachment: TaskAttachmentSummary): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function formatFileSize(bytes) {
|
|
2
|
+
if (bytes < 1024) {
|
|
3
|
+
return `${bytes} B`;
|
|
4
|
+
}
|
|
5
|
+
const units = ["KB", "MB", "GB", "TB"];
|
|
6
|
+
let value = bytes / 1024;
|
|
7
|
+
let unitIndex = 0;
|
|
8
|
+
while (value >= 1024 && unitIndex < units.length - 1) {
|
|
9
|
+
value /= 1024;
|
|
10
|
+
unitIndex += 1;
|
|
11
|
+
}
|
|
12
|
+
return `${value.toFixed(value >= 10 ? 0 : 1)} ${units[unitIndex]}`;
|
|
13
|
+
}
|
|
14
|
+
export function formatAttachmentSummaryLine(attachment) {
|
|
15
|
+
const uploadedAt = new Date(attachment.uploadedAt).toISOString();
|
|
16
|
+
return `${attachment.fileName} (${attachment._id}) ${formatFileSize(attachment.fileSize)} ${attachment.contentType} uploaded=${uploadedAt}`;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=formatters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/attachments/formatters.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,IAAI,KAAK,GAAG,IAAI,EAAE,CAAC;QACjB,OAAO,GAAG,KAAK,IAAI,CAAC;IACtB,CAAC;IAED,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACvC,IAAI,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;IACzB,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,OAAO,KAAK,IAAI,IAAI,IAAI,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrD,KAAK,IAAI,IAAI,CAAC;QACd,SAAS,IAAI,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,UAAiC;IAC3E,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IACjE,OAAO,GAAG,UAAU,CAAC,QAAQ,KAAK,UAAU,CAAC,GAAG,KAAK,cAAc,CACjE,UAAU,CAAC,QAAQ,CACpB,IAAI,UAAU,CAAC,WAAW,aAAa,UAAU,EAAE,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { listTaskAttachmentsCommand } from "./list.js";
|
|
3
|
+
import { downloadTaskAttachmentCommand } from "./download.js";
|
|
4
|
+
import { deleteTaskAttachmentCommand } from "./delete.js";
|
|
5
|
+
export const taskAttachmentsCommand = new Command("attachments")
|
|
6
|
+
.alias("attachment")
|
|
7
|
+
.description("Task attachment commands")
|
|
8
|
+
.addCommand(listTaskAttachmentsCommand)
|
|
9
|
+
.addCommand(downloadTaskAttachmentCommand)
|
|
10
|
+
.addCommand(deleteTaskAttachmentCommand);
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/attachments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,OAAO,CAAC,aAAa,CAAC;KAC7D,KAAK,CAAC,YAAY,CAAC;KACnB,WAAW,CAAC,0BAA0B,CAAC;KACvC,UAAU,CAAC,0BAA0B,CAAC;KACtC,UAAU,CAAC,6BAA6B,CAAC;KACzC,UAAU,CAAC,2BAA2B,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { addGlobalOptions } from "../../../cli.js";
|
|
4
|
+
import { runOneShotCommand } from "../../../lib/one-shot-command.js";
|
|
5
|
+
import { addOutputOptions, printOutput, resolveOutputMode } from "../../../lib/output.js";
|
|
6
|
+
import { formatAttachmentSummaryLine } from "./formatters.js";
|
|
7
|
+
import { listTaskAttachments, resolveTaskIdForAttachmentCommand } from "./resolve.js";
|
|
8
|
+
export const listTaskAttachmentsCommand = addGlobalOptions(addOutputOptions(new Command("list")
|
|
9
|
+
.description("List task file attachments")
|
|
10
|
+
.argument("<taskId>", "Task ID or ref")
|
|
11
|
+
.option("--org <org>", "Organization ID or slug (used with --project alias)"))).action(async (taskId, options, cmd) => {
|
|
12
|
+
await runOneShotCommand(cmd, async ({ client, config }) => {
|
|
13
|
+
const outputMode = resolveOutputMode(options);
|
|
14
|
+
const resolvedTaskId = await resolveTaskIdForAttachmentCommand({
|
|
15
|
+
client,
|
|
16
|
+
config,
|
|
17
|
+
cmd,
|
|
18
|
+
taskIdOrRef: taskId,
|
|
19
|
+
org: options.org,
|
|
20
|
+
});
|
|
21
|
+
const attachments = await listTaskAttachments(client, resolvedTaskId);
|
|
22
|
+
printOutput(outputMode, attachments, (value) => {
|
|
23
|
+
console.log(chalk.bold(`\nAttachments for ${taskId}`));
|
|
24
|
+
if (value.length === 0) {
|
|
25
|
+
console.log(" (none)");
|
|
26
|
+
console.log();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
for (const attachment of value) {
|
|
30
|
+
console.log(` - ${formatAttachmentSummaryLine(attachment)}`);
|
|
31
|
+
}
|
|
32
|
+
console.log();
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/attachments/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAsB,MAAM,wBAAwB,CAAC;AAC9G,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,iCAAiC,EAAE,MAAM,cAAc,CAAC;AAMtF,MAAM,CAAC,MAAM,0BAA0B,GAAG,gBAAgB,CACxD,gBAAgB,CACd,IAAI,OAAO,CAAC,MAAM,CAAC;KAChB,WAAW,CAAC,4BAA4B,CAAC;KACzC,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;KACtC,MAAM,CAAC,aAAa,EAAE,qDAAqD,CAAC,CAChF,CACF,CAAC,MAAM,CAAC,KAAK,EAAE,MAAc,EAAE,OAAmC,EAAE,GAAY,EAAE,EAAE;IACnF,MAAM,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE;QACxD,MAAM,UAAU,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC9C,MAAM,cAAc,GAAG,MAAM,iCAAiC,CAAC;YAC7D,MAAM;YACN,MAAM;YACN,GAAG;YACH,WAAW,EAAE,MAAM;YACnB,GAAG,EAAE,OAAO,CAAC,GAAG;SACjB,CAAC,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,mBAAmB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QAEtE,WAAW,CAAC,UAAU,EAAE,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAqB,MAAM,EAAE,CAAC,CAAC,CAAC;YACvD,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,UAAU,IAAI,KAAK,EAAE,CAAC;gBAC/B,OAAO,CAAC,GAAG,CAAC,OAAO,2BAA2B,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAChE,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Id } from "../../../convex/_generated/dataModel.js";
|
|
2
|
+
import type { OpenSanaClient } from "../../../lib/config/index.js";
|
|
3
|
+
import type { TaskAttachmentSummary } from "./formatters.js";
|
|
4
|
+
export { resolveTaskIdForCommand as resolveTaskIdForAttachmentCommand, } from "../resolve.js";
|
|
5
|
+
export declare function listTaskAttachments(client: OpenSanaClient, taskId: Id<"tasks">): Promise<TaskAttachmentSummary[]>;
|
|
6
|
+
export declare function findTaskAttachment(attachments: TaskAttachmentSummary[], attachmentId: Id<"taskAttachments">): TaskAttachmentSummary;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { api } from "../../../convex/_generated/api.js";
|
|
2
|
+
export { resolveTaskIdForCommand as resolveTaskIdForAttachmentCommand, } from "../resolve.js";
|
|
3
|
+
export async function listTaskAttachments(client, taskId) {
|
|
4
|
+
return client.query(api.tasks.attachments.listTaskAttachmentsByTask, {
|
|
5
|
+
taskId,
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export function findTaskAttachment(attachments, attachmentId) {
|
|
9
|
+
const attachment = attachments.find((item) => item._id === attachmentId);
|
|
10
|
+
if (!attachment) {
|
|
11
|
+
throw new Error("Attachment not found on task.");
|
|
12
|
+
}
|
|
13
|
+
return attachment;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=resolve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/attachments/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAKxD,OAAO,EACL,uBAAuB,IAAI,iCAAiC,GAC7D,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,MAAsB,EAAE,MAAmB;IACnF,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,yBAAyB,EAAE;QACnE,MAAM;KACP,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,WAAoC,EAAE,YAAmC;IAC1G,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK,YAAY,CAAC,CAAC;IACzE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Id } from "../../../convex/_generated/dataModel.js";
|
|
2
|
+
import type { OpenSanaClient } from "../../../lib/config/index.js";
|
|
3
|
+
import type { TaskAttachmentSummary } from "./formatters.js";
|
|
4
|
+
export declare function uploadTaskAttachmentFile(client: OpenSanaClient, taskId: Id<"tasks">, filePath: string): Promise<{
|
|
5
|
+
attachmentId: Id<"taskAttachments">;
|
|
6
|
+
storageId: Id<"_storage">;
|
|
7
|
+
fileName: string;
|
|
8
|
+
fileSize: number;
|
|
9
|
+
contentType: string;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function downloadTaskAttachment(attachment: TaskAttachmentSummary, outputPath: string | undefined): Promise<string>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { mkdir, readFile, stat, writeFile } from "node:fs/promises";
|
|
3
|
+
import ora from "ora";
|
|
4
|
+
import { api } from "../../../convex/_generated/api.js";
|
|
5
|
+
import { getContentType } from "../../../lib/content-type.js";
|
|
6
|
+
function isUploadResponse(value) {
|
|
7
|
+
return typeof value === "object" && value !== null && typeof Reflect.get(value, "storageId") === "string";
|
|
8
|
+
}
|
|
9
|
+
export async function uploadTaskAttachmentFile(client, taskId, filePath) {
|
|
10
|
+
const absolutePath = path.resolve(filePath);
|
|
11
|
+
const fileStat = await stat(absolutePath);
|
|
12
|
+
if (!fileStat.isFile()) {
|
|
13
|
+
throw new Error(`${filePath} is not a file.`);
|
|
14
|
+
}
|
|
15
|
+
const fileName = path.basename(absolutePath);
|
|
16
|
+
const fileSize = fileStat.size;
|
|
17
|
+
const contentType = getContentType(absolutePath);
|
|
18
|
+
const spinner = ora(`Uploading ${fileName}`).start();
|
|
19
|
+
try {
|
|
20
|
+
const uploadUrl = await client.mutation(api.tasks.attachments.generateTaskAttachmentUploadUrl, {});
|
|
21
|
+
const fileBuffer = await readFile(absolutePath);
|
|
22
|
+
const uploadResult = await fetch(uploadUrl, {
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers: { "Content-Type": contentType },
|
|
25
|
+
body: fileBuffer,
|
|
26
|
+
});
|
|
27
|
+
if (!uploadResult.ok) {
|
|
28
|
+
const errorText = await uploadResult.text();
|
|
29
|
+
throw new Error(`Upload failed: ${uploadResult.status} - ${errorText}`);
|
|
30
|
+
}
|
|
31
|
+
const json = await uploadResult.json();
|
|
32
|
+
if (!isUploadResponse(json)) {
|
|
33
|
+
throw new Error("Upload response did not include a storageId.");
|
|
34
|
+
}
|
|
35
|
+
const attachmentId = await client.mutation(api.tasks.attachments.saveTaskAttachment, {
|
|
36
|
+
taskId,
|
|
37
|
+
storageId: json.storageId,
|
|
38
|
+
fileName,
|
|
39
|
+
fileSize,
|
|
40
|
+
contentType,
|
|
41
|
+
});
|
|
42
|
+
spinner.succeed(`Uploaded ${fileName}`);
|
|
43
|
+
return {
|
|
44
|
+
attachmentId,
|
|
45
|
+
storageId: json.storageId,
|
|
46
|
+
fileName,
|
|
47
|
+
fileSize,
|
|
48
|
+
contentType,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
spinner.fail(`Failed to upload ${fileName}`);
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export async function downloadTaskAttachment(attachment, outputPath) {
|
|
57
|
+
if (!attachment.url) {
|
|
58
|
+
throw new Error("Attachment does not have a download URL.");
|
|
59
|
+
}
|
|
60
|
+
const response = await fetch(attachment.url);
|
|
61
|
+
if (!response.ok) {
|
|
62
|
+
const errorText = await response.text();
|
|
63
|
+
throw new Error(`Download failed: ${response.status} - ${errorText}`);
|
|
64
|
+
}
|
|
65
|
+
const targetPath = outputPath ? path.resolve(outputPath) : path.resolve(process.cwd(), attachment.fileName);
|
|
66
|
+
await mkdir(path.dirname(targetPath), { recursive: true });
|
|
67
|
+
const bytes = Buffer.from(await response.arrayBuffer());
|
|
68
|
+
await writeFile(targetPath, bytes);
|
|
69
|
+
return targetPath;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=transfer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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,UAAiC,EAAE,UAA8B;IAC5G,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,oBAAoB,QAAQ,CAAC,MAAM,MAAM,SAAS,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC5G,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IACxD,MAAM,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACnC,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { resolveRequiredStringInput } from "../../../lib/text-input.js";
|
|
8
|
+
import { resolveTaskIdForCommand } from "../resolve.js";
|
|
9
|
+
export const addTaskCommentCommand = addGlobalOptions(addOutputOptions(new Command("add")
|
|
10
|
+
.description("Create a markdown comment on a task")
|
|
11
|
+
.argument("<taskId>", "Task ID or ref")
|
|
12
|
+
.option("--org <org>", "Organization ID or slug (used with --project alias)")
|
|
13
|
+
.option("-m, --message <text>", "Comment body (markdown)")
|
|
14
|
+
.option("--message-file <path>", "Read the comment body from a file"))).action(async (taskId, options, cmd) => {
|
|
15
|
+
await runOneShotCommand(cmd, async ({ client, config }) => {
|
|
16
|
+
const outputMode = resolveOutputMode(options);
|
|
17
|
+
const content = resolveRequiredStringInput({
|
|
18
|
+
inlineValue: options.message,
|
|
19
|
+
filePath: options.messageFile,
|
|
20
|
+
inlineLabel: "--message",
|
|
21
|
+
fileLabel: "--message-file",
|
|
22
|
+
displayName: "message",
|
|
23
|
+
}).trim();
|
|
24
|
+
if (content.length === 0) {
|
|
25
|
+
throw new Error("Comment content must be non-empty.");
|
|
26
|
+
}
|
|
27
|
+
const resolvedTaskId = await resolveTaskIdForCommand({
|
|
28
|
+
client,
|
|
29
|
+
config,
|
|
30
|
+
cmd,
|
|
31
|
+
taskIdOrRef: taskId,
|
|
32
|
+
org: options.org,
|
|
33
|
+
});
|
|
34
|
+
const commentId = await client.mutation(api.tasks.comments.create, {
|
|
35
|
+
taskId: resolvedTaskId,
|
|
36
|
+
content,
|
|
37
|
+
});
|
|
38
|
+
printOutput(outputMode, { taskId: resolvedTaskId, commentId }, (value) => {
|
|
39
|
+
console.log(chalk.green("✓") + " Task comment created");
|
|
40
|
+
console.log(` Comment ID: ${value.commentId}`);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=add.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../../../src/commands/tasks/comments/add.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,O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