show-me-the-env 0.96.2 → 0.96.5
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/.claude-plugin/plugin.json +1 -1
- package/adapters/win-hooks/adapter.mjs +54 -58
- package/adapters/win-hooks/support.json +36 -46
- package/bin/agenv.mjs +4 -8
- package/package.json +2 -1
- package/plugins/win-hooks/package.json +54 -0
- package/profiles/index.json +2 -2
- package/profiles/lilmgenius-agent-setup/profile.json +1 -1
- package/references/support.md +2 -2
- package/scripts/verify-skill-sources.mjs +18 -4
- package/scripts/verify.ps1 +1 -1
- package/src/machines/queue.mjs +9 -3
|
@@ -1,46 +1,54 @@
|
|
|
1
1
|
// win-hooks (plugins/win-hooks in this repository), an optional Windows repair for Claude Code
|
|
2
|
-
// and Codex plugin hooks. agenv
|
|
3
|
-
//
|
|
4
|
-
// profile names it: a lifecycle adapter runs only for a tool
|
|
5
|
-
// its plugin with a host is a separate configure action that
|
|
6
|
-
//
|
|
7
|
-
// unsupported with the reason the project gives: hooks already run
|
|
8
|
-
//
|
|
2
|
+
// and Codex plugin hooks. agenv carries its CLI (plugins/win-hooks/bin/win-hooks.mjs, the one
|
|
3
|
+
// agenv win-hooks and the plugin's own hooks start) and registers the plugin this repository
|
|
4
|
+
// ships. Nothing activates it unless a profile names it: a lifecycle adapter runs only for a tool
|
|
5
|
+
// a profile selects, and registering its plugin with a host is a separate configure action that
|
|
6
|
+
// names the hosts. Its version is the plugin's own, and it moves with agenv's releases. On macOS
|
|
7
|
+
// and Linux every cell is unsupported with the reason the project gives: hooks already run
|
|
8
|
+
// natively there.
|
|
9
|
+
// install, update not applicable: the CLI ships inside agenv, so installing or updating agenv does it
|
|
9
10
|
// configure registers the plugin with each named host through that host's own commands
|
|
10
11
|
// (the routes the README documents), from this repository's main on both hosts
|
|
11
|
-
// repair win-hooks patch <host
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
import
|
|
12
|
+
// repair win-hooks patch <host> through the CLI agenv carries: report, repair what is
|
|
13
|
+
// not healthy, prove the result
|
|
14
|
+
// detect the plugin's version and win-hooks status, which changes nothing
|
|
15
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
15
16
|
import path from 'node:path';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
17
|
+
import { fileURLToPath } from 'node:url';
|
|
18
|
+
import { runningAsSea, whichAll } from '../../src/adapters.mjs';
|
|
19
|
+
import { lifecycleAdapter, notApplicable, route, unsupported } from '../../src/lifecycle.mjs';
|
|
18
20
|
import { probe, run } from '../../src/runtime.mjs';
|
|
19
21
|
|
|
20
|
-
export const PACKAGE = '@lilmgenius/win-hooks';
|
|
21
22
|
export const REPO = 'LilMGenius/show-me-the-env';
|
|
22
23
|
// The plugin and the marketplace it ships in are both named show-me-the-env, as the founder ruled on 2026-12-03
|
|
23
24
|
// when win-hooks became this repository; win-hooks@win-hooks was the name before.
|
|
24
25
|
export const PLUGIN = 'show-me-the-env@show-me-the-env';
|
|
25
26
|
// An install made under the earlier name runs the same plugin, and the Claude Code marketplace still lists it.
|
|
26
27
|
const LEGACY_PLUGIN = 'win-hooks@win-hooks';
|
|
27
|
-
export const SOURCES = Object.freeze({ readme: 'https://github.com/LilMGenius/show-me-the-env/blob/main/plugins/win-hooks/README.md'
|
|
28
|
-
export const NOT_WINDOWS = 'win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively
|
|
28
|
+
export const SOURCES = Object.freeze({ readme: 'https://github.com/LilMGenius/show-me-the-env/blob/main/plugins/win-hooks/README.md' });
|
|
29
|
+
export const NOT_WINDOWS = 'win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively';
|
|
30
|
+
export const SHIPPED = 'win-hooks ships inside agenv (plugins/win-hooks), so installing or updating agenv installs or updates it, and agenv installs no npm package for it';
|
|
29
31
|
const HOSTS = Object.freeze({ claude: 'claude-code', codex: 'codex' });
|
|
30
32
|
|
|
31
|
-
// The package
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
// The win-hooks CLI this package ships, the one agenv win-hooks and the plugin's own hooks start.
|
|
34
|
+
export const CLI = fileURLToPath(new URL('../../plugins/win-hooks/bin/win-hooks.mjs', import.meta.url));
|
|
35
|
+
|
|
36
|
+
// The Node that starts the CLI: this process's, except in a native build, whose process.execPath
|
|
37
|
+
// is agenv itself, so Node then comes from PATH, which the plugin's hooks need anyway.
|
|
38
|
+
export async function nodeFor(env, platform = process.platform) {
|
|
39
|
+
if (!runningAsSea()) return process.execPath;
|
|
40
|
+
return (await whichAll('node', { env, platform })).find((f) => !/\.(cmd|bat)$/i.test(f)) ?? null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// The CLI a context runs: the one this package ships, or the stand-in a test names.
|
|
44
|
+
const cliOf = (ctx) => ctx.winHooksCli ?? CLI;
|
|
45
|
+
|
|
46
|
+
// The plugin's version, from the package.json beside its bin folder; null when that file is not
|
|
47
|
+
// there, and an error with its cause when it exists and cannot be read.
|
|
48
|
+
function versionOf(cli) {
|
|
49
|
+
let text;
|
|
50
|
+
try { text = readFileSync(path.join(path.dirname(path.dirname(cli)), 'package.json'), 'utf8'); } catch (e) { if (e.code === 'ENOENT') return null; throw e; }
|
|
51
|
+
return JSON.parse(text).version ?? null;
|
|
44
52
|
}
|
|
45
53
|
|
|
46
54
|
// status prints "# <Host> - N hook file(s) scanned" and then "healthy" or what is not.
|
|
@@ -57,24 +65,24 @@ export function parseStatus(text) {
|
|
|
57
65
|
|
|
58
66
|
export async function detect(ctx) {
|
|
59
67
|
const obs = { id: 'win-hooks', installed: false, executable: null, reachable: null, authenticated: null, inferenceVerified: null, route: null, candidates: [], ambiguities: [], hosts: null, activated: activation(ctx) };
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
const cli = cliOf(ctx);
|
|
69
|
+
// A copy of agenv from before the CLI shipped in it has none to run.
|
|
70
|
+
if (!existsSync(cli)) { obs.executable = false; return obs; }
|
|
63
71
|
obs.installed = true;
|
|
64
|
-
obs.candidates.push({ path:
|
|
65
|
-
obs.route = { path:
|
|
66
|
-
if (!pkg) obs.ambiguities.push({ kind: 'unknown-manager', detail: file });
|
|
72
|
+
obs.candidates.push({ path: cli, realPath: cli, manager: 'agenv' });
|
|
73
|
+
obs.route = { path: cli, realPath: cli, manager: 'agenv', architecture: null, ownership: 'user', version: versionOf(cli) };
|
|
67
74
|
if (ctx.platform !== 'win32') return obs;
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
const env = ctx.env ?? process.env;
|
|
76
|
+
const node = await nodeFor(env, ctx.platform);
|
|
77
|
+
if (!node) { obs.executable = false; obs.ambiguities.push({ kind: 'not-executable', detail: 'no Node on PATH to start ' + cli }); return obs; }
|
|
78
|
+
const r = await probe(env, (probeEnv) => run({ executable: node, args: [cli, 'status'], env: { ...probeEnv, USERPROFILE: ctx.home, HOME: ctx.home }, timeoutMs: 60_000 }));
|
|
71
79
|
obs.executable = r.status === 'satisfied';
|
|
72
80
|
obs.hosts = obs.executable ? parseStatus(r.stdout.text) : null;
|
|
73
81
|
if (!obs.executable) obs.ambiguities.push({ kind: 'not-executable', detail: r.error ?? 'exit ' + r.exit });
|
|
74
82
|
return obs;
|
|
75
83
|
}
|
|
76
84
|
|
|
77
|
-
const ONLY_WINDOWS = (
|
|
85
|
+
const ONLY_WINDOWS = () => unsupported(NOT_WINDOWS, SOURCES.readme, { os: ['macos', 'linux'] });
|
|
78
86
|
|
|
79
87
|
// Whether each host has the plugin switched on, read from the files the host itself reads:
|
|
80
88
|
// enabledPlugins in ~/.claude/settings.json and the [plugins."show-me-the-env@show-me-the-env"] table in
|
|
@@ -104,21 +112,6 @@ export function activation(ctx) {
|
|
|
104
112
|
|
|
105
113
|
const activated = (obs, { hosts = [] }) => hosts.every((h) => obs?.activated?.[h] === true);
|
|
106
114
|
|
|
107
|
-
async function npmApply(ctx, { version }, { runSteps }) {
|
|
108
|
-
return { records: await runSteps([{ run: ['npm', 'install', '-g', PACKAGE + '@' + version] }], ctx) };
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// A fresh launch must find win-hooks at the pinned release. It is found, not started: run with no
|
|
112
|
-
// command, win-hooks heals every host, and a version check must change nothing.
|
|
113
|
-
async function installed(after, { version }, ctx) {
|
|
114
|
-
const found = await freshWhich('win-hooks', ctx).catch(() => null);
|
|
115
|
-
if (!found) return false;
|
|
116
|
-
after.launch = { selected: found, foundOnly: true, version: (await packageOf(found))?.version ?? null };
|
|
117
|
-
return versionMatches(after.launch.version, version);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
const npm = route({ os: ['windows'], manager: 'npm', managerFrom: 'node', requires: ['node'], owner: 'npm', pin: 'exact', permissions: ['network'], installRoot: "npm's global prefix (%APPDATA%\\npm), for this user", integrity: 'npm checks the package tarball against the registry integrity hash', source: SOURCES.npm, plan: () => [], apply: npmApply, verify: installed });
|
|
121
|
-
|
|
122
115
|
// The host commands that register the plugin, as the README gives them. Both hosts follow this
|
|
123
116
|
// repository's main, where the plugin ships from plugins/win-hooks: the tags of the win-hooks
|
|
124
117
|
// releases went away when win-hooks became this repository, so a Codex ref would name nothing.
|
|
@@ -142,7 +135,10 @@ async function activateApply(ctx, { hosts = [] }, { runSteps }) {
|
|
|
142
135
|
const activate = route({ os: ['windows'], requires: ['win-hooks'], permissions: ['network', 'write-home'], installRoot: 'each named host plugin directory', integrity: "each host fetches the marketplace from GitHub at this repository's main", source: SOURCES.readme, plan: () => [], apply: activateApply, satisfied: activated, verify: (after, inputs) => activated(after, inputs) });
|
|
143
136
|
|
|
144
137
|
async function patchApply(ctx, { hosts = Object.keys(HOSTS) }, { runSteps }) {
|
|
145
|
-
|
|
138
|
+
const cli = cliOf(ctx);
|
|
139
|
+
const node = await nodeFor(ctx.env ?? process.env, ctx.platform);
|
|
140
|
+
if (!node) return { status: 'failed', code: 'command-missing', summary: 'no Node on PATH to start ' + cli, records: [] };
|
|
141
|
+
return { records: await runSteps([{ run: [node, cli, 'patch', ...hosts] }], ctx) };
|
|
146
142
|
}
|
|
147
143
|
const patch = route({ os: ['windows'], permissions: ['write-home'], idempotent: true, source: SOURCES.readme, plan: () => [], apply: patchApply, verify: (after) => after.hosts !== null && Object.values(after.hosts).every((h) => h.healthy === true) });
|
|
148
144
|
|
|
@@ -155,13 +151,13 @@ export const adapters = [
|
|
|
155
151
|
detect,
|
|
156
152
|
sources: Object.values(SOURCES),
|
|
157
153
|
operations: {
|
|
158
|
-
install: [
|
|
159
|
-
update: [
|
|
154
|
+
install: [notApplicable(SHIPPED, SOURCES.readme), ONLY_WINDOWS()],
|
|
155
|
+
update: [notApplicable(SHIPPED, SOURCES.readme), ONLY_WINDOWS()],
|
|
160
156
|
configure: [activate, ONLY_WINDOWS()],
|
|
161
157
|
repair: [patch, ONLY_WINDOWS()],
|
|
162
158
|
auth: notApplicable('win-hooks holds no account', SOURCES.readme),
|
|
163
159
|
service: notApplicable('win-hooks runs from the hosts own session hooks, not as a service agenv manages', SOURCES.readme),
|
|
164
|
-
uninstall: [unsupported(
|
|
160
|
+
uninstall: [unsupported("agenv does not remove win-hooks, which ships inside it; each host's plugin remove command removes the plugin", SOURCES.readme, { os: ['windows'] }), ONLY_WINDOWS()],
|
|
165
161
|
},
|
|
166
162
|
}),
|
|
167
163
|
];
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
"arch": "*",
|
|
8
8
|
"operation": "detect",
|
|
9
9
|
"status": "experimental",
|
|
10
|
-
"reason": "reads the CLI package
|
|
10
|
+
"reason": "reads the version of the CLI agenv carries (plugins/win-hooks/package.json) and win-hooks status, which changes nothing; tier F fixtures",
|
|
11
11
|
"evidence": "execution receipt task-24",
|
|
12
|
-
"revision": "
|
|
12
|
+
"revision": "a078d9f25c7c"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"adapter": "win-hooks",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"arch": "*",
|
|
18
18
|
"operation": "detect",
|
|
19
19
|
"status": "experimental",
|
|
20
|
-
"reason": "reports
|
|
20
|
+
"reason": "reports the CLI agenv carries; it has nothing to repair off Windows",
|
|
21
21
|
"evidence": "execution receipt task-24",
|
|
22
|
-
"revision": "
|
|
22
|
+
"revision": "a078d9f25c7c"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"adapter": "win-hooks",
|
|
@@ -27,27 +27,27 @@
|
|
|
27
27
|
"arch": "*",
|
|
28
28
|
"operation": "detect",
|
|
29
29
|
"status": "experimental",
|
|
30
|
-
"reason": "reports
|
|
30
|
+
"reason": "reports the CLI agenv carries; it has nothing to repair off Windows",
|
|
31
31
|
"evidence": "execution receipt task-24",
|
|
32
|
-
"revision": "
|
|
32
|
+
"revision": "a078d9f25c7c"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"adapter": "win-hooks",
|
|
36
36
|
"os": "windows",
|
|
37
37
|
"arch": "*",
|
|
38
38
|
"operation": "install",
|
|
39
|
-
"status": "
|
|
40
|
-
"reason": "
|
|
41
|
-
"revision": "
|
|
39
|
+
"status": "not-applicable",
|
|
40
|
+
"reason": "win-hooks ships inside agenv (plugins/win-hooks), so installing or updating agenv installs or updates it, and agenv installs no npm package for it",
|
|
41
|
+
"revision": "a078d9f25c7c"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"adapter": "win-hooks",
|
|
45
45
|
"os": "windows",
|
|
46
46
|
"arch": "*",
|
|
47
47
|
"operation": "update",
|
|
48
|
-
"status": "
|
|
49
|
-
"reason": "
|
|
50
|
-
"revision": "
|
|
48
|
+
"status": "not-applicable",
|
|
49
|
+
"reason": "win-hooks ships inside agenv (plugins/win-hooks), so installing or updating agenv installs or updates it, and agenv installs no npm package for it",
|
|
50
|
+
"revision": "a078d9f25c7c"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"adapter": "win-hooks",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"arch": "*",
|
|
65
65
|
"operation": "repair",
|
|
66
66
|
"status": "unverified",
|
|
67
|
-
"reason": "win-hooks patch, then status must report every host healthy",
|
|
68
|
-
"revision": "
|
|
67
|
+
"reason": "win-hooks patch through the CLI agenv carries, then status must report every host healthy",
|
|
68
|
+
"revision": "a078d9f25c7c"
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
"adapter": "win-hooks",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"arch": "*",
|
|
74
74
|
"operation": "install",
|
|
75
75
|
"status": "unsupported",
|
|
76
|
-
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively
|
|
77
|
-
"revision": "
|
|
76
|
+
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively",
|
|
77
|
+
"revision": "a078d9f25c7c"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"adapter": "win-hooks",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"arch": "*",
|
|
83
83
|
"operation": "install",
|
|
84
84
|
"status": "unsupported",
|
|
85
|
-
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively
|
|
86
|
-
"revision": "
|
|
85
|
+
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively",
|
|
86
|
+
"revision": "a078d9f25c7c"
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"adapter": "win-hooks",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"arch": "*",
|
|
92
92
|
"operation": "update",
|
|
93
93
|
"status": "unsupported",
|
|
94
|
-
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively
|
|
95
|
-
"revision": "
|
|
94
|
+
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively",
|
|
95
|
+
"revision": "a078d9f25c7c"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"adapter": "win-hooks",
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
"arch": "*",
|
|
101
101
|
"operation": "update",
|
|
102
102
|
"status": "unsupported",
|
|
103
|
-
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively
|
|
104
|
-
"revision": "
|
|
103
|
+
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively",
|
|
104
|
+
"revision": "a078d9f25c7c"
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
"adapter": "win-hooks",
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
"arch": "*",
|
|
110
110
|
"operation": "configure",
|
|
111
111
|
"status": "unsupported",
|
|
112
|
-
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively
|
|
113
|
-
"revision": "
|
|
112
|
+
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively",
|
|
113
|
+
"revision": "a078d9f25c7c"
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
"adapter": "win-hooks",
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
"arch": "*",
|
|
119
119
|
"operation": "configure",
|
|
120
120
|
"status": "unsupported",
|
|
121
|
-
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively
|
|
122
|
-
"revision": "
|
|
121
|
+
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively",
|
|
122
|
+
"revision": "a078d9f25c7c"
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"adapter": "win-hooks",
|
|
@@ -127,8 +127,8 @@
|
|
|
127
127
|
"arch": "*",
|
|
128
128
|
"operation": "repair",
|
|
129
129
|
"status": "unsupported",
|
|
130
|
-
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively
|
|
131
|
-
"revision": "
|
|
130
|
+
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively",
|
|
131
|
+
"revision": "a078d9f25c7c"
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
"adapter": "win-hooks",
|
|
@@ -136,8 +136,8 @@
|
|
|
136
136
|
"arch": "*",
|
|
137
137
|
"operation": "repair",
|
|
138
138
|
"status": "unsupported",
|
|
139
|
-
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively
|
|
140
|
-
"revision": "
|
|
139
|
+
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively",
|
|
140
|
+
"revision": "a078d9f25c7c"
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
"adapter": "win-hooks",
|
|
@@ -199,8 +199,8 @@
|
|
|
199
199
|
"arch": "*",
|
|
200
200
|
"operation": "uninstall",
|
|
201
201
|
"status": "unsupported",
|
|
202
|
-
"reason": "agenv does not remove win-hooks
|
|
203
|
-
"revision": "
|
|
202
|
+
"reason": "agenv does not remove win-hooks, which ships inside it; each host's plugin remove command removes the plugin",
|
|
203
|
+
"revision": "a078d9f25c7c"
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
206
|
"adapter": "win-hooks",
|
|
@@ -208,8 +208,8 @@
|
|
|
208
208
|
"arch": "*",
|
|
209
209
|
"operation": "uninstall",
|
|
210
210
|
"status": "unsupported",
|
|
211
|
-
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively
|
|
212
|
-
"revision": "
|
|
211
|
+
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively",
|
|
212
|
+
"revision": "a078d9f25c7c"
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
215
|
"adapter": "win-hooks",
|
|
@@ -217,18 +217,8 @@
|
|
|
217
217
|
"arch": "*",
|
|
218
218
|
"operation": "uninstall",
|
|
219
219
|
"status": "unsupported",
|
|
220
|
-
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively
|
|
221
|
-
"revision": "
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"adapter": "win-hooks",
|
|
225
|
-
"os": "windows",
|
|
226
|
-
"arch": "x64",
|
|
227
|
-
"operation": "install",
|
|
228
|
-
"status": "verified",
|
|
229
|
-
"reason": "npm @lilmgenius/win-hooks 1.14.0 after winget node on clean-windows-guest, found by a fresh desktop-session PATH lookup at the pinned release",
|
|
230
|
-
"evidence": "execution receipt task-24/live-windows/happy.json (tier G, clean-windows-guest e8f52f80)",
|
|
231
|
-
"revision": "ed539ff0568a"
|
|
220
|
+
"reason": "win-hooks repairs plugin hooks that cannot run on Windows; on macOS and Linux they run natively",
|
|
221
|
+
"revision": "a078d9f25c7c"
|
|
232
222
|
}
|
|
233
223
|
]
|
|
234
224
|
}
|
package/bin/agenv.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { spawnSync } from 'node:child_process';
|
|
|
6
6
|
import { readFileSync, realpathSync } from 'node:fs';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
8
|
import { parseArgs } from 'node:util';
|
|
9
|
-
import {
|
|
9
|
+
import { CLI as WIN_HOOKS_CLI, nodeFor } from '../adapters/win-hooks/adapter.mjs';
|
|
10
10
|
import { adopt, follow } from '../src/commands/adopt.mjs';
|
|
11
11
|
import { catalog } from '../src/commands/catalog.mjs';
|
|
12
12
|
import { contribute } from '../src/commands/contribute.mjs';
|
|
@@ -95,14 +95,10 @@ const OPTIONS = { 'data-root': { type: 'string' }, 'state-root': { type: 'string
|
|
|
95
95
|
// Commands that wait for Ctrl+C themselves to stop a server (ui, desktop) keep their own handling.
|
|
96
96
|
const STOPS_ITSELF = new Set(['ui', 'desktop']);
|
|
97
97
|
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
// repair from a terminal needs no second package. A native build's process.execPath is agenv
|
|
101
|
-
// itself, so Node then comes from PATH, which the plugin's hooks need anyway.
|
|
102
|
-
const WIN_HOOKS_CLI = fileURLToPath(new URL('../plugins/win-hooks/bin/win-hooks.mjs', import.meta.url));
|
|
103
|
-
|
|
98
|
+
// agenv win-hooks hands the CLI this package ships every word and flag after its name and answers
|
|
99
|
+
// with its exit code, so a repair from a terminal needs no second package.
|
|
104
100
|
async function winHooks(args, env) {
|
|
105
|
-
const node =
|
|
101
|
+
const node = await nodeFor(env);
|
|
106
102
|
if (!node) return { exitCode: EXIT.failure, text: 'agenv win-hooks: no Node on PATH to start ' + WIN_HOOKS_CLI };
|
|
107
103
|
const r = spawnSync(node, [WIN_HOOKS_CLI, ...args], { env, stdio: ['inherit', 'pipe', 'inherit'], encoding: 'utf8', maxBuffer: 1 << 26, windowsHide: true });
|
|
108
104
|
if (r.error) return { exitCode: EXIT.failure, text: 'agenv win-hooks: ' + r.error.message };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "show-me-the-env",
|
|
3
|
-
"version": "0.96.
|
|
3
|
+
"version": "0.96.5",
|
|
4
4
|
"description": "Save and restore your whole agent and coding environment as one versioned .agenv repository.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"skills/",
|
|
46
46
|
"plugins/win-hooks/LICENSE",
|
|
47
47
|
"plugins/win-hooks/README.md",
|
|
48
|
+
"plugins/win-hooks/package.json",
|
|
48
49
|
"plugins/win-hooks/bin/",
|
|
49
50
|
"plugins/win-hooks/hooks/",
|
|
50
51
|
"plugins/win-hooks/src/",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lilmgenius/win-hooks",
|
|
3
|
+
"version": "1.18.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"description": "Windows auto-patcher for vibe coders.",
|
|
8
|
+
"longDescription": "win-hooks scans the Claude Code and Codex plugins installed on a Windows machine and repairs the hooks that cannot run there: .sh scripts cmd.exe cannot execute, bare Unix commands and interpreters that do not resolve, UTF-8 BOMs, backslash paths, and Codex user hooks that open with a quoted path PowerShell cannot run. It repairs at every session start and again whenever a plugin update reverts a fix, so plugins installed later are covered too.",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "node test/run.mjs"
|
|
11
|
+
},
|
|
12
|
+
"bin": {
|
|
13
|
+
"win-hooks": "bin/win-hooks.mjs"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"bin/",
|
|
17
|
+
"hooks/",
|
|
18
|
+
"src/",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"os": [
|
|
23
|
+
"win32"
|
|
24
|
+
],
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"author": {
|
|
30
|
+
"name": "LilMGenius",
|
|
31
|
+
"url": "https://github.com/LilMGenius"
|
|
32
|
+
},
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"homepage": "https://github.com/LilMGenius/show-me-the-env/tree/main/plugins/win-hooks#readme",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/LilMGenius/show-me-the-env.git",
|
|
38
|
+
"directory": "plugins/win-hooks"
|
|
39
|
+
},
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/LilMGenius/show-me-the-env/issues"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"windows",
|
|
45
|
+
"hooks",
|
|
46
|
+
"claude-code",
|
|
47
|
+
"codex",
|
|
48
|
+
"plugin",
|
|
49
|
+
"compatibility",
|
|
50
|
+
"patch",
|
|
51
|
+
"cli",
|
|
52
|
+
"winux"
|
|
53
|
+
]
|
|
54
|
+
}
|
package/profiles/index.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"label": "creator",
|
|
11
11
|
"revision": {
|
|
12
12
|
"path": "lilmgenius-agent-setup/profile.json",
|
|
13
|
-
"digest": "
|
|
13
|
+
"digest": "6f019580dec839b70a5ba37c72d233f3f63d72db44830bf76c75c269f060b1b6"
|
|
14
14
|
},
|
|
15
15
|
"compatibility": {
|
|
16
16
|
"windows-x64": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"opencodex": "experimental",
|
|
23
23
|
"vscode": "verified",
|
|
24
24
|
"vscode-cli": "verified",
|
|
25
|
-
"win-hooks": "
|
|
25
|
+
"win-hooks": "not-applicable"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
package/references/support.md
CHANGED
|
@@ -14,7 +14,7 @@ A cell is **verified** only when a run on a clean guest restored from its base s
|
|
|
14
14
|
|
|
15
15
|
## Cells by adapter
|
|
16
16
|
|
|
17
|
-
Verified cells: Windows
|
|
17
|
+
Verified cells: Windows 28, Linux 35, macOS 0. Experimental cells: Windows 25, Linux 13, macOS 11. The `*` row holds the cells every adapter shares, such as read-only detection.
|
|
18
18
|
|
|
19
19
|
| Adapter | Windows | Linux | macOS |
|
|
20
20
|
| --- | --- | --- | --- |
|
|
@@ -47,6 +47,6 @@ Verified cells: Windows 29, Linux 35, macOS 0. Experimental cells: Windows 25, L
|
|
|
47
47
|
| `tmux` | experimental: detect; unsupported: install, update, repair, uninstall | verified: install (x64); experimental: detect; unsupported: repair, uninstall | experimental: detect; unsupported: repair, uninstall |
|
|
48
48
|
| `vscode` | verified: install (x64); experimental: detect; unsupported: repair, uninstall | experimental: detect; unsupported: repair, uninstall | experimental: detect; unsupported: repair, uninstall |
|
|
49
49
|
| `vscode-cli` | verified: install (x64); experimental: detect; unsupported: update, uninstall | experimental: detect; unsupported: update, uninstall | experimental: detect; unsupported: update, uninstall |
|
|
50
|
-
| `win-hooks` |
|
|
50
|
+
| `win-hooks` | experimental: detect; unsupported: uninstall | experimental: detect; unsupported: install, update, configure, repair, uninstall | experimental: detect; unsupported: install, update, configure, repair, uninstall |
|
|
51
51
|
| `windows-terminal` | verified: detect (x64); unsupported: repair, service | unsupported: install, update, repair, service, uninstall | unsupported: install, update, repair, service, uninstall |
|
|
52
52
|
| `wsl` | unsupported: repair, service | unsupported: install, update, repair, service, uninstall | unsupported: install, update, repair, service, uninstall |
|
|
@@ -13,12 +13,26 @@ export function verifySource(source) {
|
|
|
13
13
|
// git names the top level by its long path, so an 8.3 alias in the source (a Windows TEMP like RUNNER~1) is resolved first.
|
|
14
14
|
const relative = path.relative(root, realpathSync.native(source)).split(path.sep).join('/');
|
|
15
15
|
const files = git('ls-tree', '-r', '--name-only', '-z', remote, '--', relative || '.').split('\0');
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const skills = files.filter(file => file === 'SKILL.md' || file.endsWith('/SKILL.md')).map(file => path.posix.dirname(file));
|
|
17
|
+
const missing = skills.filter(skill => !existsSync(path.join(root, skill)));
|
|
18
|
+
// A skill the default branch changed after this checkout left it stays old in every agent home, though its folder is there.
|
|
19
|
+
const changed = behind ? git('diff', '--name-only', '-z', `HEAD...${remote}`, '--', relative || '.').split('\0').filter(Boolean) : [];
|
|
20
|
+
const stale = skills.filter(skill => !missing.includes(skill) && changed.some(file => skill === '.' || file.startsWith(`${skill}/`)));
|
|
21
|
+
// A detached HEAD follows no branch, so nothing moves it to a newer default branch and its skills age without a word.
|
|
22
|
+
let branch = '';
|
|
23
|
+
try { branch = git('symbolic-ref', '--quiet', '--short', 'HEAD'); } catch { branch = ''; }
|
|
24
|
+
const failures = [];
|
|
25
|
+
if (!branch) failures.push(`${root}: HEAD is detached at ${git('rev-parse', '--short', 'HEAD')}, so nothing moves it past ${remote}; switch it to a branch that tracks ${remote}`);
|
|
26
|
+
if (!missing.length && !stale.length) return failures;
|
|
18
27
|
const log = path.join(root, '.re0', 'catchup.log');
|
|
19
28
|
const lines = existsSync(log) ? readFileSync(log, 'utf8').split(/\r?\n/) : [];
|
|
20
29
|
const refusal = lines.filter(line => /옮기지 않|원격에 없는 내용/.test(line)).at(-1);
|
|
21
|
-
|
|
30
|
+
const why = `${root} is ${behind} commits behind ${remote}${refusal ? `; ${refusal}` : ''}`;
|
|
31
|
+
return [
|
|
32
|
+
...failures,
|
|
33
|
+
...missing.map(skill => `${path.posix.basename(skill)}: ${why}`),
|
|
34
|
+
...stale.map(skill => `${path.posix.basename(skill)}: changed on ${remote}; ${why}`),
|
|
35
|
+
];
|
|
22
36
|
}
|
|
23
37
|
|
|
24
38
|
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
@@ -26,6 +40,6 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
|
|
|
26
40
|
const failures = process.argv.slice(2).flatMap(verifySource);
|
|
27
41
|
for (const failure of failures) console.error(failure);
|
|
28
42
|
if (failures.length) process.exitCode = 1;
|
|
29
|
-
else console.log('Skill sources contain every skill
|
|
43
|
+
else console.log('Skill sources sit on a branch and contain every skill of their fetched default branch as it stands there');
|
|
30
44
|
} catch (error) { console.error(`Cannot verify skill source: ${error.message}`); process.exitCode = 1; }
|
|
31
45
|
}
|
package/scripts/verify.ps1
CHANGED
|
@@ -320,7 +320,7 @@ if ($Mode -eq 'Live') {
|
|
|
320
320
|
$skillSources = @($manifest.skillLinks.sources | ForEach-Object { Expand-Token $_ $manifest })
|
|
321
321
|
if ($skillSources.Count -gt 0) {
|
|
322
322
|
& node (Join-Path $PSScriptRoot 'verify-skill-sources.mjs') @skillSources 2>&1 | ForEach-Object { Write-Info "$_" }
|
|
323
|
-
Test-Check ($LASTEXITCODE -eq 0) 'skill sources contain every skill
|
|
323
|
+
Test-Check ($LASTEXITCODE -eq 0) 'skill sources sit on a branch and contain every skill of their fetched default branch as it stands there'
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
Write-Step 'Live parity (repo snapshot vs installed machine)'
|
package/src/machines/queue.mjs
CHANGED
|
@@ -216,11 +216,17 @@ export function localRoster(home = os.homedir()) {
|
|
|
216
216
|
return { names, spaces };
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
// The
|
|
219
|
+
// The founder's own words in a unit's brief (its "## \uB300\uD45C\uB2D8 \uC6D0\uBB38" section, up to the next level-two heading): a skill he
|
|
220
|
+
// names there is his request, not a step the unit runs (2026-12-04: his quoted $ast-grep and omo:ulw-execute held skill-shape-modules-1204
|
|
221
|
+
// off every runner).
|
|
222
|
+
const FOUNDER_WORDS = /^## \uB300\uD45C\uB2D8 \uC6D0\uBB38[^\n]*\n[\s\S]*?(?=^## |(?![\s\S]))/gm;
|
|
223
|
+
|
|
224
|
+
// The skills a prompt names, as $name or namespace:name, among those this machine has, outside the founder's quoted words.
|
|
220
225
|
export function namedSkills(text, roster) {
|
|
226
|
+
const own = text.replace(FOUNDER_WORDS, '');
|
|
221
227
|
const out = new Set();
|
|
222
|
-
for (const m of
|
|
223
|
-
for (const m of
|
|
228
|
+
for (const m of own.matchAll(/(?<![\w./\\-])\$?([A-Za-z][\w-]*):([a-z0-9][a-z0-9-]*)/g)) if (roster.spaces.has(m[1]) && roster.names.has(m[2])) out.add(m[2]);
|
|
229
|
+
for (const m of own.matchAll(/\$([a-z0-9][a-z0-9-]*)(?![\w:-])/g)) if (roster.names.has(m[1])) out.add(m[1]);
|
|
224
230
|
return [...out];
|
|
225
231
|
}
|
|
226
232
|
|