@grackle-ai/cli 0.21.0 → 0.23.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/commands/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/commands/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqG9D"}
|
package/dist/commands/project.js
CHANGED
|
@@ -14,10 +14,10 @@ export function registerProjectCommands(program) {
|
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
16
|
const table = new Table({
|
|
17
|
-
head: ["ID", "Name", "Env", "Status", "Created"],
|
|
17
|
+
head: ["ID", "Name", "Env", "Worktrees", "Status", "Created"],
|
|
18
18
|
});
|
|
19
19
|
for (const p of res.projects) {
|
|
20
|
-
table.push([p.id, p.name, p.defaultEnvironmentId || "-", projectStatusToString(p.status), p.createdAt]);
|
|
20
|
+
table.push([p.id, p.name, p.defaultEnvironmentId || "-", p.useWorktrees ? "enabled" : "disabled", projectStatusToString(p.status), p.createdAt]);
|
|
21
21
|
}
|
|
22
22
|
console.log(table.toString());
|
|
23
23
|
});
|
|
@@ -27,15 +27,19 @@ export function registerProjectCommands(program) {
|
|
|
27
27
|
.option("--repo <url>", "Repository URL")
|
|
28
28
|
.option("--env <env-id>", "Default environment ID")
|
|
29
29
|
.option("--desc <description>", "Project description")
|
|
30
|
+
.option("--no-worktrees", "Disable worktree isolation (agents share the main checkout)")
|
|
30
31
|
.action(async (name, opts) => {
|
|
31
32
|
const client = createGrackleClient();
|
|
33
|
+
// Commander sets opts.worktrees = false when --no-worktrees is passed, true otherwise
|
|
34
|
+
const useWorktrees = opts.worktrees !== false;
|
|
32
35
|
const p = await client.createProject({
|
|
33
36
|
name,
|
|
34
37
|
description: opts.desc || "",
|
|
35
38
|
repoUrl: opts.repo || "",
|
|
36
39
|
defaultEnvironmentId: opts.env || "",
|
|
40
|
+
useWorktrees,
|
|
37
41
|
});
|
|
38
|
-
console.log(`Created project: ${p.id} (${p.name})`);
|
|
42
|
+
console.log(`Created project: ${p.id} (${p.name}) [worktrees: ${p.useWorktrees ? "enabled" : "disabled"}]`);
|
|
39
43
|
});
|
|
40
44
|
project
|
|
41
45
|
.command("get <id>")
|
|
@@ -44,7 +48,7 @@ export function registerProjectCommands(program) {
|
|
|
44
48
|
const client = createGrackleClient();
|
|
45
49
|
const p = await client.getProject({ id });
|
|
46
50
|
const table = new Table();
|
|
47
|
-
table.push({ "ID": p.id }, { "Name": p.name }, { "Description": p.description || "-" }, { "Repo URL": p.repoUrl || "-" }, { "Default Env": p.defaultEnvironmentId || "-" }, { "Status": projectStatusToString(p.status) }, { "Created": p.createdAt }, { "Updated": p.updatedAt });
|
|
51
|
+
table.push({ "ID": p.id }, { "Name": p.name }, { "Description": p.description || "-" }, { "Repo URL": p.repoUrl || "-" }, { "Default Env": p.defaultEnvironmentId || "-" }, { "Worktrees": p.useWorktrees ? "enabled" : "disabled" }, { "Status": projectStatusToString(p.status) }, { "Created": p.createdAt }, { "Updated": p.updatedAt });
|
|
48
52
|
console.log(table.toString());
|
|
49
53
|
});
|
|
50
54
|
project
|
|
@@ -54,16 +58,27 @@ export function registerProjectCommands(program) {
|
|
|
54
58
|
.option("--desc <description>", "Project description")
|
|
55
59
|
.option("--repo <url>", "Repository URL")
|
|
56
60
|
.option("--env <env-id>", "Default environment ID")
|
|
61
|
+
.option("--no-worktrees", "Disable worktree isolation (agents share the main checkout)")
|
|
62
|
+
.option("--worktrees", "Enable worktree isolation (default)")
|
|
57
63
|
.action(async (id, opts) => {
|
|
58
64
|
const client = createGrackleClient();
|
|
65
|
+
// Determine useWorktrees: explicit --worktrees → true, --no-worktrees → false, neither → undefined (no change)
|
|
66
|
+
let useWorktrees;
|
|
67
|
+
if (opts.worktrees === true) {
|
|
68
|
+
useWorktrees = true;
|
|
69
|
+
}
|
|
70
|
+
else if (opts.worktrees === false) {
|
|
71
|
+
useWorktrees = false;
|
|
72
|
+
}
|
|
59
73
|
const p = await client.updateProject({
|
|
60
74
|
id,
|
|
61
75
|
name: opts.name,
|
|
62
76
|
description: opts.desc,
|
|
63
77
|
repoUrl: opts.repo,
|
|
64
78
|
defaultEnvironmentId: opts.env,
|
|
79
|
+
useWorktrees,
|
|
65
80
|
});
|
|
66
|
-
console.log(`Updated project: ${p.id} (${p.name})`);
|
|
81
|
+
console.log(`Updated project: ${p.id} (${p.name}) [worktrees: ${p.useWorktrees ? "enabled" : "disabled"}]`);
|
|
67
82
|
});
|
|
68
83
|
project
|
|
69
84
|
.command("archive <id>")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/commands/project.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAE1E,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,0BAA0B,CAAC;SACvC,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC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 -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grackle-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Command-line interface for managing Grackle environments and agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"cli-table3": "^0.6.0",
|
|
34
34
|
"commander": "^13.0.0",
|
|
35
35
|
"ora": "^8.0.0",
|
|
36
|
-
"@grackle-ai/
|
|
37
|
-
"@grackle-ai/
|
|
36
|
+
"@grackle-ai/common": "0.23.0",
|
|
37
|
+
"@grackle-ai/server": "0.23.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@rushstack/heft": "1.2.4",
|