@useconvoy/cli 0.49.3 → 0.53.2
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/dist/src/agent/app/thread-processor.d.ts +6 -6
- package/dist/src/agent/app/thread-processor.js +31 -31
- package/dist/src/agent/app/thread-processor.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/runner.js +72 -1
- package/dist/src/agent/runtimes/claudeCode/runner.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/runtime.js +6 -6
- package/dist/src/agent/runtimes/claudeCode/runtime.js.map +1 -1
- package/dist/src/agent/runtimes/codex/app-server-runner.js +1 -1
- package/dist/src/agent/runtimes/codex/app-server-runner.js.map +1 -1
- package/dist/src/agent/runtimes/codex/runtime.d.ts +4 -4
- package/dist/src/agent/runtimes/codex/runtime.js +4 -4
- package/dist/src/agent/runtimes/codex/runtime.js.map +1 -1
- package/dist/src/agent/runtimes/contracts.d.ts +6 -6
- package/dist/src/agent/runtimes/cursor/models.d.ts +2 -5
- package/dist/src/agent/runtimes/cursor/models.js +58 -6
- package/dist/src/agent/runtimes/cursor/models.js.map +1 -1
- package/dist/src/agent/runtimes/cursor/runtime.js +3 -3
- package/dist/src/agent/runtimes/cursor/runtime.js.map +1 -1
- package/dist/src/agent/runtimes/message-format.js +1 -1
- package/dist/src/agent/runtimes/message-format.js.map +1 -1
- package/dist/src/agent/runtimes/opencode/runtime.d.ts +3 -3
- package/dist/src/agent/runtimes/opencode/runtime.js +3 -3
- package/dist/src/agent/runtimes/opencode/runtime.js.map +1 -1
- package/dist/src/agent/runtimes/opencode/server.d.ts +1 -1
- package/dist/src/agent/runtimes/opencode/server.js +1 -1
- package/dist/src/agent/runtimes/registry.d.ts +2 -2
- package/dist/src/agent/runtimes/registry.js +2 -2
- package/dist/src/agent/runtimes/registry.js.map +1 -1
- package/dist/src/cli.js +2 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/connect/workflow.js +22 -3
- package/dist/src/commands/connect/workflow.js.map +1 -1
- package/dist/src/commands/prompts/create.js +6 -7
- package/dist/src/commands/prompts/create.js.map +1 -1
- package/dist/src/commands/prompts/list.js +3 -4
- package/dist/src/commands/prompts/list.js.map +1 -1
- package/dist/src/commands/skills/create.d.ts +2 -0
- package/dist/src/commands/skills/create.js +52 -0
- package/dist/src/commands/skills/create.js.map +1 -0
- package/dist/src/commands/skills/formatters.d.ts +4 -0
- package/dist/src/commands/skills/formatters.js +7 -0
- package/dist/src/commands/skills/formatters.js.map +1 -0
- package/dist/src/commands/skills/index.d.ts +2 -0
- package/dist/src/commands/skills/index.js +17 -0
- package/dist/src/commands/skills/index.js.map +1 -0
- package/dist/src/commands/skills/install.d.ts +2 -0
- package/dist/src/commands/skills/install.js +44 -0
- package/dist/src/commands/skills/install.js.map +1 -0
- package/dist/src/commands/skills/list.d.ts +2 -0
- package/dist/src/commands/skills/list.js +29 -0
- package/dist/src/commands/skills/list.js.map +1 -0
- package/dist/src/commands/skills/remove.d.ts +2 -0
- package/dist/src/commands/skills/remove.js +20 -0
- package/dist/src/commands/skills/remove.js.map +1 -0
- package/dist/src/commands/skills/show.d.ts +2 -0
- package/dist/src/commands/skills/show.js +34 -0
- package/dist/src/commands/skills/show.js.map +1 -0
- package/dist/src/commands/skills/update.d.ts +2 -0
- package/dist/src/commands/skills/update.js +59 -0
- package/dist/src/commands/skills/update.js.map +1 -0
- package/dist/src/commands/threads/create.js +3 -3
- package/dist/src/commands/threads/create.js.map +1 -1
- package/dist/src/commands/threads/spawn-target.d.ts +2 -2
- package/dist/src/commands/threads/spawn-target.js +2 -2
- package/dist/src/commands/threads/spawn-target.js.map +1 -1
- package/dist/src/convex/_generated/api.d.ts +34 -0
- package/dist/src/lib/git/checkpoint.d.ts +6 -6
- package/dist/src/lib/git/checkpoint.js +10 -10
- package/dist/src/lib/git/checkpoint.js.map +1 -1
- package/dist/src/lib/organization-resolution.d.ts +8 -0
- package/dist/src/lib/organization-resolution.js +35 -0
- package/dist/src/lib/organization-resolution.js.map +1 -0
- package/dist/src/lib/scope-resolution.d.ts +26 -0
- package/dist/src/lib/scope-resolution.js +33 -0
- package/dist/src/lib/scope-resolution.js.map +1 -0
- package/dist/src/lib/text-input.d.ts +5 -0
- package/dist/src/lib/text-input.js +10 -0
- package/dist/src/lib/text-input.js.map +1 -1
- package/dist/src/lib/version.d.ts +6 -0
- package/dist/src/lib/version.js +25 -0
- package/dist/src/lib/version.js.map +1 -1
- package/dist/templates/devcontainer/Dockerfile +7 -1
- package/dist/templates/devcontainer/README.md +3 -1
- package/dist/templates/devcontainer/init-firewall.sh +37 -23
- package/package.json +1 -1
- package/dist/src/commands/prompts/parsers.d.ts +0 -9
- package/dist/src/commands/prompts/parsers.js +0 -12
- package/dist/src/commands/prompts/parsers.js.map +0 -1
- package/dist/src/commands/prompts/resolve.d.ts +0 -17
- package/dist/src/commands/prompts/resolve.js +0 -43
- package/dist/src/commands/prompts/resolve.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/threads/create.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAsB,MAAM,qBAAqB,CAAC;AAC3G,OAAO,EAAE,2BAA2B,EAA0B,MAAM,iCAAiC,CAAC;AACtG,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;A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generated/dataModel.js";
|
|
2
2
|
import type { ConvoyClient } from "../../lib/config/index.js";
|
|
3
3
|
import { CliType } from "./parsers.js";
|
|
4
|
-
/** Where `threads create` should create the thread
|
|
4
|
+
/** Where `threads create` should create the thread and whether it joins a group. */
|
|
5
5
|
export interface SpawnTarget {
|
|
6
6
|
profileId: Id<"cliProfiles">;
|
|
7
7
|
pathId: string;
|
|
8
8
|
cliType: CliType;
|
|
9
9
|
projectId: Id<"projects">;
|
|
10
10
|
/** Absent for a from-scratch create; see `resolveSpawnTarget` in the MCP layer. */
|
|
11
|
-
|
|
11
|
+
addToGroup?: {
|
|
12
12
|
sourceThreadId: Id<"cliThreads">;
|
|
13
13
|
spawnedByThreadId: Id<"cliThreads">;
|
|
14
14
|
expectedContainerId?: Id<"cliThreads">;
|
|
@@ -40,14 +40,14 @@ export async function resolveSpawnTarget(client, explicit, sourceId, fallbackPro
|
|
|
40
40
|
cliType: require(explicit.cliType ?? child.cliType, "cli-type"),
|
|
41
41
|
// The source's, not the resolved default: a group never spans projects.
|
|
42
42
|
projectId: source.projectId,
|
|
43
|
-
|
|
43
|
+
addToGroup: {
|
|
44
44
|
sourceThreadId: child.threadId,
|
|
45
45
|
spawnedByThreadId: sourceId,
|
|
46
46
|
...(source.kind === "group" ? { expectedContainerId: source.threadId } : {}),
|
|
47
47
|
},
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
/** A container resolves to a member, since `
|
|
50
|
+
/** A container resolves to a member, since `addThreadToGroup` works from a child. */
|
|
51
51
|
async function resolveGroupMember(client, container) {
|
|
52
52
|
const members = await client.query(api.cli.threads.listGroupSummaries, {
|
|
53
53
|
parentThreadId: container.threadId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn-target.js","sourceRoot":"","sources":["../../../../src/commands/threads/spawn-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AA0BrD,SAAS,OAAO,CAAI,KAAoB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J,CAAC;AAED,qFAAqF;AACrF,KAAK,UAAU,kBAAkB,CAAC,MAAoB,EAAE,SAAoB;IAC1E,MAAM,OAAO,GAAgB,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,EAAE;QAClF,cAAc,EAAE,SAAS,CAAC,QAAQ;QAClC,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,cAAc,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;IACnG,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -33,6 +33,7 @@ import type * as cli_lib_cliInteractionRequestsRepo from "../cli/lib/cliInteract
|
|
|
33
33
|
import type * as cli_lib_cliMessageAttachmentRefsRepo from "../cli/lib/cliMessageAttachmentRefsRepo.js";
|
|
34
34
|
import type * as cli_lib_cliMessageChunksRepo from "../cli/lib/cliMessageChunksRepo.js";
|
|
35
35
|
import type * as cli_lib_cliMessagePendingUploadsRepo from "../cli/lib/cliMessagePendingUploadsRepo.js";
|
|
36
|
+
import type * as cli_lib_cliMessageStreamHeadsRepo from "../cli/lib/cliMessageStreamHeadsRepo.js";
|
|
36
37
|
import type * as cli_lib_cliMessagesRepo from "../cli/lib/cliMessagesRepo.js";
|
|
37
38
|
import type * as cli_lib_cliProfilesRepo from "../cli/lib/cliProfilesRepo.js";
|
|
38
39
|
import type * as cli_lib_cliRuntimeCatalogsRepo from "../cli/lib/cliRuntimeCatalogsRepo.js";
|
|
@@ -128,9 +129,11 @@ import type * as lib_access_permissions from "../lib/access/permissions.js";
|
|
|
128
129
|
import type * as lib_accessRepo from "../lib/accessRepo.js";
|
|
129
130
|
import type * as lib_contracts_agentThreadWork from "../lib/contracts/agentThreadWork.js";
|
|
130
131
|
import type * as lib_contracts_appEvents from "../lib/contracts/appEvents.js";
|
|
132
|
+
import type * as lib_contracts_composerContent from "../lib/contracts/composerContent.js";
|
|
131
133
|
import type * as lib_contracts_costUsage from "../lib/contracts/costUsage.js";
|
|
132
134
|
import type * as lib_contracts_notifications from "../lib/contracts/notifications.js";
|
|
133
135
|
import type * as lib_contracts_projectAgentAutomation from "../lib/contracts/projectAgentAutomation.js";
|
|
136
|
+
import type * as lib_contracts_skills from "../lib/contracts/skills.js";
|
|
134
137
|
import type * as lib_contracts_slashCommands from "../lib/contracts/slashCommands.js";
|
|
135
138
|
import type * as lib_contracts_taskActivity from "../lib/contracts/taskActivity.js";
|
|
136
139
|
import type * as lib_contracts_taskAssignees from "../lib/contracts/taskAssignees.js";
|
|
@@ -140,6 +143,7 @@ import type * as lib_contracts_taskListKeys from "../lib/contracts/taskListKeys.
|
|
|
140
143
|
import type * as lib_contracts_taskSummaries from "../lib/contracts/taskSummaries.js";
|
|
141
144
|
import type * as lib_contracts_taskTypes from "../lib/contracts/taskTypes.js";
|
|
142
145
|
import type * as lib_contracts_validators from "../lib/contracts/validators.js";
|
|
146
|
+
import type * as lib_contracts_workflowDefinition from "../lib/contracts/workflowDefinition.js";
|
|
143
147
|
import type * as lib_eventRegistry from "../lib/eventRegistry.js";
|
|
144
148
|
import type * as lib_events from "../lib/events.js";
|
|
145
149
|
import type * as lib_http_agentAuth from "../lib/http/agentAuth.js";
|
|
@@ -161,6 +165,7 @@ import type * as mcp_handlers_index from "../mcp/handlers/index.js";
|
|
|
161
165
|
import type * as mcp_handlers_projectAgents from "../mcp/handlers/projectAgents.js";
|
|
162
166
|
import type * as mcp_handlers_projects from "../mcp/handlers/projects.js";
|
|
163
167
|
import type * as mcp_handlers_prompts from "../mcp/handlers/prompts.js";
|
|
168
|
+
import type * as mcp_handlers_skills from "../mcp/handlers/skills.js";
|
|
164
169
|
import type * as mcp_handlers_tasks_artifactComments from "../mcp/handlers/tasks/artifactComments.js";
|
|
165
170
|
import type * as mcp_handlers_tasks_artifacts from "../mcp/handlers/tasks/artifacts.js";
|
|
166
171
|
import type * as mcp_handlers_tasks_comments from "../mcp/handlers/tasks/comments.js";
|
|
@@ -220,6 +225,12 @@ import type * as projects_lib_permissions from "../projects/lib/permissions.js";
|
|
|
220
225
|
import type * as projects_lib_projectsRepo from "../projects/lib/projectsRepo.js";
|
|
221
226
|
import type * as projects_lib_validators from "../projects/lib/validators.js";
|
|
222
227
|
import type * as projects_members from "../projects/members.js";
|
|
228
|
+
import type * as skills_core from "../skills/core.js";
|
|
229
|
+
import type * as skills_errors from "../skills/errors.js";
|
|
230
|
+
import type * as skills_lib_normalize from "../skills/lib/normalize.js";
|
|
231
|
+
import type * as skills_lib_skillFilesRepo from "../skills/lib/skillFilesRepo.js";
|
|
232
|
+
import type * as skills_lib_skillsRepo from "../skills/lib/skillsRepo.js";
|
|
233
|
+
import type * as skills_lib_validators from "../skills/lib/validators.js";
|
|
223
234
|
import type * as slashCommands_core from "../slashCommands/core.js";
|
|
224
235
|
import type * as slashCommands_errors from "../slashCommands/errors.js";
|
|
225
236
|
import type * as slashCommands_lib_normalize from "../slashCommands/lib/normalize.js";
|
|
@@ -283,6 +294,12 @@ import type * as users_lib_userProjectPreferencesRepo from "../users/lib/userPro
|
|
|
283
294
|
import type * as users_lib_usersRepo from "../users/lib/usersRepo.js";
|
|
284
295
|
import type * as users_preferences from "../users/preferences.js";
|
|
285
296
|
import type * as users_projectPreferences from "../users/projectPreferences.js";
|
|
297
|
+
import type * as workflows_core from "../workflows/core.js";
|
|
298
|
+
import type * as workflows_errors from "../workflows/errors.js";
|
|
299
|
+
import type * as workflows_lib_invariants from "../workflows/lib/invariants.js";
|
|
300
|
+
import type * as workflows_lib_normalize from "../workflows/lib/normalize.js";
|
|
301
|
+
import type * as workflows_lib_validators from "../workflows/lib/validators.js";
|
|
302
|
+
import type * as workflows_lib_workflowsRepo from "../workflows/lib/workflowsRepo.js";
|
|
286
303
|
|
|
287
304
|
import type {
|
|
288
305
|
ApiFromModules,
|
|
@@ -316,6 +333,7 @@ declare const fullApi: ApiFromModules<{
|
|
|
316
333
|
"cli/lib/cliMessageAttachmentRefsRepo": typeof cli_lib_cliMessageAttachmentRefsRepo;
|
|
317
334
|
"cli/lib/cliMessageChunksRepo": typeof cli_lib_cliMessageChunksRepo;
|
|
318
335
|
"cli/lib/cliMessagePendingUploadsRepo": typeof cli_lib_cliMessagePendingUploadsRepo;
|
|
336
|
+
"cli/lib/cliMessageStreamHeadsRepo": typeof cli_lib_cliMessageStreamHeadsRepo;
|
|
319
337
|
"cli/lib/cliMessagesRepo": typeof cli_lib_cliMessagesRepo;
|
|
320
338
|
"cli/lib/cliProfilesRepo": typeof cli_lib_cliProfilesRepo;
|
|
321
339
|
"cli/lib/cliRuntimeCatalogsRepo": typeof cli_lib_cliRuntimeCatalogsRepo;
|
|
@@ -411,9 +429,11 @@ declare const fullApi: ApiFromModules<{
|
|
|
411
429
|
"lib/accessRepo": typeof lib_accessRepo;
|
|
412
430
|
"lib/contracts/agentThreadWork": typeof lib_contracts_agentThreadWork;
|
|
413
431
|
"lib/contracts/appEvents": typeof lib_contracts_appEvents;
|
|
432
|
+
"lib/contracts/composerContent": typeof lib_contracts_composerContent;
|
|
414
433
|
"lib/contracts/costUsage": typeof lib_contracts_costUsage;
|
|
415
434
|
"lib/contracts/notifications": typeof lib_contracts_notifications;
|
|
416
435
|
"lib/contracts/projectAgentAutomation": typeof lib_contracts_projectAgentAutomation;
|
|
436
|
+
"lib/contracts/skills": typeof lib_contracts_skills;
|
|
417
437
|
"lib/contracts/slashCommands": typeof lib_contracts_slashCommands;
|
|
418
438
|
"lib/contracts/taskActivity": typeof lib_contracts_taskActivity;
|
|
419
439
|
"lib/contracts/taskAssignees": typeof lib_contracts_taskAssignees;
|
|
@@ -423,6 +443,7 @@ declare const fullApi: ApiFromModules<{
|
|
|
423
443
|
"lib/contracts/taskSummaries": typeof lib_contracts_taskSummaries;
|
|
424
444
|
"lib/contracts/taskTypes": typeof lib_contracts_taskTypes;
|
|
425
445
|
"lib/contracts/validators": typeof lib_contracts_validators;
|
|
446
|
+
"lib/contracts/workflowDefinition": typeof lib_contracts_workflowDefinition;
|
|
426
447
|
"lib/eventRegistry": typeof lib_eventRegistry;
|
|
427
448
|
"lib/events": typeof lib_events;
|
|
428
449
|
"lib/http/agentAuth": typeof lib_http_agentAuth;
|
|
@@ -444,6 +465,7 @@ declare const fullApi: ApiFromModules<{
|
|
|
444
465
|
"mcp/handlers/projectAgents": typeof mcp_handlers_projectAgents;
|
|
445
466
|
"mcp/handlers/projects": typeof mcp_handlers_projects;
|
|
446
467
|
"mcp/handlers/prompts": typeof mcp_handlers_prompts;
|
|
468
|
+
"mcp/handlers/skills": typeof mcp_handlers_skills;
|
|
447
469
|
"mcp/handlers/tasks/artifactComments": typeof mcp_handlers_tasks_artifactComments;
|
|
448
470
|
"mcp/handlers/tasks/artifacts": typeof mcp_handlers_tasks_artifacts;
|
|
449
471
|
"mcp/handlers/tasks/comments": typeof mcp_handlers_tasks_comments;
|
|
@@ -503,6 +525,12 @@ declare const fullApi: ApiFromModules<{
|
|
|
503
525
|
"projects/lib/projectsRepo": typeof projects_lib_projectsRepo;
|
|
504
526
|
"projects/lib/validators": typeof projects_lib_validators;
|
|
505
527
|
"projects/members": typeof projects_members;
|
|
528
|
+
"skills/core": typeof skills_core;
|
|
529
|
+
"skills/errors": typeof skills_errors;
|
|
530
|
+
"skills/lib/normalize": typeof skills_lib_normalize;
|
|
531
|
+
"skills/lib/skillFilesRepo": typeof skills_lib_skillFilesRepo;
|
|
532
|
+
"skills/lib/skillsRepo": typeof skills_lib_skillsRepo;
|
|
533
|
+
"skills/lib/validators": typeof skills_lib_validators;
|
|
506
534
|
"slashCommands/core": typeof slashCommands_core;
|
|
507
535
|
"slashCommands/errors": typeof slashCommands_errors;
|
|
508
536
|
"slashCommands/lib/normalize": typeof slashCommands_lib_normalize;
|
|
@@ -566,6 +594,12 @@ declare const fullApi: ApiFromModules<{
|
|
|
566
594
|
"users/lib/usersRepo": typeof users_lib_usersRepo;
|
|
567
595
|
"users/preferences": typeof users_preferences;
|
|
568
596
|
"users/projectPreferences": typeof users_projectPreferences;
|
|
597
|
+
"workflows/core": typeof workflows_core;
|
|
598
|
+
"workflows/errors": typeof workflows_errors;
|
|
599
|
+
"workflows/lib/invariants": typeof workflows_lib_invariants;
|
|
600
|
+
"workflows/lib/normalize": typeof workflows_lib_normalize;
|
|
601
|
+
"workflows/lib/validators": typeof workflows_lib_validators;
|
|
602
|
+
"workflows/lib/workflowsRepo": typeof workflows_lib_workflowsRepo;
|
|
569
603
|
}>;
|
|
570
604
|
|
|
571
605
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Hidden-ref git checkpoints around a
|
|
2
|
+
* Hidden-ref git checkpoints around a thread run (OS-1142).
|
|
3
3
|
*
|
|
4
4
|
* A checkpoint is a commit built from a temporary index (GIT_INDEX_FILE), so the user's
|
|
5
5
|
* real index, HEAD and branches are never touched. Refs under
|
|
@@ -20,23 +20,23 @@ export interface RunDiffSummary {
|
|
|
20
20
|
truncated?: boolean;
|
|
21
21
|
}
|
|
22
22
|
export declare const MAX_DIFF_FILES = 200;
|
|
23
|
-
export declare function checkpointRef(threadId: string,
|
|
23
|
+
export declare function checkpointRef(threadId: string, runId: string, phase: "pre" | "post"): string;
|
|
24
24
|
/**
|
|
25
25
|
* Snapshot the working tree (tracked + untracked-but-not-ignored files) into
|
|
26
26
|
* a commit stored at `ref`. Idempotent: an existing ref is left untouched.
|
|
27
27
|
*/
|
|
28
28
|
export declare function captureCheckpoint(cwd: string, ref: string): Promise<void>;
|
|
29
29
|
/**
|
|
30
|
-
* Capture the pre-run baseline for a
|
|
30
|
+
* Capture the pre-run baseline for a run. Returns false when the working
|
|
31
31
|
* directory is not a git repo (post-run capture should then be skipped too).
|
|
32
32
|
*/
|
|
33
|
-
export declare function capturePreRunCheckpoint(cwd: string, threadId: string,
|
|
33
|
+
export declare function capturePreRunCheckpoint(cwd: string, threadId: string, runId: string): Promise<boolean>;
|
|
34
34
|
/**
|
|
35
|
-
* Capture the post-run checkpoint and diff it against the
|
|
35
|
+
* Capture the post-run checkpoint and diff it against the run baseline.
|
|
36
36
|
* Returns null when nothing changed. Also prunes old checkpoint refs for the
|
|
37
37
|
* thread as a side effect.
|
|
38
38
|
*/
|
|
39
|
-
export declare function captureRunDiffSummary(cwd: string, threadId: string,
|
|
39
|
+
export declare function captureRunDiffSummary(cwd: string, threadId: string, runId: string): Promise<RunDiffSummary | null>;
|
|
40
40
|
/**
|
|
41
41
|
* Join `git diff --numstat -z` (line counts) with `--name-status -z` (change
|
|
42
42
|
* kind) into per-file entries. Exported for tests.
|
|
@@ -3,14 +3,14 @@ import { tmpdir } from "node:os";
|
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { runGit } from "./exec.js";
|
|
5
5
|
export const MAX_DIFF_FILES = 200;
|
|
6
|
-
// Refs per thread to retain (2 per
|
|
6
|
+
// Refs per thread to retain (2 per run). Older checkpoints become
|
|
7
7
|
// unreachable and are eventually gc'd with their objects.
|
|
8
8
|
const MAX_REFS_PER_THREAD = 40;
|
|
9
9
|
const CAPTURE_TIMEOUT_MS = 120_000;
|
|
10
10
|
// Snapshot commits need an ident even in repos without user.name/email.
|
|
11
11
|
const IDENT_ARGS = ["-c", "user.name=convoy", "-c", "user.email=cli@convoy.build"];
|
|
12
|
-
export function checkpointRef(threadId,
|
|
13
|
-
return `refs/convoy/checkpoints/${threadId}/${
|
|
12
|
+
export function checkpointRef(threadId, runId, phase) {
|
|
13
|
+
return `refs/convoy/checkpoints/${threadId}/${runId}/${phase}`;
|
|
14
14
|
}
|
|
15
15
|
async function refExists(cwd, ref) {
|
|
16
16
|
const result = await runGit(cwd, ["rev-parse", "--verify", "--quiet", ref], { allowNonZeroExit: true });
|
|
@@ -48,24 +48,24 @@ export async function captureCheckpoint(cwd, ref) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
* Capture the pre-run baseline for a
|
|
51
|
+
* Capture the pre-run baseline for a run. Returns false when the working
|
|
52
52
|
* directory is not a git repo (post-run capture should then be skipped too).
|
|
53
53
|
*/
|
|
54
|
-
export async function capturePreRunCheckpoint(cwd, threadId,
|
|
54
|
+
export async function capturePreRunCheckpoint(cwd, threadId, runId) {
|
|
55
55
|
if (!(await isGitWorkTree(cwd))) {
|
|
56
56
|
return false;
|
|
57
57
|
}
|
|
58
|
-
await captureCheckpoint(cwd, checkpointRef(threadId,
|
|
58
|
+
await captureCheckpoint(cwd, checkpointRef(threadId, runId, "pre"));
|
|
59
59
|
return true;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* Capture the post-run checkpoint and diff it against the
|
|
62
|
+
* Capture the post-run checkpoint and diff it against the run baseline.
|
|
63
63
|
* Returns null when nothing changed. Also prunes old checkpoint refs for the
|
|
64
64
|
* thread as a side effect.
|
|
65
65
|
*/
|
|
66
|
-
export async function captureRunDiffSummary(cwd, threadId,
|
|
67
|
-
const preRef = checkpointRef(threadId,
|
|
68
|
-
const postRef = checkpointRef(threadId,
|
|
66
|
+
export async function captureRunDiffSummary(cwd, threadId, runId) {
|
|
67
|
+
const preRef = checkpointRef(threadId, runId, "pre");
|
|
68
|
+
const postRef = checkpointRef(threadId, runId, "post");
|
|
69
69
|
await captureCheckpoint(cwd, postRef);
|
|
70
70
|
await pruneCheckpointRefs(cwd, threadId);
|
|
71
71
|
// ponytail: --no-renames keeps parsing uniform (renames show as
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkpoint.js","sourceRoot":"","sources":["../../../../src/lib/git/checkpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAA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IACzE,MAAM,MAAM,CAAC,GAAG,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,qEAAqE;AACrE,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,GAAW,EAAE,QAAgB;IACrE,MAAM,MAAM,GAAG,2BAA2B,QAAQ,GAAG,CAAC;IACtD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,EAAE;QAC/B,cAAc;QACd,qBAAqB;QACrB,qBAAqB;QACrB,MAAM;KACP,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/E,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAClD,MAAM,MAAM,CAAC,GAAG,EAAE,CAAC,YAAY,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { Id } from "../convex/_generated/dataModel.js";
|
|
3
|
+
import type { ConvoyClient, RequiredConfig } from "./config/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* The organization a command targets: `--org` when given, otherwise the one
|
|
6
|
+
* owning the resolved project, so the common case needs no extra flag.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveOrganizationId(client: ConvoyClient, config: RequiredConfig, cmd: Command, org: string | undefined): Promise<Id<"organizations">>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { api } from "../convex/_generated/api.js";
|
|
2
|
+
import { getGlobalProjectOption } from "./global-options.js";
|
|
3
|
+
import { parseId } from "./id.js";
|
|
4
|
+
import { resolveProjectId } from "./project-resolution.js";
|
|
5
|
+
const NO_ORGANIZATION = "Could not resolve an organization. Pass --org <orgId|orgSlug>, or --project with an accessible project.";
|
|
6
|
+
/**
|
|
7
|
+
* The organization a command targets: `--org` when given, otherwise the one
|
|
8
|
+
* owning the resolved project, so the common case needs no extra flag.
|
|
9
|
+
*/
|
|
10
|
+
export async function resolveOrganizationId(client, config, cmd, org) {
|
|
11
|
+
if (org) {
|
|
12
|
+
// Asked of the backend rather than derived from the project list: an
|
|
13
|
+
// organization with no accessible projects is still a valid target.
|
|
14
|
+
const organization = await client.query(api.organizations.core.getByRef, { ref: org });
|
|
15
|
+
if (!organization) {
|
|
16
|
+
throw new Error(`Organization "${org}" was not found or not accessible. Run 'convoy orgs list' to see available organizations.`);
|
|
17
|
+
}
|
|
18
|
+
return organization._id;
|
|
19
|
+
}
|
|
20
|
+
// The organization is borrowed from a project here, but `--org` is what the
|
|
21
|
+
// caller is missing, so say that rather than letting the project-shaped
|
|
22
|
+
// "No project configured" error out of `resolveProjectId`.
|
|
23
|
+
const projectRef = getGlobalProjectOption(cmd);
|
|
24
|
+
if (!projectRef && !config.projectId) {
|
|
25
|
+
throw new Error(NO_ORGANIZATION);
|
|
26
|
+
}
|
|
27
|
+
const projects = await client.query(api.projects.core.listAccessible, {});
|
|
28
|
+
const projectId = resolveProjectId({ projects, defaultProjectId: config.projectId, projectRef });
|
|
29
|
+
const project = projects.find((candidate) => candidate._id === projectId);
|
|
30
|
+
if (!project) {
|
|
31
|
+
throw new Error(NO_ORGANIZATION);
|
|
32
|
+
}
|
|
33
|
+
return parseId(project.organizationId, "organizationId");
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=organization-resolution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-resolution.js","sourceRoot":"","sources":["../../../src/lib/organ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AAG,QAAQ,CAAC,IAAI,CAAC,CAAC,SAA4B,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC;IAC7F,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,OAAO,CAAkB,OAAO,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { Id } from "../convex/_generated/dataModel.js";
|
|
3
|
+
import type { ConvoyClient, RequiredConfig } from "./config/index.js";
|
|
4
|
+
import type { OutputOptions } from "./output.js";
|
|
5
|
+
/**
|
|
6
|
+
* Scope flags for an entity that exists in both scopes — prompts and Skills.
|
|
7
|
+
* Project scope is the default: a profile is configured for one project.
|
|
8
|
+
*/
|
|
9
|
+
export interface ScopeOptions extends OutputOptions {
|
|
10
|
+
scope?: string;
|
|
11
|
+
org?: string;
|
|
12
|
+
}
|
|
13
|
+
export type Scope = "project" | "organization";
|
|
14
|
+
export type ScopeTarget = {
|
|
15
|
+
scope: "project";
|
|
16
|
+
projectId: Id<"projects">;
|
|
17
|
+
} | {
|
|
18
|
+
scope: "organization";
|
|
19
|
+
organizationId: Id<"organizations">;
|
|
20
|
+
};
|
|
21
|
+
export declare function addScopeOptions<T extends Command>(cmd: T, entity: string): T;
|
|
22
|
+
/**
|
|
23
|
+
* Organization scope takes `--org` when given and otherwise borrows the resolved
|
|
24
|
+
* project's organization, so the common case needs no extra flag.
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveScopeTarget(client: ConvoyClient, config: RequiredConfig, cmd: Command, options: ScopeOptions): Promise<ScopeTarget>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { getGlobalProjectOption } from "./global-options.js";
|
|
2
|
+
import { resolveOrganizationId } from "./organization-resolution.js";
|
|
3
|
+
import { parseOptionalEnum } from "./parsers.js";
|
|
4
|
+
import { resolveProjectFromCommand } from "./project-resolution.js";
|
|
5
|
+
export function addScopeOptions(cmd, entity) {
|
|
6
|
+
return cmd
|
|
7
|
+
.option("--scope <scope>", `${entity} scope: project or organization (default: project)`)
|
|
8
|
+
.option("--org <org>", "Organization ID or slug");
|
|
9
|
+
}
|
|
10
|
+
// Same vocabulary as the MCP `scope` argument — no `org` alias, so a script reads
|
|
11
|
+
// the same on both surfaces. Unexported: `parseScope` is taken by `init`, for a
|
|
12
|
+
// different scope vocabulary.
|
|
13
|
+
function parseScope(options) {
|
|
14
|
+
return parseOptionalEnum(options.scope, "Scope", ["project", "organization"]) ?? "project";
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Organization scope takes `--org` when given and otherwise borrows the resolved
|
|
18
|
+
* project's organization, so the common case needs no extra flag.
|
|
19
|
+
*/
|
|
20
|
+
export async function resolveScopeTarget(client, config, cmd, options) {
|
|
21
|
+
const scope = parseScope(options);
|
|
22
|
+
if (scope === "project") {
|
|
23
|
+
if (options.org && !getGlobalProjectOption(cmd)) {
|
|
24
|
+
// In project scope `--org` only disambiguates `--project`; alone it reads
|
|
25
|
+
// as "the organization", which is a different scope.
|
|
26
|
+
throw new Error("--org needs --project in project scope. Pass --scope organization to target the organization itself.");
|
|
27
|
+
}
|
|
28
|
+
const { projectId } = await resolveProjectFromCommand(client, config, cmd, options.org);
|
|
29
|
+
return { scope, projectId };
|
|
30
|
+
}
|
|
31
|
+
return { scope, organizationId: await resolveOrganizationId(client, config, cmd, options.org) };
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=scope-resolution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-resolution.js","sourceRoot":"","sources":["../../../src/lib/scope-resolution.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B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 interface StringInputArgs {
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function resolveOptionalStringInput({ inlineValue, filePath, inlineLabel, fileLabel, displayName, }: StringInputArgs): string;
|
|
17
17
|
export declare function resolveRequiredStringInput(args: StringInputArgs): string;
|
|
18
|
+
/**
|
|
19
|
+
* `undefined` when neither source was given — for update commands, where an
|
|
20
|
+
* absent flag means "leave the stored value alone" and `""` would overwrite it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveAbsentableStringInput(args: StringInputArgs): string | undefined;
|
|
18
23
|
export {};
|
|
@@ -33,4 +33,14 @@ export function resolveRequiredStringInput(args) {
|
|
|
33
33
|
}
|
|
34
34
|
return resolveOptionalStringInput(args);
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* `undefined` when neither source was given — for update commands, where an
|
|
38
|
+
* absent flag means "leave the stored value alone" and `""` would overwrite it.
|
|
39
|
+
*/
|
|
40
|
+
export function resolveAbsentableStringInput(args) {
|
|
41
|
+
if (args.inlineValue === undefined && args.filePath === undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
return resolveOptionalStringInput(args);
|
|
45
|
+
}
|
|
36
46
|
//# sourceMappingURL=text-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../../src/lib/text-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,KAAa;IACtD,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,MAAM,IAAI,KAAK,CAAC,kBAAk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version, walking up from this module. */
|
|
2
2
|
export declare function getCliVersion(): string;
|
|
3
|
+
/**
|
|
4
|
+
* The npm `latest` version if it is newer than the running one, else null.
|
|
5
|
+
* Never throws — offline, self-hosted, and air-gapped installs get null.
|
|
6
|
+
* See docs/specs/cli-update-notice.md.
|
|
7
|
+
*/
|
|
8
|
+
export declare function checkForNewerVersion(timeoutMs?: number): Promise<string | null>;
|
package/dist/src/lib/version.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { compareVersions } from "../agent/sdk/versioning/provider-version.js";
|
|
5
|
+
const NPM_LATEST_URL = "https://registry.npmjs.org/@useconvoy/cli/latest";
|
|
4
6
|
function readPackageVersion(packageJsonPath) {
|
|
5
7
|
let packageJson;
|
|
6
8
|
try {
|
|
@@ -30,4 +32,27 @@ export function getCliVersion() {
|
|
|
30
32
|
}
|
|
31
33
|
return "0.0.0";
|
|
32
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* The npm `latest` version if it is newer than the running one, else null.
|
|
37
|
+
* Never throws — offline, self-hosted, and air-gapped installs get null.
|
|
38
|
+
* See docs/specs/cli-update-notice.md.
|
|
39
|
+
*/
|
|
40
|
+
export async function checkForNewerVersion(timeoutMs = 1500) {
|
|
41
|
+
try {
|
|
42
|
+
const response = await fetch(NPM_LATEST_URL, {
|
|
43
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
44
|
+
});
|
|
45
|
+
if (!response.ok) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const { version } = (await response.json());
|
|
49
|
+
if (typeof version !== "string") {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return compareVersions(version, getCliVersion()) > 0 ? version : null;
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
33
58
|
//# 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;
|
|
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,uEAAuE;AACvE,MAAM,UAAU,aAAa;IAC3B,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAEvD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC1C,MAAM,OAAO,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC;QACnE,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,SAAS,GAAG,IAAI;IAEhB,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,cAAc,EAAE;YAC3C,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC;SACvC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAA0B,CAAC;QACrE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,eAAe,CAAC,OAAO,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IACxE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -89,7 +89,13 @@ ENV PATH=$PATH:/home/node/.local/bin
|
|
|
89
89
|
# Copy and set up the firewall script
|
|
90
90
|
COPY init-firewall.sh /usr/local/bin/
|
|
91
91
|
USER root
|
|
92
|
+
# env_keep is load-bearing: sudo's default env_reset strips the vars the firewall
|
|
93
|
+
# reads, so a strict-mode start (and the manual re-run in README.md) would silently
|
|
94
|
+
# lose the Convex, Bedrock-region, and extra-domain allowlist entries.
|
|
92
95
|
RUN chmod +x /usr/local/bin/init-firewall.sh && \
|
|
93
|
-
|
|
96
|
+
printf '%s\n' \
|
|
97
|
+
'node ALL=(root) NOPASSWD: /usr/local/bin/init-firewall.sh' \
|
|
98
|
+
'Defaults env_keep += "CONVEX_DEPLOYMENT AWS_REGION DEVCONTAINER_EXTRA_ALLOWED_DOMAINS"' \
|
|
99
|
+
> /etc/sudoers.d/node-devcontainer && \
|
|
94
100
|
chmod 0440 /etc/sudoers.d/node-devcontainer
|
|
95
101
|
USER node
|
|
@@ -57,7 +57,7 @@ Runs `init-firewall.sh` on container startup. All outbound traffic is blocked ex
|
|
|
57
57
|
|
|
58
58
|
- **GitHub** — git operations and API (GitHub meta API ranges, with a DNS fallback)
|
|
59
59
|
- **npm registry** — `registry.npmjs.org`
|
|
60
|
-
- **Anthropic** — `api.anthropic.com`, `
|
|
60
|
+
- **Anthropic** — `api.anthropic.com`, `claude.ai`, `claude.com`, `platform.claude.com` (sign-in plus OAuth token exchange, refresh, and revocation — required for both claude.ai and Console accounts), `sentry.io`, `statsig.com`
|
|
61
61
|
- **OpenAI / Codex** — `api.openai.com`, `auth.openai.com`, `auth.api.openai.org`, `chatgpt.com`, `chat.openai.com`, `ab.chatgpt.com`, `persistent.oaistatic.com`
|
|
62
62
|
- **OpenCode** — `opencode.ai`, `api.opencode.ai`, `models.dev`
|
|
63
63
|
- **Cursor** — `cursor.com`, `api2.cursor.sh`, `api3.cursor.sh`, `api4.cursor.sh`, `downloads.cursor.com`
|
|
@@ -67,6 +67,8 @@ Runs `init-firewall.sh` on container startup. All outbound traffic is blocked ex
|
|
|
67
67
|
- **Your extras** — anything in `DEVCONTAINER_EXTRA_ALLOWED_DOMAINS`
|
|
68
68
|
- **Localhost and the host network** — local dev servers, Docker DNS
|
|
69
69
|
|
|
70
|
+
A host that no longer resolves (or a DNS flake) is skipped with a `WARN:` line and listed again at the end of the setup log — the firewall is still applied without it. That is deliberate: aborting would leave the container with *no* firewall while still reporting `strict` mode. If an agent can only reach some services, read the setup log for those warnings first.
|
|
71
|
+
|
|
70
72
|
### `open`
|
|
71
73
|
|
|
72
74
|
Skips the firewall entirely. Use it when you want fewer networking surprises or broader tool compatibility.
|