@agentclientprotocol/claude-agent-acp 0.113.0 → 0.113.1-preview.10
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 +5 -3
- package/dist/async-tasks.d.ts +27 -0
- package/dist/async-tasks.d.ts.map +1 -1
- package/dist/async-tasks.js +36 -0
- package/dist/claude-cli.d.ts +22 -16
- package/dist/claude-cli.d.ts.map +1 -1
- package/dist/claude-cli.js +40 -18
- package/dist/mcp-oauth.d.ts +3 -2
- package/dist/mcp-oauth.d.ts.map +1 -1
- package/dist/mcp-oauth.js +65 -27
- package/dist/resumed-session.d.ts +9 -2
- package/dist/resumed-session.d.ts.map +1 -1
- package/dist/resumed-session.js +51 -7
- package/dist/sdk-to-acp.js +4 -2
- package/dist/session-cursors.d.ts +1 -1
- package/dist/session-cursors.d.ts.map +1 -1
- package/dist/session-cursors.js +8 -2
- package/dist/session-index/service.d.ts.map +1 -1
- package/dist/session-index/service.js +9 -17
- package/dist/session-index/session-index.d.ts +1 -13
- package/dist/session-index/session-index.d.ts.map +1 -1
- package/dist/session-index/session-index.js +3 -29
- package/dist/session-index/transcript-scan.d.ts +17 -4
- package/dist/session-index/transcript-scan.d.ts.map +1 -1
- package/dist/session-index/transcript-scan.js +44 -3
- package/dist/session-mode.d.ts +38 -1
- package/dist/session-mode.d.ts.map +1 -1
- package/dist/session-mode.js +73 -15
- package/dist/session-read.d.ts +45 -0
- package/dist/session-read.d.ts.map +1 -0
- package/dist/session-read.js +300 -0
- package/dist/session-rewind.d.ts +6 -2
- package/dist/session-rewind.d.ts.map +1 -1
- package/dist/session-rewind.js +13 -4
- package/dist/session-ultracode.d.ts +14 -5
- package/dist/session-ultracode.d.ts.map +1 -1
- package/dist/session-ultracode.js +23 -11
- package/dist/startup-failure.d.ts +11 -1
- package/dist/startup-failure.d.ts.map +1 -1
- package/dist/startup-failure.js +33 -1
- package/dist/subagent-history.d.ts +9 -1
- package/dist/subagent-history.d.ts.map +1 -1
- package/dist/subagent-history.js +55 -13
- package/dist/v1/acp-agent.d.ts +8 -1
- package/dist/v1/acp-agent.d.ts.map +1 -1
- package/dist/v1/acp-agent.js +167 -87
- package/dist/v1/async-task-stop.d.ts +31 -0
- package/dist/v1/async-task-stop.d.ts.map +1 -1
- package/dist/v1/async-task-stop.js +41 -0
- package/dist/v1/session-read.d.ts +31 -0
- package/dist/v1/session-read.d.ts.map +1 -0
- package/dist/v1/session-read.js +62 -0
- package/dist/v2/agent.d.ts.map +1 -1
- package/dist/v2/agent.js +60 -25
- package/dist/v2/commands.d.ts +8 -3
- package/dist/v2/commands.d.ts.map +1 -1
- package/dist/v2/commands.js +4 -3
- package/dist/v2/config.d.ts +3 -3
- package/dist/v2/config.d.ts.map +1 -1
- package/dist/v2/config.js +11 -9
- package/dist/v2/session-read.d.ts +11 -0
- package/dist/v2/session-read.d.ts.map +1 -0
- package/dist/v2/session-read.js +28 -0
- package/dist/v2/session.d.ts.map +1 -1
- package/dist/v2/session.js +19 -2
- package/dist/v2/stream.d.ts +9 -13
- package/dist/v2/stream.d.ts.map +1 -1
- package/dist/v2/stream.js +10 -9
- package/dist/v2/subagent-replay.d.ts +16 -4
- package/dist/v2/subagent-replay.d.ts.map +1 -1
- package/dist/v2/subagent-replay.js +22 -10
- package/dist/v2/tasks.d.ts.map +1 -1
- package/dist/v2/tasks.js +5 -3
- package/package.json +8 -8
|
@@ -95,7 +95,7 @@ export declare class LastReportedEntity {
|
|
|
95
95
|
sessionUpdate: string;
|
|
96
96
|
_meta?: unknown;
|
|
97
97
|
} & Record<string, unknown>;
|
|
98
|
-
}): void;
|
|
98
|
+
}, protocol?: 1 | 2): void;
|
|
99
99
|
/** The position after the last entity of the session, if the client holds one. */
|
|
100
100
|
after(sessionId: string): CursorAnchor | undefined;
|
|
101
101
|
/** The last entity of the session that the client holds, if any. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-cursors.d.ts","sourceRoot":"","sources":["../src/session-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AA4D;IAEzF,OAAO,CACL,YAAY,EAAE;QACZ,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE;YAAE,aAAa,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,OAAO,CAAA;SAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC9E,EACD,QAAQ,GAAE,CAAC,GAAG,CAAK,GAClB,IAAI;IAqCP,kFAAkF;IAClF,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAKlD,oEAAoE;IACpE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIjD,+FAA+F;IAC/F,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;IAMzF;;;;;OAKG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAajD,+FAA+F;IAC/F,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;CAOhC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,OAAO,CAGjG;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAIzF;AAmBD;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,SAAS,cAAc,EAAE,GAClC,MAAM,GAAG,SAAS,CAKpB"}
|
package/dist/session-cursors.js
CHANGED
|
@@ -52,27 +52,33 @@ export class LastReportedEntity {
|
|
|
52
52
|
bySession = new Map();
|
|
53
53
|
/** Per session, in announcement order: the entity before each announced cursor. */
|
|
54
54
|
beforeCursor = new Map();
|
|
55
|
-
sending(notification) {
|
|
55
|
+
sending(notification, protocol = 1) {
|
|
56
56
|
const { sessionId, update } = notification;
|
|
57
57
|
const meta = update._meta;
|
|
58
58
|
if (meta?.claudeCode?.parentToolUseId)
|
|
59
59
|
return;
|
|
60
60
|
const messageId = typeof update.messageId === "string" ? update.messageId : undefined;
|
|
61
61
|
switch (update.sessionUpdate) {
|
|
62
|
+
case "user_message":
|
|
62
63
|
case "user_message_chunk":
|
|
63
64
|
if (messageId)
|
|
64
65
|
this.bySession.set(sessionId, { type: "user_message", messageId });
|
|
65
66
|
break;
|
|
67
|
+
case "agent_message":
|
|
66
68
|
case "agent_message_chunk":
|
|
67
69
|
if (messageId)
|
|
68
70
|
this.bySession.set(sessionId, { type: "agent_message", messageId });
|
|
69
71
|
break;
|
|
72
|
+
case "agent_thought":
|
|
70
73
|
case "agent_thought_chunk":
|
|
71
74
|
if (messageId)
|
|
72
75
|
this.bySession.set(sessionId, { type: "agent_thought", messageId });
|
|
73
76
|
break;
|
|
74
77
|
case "tool_call":
|
|
75
|
-
|
|
78
|
+
case "tool_call_update":
|
|
79
|
+
if ((update.sessionUpdate === "tool_call" ||
|
|
80
|
+
(protocol === 2 && typeof update.name === "string")) &&
|
|
81
|
+
typeof update.toolCallId === "string") {
|
|
76
82
|
this.bySession.set(sessionId, { type: "tool_call", toolCallId: update.toolCallId });
|
|
77
83
|
}
|
|
78
84
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/session-index/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EACL,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EACjB,MAAM,mCAAmC,CAAC;AAI3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAQrD,OAAO,EAGL,KAAK,WAAW,EA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E;;;;;;;;;;;;;;;;;;;OAmBG;IACG,OAAO,CACX,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAwE9B;;gFAE4E;YAC9D,WAAW;IAuBzB;;;;;;mCAM+B;IACzB,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA+C9D;2EACuE;IACvE,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAgB1D,+CAA+C;IAC/C,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IAI7C,iEAAiE;IACjE,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI1C,sEAAsE;IACtE,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC,4EAA4E;IAC5E,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAInD;sDACkD;IAClD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIpC,OAAO,IAAI,IAAI;CAKhB"}
|
|
@@ -19,8 +19,8 @@ import { ForkHolds, ListSubscriptions, } from "./list-subscriptions.js";
|
|
|
19
19
|
import { LiveSessionRegistry } from "./live-registry.js";
|
|
20
20
|
import { isSessionId } from "../paths.js";
|
|
21
21
|
import { canonicalPath, exists, isExactProjectDir, projectDirMatches, sameProjectPath, } from "./project-dirs.js";
|
|
22
|
-
import { readHeadTail, readHeadTailOf,
|
|
23
|
-
import { DEFAULT_LIST_LIMIT, MAX_LIST_LIMIT, ARCHIVED_FILTERS,
|
|
22
|
+
import { customTitleSidecarPath, readHeadTail, readHeadTailOf, readSidecarTitle, readTranscriptTitles, transcriptAgentName, transcriptProjectCwd, } from "./transcript-scan.js";
|
|
23
|
+
import { DEFAULT_LIST_LIMIT, MAX_LIST_LIMIT, ARCHIVED_FILTERS, SessionIndex, } from "./session-index.js";
|
|
24
24
|
import { sessionInfoOf } from "./session-info.js";
|
|
25
25
|
export const SESSION_RENAME_METHOD = "_session/rename";
|
|
26
26
|
export const SESSION_ARCHIVE_METHOD = "_session/archive";
|
|
@@ -129,17 +129,12 @@ export function decodeListCursor(cursor, scope) {
|
|
|
129
129
|
}
|
|
130
130
|
return { orderAtMs: payload.u, sessionId: payload.id };
|
|
131
131
|
}
|
|
132
|
-
/** `<projectDir>/<sessionId>/custom-title.json` of a transcript. */
|
|
133
|
-
function sidecarPath(transcriptPath) {
|
|
134
|
-
const sessionId = path.basename(transcriptPath, ".jsonl");
|
|
135
|
-
return path.join(path.dirname(transcriptPath), sessionId, "custom-title.json");
|
|
136
|
-
}
|
|
137
132
|
/** Writes `<projectDir>/<sessionId>/custom-title.json` the way the CLI's
|
|
138
133
|
* `/rename` does: file 0600 in a 0700 directory, replaced atomically. The
|
|
139
134
|
* temporary file has a random name of the CLI's `custom-title.json.tmp.*`
|
|
140
135
|
* pattern, and only a temporary file this call created is removed. */
|
|
141
136
|
export async function writeCustomTitleSidecar(transcriptPath, title) {
|
|
142
|
-
const target =
|
|
137
|
+
const target = customTitleSidecarPath(transcriptPath);
|
|
143
138
|
await fs.mkdir(path.dirname(target), { recursive: true, mode: 0o700 });
|
|
144
139
|
const temporary = `${target}.tmp.${randomBytes(8).toString("hex")}`;
|
|
145
140
|
const handle = await fs.open(temporary, "wx", 0o600);
|
|
@@ -213,13 +208,10 @@ async function ensureAgentName(filePath, sessionId, title) {
|
|
|
213
208
|
* {@link effectiveTitle}): its agent name, else the title the SDK reports.
|
|
214
209
|
* It carries the archive prefix only when the copy is archived: a generated
|
|
215
210
|
* title never archives a session. */
|
|
216
|
-
async function copyTitle(filePath
|
|
211
|
+
async function copyTitle(filePath) {
|
|
217
212
|
const { size } = await fs.stat(filePath);
|
|
218
213
|
const headTail = await readHeadTail(filePath, size);
|
|
219
|
-
const
|
|
220
|
-
? await readSidecarTitle(filePath, sessionId)
|
|
221
|
-
: undefined;
|
|
222
|
-
const { title, archived } = effectiveTitle(transcriptAgentName(headTail), sdkTitles(headTail, sidecar));
|
|
214
|
+
const { title, archived } = effectiveTitle(transcriptAgentName(headTail), await readTranscriptTitles(filePath, headTail));
|
|
223
215
|
return title !== undefined && !archived && isArchivedTitle(title) ? visibleTitle(title) : title;
|
|
224
216
|
}
|
|
225
217
|
/** Rewrites the sidecar of a copy whose title is `current` when the
|
|
@@ -228,7 +220,7 @@ async function copyTitle(filePath, sessionId) {
|
|
|
228
220
|
async function alignSidecar(transcript, current, sessionId) {
|
|
229
221
|
if (current === undefined)
|
|
230
222
|
return;
|
|
231
|
-
const sidecar = await readSidecarTitle(transcript
|
|
223
|
+
const sidecar = await readSidecarTitle(transcript);
|
|
232
224
|
if (sidecar === undefined || isArchivedTitle(sidecar) === isArchivedTitle(current))
|
|
233
225
|
return;
|
|
234
226
|
await writeCustomTitleSidecar(transcript, storedTitle(current, isArchivedTitle(current), sessionId));
|
|
@@ -451,7 +443,7 @@ export class SessionIndexService {
|
|
|
451
443
|
// The transcript holds the current title, also one changed otherwise
|
|
452
444
|
// (a `/rename`); without one, the title last given to the CLI.
|
|
453
445
|
const primary = cli ?? others[0];
|
|
454
|
-
const read = primary ? await copyTitle(primary
|
|
446
|
+
const read = primary ? await copyTitle(primary) : undefined;
|
|
455
447
|
const current = read ?? live.stored() ?? live.shown;
|
|
456
448
|
stored = change(current, sessionId);
|
|
457
449
|
if (stored !== undefined) {
|
|
@@ -496,7 +488,7 @@ export class SessionIndexService {
|
|
|
496
488
|
async titleCopies(sessionId, transcripts, change, sidecar) {
|
|
497
489
|
let first;
|
|
498
490
|
for (const transcript of transcripts) {
|
|
499
|
-
const current = await copyTitle(transcript
|
|
491
|
+
const current = await copyTitle(transcript);
|
|
500
492
|
const title = change(current, sessionId);
|
|
501
493
|
if (title === undefined) {
|
|
502
494
|
await alignSidecar(transcript, current, sessionId);
|
|
@@ -504,7 +496,7 @@ export class SessionIndexService {
|
|
|
504
496
|
}
|
|
505
497
|
await ensureTitleRecords(transcript, sessionId, title);
|
|
506
498
|
first ??= title;
|
|
507
|
-
if (sidecar === "always" || (await exists(
|
|
499
|
+
if (sidecar === "always" || (await exists(customTitleSidecarPath(transcript)))) {
|
|
508
500
|
await writeCustomTitleSidecar(transcript, title);
|
|
509
501
|
}
|
|
510
502
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* `stat` per transcript. The pages after a cursor reuse that enumeration for
|
|
7
7
|
* a short while (see {@link SessionIndex.reusableListing}). The metadata of a transcript is
|
|
8
8
|
* cached by `(path, mtime, size)` in an LRU and read on a miss from one head
|
|
9
|
-
* and tail read (the titles by the SDK's rule, see {@link
|
|
9
|
+
* and tail read (the titles by the SDK's rule, see {@link readTranscriptTitles}; the
|
|
10
10
|
* facts, see {@link scanTranscriptFile}) and the title sidecar. Misses are
|
|
11
11
|
* read in parallel batches.
|
|
12
12
|
*
|
|
@@ -73,8 +73,6 @@ export type ListQuery = {
|
|
|
73
73
|
archived: ArchivedFilter;
|
|
74
74
|
after?: ListCursor;
|
|
75
75
|
};
|
|
76
|
-
/** The title of the CLI's `custom-title.json` sidecar of a transcript. */
|
|
77
|
-
export declare function readSidecarTitle(filePath: string, sessionId: string): Promise<string | undefined>;
|
|
78
76
|
export type SessionIndexOptions = {
|
|
79
77
|
/** Whether a live process holds the session. Only for such a session the
|
|
80
78
|
* whole transcript is searched for its background tasks. */
|
|
@@ -235,16 +233,6 @@ export declare class SessionIndex {
|
|
|
235
233
|
* then the whole transcript is read.
|
|
236
234
|
*/
|
|
237
235
|
private withAllBackgroundTasks;
|
|
238
|
-
/**
|
|
239
|
-
* The titles the SDK gives the listed transcript (`customTitle` and
|
|
240
|
-
* `summary` of its `getSessionInfo`), by the SDK's rule from the head and
|
|
241
|
-
* tail read here and the sidecar (see {@link sdkTitles}). Not through the
|
|
242
|
-
* SDK itself: its lookup of the transcript reads the whole project
|
|
243
|
-
* directory on every call, which made each page of a large project cost a
|
|
244
|
-
* listing of every transcript per row, and it may read another copy of the
|
|
245
|
-
* session than the listed one.
|
|
246
|
-
*/
|
|
247
|
-
private titlesOf;
|
|
248
236
|
/** Whether a successor of a continued transcript holds history: the SDK
|
|
249
237
|
* list then hides the predecessor. */
|
|
250
238
|
private continuedElsewhere;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-index.d.ts","sourceRoot":"","sources":["../../src/session-index/session-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAmBH,OAAO,
|
|
1
|
+
{"version":3,"file":"session-index.d.ts","sourceRoot":"","sources":["../../src/session-index/session-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAmBH,OAAO,EAYL,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,uEAAuE;AACvE,qBAAa,4BAA6B,SAAQ,KAAK;CAAG;AAiB1D;;aAEa;AACb,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,UAAU,GAAG,KAAK,CAAC;AAE/D,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAAsC,CAAC;AAE7F,8DAA8D;AAC9D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAEtF;AAED,oDAAoD;AACpD,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;CACb,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@
|
|
|
6
6
|
* `stat` per transcript. The pages after a cursor reuse that enumeration for
|
|
7
7
|
* a short while (see {@link SessionIndex.reusableListing}). The metadata of a transcript is
|
|
8
8
|
* cached by `(path, mtime, size)` in an LRU and read on a miss from one head
|
|
9
|
-
* and tail read (the titles by the SDK's rule, see {@link
|
|
9
|
+
* and tail read (the titles by the SDK's rule, see {@link readTranscriptTitles}; the
|
|
10
10
|
* facts, see {@link scanTranscriptFile}) and the title sidecar. Misses are
|
|
11
11
|
* read in parallel batches.
|
|
12
12
|
*
|
|
@@ -24,7 +24,7 @@ import { sanitizeTitle } from "../session-titles.js";
|
|
|
24
24
|
import { effectiveTitle, visibleTitle } from "./archive-title.js";
|
|
25
25
|
import { isSessionId, projectsRoot } from "../paths.js";
|
|
26
26
|
import { canonicalPath, encodeProjectPath, errorCode, exists, isExactProjectDir, normalizePath, pathAndAncestors, projectDirMatches, projectDirsOf, sameProjectPath, } from "./project-dirs.js";
|
|
27
|
-
import { continuedInSessionId, hasHistory, isSidechainTranscript, lastTimestamp, readHeadTail, relocatedCwd, scanTranscriptFile,
|
|
27
|
+
import { continuedInSessionId, hasHistory, isSidechainTranscript, lastTimestamp, readHeadTail, readTranscriptTitles, relocatedCwd, scanTranscriptFile, transcriptAgentName, transcriptProjectCwd, } from "./transcript-scan.js";
|
|
28
28
|
import { searchBackgroundTasks } from "./background-tasks.js";
|
|
29
29
|
import { DirListings, statFiles } from "./dir-listing.js";
|
|
30
30
|
import { isInLinkedWorktree, worktreeCounterparts } from "./worktrees.js";
|
|
@@ -168,17 +168,6 @@ function byMtimeDescending(a, b) {
|
|
|
168
168
|
return b.mtimeMs - a.mtimeMs;
|
|
169
169
|
return a.sessionId < b.sessionId ? -1 : a.sessionId > b.sessionId ? 1 : 0;
|
|
170
170
|
}
|
|
171
|
-
/** The title of the CLI's `custom-title.json` sidecar of a transcript. */
|
|
172
|
-
export async function readSidecarTitle(filePath, sessionId) {
|
|
173
|
-
try {
|
|
174
|
-
const text = await fs.readFile(path.join(path.dirname(filePath), sessionId, "custom-title.json"), "utf8");
|
|
175
|
-
const title = JSON.parse(text).customTitle;
|
|
176
|
-
return typeof title === "string" && title.trim() ? title : undefined;
|
|
177
|
-
}
|
|
178
|
-
catch {
|
|
179
|
-
return undefined;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
171
|
/**
|
|
183
172
|
* On macOS the SDK opens `<projects>/<encoded cwd>` through the file system,
|
|
184
173
|
* which ignores case on the usual volumes: a directory whose name differs in
|
|
@@ -876,7 +865,7 @@ export class SessionIndex {
|
|
|
876
865
|
]);
|
|
877
866
|
if (fileCwd)
|
|
878
867
|
this.dirCwds.set(candidate.dirName, fileCwd);
|
|
879
|
-
const sdk = await
|
|
868
|
+
const sdk = await readTranscriptTitles(candidate.filePath, headTail);
|
|
880
869
|
// No title at all: the SDK does not list it either.
|
|
881
870
|
if (!sdk.summary)
|
|
882
871
|
return null;
|
|
@@ -916,21 +905,6 @@ export class SessionIndex {
|
|
|
916
905
|
const backgroundTasks = await searchBackgroundTasks(candidate.filePath, candidate.size);
|
|
917
906
|
return { ...facts, backgroundTasks };
|
|
918
907
|
}
|
|
919
|
-
/**
|
|
920
|
-
* The titles the SDK gives the listed transcript (`customTitle` and
|
|
921
|
-
* `summary` of its `getSessionInfo`), by the SDK's rule from the head and
|
|
922
|
-
* tail read here and the sidecar (see {@link sdkTitles}). Not through the
|
|
923
|
-
* SDK itself: its lookup of the transcript reads the whole project
|
|
924
|
-
* directory on every call, which made each page of a large project cost a
|
|
925
|
-
* listing of every transcript per row, and it may read another copy of the
|
|
926
|
-
* session than the listed one.
|
|
927
|
-
*/
|
|
928
|
-
async titlesOf(candidate, headTail) {
|
|
929
|
-
const sidecar = tailCustomTitle(headTail) === undefined
|
|
930
|
-
? await readSidecarTitle(candidate.filePath, candidate.sessionId)
|
|
931
|
-
: undefined;
|
|
932
|
-
return sdkTitles(headTail, sidecar);
|
|
933
|
-
}
|
|
934
908
|
/** Whether a successor of a continued transcript holds history: the SDK
|
|
935
909
|
* list then hides the predecessor. */
|
|
936
910
|
async continuedElsewhere(candidate, metadata) {
|
|
@@ -133,9 +133,18 @@ export declare function scanTranscript({ head, tail }: HeadTail, options?: {
|
|
|
133
133
|
/** Whether the first record of the transcript is a sidechain one, which the
|
|
134
134
|
* SDK never lists. */
|
|
135
135
|
export declare function isSidechainTranscript(head: string): boolean;
|
|
136
|
-
/**
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
/** `<projectDir>/<sessionId>/custom-title.json` of a transcript. */
|
|
137
|
+
export declare function customTitleSidecarPath(transcriptPath: string): string;
|
|
138
|
+
/** The custom title that the SDK reads first: the tail's, else the CLI's
|
|
139
|
+
* sidecar's. A strict read throws when the sidecar cannot be read. */
|
|
140
|
+
export declare function readRecentCustomTitle(transcriptPath: string, headTail: HeadTail, options?: {
|
|
141
|
+
strict: boolean;
|
|
142
|
+
}): Promise<string | undefined>;
|
|
143
|
+
/** The title of the CLI's sidecar, if it has a readable title. A strict read
|
|
144
|
+
* throws when the sidecar exists but cannot be read. */
|
|
145
|
+
export declare function readSidecarTitle(transcriptPath: string, options?: {
|
|
146
|
+
strict: boolean;
|
|
147
|
+
}): Promise<string | undefined>;
|
|
139
148
|
/** The last agent name of a transcript, as AIR's native Claude provider
|
|
140
149
|
* reads it: the top-level `agentName` of any record, from the tail, else
|
|
141
150
|
* from the head. */
|
|
@@ -154,7 +163,11 @@ export type SdkTitles = {
|
|
|
154
163
|
* file, without its lookup of the file. The sidecar title counts only when
|
|
155
164
|
* the tail has no custom title.
|
|
156
165
|
*/
|
|
157
|
-
export declare function sdkTitles(
|
|
166
|
+
export declare function sdkTitles(headTail: HeadTail, sidecarTitle?: string): SdkTitles;
|
|
167
|
+
/** Reads the titles of this transcript copy without another SDK project lookup. */
|
|
168
|
+
export declare function readTranscriptTitles(transcriptPath: string, headTail: HeadTail, options?: {
|
|
169
|
+
strict: boolean;
|
|
170
|
+
}): Promise<SdkTitles>;
|
|
158
171
|
/** The title of a transcript without a custom title, in the SDK's order: AI
|
|
159
172
|
* title, last prompt, summary, first prompt. The last prompt and the summary
|
|
160
173
|
* are the field of a record of any type. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript-scan.d.ts","sourceRoot":"","sources":["../../src/session-index/transcript-scan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"transcript-scan.d.ts","sourceRoot":"","sources":["../../src/session-index/transcript-scan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAehF,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,YAAY,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG;IAC5B,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;0BACsB;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gDAAgD;IAChD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;8EAC0E;IAC1E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;qDACiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;kEAC8D;IAC9D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;6DACyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;+EAG2E;IAC3E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;yEACqE;IACrE,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;0DACsD;IACtD,WAAW,EAAE,OAAO,CAA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AAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAU9E;AAED,mFAAmF;AACnF,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAC5B,OAAO,CAAC,SAAS,CAAC,CAIpB;AAED;;6CAE6C;AAC7C,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAQ3E;AAED;6EAC6E;AAC7E,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAgB/F;AAID;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAsBrE;AAOD;0EAC0E;AAC1E,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA2BnE"}
|
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
* earlier scan (see `background-tasks.ts`).
|
|
13
13
|
*/
|
|
14
14
|
import * as fs from "node:fs/promises";
|
|
15
|
+
import * as path from "node:path";
|
|
15
16
|
import { backgroundTasksOf } from "./background-tasks.js";
|
|
16
17
|
import { firstPrompt, isUserPrompt, mediaPrompt, promptOf } from "./first-prompt.js";
|
|
18
|
+
import { errorCode } from "./project-dirs.js";
|
|
17
19
|
const CHUNK_SIZE = 64 * 1024;
|
|
18
20
|
/** The largest tail window read to find the last message. */
|
|
19
21
|
const MAX_TAIL_SIZE = 4 * 1024 * 1024;
|
|
@@ -532,9 +534,40 @@ export function isSidechainTranscript(head) {
|
|
|
532
534
|
}
|
|
533
535
|
/** The title of the last `custom-title` record of the tail, as the SDK reads
|
|
534
536
|
* it (see {@link lastRecordField}). */
|
|
535
|
-
|
|
537
|
+
function tailCustomTitle({ tail, sdkTail }) {
|
|
536
538
|
return lastRecordField(sdkTail ?? tail, "customTitle", "custom-title");
|
|
537
539
|
}
|
|
540
|
+
/** `<projectDir>/<sessionId>/custom-title.json` of a transcript. */
|
|
541
|
+
export function customTitleSidecarPath(transcriptPath) {
|
|
542
|
+
const sessionId = path.basename(transcriptPath, ".jsonl");
|
|
543
|
+
return path.join(path.dirname(transcriptPath), sessionId, "custom-title.json");
|
|
544
|
+
}
|
|
545
|
+
/** The custom title that the SDK reads first: the tail's, else the CLI's
|
|
546
|
+
* sidecar's. A strict read throws when the sidecar cannot be read. */
|
|
547
|
+
export async function readRecentCustomTitle(transcriptPath, headTail, options) {
|
|
548
|
+
return tailCustomTitle(headTail) ?? (await readSidecarTitle(transcriptPath, options));
|
|
549
|
+
}
|
|
550
|
+
/** The title of the CLI's sidecar, if it has a readable title. A strict read
|
|
551
|
+
* throws when the sidecar exists but cannot be read. */
|
|
552
|
+
export async function readSidecarTitle(transcriptPath, options) {
|
|
553
|
+
const file = customTitleSidecarPath(transcriptPath);
|
|
554
|
+
let text;
|
|
555
|
+
try {
|
|
556
|
+
text = await fs.readFile(file, "utf8");
|
|
557
|
+
}
|
|
558
|
+
catch (error) {
|
|
559
|
+
if (options?.strict && errorCode(error) !== "ENOENT")
|
|
560
|
+
throw error;
|
|
561
|
+
return undefined;
|
|
562
|
+
}
|
|
563
|
+
try {
|
|
564
|
+
const title = JSON.parse(text).customTitle;
|
|
565
|
+
return typeof title === "string" && title.trim() ? title : undefined;
|
|
566
|
+
}
|
|
567
|
+
catch {
|
|
568
|
+
return undefined;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
538
571
|
/** The last non-blank top-level `agentName` of the records of `text`, the
|
|
539
572
|
* name `/rename`, a `rename_session` and AIR write with the custom title. */
|
|
540
573
|
function lastAgentName(text) {
|
|
@@ -564,15 +597,23 @@ export function transcriptAgentName({ head, tail }) {
|
|
|
564
597
|
* file, without its lookup of the file. The sidecar title counts only when
|
|
565
598
|
* the tail has no custom title.
|
|
566
599
|
*/
|
|
567
|
-
export function sdkTitles(
|
|
600
|
+
export function sdkTitles(headTail, sidecarTitle) {
|
|
601
|
+
const { head, tail: wholeLines, sdkTail } = headTail;
|
|
568
602
|
const tail = sdkTail ?? wholeLines;
|
|
569
|
-
const customTitle =
|
|
603
|
+
const customTitle = tailCustomTitle(headTail) ??
|
|
570
604
|
sidecarTitle ??
|
|
571
605
|
lastRecordField(head, "customTitle", "custom-title") ??
|
|
572
606
|
lastRecordField(tail, "aiTitle", "ai-title") ??
|
|
573
607
|
lastRecordField(head, "aiTitle", "ai-title");
|
|
574
608
|
return { customTitle, summary: customTitle ?? generatedTitle({ head, tail }) };
|
|
575
609
|
}
|
|
610
|
+
/** Reads the titles of this transcript copy without another SDK project lookup. */
|
|
611
|
+
export async function readTranscriptTitles(transcriptPath, headTail, options) {
|
|
612
|
+
const customTitle = tailCustomTitle(headTail);
|
|
613
|
+
if (customTitle !== undefined)
|
|
614
|
+
return { customTitle, summary: customTitle };
|
|
615
|
+
return sdkTitles(headTail, await readSidecarTitle(transcriptPath, options));
|
|
616
|
+
}
|
|
576
617
|
/** The title of a transcript without a custom title, in the SDK's order: AI
|
|
577
618
|
* title, last prompt, summary, first prompt. The last prompt and the summary
|
|
578
619
|
* are the field of a record of any type. */
|
package/dist/session-mode.d.ts
CHANGED
|
@@ -92,13 +92,46 @@ export declare class SessionModeManager<S extends SessionMode> {
|
|
|
92
92
|
* before publishing the returned state change. */
|
|
93
93
|
reconcileForModel(session: SessionMode, model: ModelInfo | undefined): Promise<boolean>;
|
|
94
94
|
/**
|
|
95
|
-
* Sets the mode on the query
|
|
95
|
+
* Sets the mode on the query, and returns the mode that is then in effect
|
|
96
|
+
* (see {@link setQueryMode}). `auto` on a model without Auto runs as its
|
|
96
97
|
* fallback, with the warning. With `deferWarning`, the warning waits for
|
|
97
98
|
* the next prompt (see {@link deferFallbackWarning}).
|
|
98
99
|
*/
|
|
99
100
|
selectMode(sessionId: string, modeId: string, deferWarning?: boolean): Promise<PermissionMode>;
|
|
101
|
+
/**
|
|
102
|
+
* Sets `mode` on the session's query, and returns the mode that Claude Code
|
|
103
|
+
* names as in effect in its answer (SDK 0.3.332). That is not always the
|
|
104
|
+
* mode asked for, so the session records the answer.
|
|
105
|
+
*
|
|
106
|
+
* Returns `mode` where the answer names no mode, as from a Claude Code
|
|
107
|
+
* before 2.1.332, or names one that the session does not offer: the
|
|
108
|
+
* session's current mode is always one of its `availableModes`. Rejects
|
|
109
|
+
* where Claude Code refuses the mode, e.g. "Cannot set permission mode to
|
|
110
|
+
* auto: auto mode disabled by settings".
|
|
111
|
+
*/
|
|
112
|
+
setQueryMode(session: Pick<SessionMode, "query" | "modes">, mode: PermissionMode): Promise<PermissionMode>;
|
|
113
|
+
/** The mode of Claude Code's `answer` to a request for `asked` (see {@link setQueryMode}). */
|
|
114
|
+
private namedMode;
|
|
100
115
|
setSessionMode(params: SetSessionModeRequest): Promise<SetSessionModeResponse>;
|
|
101
116
|
publishCurrent(sessionId: string, mode: string): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Records the mode that Claude Code reports for `session`, and tells the
|
|
119
|
+
* client. Claude Code reports the mode in the `init` frame at the start of
|
|
120
|
+
* each turn, and in a `status` frame after a change. That covers a change
|
|
121
|
+
* of its own: a session that starts in `auto` while settings disable Auto
|
|
122
|
+
* mode is in `default` a moment later, with a `status` frame or, when the
|
|
123
|
+
* change came before the answer to the initialize request, without one.
|
|
124
|
+
*
|
|
125
|
+
* Changes nothing for the mode already recorded, which is what a frame
|
|
126
|
+
* names after a change that the adapter asked for, and for a mode that the
|
|
127
|
+
* session does not offer, which is logged (see {@link setQueryMode}).
|
|
128
|
+
*
|
|
129
|
+
* Nothing ties a frame to the request that caused it. After two quick
|
|
130
|
+
* changes by the client, the first one's frame can arrive when the second
|
|
131
|
+
* mode is already recorded: the session then shows the first mode until
|
|
132
|
+
* the second frame arrives.
|
|
133
|
+
*/
|
|
134
|
+
modeReported(sessionId: string, session: S, mode: PermissionMode): Promise<void>;
|
|
102
135
|
publishFallbackWarning(sessionId: string, session: SessionMode): Promise<void>;
|
|
103
136
|
/**
|
|
104
137
|
* Leaves the Auto fallback's warning for the next prompt
|
|
@@ -112,6 +145,10 @@ export declare class SessionModeManager<S extends SessionMode> {
|
|
|
112
145
|
private isAutoUnavailable;
|
|
113
146
|
private isAvailable;
|
|
114
147
|
private parseMode;
|
|
148
|
+
/**
|
|
149
|
+
* Sets `mode` on the query, and returns the mode then in effect (see
|
|
150
|
+
* {@link setQueryMode}). A failure is logged, and `mode` is returned.
|
|
151
|
+
*/
|
|
115
152
|
private trySyncMode;
|
|
116
153
|
}
|
|
117
154
|
export declare function buildAvailableModes({ allowBypass, allowAuto }: ModeAvailability, air?: boolean): SessionModeState["availableModes"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-mode.d.ts","sourceRoot":"","sources":["../src/session-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,KAAK,EACN,MAAM,gCAAgC,CAAC;AAUxC,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,kBAAkB,EAAE,cAA8B,CAAC;AAYhE,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,gBAAgB,CAAC;IACxB,MAAM,EAAE;QAAE,cAAc,EAAE,MAAM,CAA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