@cotal-ai/connector-claude-code 0.11.3 → 0.11.5
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/dist/hook.cjs +88 -37
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +546 -3
- package/dist/mcp.cjs +390 -94
- package/package.json +6 -8
- package/dist/extension.js +0 -164
- package/dist/extension.js.map +0 -1
- package/dist/hook.js +0 -10
- package/dist/hook.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mcp.js +0 -237
- package/dist/mcp.js.map +0 -1
- package/dist/transcript.js +0 -203
- package/dist/transcript.js.map +0 -1
package/dist/transcript.js
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transcript mirror — publishes this session's own Claude Code transcript (the JSONL
|
|
3
|
-
* behind the hooks' `transcript_path`) onto a per-agent mesh channel, `tr-<name>`, so
|
|
4
|
-
* peers and observer agents can read what the agent is ACTUALLY doing, not only what
|
|
5
|
-
* it chooses to narrate.
|
|
6
|
-
*
|
|
7
|
-
* Off unless the launch sets COTAL_TRANSCRIPT (the connector's buildLaunch sets it for
|
|
8
|
-
* managed sessions; a personal session never mirrors). Flushes ride the lifecycle hooks:
|
|
9
|
-
* read the JSONL from the last offset, condense each entry to its observable surface
|
|
10
|
-
* (assistant text in full, tool calls as one-liners, tool results truncated, thinking
|
|
11
|
-
* omitted), and multicast the batch. The offset starts at end-of-file on adopt, so a
|
|
12
|
-
* resumed session never rebroadcasts history. Publishing is at-least-once: the offset
|
|
13
|
-
* commits only after a successful publish, so a mesh outage replays the batch rather
|
|
14
|
-
* than losing it.
|
|
15
|
-
*/
|
|
16
|
-
import { closeSync, fstatSync, openSync, readSync, statSync } from "node:fs";
|
|
17
|
-
const MAX_PREVIEW = 700; // tool results / user prompts — enough to see what happened
|
|
18
|
-
const MAX_CHUNK = 6000; // chars per published message; batches split on entry boundaries
|
|
19
|
-
// The `tr-<name>` convention now lives in connector-core (shared with the manager + opencode
|
|
20
|
-
// connector). Re-exported here so existing imports (mcp.ts, index.ts) keep resolving.
|
|
21
|
-
export { transcriptChannel } from "@cotal-ai/connector-core";
|
|
22
|
-
function truncate(s, max) {
|
|
23
|
-
return s.length > max ? `${s.slice(0, max - 1)}…` : s;
|
|
24
|
-
}
|
|
25
|
-
/** A tool call's most salient input, mirroring the presence preview in mcp.ts. */
|
|
26
|
-
function salient(input) {
|
|
27
|
-
const i = (input ?? {});
|
|
28
|
-
const v = i.command ?? i.file_path ?? i.path ?? i.url ?? i.pattern ?? i.description;
|
|
29
|
-
const s = typeof v === "string" ? v : Object.keys(i).length ? JSON.stringify(i) : "";
|
|
30
|
-
return s ? `: ${truncate(s, 300)}` : "";
|
|
31
|
-
}
|
|
32
|
-
/** Flatten a tool_result's content (string or text-block array) to plain text. */
|
|
33
|
-
function resultText(content) {
|
|
34
|
-
if (typeof content === "string")
|
|
35
|
-
return content;
|
|
36
|
-
if (Array.isArray(content))
|
|
37
|
-
return content
|
|
38
|
-
.map((b) => (typeof b?.text === "string" ? b.text : ""))
|
|
39
|
-
.filter(Boolean)
|
|
40
|
-
.join("\n");
|
|
41
|
-
return "";
|
|
42
|
-
}
|
|
43
|
-
/** One JSONL entry → the lines worth mirroring (empty for meta/system/thinking-only entries). */
|
|
44
|
-
function condense(line) {
|
|
45
|
-
let e;
|
|
46
|
-
try {
|
|
47
|
-
e = JSON.parse(line);
|
|
48
|
-
}
|
|
49
|
-
catch {
|
|
50
|
-
return [];
|
|
51
|
-
}
|
|
52
|
-
if (!e || e.isMeta)
|
|
53
|
-
return [];
|
|
54
|
-
const content = e.message?.content;
|
|
55
|
-
if (e.type === "assistant" && Array.isArray(content)) {
|
|
56
|
-
const out = [];
|
|
57
|
-
for (const b of content) {
|
|
58
|
-
if (b.type === "text" && b.text?.trim())
|
|
59
|
-
out.push(b.text.trim());
|
|
60
|
-
else if (b.type === "tool_use" && b.name)
|
|
61
|
-
out.push(`⚒ ${b.name}${salient(b.input)}`);
|
|
62
|
-
}
|
|
63
|
-
return out;
|
|
64
|
-
}
|
|
65
|
-
if (e.type === "user") {
|
|
66
|
-
if (typeof content === "string")
|
|
67
|
-
return content.trim() ? [`» ${truncate(content.trim(), MAX_PREVIEW)}`] : [];
|
|
68
|
-
if (Array.isArray(content)) {
|
|
69
|
-
const out = [];
|
|
70
|
-
for (const b of content) {
|
|
71
|
-
if (b.type === "tool_result") {
|
|
72
|
-
const t = resultText(b.content).trim();
|
|
73
|
-
out.push(`→ ${b.is_error ? "ERROR: " : ""}${t ? truncate(t, MAX_PREVIEW) : "(no output)"}`);
|
|
74
|
-
}
|
|
75
|
-
else if (b.type === "text" && b.text?.trim()) {
|
|
76
|
-
out.push(`» ${truncate(b.text.trim(), MAX_PREVIEW)}`);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return out;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return [];
|
|
83
|
-
}
|
|
84
|
-
export class TranscriptMirror {
|
|
85
|
-
agent;
|
|
86
|
-
channel;
|
|
87
|
-
path;
|
|
88
|
-
offset = 0;
|
|
89
|
-
/** A batch that failed mid-publish: chunks + how many already landed. Retried (from the
|
|
90
|
-
* first unsent chunk — never re-sending a delivered one) before any new read. */
|
|
91
|
-
pending;
|
|
92
|
-
/** ALL path/offset mutation and publishing runs on this serialized chain — hook events
|
|
93
|
-
* land concurrently on the control socket. */
|
|
94
|
-
chain = Promise.resolve();
|
|
95
|
-
constructor(agent, channel) {
|
|
96
|
-
this.agent = agent;
|
|
97
|
-
this.channel = channel;
|
|
98
|
-
}
|
|
99
|
-
/** Adopt the transcript at its CURRENT end — mirror only what happens from now on, so a
|
|
100
|
-
* resumed session (or a mirror that first sees the path mid-session) never rebroadcasts. */
|
|
101
|
-
adopt(path) {
|
|
102
|
-
this.enqueue(() => {
|
|
103
|
-
this.adoptNow(path);
|
|
104
|
-
return Promise.resolve();
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
/** Queue a flush of new transcript entries to the channel. Never throws, never blocks the
|
|
108
|
-
* hook reply — the read+publish runs on the serialized chain. */
|
|
109
|
-
flush(path) {
|
|
110
|
-
this.enqueue(() => {
|
|
111
|
-
if (!this.path)
|
|
112
|
-
this.adoptNow(path);
|
|
113
|
-
return this.doFlush();
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
enqueue(step) {
|
|
117
|
-
this.chain = this.chain.then(step).catch((e) => {
|
|
118
|
-
process.stderr.write(`[cotal-connector] transcript mirror: ${e.message}\n`);
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
adoptNow(path) {
|
|
122
|
-
if (typeof path !== "string" || !path || this.path === path)
|
|
123
|
-
return;
|
|
124
|
-
this.path = path;
|
|
125
|
-
this.pending = undefined; // a batch from the old path must not commit the new offset
|
|
126
|
-
try {
|
|
127
|
-
this.offset = statSync(path).size;
|
|
128
|
-
}
|
|
129
|
-
catch {
|
|
130
|
-
this.offset = 0; // not written yet — everything from byte 0 is this session's
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
async doFlush() {
|
|
134
|
-
if (!this.path || !this.agent.connected)
|
|
135
|
-
return; // offset untouched — catch up next flush
|
|
136
|
-
if (!this.pending) {
|
|
137
|
-
const { lines, nextOffset } = this.readComplete();
|
|
138
|
-
if (nextOffset === this.offset)
|
|
139
|
-
return; // nothing new
|
|
140
|
-
this.pending = { chunks: chunkLines(lines.flatMap(condense), MAX_CHUNK), sent: 0, nextOffset };
|
|
141
|
-
}
|
|
142
|
-
// Publish the pinned batch, tracking per-chunk progress: a mid-batch failure resumes at
|
|
143
|
-
// the first UNSENT chunk (no duplicates), and only a fully delivered batch commits the
|
|
144
|
-
// offset — the read range stays pinned until then.
|
|
145
|
-
const p = this.pending;
|
|
146
|
-
while (p.sent < p.chunks.length) {
|
|
147
|
-
await this.agent.send(p.chunks[p.sent], this.channel);
|
|
148
|
-
p.sent++;
|
|
149
|
-
}
|
|
150
|
-
this.offset = p.nextOffset;
|
|
151
|
-
this.pending = undefined;
|
|
152
|
-
}
|
|
153
|
-
/** New complete lines since the offset (a trailing partial line stays for the next flush). */
|
|
154
|
-
readComplete() {
|
|
155
|
-
const none = () => ({ lines: [], nextOffset: this.offset }); // evaluated late — after any truncation reset
|
|
156
|
-
let fd;
|
|
157
|
-
try {
|
|
158
|
-
fd = openSync(this.path, "r");
|
|
159
|
-
}
|
|
160
|
-
catch {
|
|
161
|
-
return none();
|
|
162
|
-
}
|
|
163
|
-
try {
|
|
164
|
-
const size = fstatSync(fd).size;
|
|
165
|
-
if (size < this.offset)
|
|
166
|
-
this.offset = 0; // truncated/rotated — start over
|
|
167
|
-
if (size === this.offset)
|
|
168
|
-
return none();
|
|
169
|
-
const buf = Buffer.alloc(size - this.offset);
|
|
170
|
-
readSync(fd, buf, 0, buf.length, this.offset);
|
|
171
|
-
const text = buf.toString("utf8");
|
|
172
|
-
const lastNl = text.lastIndexOf("\n");
|
|
173
|
-
if (lastNl < 0)
|
|
174
|
-
return none();
|
|
175
|
-
return {
|
|
176
|
-
lines: text.slice(0, lastNl).split("\n").filter(Boolean),
|
|
177
|
-
nextOffset: this.offset + Buffer.byteLength(text.slice(0, lastNl + 1), "utf8"),
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
finally {
|
|
181
|
-
closeSync(fd);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
/** Pack lines into chunks of at most `max` chars, splitting only on line boundaries
|
|
186
|
-
* (an oversized single line becomes its own chunk — never dropped). */
|
|
187
|
-
function chunkLines(lines, max) {
|
|
188
|
-
const chunks = [];
|
|
189
|
-
let cur = "";
|
|
190
|
-
for (const line of lines) {
|
|
191
|
-
if (cur && cur.length + 1 + line.length > max) {
|
|
192
|
-
chunks.push(cur);
|
|
193
|
-
cur = line;
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
cur = cur ? `${cur}\n${line}` : line;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
if (cur)
|
|
200
|
-
chunks.push(cur);
|
|
201
|
-
return chunks;
|
|
202
|
-
}
|
|
203
|
-
//# sourceMappingURL=transcript.js.map
|
package/dist/transcript.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transcript.js","sourceRoot":"","sources":["../src/transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG7E,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,4DAA4D;AACrF,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,iEAAiE;AAEzF,6FAA6F;AAC7F,sFAAsF;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,SAAS,QAAQ,CAAC,CAAS,EAAE,GAAW;IACtC,OAAO,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,kFAAkF;AAClF,SAAS,OAAO,CAAC,KAAc;IAC7B,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAA4B,CAAC;IACnD,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,WAAW,CAAC;IACpF,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,S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