@tryglen/pi 0.6.0 → 0.6.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryglen/pi",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Shared team memory for coding agents — automatic recall and capture on every turn via the glen CLI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
|
+
"prepublishOnly": "echo 'Do not publish from this folder. pi-publish.yml packs, checks and publishes the tarball.' && exit 1",
|
|
34
35
|
"typecheck": "tsc --noEmit",
|
|
35
36
|
"test": "vitest run"
|
|
36
37
|
},
|
|
@@ -5,7 +5,7 @@ description: Trace a specific piece of code to the agent conversations that prod
|
|
|
5
5
|
|
|
6
6
|
Resolve the file and line range the user is asking about, then run
|
|
7
7
|
`glen code-search <path:start-end> "<the user's question>"` via Bash — e.g.
|
|
8
|
-
`glen code-search src/
|
|
8
|
+
`glen code-search src/api/rate-limit.ts:40-85 "why is this rate-limited?"`.
|
|
9
9
|
|
|
10
10
|
The output is the ranked memory plus the full transcripts of the conversations
|
|
11
11
|
behind the commits that last touched those lines. Answer from those transcripts —
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { parseJson } from "./parse-json";
|
|
2
|
+
|
|
1
3
|
// A hook prints either the JSON envelope or plain text meant as context.
|
|
2
4
|
export const parseHookOutput = (
|
|
3
5
|
raw: string,
|
|
@@ -17,11 +19,3 @@ export const parseHookOutput = (
|
|
|
17
19
|
notice: typeof notice === "string" ? notice : "",
|
|
18
20
|
};
|
|
19
21
|
};
|
|
20
|
-
|
|
21
|
-
const parseJson = (text: string): unknown => {
|
|
22
|
-
try {
|
|
23
|
-
return JSON.parse(text) as unknown;
|
|
24
|
-
} catch {
|
|
25
|
-
return undefined;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
@@ -17,7 +17,8 @@ export const runGlenHook = (
|
|
|
17
17
|
const chunks: Buffer[] = [];
|
|
18
18
|
const timer = setTimeout(() => child.kill("SIGKILL"), timeoutMs);
|
|
19
19
|
child.stdout.on("data", (chunk: Buffer) => chunks.push(chunk));
|
|
20
|
-
|
|
20
|
+
// A glen that exits before reading its payload makes this write fail (EPIPE); close still resolves.
|
|
21
|
+
child.stdin.on("error", () => undefined);
|
|
21
22
|
child.on("error", (error: NodeJS.ErrnoException) => {
|
|
22
23
|
clearTimeout(timer);
|
|
23
24
|
resolve({ kind: error.code === "ENOENT" ? "missing" : "failed" });
|