fix(setup-gbrain): invoke shipped TypeScript scripts

This commit is contained in:
Seekers2001 2026-07-13 21:02:55 +08:00
parent 7c9df1c568
commit bafd6a4041
3 changed files with 26 additions and 4 deletions

View File

@ -1441,7 +1441,7 @@ curated `~/.gstack/` artifacts into gbrain so the retrieval surface
Run the probe to size the operation:
```bash
~/.claude/skills/gstack/bin/gstack-memory-ingest --probe
bun run ~/.claude/skills/gstack/bin/gstack-memory-ingest.ts --probe
```
Read the output. If `Total files in window: 0`, skip — there's nothing
@ -1486,7 +1486,7 @@ Options:
After answer:
```bash
~/.claude/skills/gstack/bin/gstack-config set transcript_ingest_mode <choice>
~/.claude/skills/gstack/bin/gstack-gbrain-sync --full --no-brain-sync
bun run ~/.claude/skills/gstack/bin/gstack-gbrain-sync.ts --full --no-brain-sync
```
(`--no-brain-sync` because Step 7 already wired that path; this just
runs the code import + memory ingest stages. Brain-sync will run on the

View File

@ -687,7 +687,7 @@ curated `~/.gstack/` artifacts into gbrain so the retrieval surface
Run the probe to size the operation:
```bash
~/.claude/skills/gstack/bin/gstack-memory-ingest --probe
bun run ~/.claude/skills/gstack/bin/gstack-memory-ingest.ts --probe
```
Read the output. If `Total files in window: 0`, skip — there's nothing
@ -732,7 +732,7 @@ Options:
After answer:
```bash
~/.claude/skills/gstack/bin/gstack-config set transcript_ingest_mode <choice>
~/.claude/skills/gstack/bin/gstack-gbrain-sync --full --no-brain-sync
bun run ~/.claude/skills/gstack/bin/gstack-gbrain-sync.ts --full --no-brain-sync
```
(`--no-brain-sync` because Step 7 already wired that path; this just
runs the code import + memory ingest stages. Brain-sync will run on the

View File

@ -0,0 +1,22 @@
import { describe, expect, test } from "bun:test";
import { readFileSync } from "fs";
import { join } from "path";
const template = readFileSync(
join(import.meta.dir, "..", "setup-gbrain", "SKILL.md.tmpl"),
"utf-8",
);
describe("setup-gbrain script invocations", () => {
test("runs the TypeScript transcript probe through Bun", () => {
expect(template).toContain(
"bun run ~/.claude/skills/gstack/bin/gstack-memory-ingest.ts --probe",
);
});
test("runs the TypeScript full sync through Bun", () => {
expect(template).toContain(
"bun run ~/.claude/skills/gstack/bin/gstack-gbrain-sync.ts --full --no-brain-sync",
);
});
});