@useconvoy/cli 0.123.6 → 0.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -23
- package/dist/bin/convoy.js +8 -0
- package/dist/bin/convoy.js.map +1 -1
- package/dist/marketplace/convoy/skills/convoy/SKILL.md +1 -1
- package/dist/src/agent/app/thread-processor.js +4 -1
- package/dist/src/agent/app/thread-processor.js.map +1 -1
- package/dist/src/agent/app/worktree-op-processor.js +13 -1
- package/dist/src/agent/app/worktree-op-processor.js.map +1 -1
- package/dist/src/agent/runtimes/agent-instructions.d.ts +2 -2
- package/dist/src/agent/runtimes/agent-instructions.js +5 -3
- package/dist/src/agent/runtimes/agent-instructions.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/models.d.ts +1 -1
- package/dist/src/agent/runtimes/claudeCode/models.js +1 -0
- package/dist/src/agent/runtimes/claudeCode/models.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/runner.d.ts +0 -4
- package/dist/src/agent/runtimes/claudeCode/runner.js +16 -18
- package/dist/src/agent/runtimes/claudeCode/runner.js.map +1 -1
- package/dist/src/agent/runtimes/codex/app-server-runner.d.ts +2 -0
- package/dist/src/agent/runtimes/codex/app-server-runner.js +143 -16
- package/dist/src/agent/runtimes/codex/app-server-runner.js.map +1 -1
- package/dist/src/agent/runtimes/codex/commands.d.ts +6 -2
- package/dist/src/agent/runtimes/codex/commands.js +11 -2
- package/dist/src/agent/runtimes/codex/commands.js.map +1 -1
- package/dist/src/agent/runtimes/codex/goals/index.d.ts +25 -0
- package/dist/src/agent/runtimes/codex/goals/index.js +137 -0
- package/dist/src/agent/runtimes/codex/goals/index.js.map +1 -0
- package/dist/src/agent/runtimes/codex/goals/parsers.d.ts +9 -0
- package/dist/src/agent/runtimes/codex/goals/parsers.js +47 -0
- package/dist/src/agent/runtimes/codex/goals/parsers.js.map +1 -0
- package/dist/src/agent/runtimes/codex/goals/validators.d.ts +28 -0
- package/dist/src/agent/runtimes/codex/goals/validators.js.map +1 -0
- package/dist/src/agent/runtimes/codex/lifecycle.d.ts +7 -0
- package/dist/src/agent/runtimes/codex/lifecycle.js +27 -0
- package/dist/src/agent/runtimes/codex/lifecycle.js.map +1 -1
- package/dist/src/agent/runtimes/contracts.d.ts +12 -1
- package/dist/src/agent/runtimes/cursor/models.js +1 -0
- package/dist/src/agent/runtimes/cursor/models.js.map +1 -1
- package/dist/src/agent/runtimes/message-format.js +8 -0
- package/dist/src/agent/runtimes/message-format.js.map +1 -1
- package/dist/src/agent/sdk/adapters/executable-resolution.d.ts +1 -0
- package/dist/src/agent/sdk/adapters/executable-resolution.js +1 -1
- package/dist/src/agent/sdk/adapters/executable-resolution.js.map +1 -1
- package/dist/src/cli.js +0 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/connect/prompts.d.ts +2 -0
- package/dist/src/commands/connect/prompts.js +6 -0
- package/dist/src/commands/connect/prompts.js.map +1 -0
- package/dist/src/commands/connect/workflow.d.ts +2 -0
- package/dist/src/commands/connect/workflow.js +63 -9
- package/dist/src/commands/connect/workflow.js.map +1 -1
- package/dist/src/commands/devcontainer/command.js +9 -1
- package/dist/src/commands/devcontainer/command.js.map +1 -1
- package/dist/src/commands/devcontainer/install.d.ts +9 -0
- package/dist/src/commands/devcontainer/install.js +38 -0
- package/dist/src/commands/devcontainer/install.js.map +1 -1
- package/dist/src/commands/environment/command.js +19 -9
- package/dist/src/commands/environment/command.js.map +1 -1
- package/dist/src/commands/environment/formatters.d.ts +11 -0
- package/dist/src/commands/environment/formatters.js +28 -0
- package/dist/src/commands/environment/formatters.js.map +1 -0
- package/dist/src/commands/environment/index.d.ts +0 -5
- package/dist/src/commands/environment/index.js +0 -7
- package/dist/src/commands/environment/index.js.map +1 -1
- package/dist/src/commands/environment/paths.d.ts +20 -1
- package/dist/src/commands/environment/paths.js +132 -3
- package/dist/src/commands/environment/paths.js.map +1 -1
- package/dist/src/commands/environment/projects.js +1 -1
- package/dist/src/commands/environment/projects.js.map +1 -1
- package/dist/src/commands/environment/resolution.d.ts +45 -1
- package/dist/src/commands/environment/resolution.js +138 -0
- package/dist/src/commands/environment/resolution.js.map +1 -1
- package/dist/src/commands/environment/validators.d.ts +71 -2
- package/dist/src/commands/environment/validators.js +20 -3
- package/dist/src/commands/environment/validators.js.map +1 -1
- package/dist/src/commands/environment/workflow.d.ts +19 -1
- package/dist/src/commands/environment/workflow.js +114 -16
- package/dist/src/commands/environment/workflow.js.map +1 -1
- package/dist/src/commands/init/prompts.js +3 -0
- package/dist/src/commands/init/prompts.js.map +1 -1
- package/dist/src/commands/keys/command.js +3 -2
- package/dist/src/commands/keys/command.js.map +1 -1
- package/dist/src/commands/keys/workflow.d.ts +1 -0
- package/dist/src/commands/keys/workflow.js +11 -6
- package/dist/src/commands/keys/workflow.js.map +1 -1
- package/dist/src/commands/project/command.js +9 -15
- package/dist/src/commands/project/command.js.map +1 -1
- package/dist/src/commands/project/formatters.d.ts +11 -2
- package/dist/src/commands/project/formatters.js +47 -15
- package/dist/src/commands/project/formatters.js.map +1 -1
- package/dist/src/commands/project/launcher.d.ts +23 -3
- package/dist/src/commands/project/launcher.js +152 -8
- package/dist/src/commands/project/launcher.js.map +1 -1
- package/dist/src/commands/project/validators.d.ts +46 -1
- package/dist/src/commands/project/validators.js +33 -2
- package/dist/src/commands/project/validators.js.map +1 -1
- package/dist/src/commands/project/worker.js +19 -17
- package/dist/src/commands/project/worker.js.map +1 -1
- package/dist/src/commands/project/workflow.d.ts +11 -26
- package/dist/src/commands/project/workflow.js +154 -50
- package/dist/src/commands/project/workflow.js.map +1 -1
- package/dist/src/commands/remote/command.js +17 -2
- package/dist/src/commands/remote/command.js.map +1 -1
- package/dist/src/commands/remote/ssh.d.ts +4 -1
- package/dist/src/commands/remote/ssh.js +5 -2
- package/dist/src/commands/remote/ssh.js.map +1 -1
- package/dist/src/commands/service/command.d.ts +1 -0
- package/dist/src/commands/service/command.js +59 -14
- package/dist/src/commands/service/command.js.map +1 -1
- package/dist/src/commands/service/formatters.d.ts +2 -0
- package/dist/src/commands/service/formatters.js +17 -0
- package/dist/src/commands/service/formatters.js.map +1 -1
- package/dist/src/commands/service/paths.d.ts +16 -0
- package/dist/src/commands/service/paths.js +178 -1
- package/dist/src/commands/service/paths.js.map +1 -1
- package/dist/src/commands/service/resolution.d.ts +2 -0
- package/dist/src/commands/service/resolution.js +40 -2
- package/dist/src/commands/service/resolution.js.map +1 -1
- package/dist/src/commands/service/server.js +1 -1
- package/dist/src/commands/service/server.js.map +1 -1
- package/dist/src/commands/service/service-entrypoint.js +38 -11
- package/dist/src/commands/service/service-entrypoint.js.map +1 -1
- package/dist/src/commands/service/validators.d.ts +21 -2
- package/dist/src/commands/service/validators.js +7 -5
- package/dist/src/commands/service/validators.js.map +1 -1
- package/dist/src/commands/service/workflow.js +10 -8
- package/dist/src/commands/service/workflow.js.map +1 -1
- package/dist/src/commands/setup/prompts.js +7 -4
- package/dist/src/commands/setup/prompts.js.map +1 -1
- package/dist/src/commands/setup/resolution.js +1 -1
- package/dist/src/commands/setup/resolution.js.map +1 -1
- package/dist/src/commands/tasks/artifacts/create.js +12 -4
- package/dist/src/commands/tasks/artifacts/create.js.map +1 -1
- package/dist/src/commands/tasks/artifacts/list.js +12 -4
- package/dist/src/commands/tasks/artifacts/list.js.map +1 -1
- package/dist/src/commands/tasks/artifacts/move.js +14 -13
- package/dist/src/commands/tasks/artifacts/move.js.map +1 -1
- package/dist/src/commands/tasks/get.js +6 -4
- package/dist/src/commands/tasks/get.js.map +1 -1
- package/dist/src/commands/tasks/update.js +42 -14
- package/dist/src/commands/tasks/update.js.map +1 -1
- package/dist/src/commands/threads/attach-pr.d.ts +2 -0
- package/dist/src/commands/threads/attach-pr.js +21 -0
- package/dist/src/commands/threads/attach-pr.js.map +1 -0
- package/dist/src/commands/threads/attach.d.ts +1 -1
- package/dist/src/commands/threads/attach.js +48 -5
- package/dist/src/commands/threads/attach.js.map +1 -1
- package/dist/src/commands/threads/checks.d.ts +3 -0
- package/dist/src/commands/threads/checks.js +47 -0
- package/dist/src/commands/threads/checks.js.map +1 -0
- package/dist/src/commands/threads/index.js +5 -1
- package/dist/src/commands/threads/index.js.map +1 -1
- package/dist/src/commands/tui/actions/app.js +10 -6
- package/dist/src/commands/tui/actions/app.js.map +1 -1
- package/dist/src/commands/tui/actions/workflow.js +13 -7
- package/dist/src/commands/tui/actions/workflow.js.map +1 -1
- package/dist/src/commands/tui/app.js +50 -29
- package/dist/src/commands/tui/app.js.map +1 -1
- package/dist/src/commands/tui/credentials/app.js +8 -6
- package/dist/src/commands/tui/credentials/app.js.map +1 -1
- package/dist/src/commands/tui/credentials/formatters.d.ts +1 -1
- package/dist/src/commands/tui/credentials/formatters.js +2 -2
- package/dist/src/commands/tui/credentials/formatters.js.map +1 -1
- package/dist/src/commands/tui/dialog/app.d.ts +4 -0
- package/dist/src/commands/tui/dialog/app.js +8 -1
- package/dist/src/commands/tui/dialog/app.js.map +1 -1
- package/dist/src/commands/tui/dialog/index.d.ts +1 -1
- package/dist/src/commands/tui/dialog/index.js +1 -1
- package/dist/src/commands/tui/dialog/index.js.map +1 -1
- package/dist/src/commands/tui/environments/app.js +18 -11
- package/dist/src/commands/tui/environments/app.js.map +1 -1
- package/dist/src/commands/tui/formatters.d.ts +7 -2
- package/dist/src/commands/tui/formatters.js +22 -6
- package/dist/src/commands/tui/formatters.js.map +1 -1
- package/dist/src/commands/tui/onboarding/app.js +60 -2
- package/dist/src/commands/tui/onboarding/app.js.map +1 -1
- package/dist/src/commands/tui/onboarding/runtime-access.js +1 -1
- package/dist/src/commands/tui/onboarding/runtime-access.js.map +1 -1
- package/dist/src/commands/tui/render.js +11 -2
- package/dist/src/commands/tui/render.js.map +1 -1
- package/dist/src/commands/tui/resolution.d.ts +10 -1
- package/dist/src/commands/tui/resolution.js +32 -14
- package/dist/src/commands/tui/resolution.js.map +1 -1
- package/dist/src/commands/tui/runtimes/app.d.ts +11 -0
- package/dist/src/commands/tui/runtimes/app.js +170 -0
- package/dist/src/commands/tui/runtimes/app.js.map +1 -0
- package/dist/src/commands/tui/runtimes/formatters.d.ts +10 -0
- package/dist/src/commands/tui/runtimes/formatters.js +16 -0
- package/dist/src/commands/tui/runtimes/formatters.js.map +1 -0
- package/dist/src/commands/tui/runtimes/index.d.ts +1 -0
- package/dist/src/commands/tui/runtimes/index.js +2 -0
- package/dist/src/commands/tui/runtimes/index.js.map +1 -0
- package/dist/src/commands/tui/validators.d.ts +2 -0
- package/dist/src/commands/tui/workflow.d.ts +11 -0
- package/dist/src/commands/tui/workflow.js +38 -7
- package/dist/src/commands/tui/workflow.js.map +1 -1
- package/dist/src/commands/update/prompts.js +1 -0
- package/dist/src/commands/update/prompts.js.map +1 -1
- package/dist/src/convex/_generated/ai/ai-files.state.json +3 -4
- package/dist/src/convex/_generated/api.d.ts +58 -0
- package/dist/src/convex/_generated/server.d.ts +25 -0
- package/dist/src/convex/_generated/server.js +8 -0
- package/dist/src/lib/config/credentials/resolution.d.ts +28 -2
- package/dist/src/lib/config/credentials/resolution.js +43 -24
- package/dist/src/lib/config/credentials/resolution.js.map +1 -1
- package/dist/src/lib/config/credentials/store.js +1 -1
- package/dist/src/lib/config/credentials/store.js.map +1 -1
- package/dist/src/lib/config/profile.js +32 -5
- package/dist/src/lib/config/profile.js.map +1 -1
- package/dist/src/lib/config/toml.js +2 -2
- package/dist/src/lib/config/toml.js.map +1 -1
- package/dist/src/lib/config/types.d.ts +4 -0
- package/dist/src/lib/config/types.js +4 -0
- package/dist/src/lib/config/types.js.map +1 -1
- package/dist/src/lib/connect-events.d.ts +1 -0
- package/dist/src/lib/git/index.d.ts +1 -1
- package/dist/src/lib/git/index.js +1 -1
- package/dist/src/lib/git/index.js.map +1 -1
- package/dist/src/lib/git/working-tree.d.ts +5 -0
- package/dist/src/lib/git/working-tree.js +18 -0
- package/dist/src/lib/git/working-tree.js.map +1 -1
- package/dist/src/lib/id.js +6 -1
- package/dist/src/lib/id.js.map +1 -1
- package/dist/src/lib/version.d.ts +3 -1
- package/dist/src/lib/version.js +17 -9
- package/dist/src/lib/version.js.map +1 -1
- package/dist/templates/devcontainer/Dockerfile +25 -18
- package/dist/templates/devcontainer/README.md +102 -20
- package/dist/templates/devcontainer/devcontainer.json +12 -6
- package/dist/templates/devcontainer/init-firewall.sh +13 -0
- package/dist/templates/project-isolation/Dockerfile +12 -5
- package/dist/templates/project-isolation/README.md +30 -15
- package/dist/templates/project-isolation/devcontainer.json +1 -1
- package/dist/templates/project-isolation/environment.py +52 -26
- package/dist/templates/project-isolation/environment.test.py +107 -21
- package/dist/templates/project-isolation/install.py +9 -5
- package/dist/templates/project-isolation/install.test.py +13 -0
- package/package.json +3 -4
- package/dist/src/commands/browser/command.d.ts +0 -2
- package/dist/src/commands/browser/command.js +0 -42
- package/dist/src/commands/browser/command.js.map +0 -1
- package/dist/src/commands/browser/smoke.d.ts +0 -10
- package/dist/src/commands/browser/smoke.js +0 -67
- package/dist/src/commands/browser/smoke.js.map +0 -1
- package/dist/src/commands/browser/validators.d.ts +0 -18
- package/dist/src/commands/browser/validators.js.map +0 -1
- package/dist/src/commands/browser/workflow.d.ts +0 -4
- package/dist/src/commands/browser/workflow.js +0 -92
- package/dist/src/commands/browser/workflow.js.map +0 -1
- /package/dist/src/{commands/browser → agent/runtimes/codex/goals}/validators.js +0 -0
|
@@ -71,6 +71,10 @@ export const ProfileSchema = z.object({
|
|
|
71
71
|
identity: z.string().regex(/^[a-f0-9]{64}$/),
|
|
72
72
|
organization_id: z.string().min(1),
|
|
73
73
|
}).optional(),
|
|
74
|
+
/** Registered shared project, run by the service without the launcher. Spec: docs/specs/cli-shared-environments.md */
|
|
75
|
+
project_mode: z.literal("shared").optional(),
|
|
76
|
+
/** Organization of a shared registration; its identity is computed from it. */
|
|
77
|
+
project_organization: z.string().min(1).optional(),
|
|
74
78
|
});
|
|
75
79
|
/** Profile field holding each runtime's key assignment. */
|
|
76
80
|
export const PROVIDER_KEY_FIELDS = {
|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AAC,OAAO,CAAC,EAAE,CAAC;IACzD,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,iBAAiB,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { GitCommandError, runGit, type GitResult } from "./exec.js";
|
|
2
2
|
export { capturePreRunCheckpoint, captureRunDiffSummary, checkpointRef, diffBetweenRefs, readFileAtRef, revertToCheckpoint, type FileAtRef, type FileDiff, type RunDiffFile, type RunDiffSummary, } from "./checkpoint.js";
|
|
3
3
|
export { clearWorkspaceFileIndexCache, searchWorkspaceFiles } from "./file-index.js";
|
|
4
|
-
export { diffWorkingTree, readWorkingFile, readWorkingFileBytes, revertWorkingFile } from "./working-tree.js";
|
|
4
|
+
export { diffWorkingTree, readWorkingFile, readWorkingFileBytes, revertWorkingFile, revertWorkingTree } from "./working-tree.js";
|
|
5
5
|
export { branchExists, getCurrentBranch, getDefaultBranch, getGitRemoteUrl, isWorkingTreeDirty, listBranchRefs, type BranchRef } from "./repo.js";
|
|
6
6
|
export { buildDefaultWorktreePath, createWorktree, listWorktrees, parseWorktreeList, removeWorktree, type CreateWorktreeInput, type CreateWorktreeResult, type WorktreeInfo, } from "./worktrees.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { GitCommandError, runGit } from "./exec.js";
|
|
2
2
|
export { capturePreRunCheckpoint, captureRunDiffSummary, checkpointRef, diffBetweenRefs, readFileAtRef, revertToCheckpoint, } from "./checkpoint.js";
|
|
3
3
|
export { clearWorkspaceFileIndexCache, searchWorkspaceFiles } from "./file-index.js";
|
|
4
|
-
export { diffWorkingTree, readWorkingFile, readWorkingFileBytes, revertWorkingFile } from "./working-tree.js";
|
|
4
|
+
export { diffWorkingTree, readWorkingFile, readWorkingFileBytes, revertWorkingFile, revertWorkingTree } from "./working-tree.js";
|
|
5
5
|
export { branchExists, getCurrentBranch, getDefaultBranch, getGitRemoteUrl, isWorkingTreeDirty, listBranchRefs } from "./repo.js";
|
|
6
6
|
export { buildDefaultWorktreePath, createWorktree, listWorktrees, parseWorktreeList, removeWorktree, } from "./worktrees.js";
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/git/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAkB,MAAM,WAAW,CAAC;AACpE,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,aAAa,EACb,kBAAkB,GAKnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/git/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAkB,MAAM,WAAW,CAAC;AACpE,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,aAAa,EACb,kBAAkB,GAKnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACjI,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,kBAAkB,EAAE,cAAc,EAAkB,MAAM,WAAW,CAAC;AAClJ,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,cAAc,GAIf,MAAM,gBAAgB,CAAC"}
|
|
@@ -19,3 +19,8 @@ export declare function diffWorkingTree(cwd: string): Promise<FileDiff>;
|
|
|
19
19
|
* from it, worktree and index; an untracked one is deleted. Not undoable.
|
|
20
20
|
*/
|
|
21
21
|
export declare function revertWorkingFile(cwd: string, filePath: string): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Discard the uncommitted changes of exactly `filePaths` (OS-2234). Every path
|
|
24
|
+
* is checked before any is touched; then each goes through `revertWorkingFile`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function revertWorkingTree(cwd: string, filePaths: readonly string[]): Promise<void>;
|
|
@@ -87,4 +87,22 @@ export async function revertWorkingFile(cwd, filePath) {
|
|
|
87
87
|
// Drop a staged index entry for the new file, if any.
|
|
88
88
|
await runGit(cwd, ["reset", "--quiet", "--", rel], { timeoutMs: CAPTURE_TIMEOUT_MS, allowNonZeroExit: true });
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Discard the uncommitted changes of exactly `filePaths` (OS-2234). Every path
|
|
92
|
+
* is checked before any is touched; then each goes through `revertWorkingFile`.
|
|
93
|
+
*/
|
|
94
|
+
export async function revertWorkingTree(cwd, filePaths) {
|
|
95
|
+
for (const filePath of filePaths) {
|
|
96
|
+
insidePath(cwd, filePath, "revert");
|
|
97
|
+
}
|
|
98
|
+
for (const filePath of filePaths) {
|
|
99
|
+
try {
|
|
100
|
+
await revertWorkingFile(cwd, filePath);
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
104
|
+
throw new Error(`Stopped at ${filePath}: ${message}`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
90
108
|
//# sourceMappingURL=working-tree.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"working-tree.js","sourceRoot":"","sources":["../../../../src/lib/git/working-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,E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AG,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;AAChH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,GAAW,EAAE,SAA4B;IAC/E,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,UAAU,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACtC,CAAC;IACD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,MAAM,iBAAiB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACzC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,MAAM,IAAI,KAAK,CAAC,cAAc,QAAQ,KAAK,OAAO,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/src/lib/id.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
const CONVEX_ID_PATTERN = /^[A-Za-z0-9_
|
|
1
|
+
const CONVEX_ID_PATTERN = /^[A-Za-z0-9_]+$/;
|
|
2
2
|
export function parseId(value, label) {
|
|
3
3
|
const trimmed = value.trim();
|
|
4
4
|
if (!trimmed) {
|
|
5
5
|
throw new Error(`${label} is required`);
|
|
6
6
|
}
|
|
7
|
+
// Convex IDs never contain a hyphen; production would redact the validator
|
|
8
|
+
// error to a bare "Server Error" (OS-2267).
|
|
9
|
+
if (trimmed.includes("-")) {
|
|
10
|
+
throw new Error(`${label} "${trimmed}" looks like a ref, not a Convex ID. Pass the document ID.`);
|
|
11
|
+
}
|
|
7
12
|
if (!CONVEX_ID_PATTERN.test(trimmed)) {
|
|
8
13
|
throw new Error(`${label} must be a valid Convex ID`);
|
|
9
14
|
}
|
package/dist/src/lib/id.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../../src/lib/id.ts"],"names":[],"mappings":"AAGA,MAAM,iBAAiB,GAAG,
|
|
1
|
+
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../../src/lib/id.ts"],"names":[],"mappings":"AAGA,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAE5C,MAAM,UAAU,OAAO,CACrB,KAAa,EACb,KAAa;IAEb,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,cAAc,CAAC,CAAC;IAC1C,CAAC;IAED,2EAA2E;IAC3E,4CAA4C;IAC5C,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,KAAK,OAAO,4DAA4D,CAAC,CAAC;IACpG,CAAC;IAED,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,4BAA4B,CAAC,CAAC;IACxD,CAAC;IAED,wEAAwE;IACxE,wEAAwE;IACxE,OAAO,OAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/** The @useconvoy/cli package
|
|
1
|
+
/** The @useconvoy/cli package folder, walking up from this module. */
|
|
2
|
+
export declare function cliPackageRoot(): string | undefined;
|
|
3
|
+
/** The @useconvoy/cli package version. */
|
|
2
4
|
export declare function getCliVersion(): string;
|
|
3
5
|
/**
|
|
4
6
|
* The npm `latest` version if it is newer than the running one, else null.
|
package/dist/src/lib/version.js
CHANGED
|
@@ -20,17 +20,21 @@ function readPackageVersion(packageJsonPath) {
|
|
|
20
20
|
}
|
|
21
21
|
return version;
|
|
22
22
|
}
|
|
23
|
-
/** The @useconvoy/cli package
|
|
24
|
-
export function
|
|
23
|
+
/** The @useconvoy/cli package folder, walking up from this module. */
|
|
24
|
+
export function cliPackageRoot() {
|
|
25
25
|
let dir = path.dirname(fileURLToPath(import.meta.url));
|
|
26
26
|
for (let depth = 0; depth < 5; depth += 1) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return version;
|
|
27
|
+
if (readPackageVersion(path.join(dir, "package.json"))) {
|
|
28
|
+
return dir;
|
|
30
29
|
}
|
|
31
30
|
dir = path.dirname(dir);
|
|
32
31
|
}
|
|
33
|
-
return
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
/** The @useconvoy/cli package version. */
|
|
35
|
+
export function getCliVersion() {
|
|
36
|
+
const root = cliPackageRoot();
|
|
37
|
+
return (root && readPackageVersion(path.join(root, "package.json"))) || "0.0.0";
|
|
34
38
|
}
|
|
35
39
|
/**
|
|
36
40
|
* The npm `latest` version if it is newer than the running one, else null.
|
|
@@ -38,10 +42,11 @@ export function getCliVersion() {
|
|
|
38
42
|
* See docs/specs/cli-update-notice.md.
|
|
39
43
|
*/
|
|
40
44
|
export async function checkForNewerVersion(timeoutMs = 1500) {
|
|
45
|
+
// AbortSignal.timeout does not keep the process alive; a stalled fetch would exit it (code 13).
|
|
46
|
+
const controller = new AbortController();
|
|
47
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
41
48
|
try {
|
|
42
|
-
const response = await fetch(NPM_LATEST_URL, {
|
|
43
|
-
signal: AbortSignal.timeout(timeoutMs),
|
|
44
|
-
});
|
|
49
|
+
const response = await fetch(NPM_LATEST_URL, { signal: controller.signal });
|
|
45
50
|
if (!response.ok) {
|
|
46
51
|
return null;
|
|
47
52
|
}
|
|
@@ -54,5 +59,8 @@ export async function checkForNewerVersion(timeoutMs = 1500) {
|
|
|
54
59
|
catch {
|
|
55
60
|
return null;
|
|
56
61
|
}
|
|
62
|
+
finally {
|
|
63
|
+
clearTimeout(timer);
|
|
64
|
+
}
|
|
57
65
|
}
|
|
58
66
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAE9E,MAAM,cAAc,GAAG,kDAAkD,CAAC;AAE1E,SAAS,kBAAkB,CAAC,eAAuB;IACjD,IAAI,WAAoB,CAAC;IAEzB,IAAI,CAAC;QACH,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;IACnE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,WAAW,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,WAAoD,CAAC;IAC/E,IAAI,IAAI,KAAK,gBAAgB,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC7D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CA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27
27
|
|
|
28
|
-
#
|
|
28
|
+
# Keep image tooling root-owned; only global npm installs belong to node.
|
|
29
29
|
RUN mkdir -p /usr/local/share/npm-global && \
|
|
30
|
-
chown -R node:node /usr/local/share
|
|
31
|
-
|
|
32
|
-
#
|
|
33
|
-
ARG
|
|
34
|
-
RUN
|
|
35
|
-
|
|
36
|
-
&&
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
chown -R node:node /usr/local/share/npm-global
|
|
31
|
+
|
|
32
|
+
# Browser tooling belongs to the image, independently of the Convoy package.
|
|
33
|
+
ARG PLAYWRIGHT_CLI_VERSION=0.1.21
|
|
34
|
+
RUN npm install --prefix /usr/local/lib/playwright-cli @playwright/cli@${PLAYWRIGHT_CLI_VERSION} \
|
|
35
|
+
&& ln -s /usr/local/lib/playwright-cli/node_modules/.bin/playwright-cli /usr/local/bin/playwright-cli \
|
|
36
|
+
&& PLAYWRIGHT_BROWSERS_PATH=/usr/local/share/ms-playwright \
|
|
37
|
+
/usr/local/lib/playwright-cli/node_modules/.bin/playwright install --with-deps chromium \
|
|
38
|
+
&& mkdir -p /usr/local/share/playwright-cli \
|
|
39
|
+
&& PLAYWRIGHT_BROWSERS_PATH=/usr/local/share/ms-playwright node -e 'const fs=require("node:fs"); const {chromium}=require("/usr/local/lib/playwright-cli/node_modules/playwright"); fs.writeFileSync("/usr/local/share/playwright-cli/config.json", JSON.stringify({browser:{browserName:"chromium",launchOptions:{executablePath:chromium.executablePath(),headless:true,chromiumSandbox:false}}}));' \
|
|
40
|
+
&& chmod -R go-w /usr/local/lib/playwright-cli /usr/local/share/playwright-cli /usr/local/share/ms-playwright \
|
|
41
|
+
&& chmod -R a+rX /usr/local/share/ms-playwright
|
|
40
42
|
|
|
41
43
|
ARG USERNAME=node
|
|
42
44
|
|
|
@@ -49,9 +51,13 @@ RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhisto
|
|
|
49
51
|
# Set `DEVCONTAINER` environment variable to help with orientation
|
|
50
52
|
ENV DEVCONTAINER=true
|
|
51
53
|
|
|
52
|
-
# Create workspace and config directories and set permissions
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
# Create workspace and config directories and set permissions. Named volumes
|
|
55
|
+
# copy these folders' owner and mode; Convoy refuses config or state wider than 0700.
|
|
56
|
+
# ~/.local must pre-exist owned by node: the ~/.local/share/opencode bind mount
|
|
57
|
+
# otherwise makes Docker create it as root, which breaks the cursor-agent installer.
|
|
58
|
+
RUN mkdir -p /workspace /home/node/.claude /home/node/.local/share /home/node/.local/bin /home/node/.config/convoy /home/node/.convoy && \
|
|
59
|
+
chown -R node:node /workspace /home/node/.claude /home/node/.local /home/node/.config /home/node/.convoy && \
|
|
60
|
+
chmod 700 /home/node/.config/convoy /home/node/.convoy
|
|
55
61
|
|
|
56
62
|
WORKDIR /workspace
|
|
57
63
|
|
|
@@ -92,8 +98,9 @@ RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/
|
|
|
92
98
|
# A `RUN npm install -g ...@latest` layer is cached, so every rebuild reinstates
|
|
93
99
|
# whatever version the first build happened to fetch. They install from
|
|
94
100
|
# `postCreateCommand` instead, which Docker never caches. cursor-agent lands in
|
|
95
|
-
# ~/.local/bin
|
|
96
|
-
|
|
101
|
+
# ~/.local/bin and opencode in ~/.opencode/bin. They go on the image PATH because
|
|
102
|
+
# the project service starts from postStartCommand, which reads no shell rc file.
|
|
103
|
+
ENV PATH=$PATH:/home/node/.local/bin:/home/node/.opencode/bin
|
|
97
104
|
|
|
98
105
|
# Copy and set up the firewall script
|
|
99
106
|
COPY init-firewall.sh /usr/local/bin/
|
|
@@ -106,7 +113,7 @@ USER root
|
|
|
106
113
|
RUN chmod +x /usr/local/bin/init-firewall.sh && \
|
|
107
114
|
printf '%s\n' \
|
|
108
115
|
'node ALL=(root) NOPASSWD: /usr/local/bin/init-firewall.sh' \
|
|
109
|
-
'Defaults env_keep += "CONVEX_DEPLOYMENT AWS_REGION DEVCONTAINER_EXTRA_ALLOWED_DOMAINS"' \
|
|
116
|
+
'Defaults env_keep += "CODEX_HOME CONVEX_DEPLOYMENT AWS_REGION DEVCONTAINER_EXTRA_ALLOWED_DOMAINS"' \
|
|
110
117
|
> /etc/sudoers.d/node-devcontainer && \
|
|
111
118
|
chmod 0440 /etc/sudoers.d/node-devcontainer
|
|
112
119
|
USER node
|
|
@@ -7,7 +7,8 @@ This is the distributable version of the [Convoy](https://convoy.build) dev cont
|
|
|
7
7
|
## What you get
|
|
8
8
|
|
|
9
9
|
- **Claude Code, Codex CLI, OpenCode CLI, and Cursor CLI** installed globally from `latest` on container create (via `postCreateCommand`, so rebuilds are never stuck on a cached image layer's versions)
|
|
10
|
-
- **Agent auth shared with the host** — log in once on the host, the container reuses `~/.codex`, `~/.cursor`, `~/.local/share/opencode
|
|
10
|
+
- **Agent auth shared with the host** — log in once on the host, the container reuses `~/.codex`, `~/.cursor`, `~/.local/share/opencode` and `~/.config/opencode`
|
|
11
|
+
- **Its own Convoy environment** — Convoy profiles, keys and the project service live in container volumes, not in the host's `~/.config/convoy`
|
|
11
12
|
- **Two network modes** — `strict` blocks all outbound traffic except a curated allowlist; `open` skips the firewall
|
|
12
13
|
- **Persistent shell history and Claude Code config** across container rebuilds (Docker volumes)
|
|
13
14
|
- zsh + powerlevel10k, fzf, git-delta, gh, jq, corepack (pnpm/yarn via project pin)
|
|
@@ -45,7 +46,7 @@ Everything is optional. The container pulls values from your host environment vi
|
|
|
45
46
|
| `AWS_BEARER_TOKEN_BEDROCK` | (unset) | Set to use Claude Code via AWS Bedrock |
|
|
46
47
|
| `CLAUDE_CODE_USE_BEDROCK` | (unset) | Set to `1` to route Claude Code through Bedrock |
|
|
47
48
|
| `AWS_REGION` | `us-east-1` | AWS region for the Bedrock firewall allowlist entry |
|
|
48
|
-
| `CONVEX_DEPLOYMENT` | (unset) | Convoy/Convex deployment slug — adds `$CONVEX_DEPLOYMENT.convex.site` and `.convex.cloud` to the allowlist |
|
|
49
|
+
| `CONVEX_DEPLOYMENT` | (unset) | Convoy/Convex deployment slug — adds `$CONVEX_DEPLOYMENT.convex.site` and `.convex.cloud` to the allowlist. In strict mode, set it before the first `convoy setup` in a new container |
|
|
49
50
|
|
|
50
51
|
Export them in your shell profile (`~/.zshrc` / `~/.bashrc`) **before** the container starts, then rebuild.
|
|
51
52
|
|
|
@@ -101,7 +102,7 @@ The firewall resolves allowed domains to IPs once at startup. Providers rotate I
|
|
|
101
102
|
- **Codex** — shared with the host via `~/.codex`. Run `codex login` on the host; the container reuses `~/.codex/auth.json`.
|
|
102
103
|
- **OpenCode** — shared with the host via `~/.local/share/opencode` (auth) and `~/.config/opencode` (config). Run `opencode auth login` on the host. Providers other than Anthropic/OpenAI need their API endpoints added to the allowlist in strict mode.
|
|
103
104
|
- **Cursor CLI** — shared with the host via `~/.cursor`. Run `cursor-agent login` on the host; the container reuses the stored credentials.
|
|
104
|
-
- **Convoy CLI** — profiles and API keys
|
|
105
|
+
- **Convoy CLI** — profiles and API keys live in a container volume. Run `convoy setup` inside the container once; see [Convoy connection setup](#convoy-connection-setup).
|
|
105
106
|
|
|
106
107
|
## Mounted volumes
|
|
107
108
|
|
|
@@ -113,7 +114,8 @@ The firewall resolves allowed domains to IPs once at startup. Providers rotate I
|
|
|
113
114
|
| `~/.cursor/` | `/home/node/.cursor/` | Cursor CLI auth and config (shared with host) |
|
|
114
115
|
| `~/.local/share/opencode/` | `/home/node/.local/share/opencode/` | OpenCode auth and sessions (shared with host) |
|
|
115
116
|
| `~/.config/opencode/` | `/home/node/.config/opencode/` | OpenCode configuration (shared with host) |
|
|
116
|
-
|
|
|
117
|
+
| (Docker volume) | `/home/node/.config/convoy` | Convoy CLI profiles, API keys and managed credentials |
|
|
118
|
+
| (Docker volume) | `/home/node/.convoy` | Convoy project service: socket, leases, logs, environment mode |
|
|
117
119
|
|
|
118
120
|
The container's `initializeCommand` creates the host directories automatically if they are missing.
|
|
119
121
|
|
|
@@ -132,19 +134,99 @@ and run your package manager's install inside the container after the first star
|
|
|
132
134
|
|
|
133
135
|
## Browser automation
|
|
134
136
|
|
|
135
|
-
The image
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
137
|
+
The image preinstalls a pinned upstream `@playwright/cli` release (the Dockerfile's
|
|
138
|
+
`PLAYWRIGHT_CLI_VERSION` build arg), matching Chromium and OS libraries. Use
|
|
139
|
+
`playwright-cli` on PATH, independently of the Convoy CLI.
|
|
140
|
+
The configuration below selects image-installed headless Chromium and explicitly
|
|
141
|
+
disables its inner sandbox inside this dedicated container. Container/project
|
|
142
|
+
isolation and the firewall remain in force. Do not copy this sandbox setting to
|
|
143
|
+
an ordinary host.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
playwright-cli -s=ui open --config=/usr/local/share/playwright-cli/config.json
|
|
147
|
+
playwright-cli -s=ui goto <url>
|
|
148
|
+
playwright-cli -s=ui set-color-scheme light
|
|
149
|
+
playwright-cli -s=ui screenshot --filename=/tmp/page-light.png
|
|
150
|
+
playwright-cli -s=ui set-color-scheme dark
|
|
151
|
+
playwright-cli -s=ui screenshot --filename=/tmp/page-dark.png
|
|
152
|
+
playwright-cli -s=ui close
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Run inside the private project shell or agent when using project isolation.
|
|
156
|
+
Use a unique session name for concurrent work and close that session when done.
|
|
157
|
+
Profiles and session state belong to the invoking project; no host profile is
|
|
158
|
+
imported. Color preference does not override a site's saved theme. Use upstream
|
|
159
|
+
click and scripting commands for application-specific controls.
|
|
160
|
+
|
|
161
|
+
Browser updates require an image rebuild. Updating Convoy does not install or
|
|
162
|
+
update browsers. CLI 0.128.0 removes all `convoy browser` commands; rewrite old
|
|
163
|
+
scripts to use the upstream CLI. Existing profiles are left untouched, without
|
|
164
|
+
automatic migration. A managed environment's legacy browser cache volume is no
|
|
165
|
+
longer mounted and goes away with `environment delete`.
|
|
166
|
+
|
|
167
|
+
## Convoy connection setup
|
|
168
|
+
|
|
169
|
+
The container installs the Convoy CLI and is its own Convoy environment. It does
|
|
170
|
+
not read the host's `~/.config/convoy`: profiles, keys and project service state
|
|
171
|
+
stay in two container volumes and survive rebuilds. The environment is
|
|
172
|
+
**shared**: every project runs as `node`, with the agent logins above, and
|
|
173
|
+
projects can read each other's files. The container itself is the boundary that
|
|
174
|
+
keeps agents away from your host.
|
|
175
|
+
|
|
176
|
+
Connect this checkout once, inside the container, in one of two ways:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# Background: the project service connects it right away and after every restart
|
|
180
|
+
convoy project add /workspace # prompts for backend, key and project
|
|
181
|
+
|
|
182
|
+
# Or foreground: an ordinary profile, connected while `convoy setup` runs
|
|
183
|
+
convoy setup
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Use one or the other: `project add` refuses a folder that an ordinary profile
|
|
187
|
+
already covers. Then run `convoy devcontainer --configure` to configure MCP.
|
|
188
|
+
|
|
189
|
+
In strict mode, the firewall must already allow your backend, so export
|
|
190
|
+
`CONVEX_DEPLOYMENT` (or `DEVCONTAINER_EXTRA_ALLOWED_DOMAINS` for a self-hosted
|
|
191
|
+
backend) on the host before the first start. `npx @useconvoy/cli devcontainer`
|
|
192
|
+
prints the value for your profile. After setup, restart the container so the
|
|
193
|
+
firewall also picks up the hosts of the selected profile.
|
|
194
|
+
|
|
195
|
+
Startup configures Convoy MCP in the container's private Codex config and
|
|
196
|
+
allowlists the selected backend. Host Codex settings remain unchanged. Start a
|
|
197
|
+
new agent after changing the profile. Export `CONVOY_PROFILE` on the host only
|
|
198
|
+
when you want to select a profile explicitly. Missing explicit profiles produce
|
|
199
|
+
an actionable error. With no Convoy account, startup prints a hint and the
|
|
200
|
+
container remains usable.
|
|
201
|
+
|
|
202
|
+
### The project service
|
|
203
|
+
|
|
204
|
+
The project service starts with every container start, after the firewall, even
|
|
205
|
+
before any project is registered. `convoy project add` hands a new project to it,
|
|
206
|
+
so no manual start is needed. If it cannot start, startup prints a `WARN:` line
|
|
207
|
+
and the container still comes up; fix the error and run `convoy service start -b`.
|
|
208
|
+
`convoy service status` and `convoy tui` (under Local) show the registered
|
|
209
|
+
projects. They use the agent logins from [Agent auth](#agent-auth): Codex,
|
|
210
|
+
Cursor and OpenCode reuse the host's, Claude Code logs in inside the container.
|
|
211
|
+
A login applies to every project. The service keeps the container's
|
|
212
|
+
`CODEX_HOME` and `CLAUDE_CONFIG_DIR` but not the Bedrock variables, so for Claude
|
|
213
|
+
Code on Bedrock under the service, store the token as a managed key:
|
|
214
|
+
`convoy keys add work-bedrock --provider bedrock --auth api-key --region us-east-1`,
|
|
215
|
+
then `convoy keys use work-bedrock --profile <profile> --runtime claude-code`. See [Persistent project service](https://docs.convoy.build/docs/cli/project-service)
|
|
216
|
+
for pause, reload, logs and checks. A service that crashes is not restarted until
|
|
217
|
+
the next container start.
|
|
218
|
+
|
|
219
|
+
### Migrating from the host config mount
|
|
220
|
+
|
|
221
|
+
Containers created from an older template bind-mount the host's `~/.config/convoy`
|
|
222
|
+
and keep it until you install the new template and rebuild:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
npx @useconvoy/cli devcontainer --force
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
`--force` overwrites `.devcontainer/`, so reapply your own edits afterwards.
|
|
229
|
+
Then run **Dev Containers: Rebuild Container** and connect the checkout as above. The
|
|
230
|
+
host config and its profiles are untouched; the container no longer sees them.
|
|
231
|
+
Do not add the bind mount back: a container service would then register
|
|
232
|
+
container paths such as `/workspace` in the host's `config.toml`.
|
|
@@ -42,11 +42,15 @@
|
|
|
42
42
|
"source=${localEnv:HOME}/.cursor,target=/home/node/.cursor,type=bind,consistency=cached",
|
|
43
43
|
"source=${localEnv:HOME}/.local/share/opencode,target=/home/node/.local/share/opencode,type=bind,consistency=cached",
|
|
44
44
|
"source=${localEnv:HOME}/.config/opencode,target=/home/node/.config/opencode,type=bind,consistency=cached",
|
|
45
|
-
//
|
|
46
|
-
"source
|
|
45
|
+
// Convoy profiles, keys and service state stay in the container: it is its own shared environment
|
|
46
|
+
"source=agent-sandbox-convoy-config-${devcontainerId},target=/home/node/.config/convoy,type=volume",
|
|
47
|
+
"source=agent-sandbox-convoy-state-${devcontainerId},target=/home/node/.convoy,type=volume"
|
|
47
48
|
],
|
|
48
49
|
"containerEnv": {
|
|
49
50
|
"DEVCONTAINER_NETWORK_MODE": "${localEnv:DEVCONTAINER_NETWORK_MODE:strict}",
|
|
51
|
+
"CONVOY_PROFILE": "${localEnv:CONVOY_PROFILE}",
|
|
52
|
+
"CONVOY_HOST_WORKSPACE": "${localWorkspaceFolder}",
|
|
53
|
+
"CONVOY_CONTAINER_WORKSPACE": "/workspace",
|
|
50
54
|
"NODE_OPTIONS": "--max-old-space-size=4096",
|
|
51
55
|
"CLAUDE_CONFIG_DIR": "/home/node/.claude",
|
|
52
56
|
"POWERLEVEL9K_DISABLE_GITSTATUS": "true",
|
|
@@ -74,19 +78,21 @@
|
|
|
74
78
|
},
|
|
75
79
|
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=delegated",
|
|
76
80
|
"workspaceFolder": "/workspace",
|
|
77
|
-
"initializeCommand": "mkdir -p \"${localEnv:HOME}/.codex\" \"${localEnv:HOME}/.cursor\" \"${localEnv:HOME}/.local/share/opencode\" \"${localEnv:HOME}/.config/opencode\"
|
|
81
|
+
"initializeCommand": "mkdir -p \"${localEnv:HOME}/.codex\" \"${localEnv:HOME}/.cursor\" \"${localEnv:HOME}/.local/share/opencode\" \"${localEnv:HOME}/.config/opencode\"",
|
|
78
82
|
// Agent CLIs install here, not in the Dockerfile: Docker caches a
|
|
79
83
|
// `RUN npm install -g ...@latest` layer forever, so rebuilds silently keep the
|
|
80
84
|
// first build's versions. postCreateCommand runs once per container create,
|
|
81
85
|
// uncached and before the firewall, so it always resolves the real `latest`.
|
|
82
86
|
// The $CODEX_HOME symlinks are (re)created here because /home/node/.codex-local
|
|
83
87
|
// lives on the container filesystem and does not survive a rebuild. Only
|
|
84
|
-
// state_5.sqlite stays container-private;
|
|
88
|
+
// state_5.sqlite stays container-private; startup also copies config locally. Codex
|
|
85
89
|
// falls back to scanning it by thread id when the db has no row, so threads
|
|
86
90
|
// started on either side remain resumable. `rm -rf` on the sessions path is
|
|
87
91
|
// load-bearing: `ln -sfn` onto an existing real directory nests the link
|
|
88
92
|
// inside it (sessions/sessions) instead of replacing it.
|
|
89
|
-
"postCreateCommand": "npm install -g @anthropic-ai/claude-code@latest @openai/codex@latest opencode
|
|
90
|
-
|
|
93
|
+
"postCreateCommand": "npm install -g @useconvoy/cli@latest @anthropic-ai/claude-code@latest @openai/codex@latest && curl -fsSL https://opencode.ai/install | bash && curl -fsSL https://cursor.com/install | bash && mkdir -p \"$CODEX_HOME\" && rm -rf \"$CODEX_HOME/sessions\" && ln -sfn /home/node/.codex/sessions \"$CODEX_HOME/sessions\" && ln -sfn /home/node/.codex/auth.json \"$CODEX_HOME/auth.json\" && ln -sfn /home/node/.codex/config.toml \"$CODEX_HOME/config.toml\"",
|
|
94
|
+
// The Convoy project service starts last, once the firewall is up, even with no
|
|
95
|
+
// projects yet: `convoy project add` then connects a new project to it live.
|
|
96
|
+
"postStartCommand": "convoy devcontainer --configure; { cmp -s /usr/local/share/convoy-devcontainer/Dockerfile .devcontainer/Dockerfile && cmp -s /usr/local/bin/init-firewall.sh .devcontainer/init-firewall.sh; } || echo \"WARN: this container's image is older than .devcontainer/. Rebuild the container.\" >&2; if [ \"$DEVCONTAINER_NETWORK_MODE\" = \"strict\" ]; then sudo /usr/local/bin/init-firewall.sh; else echo \"Skipping firewall setup (DEVCONTAINER_NETWORK_MODE=$DEVCONTAINER_NETWORK_MODE)\"; fi; convoy service start -b || echo \"WARN: the Convoy project service did not start. Fix the error above, then run convoy service start -b.\" >&2",
|
|
91
97
|
"waitFor": "postStartCommand"
|
|
92
98
|
}
|
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
set -euo pipefail # Exit on error, undefined vars, and pipeline failures
|
|
3
3
|
IFS=$'\n\t' # Stricter word splitting
|
|
4
4
|
|
|
5
|
+
# The CLI writes hostnames only; never source a user-writable shell file as root.
|
|
6
|
+
add_convoy_domains() {
|
|
7
|
+
local file="${CODEX_HOME:-}/convoy-domains" domain
|
|
8
|
+
[ -r "$file" ] || return 0
|
|
9
|
+
while IFS= read -r domain; do
|
|
10
|
+
if [[ "$domain" =~ ^[a-zA-Z0-9][a-zA-Z0-9.-]*$ ]]; then
|
|
11
|
+
ALLOWED_DOMAINS+=("$domain")
|
|
12
|
+
fi
|
|
13
|
+
done < "$file"
|
|
14
|
+
}
|
|
15
|
+
|
|
5
16
|
resolve_ipv4_records() {
|
|
6
17
|
local domain="$1"
|
|
7
18
|
|
|
@@ -134,6 +145,8 @@ ALLOWED_DOMAINS=(
|
|
|
134
145
|
)
|
|
135
146
|
|
|
136
147
|
# Optional: Convoy/Convex backend (set CONVEX_DEPLOYMENT on the host to enable)
|
|
148
|
+
add_convoy_domains
|
|
149
|
+
|
|
137
150
|
if [ -n "${CONVEX_DEPLOYMENT:-}" ]; then
|
|
138
151
|
ALLOWED_DOMAINS+=(
|
|
139
152
|
"${CONVEX_DEPLOYMENT}.convex.site"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
FROM node:22-bookworm
|
|
2
2
|
ARG CONVOY_VERSION
|
|
3
3
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
4
|
-
python3 bubblewrap sudo git util-linux procps ca-certificates iptables ipset iproute2 dnsutils aggregate jq \
|
|
4
|
+
python3 bubblewrap sudo git gh util-linux procps ca-certificates iptables ipset iproute2 dnsutils aggregate jq \
|
|
5
5
|
&& rm -rf /var/lib/apt/lists/*
|
|
6
6
|
RUN npm install --prefix /opt/convoy @useconvoy/cli@${CONVOY_VERSION} \
|
|
7
7
|
&& npm install -g @anthropic-ai/claude-code @openai/codex@0.156.1 opencode-ai@1.19.5 \
|
|
@@ -19,10 +19,17 @@ RUN case "$(dpkg --print-architecture)" in \
|
|
|
19
19
|
&& tar --no-same-owner --strip-components=1 -xzf /tmp/cursor-agent.tgz -C /usr/local/lib/cursor-agent \
|
|
20
20
|
&& rm /tmp/cursor-agent.tgz && chmod -R go-w /usr/local/lib/cursor-agent \
|
|
21
21
|
&& ln -s /usr/local/lib/cursor-agent/cursor-agent /usr/local/bin/cursor-agent
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
&&
|
|
22
|
+
# Browser tooling belongs to the image, independently of the Convoy package.
|
|
23
|
+
ARG PLAYWRIGHT_CLI_VERSION=0.1.21
|
|
24
|
+
RUN npm install --prefix /usr/local/lib/playwright-cli @playwright/cli@${PLAYWRIGHT_CLI_VERSION} \
|
|
25
|
+
&& ln -s /usr/local/lib/playwright-cli/node_modules/.bin/playwright-cli /usr/local/bin/playwright-cli \
|
|
26
|
+
&& PLAYWRIGHT_BROWSERS_PATH=/usr/local/share/ms-playwright \
|
|
27
|
+
/usr/local/lib/playwright-cli/node_modules/.bin/playwright install --with-deps chromium \
|
|
28
|
+
&& mkdir -p /usr/local/share/playwright-cli \
|
|
29
|
+
&& PLAYWRIGHT_BROWSERS_PATH=/usr/local/share/ms-playwright node -e 'const fs=require("node:fs"); const {chromium}=require("/usr/local/lib/playwright-cli/node_modules/playwright"); fs.writeFileSync("/usr/local/share/playwright-cli/config.json", JSON.stringify({browser:{browserName:"chromium",launchOptions:{executablePath:chromium.executablePath(),headless:true,chromiumSandbox:false}}}));' \
|
|
30
|
+
&& chmod -R go-w /usr/local/lib/playwright-cli /usr/local/share/playwright-cli /usr/local/share/ms-playwright \
|
|
31
|
+
&& chmod -R a+rX /usr/local/share/ms-playwright
|
|
32
|
+
|
|
26
33
|
COPY launcher.py install.py /usr/local/share/convoy-projects/
|
|
27
34
|
COPY start.sh /usr/local/libexec/convoy-project-start
|
|
28
35
|
COPY init-firewall.sh /usr/local/bin/init-firewall.sh
|