@lucascouts/claude-agent-acp-plus 0.21.0 → 0.22.1
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/acp-agent.d.ts +8 -0
- package/dist/acp-agent.d.ts.map +1 -1
- package/dist/acp-agent.js +92 -36
- package/dist/compacted-history.d.ts +42 -0
- package/dist/compacted-history.d.ts.map +1 -0
- package/dist/compacted-history.js +121 -0
- package/dist/elicitation.d.ts +18 -10
- package/dist/elicitation.d.ts.map +1 -1
- package/dist/elicitation.js +71 -22
- package/dist/session-mode.d.ts +4 -0
- package/dist/session-mode.d.ts.map +1 -1
- package/dist/session-mode.js +13 -5
- package/dist/session-notices.d.ts +41 -0
- package/dist/session-notices.d.ts.map +1 -0
- package/dist/session-notices.js +69 -0
- package/dist/transcript-path.d.ts +4 -0
- package/dist/transcript-path.d.ts.map +1 -0
- package/dist/transcript-path.js +25 -0
- package/package.json +7 -7
package/dist/acp-agent.d.ts
CHANGED
|
@@ -87,6 +87,14 @@ type Turn = {
|
|
|
87
87
|
* so the consumer can't promote them via the replay; it falls back to
|
|
88
88
|
* promoting the queue head when the result arrives. */
|
|
89
89
|
isLocalOnlyCommand: boolean;
|
|
90
|
+
/** Whitespace-normalized text this turn delivered as live `notice` updates
|
|
91
|
+
* (SDK `informational` frames on the notice lane). A hook-blocked turn's
|
|
92
|
+
* result repeats the block reason verbatim with zero output tokens; the
|
|
93
|
+
* issue-#453 result-text fallback skips a result that only repeats one of
|
|
94
|
+
* these, without the notice counting as the turn's answer. Recorded on the
|
|
95
|
+
* queue head, not `activeTurn`: a UserPromptSubmit block arrives before
|
|
96
|
+
* any echo, so the turn is only promoted when its result lands. */
|
|
97
|
+
noticeTexts?: string[];
|
|
90
98
|
/** Set when this turn's prompt is exactly `/usage` (story 011, R2.3). The
|
|
91
99
|
* command still runs through the normal SDK turn — ordering, cancellation,
|
|
92
100
|
* persistence and replay are untouched — and the structured render is only
|
package/dist/acp-agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../src/acp-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EAGnB,kBAAkB,EAClB,kBAAkB,EAClB,+BAA+B,EAC/B,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EAGb,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,cAAc,EAEd,mBAAmB,EACnB,oBAAoB,EAEpB,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,6BAA6B,EAC7B,8BAA8B,EAC9B,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EAEtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,SAAS,EACT,UAAU,EAEV,sBAAsB,EACtB,aAAa,EAIb,SAAS,EAIT,OAAO,EACP,cAAc,EAEd,KAAK,EAKL,gBAAgB,EAChB,0BAA0B,EAC1B,cAAc,EACd,QAAQ,EAET,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAKL,WAAW,EACX,mBAAmB,EACnB,YAAY,EAIb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAiB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CA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,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;CAC7C,GACA,mBAAmB,EAAE,CAgIvB;AAED;;;;;;;;;;;oEAWoE;AACpE,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC,EAC3D,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,cAAc,CAAC,CAczB;AAED,wBAAgB,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM;;;EAgDrC"}
|
package/dist/acp-agent.js
CHANGED
|
@@ -28,10 +28,13 @@ import { buildClaudePermissionPresentation } from "./permissions/presentation.js
|
|
|
28
28
|
import { decodeClaudePermissionResponse } from "./permissions/response.js";
|
|
29
29
|
import { activeUsageLimitMessage, airSessionFailureCapabilityMeta, assistantMessageText, createSessionFailureState, isSyntheticUsageLimitMessage, providerFailureCategory, SessionFailureController, sessionFailureMeta, supportsAirSessionFailures, } from "./session-failure-extension.js";
|
|
30
30
|
import { AGENT_FILE_CHANGE_REPORT_CAPABILITY, agentFileChangeReportMeta, agentFileChangeReportRequestId, containsFileChangeAuditMarker, createFileChangeAuditSupport, createFileChangeAuditTurnState, FILE_CHANGE_AUDIT_SERVER_NAME, isFileChangeAuditReportPhase, isFileChangeAuditTool, supportsAgentFileChangeReport, } from "./file-change-audit.js";
|
|
31
|
+
import { clientSupportsNotices, MAX_NOTICE_TITLE_LENGTH, normalizeNoticeText, noticeOrTranscriptUpdate, sentenceCase, splitNoticeText, } from "./session-notices.js";
|
|
31
32
|
import { applyTaskCreate, applyTaskList, applyTaskUpdate, createPostToolUseHook, createTaskHook, parseTaskCreateOutput, parseTaskListOutput, parseTaskUpdateOutput, planEntries, registerHookCallback, taskStateToPlanEntries, toolInfoFromToolUse, toolUpdateFromDiffToolResponse, toolUpdateFromToolResult, } from "./tools.js";
|
|
32
33
|
import { nodeToWebReadable, nodeToWebWritable, Pushable, unreachable } from "./utils.js";
|
|
33
34
|
import { acceptedPlanToolResult, ExitPlanCoordinator, exitPlanModeRawOutput, isExitPlanInterruptionResult, observeExitPlanToolResults, } from "./exit-plan.js";
|
|
34
35
|
import { DEFAULT_AGENT_ID, EFFORT_CONFIG_ID } from "./session-config-ids.js";
|
|
36
|
+
import { withPrecompactHistory } from "./compacted-history.js";
|
|
37
|
+
import { findTranscript } from "./transcript-path.js";
|
|
35
38
|
import { parseToolResultMeta } from "./tool-result-meta.js";
|
|
36
39
|
import { AccountUsageTracker } from "./account-usage.js";
|
|
37
40
|
import { readFreshLimits, sharedSampleMaxAgeMs, writeLimits } from "./quota-cache.js";
|
|
@@ -41,7 +44,6 @@ export { DEFAULT_AGENT_ID, EFFORT_CONFIG_ID } from "./session-config-ids.js";
|
|
|
41
44
|
import { MODE_CONFIG_ID, SessionModeManager } from "./session-mode.js";
|
|
42
45
|
export const CLAUDE_CONFIG_DIR = process.env.CLAUDE_CONFIG_DIR ?? path.join(os.homedir(), ".claude");
|
|
43
46
|
const execFileAsync = promisify(execFile);
|
|
44
|
-
const MAX_INLINE_FAILURE_TITLE_LENGTH = 256;
|
|
45
47
|
const ZERO_USAGE = Object.freeze({
|
|
46
48
|
input_tokens: 0,
|
|
47
49
|
output_tokens: 0,
|
|
@@ -645,6 +647,8 @@ export class ClaudeAcpAgent {
|
|
|
645
647
|
sessionEndedMessage: SESSION_ENDED_MESSAGE,
|
|
646
648
|
updateConfigOption: (sessionId, configId, value) => this.updateConfigOption(sessionId, configId, value),
|
|
647
649
|
sessionUpdate: (params) => this.client.sessionUpdate(params),
|
|
650
|
+
// Capabilities arrive at initialize, after this constructor runs.
|
|
651
|
+
supportsNotices: () => clientSupportsNotices(this.clientCapabilities),
|
|
648
652
|
logError: (...args) => this.logger.error(...args),
|
|
649
653
|
});
|
|
650
654
|
}
|
|
@@ -1582,6 +1586,15 @@ export class ClaudeAcpAgent {
|
|
|
1582
1586
|
},
|
|
1583
1587
|
});
|
|
1584
1588
|
};
|
|
1589
|
+
// Adapter-composed advisories (hook feedback, model fallbacks) are live
|
|
1590
|
+
// events, not something the model said. Clients on the notice contract get
|
|
1591
|
+
// them as `notice` updates; the rest keep the bold-label transcript line.
|
|
1592
|
+
const supportsNotices = clientSupportsNotices(this.clientCapabilities);
|
|
1593
|
+
/** Tool uses whose progress already produced a notice: the SDK marks
|
|
1594
|
+
* repeated `informational` progress for one tool use with its
|
|
1595
|
+
* `tool_use_id` so hosts can collapse them; a notice has no lifecycle to
|
|
1596
|
+
* update, so only the first becomes one. */
|
|
1597
|
+
const noticedToolUses = new Set();
|
|
1585
1598
|
const sendUpdate = async (notification) => {
|
|
1586
1599
|
const { update } = notification;
|
|
1587
1600
|
if (isFileChangeAuditReportPhase(session.activeTurn?.fileChangeAudit) &&
|
|
@@ -2792,23 +2805,47 @@ export class ClaudeAcpAgent {
|
|
|
2792
2805
|
case "informational": {
|
|
2793
2806
|
// Free-form notice from the SDK (e.g. why a UserPromptSubmit/Stop
|
|
2794
2807
|
// hook blocked continuation). Surface the text so the user sees it
|
|
2795
|
-
// instead of a silent stop.
|
|
2796
|
-
//
|
|
2797
|
-
// prominent
|
|
2798
|
-
//
|
|
2799
|
-
//
|
|
2800
|
-
//
|
|
2801
|
-
//
|
|
2802
|
-
|
|
2808
|
+
// instead of a silent stop. Clients on the notice contract get it
|
|
2809
|
+
// as a `notice` at the SDK's level: 'warning' is the only
|
|
2810
|
+
// prominent one; 'notice' and 'suggestion' are gray status
|
|
2811
|
+
// lines; 'info' shows only in Claude Code's transcript mode, so
|
|
2812
|
+
// it is not worth a live notice at all. For the rest, ACP's
|
|
2813
|
+
// agent_message_chunk has no severity field, so fold the level
|
|
2814
|
+
// into the text for the more prominent levels ('info' is
|
|
2815
|
+
// transcript-only noise — leave plain).
|
|
2816
|
+
//
|
|
2817
|
+
// A hook-blocked turn's result repeats the block reason with zero
|
|
2818
|
+
// output tokens, and the issue-#453 fallback must not emit it a
|
|
2819
|
+
// second time. The transcript line is the stretch's delivered
|
|
2820
|
+
// text via sendUpdate; a notice is not an answer, so instead the
|
|
2821
|
+
// turn remembers the text and the fallback skips a result that
|
|
2822
|
+
// only repeats it (see `Turn.noticeTexts`).
|
|
2823
|
+
if (supportsNotices) {
|
|
2824
|
+
if (message.level === "info")
|
|
2825
|
+
break;
|
|
2826
|
+
if (message.tool_use_id) {
|
|
2827
|
+
if (noticedToolUses.has(message.tool_use_id))
|
|
2828
|
+
break;
|
|
2829
|
+
noticedToolUses.add(message.tool_use_id);
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2832
|
+
const severity = message.level === "warning" ? "warning" : "info";
|
|
2833
|
+
const transcriptText = message.level === "info"
|
|
2803
2834
|
? message.content
|
|
2804
|
-
: `**${
|
|
2835
|
+
: `**${sentenceCase(message.level)}:** ${message.content}`;
|
|
2805
2836
|
await sendUpdate({
|
|
2806
2837
|
sessionId: message.session_id,
|
|
2807
|
-
update: {
|
|
2808
|
-
|
|
2809
|
-
content
|
|
2810
|
-
|
|
2838
|
+
update: noticeOrTranscriptUpdate({
|
|
2839
|
+
severity,
|
|
2840
|
+
...splitNoticeText(message.content, severity === "warning"
|
|
2841
|
+
? "Claude reported a warning"
|
|
2842
|
+
: "Claude reported a notice"),
|
|
2843
|
+
}, supportsNotices, transcriptText, { claudeCode: { kind: "informational", level: message.level } }),
|
|
2811
2844
|
});
|
|
2845
|
+
const noticedTurn = session.activeTurn ?? session.turnQueue?.[0];
|
|
2846
|
+
if (supportsNotices && noticedTurn) {
|
|
2847
|
+
(noticedTurn.noticeTexts ??= []).push(normalizeNoticeText(message.content));
|
|
2848
|
+
}
|
|
2812
2849
|
break;
|
|
2813
2850
|
}
|
|
2814
2851
|
case "hook_started":
|
|
@@ -2950,27 +2987,30 @@ export class ClaudeAcpAgent {
|
|
|
2950
2987
|
? `${fallbackSummary}\n\n${explanation}`
|
|
2951
2988
|
: fallbackSummary;
|
|
2952
2989
|
// A silent model swap is a session-level advisory, not something the model said.
|
|
2953
|
-
// Clients
|
|
2954
|
-
//
|
|
2955
|
-
|
|
2990
|
+
// Clients on the ACP notice contract get it as a `notice`; clients that negotiated
|
|
2991
|
+
// AIR typed records get it as one of those; the rest keep the bold-label transcript
|
|
2992
|
+
// line, which was the only way to flag it before.
|
|
2993
|
+
if (!supportsNotices && supportsAirSessionFailures(this.clientCapabilities)) {
|
|
2956
2994
|
const useDetails = explanation !== undefined &&
|
|
2957
|
-
fallbackSummary.length + 2 + explanation.length >
|
|
2958
|
-
MAX_INLINE_FAILURE_TITLE_LENGTH;
|
|
2995
|
+
fallbackSummary.length + 2 + explanation.length > MAX_NOTICE_TITLE_LENGTH;
|
|
2959
2996
|
await publishSessionFailure("advisory", {
|
|
2960
2997
|
title: useDetails ? fallbackSummary : fallbackNotice,
|
|
2961
2998
|
...(useDetails ? { details: explanation } : {}),
|
|
2962
2999
|
});
|
|
2963
3000
|
}
|
|
2964
3001
|
else {
|
|
3002
|
+
// A title must stand alone: the one-line summary when it is
|
|
3003
|
+
// short enough, else a generic title with everything in the
|
|
3004
|
+
// description (the same cap the AIR lane applies above).
|
|
3005
|
+
const notice = fallbackSummary.length > MAX_NOTICE_TITLE_LENGTH
|
|
3006
|
+
? { title: "Model fallback", description: fallbackNotice }
|
|
3007
|
+
: {
|
|
3008
|
+
title: fallbackSummary,
|
|
3009
|
+
...(explanation ? { description: explanation } : {}),
|
|
3010
|
+
};
|
|
2965
3011
|
await sendUpdate({
|
|
2966
3012
|
sessionId: message.session_id,
|
|
2967
|
-
update: {
|
|
2968
|
-
sessionUpdate: "agent_message_chunk",
|
|
2969
|
-
content: {
|
|
2970
|
-
type: "text",
|
|
2971
|
-
text: `**Model fallback:** ${fallbackNotice}`,
|
|
2972
|
-
},
|
|
2973
|
-
},
|
|
3013
|
+
update: noticeOrTranscriptUpdate({ severity: "warning", ...notice }, supportsNotices, `**Model fallback:** ${fallbackNotice}`),
|
|
2974
3014
|
});
|
|
2975
3015
|
}
|
|
2976
3016
|
if (persistent) {
|
|
@@ -3397,7 +3437,8 @@ export class ClaudeAcpAgent {
|
|
|
3397
3437
|
const shouldForwardResult = session.activeTurn?.isLocalOnlyCommand ||
|
|
3398
3438
|
(!deliveredAssistantText &&
|
|
3399
3439
|
!deliveredCompactionOutput &&
|
|
3400
|
-
(message.usage.output_tokens ?? 0) === 0
|
|
3440
|
+
(message.usage.output_tokens ?? 0) === 0 &&
|
|
3441
|
+
!session.activeTurn?.noticeTexts?.includes(normalizeNoticeText(message.result)));
|
|
3401
3442
|
if (shouldForwardResult) {
|
|
3402
3443
|
// A `/usage` turn whose output arrives only on the result.
|
|
3403
3444
|
// Claiming it here also stops the raw text following a
|
|
@@ -4587,7 +4628,9 @@ export class ClaudeAcpAgent {
|
|
|
4587
4628
|
}
|
|
4588
4629
|
async replaySessionHistory(sessionId) {
|
|
4589
4630
|
const toolUseCache = {};
|
|
4590
|
-
|
|
4631
|
+
// getSessionMessages stops at the last compaction boundary; put the history
|
|
4632
|
+
// before it back, so a reopened compacted thread scrolls to its first prompt.
|
|
4633
|
+
const messages = await withPrecompactHistory(sessionId, await getSessionMessages(sessionId), CLAUDE_CONFIG_DIR);
|
|
4591
4634
|
const session = this.sessions[sessionId];
|
|
4592
4635
|
const forwardSubagentText = session?.forwardSubagentText ?? supportsSubagentTranscript(this.clientCapabilities);
|
|
4593
4636
|
const supportsTypedFailures = supportsAirSessionFailures(this.clientCapabilities);
|
|
@@ -5382,6 +5425,20 @@ export class ClaudeAcpAgent {
|
|
|
5382
5425
|
if (thinking !== undefined) {
|
|
5383
5426
|
options.thinking = thinking;
|
|
5384
5427
|
}
|
|
5428
|
+
// A session that has not finished a turn yet has no transcript, and
|
|
5429
|
+
// resuming it fails ("No conversation found with session ID"): that is why
|
|
5430
|
+
// every fresh thread's first turn used to carry the "could not be applied"
|
|
5431
|
+
// note -- Zed applies default_config_options.thinking before the first
|
|
5432
|
+
// prompt, which schedules this recreate. With nothing to resume, start the
|
|
5433
|
+
// replacement as a new session under the same id. Only on proof: the
|
|
5434
|
+
// transcript is looked for in the config dir THIS query runs with (an
|
|
5435
|
+
// account overlay moves it), and anything short of "not there" keeps
|
|
5436
|
+
// resuming, which is what the code did before.
|
|
5437
|
+
const configDir = session.queryOptions.env?.CLAUDE_CONFIG_DIR ?? CLAUDE_CONFIG_DIR;
|
|
5438
|
+
if ((await findTranscript(configDir, sessionId)) === undefined) {
|
|
5439
|
+
delete options.resume;
|
|
5440
|
+
options.sessionId = sessionId;
|
|
5441
|
+
}
|
|
5385
5442
|
if (session.currentAgent === DEFAULT_AGENT_ID) {
|
|
5386
5443
|
delete options.agent;
|
|
5387
5444
|
}
|
|
@@ -5598,20 +5655,19 @@ export class ClaudeAcpAgent {
|
|
|
5598
5655
|
// The user asked for Fast mode and the SDK is telling us it can't serve it.
|
|
5599
5656
|
// The description carries the same explanation, but a toggle silently
|
|
5600
5657
|
// snapping back is the case worth saying out loud once, at the flip.
|
|
5601
|
-
const
|
|
5658
|
+
const explanation = nextReason !== undefined ? FAST_MODE_UNAVAILABLE_EXPLANATIONS[nextReason] : undefined;
|
|
5659
|
+
const explain = session.fastModeEnabled && !enabled && explanation !== undefined;
|
|
5602
5660
|
session.fastModeEnabled = enabled;
|
|
5603
5661
|
session.fastModeDisabledReason = nextReason;
|
|
5604
5662
|
this.refreshFastModeOption(session, enabled);
|
|
5605
5663
|
if (explain) {
|
|
5606
5664
|
await this.client.sessionUpdate({
|
|
5607
5665
|
sessionId,
|
|
5608
|
-
update: {
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
},
|
|
5614
|
-
},
|
|
5666
|
+
update: noticeOrTranscriptUpdate({
|
|
5667
|
+
severity: "warning",
|
|
5668
|
+
title: "Fast mode turned off",
|
|
5669
|
+
description: `${sentenceCase(explanation)}.`,
|
|
5670
|
+
}, clientSupportsNotices(this.clientCapabilities), `**Fast mode turned off:** ${explanation}.`),
|
|
5615
5671
|
});
|
|
5616
5672
|
}
|
|
5617
5673
|
await this.client.sessionUpdate({
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { SessionMessage } from "@anthropic-ai/claude-agent-sdk";
|
|
2
|
+
/**
|
|
3
|
+
* The history a compaction hid from `getSessionMessages`, put back in front of it.
|
|
4
|
+
*
|
|
5
|
+
* `getSessionMessages` walks `parentUuid` back from the newest record, and a
|
|
6
|
+
* `compact_boundary` has `parentUuid: null`, so the walk ends there: a reopened
|
|
7
|
+
* compacted thread replays only what came after the compaction summary. Measured
|
|
8
|
+
* 2026-09-29 on this machine's two compacted transcripts -- 35 prompts in the
|
|
9
|
+
* file, 12 replayed; 3 in the file, 0 replayed. The boundary does remember what
|
|
10
|
+
* it followed (`logicalParentUuid`), and the SDK never reads it.
|
|
11
|
+
*
|
|
12
|
+
* This reads the transcript itself and walks back across the boundary: through
|
|
13
|
+
* `logicalParentUuid` when that record is in the file, else from the last
|
|
14
|
+
* main-chain record written before the boundary (a manual `/compact` can name a
|
|
15
|
+
* parent the file never received), and across every earlier boundary the same
|
|
16
|
+
* way. What it returns has the shape and the filters `getSessionMessages` uses --
|
|
17
|
+
* user and assistant records only, never `isMeta`, never a sidechain -- so the
|
|
18
|
+
* replay loop cannot tell the two halves apart.
|
|
19
|
+
*
|
|
20
|
+
* It only reads anything when the SDK's first message IS a compaction summary;
|
|
21
|
+
* an uncompacted session costs nothing. It never writes.
|
|
22
|
+
*/
|
|
23
|
+
export declare function withPrecompactHistory(sessionId: string, messages: SessionMessage[], configDir: string): Promise<SessionMessage[]>;
|
|
24
|
+
type TranscriptRecord = {
|
|
25
|
+
type?: string;
|
|
26
|
+
subtype?: string;
|
|
27
|
+
uuid?: string;
|
|
28
|
+
parentUuid?: string | null;
|
|
29
|
+
logicalParentUuid?: string | null;
|
|
30
|
+
isSidechain?: boolean;
|
|
31
|
+
isMeta?: boolean;
|
|
32
|
+
isCompactSummary?: boolean;
|
|
33
|
+
message?: unknown;
|
|
34
|
+
timestamp?: string;
|
|
35
|
+
line: number;
|
|
36
|
+
};
|
|
37
|
+
export declare function parseTranscript(text: string): TranscriptRecord[];
|
|
38
|
+
/** The main-chain history written before the LAST compaction boundary, oldest
|
|
39
|
+
* first, in `getSessionMessages`'s shape. Empty when the file has no boundary. */
|
|
40
|
+
export declare function precompactMessages(records: TranscriptRecord[], sessionId: string): SessionMessage[];
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=compacted-history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compacted-history.d.ts","sourceRoot":"","sources":["../src/compacted-history.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAGrE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,cAAc,EAAE,EAC1B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,cAAc,EAAE,CAAC,CAgB3B;AAED,KAAK,gBAAgB,GAAG;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAYhE;AAUD;mFACmF;AACnF,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,gBAAgB,EAAE,EAC3B,SAAS,EAAE,MAAM,GAChB,cAAc,EAAE,CAsDlB"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { findTranscript } from "./transcript-path.js";
|
|
3
|
+
/**
|
|
4
|
+
* The history a compaction hid from `getSessionMessages`, put back in front of it.
|
|
5
|
+
*
|
|
6
|
+
* `getSessionMessages` walks `parentUuid` back from the newest record, and a
|
|
7
|
+
* `compact_boundary` has `parentUuid: null`, so the walk ends there: a reopened
|
|
8
|
+
* compacted thread replays only what came after the compaction summary. Measured
|
|
9
|
+
* 2026-09-29 on this machine's two compacted transcripts -- 35 prompts in the
|
|
10
|
+
* file, 12 replayed; 3 in the file, 0 replayed. The boundary does remember what
|
|
11
|
+
* it followed (`logicalParentUuid`), and the SDK never reads it.
|
|
12
|
+
*
|
|
13
|
+
* This reads the transcript itself and walks back across the boundary: through
|
|
14
|
+
* `logicalParentUuid` when that record is in the file, else from the last
|
|
15
|
+
* main-chain record written before the boundary (a manual `/compact` can name a
|
|
16
|
+
* parent the file never received), and across every earlier boundary the same
|
|
17
|
+
* way. What it returns has the shape and the filters `getSessionMessages` uses --
|
|
18
|
+
* user and assistant records only, never `isMeta`, never a sidechain -- so the
|
|
19
|
+
* replay loop cannot tell the two halves apart.
|
|
20
|
+
*
|
|
21
|
+
* It only reads anything when the SDK's first message IS a compaction summary;
|
|
22
|
+
* an uncompacted session costs nothing. It never writes.
|
|
23
|
+
*/
|
|
24
|
+
export async function withPrecompactHistory(sessionId, messages, configDir) {
|
|
25
|
+
if (!startsWithCompactSummary(messages))
|
|
26
|
+
return messages;
|
|
27
|
+
const file = await findTranscript(configDir, sessionId);
|
|
28
|
+
if (!file)
|
|
29
|
+
return messages;
|
|
30
|
+
let text;
|
|
31
|
+
try {
|
|
32
|
+
text = await readFile(file, "utf8");
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return messages;
|
|
36
|
+
}
|
|
37
|
+
const earlier = precompactMessages(parseTranscript(text), sessionId);
|
|
38
|
+
if (earlier.length === 0)
|
|
39
|
+
return messages;
|
|
40
|
+
const seen = new Set(messages.map((message) => message.uuid));
|
|
41
|
+
// Messages a compaction preserved keep their uuid on both sides of the
|
|
42
|
+
// boundary; the copy after it is the one the SDK already returns.
|
|
43
|
+
return [...earlier.filter((message) => !seen.has(message.uuid)), ...messages];
|
|
44
|
+
}
|
|
45
|
+
export function parseTranscript(text) {
|
|
46
|
+
const records = [];
|
|
47
|
+
const lines = text.split("\n");
|
|
48
|
+
for (let line = 0; line < lines.length; line++) {
|
|
49
|
+
if (!lines[line].trim())
|
|
50
|
+
continue;
|
|
51
|
+
try {
|
|
52
|
+
records.push({ ...JSON.parse(lines[line]), line });
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
// A torn last line from a crashed writer: skip it, as the SDK does.
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return records;
|
|
59
|
+
}
|
|
60
|
+
function isBoundary(record) {
|
|
61
|
+
return record.type === "system" && record.subtype === "compact_boundary";
|
|
62
|
+
}
|
|
63
|
+
function isMainChain(record) {
|
|
64
|
+
return typeof record.uuid === "string" && record.isSidechain !== true;
|
|
65
|
+
}
|
|
66
|
+
/** The main-chain history written before the LAST compaction boundary, oldest
|
|
67
|
+
* first, in `getSessionMessages`'s shape. Empty when the file has no boundary. */
|
|
68
|
+
export function precompactMessages(records, sessionId) {
|
|
69
|
+
const byUuid = new Map();
|
|
70
|
+
for (const record of records)
|
|
71
|
+
if (record.uuid)
|
|
72
|
+
byUuid.set(record.uuid, record);
|
|
73
|
+
const boundaries = records.filter(isBoundary);
|
|
74
|
+
const last = boundaries[boundaries.length - 1];
|
|
75
|
+
if (!last)
|
|
76
|
+
return [];
|
|
77
|
+
// Where a boundary's history continues: its logical parent when the file has
|
|
78
|
+
// it, else the last main-chain record written before the boundary.
|
|
79
|
+
const continuation = (boundary) => {
|
|
80
|
+
const logical = boundary.logicalParentUuid ? byUuid.get(boundary.logicalParentUuid) : undefined;
|
|
81
|
+
if (logical)
|
|
82
|
+
return logical;
|
|
83
|
+
for (let i = records.indexOf(boundary) - 1; i >= 0; i--) {
|
|
84
|
+
if (isMainChain(records[i]) && !isBoundary(records[i]))
|
|
85
|
+
return records[i];
|
|
86
|
+
}
|
|
87
|
+
return undefined;
|
|
88
|
+
};
|
|
89
|
+
const chain = [];
|
|
90
|
+
const visited = new Set();
|
|
91
|
+
let cursor = continuation(last);
|
|
92
|
+
while (cursor && cursor.uuid && !visited.has(cursor.uuid)) {
|
|
93
|
+
visited.add(cursor.uuid);
|
|
94
|
+
if (isBoundary(cursor)) {
|
|
95
|
+
cursor = continuation(cursor);
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
chain.push(cursor);
|
|
99
|
+
cursor = cursor.parentUuid ? byUuid.get(cursor.parentUuid) : undefined;
|
|
100
|
+
}
|
|
101
|
+
return chain
|
|
102
|
+
.reverse()
|
|
103
|
+
.filter((record) => (record.type === "user" || record.type === "assistant") &&
|
|
104
|
+
record.isMeta !== true &&
|
|
105
|
+
record.isSidechain !== true)
|
|
106
|
+
.map((record) => ({
|
|
107
|
+
type: record.type,
|
|
108
|
+
uuid: record.uuid,
|
|
109
|
+
session_id: sessionId,
|
|
110
|
+
message: record.message,
|
|
111
|
+
parent_tool_use_id: null,
|
|
112
|
+
parent_agent_id: null,
|
|
113
|
+
...(record.isCompactSummary ? { isCompactSummary: true } : {}),
|
|
114
|
+
is_meta: false,
|
|
115
|
+
...(record.timestamp ? { timestamp: record.timestamp } : {}),
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
function startsWithCompactSummary(messages) {
|
|
119
|
+
const first = messages[0];
|
|
120
|
+
return first?.isCompactSummary === true;
|
|
121
|
+
}
|
package/dist/elicitation.d.ts
CHANGED
|
@@ -57,9 +57,11 @@ export declare function extractAskUserQuestions(input: Record<string, unknown>):
|
|
|
57
57
|
*
|
|
58
58
|
* Each question is followed by its own optional free-text "custom answer" field
|
|
59
59
|
* (`question_<n>_custom`), mirroring the CLI's per-question "Other" box: the
|
|
60
|
-
* user can type their own answer instead of picking an option,
|
|
61
|
-
*
|
|
62
|
-
*
|
|
60
|
+
* user can type their own answer instead of picking an option, add it to a
|
|
61
|
+
* multi-select's picks, or attach it as a note to a single-select's pick (see
|
|
62
|
+
* `applyAskElicitationResponse`), scoped to that specific question. Nothing is
|
|
63
|
+
* marked required, so the user can also just skip — matching the built-in tool,
|
|
64
|
+
* which always offers Skip + a free-text box.
|
|
63
65
|
*/
|
|
64
66
|
export declare function askUserQuestionsToCreateRequest(questions: AskUserQuestion[], sessionId: string, toolCallId: string | undefined): CreateElicitationRequest;
|
|
65
67
|
/** Outcome of an AskUserQuestion elicitation, decoupled from any transport. */
|
|
@@ -73,13 +75,19 @@ export type AskUserQuestionOutcome = {
|
|
|
73
75
|
* Fold an ACP elicitation response into the AskUserQuestion tool's input.
|
|
74
76
|
*
|
|
75
77
|
* Selected labels are read back from the indexed form fields and written into
|
|
76
|
-
* `answers` as a `{ [questionText]: label }` map
|
|
77
|
-
* —
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
78
|
+
* `answers` as a `{ [questionText]: label }` map — the key shape the tool's own
|
|
79
|
+
* `call()` reads — with multi-selects comma-joined in the CLI's own quoted form
|
|
80
|
+
* (see `joinMultiSelectAnswer`). A non-empty per-question custom-answer field
|
|
81
|
+
* (`question_<n>_custom`) joins the selection of a multi-select question, where
|
|
82
|
+
* the two fields are independent and filling both means both. For a
|
|
83
|
+
* single-select question it is the answer when nothing was picked (the user
|
|
84
|
+
* typed their own instead), and otherwise travels beside the pick as the
|
|
85
|
+
* tool's own per-question `annotations[question].notes` — the slot the CLI
|
|
86
|
+
* uses for free text attached to a selection and renders to the model as
|
|
87
|
+
* `"Q"="A" notes: ...` — so a client that presents the box as a notes field
|
|
88
|
+
* cannot make the selection disappear. Decline yields empty answers (the model
|
|
89
|
+
* is told the user skipped rather than the turn aborting); cancel — and any
|
|
90
|
+
* custom/future action we don't understand — aborts the tool call.
|
|
83
91
|
*/
|
|
84
92
|
export declare function applyAskElicitationResponse(response: CreateElicitationResponse, toolInput: Record<string, unknown>, questions: AskUserQuestion[]): AskUserQuestionOutcome;
|
|
85
93
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elicitation.d.ts","sourceRoot":"","sources":["../src/elicitation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EACV,wBAAwB,EAKzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,KAAK,EACV,oBAAoB,EAErB,MAAM,6CAA6C,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH,yDAAyD;AACzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,MAAM,GAChB,wBAAwB,GAAG,IAAI,CAyBjC;AAgBD;;;GAGG;AACH,wBAAgB,uCAAuC,CACrD,QAAQ,EAAE,yBAAyB,GAClC,iBAAiB,CAUnB;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe,EAAE,GAAG,IAAI,CAU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G;IAAE,MAAM,EAAE,QAAQ,CAAA;CAAE,CAAC;AAevF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,yBAAyB,EACnC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,SAAS,EAAE,eAAe,EAAE,GAC3B,sBAAsB,CAgExB;AAgBD;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,qBAAqB,GAAG,IAAI,CAW9B;AAYD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,qBAAqB,EAC7B,SAAS,EAAE,MAAM,GAChB,wBAAwB,CA+B1B;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,yBAAyB,GAAG,MAAM,CAG7F"}
|
package/dist/elicitation.js
CHANGED
|
@@ -108,9 +108,11 @@ const CUSTOM_ANSWER_META_KEY = "_askUserQuestionCustomAnswer";
|
|
|
108
108
|
*
|
|
109
109
|
* Each question is followed by its own optional free-text "custom answer" field
|
|
110
110
|
* (`question_<n>_custom`), mirroring the CLI's per-question "Other" box: the
|
|
111
|
-
* user can type their own answer instead of picking an option,
|
|
112
|
-
*
|
|
113
|
-
*
|
|
111
|
+
* user can type their own answer instead of picking an option, add it to a
|
|
112
|
+
* multi-select's picks, or attach it as a note to a single-select's pick (see
|
|
113
|
+
* `applyAskElicitationResponse`), scoped to that specific question. Nothing is
|
|
114
|
+
* marked required, so the user can also just skip — matching the built-in tool,
|
|
115
|
+
* which always offers Skip + a free-text box.
|
|
114
116
|
*/
|
|
115
117
|
export function askUserQuestionsToCreateRequest(questions, sessionId, toolCallId) {
|
|
116
118
|
const single = questions.length === 1;
|
|
@@ -143,7 +145,9 @@ export function askUserQuestionsToCreateRequest(questions, sessionId, toolCallId
|
|
|
143
145
|
properties[questionCustomFieldKey(index)] = {
|
|
144
146
|
type: "string",
|
|
145
147
|
title: "Other",
|
|
146
|
-
description:
|
|
148
|
+
description: question.multiSelect
|
|
149
|
+
? "Type your own answer to add to your selection above (optional)."
|
|
150
|
+
: "Type your own answer, or add a note to the option you chose above (optional).",
|
|
147
151
|
_meta: {
|
|
148
152
|
[CUSTOM_ANSWER_META_KEY]: {
|
|
149
153
|
questionId: questionFieldKey(index),
|
|
@@ -165,17 +169,35 @@ export function askUserQuestionsToCreateRequest(questions, sessionId, toolCallId
|
|
|
165
169
|
requestedSchema,
|
|
166
170
|
};
|
|
167
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Serialize a multi-select answer the way the CLI's own AskUserQuestion UI
|
|
174
|
+
* does: comma-joined, with any item that itself contains the separator (or a
|
|
175
|
+
* double quote) JSON-quoted. The tool's `call()` splits the string back on the
|
|
176
|
+
* same rule, so a free-text answer like `Redis, not Memcached` stays one item
|
|
177
|
+
* instead of reading as two more picks.
|
|
178
|
+
*/
|
|
179
|
+
function joinMultiSelectAnswer(items) {
|
|
180
|
+
return items
|
|
181
|
+
.map((item) => (item.includes(", ") || item.includes('"') ? JSON.stringify(item) : item))
|
|
182
|
+
.join(", ");
|
|
183
|
+
}
|
|
168
184
|
/**
|
|
169
185
|
* Fold an ACP elicitation response into the AskUserQuestion tool's input.
|
|
170
186
|
*
|
|
171
187
|
* Selected labels are read back from the indexed form fields and written into
|
|
172
|
-
* `answers` as a `{ [questionText]: label }` map
|
|
173
|
-
* —
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
188
|
+
* `answers` as a `{ [questionText]: label }` map — the key shape the tool's own
|
|
189
|
+
* `call()` reads — with multi-selects comma-joined in the CLI's own quoted form
|
|
190
|
+
* (see `joinMultiSelectAnswer`). A non-empty per-question custom-answer field
|
|
191
|
+
* (`question_<n>_custom`) joins the selection of a multi-select question, where
|
|
192
|
+
* the two fields are independent and filling both means both. For a
|
|
193
|
+
* single-select question it is the answer when nothing was picked (the user
|
|
194
|
+
* typed their own instead), and otherwise travels beside the pick as the
|
|
195
|
+
* tool's own per-question `annotations[question].notes` — the slot the CLI
|
|
196
|
+
* uses for free text attached to a selection and renders to the model as
|
|
197
|
+
* `"Q"="A" notes: ...` — so a client that presents the box as a notes field
|
|
198
|
+
* cannot make the selection disappear. Decline yields empty answers (the model
|
|
199
|
+
* is told the user skipped rather than the turn aborting); cancel — and any
|
|
200
|
+
* custom/future action we don't understand — aborts the tool call.
|
|
179
201
|
*/
|
|
180
202
|
export function applyAskElicitationResponse(response, toolInput, questions) {
|
|
181
203
|
if (response.action === "decline") {
|
|
@@ -188,25 +210,52 @@ export function applyAskElicitationResponse(response, toolInput, questions) {
|
|
|
188
210
|
// Typed against the tool's own output schema so the answer/response shapes
|
|
189
211
|
// stay in sync with what the built-in tool's call() expects to read back.
|
|
190
212
|
const answers = {};
|
|
213
|
+
const annotations = {};
|
|
191
214
|
questions.forEach((question, index) => {
|
|
192
|
-
// A typed custom answer wins over the selection: the user chose to write
|
|
193
|
-
// their own answer for this question instead of picking an option.
|
|
194
215
|
const custom = content[questionCustomFieldKey(index)];
|
|
195
|
-
|
|
196
|
-
answers[question.question] = custom.trim();
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
216
|
+
const customText = typeof custom === "string" ? custom.trim() : "";
|
|
199
217
|
const value = content[questionFieldKey(index)];
|
|
200
|
-
|
|
218
|
+
const picks = value === undefined || value === null
|
|
219
|
+
? []
|
|
220
|
+
: Array.isArray(value)
|
|
221
|
+
? value.filter((item) => item !== undefined && item !== null && item !== "").map(String)
|
|
222
|
+
: [String(value)];
|
|
223
|
+
// A multi-select is additive, and the form offers the selection and the
|
|
224
|
+
// custom box as independent fields — a user who fills both means both, so
|
|
225
|
+
// the typed answer joins the checked options.
|
|
226
|
+
if (question.multiSelect) {
|
|
227
|
+
const text = joinMultiSelectAnswer(customText === "" ? picks : [...picks, customText]);
|
|
228
|
+
if (text !== "") {
|
|
229
|
+
answers[question.question] = text;
|
|
230
|
+
}
|
|
201
231
|
return;
|
|
202
232
|
}
|
|
203
|
-
|
|
204
|
-
|
|
233
|
+
// A single-select question is answered by exactly one thing. With no option
|
|
234
|
+
// picked, the typed text is that answer (the CLI's "Other"). With an option
|
|
235
|
+
// picked as well, the pick stays the answer and the text rides along as the
|
|
236
|
+
// tool's per-question `notes` annotation, so neither is lost. A single-select
|
|
237
|
+
// normally holds one item; the plain join only matters if a client hands
|
|
238
|
+
// back an array for it, and then mirrors the old behavior.
|
|
239
|
+
const picked = picks.join(", ");
|
|
240
|
+
if (picked === "") {
|
|
241
|
+
if (customText !== "") {
|
|
242
|
+
answers[question.question] = customText;
|
|
243
|
+
}
|
|
205
244
|
return;
|
|
206
245
|
}
|
|
207
|
-
answers[question.question] =
|
|
246
|
+
answers[question.question] = picked;
|
|
247
|
+
if (customText !== "") {
|
|
248
|
+
annotations[question.question] = { notes: customText };
|
|
249
|
+
}
|
|
208
250
|
});
|
|
209
|
-
return {
|
|
251
|
+
return {
|
|
252
|
+
action: "answered",
|
|
253
|
+
updatedInput: {
|
|
254
|
+
...toolInput,
|
|
255
|
+
answers,
|
|
256
|
+
...(Object.keys(annotations).length > 0 ? { annotations } : {}),
|
|
257
|
+
},
|
|
258
|
+
};
|
|
210
259
|
}
|
|
211
260
|
/**
|
|
212
261
|
* Coerce an arbitrary MCP `requestedSchema` into an ACP `ElicitationSchema`.
|
package/dist/session-mode.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export type SessionModeManagerOptions<S extends SessionMode> = {
|
|
|
22
22
|
sessionEndedMessage: string;
|
|
23
23
|
updateConfigOption(sessionId: string, configId: string, value: string): Promise<void>;
|
|
24
24
|
sessionUpdate(params: SessionNotification): Promise<void>;
|
|
25
|
+
/** Whether the client can present `notice` updates; the fallback warning
|
|
26
|
+
* is a transcript line otherwise. Read per call: capabilities are only
|
|
27
|
+
* known after `initialize`. */
|
|
28
|
+
supportsNotices?(): boolean;
|
|
25
29
|
logError(...args: unknown[]): void;
|
|
26
30
|
};
|
|
27
31
|
type ModeConfigSession = SessionMode & {
|
|
@@ -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,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,KAAK,EACN,MAAM,gCAAgC,CAAC;
|
|
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,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,KAAK,EACN,MAAM,gCAAgC,CAAC;AASxC,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,EA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AInB,OAAO,CAAC,SAAS;IAcjB,OAAO,CAAC,mBAAmB;YAqDb,WAAW;CAW1B"}
|
package/dist/session-mode.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { RequestError, } from "@agentclientprotocol/sdk";
|
|
2
2
|
import { ALLOW_BYPASS } from "./permissions/modes.js";
|
|
3
|
+
import { noticeOrTranscriptUpdate, noticeTranscriptText, sentenceCase, } from "./session-notices.js";
|
|
3
4
|
export const MODE_CONFIG_ID = "mode";
|
|
4
5
|
export const AUTO_MODE_FALLBACK = "acceptEdits";
|
|
5
|
-
|
|
6
|
+
/** Reads on after the bold label in the transcript line; capitalized when it
|
|
7
|
+
* stands alone as a notice description. */
|
|
8
|
+
const AUTO_MODE_FALLBACK_REASON = "the selected model does not support Auto mode; using Accept edits instead.";
|
|
9
|
+
const AUTO_MODE_FALLBACK_NOTICE = {
|
|
10
|
+
severity: "warning",
|
|
11
|
+
title: "Auto mode unavailable",
|
|
12
|
+
description: sentenceCase(AUTO_MODE_FALLBACK_REASON),
|
|
13
|
+
};
|
|
6
14
|
/** Owns session-mode policy and the ACP/SDK synchronization it requires. */
|
|
7
15
|
export class SessionModeManager {
|
|
8
16
|
options;
|
|
@@ -148,10 +156,10 @@ export class SessionModeManager {
|
|
|
148
156
|
try {
|
|
149
157
|
await this.options.sessionUpdate({
|
|
150
158
|
sessionId,
|
|
151
|
-
update: {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
},
|
|
159
|
+
update: noticeOrTranscriptUpdate(AUTO_MODE_FALLBACK_NOTICE, this.options.supportsNotices?.() ?? false, noticeTranscriptText({
|
|
160
|
+
...AUTO_MODE_FALLBACK_NOTICE,
|
|
161
|
+
description: AUTO_MODE_FALLBACK_REASON,
|
|
162
|
+
})),
|
|
155
163
|
});
|
|
156
164
|
}
|
|
157
165
|
catch (error) {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ClientCapabilities, SessionNotification } from "@agentclientprotocol/sdk";
|
|
2
|
+
/** Fire-and-forget advisory text for the user: live events rather than
|
|
3
|
+
* conversation history. See the ACP Session Notices RFD
|
|
4
|
+
* (https://agentclientprotocol.com/rfds/session-notices). */
|
|
5
|
+
export type SessionNotice = {
|
|
6
|
+
severity: "info" | "warning" | "error";
|
|
7
|
+
/** Plain text that stands alone. */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Plain-text detail or guidance. */
|
|
10
|
+
description?: string;
|
|
11
|
+
};
|
|
12
|
+
/** Longest free-form line that may serve as a notice title on its own. Past
|
|
13
|
+
* this the text moves to `description` under a generic title. */
|
|
14
|
+
export declare const MAX_NOTICE_TITLE_LENGTH = 256;
|
|
15
|
+
/** Whether the Client advertised `clientCapabilities.session.notices`. Agents
|
|
16
|
+
* MUST NOT send `notice` updates otherwise; the alternative is a bold-label
|
|
17
|
+
* transcript line, which was the only way to flag these before. */
|
|
18
|
+
export declare function clientSupportsNotices(capabilities?: ClientCapabilities | null): boolean;
|
|
19
|
+
export declare function noticeUpdate(notice: SessionNotice): SessionNotification["update"];
|
|
20
|
+
/** The transcript rendering of a notice for clients without the capability. */
|
|
21
|
+
export declare function noticeTranscriptText(notice: SessionNotice): string;
|
|
22
|
+
/** The update to send for `notice`: a `notice` when the client can present
|
|
23
|
+
* one, else an agent message carrying `transcriptText` (by default the
|
|
24
|
+
* bold-label rendering of the notice) and `transcriptMeta`, so clients
|
|
25
|
+
* without the capability can still tell the line apart from Claude's reply. */
|
|
26
|
+
export declare function noticeOrTranscriptUpdate(notice: SessionNotice, supportsNotices: boolean, transcriptText?: string, transcriptMeta?: Record<string, unknown>): SessionNotification["update"];
|
|
27
|
+
/** Fragments that read on after a bold label stand alone as a notice
|
|
28
|
+
* description, so start them with a capital. */
|
|
29
|
+
export declare function sentenceCase(text: string): string;
|
|
30
|
+
/** Collapses whitespace so a text shown as a notice can be recognized when
|
|
31
|
+
* the SDK repeats it elsewhere (a hook-blocked turn's result, for one). */
|
|
32
|
+
export declare function normalizeNoticeText(text: string): string;
|
|
33
|
+
/** Notice fields are plain text. Free-form SDK/hook output may carry light
|
|
34
|
+
* markdown that a transcript would render; drop the inline markers rather
|
|
35
|
+
* than show literal asterisks and backticks in a toast. */
|
|
36
|
+
export declare function noticePlainText(text: string): string;
|
|
37
|
+
/** Shapes free-form text into a notice title plus optional description: the
|
|
38
|
+
* first line stands as the title when it is short enough, otherwise the whole
|
|
39
|
+
* text becomes the description under `fallbackTitle`. */
|
|
40
|
+
export declare function splitNoticeText(text: string, fallbackTitle: string): Pick<SessionNotice, "title" | "description">;
|
|
41
|
+
//# sourceMappingURL=session-notices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-notices.d.ts","sourceRoot":"","sources":["../src/session-notices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAExF;;8DAE8D;AAC9D,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACvC,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;kEACkE;AAClE,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;oEAEoE;AACpE,wBAAgB,qBAAqB,CAAC,YAAY,CAAC,EAAE,kBAAkB,GAAG,IAAI,GAAG,OAAO,CAGvF;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAOjF;AAED,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAElE;AAED;;;gFAGgF;AAChF,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,aAAa,EACrB,eAAe,EAAE,OAAO,EACxB,cAAc,GAAE,MAAqC,EACrD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvC,mBAAmB,CAAC,QAAQ,CAAC,CAO/B;AAED;iDACiD;AACjD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;4EAC4E;AAC5E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;4DAE4D;AAC5D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED;;0DAE0D;AAC1D,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,aAAa,CAAC,CAU9C"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/** Longest free-form line that may serve as a notice title on its own. Past
|
|
2
|
+
* this the text moves to `description` under a generic title. */
|
|
3
|
+
export const MAX_NOTICE_TITLE_LENGTH = 256;
|
|
4
|
+
/** Whether the Client advertised `clientCapabilities.session.notices`. Agents
|
|
5
|
+
* MUST NOT send `notice` updates otherwise; the alternative is a bold-label
|
|
6
|
+
* transcript line, which was the only way to flag these before. */
|
|
7
|
+
export function clientSupportsNotices(capabilities) {
|
|
8
|
+
const notices = capabilities?.session?.notices;
|
|
9
|
+
return typeof notices === "object" && notices !== null && !Array.isArray(notices);
|
|
10
|
+
}
|
|
11
|
+
export function noticeUpdate(notice) {
|
|
12
|
+
return {
|
|
13
|
+
sessionUpdate: "notice",
|
|
14
|
+
severity: notice.severity,
|
|
15
|
+
title: notice.title,
|
|
16
|
+
...(notice.description ? { description: notice.description } : {}),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/** The transcript rendering of a notice for clients without the capability. */
|
|
20
|
+
export function noticeTranscriptText(notice) {
|
|
21
|
+
return notice.description ? `**${notice.title}:** ${notice.description}` : `**${notice.title}**`;
|
|
22
|
+
}
|
|
23
|
+
/** The update to send for `notice`: a `notice` when the client can present
|
|
24
|
+
* one, else an agent message carrying `transcriptText` (by default the
|
|
25
|
+
* bold-label rendering of the notice) and `transcriptMeta`, so clients
|
|
26
|
+
* without the capability can still tell the line apart from Claude's reply. */
|
|
27
|
+
export function noticeOrTranscriptUpdate(notice, supportsNotices, transcriptText = noticeTranscriptText(notice), transcriptMeta) {
|
|
28
|
+
if (supportsNotices)
|
|
29
|
+
return noticeUpdate(notice);
|
|
30
|
+
return {
|
|
31
|
+
sessionUpdate: "agent_message_chunk",
|
|
32
|
+
content: { type: "text", text: transcriptText },
|
|
33
|
+
...(transcriptMeta ? { _meta: transcriptMeta } : {}),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/** Fragments that read on after a bold label stand alone as a notice
|
|
37
|
+
* description, so start them with a capital. */
|
|
38
|
+
export function sentenceCase(text) {
|
|
39
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
40
|
+
}
|
|
41
|
+
/** Collapses whitespace so a text shown as a notice can be recognized when
|
|
42
|
+
* the SDK repeats it elsewhere (a hook-blocked turn's result, for one). */
|
|
43
|
+
export function normalizeNoticeText(text) {
|
|
44
|
+
return text.trim().replace(/\s+/g, " ");
|
|
45
|
+
}
|
|
46
|
+
/** Notice fields are plain text. Free-form SDK/hook output may carry light
|
|
47
|
+
* markdown that a transcript would render; drop the inline markers rather
|
|
48
|
+
* than show literal asterisks and backticks in a toast. */
|
|
49
|
+
export function noticePlainText(text) {
|
|
50
|
+
return text
|
|
51
|
+
.replace(/^[ \t]*#{1,6}[ \t]+/gm, "")
|
|
52
|
+
.replace(/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, "$2")
|
|
53
|
+
.replace(/(?<![\w`])`([^`\n]+)`(?![\w`])/g, "$1");
|
|
54
|
+
}
|
|
55
|
+
/** Shapes free-form text into a notice title plus optional description: the
|
|
56
|
+
* first line stands as the title when it is short enough, otherwise the whole
|
|
57
|
+
* text becomes the description under `fallbackTitle`. */
|
|
58
|
+
export function splitNoticeText(text, fallbackTitle) {
|
|
59
|
+
const trimmed = noticePlainText(text).trim();
|
|
60
|
+
if (!trimmed)
|
|
61
|
+
return { title: fallbackTitle };
|
|
62
|
+
const lineBreak = trimmed.search(/\r?\n/);
|
|
63
|
+
const firstLine = lineBreak === -1 ? trimmed : trimmed.slice(0, lineBreak).trimEnd();
|
|
64
|
+
const rest = lineBreak === -1 ? "" : trimmed.slice(lineBreak).trim();
|
|
65
|
+
if (firstLine.length > MAX_NOTICE_TITLE_LENGTH) {
|
|
66
|
+
return { title: fallbackTitle, description: trimmed };
|
|
67
|
+
}
|
|
68
|
+
return rest ? { title: firstLine, description: rest } : { title: firstLine };
|
|
69
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** `<configDir>/projects/<any project>/<sessionId>.jsonl` -- where the SDK looks
|
|
2
|
+
* when `getSessionMessages` is called without a directory. */
|
|
3
|
+
export declare function findTranscript(configDir: string, sessionId: string): Promise<string | undefined>;
|
|
4
|
+
//# sourceMappingURL=transcript-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-path.d.ts","sourceRoot":"","sources":["../src/transcript-path.ts"],"names":[],"mappings":"AAGA;+DAC+D;AAC/D,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAkB7B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { access, readdir } from "node:fs/promises";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
/** `<configDir>/projects/<any project>/<sessionId>.jsonl` -- where the SDK looks
|
|
4
|
+
* when `getSessionMessages` is called without a directory. */
|
|
5
|
+
export async function findTranscript(configDir, sessionId) {
|
|
6
|
+
const projects = path.join(configDir, "projects");
|
|
7
|
+
let entries;
|
|
8
|
+
try {
|
|
9
|
+
entries = await readdir(projects);
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
for (const entry of entries) {
|
|
15
|
+
const candidate = path.join(projects, entry, `${sessionId}.jsonl`);
|
|
16
|
+
try {
|
|
17
|
+
await access(candidate);
|
|
18
|
+
return candidate;
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
// not in this project
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.22.1",
|
|
7
7
|
"description": "ACP adapter for the Claude Agent SDK with VS Code-parity UX for Zed and other ACP clients — checkbox multi-select questions, refusal consent dialog, dynamic agent name. Fork of claude-agent-acp.",
|
|
8
8
|
"main": "dist/lib.js",
|
|
9
9
|
"types": "dist/lib.d.ts",
|
|
@@ -67,18 +67,18 @@
|
|
|
67
67
|
"node": ">=24"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@agentclientprotocol/sdk": "1.
|
|
70
|
+
"@agentclientprotocol/sdk": "1.5.0",
|
|
71
71
|
"@anthropic-ai/claude-agent-sdk": "0.3.280",
|
|
72
72
|
"zod": "^4.0.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@anthropic-ai/sdk": "0.
|
|
75
|
+
"@anthropic-ai/sdk": "0.127.0",
|
|
76
76
|
"@eslint/js": "10.0.1",
|
|
77
77
|
"@tsconfig/node24": "24.0.5",
|
|
78
|
-
"@types/node": "26.6.
|
|
79
|
-
"@typescript-eslint/eslint-plugin": "8.70.
|
|
80
|
-
"@typescript-eslint/parser": "8.70.
|
|
81
|
-
"eslint": "10.
|
|
78
|
+
"@types/node": "26.6.2",
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "8.70.1",
|
|
80
|
+
"@typescript-eslint/parser": "8.70.1",
|
|
81
|
+
"eslint": "10.11.0",
|
|
82
82
|
"eslint-config-prettier": "10.1.8",
|
|
83
83
|
"globals": "17.12.0",
|
|
84
84
|
"prettier": "3.9.8",
|