@tiens.nguyen/gu-cli 1.0.939 → 1.0.940
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 +17 -7
- package/agent-deps-preflight.mjs +1 -1
- package/autocompact.mjs +2 -2
- package/browser-bridge.mjs +2 -2
- package/browser-chrome.mjs +2 -2
- package/browser-command.mjs +4 -4
- package/browser-extension/README.md +6 -6
- package/clear-logs.mjs +3 -3
- package/clear-state.mjs +3 -3
- package/cli-token.mjs +8 -8
- package/client-expert-api.mjs +9 -9
- package/client-expert-run.mjs +7 -7
- package/client-expert-setup.mjs +4 -4
- package/command-allow.mjs +1 -1
- package/conversation-archive.mjs +2 -2
- package/credential-recovery.mjs +1 -1
- package/daemon-control.mjs +4 -4
- package/device-login.mjs +3 -3
- package/free-model.mjs +1 -1
- package/full-log-command.mjs +1 -1
- package/gonext_agent_chat.py +71 -71
- package/gu-cli.mjs +29 -28
- package/gu-home-move.mjs +193 -0
- package/gu-repl.mjs +54 -51
- package/gu_browser.py +3 -3
- package/gu_free_budget.py +2 -2
- package/gu_gif.py +1 -1
- package/gu_hooks.py +1 -1
- package/gu_turn_notes.py +2 -2
- package/hooks-config.mjs +4 -4
- package/image-paste.mjs +8 -8
- package/install-path.mjs +1 -1
- package/log-level.mjs +1 -1
- package/log-policy.mjs +1 -1
- package/lsp-host.mjs +2 -2
- package/lsp-registry.mjs +9 -9
- package/mcp-command.mjs +1 -1
- package/mcp-config.mjs +5 -5
- package/model-doctor.mjs +10 -10
- package/mongo-mac.mjs +2 -2
- package/mongo-windows.mjs +3 -3
- package/package.json +2 -1
- package/platform-tools.mjs +3 -3
- package/poll-errors.mjs +2 -2
- package/prompt_scaffold_check.py +1 -1
- package/proxy-store.mjs +1 -1
- package/python-unix.mjs +6 -6
- package/python-windows.mjs +1 -1
- package/rag-selftest.mjs +2 -2
- package/resume-memory.mjs +1 -1
- package/scripts/image-paste-check.mjs +1 -1
- package/setup-fixes.mjs +4 -4
- package/shell-details.mjs +2 -2
- package/skill-install.mjs +9 -9
- package/skill-package.mjs +10 -10
- package/skill-source.mjs +4 -4
- package/skills-copy.mjs +15 -15
- package/skills.mjs +4 -4
- package/support-bundle.mjs +6 -6
- package/support-report.mjs +5 -5
- package/terminal-layout.mjs +1 -1
- package/turn-notes.mjs +2 -2
- package/version-check.mjs +1 -1
- package/workspace-revert.mjs +2 -2
package/lsp-host.mjs
CHANGED
|
@@ -130,7 +130,7 @@ export class LspHost {
|
|
|
130
130
|
return entry;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
/** Install a server into ~/.
|
|
133
|
+
/** Install a server into ~/.gu/lsp (npm), once at a time per language. */
|
|
134
134
|
install(lang) {
|
|
135
135
|
if (this.installing.has(installKey(lang))) return this.installing.get(installKey(lang));
|
|
136
136
|
const { cmd, args } = installCommand(lang, this.home);
|
|
@@ -329,7 +329,7 @@ export class LspHost {
|
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
/**
|
|
332
|
-
* Serve a host on 127.0.0.1 (a free port) and write where to reach it to ~/.
|
|
332
|
+
* Serve a host on 127.0.0.1 (a free port) and write where to reach it to ~/.gu/lsp-host.json.
|
|
333
333
|
* → { url, token, host, close }.
|
|
334
334
|
*/
|
|
335
335
|
export async function serveLspHost({ home, log = () => {}, host = new LspHost({ home, log }) } = {}) {
|
package/lsp-registry.mjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* see the table's `licence`). Claude Code's plugins are the same idea — a few lines saying which
|
|
10
10
|
* program serves which file types — without the install: gu offers to install it, with consent.
|
|
11
11
|
*
|
|
12
|
-
* The user's choices are ~/.
|
|
12
|
+
* The user's choices are ~/.gu/lsp-state.json, written by the terminal (the offer, /lsp) and
|
|
13
13
|
* read by the worker's host (lsp-host.mjs):
|
|
14
14
|
* { "languages": { "<id>": "on" | "off" | "never" }, "neverAsk": false, "ignored": 0 }
|
|
15
15
|
*/
|
|
@@ -260,12 +260,12 @@ export const LSP_LANGUAGES = BUILTIN_LANGUAGES;
|
|
|
260
260
|
* <workspace>/.gu/lsp.json this project, gu's file
|
|
261
261
|
* <workspace>/.lsp.json this project, Claude Code's plugin file (a team that set it up for
|
|
262
262
|
* Claude Code gets the same servers in gu)
|
|
263
|
-
* ~/.
|
|
263
|
+
* ~/.gu/lsp.json every project on this computer
|
|
264
264
|
* Each holds either Claude Code's shape — { "<id>": { command, args, extensionToLanguage, env,
|
|
265
265
|
* initializationOptions, settings, startupTimeout, … } } — or the same map under "lspServers".
|
|
266
266
|
*/
|
|
267
267
|
export const customLspFiles = (home, workspace) =>
|
|
268
|
-
[workspace && join(workspace, ".gu", "lsp.json"), workspace && join(workspace, ".lsp.json"), home && join(home, ".
|
|
268
|
+
[workspace && join(workspace, ".gu", "lsp.json"), workspace && join(workspace, ".lsp.json"), home && join(home, ".gu", "lsp.json")].filter(Boolean);
|
|
269
269
|
|
|
270
270
|
const ID_RE = /^[A-Za-z0-9][\w.-]{0,40}$/;
|
|
271
271
|
|
|
@@ -355,9 +355,9 @@ export function languageFor(file, langs = BUILTIN_LANGUAGES) {
|
|
|
355
355
|
export const lspExtensions = (langs = BUILTIN_LANGUAGES) => [...new Set(langs.flatMap((l) => Object.keys(l.exts)))];
|
|
356
356
|
|
|
357
357
|
/** Where gu installs npm servers: its own folder, no admin rights, nothing global. */
|
|
358
|
-
export const lspInstallDir = (home) => join(home, ".
|
|
359
|
-
export const lspStatePath = (home) => join(home, ".
|
|
360
|
-
export const lspHostPath = (home) => join(home, ".
|
|
358
|
+
export const lspInstallDir = (home) => join(home, ".gu", "lsp");
|
|
359
|
+
export const lspStatePath = (home) => join(home, ".gu", "lsp-state.json");
|
|
360
|
+
export const lspHostPath = (home) => join(home, ".gu", "lsp-host.json");
|
|
361
361
|
|
|
362
362
|
// ---------------------------------------------------------------------------------------------
|
|
363
363
|
// the user's choices
|
|
@@ -408,7 +408,7 @@ export function applyOfferAnswer(state, id, choice) {
|
|
|
408
408
|
|
|
409
409
|
/** The offer's rows, the first highlighted. Swift needs no download, so it is "turn on". */
|
|
410
410
|
export function offerRows(lang, { needsInstall }) {
|
|
411
|
-
const install = lang.tool ? `Yes, install ${lang.server} (${lang.tool.what})` : `Yes, install ${lang.server} (${lang.size}, into ~/.
|
|
411
|
+
const install = lang.tool ? `Yes, install ${lang.server} (${lang.tool.what})` : `Yes, install ${lang.server} (${lang.size}, into ~/.gu/lsp)`;
|
|
412
412
|
return [
|
|
413
413
|
needsInstall ? install : "Yes, turn it on",
|
|
414
414
|
"Not now",
|
|
@@ -450,7 +450,7 @@ export function xcodeDeveloperDir({ exists = existsSync, selected = "" } = {}) {
|
|
|
450
450
|
|
|
451
451
|
/**
|
|
452
452
|
* How to start a language's server here → { cmd, args, env } or null (not installed).
|
|
453
|
-
* Order: gu's own install (~/.
|
|
453
|
+
* Order: gu's own install (~/.gu/lsp), then PATH; Swift on macOS through xcrun with the Xcode
|
|
454
454
|
* picked above.
|
|
455
455
|
*/
|
|
456
456
|
export function resolveServer(lang, { home, platform = process.platform, env = process.env, run = execFileSync, exists = existsSync } = {}) {
|
|
@@ -494,7 +494,7 @@ export function resolveServer(lang, { home, platform = process.platform, env = p
|
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
/**
|
|
497
|
-
* Can gu install this language's server itself? npm ones always (into ~/.
|
|
497
|
+
* Can gu install this language's server itself? npm ones always (into ~/.gu/lsp); Go and Rust
|
|
498
498
|
* when their own tool (`go`, `rustup`) is on this computer. Swift and C/C++ come with their toolchain.
|
|
499
499
|
*/
|
|
500
500
|
export function canInstall(lang, { env = process.env, platform = process.platform } = {}) {
|
package/mcp-command.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* list every server, whether it connects, how many tools (the default)
|
|
5
5
|
* tools <name> that server's tools
|
|
6
6
|
* add … `claude mcp add`'s shape; `/mcp add` alone asks step by step
|
|
7
|
-
* remove <name> from your ~/.
|
|
7
|
+
* remove <name> from your ~/.gu/mcp.json
|
|
8
8
|
* enable|disable <name> keep it configured, stop starting it
|
|
9
9
|
* approve|unapprove <name> a project's .mcp.json server, for this folder
|
|
10
10
|
* allow <name> [tool] its tools run without asking (all, or one)
|
package/mcp-config.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MCP SERVERS — where they are configured, and who may call their tools (task #269).
|
|
3
3
|
*
|
|
4
|
-
* ~/.
|
|
4
|
+
* ~/.gu/mcp.json yours: { mcpServers, disabled, permissions: { allow, deny }, approvedProjects }
|
|
5
5
|
* <project>/.mcp.json the project's — Claude Code's own file and format, so one file serves both
|
|
6
6
|
*
|
|
7
7
|
* The shapes are Claude Code's: `mcpServers: { name: { type: "stdio", command, args, env } }`, and
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
* as untrusted, and a hostile server would simply claim it.
|
|
20
20
|
*
|
|
21
21
|
* CLAUDE CODE'S SERVERS (#325). A folder that chose "Claude's skills" (/switch-skill) takes YOUR
|
|
22
|
-
* servers from Claude Code's own file instead of ~/.
|
|
22
|
+
* servers from Claude Code's own file instead of ~/.gu/mcp.json:
|
|
23
23
|
* ~/.claude.json projects["<this folder>"].mcpServers (Claude's "local" scope — this folder only)
|
|
24
24
|
* ~/.claude.json mcpServers (Claude's "user" scope — every folder)
|
|
25
25
|
* The project's .mcp.json is the same file either way. Yours still win over the project's. gu's own
|
|
26
26
|
* bookkeeping — disabled, the allow/deny rules, which project servers you approved — stays in
|
|
27
|
-
* ~/.
|
|
27
|
+
* ~/.gu/mcp.json whichever source is chosen: Claude Code's file has no place for it, and gu
|
|
28
28
|
* reads Claude's setup without Claude ever having to read gu's.
|
|
29
29
|
*
|
|
30
30
|
* ~/.claude.json IS CLAUDE CODE'S WHOLE STATE FILE, not a config file of ours. It is only written
|
|
@@ -43,7 +43,7 @@ import { resolveSkillSource } from "./skill-source.mjs";
|
|
|
43
43
|
export const SERVER_NAME_RE = /^[A-Za-z0-9_-]{1,64}$/;
|
|
44
44
|
|
|
45
45
|
export function userConfigPath(home = homedir()) {
|
|
46
|
-
return join(home, ".
|
|
46
|
+
return join(home, ".gu", "mcp.json");
|
|
47
47
|
}
|
|
48
48
|
export function projectConfigPath(cwd) {
|
|
49
49
|
return join(cwd, ".mcp.json");
|
|
@@ -122,7 +122,7 @@ export function updateClaudeConfig(mutate, home = homedir()) {
|
|
|
122
122
|
return raw;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
/** Write ~/.
|
|
125
|
+
/** Write ~/.gu/mcp.json atomically: a crash mid-write leaves the old file, never half of one. */
|
|
126
126
|
function writeUserRaw(raw, home) {
|
|
127
127
|
const file = userConfigPath(home);
|
|
128
128
|
mkdirSync(dirname(file), { recursive: true });
|
package/model-doctor.mjs
CHANGED
|
@@ -42,7 +42,7 @@ const EMBED_SCRIPT = fileURLToPath(new URL("./gonext_mlx_embed.py", import.meta.
|
|
|
42
42
|
function python3Bin() {
|
|
43
43
|
const explicit = (process.env.GONEXT_PROBE_PYTHON ?? process.env.GONEXT_MLX_LM_PYTHON ?? "").trim();
|
|
44
44
|
if (explicit) return explicit;
|
|
45
|
-
// gu's OWN environment, when it has one (~/.
|
|
45
|
+
// gu's OWN environment, when it has one (~/.gu/venv): the agent's packages were installed INTO it, so a new
|
|
46
46
|
// process must look there, not in the system Python — or it asks to install them at every start (GH #308).
|
|
47
47
|
const own = ownVenvPython();
|
|
48
48
|
if (own) return own;
|
|
@@ -95,7 +95,7 @@ export function resolvePythonPath() {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
|
-
* Persist that interpreter into ~/.
|
|
98
|
+
* Persist that interpreter into ~/.gu/worker.env as GONEXT_PROBE_PYTHON, so every future
|
|
99
99
|
* daemon uses it regardless of the PATH it happens to start with. Merges — never rewrites the
|
|
100
100
|
* file from scratch. Returns the path written, or "" when nothing needed doing.
|
|
101
101
|
*/
|
|
@@ -153,7 +153,7 @@ export function isPipMissing(output) {
|
|
|
153
153
|
/** How long one pip run may take before gu stops waiting (GU_PIP_TIMEOUT_MS overrides; a slow line needs more). */
|
|
154
154
|
export const PIP_TIMEOUT_MS = Number(process.env.GU_PIP_TIMEOUT_MS ?? "") || 600_000;
|
|
155
155
|
/** Where a pip run's whole output is kept, so a failure can be read afterwards. */
|
|
156
|
-
export const PIP_LOG_FILE = join(homedir(), ".
|
|
156
|
+
export const PIP_LOG_FILE = join(homedir(), ".gu", "pip-install.log");
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
159
|
* Run pip once. Resolves { code, err, timedOut } — never rejects, so the caller owns the policy.
|
|
@@ -223,7 +223,7 @@ function runPip(python, pkgs, extraArgs = [], { log = () => {}, timeoutMs = PIP_
|
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
|
-
* A private virtualenv at ~/.
|
|
226
|
+
* A private virtualenv at ~/.gu/venv, created on demand. → its python, or "".
|
|
227
227
|
*
|
|
228
228
|
* THE RIGHT ANSWER TO PEP 668, and the machinery for it already existed: the daemon's
|
|
229
229
|
* interpreter is pinned through GONEXT_PROBE_PYTHON precisely so the packages and the process
|
|
@@ -287,7 +287,7 @@ async function pipInstall(pkgs, log) {
|
|
|
287
287
|
return venvPy;
|
|
288
288
|
};
|
|
289
289
|
|
|
290
|
-
// WINDOWS: gu's OWN environment (~/.
|
|
290
|
+
// WINDOWS: gu's OWN environment (~/.gu/venv) from the start. The system Python is somebody else's: writing
|
|
291
291
|
// into it needs an administrator, can clash with their packages, and cannot be undone with one folder delete.
|
|
292
292
|
// (GU_PIP_SYSTEM=1 keeps the old behaviour.)
|
|
293
293
|
if (process.platform === "win32" && process.env.GU_PIP_SYSTEM !== "1") {
|
|
@@ -349,7 +349,7 @@ export function chatRamWarningLines(repo, totalBytes) {
|
|
|
349
349
|
return out;
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
const DIR = join(homedir(), ".
|
|
352
|
+
const DIR = join(homedir(), ".gu");
|
|
353
353
|
export const MODEL_PID_FILE = join(DIR, "model.pid");
|
|
354
354
|
export const MODEL_LOG_FILE = join(DIR, "model.log");
|
|
355
355
|
const EMBED_PID_FILE = join(DIR, "embed.pid");
|
|
@@ -854,7 +854,7 @@ export async function testEmbeddings(baseUrl, model, { timeoutMs = 20000 } = {})
|
|
|
854
854
|
*/
|
|
855
855
|
export async function listLocalRagIndexes() {
|
|
856
856
|
const { readdir, readFile: rf, stat: st } = await import("node:fs/promises");
|
|
857
|
-
const root = join(homedir(), ".
|
|
857
|
+
const root = join(homedir(), ".gu", "rag");
|
|
858
858
|
const out = [];
|
|
859
859
|
let folders = [];
|
|
860
860
|
try {
|
|
@@ -1410,9 +1410,9 @@ export async function ensureSkillsLibs({ log, confirm, agreed = [], pip = pipIns
|
|
|
1410
1410
|
|
|
1411
1411
|
/** npm packages the docx and pptx skills `require()`; they were documented as preinstalled but nothing installed them. */
|
|
1412
1412
|
export const SKILLS_NODE_PACKAGES = ["docx", "pptxgenjs"];
|
|
1413
|
-
/** Where they go: ~/.
|
|
1413
|
+
/** Where they go: ~/.gu/node-libs/node_modules (the agent shell gets it as NODE_PATH). */
|
|
1414
1414
|
export function skillsNodeDir() {
|
|
1415
|
-
return join(homedir(), ".
|
|
1415
|
+
return join(homedir(), ".gu", "node-libs");
|
|
1416
1416
|
}
|
|
1417
1417
|
function npmInstallInto(dir, pkgs) {
|
|
1418
1418
|
const win = platform() === "win32";
|
|
@@ -1476,7 +1476,7 @@ export async function ensureAgentDeps({ log, confirm, modelHost = canHostMlxMode
|
|
|
1476
1476
|
if (!usable.ok && build && (await confirm(pu.pythonOfferText(usable, build), true))) {
|
|
1477
1477
|
log(` Installing Python ${pu.PYTHON_UNIX.version} …`);
|
|
1478
1478
|
const r = await (installPython ?? pu.installPythonUnix)({ build, log });
|
|
1479
|
-
if (r.ok) log(` ✓ Python ${pu.PYTHON_UNIX.version} installed for your user (~/.
|
|
1479
|
+
if (r.ok) log(` ✓ Python ${pu.PYTHON_UNIX.version} installed for your user (~/.gu/python)`);
|
|
1480
1480
|
else log(yellow(` could not install Python: ${r.error ?? "unknown error"}`));
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
package/mongo-mac.mjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* 8.0.5 is the last release built for older Macs (minos 10.14 on Intel, 11.0 on Apple Silicon).
|
|
8
8
|
*
|
|
9
9
|
* So on those Macs gu runs its own mongod 8.0.5, like the Windows one (#210): no Homebrew, no
|
|
10
|
-
* service, no sudo. Everything lives under ~/.
|
|
10
|
+
* service, no sudo. Everything lives under ~/.gu/mongodb and goes away with that folder:
|
|
11
11
|
* bin/mongod data/ mongod.log launch.log version.txt
|
|
12
12
|
*
|
|
13
13
|
* The .tgz is gzip, so unlike the Windows zip one file cannot be fetched on its own: the whole
|
|
@@ -58,7 +58,7 @@ export function macNeedsOwnMongo(major) {
|
|
|
58
58
|
|
|
59
59
|
/** Where gu keeps its own mongod on a Mac — the same layout as Windows. `home` for tests. */
|
|
60
60
|
export function mongoMacPaths(home = homedir()) {
|
|
61
|
-
const dir = join(home, ".
|
|
61
|
+
const dir = join(home, ".gu", "mongodb");
|
|
62
62
|
return {
|
|
63
63
|
dir,
|
|
64
64
|
exe: join(dir, "bin", "mongod"),
|
package/mongo-windows.mjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* MB). The server answers HTTP Range requests (checked: 206, accept-ranges: bytes), so this
|
|
8
8
|
* module reads the zip's central directory over the wire and downloads ONLY the mongod.exe entry.
|
|
9
9
|
*
|
|
10
|
-
* Everything lives under ~/.
|
|
10
|
+
* Everything lives under ~/.gu/mongodb — no service, no admin, removed by deleting the folder:
|
|
11
11
|
* bin/mongod.exe data/ mongod.log launch.log
|
|
12
12
|
*
|
|
13
13
|
* Pure parts (zip parsing, paths, the command line) are separate from the network and process
|
|
@@ -25,7 +25,7 @@ export const MONGO_WIN_ZIP_URL = `https://fastdl.mongodb.org/windows/mongodb-win
|
|
|
25
25
|
|
|
26
26
|
/** Where gu keeps its own mongod. `home` is injectable for tests. */
|
|
27
27
|
export function mongoWinPaths(home = homedir()) {
|
|
28
|
-
const dir = join(home, ".
|
|
28
|
+
const dir = join(home, ".gu", "mongodb");
|
|
29
29
|
return {
|
|
30
30
|
dir,
|
|
31
31
|
exe: join(dir, "bin", "mongod.exe"),
|
|
@@ -285,7 +285,7 @@ export function vcRedistInstalled(code) {
|
|
|
285
285
|
* started with `-Verb RunAs` (one Windows permission prompt); a non-elevated child_process could not ask.
|
|
286
286
|
* → { ok, code, error? }. `download` and `run` are injectable so tests never touch the net or the machine.
|
|
287
287
|
*/
|
|
288
|
-
export async function installVcRuntime({ dir = join(homedir(), ".
|
|
288
|
+
export async function installVcRuntime({ dir = join(homedir(), ".gu"), fetchFn = fetch, run = null } = {}) {
|
|
289
289
|
const exe = join(dir, "vc_redist.x64.exe");
|
|
290
290
|
try {
|
|
291
291
|
await mkdir(dir, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiens.nguyen/gu-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.940",
|
|
4
4
|
"description": "gu: the coding agent in your terminal. It reads your repo, makes the change and runs the tests, with your own models (Ollama or any OpenAI-compatible provider). Free installs keep the agent, its API and its database on your machine. macOS, Linux and Windows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
"hints.mjs",
|
|
157
157
|
"terminal-title.mjs",
|
|
158
158
|
"gu-relaunch.mjs",
|
|
159
|
+
"gu-home-move.mjs",
|
|
159
160
|
"server-keys.mjs",
|
|
160
161
|
"add-server.mjs",
|
|
161
162
|
"powershell-alias.mjs",
|
package/platform-tools.mjs
CHANGED
|
@@ -225,13 +225,13 @@ let _python = null;
|
|
|
225
225
|
* Cached: otherwise this probes a subprocess on every job.
|
|
226
226
|
*/
|
|
227
227
|
/**
|
|
228
|
-
* The interpreter of gu's own private virtualenv (~/.
|
|
228
|
+
* The interpreter of gu's own private virtualenv (~/.gu/venv), or "" when there is none. Pure apart from one
|
|
229
229
|
* file check. The agent's packages are installed INTO it on Windows (GH #308), so everything that runs the agent —
|
|
230
230
|
* the terminal's checks AND the background worker — must look there, whatever worker.env did or did not pin.
|
|
231
231
|
*/
|
|
232
232
|
export function ownVenvPython(home = homedir(), exists = existsSync, platform = process.platform) {
|
|
233
233
|
const win = platform === "win32";
|
|
234
|
-
const py = join(home, ".
|
|
234
|
+
const py = join(home, ".gu", "venv", win ? "Scripts" : "bin", win ? "python.exe" : "python");
|
|
235
235
|
return exists(py) ? py : "";
|
|
236
236
|
}
|
|
237
237
|
|
|
@@ -581,7 +581,7 @@ export async function spawnSurviving({ cmd, args = [], cwd, env = {}, logFile, t
|
|
|
581
581
|
|
|
582
582
|
// THE SCHEDULER'S ENVIRONMENT IS NOT YOURS. A task launched this way starts with a minimal
|
|
583
583
|
// environment — no USERPROFILE among it — so `os.homedir()` does not resolve to the user's
|
|
584
|
-
// profile and anything that reads ~/.
|
|
584
|
+
// profile and anything that reads ~/.gu (worker.env, the sessions, the RAG index) fails.
|
|
585
585
|
// The daemon exited 1 that way, silently, with "Last Result: 1" the only trace.
|
|
586
586
|
//
|
|
587
587
|
// Carried EXPLICITLY, and only these: passing the whole of process.env is what put names cmd
|
package/poll-errors.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Friendly poll-failure reporting for the worker daemon.
|
|
2
2
|
//
|
|
3
3
|
// The poll loop runs every ~500ms, so a failure that lasts (an API outage, a rotated key)
|
|
4
|
-
// used to fill ~/.
|
|
4
|
+
// used to fill ~/.gu/worker.log with THOUSANDS of identical 4-line stack traces — which
|
|
5
5
|
// says nothing about what's wrong or whether the user can fix it. This turns each failure
|
|
6
6
|
// into ONE plain sentence plus an actionable hint, and collapses repeats of the same failure
|
|
7
7
|
// into a periodic "still failing" line.
|
|
@@ -53,7 +53,7 @@ export function describePollError(err, { apiBase = "the API" } = {}) {
|
|
|
53
53
|
return {
|
|
54
54
|
key: "api-404",
|
|
55
55
|
line: `${apiBase} has no /api/worker/jobs/next endpoint (404).`,
|
|
56
|
-
hint: "The API base URL may point at the wrong deployment — check GONEXT_API_BASE in ~/.
|
|
56
|
+
hint: "The API base URL may point at the wrong deployment — check GONEXT_API_BASE in ~/.gu/worker.env.",
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
if (status >= 500) {
|
package/prompt_scaffold_check.py
CHANGED
|
@@ -18,7 +18,7 @@ import sys
|
|
|
18
18
|
# A scaffold YOU put here wins over the database version, on this machine only. gu never WRITES this
|
|
19
19
|
# file — the scaffold stays off users' disks unless they put it there themselves — so it is an
|
|
20
20
|
# override for trying a wording before inserting it into production, not a cache.
|
|
21
|
-
LOCAL_SCAFFOLD_PATH = os.path.join(os.path.expanduser("~"), ".
|
|
21
|
+
LOCAL_SCAFFOLD_PATH = os.path.join(os.path.expanduser("~"), ".gu", "prompt-scaffolds", "code-agent.txt")
|
|
22
22
|
# How the file is NAMED in anything a person reads: never its location. Asked for: "dont say out loud
|
|
23
23
|
# where is the location of the scaffold file … not say anything". The deploy app's own Commands
|
|
24
24
|
# window is the one place the path is written down, for its owner.
|
package/proxy-store.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import { homedir } from "node:os";
|
|
|
17
17
|
import { join } from "node:path";
|
|
18
18
|
import { normalizeProxy } from "./proxy-config.mjs";
|
|
19
19
|
|
|
20
|
-
const GONEXT_DIR = join(homedir(), ".
|
|
20
|
+
const GONEXT_DIR = join(homedir(), ".gu");
|
|
21
21
|
export const PROXY_FILE = join(GONEXT_DIR, "proxy.json");
|
|
22
22
|
|
|
23
23
|
/**
|
package/python-unix.mjs
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* package). On all three the agent could not run, and gu could only say "install Python".
|
|
8
8
|
*
|
|
9
9
|
* Like the Windows path (python-windows.mjs: python.org, for this user), gu now offers to bring its own: a standalone
|
|
10
|
-
* CPython build (python-build-standalone — the builds uv and others install), unpacked into ~/.
|
|
11
|
-
* administrator, no sudo, nothing outside ~/.
|
|
10
|
+
* CPython build (python-build-standalone — the builds uv and others install), unpacked into ~/.gu/python. No
|
|
11
|
+
* administrator, no sudo, nothing outside ~/.gu. The archive is checked against a SHA-256 pinned HERE, so a changed
|
|
12
12
|
* file on the server is refused, never run. Bump the release on purpose, with its four hashes.
|
|
13
13
|
*
|
|
14
14
|
* Pure parts are separate; the download and the shell are injected so tests never fetch or unpack anything.
|
|
@@ -75,7 +75,7 @@ export function pythonOfferText(usable, build) {
|
|
|
75
75
|
usable.why === "no-venv" ? `this computer's Python ${usable.version} cannot make gu's own environment (no venv)` :
|
|
76
76
|
"this computer has none gu can use";
|
|
77
77
|
return `The agent runs on Python 3.10 or newer, and ${have}. Install Python ${PYTHON_UNIX.version} for your user only? ` +
|
|
78
|
-
`(about ${build.mb} MB, into ~/.
|
|
78
|
+
`(about ${build.mb} MB, into ~/.gu/python; no password, nothing system-wide)`;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
const sh = (file, args) =>
|
|
@@ -84,10 +84,10 @@ const sh = (file, args) =>
|
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
|
-
* Download, check, unpack, and make gu's own environment (~/.
|
|
88
|
-
* An older ~/.
|
|
87
|
+
* Download, check, unpack, and make gu's own environment (~/.gu/venv) from it. → { ok, python?, error? }
|
|
88
|
+
* An older ~/.gu/venv (made from a Python the agent cannot use) is moved aside, never deleted.
|
|
89
89
|
*/
|
|
90
|
-
export async function installPythonUnix({ dir = join(homedir(), ".
|
|
90
|
+
export async function installPythonUnix({ dir = join(homedir(), ".gu"), build = pythonBuildFor(), fetchFn = fetch, run = sh, log = () => {} } = {}) {
|
|
91
91
|
if (!build) return { ok: false, error: "there is no standalone Python build for this computer" };
|
|
92
92
|
const archive = join(dir, build.name);
|
|
93
93
|
try {
|
package/python-windows.mjs
CHANGED
|
@@ -66,7 +66,7 @@ export function pythonInstallerEnv(env = process.env) {
|
|
|
66
66
|
* Download, verify, install. → { ok, folders?, error? }. `fetchFn` and `run` (file → { code }) are injectable.
|
|
67
67
|
* On success the process PATH is updated so the very next `py -3` in this run finds it.
|
|
68
68
|
*/
|
|
69
|
-
export async function installPythonWindows({ dir = join(homedir(), ".
|
|
69
|
+
export async function installPythonWindows({ dir = join(homedir(), ".gu"), version = PYTHON_WIN_VERSION, fetchFn = fetch, run = null, env = process.env } = {}) {
|
|
70
70
|
const file = join(dir, `python-${version}-amd64.exe`);
|
|
71
71
|
try {
|
|
72
72
|
await mkdir(dir, { recursive: true });
|
package/rag-selftest.mjs
CHANGED
|
@@ -107,7 +107,7 @@ export function cosine(a, b) {
|
|
|
107
107
|
|
|
108
108
|
/** Read the API base + worker key exactly as the CLI does. */
|
|
109
109
|
async function workerEnv() {
|
|
110
|
-
const txt = await readFile(join(homedir(), ".
|
|
110
|
+
const txt = await readFile(join(homedir(), ".gu", "worker.env"), "utf8").catch(() => "");
|
|
111
111
|
const get = (k) => (new RegExp(`^${k}=(.*)$`, "m").exec(txt)?.[1] ?? "").trim();
|
|
112
112
|
return { apiBase: get("GONEXT_API_BASE").replace(/\/+$/, ""), key: get("GONEXT_WORKER_KEY") };
|
|
113
113
|
}
|
|
@@ -135,7 +135,7 @@ export async function runRagSelfTest({ onStep = () => {} } = {}) {
|
|
|
135
135
|
|
|
136
136
|
await step("read the embedder from this machine's settings", async () => {
|
|
137
137
|
const { apiBase, key } = await workerEnv();
|
|
138
|
-
if (!apiBase || !key) throw new Error("no ~/.
|
|
138
|
+
if (!apiBase || !key) throw new Error("no ~/.gu/worker.env — run `gu` first");
|
|
139
139
|
const res = await fetch(`${apiBase}/api/worker/settings`, {
|
|
140
140
|
headers: { "X-Worker-Key": key },
|
|
141
141
|
signal: AbortSignal.timeout(10_000),
|
package/resume-memory.mjs
CHANGED
|
@@ -33,7 +33,7 @@ export function findMemoryCli({ cwd = process.cwd(), home = homedir(), hooksFor
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
for (const dir of [join(home, ".
|
|
36
|
+
for (const dir of [join(home, ".gu", "skill-runtime", SKILL), join(home, ".claude", "skill-runtime", SKILL), join(home, ".claude", "memory")]) {
|
|
37
37
|
const cli = join(dir, "memory_cli.py");
|
|
38
38
|
if (existsSync(cli)) {return { python: pythonFor(cli), cli };}
|
|
39
39
|
}
|
|
@@ -50,7 +50,7 @@ writeFileSync(shot, PNG);
|
|
|
50
50
|
const spelled = process.platform === "win32" ? `"${shot}"` : shot.replace(/ /g, "\\ ");
|
|
51
51
|
check("a dropped path with spaces is recognised", imagePathFromPaste(spelled) === shot, `${spelled} → ${imagePathFromPaste(spelled)}`);
|
|
52
52
|
|
|
53
|
-
// 2. It is copied into ~/.
|
|
53
|
+
// 2. It is copied into ~/.gu/images.
|
|
54
54
|
const stored = storeImageFile(shot);
|
|
55
55
|
if (stored.path) made.push(stored.path);
|
|
56
56
|
check("copied into the images folder", Boolean(stored.path?.startsWith(imagesDir())) && isPng(stored.path), stored.path ?? stored.error);
|
package/setup-fixes.mjs
CHANGED
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Runs from three places, all with the same words:
|
|
17
17
|
* 1. npm's postinstall (install-path.mjs) — npm hides its output, so what it did is also saved
|
|
18
|
-
* to ~/.
|
|
18
|
+
* to ~/.gu/setup-done.json and gu says it at its next start;
|
|
19
19
|
* 2. gu's first start on a computer — npm 11.21+ can skip install scripts entirely, so gu checks
|
|
20
|
-
* once itself (marker ~/.
|
|
20
|
+
* once itself (marker ~/.gu/setup-checked);
|
|
21
21
|
* 3. the Windows installer (install.ps1), which has its own PowerShell copy of these steps.
|
|
22
22
|
*
|
|
23
23
|
* Never fails anything: a step that cannot be done is reported with the command to do it by hand.
|
|
@@ -27,8 +27,8 @@ import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node
|
|
|
27
27
|
import { homedir } from "node:os";
|
|
28
28
|
import { dirname, join } from "node:path";
|
|
29
29
|
|
|
30
|
-
export const NOTES_FILE = (home = homedir()) => join(home, ".
|
|
31
|
-
export const CHECKED_FILE = (home = homedir()) => join(home, ".
|
|
30
|
+
export const NOTES_FILE = (home = homedir()) => join(home, ".gu", "setup-done.json");
|
|
31
|
+
export const CHECKED_FILE = (home = homedir()) => join(home, ".gu", "setup-checked");
|
|
32
32
|
|
|
33
33
|
export const UNDO_POLICY = "Set-ExecutionPolicy -Scope CurrentUser Undefined";
|
|
34
34
|
|
package/shell-details.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// BACKGROUND SHELLS IN THE TERMINAL (task #360, GitHub #140) — Claude Code's "Shell details".
|
|
2
2
|
//
|
|
3
3
|
// The agent hands a long command (a 7-minute `fastlane ios beta`) off to the background instead
|
|
4
|
-
// of killing it at its deadline, and records it in ~/.
|
|
4
|
+
// of killing it at its deadline, and records it in ~/.gu/shells.json (gonext_agent_chat.py,
|
|
5
5
|
// BACKGROUND SHELLS). This module is the terminal's half: it reads that file, says on the bottom
|
|
6
6
|
// notice row that something is still running (a click target, like the other notice controls),
|
|
7
7
|
// and renders the details view — Status, Runtime, Command, Output — the way Claude Code does.
|
|
@@ -19,7 +19,7 @@ import { procStart } from "./proc-identity.mjs";
|
|
|
19
19
|
|
|
20
20
|
export { procStart };
|
|
21
21
|
|
|
22
|
-
export const shellsPath = (home = homedir()) => join(home, ".
|
|
22
|
+
export const shellsPath = (home = homedir()) => join(home, ".gu", "shells.json");
|
|
23
23
|
|
|
24
24
|
export function readShells(path = shellsPath()) {
|
|
25
25
|
try {
|
package/skill-install.mjs
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* env?: [names asked for at install], notes?: [ … ] }
|
|
20
20
|
*
|
|
21
21
|
* Paths in the manifest and in the packed text files are placeholders, filled in here:
|
|
22
|
-
* {{SKILL}} the skill's folder (one per tool: ~/.
|
|
23
|
-
* {{RUNTIME}} <base>/skill-runtime/<name>, <base> = ~/.
|
|
22
|
+
* {{SKILL}} the skill's folder (one per tool: ~/.gu/skills/<name>, ~/.claude/skills/<name>)
|
|
23
|
+
* {{RUNTIME}} <base>/skill-runtime/<name>, <base> = ~/.gu if gu is a target, else ~/.claude
|
|
24
24
|
* {{PYTHON}} the runtime's own venv python (built here from requirements.txt), else python3
|
|
25
25
|
* {{HOME}} the home folder; {{ENV:NAME}} NAME from the terminal's environment (never packed)
|
|
26
26
|
*
|
|
@@ -290,10 +290,10 @@ function sameTree(files, dir, vars) {
|
|
|
290
290
|
export function planInstall(pkg, { home = homedir(), targets, platform = process.platform, env = process.env } = {}) {
|
|
291
291
|
const { manifest: m } = pkg;
|
|
292
292
|
const name = m.name;
|
|
293
|
-
const found = TARGETS.filter((t) => existsSync(join(home, t === "gu" ? ".
|
|
293
|
+
const found = TARGETS.filter((t) => existsSync(join(home, t === "gu" ? ".gu" : ".claude")));
|
|
294
294
|
const use = targets?.length ? targets : found;
|
|
295
|
-
if (!use.length) throw new Error("neither gu (~/.
|
|
296
|
-
const base = join(home, use.includes("gu") ? ".
|
|
295
|
+
if (!use.length) throw new Error("neither gu (~/.gu) nor Claude Code (~/.claude) is set up here — pass --gu or --claude");
|
|
296
|
+
const base = join(home, use.includes("gu") ? ".gu" : ".claude");
|
|
297
297
|
const runtime = join(base, "skill-runtime", name);
|
|
298
298
|
// platform-ok: only for a package whose command is {{PYTHON}} with no venv — "python" on Windows (not the Store stub's name).
|
|
299
299
|
const python = m.python ? venvPython(runtime, platform) : platform === "win32" ? "python" : "python3";
|
|
@@ -305,20 +305,20 @@ export function planInstall(pkg, { home = homedir(), targets, platform = process
|
|
|
305
305
|
}
|
|
306
306
|
const warnings = [];
|
|
307
307
|
const items = [];
|
|
308
|
-
const runtimeVars = { skill: join(home, ".
|
|
308
|
+
const runtimeVars = { skill: join(home, ".gu", "skills", name), runtime, python, home, env: envValues };
|
|
309
309
|
const runtimeStatus = !pkg.runtime.size ? "same" : sameTree(pkg.runtime, runtime, runtimeVars) ? "same" : existsSync(runtime) ? "differs" : "new";
|
|
310
310
|
if (pkg.runtime.size) items.push({ kind: "runtime", to: runtime, status: runtimeStatus, files: pkg.runtime.size });
|
|
311
311
|
// The venv is (re)built when it is missing or the runtime (so maybe requirements.txt) changed.
|
|
312
312
|
if (m.python) items.push({ kind: "python", to: runtime, requirements: m.python.requirements, status: runtimeStatus === "same" && existsSync(python) ? "same" : "new" });
|
|
313
313
|
for (const t of use) {
|
|
314
|
-
const dot = t === "gu" ? ".
|
|
314
|
+
const dot = t === "gu" ? ".gu" : ".claude";
|
|
315
315
|
const skillDir = join(home, dot, "skills", name);
|
|
316
316
|
const vars = { skill: skillDir, runtime, python, home, env: envValues };
|
|
317
317
|
items.push({ kind: "skill", target: t, to: skillDir, vars, status: sameTree(pkg.skill, skillDir, vars) ? "same" : existsSync(skillDir) ? "differs" : "new" });
|
|
318
318
|
|
|
319
319
|
const servers = isObj(m.mcpServers) ? m.mcpServers : {};
|
|
320
320
|
if (Object.keys(servers).length) {
|
|
321
|
-
const file = t === "gu" ? join(home, ".
|
|
321
|
+
const file = t === "gu" ? join(home, ".gu", "mcp.json") : join(home, ".claude.json");
|
|
322
322
|
const cur = readJsonFile(file);
|
|
323
323
|
if (cur.error) warnings.push(`${file} is ${cur.error} — its MCP servers are left alone`);
|
|
324
324
|
for (const [sname, entry] of Object.entries(servers)) {
|
|
@@ -413,7 +413,7 @@ export function applyInstall(plan, { say = () => {}, run = spawnSync, now = new
|
|
|
413
413
|
try {
|
|
414
414
|
if (it.kind === "runtime" && it.status !== "same") {
|
|
415
415
|
backup(it.to, "runtime");
|
|
416
|
-
writeFiles(it.to, plan.pkg.runtime, { skill: join(plan.home, ".
|
|
416
|
+
writeFiles(it.to, plan.pkg.runtime, { skill: join(plan.home, ".gu", "skills", plan.name), runtime: plan.runtime, python: plan.python, home: plan.home, env: {} });
|
|
417
417
|
done.push(`runtime → ${it.to}`);
|
|
418
418
|
} else if (it.kind === "python" && it.status !== "same") {
|
|
419
419
|
const py = findPython({ run });
|
package/skill-package.mjs
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
* on any machine, for gu and/or Claude Code.
|
|
9
9
|
*
|
|
10
10
|
* What it finds, for the skill folder S (gu's or Claude's, yours or this project's):
|
|
11
|
-
* MCP servers in ~/.
|
|
11
|
+
* MCP servers in ~/.gu/mcp.json and ~/.claude.json whose command/args point inside S or the
|
|
12
12
|
* runtime, or that SKILL.md names
|
|
13
13
|
* the runtime R = the folder the skill's outside files share: absolute paths SKILL.md names
|
|
14
14
|
* plus the servers' files (or --runtime <dir>). Refused when that is too broad
|
|
15
|
-
* (home, ~/.claude, ~/.
|
|
16
|
-
* hooks in ~/.claude/settings.json and ~/.
|
|
15
|
+
* (home, ~/.claude, ~/.gu) or too big
|
|
16
|
+
* hooks in ~/.claude/settings.json and ~/.gu/settings.json whose files are in S or R
|
|
17
17
|
* Python a command that is R's own venv python becomes {{PYTHON}}; R/requirements.txt is
|
|
18
18
|
* then required — the venv itself is never packed, the new machine builds its own
|
|
19
19
|
*
|
|
@@ -122,7 +122,7 @@ export function findSkill(name, { cwd = process.cwd(), home = homedir() } = {})
|
|
|
122
122
|
const want = String(name).replace(/^\//, "");
|
|
123
123
|
const dirs = [];
|
|
124
124
|
for (const source of ["gu", "claude"]) {
|
|
125
|
-
const dot = source === "gu" ? ".
|
|
125
|
+
const dot = source === "gu" ? ".gu" : ".claude";
|
|
126
126
|
if (cwd && resolve(cwd) !== resolve(home)) dirs.push({ dir: join(cwd, dot, "skills"), source, scope: "project" });
|
|
127
127
|
dirs.push({ dir: join(home, dot, "skills"), source, scope: "user" });
|
|
128
128
|
}
|
|
@@ -161,7 +161,7 @@ function commonDir(paths) {
|
|
|
161
161
|
/** Is this folder too broad to be one skill's runtime? */
|
|
162
162
|
function tooBroad(dir, home) {
|
|
163
163
|
const d = resolve(dir);
|
|
164
|
-
return [home, join(home, ".claude"), join(home, ".
|
|
164
|
+
return [home, join(home, ".claude"), join(home, ".gu"), join(home, ".config"), dirname(home), sep].some((x) => resolve(x) === d) || inside(home, d);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
const refsOf = (entry, home) =>
|
|
@@ -178,17 +178,17 @@ const refsOf = (entry, home) =>
|
|
|
178
178
|
*/
|
|
179
179
|
export function planSkillPack(name, { cwd = process.cwd(), home = homedir(), runtime: runtimeOpt, platform = process.platform } = {}) {
|
|
180
180
|
const sk = findSkill(name, { cwd, home });
|
|
181
|
-
if (!sk) throw new Error(`no skill named "${name}" in ./.
|
|
181
|
+
if (!sk) throw new Error(`no skill named "${name}" in ./.gu/skills, ~/.gu/skills, ./.claude/skills or ~/.claude/skills`);
|
|
182
182
|
const warnings = [];
|
|
183
183
|
const skillTree = packTree(sk.dir);
|
|
184
184
|
const md = skillTree.files.get("SKILL.md").data.toString("utf8");
|
|
185
185
|
|
|
186
186
|
// MCP servers everywhere this machine keeps them.
|
|
187
187
|
const servers = [];
|
|
188
|
-
const guMcp = readJson(join(home, ".
|
|
188
|
+
const guMcp = readJson(join(home, ".gu", "mcp.json"));
|
|
189
189
|
const claude = readJson(join(home, ".claude.json"));
|
|
190
190
|
const proj = isObj(claude.projects) ? claude.projects[resolve(cwd)] : null;
|
|
191
|
-
for (const [where, obj] of [["~/.
|
|
191
|
+
for (const [where, obj] of [["~/.gu/mcp.json", guMcp.mcpServers], ["~/.claude.json", claude.mcpServers], ["~/.claude.json (this folder)", proj?.mcpServers], ["./.mcp.json", readJson(join(cwd, ".mcp.json")).mcpServers]]) {
|
|
192
192
|
for (const [n, e] of Object.entries(isObj(obj) ? obj : {})) if (isObj(e) && e.command) servers.push({ name: n, entry: e, where });
|
|
193
193
|
}
|
|
194
194
|
const named = (n) => new RegExp(`(^|[^A-Za-z0-9_-])${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}([^A-Za-z0-9_-]|$)`).test(md);
|
|
@@ -244,7 +244,7 @@ export function planSkillPack(name, { cwd = process.cwd(), home = homedir(), run
|
|
|
244
244
|
}
|
|
245
245
|
for (const g of Array.isArray(groups) ? groups : []) addHook(ev, g, "Claude Code");
|
|
246
246
|
}
|
|
247
|
-
const guSettings = readJson(join(home, ".
|
|
247
|
+
const guSettings = readJson(join(home, ".gu", "settings.json"));
|
|
248
248
|
for (const [ev, groups] of Object.entries(isObj(guSettings.hooks) ? guSettings.hooks : {})) {
|
|
249
249
|
for (const g of Array.isArray(groups) ? groups : []) {
|
|
250
250
|
if (!GU_TO_CLAUDE[ev]) continue;
|
|
@@ -425,7 +425,7 @@ export function readmeFor(manifest) {
|
|
|
425
425
|
` in gu: /skill-install ${n}.zip`,
|
|
426
426
|
` without gu: unzip ${n}.zip && node ${zipPath(n, "install.mjs")}`,
|
|
427
427
|
"",
|
|
428
|
-
"It installs for gu (~/.
|
|
428
|
+
"It installs for gu (~/.gu) and Claude Code (~/.claude), whichever is set up on the machine;",
|
|
429
429
|
"--gu or --claude picks one, --dry-run shows the plan without writing anything.",
|
|
430
430
|
...(manifest.env?.length ? ["", `Set these in the terminal first (they were not packed): ${manifest.env.join(", ")}`] : []),
|
|
431
431
|
"",
|