@tryglen/cli 0.4.1 → 0.5.1
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/_utils/codex-app-server.d.ts +11 -0
- package/dist/_utils/codex-app-server.js +90 -0
- package/dist/_utils/codex-app-server.js.map +1 -0
- package/dist/_utils/codex-hooks-merge.d.ts +20 -0
- package/dist/_utils/codex-hooks-merge.js +63 -0
- package/dist/_utils/codex-hooks-merge.js.map +1 -0
- package/dist/_utils/codex-hooks-setup.d.ts +8 -0
- package/dist/_utils/codex-hooks-setup.js +152 -0
- package/dist/_utils/codex-hooks-setup.js.map +1 -0
- package/dist/_utils/codex-paths.d.ts +4 -0
- package/dist/_utils/codex-paths.js +10 -0
- package/dist/_utils/codex-paths.js.map +1 -0
- package/dist/_utils/codex-repair-trace.d.ts +11 -0
- package/dist/_utils/codex-repair-trace.js +42 -0
- package/dist/_utils/codex-repair-trace.js.map +1 -0
- package/dist/_utils/codex-trust-toml.d.ts +7 -0
- package/dist/_utils/codex-trust-toml.js +42 -0
- package/dist/_utils/codex-trust-toml.js.map +1 -0
- package/dist/_utils/ensure-global-cli.d.ts +28 -0
- package/dist/_utils/ensure-global-cli.js +83 -0
- package/dist/_utils/ensure-global-cli.js.map +1 -0
- package/dist/bin.js +28 -2
- package/dist/bin.js.map +1 -1
- package/dist/commands/doctor.d.ts +4 -3
- package/dist/commands/doctor.js +47 -4
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/ingest.js +24 -4
- package/dist/commands/ingest.js.map +1 -1
- package/dist/commands/install.d.ts +1 -1
- package/dist/commands/install.js +122 -25
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/session-start.d.ts +1 -1
- package/dist/commands/session-start.js +21 -4
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/uninstall.d.ts +11 -0
- package/dist/commands/uninstall.js +41 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { isCodexHooksInstalled, uninstallCodexHooks, } from "../_utils/codex-hooks-setup.js";
|
|
2
|
+
import { ok } from "../_utils/result.js";
|
|
3
|
+
import { isInstalled } from "../_utils/which.js";
|
|
4
|
+
/**
|
|
5
|
+
* `glen uninstall`
|
|
6
|
+
*
|
|
7
|
+
* Inverse of `glen install`'s codex-hooks registration: strips glen-owned
|
|
8
|
+
* entries from ~/.codex/hooks.json, removes glen's [hooks.state] trust
|
|
9
|
+
* blocks, clears the install marker. Other tools' hooks are untouched.
|
|
10
|
+
* Plugin removal itself stays with the agents' own CLIs (printed below).
|
|
11
|
+
*/
|
|
12
|
+
const uninstall = async () => {
|
|
13
|
+
process.stdout.write("\n 🏔️ glen — uninstall\n\n");
|
|
14
|
+
const codexHooksPresent = await isCodexHooksInstalled();
|
|
15
|
+
if (codexHooksPresent) {
|
|
16
|
+
process.stdout.write(" Removing glen hooks from Codex's user config layer... ");
|
|
17
|
+
const r = await uninstallCodexHooks();
|
|
18
|
+
if (!r.ok) {
|
|
19
|
+
process.stdout.write(`✗\n ${r.error}\n`);
|
|
20
|
+
return r;
|
|
21
|
+
}
|
|
22
|
+
process.stdout.write("✓\n");
|
|
23
|
+
process.stdout.write(" Note: Codex trust keys are positional — if other tools registered\n" +
|
|
24
|
+
" hooks after glen, re-trust them via /hooks in Codex.\n");
|
|
25
|
+
}
|
|
26
|
+
const codexInstalled = isInstalled("codex");
|
|
27
|
+
const claudeInstalled = isInstalled("claude");
|
|
28
|
+
if (codexInstalled || claudeInstalled) {
|
|
29
|
+
process.stdout.write("\n To remove the plugins themselves:\n");
|
|
30
|
+
if (codexInstalled) {
|
|
31
|
+
process.stdout.write(" codex plugin remove glen\n");
|
|
32
|
+
}
|
|
33
|
+
if (claudeInstalled) {
|
|
34
|
+
process.stdout.write(" claude plugin uninstall glen@glen\n");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
process.stdout.write("\n Credentials and session state in ~/.glen are kept (remove with `glen logout`).\n\n");
|
|
38
|
+
return ok(undefined);
|
|
39
|
+
};
|
|
40
|
+
export { uninstall };
|
|
41
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../src/commands/uninstall.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAe,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,SAAS,GAAG,KAAK,IAAmC,EAAE;IAC1D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAErD,MAAM,iBAAiB,GAAG,MAAM,qBAAqB,EAAE,CAAC;IACxD,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,0DAA0D,CAC3D,CAAC;QACF,MAAM,CAAC,GAAG,MAAM,mBAAmB,EAAE,CAAC;QACtC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YACV,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;YAC1C,OAAO,CAAC,CAAC;QACX,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5B,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,uEAAuE;YACrE,0DAA0D,CAC7D,CAAC;IACJ,CAAC;IAED,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,cAAc,IAAI,eAAe,EAAE,CAAC;QACtC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAChE,IAAI,cAAc,EAAE,CAAC;YACnB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACzD,CAAC;QACD,IAAI,eAAe,EAAE,CAAC;YACpB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,wFAAwF,CACzF,CAAC;IACF,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|