@grackle-ai/cli 0.118.0 → 0.119.0
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
CHANGED
|
@@ -631,6 +631,25 @@ grackle streams list --internal # include internal IPC plumbing
|
|
|
631
631
|
# └──────────┴────────────────┴─────────────────────────┴──────────────┘
|
|
632
632
|
```
|
|
633
633
|
|
|
634
|
+
#### `grackle streams transcript <streamId>`
|
|
635
|
+
|
|
636
|
+
Show a stream room's **durable transcript** (most recent first) — the persisted
|
|
637
|
+
conversation that survives server restart. Internal plumbing streams are not
|
|
638
|
+
recorded. Use `--before <seq>` to page into older history.
|
|
639
|
+
|
|
640
|
+
```bash
|
|
641
|
+
grackle streams transcript stream-abc123
|
|
642
|
+
grackle streams transcript stream-abc123 --limit 20
|
|
643
|
+
grackle streams transcript stream-abc123 --before <seq> --limit 20 # older history
|
|
644
|
+
# ┌──────────────────────────┬──────────┬──────────────────────────┬─────────────┐
|
|
645
|
+
# │ Seq │ Sender │ Timestamp │ Content │
|
|
646
|
+
# ├──────────────────────────┼──────────┼──────────────────────────┼─────────────┤
|
|
647
|
+
# │ 01JV…SEQ │ a1b2c3d4 │ 2026-05-24T18:04:11.002Z │ ship it │
|
|
648
|
+
# └──────────────────────────┴──────────┴──────────────────────────┴─────────────┘
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
Options: `--before <seq>`, `--limit <n>`.
|
|
652
|
+
|
|
634
653
|
---
|
|
635
654
|
|
|
636
655
|
### Domain Events
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Command } from "commander";
|
|
2
|
-
/** Register stream inspection commands: `streams list`. */
|
|
2
|
+
/** Register stream inspection commands: `streams list`, `streams transcript`. */
|
|
3
3
|
export declare function registerStreamCommands(program: Command): void;
|
|
4
4
|
//# sourceMappingURL=streams.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../../src/commands/streams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../../src/commands/streams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASzC,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgE7D"}
|
package/dist/commands/streams.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import Table from "cli-table3";
|
|
2
2
|
import { createGrackleClients } from "../client.js";
|
|
3
|
-
/**
|
|
3
|
+
/** Max characters of message content shown inline in the transcript table. */
|
|
4
|
+
const CONTENT_PREVIEW_LEN = 80;
|
|
5
|
+
/** Default transcript row limit when --limit is omitted. */
|
|
6
|
+
const DEFAULT_TRANSCRIPT_LIMIT = "100";
|
|
7
|
+
/** Register stream inspection commands: `streams list`, `streams transcript`. */
|
|
4
8
|
export function registerStreamCommands(program) {
|
|
5
9
|
const streams = program.command("streams").description("Inspect IPC streams");
|
|
6
10
|
streams
|
|
@@ -35,5 +39,32 @@ export function registerStreamCommands(program) {
|
|
|
35
39
|
}
|
|
36
40
|
console.log(table.toString());
|
|
37
41
|
});
|
|
42
|
+
streams
|
|
43
|
+
.command("transcript <streamId>")
|
|
44
|
+
.description("Show a stream room's durable transcript (most recent first)")
|
|
45
|
+
.option("--before <seq>", "Only messages older than this seq (page into history)")
|
|
46
|
+
.option("--limit <n>", "Max messages to return", DEFAULT_TRANSCRIPT_LIMIT)
|
|
47
|
+
.action(async (streamId, opts) => {
|
|
48
|
+
const limitArg = (opts.limit ?? DEFAULT_TRANSCRIPT_LIMIT).trim();
|
|
49
|
+
if (!/^\d+$/.test(limitArg)) {
|
|
50
|
+
throw new Error(`Invalid --limit: "${opts.limit}" (expected a non-negative integer)`);
|
|
51
|
+
}
|
|
52
|
+
const { core: client } = createGrackleClients();
|
|
53
|
+
const res = await client.getStreamTranscript({
|
|
54
|
+
streamId,
|
|
55
|
+
beforeSeq: opts.before ?? "",
|
|
56
|
+
limit: Number.parseInt(limitArg, 10),
|
|
57
|
+
});
|
|
58
|
+
if (res.messages.length === 0) {
|
|
59
|
+
console.log("No messages.");
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const table = new Table({ head: ["Seq", "Sender", "Timestamp", "Content"] });
|
|
63
|
+
for (const m of res.messages) {
|
|
64
|
+
const preview = m.content.length > CONTENT_PREVIEW_LEN ? `${m.content.slice(0, CONTENT_PREVIEW_LEN)}...` : m.content;
|
|
65
|
+
table.push([m.seq, m.senderId.slice(0, 8), m.timestamp, preview]);
|
|
66
|
+
}
|
|
67
|
+
console.log(table.toString());
|
|
68
|
+
});
|
|
38
69
|
}
|
|
39
70
|
//# sourceMappingURL=streams.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streams.js","sourceRoot":"","sources":["../../src/commands/streams.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,
|
|
1
|
+
{"version":3,"file":"streams.js","sourceRoot":"","sources":["../../src/commands/streams.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,8EAA8E;AAC9E,MAAM,mBAAmB,GAAW,EAAE,CAAC;AACvC,4DAA4D;AAC5D,MAAM,wBAAwB,GAAW,KAAK,CAAC;AAE/C,iFAAiF;AACjF,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAE9E,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,iD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,MAAM,OAAO,GACX,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,mBAAmB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;YACvG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grackle-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.119.0",
|
|
4
4
|
"description": "Command-line interface for managing Grackle environments and agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"commander": "^13.0.0",
|
|
39
39
|
"ora": "^8.0.0",
|
|
40
40
|
"qrcode": "^1.5.4",
|
|
41
|
-
"@grackle-ai/common": "0.
|
|
42
|
-
"@grackle-ai/core": "0.
|
|
43
|
-
"@grackle-ai/server": "0.
|
|
41
|
+
"@grackle-ai/common": "0.119.0",
|
|
42
|
+
"@grackle-ai/core": "0.119.0",
|
|
43
|
+
"@grackle-ai/server": "0.119.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@rushstack/heft": "1.2.7",
|