coding-friend-cli 1.39.1 → 1.40.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 +5 -0
- package/dist/{chunk-ODW27NAC.js → chunk-B44ROTV6.js} +10 -10
- package/dist/{chunk-ZGIUKUL2.js → chunk-CZW36H3D.js} +39 -7
- package/dist/{chunk-FQUIO5BW.js → chunk-E4NBTQXR.js} +13 -7
- package/dist/{chunk-IV5OPG34.js → chunk-IYBIIRH4.js} +29 -1
- package/dist/{chunk-GTOEIGDM.js → chunk-KCBMCHSA.js} +295 -44
- package/dist/{chunk-463QKRBN.js → chunk-KG6HYBGD.js} +23 -7
- package/dist/{chunk-MO4SUPZN.js → chunk-KTUPGMIV.js} +97 -15
- package/dist/{chunk-7JQZRMOG.js → chunk-NIMO4VJW.js} +37 -6
- package/dist/{chunk-OFEC6OVI.js → chunk-OBCNHQFA.js} +42 -2
- package/dist/{chunk-4CPUWHIN.js → chunk-Q2QDSYQT.js} +1 -1
- package/dist/{chunk-RL3DCID7.js → chunk-RG3EMZH6.js} +1 -1
- package/dist/{chunk-2EY7VVFT.js → chunk-SUYE5S2W.js} +1 -1
- package/dist/{chunk-YPW67OGP.js → chunk-TFF47F7P.js} +1 -1
- package/dist/{chunk-ZZNTNIM4.js → chunk-TN3Y75WG.js} +2 -2
- package/dist/{chunk-VMODQCSL.js → chunk-Z5XTSF7L.js} +5 -5
- package/dist/{clean-LPWEBJJ5.js → clean-PKSSS662.js} +3 -3
- package/dist/{config-VNSC2NAY.js → config-2CH4GI2L.js} +47 -26
- package/dist/{dev-NRTDUQAR.js → dev-HWKNWOZY.js} +7 -7
- package/dist/{disable-6L352DMD.js → disable-DCGVIHKG.js} +22 -8
- package/dist/{enable-6KXREKRP.js → enable-YYWJDOYB.js} +21 -8
- package/dist/{guide-HCLEOAGR.js → guide-45EIK76P.js} +1 -1
- package/dist/{host-2JOPHLN3.js → host-GZJSMJSF.js} +7 -7
- package/dist/index.js +67 -46
- package/dist/{init-VENKICVP.js → init-TUBWQCBQ.js} +236 -53
- package/dist/{install-A4TSBGOV.js → install-45O5ICBA.js} +68 -11
- package/dist/{learn-SSNBBDY3.js → learn-AJT7Z6F7.js} +5 -5
- package/dist/{mcp-J5VO3OH7.js → mcp-JGBZMNWL.js} +26 -13
- package/dist/{mcp-serve-55DSE2J4.js → mcp-serve-SHS5MQRW.js} +5 -5
- package/dist/{mcp-serve-learn-EDBWNL4I.js → mcp-serve-learn-HXZZ3DUI.js} +6 -6
- package/dist/{memory-CDZKWOFL.js → memory-4NVLWOFS.js} +10 -10
- package/dist/{permission-DPKPA2HU.js → permission-L5QMNMID.js} +25 -25
- package/dist/{session-YWJDLNBP.js → session-GBHL5TH3.js} +3 -3
- package/dist/{status-ZOAYLVH6.js → status-KQQJNSEZ.js} +33 -15
- package/dist/{statusline-R5BNYK3H.js → statusline-B7PXP3AQ.js} +3 -3
- package/dist/{uninstall-TCMK2WNW.js → uninstall-6QKNGLKK.js} +38 -13
- package/dist/{update-6OYI5BAY.js → update-YJ363TBU.js} +11 -11
- package/dist/{update-check-EJSGVGO6.js → update-check-5JZUJGUM.js} +1 -1
- package/package.json +1 -1
- package/dist/permissions-HZYUVKCY.js +0 -38
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureStatusline,
|
|
3
3
|
getInstalledVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q2QDSYQT.js";
|
|
5
5
|
import {
|
|
6
6
|
ensureShellCompletion
|
|
7
7
|
} from "./chunk-667NMPN4.js";
|
|
@@ -9,40 +9,46 @@ import {
|
|
|
9
9
|
isMemoryMcpRegistered,
|
|
10
10
|
registerMemoryMcp,
|
|
11
11
|
removeMemoryMcpEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CZW36H3D.js";
|
|
13
13
|
import {
|
|
14
14
|
isPluginInstalled
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SUYE5S2W.js";
|
|
16
16
|
import {
|
|
17
17
|
CODEX_MARKETPLACE_NAME,
|
|
18
18
|
getCodexInstalledVersion,
|
|
19
19
|
isCodexMarketplaceLocal,
|
|
20
20
|
isCodexMarketplaceRegistered
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-RG3EMZH6.js";
|
|
22
22
|
import {
|
|
23
|
+
deployAgyPlugin,
|
|
23
24
|
deployOmpAgents,
|
|
25
|
+
isAgyPluginInstalled,
|
|
24
26
|
isOmpAgentInstalled,
|
|
27
|
+
readAgyMcpConfig,
|
|
28
|
+
readAgyPluginVersion,
|
|
29
|
+
resolveAgyPluginSource,
|
|
30
|
+
writeAgyMcpEntry,
|
|
25
31
|
writeOmpExtensionEntry
|
|
26
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-KCBMCHSA.js";
|
|
27
33
|
import {
|
|
28
34
|
resolveHostFlags,
|
|
29
35
|
resolveScope
|
|
30
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-Z5XTSF7L.js";
|
|
31
37
|
import {
|
|
32
38
|
detectHostsAvailable
|
|
33
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-OBCNHQFA.js";
|
|
40
|
+
import {
|
|
41
|
+
readJson
|
|
42
|
+
} from "./chunk-5UVDWG5L.js";
|
|
34
43
|
import {
|
|
35
44
|
commandExists,
|
|
36
45
|
run,
|
|
37
46
|
runWithStderr,
|
|
38
47
|
sleepSync
|
|
39
48
|
} from "./chunk-EVGXUDX4.js";
|
|
40
|
-
import {
|
|
41
|
-
readJson
|
|
42
|
-
} from "./chunk-5UVDWG5L.js";
|
|
43
49
|
import {
|
|
44
50
|
claudeSettingsPath
|
|
45
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-IYBIIRH4.js";
|
|
46
52
|
import {
|
|
47
53
|
log,
|
|
48
54
|
printBanner
|
|
@@ -115,13 +121,14 @@ function argvHasAgentFlag() {
|
|
|
115
121
|
return process.argv.some((a) => a === "--agent" || a.startsWith("--agent="));
|
|
116
122
|
}
|
|
117
123
|
function hasExplicitHost(opts) {
|
|
118
|
-
if (opts.codex === true || opts.omp === true
|
|
124
|
+
if (opts.codex === true || opts.omp === true || opts.agy === true)
|
|
125
|
+
return true;
|
|
119
126
|
if (argvHasAgentFlag()) return true;
|
|
120
127
|
const agent = opts.agent?.trim().toLowerCase();
|
|
121
|
-
return agent === "codex" || agent === "omp";
|
|
128
|
+
return agent === "codex" || agent === "omp" || agent === "agy";
|
|
122
129
|
}
|
|
123
130
|
function flagsForHostResolve(opts) {
|
|
124
|
-
if (!argvHasAgentFlag() && opts.agent === "claude" && (opts.codex === true || opts.omp === true)) {
|
|
131
|
+
if (!argvHasAgentFlag() && opts.agent === "claude" && (opts.codex === true || opts.omp === true || opts.agy === true)) {
|
|
125
132
|
return { ...opts, agent: void 0 };
|
|
126
133
|
}
|
|
127
134
|
return opts;
|
|
@@ -134,6 +141,8 @@ function isHostInstalled(host) {
|
|
|
134
141
|
return isCodexMarketplaceRegistered();
|
|
135
142
|
case "omp":
|
|
136
143
|
return isOmpAgentInstalled("user") || isOmpAgentInstalled("project");
|
|
144
|
+
case "agy":
|
|
145
|
+
return isAgyPluginInstalled();
|
|
137
146
|
}
|
|
138
147
|
}
|
|
139
148
|
function hostSectionTitle(host) {
|
|
@@ -144,11 +153,14 @@ function hostSectionTitle(host) {
|
|
|
144
153
|
return "Codex";
|
|
145
154
|
case "omp":
|
|
146
155
|
return "omp";
|
|
156
|
+
case "agy":
|
|
157
|
+
return "Antigravity";
|
|
147
158
|
}
|
|
148
159
|
}
|
|
149
160
|
async function updateHost(host, opts, mode) {
|
|
150
161
|
if (host === "codex") return updateCodexCommand(opts, mode);
|
|
151
162
|
if (host === "omp") return updateOmpCommand(opts, mode);
|
|
163
|
+
if (host === "agy") return updateAgyCommand(opts, mode);
|
|
152
164
|
return updateClaudeCommand(opts, mode);
|
|
153
165
|
}
|
|
154
166
|
async function updateCommand(opts) {
|
|
@@ -311,7 +323,7 @@ async function updateClaudeCommand(opts, mode) {
|
|
|
311
323
|
}
|
|
312
324
|
let refreshMemoryAfterUpdate = null;
|
|
313
325
|
if (doCli) {
|
|
314
|
-
({ refreshMemoryAfterUpdate } = await import("./memory-
|
|
326
|
+
({ refreshMemoryAfterUpdate } = await import("./memory-4NVLWOFS.js"));
|
|
315
327
|
if (!latestCliVersion) {
|
|
316
328
|
log.warn("Cannot check latest CLI version from npm.");
|
|
317
329
|
} else {
|
|
@@ -530,6 +542,76 @@ async function updateOmpCommand(opts, mode) {
|
|
|
530
542
|
console.log();
|
|
531
543
|
log.dim("Restart omp (or start a new session) to see changes.");
|
|
532
544
|
}
|
|
545
|
+
function restoreAgyExtraMcpServers(previous) {
|
|
546
|
+
if (!previous) return;
|
|
547
|
+
const current = readAgyMcpConfig();
|
|
548
|
+
const currentServers = current?.mcpServers ?? {};
|
|
549
|
+
for (const [name, server] of Object.entries(previous.mcpServers)) {
|
|
550
|
+
if (!(name in currentServers)) {
|
|
551
|
+
writeAgyMcpEntry(name, server);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
async function updateAgyCommand(opts, mode) {
|
|
556
|
+
const updateAll = !opts.cli && !opts.plugin && !opts.statusline;
|
|
557
|
+
const doCli = (updateAll || !!opts.cli) && !mode?.skipCli;
|
|
558
|
+
const doPlugin = updateAll || !!opts.plugin;
|
|
559
|
+
if (!mode?.skipBanner) {
|
|
560
|
+
printBanner("\u2728 Coding Friend Antigravity Update (beta) \u2728");
|
|
561
|
+
console.log();
|
|
562
|
+
}
|
|
563
|
+
if (doPlugin) {
|
|
564
|
+
try {
|
|
565
|
+
const previousMcp = readAgyMcpConfig();
|
|
566
|
+
const beforeVersion = readAgyPluginVersion();
|
|
567
|
+
console.log(
|
|
568
|
+
` Plugin ${beforeVersion ? beforeVersion : chalk.dim("not installed")}`
|
|
569
|
+
);
|
|
570
|
+
const source = resolveAgyPluginSource();
|
|
571
|
+
log.step(`Updating Antigravity plugin (${source.kind} source)...`);
|
|
572
|
+
const { files } = deployAgyPlugin(source.path);
|
|
573
|
+
registerMemoryMcp("agy");
|
|
574
|
+
restoreAgyExtraMcpServers(previousMcp);
|
|
575
|
+
const afterVersion = readAgyPluginVersion();
|
|
576
|
+
const versionPart = afterVersion ? `, v${afterVersion}` : "";
|
|
577
|
+
log.success(`Antigravity plugin updated (${files} files${versionPart}).`);
|
|
578
|
+
} catch (error) {
|
|
579
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
580
|
+
log.error(detail);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
if (doCli) {
|
|
584
|
+
const cliVersion = getCliVersion();
|
|
585
|
+
const latestCliVersion = getLatestCliVersion();
|
|
586
|
+
if (!latestCliVersion) {
|
|
587
|
+
log.warn("Cannot check latest CLI version from npm.");
|
|
588
|
+
} else {
|
|
589
|
+
const cmp = semverCompare(cliVersion, latestCliVersion);
|
|
590
|
+
if (cmp < 0) {
|
|
591
|
+
log.step(
|
|
592
|
+
`CLI update available: ${chalk.yellow(`v${cliVersion}`)} \u2192 ${chalk.green(`v${latestCliVersion}`)}`
|
|
593
|
+
);
|
|
594
|
+
const result = run("npm", [
|
|
595
|
+
"install",
|
|
596
|
+
"-g",
|
|
597
|
+
"coding-friend-cli@latest"
|
|
598
|
+
]);
|
|
599
|
+
if (result === null) {
|
|
600
|
+
log.error(
|
|
601
|
+
"CLI update failed. Try manually: npm install -g coding-friend-cli@latest"
|
|
602
|
+
);
|
|
603
|
+
} else {
|
|
604
|
+
log.success(`CLI updated to ${chalk.green(`v${latestCliVersion}`)}`);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
if (opts.statusline) {
|
|
610
|
+
log.warn("Antigravity does not use the Claude statusline. Skipping.");
|
|
611
|
+
}
|
|
612
|
+
console.log();
|
|
613
|
+
log.dim("Restart Antigravity (or start a new `agy` session) to see changes.");
|
|
614
|
+
}
|
|
533
615
|
|
|
534
616
|
export {
|
|
535
617
|
semverCompare,
|
|
@@ -1,32 +1,52 @@
|
|
|
1
1
|
import {
|
|
2
|
+
readAgyMcpConfig,
|
|
2
3
|
readOmpMcpJson,
|
|
4
|
+
removeAgyMcpEntry,
|
|
3
5
|
removeOmpMcpEntry,
|
|
6
|
+
writeAgyMcpEntry,
|
|
4
7
|
writeOmpMcpEntry
|
|
5
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KCBMCHSA.js";
|
|
6
9
|
import {
|
|
7
10
|
runWithStderr
|
|
8
11
|
} from "./chunk-EVGXUDX4.js";
|
|
9
12
|
import {
|
|
10
13
|
resolvePath
|
|
11
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IYBIIRH4.js";
|
|
12
15
|
import {
|
|
13
16
|
log
|
|
14
17
|
} from "./chunk-NREZK463.js";
|
|
15
18
|
|
|
16
19
|
// src/lib/learn-prompts.ts
|
|
17
20
|
var MCP_NAME = "coding-friend-learn";
|
|
21
|
+
function learnServer(resolvedDir) {
|
|
22
|
+
return {
|
|
23
|
+
command: "npx",
|
|
24
|
+
args: ["-y", "coding-friend-cli", "mcp-serve-learn", resolvedDir]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
18
27
|
function hasOmpLearnEntry() {
|
|
19
28
|
const data = readOmpMcpJson();
|
|
20
29
|
return data !== null && MCP_NAME in data.mcpServers;
|
|
21
30
|
}
|
|
31
|
+
function hasAgyLearnEntry() {
|
|
32
|
+
const data = readAgyMcpConfig();
|
|
33
|
+
return data !== null && MCP_NAME in data.mcpServers;
|
|
34
|
+
}
|
|
22
35
|
function registerLearnMcp(learnDir, host = "claude") {
|
|
23
36
|
const resolved = resolvePath(learnDir);
|
|
24
37
|
if (host === "omp") {
|
|
25
38
|
try {
|
|
26
|
-
writeOmpMcpEntry(MCP_NAME,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
39
|
+
writeOmpMcpEntry(MCP_NAME, learnServer(resolved));
|
|
40
|
+
return true;
|
|
41
|
+
} catch (error) {
|
|
42
|
+
const detail = error instanceof Error ? error.message : "unknown error";
|
|
43
|
+
log.warn(`Could not register MCP: ${detail}`);
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (host === "agy") {
|
|
48
|
+
try {
|
|
49
|
+
writeAgyMcpEntry(MCP_NAME, learnServer(resolved));
|
|
30
50
|
return true;
|
|
31
51
|
} catch (error) {
|
|
32
52
|
const detail = error instanceof Error ? error.message : "unknown error";
|
|
@@ -63,6 +83,7 @@ function registerLearnMcp(learnDir, host = "claude") {
|
|
|
63
83
|
}
|
|
64
84
|
function isLearnMcpRegistered(host = "claude") {
|
|
65
85
|
if (host === "omp") return hasOmpLearnEntry();
|
|
86
|
+
if (host === "agy") return hasAgyLearnEntry();
|
|
66
87
|
const result = runWithStderr("claude", ["mcp", "get", MCP_NAME]);
|
|
67
88
|
return result.exitCode === 0;
|
|
68
89
|
}
|
|
@@ -77,6 +98,16 @@ function unregisterLearnMcp(host = "claude") {
|
|
|
77
98
|
return false;
|
|
78
99
|
}
|
|
79
100
|
}
|
|
101
|
+
if (host === "agy") {
|
|
102
|
+
try {
|
|
103
|
+
removeAgyMcpEntry(MCP_NAME);
|
|
104
|
+
return !hasAgyLearnEntry();
|
|
105
|
+
} catch (error) {
|
|
106
|
+
const detail = error instanceof Error ? error.message : "unknown error";
|
|
107
|
+
log.warn(`Could not unregister MCP: ${detail}`);
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
80
111
|
const result = runWithStderr("claude", [
|
|
81
112
|
"mcp",
|
|
82
113
|
"remove",
|
|
@@ -6,37 +6,63 @@ import {
|
|
|
6
6
|
// src/lib/host.ts
|
|
7
7
|
var CODEX_MIN_VERSION = "0.130.0";
|
|
8
8
|
var OMP_MIN_VERSION = "0.1.0";
|
|
9
|
+
var AGY_MIN_VERSION = "1.1.0";
|
|
9
10
|
function detectHostsAvailable() {
|
|
10
11
|
const hosts = [];
|
|
11
12
|
if (commandExists("claude")) hosts.push("claude");
|
|
12
13
|
if (commandExists("codex")) hosts.push("codex");
|
|
13
14
|
if (commandExists("omp")) hosts.push("omp");
|
|
15
|
+
if (commandExists("agy")) hosts.push("agy");
|
|
14
16
|
return hosts;
|
|
15
17
|
}
|
|
16
18
|
function resolveHost(opts = {}) {
|
|
17
19
|
const agent = opts.agent?.trim().toLowerCase();
|
|
18
20
|
const codexAlias = opts.codex === true;
|
|
19
21
|
const ompAlias = opts.omp === true;
|
|
20
|
-
|
|
22
|
+
const agyAlias = opts.agy === true;
|
|
23
|
+
if (agent && agent !== "claude" && agent !== "codex" && agent !== "omp" && agent !== "agy") {
|
|
21
24
|
throw new Error(
|
|
22
|
-
`Unsupported agent "${opts.agent}". Use "claude", "codex", or "
|
|
25
|
+
`Unsupported agent "${opts.agent}". Use "claude", "codex", "omp", or "agy".`
|
|
23
26
|
);
|
|
24
27
|
}
|
|
25
28
|
if (codexAlias && ompAlias) {
|
|
26
29
|
throw new Error("Use either --codex or --omp, not both.");
|
|
27
30
|
}
|
|
31
|
+
if (agyAlias && codexAlias) {
|
|
32
|
+
throw new Error("Use either --agy or --codex, not both.");
|
|
33
|
+
}
|
|
34
|
+
if (agyAlias && ompAlias) {
|
|
35
|
+
throw new Error("Use either --agy or --omp, not both.");
|
|
36
|
+
}
|
|
28
37
|
if (codexAlias && agent === "claude") {
|
|
29
38
|
throw new Error("Use either --agent claude or --codex, not both.");
|
|
30
39
|
}
|
|
31
40
|
if (ompAlias && agent === "claude") {
|
|
32
41
|
throw new Error("Use either --agent claude or --omp, not both.");
|
|
33
42
|
}
|
|
43
|
+
if (agyAlias && agent === "claude") {
|
|
44
|
+
throw new Error("Use either --agent claude or --agy, not both.");
|
|
45
|
+
}
|
|
34
46
|
if (ompAlias && agent === "codex") {
|
|
35
47
|
throw new Error("Use either --agent codex or --omp, not both.");
|
|
36
48
|
}
|
|
49
|
+
if (agyAlias && agent === "codex") {
|
|
50
|
+
throw new Error("Use either --agent codex or --agy, not both.");
|
|
51
|
+
}
|
|
37
52
|
if (codexAlias && agent === "omp") {
|
|
38
53
|
throw new Error("Use either --agent omp or --codex, not both.");
|
|
39
54
|
}
|
|
55
|
+
if (agyAlias && agent === "omp") {
|
|
56
|
+
throw new Error("Use either --agent omp or --agy, not both.");
|
|
57
|
+
}
|
|
58
|
+
if (codexAlias && agent === "agy") {
|
|
59
|
+
throw new Error("Use either --agent agy or --codex, not both.");
|
|
60
|
+
}
|
|
61
|
+
if (ompAlias && agent === "agy") {
|
|
62
|
+
throw new Error("Use either --agent agy or --omp, not both.");
|
|
63
|
+
}
|
|
64
|
+
if (agyAlias) return "agy";
|
|
65
|
+
if (agent === "agy") return "agy";
|
|
40
66
|
if (ompAlias) return "omp";
|
|
41
67
|
if (agent === "omp") return "omp";
|
|
42
68
|
if (codexAlias) return "codex";
|
|
@@ -49,6 +75,9 @@ function getCodexMinVersion() {
|
|
|
49
75
|
function getOmpMinVersion() {
|
|
50
76
|
return OMP_MIN_VERSION;
|
|
51
77
|
}
|
|
78
|
+
function getAgyMinVersion() {
|
|
79
|
+
return AGY_MIN_VERSION;
|
|
80
|
+
}
|
|
52
81
|
function checkCodexVersion() {
|
|
53
82
|
const min = getCodexMinVersion();
|
|
54
83
|
const output = run("codex", ["--version"]);
|
|
@@ -69,6 +98,16 @@ function checkOmpVersion() {
|
|
|
69
98
|
min
|
|
70
99
|
};
|
|
71
100
|
}
|
|
101
|
+
function checkAgyVersion() {
|
|
102
|
+
const min = getAgyMinVersion();
|
|
103
|
+
const output = run("agy", ["--version"]);
|
|
104
|
+
const actual = output ? extractVersion(output) : void 0;
|
|
105
|
+
return {
|
|
106
|
+
ok: actual ? compareVersions(actual, min) >= 0 : false,
|
|
107
|
+
actual,
|
|
108
|
+
min
|
|
109
|
+
};
|
|
110
|
+
}
|
|
72
111
|
function extractVersion(input) {
|
|
73
112
|
return input.match(/\b(\d+\.\d+\.\d+)\b/)?.[1];
|
|
74
113
|
}
|
|
@@ -95,5 +134,6 @@ export {
|
|
|
95
134
|
resolveHost,
|
|
96
135
|
checkCodexVersion,
|
|
97
136
|
checkOmpVersion,
|
|
137
|
+
checkAgyVersion,
|
|
98
138
|
compareVersions
|
|
99
139
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveHost
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
run
|
|
6
|
-
} from "./chunk-EVGXUDX4.js";
|
|
3
|
+
} from "./chunk-OBCNHQFA.js";
|
|
7
4
|
import {
|
|
8
5
|
readJson
|
|
9
6
|
} from "./chunk-5UVDWG5L.js";
|
|
7
|
+
import {
|
|
8
|
+
run
|
|
9
|
+
} from "./chunk-EVGXUDX4.js";
|
|
10
10
|
import {
|
|
11
11
|
globalConfigPath,
|
|
12
12
|
localConfigPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IYBIIRH4.js";
|
|
14
14
|
import {
|
|
15
15
|
log
|
|
16
16
|
} from "./chunk-NREZK463.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadConfig,
|
|
3
3
|
resolveMemoryDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-E4NBTQXR.js";
|
|
5
5
|
import "./chunk-3WIZA5OZ.js";
|
|
6
|
-
import "./chunk-EVGXUDX4.js";
|
|
7
6
|
import "./chunk-5UVDWG5L.js";
|
|
7
|
+
import "./chunk-EVGXUDX4.js";
|
|
8
8
|
import {
|
|
9
9
|
resolvePath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IYBIIRH4.js";
|
|
11
11
|
import {
|
|
12
12
|
log,
|
|
13
13
|
printBanner
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
+
afterAutoApproveEnabled,
|
|
2
3
|
getAllRules,
|
|
3
4
|
getExistingRules
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KG6HYBGD.js";
|
|
5
6
|
import {
|
|
6
7
|
listMdFilesRecursive
|
|
7
8
|
} from "./chunk-2DTXVMPQ.js";
|
|
8
9
|
import {
|
|
9
10
|
resolveLearnDir
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-E4NBTQXR.js";
|
|
11
12
|
import {
|
|
12
13
|
findStatuslineHookPath,
|
|
13
14
|
getCurrentAccountEmail,
|
|
@@ -18,7 +19,7 @@ import {
|
|
|
18
19
|
saveStatuslineConfig,
|
|
19
20
|
selectStatuslineComponents,
|
|
20
21
|
writeStatuslineSettings
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-Q2QDSYQT.js";
|
|
22
23
|
import {
|
|
23
24
|
ALL_COMPONENT_IDS,
|
|
24
25
|
DEFAULT_CONFIG
|
|
@@ -26,7 +27,7 @@ import {
|
|
|
26
27
|
import {
|
|
27
28
|
registerLearnMcp,
|
|
28
29
|
unregisterLearnMcp
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NIMO4VJW.js";
|
|
30
31
|
import {
|
|
31
32
|
ensureShellCompletion,
|
|
32
33
|
hasShellCompletion,
|
|
@@ -34,8 +35,8 @@ import {
|
|
|
34
35
|
} from "./chunk-667NMPN4.js";
|
|
35
36
|
import {
|
|
36
37
|
memoryConfigMenu
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-CZW36H3D.js";
|
|
39
|
+
import "./chunk-KCBMCHSA.js";
|
|
39
40
|
import {
|
|
40
41
|
BACK,
|
|
41
42
|
applyDocsDirChange,
|
|
@@ -45,22 +46,21 @@ import {
|
|
|
45
46
|
getScopeLabel,
|
|
46
47
|
injectBackChoice,
|
|
47
48
|
showConfigHint
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-EVGXUDX4.js";
|
|
49
|
+
} from "./chunk-Z5XTSF7L.js";
|
|
50
|
+
import "./chunk-TN3Y75WG.js";
|
|
51
|
+
import "./chunk-OBCNHQFA.js";
|
|
52
52
|
import {
|
|
53
53
|
mergeJson,
|
|
54
54
|
readJson
|
|
55
55
|
} from "./chunk-5UVDWG5L.js";
|
|
56
|
+
import "./chunk-EVGXUDX4.js";
|
|
56
57
|
import {
|
|
57
58
|
claudeLocalSettingsPath,
|
|
58
|
-
claudeProjectSettingsPath,
|
|
59
59
|
claudeSettingsPath,
|
|
60
60
|
globalConfigPath,
|
|
61
61
|
localConfigPath,
|
|
62
62
|
resolvePath
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-IYBIIRH4.js";
|
|
64
64
|
import {
|
|
65
65
|
log,
|
|
66
66
|
printBanner
|
|
@@ -536,29 +536,32 @@ async function editAutoApprove(globalCfg, localCfg) {
|
|
|
536
536
|
log.dim(`Current: ${currentValue}`);
|
|
537
537
|
}
|
|
538
538
|
const value = await confirm({
|
|
539
|
-
message: "Enable auto-approve? (
|
|
539
|
+
message: "Enable auto-approve? (Claude: LLM classifier; Antigravity/Codex: deterministic rules, no LLM)",
|
|
540
540
|
default: currentValue ?? false
|
|
541
541
|
});
|
|
542
542
|
const scope = await askScope();
|
|
543
543
|
if (scope === "back") return;
|
|
544
544
|
writeToScope(scope, { autoApprove: value });
|
|
545
545
|
if (value) {
|
|
546
|
-
|
|
547
|
-
await runDangerousRulesAudit(
|
|
548
|
-
[
|
|
549
|
-
claudeProjectSettingsPath(),
|
|
550
|
-
claudeLocalSettingsPath(),
|
|
551
|
-
claudeSettingsPath()
|
|
552
|
-
],
|
|
546
|
+
await afterAutoApproveEnabled(
|
|
553
547
|
log,
|
|
554
548
|
(message) => confirm({ message, default: true })
|
|
555
549
|
);
|
|
556
|
-
log.dim(
|
|
557
|
-
"Tip: Fine-tune with autoApproveAllowExtra / autoApproveIgnore in config.json"
|
|
558
|
-
);
|
|
559
|
-
log.dim("Docs: https://cf.dinhanhthi.com/docs/reference/auto-approve/");
|
|
560
550
|
}
|
|
561
551
|
}
|
|
552
|
+
async function editPrivacyBlock(globalCfg, localCfg) {
|
|
553
|
+
const currentValue = getMergedValue("privacyBlock", globalCfg, localCfg);
|
|
554
|
+
if (currentValue !== void 0) {
|
|
555
|
+
log.dim(`Current: ${currentValue}`);
|
|
556
|
+
}
|
|
557
|
+
const value = await confirm({
|
|
558
|
+
message: "Keep privacy-block enabled? (deny .env / credentials / keys)",
|
|
559
|
+
default: currentValue !== false
|
|
560
|
+
});
|
|
561
|
+
const scope = await askScope();
|
|
562
|
+
if (scope === "back") return;
|
|
563
|
+
writeToScope(scope, { privacyBlock: value });
|
|
564
|
+
}
|
|
562
565
|
async function editStatusline() {
|
|
563
566
|
const hookResult = findStatuslineHookPath();
|
|
564
567
|
if (!hookResult) {
|
|
@@ -739,7 +742,7 @@ async function editPermissions() {
|
|
|
739
742
|
)
|
|
740
743
|
});
|
|
741
744
|
if (choice === BACK) return;
|
|
742
|
-
const { permissionCommand } = await import("./permission-
|
|
745
|
+
const { permissionCommand } = await import("./permission-L5QMNMID.js");
|
|
743
746
|
switch (choice) {
|
|
744
747
|
case "interactive":
|
|
745
748
|
await permissionCommand({});
|
|
@@ -774,6 +777,16 @@ async function configCommand() {
|
|
|
774
777
|
globalCfg,
|
|
775
778
|
localCfg
|
|
776
779
|
);
|
|
780
|
+
const privacyBlockScope = getScopeLabel(
|
|
781
|
+
"privacyBlock",
|
|
782
|
+
globalCfg,
|
|
783
|
+
localCfg
|
|
784
|
+
);
|
|
785
|
+
const privacyBlockVal = getMergedValue(
|
|
786
|
+
"privacyBlock",
|
|
787
|
+
globalCfg,
|
|
788
|
+
localCfg
|
|
789
|
+
);
|
|
777
790
|
const reviewScope = getScopeLabel("review", globalCfg, localCfg);
|
|
778
791
|
const withCodexVal = getMergedValue("review", globalCfg, localCfg)?.withCodex;
|
|
779
792
|
const planDocsScope = getScopeLabel("disableGUIPlan", globalCfg, localCfg);
|
|
@@ -820,7 +833,12 @@ async function configCommand() {
|
|
|
820
833
|
{
|
|
821
834
|
name: `Auto-approve ${formatScopeLabel(autoApproveScope)}${autoApproveVal !== void 0 ? ` (${autoApproveVal})` : ""}`,
|
|
822
835
|
value: "autoApprove",
|
|
823
|
-
description: "
|
|
836
|
+
description: " Claude: LLM classifier; Antigravity/Codex: deterministic rules"
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
name: `Privacy-block ${formatScopeLabel(privacyBlockScope)}${privacyBlockVal !== void 0 ? ` (${privacyBlockVal})` : ""}`,
|
|
840
|
+
value: "privacyBlock",
|
|
841
|
+
description: " Block reads of .env, keys, and similar secrets (all hosts)"
|
|
824
842
|
},
|
|
825
843
|
{
|
|
826
844
|
name: `Codex dual-review ${formatScopeLabel(reviewScope)}${withCodexVal !== void 0 ? ` (${withCodexVal})` : ""}`,
|
|
@@ -878,6 +896,9 @@ async function configCommand() {
|
|
|
878
896
|
case "autoApprove":
|
|
879
897
|
await editAutoApprove(globalCfg, localCfg);
|
|
880
898
|
break;
|
|
899
|
+
case "privacyBlock":
|
|
900
|
+
await editPrivacyBlock(globalCfg, localCfg);
|
|
901
|
+
break;
|
|
881
902
|
case "review":
|
|
882
903
|
await editReviewWithCodex(globalCfg, localCfg);
|
|
883
904
|
break;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureStatusline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q2QDSYQT.js";
|
|
4
4
|
import "./chunk-3WIZA5OZ.js";
|
|
5
5
|
import {
|
|
6
6
|
ensureShellCompletion
|
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
isMarketplaceRegistered,
|
|
10
10
|
isPluginInstalled
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SUYE5S2W.js";
|
|
12
|
+
import {
|
|
13
|
+
readJson,
|
|
14
|
+
writeJson
|
|
15
|
+
} from "./chunk-5UVDWG5L.js";
|
|
12
16
|
import {
|
|
13
17
|
commandExists,
|
|
14
18
|
run,
|
|
15
19
|
runWithStderr
|
|
16
20
|
} from "./chunk-EVGXUDX4.js";
|
|
17
|
-
import {
|
|
18
|
-
readJson,
|
|
19
|
-
writeJson
|
|
20
|
-
} from "./chunk-5UVDWG5L.js";
|
|
21
21
|
import {
|
|
22
22
|
devStatePath,
|
|
23
23
|
knownMarketplacesPath,
|
|
24
24
|
pluginCachePath
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-IYBIIRH4.js";
|
|
26
26
|
import {
|
|
27
27
|
log,
|
|
28
28
|
printBanner
|