pi-gsd 1.11.4 → 1.11.6
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/.gsd/extensions/pi-gsd-hooks.ts +17 -7
- package/README.md +4 -2
- package/package.json +1 -1
|
@@ -101,17 +101,25 @@ export default function (pi: ExtensionAPI) {
|
|
|
101
101
|
// contents programmatically. Zero tool calls, provider-agnostic.
|
|
102
102
|
// Missing files → red error + action:"handled" skips the LLM entirely.
|
|
103
103
|
pi.on("input", async (event, ctx) => {
|
|
104
|
-
|
|
104
|
+
ctx.ui.notify(`[GSD:input] FIRED. source=${event.source} text.len=${event.text?.length ?? "undef"} text.start=${JSON.stringify((event.text ?? "").slice(0, 120))}`, "info");
|
|
105
|
+
|
|
106
|
+
if (event.source === "extension") {
|
|
107
|
+
ctx.ui.notify("[GSD:input] SKIP: source=extension", "info");
|
|
108
|
+
return { action: "continue" };
|
|
109
|
+
}
|
|
105
110
|
|
|
106
111
|
const text = event.text;
|
|
107
112
|
const fileRefPattern = /@(\.pi\/gsd\/[^\s]+|\.planning\/[^\s]+)/g;
|
|
108
113
|
const refs = [...text.matchAll(fileRefPattern)];
|
|
114
|
+
ctx.ui.notify(`[GSD:input] refs found: ${refs.length}. Matches: ${refs.map(m => m[0]).join(", ") || "NONE"}`, "info");
|
|
115
|
+
|
|
109
116
|
if (refs.length === 0) return { action: "continue" };
|
|
110
117
|
|
|
111
|
-
// Fallback lookup: package harness root via this extension file's location
|
|
112
|
-
// <pkg>/.gsd/extensions/pi-gsd-hooks.ts → <pkg>/.gsd/harnesses/pi/get-shit-done
|
|
113
118
|
const extFile = typeof __filename !== "undefined" ? __filename : "";
|
|
119
|
+
ctx.ui.notify(`[GSD:input] __filename=${extFile || "UNDEFINED"}`, "info");
|
|
114
120
|
const pkgHarness = extFile ? join(dirname(extFile), "..", "harnesses", "pi", "get-shit-done") : "";
|
|
121
|
+
ctx.ui.notify(`[GSD:input] pkgHarness=${pkgHarness || "EMPTY"} exists=${pkgHarness ? existsSync(pkgHarness) : false}`, "info");
|
|
122
|
+
ctx.ui.notify(`[GSD:input] cwd=${ctx.cwd}`, "info");
|
|
115
123
|
|
|
116
124
|
const failed: string[] = [];
|
|
117
125
|
let transformed = text;
|
|
@@ -120,25 +128,27 @@ export default function (pi: ExtensionAPI) {
|
|
|
120
128
|
const relPath = match[1];
|
|
121
129
|
const subPath = relPath.replace(/^\.pi\/gsd\//, "");
|
|
122
130
|
|
|
123
|
-
// Lookup order:
|
|
124
|
-
// 1. Project symlink: <cwd>/.pi/gsd/<subPath>
|
|
125
|
-
// 2. Package harness: <pkg>/.gsd/harnesses/pi/get-shit-done/<subPath>
|
|
126
131
|
const candidates = [
|
|
127
132
|
join(ctx.cwd, relPath),
|
|
128
133
|
...(relPath.startsWith(".pi/gsd/") ? [join(pkgHarness, subPath)] : []),
|
|
129
134
|
];
|
|
135
|
+
ctx.ui.notify(`[GSD:input] ref=${relPath} candidates=${JSON.stringify(candidates)} exists=${candidates.map(c => existsSync(c))}`, "info");
|
|
130
136
|
|
|
131
137
|
let fileContent: string | null = null;
|
|
132
138
|
for (const candidate of candidates) {
|
|
133
139
|
try {
|
|
134
140
|
if (existsSync(candidate)) {
|
|
135
141
|
fileContent = readFileSync(candidate, "utf8");
|
|
142
|
+
ctx.ui.notify(`[GSD:input] FOUND ${candidate} (${fileContent.length} bytes)`, "info");
|
|
136
143
|
break;
|
|
137
144
|
}
|
|
138
|
-
} catch {
|
|
145
|
+
} catch (e) {
|
|
146
|
+
ctx.ui.notify(`[GSD:input] ERROR reading ${candidate}: ${e}`, "error");
|
|
147
|
+
}
|
|
139
148
|
}
|
|
140
149
|
|
|
141
150
|
if (fileContent === null) {
|
|
151
|
+
ctx.ui.notify(`[GSD:input] FAILED: ${relPath} — no candidate found`, "error");
|
|
142
152
|
failed.push(relPath);
|
|
143
153
|
} else {
|
|
144
154
|
transformed = transformed.replace(match[0], fileContent);
|
package/README.md
CHANGED
|
@@ -139,8 +139,10 @@ Switch profile: `/gsd-set-profile <profile>`
|
|
|
139
139
|
| Instant commands (no LLM cost) | ❌ | ✔️ | `/gsd-progress`, `/gsd-stats`, `/gsd-health`, `/gsd-help`, `/gsd-next` - zero LLM, editor pivot |
|
|
140
140
|
| `/gsd-next` auto-advance | ❌ | ✔️ | Deterministic phase routing, pre-fills editor with the correct next command |
|
|
141
141
|
| Prompt-dispatch for all skills | ❌ | ✔️ | 54 pi prompt templates - clean autocomplete, arg hints, direct workflow dispatch |
|
|
142
|
-
|
|
|
143
|
-
|
|
|
142
|
+
| `ui-brand` context modularity | ❌ | ✔️ | `<core>` tag splits ui-brand.md — planning gets 103 lines, UI commands get full 166 |
|
|
143
|
+
| `syncReferenceToCore` utility | ❌ | ✔️ | Auto-derives `-core.md` from any `<core>`-tagged reference; syncs on session start + after tool writes |
|
|
144
|
+
| Programmatic `@file` injection | ❌ | ✔️ | Extension intercepts `@.pi/gsd/...` refs, injects file contents before LLM sees them — zero tool calls |
|
|
145
|
+
| Auto harness symlink + self-repair | ❌ | ✔️ | `.pi/gsd/` → package harness; detects stale dirs, replaces with symlink; fallback to package root |
|
|
144
146
|
| `/gsd-plan-milestone` command | ❌ | ✔️ | Plan all unplanned phases - one mode question, scope pre-check per phase, context-safe checkpoint |
|
|
145
147
|
| `/gsd-execute-milestone` command | ❌ | ✔️ | Execute all phases + scope guardian + auto gap/debt retry loop (insert-phase) + audit→complete→cleanup |
|
|
146
148
|
|