@groundtrack/hooks 0.1.2 → 0.1.3
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 +7 -0
- package/dist/doctor.js +11 -3
- package/dist/groundtrack.js +11 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,13 @@ Groundtrack MCP server alias, validates Claude/Codex/Cursor hook configuration,
|
|
|
24
24
|
checks the managed `AGENTS.md` and `CLAUDE.md` instructions, and simulates a
|
|
25
25
|
hook invocation. It exits non-zero when repair is needed.
|
|
26
26
|
|
|
27
|
+
The Doctor verifies local configuration and enrichment behavior, but it cannot
|
|
28
|
+
observe whether a coding-agent host loaded or trusted a project hook. A
|
|
29
|
+
`search_experiences` MCP response is the authoritative live check: Groundtrack
|
|
30
|
+
returns a `hook_context_missing` warning when hook-injected session context is
|
|
31
|
+
absent. In Codex, use `/hooks` to review and trust the Groundtrack hook when that
|
|
32
|
+
warning appears.
|
|
33
|
+
|
|
27
34
|
`doctor --fix` previews the diagnosis, asks before changing anything, updates
|
|
28
35
|
only Groundtrack-owned hook entries and versioned managed instruction blocks,
|
|
29
36
|
then repeats the verification. Use `--yes` for an explicitly authorized
|
package/dist/doctor.js
CHANGED
|
@@ -510,18 +510,26 @@ export function runDoctor(options) {
|
|
|
510
510
|
updated.clientEventId === "claude:doctor-session:doctor-tool";
|
|
511
511
|
checks.push({
|
|
512
512
|
id: "hook-simulation",
|
|
513
|
-
label: "
|
|
513
|
+
label: "Local hook simulation",
|
|
514
514
|
status: simulationHealthy ? "ok" : "issue",
|
|
515
515
|
detail: simulationHealthy
|
|
516
|
-
? "session, model, and invocation context enriched"
|
|
516
|
+
? "session, model, and invocation context enriched locally"
|
|
517
517
|
: "enrichment failed",
|
|
518
518
|
});
|
|
519
|
+
checks.push({
|
|
520
|
+
id: "live-hook-activation",
|
|
521
|
+
label: "Live hook activation",
|
|
522
|
+
status: "advisory",
|
|
523
|
+
detail: clients.includes("codex")
|
|
524
|
+
? "not verifiable outside Codex; open /hooks and review and trust the Groundtrack hook"
|
|
525
|
+
: "not verifiable outside the coding-agent host; Groundtrack MCP calls report missing hook context",
|
|
526
|
+
});
|
|
519
527
|
return {
|
|
520
528
|
version,
|
|
521
529
|
clients,
|
|
522
530
|
aliases,
|
|
523
531
|
checks,
|
|
524
532
|
changedFiles,
|
|
525
|
-
healthy: checks.every((check) => check.status === "ok" || check.status === "fixed"),
|
|
533
|
+
healthy: checks.every((check) => check.status === "ok" || check.status === "fixed" || check.status === "advisory"),
|
|
526
534
|
};
|
|
527
535
|
}
|
package/dist/groundtrack.js
CHANGED
|
@@ -43,26 +43,28 @@ function parseArguments(argv) {
|
|
|
43
43
|
homeDir,
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
function printResult(result) {
|
|
46
|
+
function printResult(result, options = {}) {
|
|
47
47
|
stdout.write(`Groundtrack doctor ${result.version}\n`);
|
|
48
48
|
stdout.write(`Clients: ${result.clients.join(", ")}\n`);
|
|
49
49
|
stdout.write(`MCP aliases: ${result.aliases.join(", ")}\n\n`);
|
|
50
50
|
for (const check of result.checks) {
|
|
51
51
|
const icon = check.status === "ok"
|
|
52
52
|
? "✓"
|
|
53
|
-
: check.status === "
|
|
54
|
-
? "
|
|
55
|
-
: check.status === "
|
|
56
|
-
? "
|
|
57
|
-
: "
|
|
53
|
+
: check.status === "advisory"
|
|
54
|
+
? "i"
|
|
55
|
+
: check.status === "fixed"
|
|
56
|
+
? "◆"
|
|
57
|
+
: check.status === "blocked"
|
|
58
|
+
? "×"
|
|
59
|
+
: "!";
|
|
58
60
|
stdout.write(`${icon} ${check.label}: ${check.detail}${check.file ? ` (${check.file})` : ""}\n`);
|
|
59
61
|
}
|
|
60
62
|
if (result.changedFiles.length > 0) {
|
|
61
63
|
stdout.write(`\nUpdated ${result.changedFiles.length} file(s).\n`);
|
|
62
64
|
}
|
|
63
65
|
stdout.write(result.healthy
|
|
64
|
-
? "\nGroundtrack
|
|
65
|
-
:
|
|
66
|
+
? "\nGroundtrack local configuration is healthy. Live hook activation is verified by Groundtrack MCP calls.\n"
|
|
67
|
+
: `\nGroundtrack local configuration needs attention.${options.showFixHint ? " Run: groundtrack doctor --fix" : ""}\n`);
|
|
66
68
|
}
|
|
67
69
|
async function confirmFix() {
|
|
68
70
|
const prompt = createInterface({ input: stdin, output: stdout });
|
|
@@ -138,7 +140,7 @@ async function main() {
|
|
|
138
140
|
if (args.json)
|
|
139
141
|
stdout.write(`${JSON.stringify(diagnosis, null, 2)}\n`);
|
|
140
142
|
else
|
|
141
|
-
printResult(diagnosis);
|
|
143
|
+
printResult(diagnosis, { showFixHint: true });
|
|
142
144
|
process.exitCode = diagnosis.healthy ? 0 : 1;
|
|
143
145
|
return;
|
|
144
146
|
}
|