@agentclientprotocol/claude-agent-acp 0.105.1-preview.4 → 0.106.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/initial-config-options.d.ts +30 -0
- package/dist/initial-config-options.d.ts.map +1 -0
- package/dist/initial-config-options.js +51 -0
- package/dist/session-mode.d.ts +13 -1
- package/dist/session-mode.d.ts.map +1 -1
- package/dist/session-mode.js +20 -2
- package/dist/v1/acp-agent.d.ts +29 -1
- package/dist/v1/acp-agent.d.ts.map +1 -1
- package/dist/v1/acp-agent.js +82 -8
- package/dist/v2/agent.d.ts.map +1 -1
- package/dist/v2/agent.js +122 -25
- package/dist/v2/config.d.ts +11 -0
- package/dist/v2/config.d.ts.map +1 -1
- package/dist/v2/config.js +25 -6
- package/dist/v2/initialize.d.ts +2 -0
- package/dist/v2/initialize.d.ts.map +1 -1
- package/dist/v2/initialize.js +4 -0
- package/dist/v2/session-requests.d.ts +9 -2
- package/dist/v2/session-requests.d.ts.map +1 -1
- package/dist/v2/session-requests.js +16 -2
- package/dist/v2/session.d.ts +8 -0
- package/dist/v2/session.d.ts.map +1 -1
- package/dist/v2/session.js +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -140,7 +140,8 @@ for v2 is negotiated down to v1. With `v2`, the adapter rejects the `initialize`
|
|
|
140
140
|
|
|
141
141
|
On v2 the adapter serves the session baseline (`session/new`, `session/list`, `session/resume`
|
|
142
142
|
with replay, `session/close`, `session/prompt`, `session/cancel`), `session/delete`,
|
|
143
|
-
`session/fork`, `session/status`, `session/
|
|
143
|
+
`session/fork`, `session/status`, `session/options` (with initial `configOptions` on `session/new` and
|
|
144
|
+
`session/resume`), `session/set_title`, additional directories, config options (the mode is one), plans, notices,
|
|
144
145
|
compaction, display terminals for commands, permission requests, elicitation, providers, auth, and
|
|
145
146
|
[subagents](#subagent-sessions). Steering is v1 only for now.
|
|
146
147
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Logger } from "./logger.js";
|
|
2
|
+
/**
|
|
3
|
+
* What a core advertises as `options` in its session capabilities:
|
|
4
|
+
* `session/options`, and `configOptions` on its setup requests.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SESSION_OPTIONS_CAPABILITY: {};
|
|
7
|
+
/**
|
|
8
|
+
* The entries of a setup request's `configOptions`. Omitted and `null` are no
|
|
9
|
+
* entries. Two entries with the same `configId` fail with `-32602`. Call it
|
|
10
|
+
* before the session starts, so a refused request starts none.
|
|
11
|
+
*/
|
|
12
|
+
export declare function initialConfigOptions<E extends {
|
|
13
|
+
configId: string;
|
|
14
|
+
}>(entries: readonly E[] | null | undefined): readonly E[];
|
|
15
|
+
/**
|
|
16
|
+
* Sets each entry with `set`, in list order. `set` checks an entry against the
|
|
17
|
+
* options as the entries before it left them, so a model entry decides which
|
|
18
|
+
* effort levels a later entry can pick.
|
|
19
|
+
*
|
|
20
|
+
* An entry that `set` refuses is skipped, and the entries after it still
|
|
21
|
+
* apply. The option keeps its value, which the setup response reports:
|
|
22
|
+
*
|
|
23
|
+
* - `-32602`: an unknown `configId`, a value of another type than the
|
|
24
|
+
* option's, or a value that the option does not offer.
|
|
25
|
+
* - Any other failure, such as a model that Claude Code refuses. It is logged.
|
|
26
|
+
*/
|
|
27
|
+
export declare function applyInitialConfigOptions<E extends {
|
|
28
|
+
configId: string;
|
|
29
|
+
}>(entries: readonly E[], set: (entry: E) => Promise<unknown>, logger: Logger): Promise<void>;
|
|
30
|
+
//# sourceMappingURL=initial-config-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initial-config-options.d.ts","sourceRoot":"","sources":["../src/initial-config-options.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,0BAA0B,IAAK,CAAC;AAI7C;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,EACjE,OAAO,EAAE,SAAS,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,GACvC,SAAS,CAAC,EAAE,CAYd;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAAC,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,EAC5E,OAAO,EAAE,SAAS,CAAC,EAAE,EACrB,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,EACnC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The unstable "Session options" RFD, as both cores serve it: `session/options`
|
|
3
|
+
* answers with what a session would start with, and a setup request's
|
|
4
|
+
* `configOptions` set the initial values of the session's config options.
|
|
5
|
+
*/
|
|
6
|
+
import { RequestError } from "@agentclientprotocol/sdk/unstable";
|
|
7
|
+
/**
|
|
8
|
+
* What a core advertises as `options` in its session capabilities:
|
|
9
|
+
* `session/options`, and `configOptions` on its setup requests.
|
|
10
|
+
*/
|
|
11
|
+
export const SESSION_OPTIONS_CAPABILITY = {};
|
|
12
|
+
const INVALID_PARAMS = RequestError.invalidParams().code;
|
|
13
|
+
/**
|
|
14
|
+
* The entries of a setup request's `configOptions`. Omitted and `null` are no
|
|
15
|
+
* entries. Two entries with the same `configId` fail with `-32602`. Call it
|
|
16
|
+
* before the session starts, so a refused request starts none.
|
|
17
|
+
*/
|
|
18
|
+
export function initialConfigOptions(entries) {
|
|
19
|
+
const seen = new Set();
|
|
20
|
+
for (const { configId } of entries ?? []) {
|
|
21
|
+
if (seen.has(configId)) {
|
|
22
|
+
throw RequestError.invalidParams({ configId }, `\`configOptions\` sets ${configId} more than once. Send one entry for each config option.`);
|
|
23
|
+
}
|
|
24
|
+
seen.add(configId);
|
|
25
|
+
}
|
|
26
|
+
return entries ?? [];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Sets each entry with `set`, in list order. `set` checks an entry against the
|
|
30
|
+
* options as the entries before it left them, so a model entry decides which
|
|
31
|
+
* effort levels a later entry can pick.
|
|
32
|
+
*
|
|
33
|
+
* An entry that `set` refuses is skipped, and the entries after it still
|
|
34
|
+
* apply. The option keeps its value, which the setup response reports:
|
|
35
|
+
*
|
|
36
|
+
* - `-32602`: an unknown `configId`, a value of another type than the
|
|
37
|
+
* option's, or a value that the option does not offer.
|
|
38
|
+
* - Any other failure, such as a model that Claude Code refuses. It is logged.
|
|
39
|
+
*/
|
|
40
|
+
export async function applyInitialConfigOptions(entries, set, logger) {
|
|
41
|
+
for (const entry of entries) {
|
|
42
|
+
try {
|
|
43
|
+
await set(entry);
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
if (error instanceof RequestError && error.code === INVALID_PARAMS)
|
|
47
|
+
continue;
|
|
48
|
+
logger.error(`Could not set the initial value of config option ${entry.configId}:`, error);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
package/dist/session-mode.d.ts
CHANGED
|
@@ -91,10 +91,22 @@ export declare class SessionModeManager<S extends SessionMode> {
|
|
|
91
91
|
/** Reconcile mode after a model switch. The caller rebuilds config options
|
|
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. `auto` on a model without Auto runs as its
|
|
96
|
+
* fallback, with the warning. With `deferWarning`, the warning waits for
|
|
97
|
+
* the next prompt (see {@link deferFallbackWarning}).
|
|
98
|
+
*/
|
|
99
|
+
selectMode(sessionId: string, modeId: string, deferWarning?: boolean): Promise<PermissionMode>;
|
|
95
100
|
setSessionMode(params: SetSessionModeRequest): Promise<SetSessionModeResponse>;
|
|
96
101
|
publishCurrent(sessionId: string, mode: string): Promise<void>;
|
|
97
102
|
publishFallbackWarning(sessionId: string, session: SessionMode): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Leaves the Auto fallback's warning for the next prompt
|
|
105
|
+
* (`autoModeFallbackWarningPending`), as a session's start does. For a
|
|
106
|
+
* fallback during session setup: the client cannot place an update of a
|
|
107
|
+
* session before the setup response names it.
|
|
108
|
+
*/
|
|
109
|
+
deferFallbackWarning(session: SessionMode): void;
|
|
98
110
|
publishFallbackState(sessionId: string, session: SessionMode): Promise<void>;
|
|
99
111
|
private requireOpenSession;
|
|
100
112
|
private isAutoUnavailable;
|
|
@@ -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,CAAA;KAAE,CAAC;IACnC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,8EAA8E;IAC9E,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,gFAAgF;IAChF,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,yBAA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gBAAgB,EAC5C,GAAG,UAAQ,GACV,gBAAgB,CAAC,gBAAgB,CAAC,CA2CpC"}
|
package/dist/session-mode.js
CHANGED
|
@@ -161,7 +161,12 @@ export class SessionModeManager {
|
|
|
161
161
|
await this.trySyncMode(session.query, AUTO_MODE_FALLBACK, `Failed to sync permissionMode to "${AUTO_MODE_FALLBACK}" after model switch invalidated "auto":`);
|
|
162
162
|
return true;
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
/**
|
|
165
|
+
* Sets the mode on the query. `auto` on a model without Auto runs as its
|
|
166
|
+
* fallback, with the warning. With `deferWarning`, the warning waits for
|
|
167
|
+
* the next prompt (see {@link deferFallbackWarning}).
|
|
168
|
+
*/
|
|
169
|
+
async selectMode(sessionId, modeId, deferWarning = false) {
|
|
165
170
|
const session = this.requireOpenSession(sessionId);
|
|
166
171
|
const requestedMode = this.parseMode(modeId);
|
|
167
172
|
if (!this.isAvailable(session.modes.availableModes, requestedMode)) {
|
|
@@ -181,7 +186,10 @@ export class SessionModeManager {
|
|
|
181
186
|
throw new Error("Invalid Mode");
|
|
182
187
|
}
|
|
183
188
|
if (effectiveMode !== requestedMode) {
|
|
184
|
-
|
|
189
|
+
if (deferWarning)
|
|
190
|
+
this.deferFallbackWarning(session);
|
|
191
|
+
else
|
|
192
|
+
await this.publishFallbackWarning(sessionId, session);
|
|
185
193
|
}
|
|
186
194
|
return effectiveMode;
|
|
187
195
|
}
|
|
@@ -219,6 +227,16 @@ export class SessionModeManager {
|
|
|
219
227
|
this.options.logError(`Failed to publish Auto mode fallback warning: ${error}`);
|
|
220
228
|
}
|
|
221
229
|
}
|
|
230
|
+
/**
|
|
231
|
+
* Leaves the Auto fallback's warning for the next prompt
|
|
232
|
+
* (`autoModeFallbackWarningPending`), as a session's start does. For a
|
|
233
|
+
* fallback during session setup: the client cannot place an update of a
|
|
234
|
+
* session before the setup response names it.
|
|
235
|
+
*/
|
|
236
|
+
deferFallbackWarning(session) {
|
|
237
|
+
if (!session.autoModeFallbackWarningShown)
|
|
238
|
+
session.autoModeFallbackWarningPending = true;
|
|
239
|
+
}
|
|
222
240
|
async publishFallbackState(sessionId, session) {
|
|
223
241
|
await this.publishCurrent(sessionId, AUTO_MODE_FALLBACK);
|
|
224
242
|
await this.publishFallbackWarning(sessionId, session);
|
package/dist/v1/acp-agent.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentApp, AuthenticateRequest, AuthStatusResponse, AvailableCommand, CancelNotification, ClientCapabilities, DisableProviderRequest, DisableProviderResponse, ForkSessionRequest, ForkSessionResponse, InitializeRequest, InitializeResponse, ListProvidersRequest, ListProvidersResponse, ListSessionsRequest, ListSessionsResponse, LoadSessionRequest, LoadSessionResponse, LogoutRequest, NewSessionRequest, NewSessionResponse, PromptRequest, PromptResponse, ReadTextFileRequest, ReadTextFileResponse, SetProviderRequest, SetProviderResponse, ResumeSessionRequest, ResumeSessionResponse, SessionConfigOption, SessionModeState, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, SetSessionModeRequest, SetSessionModeResponse, SessionStatusRequest, SessionStatusResponse, CloseSessionRequest, CloseSessionResponse, DeleteSessionRequest, SetSessionTitleRequest, SetSessionTitleResponse, DeleteSessionResponse, WriteTextFileRequest, WriteTextFileResponse } from "@agentclientprotocol/sdk/unstable";
|
|
1
|
+
import { AgentApp, AuthenticateRequest, AuthStatusResponse, AvailableCommand, CancelNotification, ClientCapabilities, DisableProviderRequest, DisableProviderResponse, ForkSessionRequest, ForkSessionResponse, InitializeRequest, InitializeResponse, ListProvidersRequest, ListProvidersResponse, ListSessionsRequest, ListSessionsResponse, LoadSessionRequest, LoadSessionResponse, LogoutRequest, NewSessionRequest, NewSessionResponse, PromptRequest, PromptResponse, ReadTextFileRequest, ReadTextFileResponse, SetProviderRequest, SetProviderResponse, ResumeSessionRequest, ResumeSessionResponse, SessionConfigOption, SessionModeState, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, SetSessionModeRequest, SetSessionModeResponse, SessionOptionsRequest, SessionOptionsResponse, SessionStatusRequest, SessionStatusResponse, CloseSessionRequest, CloseSessionResponse, DeleteSessionRequest, SetSessionTitleRequest, SetSessionTitleResponse, DeleteSessionResponse, WriteTextFileRequest, WriteTextFileResponse } from "@agentclientprotocol/sdk/unstable";
|
|
2
2
|
import type { TurnEvents, TurnOutcome } from "./turn-events.js";
|
|
3
3
|
import { AgentInfo, CanUseTool, FastModeDisabledReason, ModelInfo, PermissionMode, Query, SDKUserMessage, Settings } from "@anthropic-ai/claude-agent-sdk";
|
|
4
4
|
import { GoalRequest, GoalControlResponse, GoalSnapshot } from "./goal-extension.js";
|
|
@@ -948,6 +948,29 @@ export declare class ClaudeAcpAgent {
|
|
|
948
948
|
constructor(client: AcpClient, logger?: Logger);
|
|
949
949
|
initialize(request: InitializeRequest): Promise<InitializeResponse>;
|
|
950
950
|
newSession(params: NewSessionRequest): Promise<NewSessionResponse>;
|
|
951
|
+
/**
|
|
952
|
+
* `session/options`: the modes and config options that `session/new` with
|
|
953
|
+
* the same `cwd`, additional directories and `_meta` would answer with, or
|
|
954
|
+
* `session/load` and `session/resume` of `sessionId`.
|
|
955
|
+
*
|
|
956
|
+
* A session that this connection holds answers with what it has now.
|
|
957
|
+
* Otherwise a query starts as the session's would, without MCP servers, and
|
|
958
|
+
* closes once its options are read (`optionsOnly` in `createSession`). The
|
|
959
|
+
* query does not persist: it stores no session, and it does not write to
|
|
960
|
+
* the transcript of `sessionId`. Claude Code runs the user's `SessionStart`
|
|
961
|
+
* hooks in it, as in every query.
|
|
962
|
+
*
|
|
963
|
+
* It sends no update, and it creates, loads and changes no session. A
|
|
964
|
+
* `sessionId` without a stored conversation fails with `-32002`.
|
|
965
|
+
*/
|
|
966
|
+
sessionOptions(params: SessionOptionsRequest): Promise<SessionOptionsResponse>;
|
|
967
|
+
/**
|
|
968
|
+
* The setup response once the request's `configOptions` are set on the
|
|
969
|
+
* session, in list order, as `session/set_config_option` sets each one. An
|
|
970
|
+
* entry that the session refuses is skipped (`applyInitialConfigOptions`).
|
|
971
|
+
* No update goes out for them: the response carries the modes and options.
|
|
972
|
+
*/
|
|
973
|
+
private withInitialConfigOptions;
|
|
951
974
|
/**
|
|
952
975
|
* Start the CLI of a loaded session, and replay the history while the CLI
|
|
953
976
|
* starts. The CLI start takes most of the load time, and the replay needs
|
|
@@ -1299,6 +1322,11 @@ export declare class ClaudeAcpAgent {
|
|
|
1299
1322
|
deleteSession(params: DeleteSessionRequest): Promise<DeleteSessionResponse>;
|
|
1300
1323
|
setSessionMode(params: SetSessionModeRequest): Promise<SetSessionModeResponse>;
|
|
1301
1324
|
setSessionConfigOption(params: SetSessionConfigOptionRequest): Promise<SetSessionConfigOptionResponse>;
|
|
1325
|
+
/**
|
|
1326
|
+
* `duringSetup`: the value is one of a setup request's `configOptions`. No
|
|
1327
|
+
* mode update goes out, and the warning of an Auto mode fallback waits for
|
|
1328
|
+
* the next prompt.
|
|
1329
|
+
*/
|
|
1302
1330
|
private selectSessionConfigOption;
|
|
1303
1331
|
private replaySessionHistory;
|
|
1304
1332
|
readTextFile(params: ReadTextFileRequest): Promise<ReadTextFileResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../../src/v1/acp-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,mBAAmB,EAEnB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAGlB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EAErB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EAEb,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EAEpB,kBAAkB,EAClB,mBAAmB,EAEnB,oBAAoB,EAC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G,qBAAqB;IA6DnC,OAAO,CAAC,4BAA4B;IAcpC,2FAA2F;IAC3F,OAAO,CAAC,iCAAiC;CAyC1C;AAgQD;;;;;;;;;;;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;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,GACvC,QAAQ,CAgDV"}
|
package/dist/v1/acp-agent.js
CHANGED
|
@@ -4,6 +4,7 @@ import { GOAL_ACTIONS, GOAL_CONTROL_METHOD, GOAL_EXTENSION_VERSION, goalUpdateFr
|
|
|
4
4
|
import { checklistPlanUpdate, resetPlanUpdates } from "../plans.js";
|
|
5
5
|
import { PromptSuggestions } from "../prompt-suggestions.js";
|
|
6
6
|
import { savedSessionStatus, SESSION_STATUS_CAPABILITY } from "../session-status.js";
|
|
7
|
+
import { applyInitialConfigOptions, initialConfigOptions, SESSION_OPTIONS_CAPABILITY, } from "../initial-config-options.js";
|
|
7
8
|
import { sanitizeTitle, SessionTitles } from "../session-titles.js";
|
|
8
9
|
import { AIR_NATIVE_SUBAGENT_SESSIONS_CAPABILITY, asSdkSessionNotification, clientSupportsSubagents, subagentForm, } from "../acp-subagents.js";
|
|
9
10
|
import { childModelOption, isNativeSubagentControlTool, isNativeSubagentControlUpdate, NativeSubagentRuntime, nativeSubagentState, responseModelEntry, resumedNativeSubagentId, sameModelEntry, sendMessageResume, sendMessageResumePrompt, } from "../native-subagents.js";
|
|
@@ -709,6 +710,8 @@ export class ClaudeAcpAgent {
|
|
|
709
710
|
delete: {},
|
|
710
711
|
fork: {},
|
|
711
712
|
list: {},
|
|
713
|
+
// `session/options`, and `configOptions` on `session/new`, `load` and `resume`.
|
|
714
|
+
options: SESSION_OPTIONS_CAPABILITY,
|
|
712
715
|
resume: {},
|
|
713
716
|
status: SESSION_STATUS_CAPABILITY,
|
|
714
717
|
systemPrompt: SYSTEM_PROMPT_CAPABILITY,
|
|
@@ -778,15 +781,66 @@ export class ClaudeAcpAgent {
|
|
|
778
781
|
};
|
|
779
782
|
}
|
|
780
783
|
async newSession(params) {
|
|
784
|
+
// Without `configOptions`: a restart of the query restores the session's choices itself.
|
|
785
|
+
const { configOptions, ...request } = params;
|
|
786
|
+
const initial = initialConfigOptions(configOptions);
|
|
781
787
|
while (this.providerUpdate)
|
|
782
788
|
await this.providerUpdate;
|
|
783
|
-
const
|
|
789
|
+
const created = await this.createSession(request, {
|
|
784
790
|
// Revisit these meta values once we support resume
|
|
785
791
|
resume: params._meta?.claudeCode?.options?.resume,
|
|
786
792
|
});
|
|
793
|
+
const response = await this.withInitialConfigOptions(created, initial);
|
|
787
794
|
this.afterSetupResponse(response.sessionId, params.mcpServers);
|
|
788
795
|
return response;
|
|
789
796
|
}
|
|
797
|
+
/**
|
|
798
|
+
* `session/options`: the modes and config options that `session/new` with
|
|
799
|
+
* the same `cwd`, additional directories and `_meta` would answer with, or
|
|
800
|
+
* `session/load` and `session/resume` of `sessionId`.
|
|
801
|
+
*
|
|
802
|
+
* A session that this connection holds answers with what it has now.
|
|
803
|
+
* Otherwise a query starts as the session's would, without MCP servers, and
|
|
804
|
+
* closes once its options are read (`optionsOnly` in `createSession`). The
|
|
805
|
+
* query does not persist: it stores no session, and it does not write to
|
|
806
|
+
* the transcript of `sessionId`. Claude Code runs the user's `SessionStart`
|
|
807
|
+
* hooks in it, as in every query.
|
|
808
|
+
*
|
|
809
|
+
* It sends no update, and it creates, loads and changes no session. A
|
|
810
|
+
* `sessionId` without a stored conversation fails with `-32002`.
|
|
811
|
+
*/
|
|
812
|
+
async sessionOptions(params) {
|
|
813
|
+
while (this.providerUpdate)
|
|
814
|
+
await this.providerUpdate;
|
|
815
|
+
const held = params.sessionId != null ? this.sessions[params.sessionId] : undefined;
|
|
816
|
+
if (held) {
|
|
817
|
+
await this.validateCwd(params.cwd, params.additionalDirectories);
|
|
818
|
+
return { modes: held.modes, configOptions: held.configOptions };
|
|
819
|
+
}
|
|
820
|
+
const { modes, configOptions } = await this.createSession({
|
|
821
|
+
cwd: params.cwd,
|
|
822
|
+
mcpServers: [],
|
|
823
|
+
additionalDirectories: params.additionalDirectories,
|
|
824
|
+
_meta: params._meta,
|
|
825
|
+
}, { resume: params.sessionId ?? undefined, optionsOnly: true });
|
|
826
|
+
return { modes, configOptions };
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* The setup response once the request's `configOptions` are set on the
|
|
830
|
+
* session, in list order, as `session/set_config_option` sets each one. An
|
|
831
|
+
* entry that the session refuses is skipped (`applyInitialConfigOptions`).
|
|
832
|
+
* No update goes out for them: the response carries the modes and options.
|
|
833
|
+
*/
|
|
834
|
+
async withInitialConfigOptions(response, entries) {
|
|
835
|
+
if (entries.length === 0)
|
|
836
|
+
return response;
|
|
837
|
+
const { sessionId } = response;
|
|
838
|
+
await this.serializeConfigurationChange(sessionId, () => applyInitialConfigOptions(entries, (entry) => this.selectSessionConfigOption({ ...entry, sessionId }, true), this.logger));
|
|
839
|
+
const session = this.sessions[sessionId];
|
|
840
|
+
if (!session)
|
|
841
|
+
return response;
|
|
842
|
+
return { ...response, modes: session.modes, configOptions: session.configOptions };
|
|
843
|
+
}
|
|
790
844
|
/**
|
|
791
845
|
* Start the CLI of a loaded session, and replay the history while the CLI
|
|
792
846
|
* starts. The CLI start takes most of the load time, and the replay needs
|
|
@@ -882,14 +936,16 @@ export class ClaudeAcpAgent {
|
|
|
882
936
|
return this.sessionIndex.forking(sourceId, fork);
|
|
883
937
|
}
|
|
884
938
|
async resumeSession(params) {
|
|
939
|
+
const initial = initialConfigOptions(params.configOptions);
|
|
885
940
|
while (this.providerUpdate)
|
|
886
941
|
await this.providerUpdate;
|
|
887
|
-
const result = await this.getOrCreateSession(params);
|
|
942
|
+
const result = await this.withInitialConfigOptions(await this.getOrCreateSession(params), initial);
|
|
888
943
|
this.afterSetupResponse(params.sessionId, params.mcpServers ?? []);
|
|
889
944
|
return result;
|
|
890
945
|
}
|
|
891
946
|
async loadSession(params) {
|
|
892
947
|
const timing = new SessionTiming(this.logger, "load", params.sessionId);
|
|
948
|
+
const initial = initialConfigOptions(params.configOptions);
|
|
893
949
|
while (this.providerUpdate)
|
|
894
950
|
await this.providerUpdate;
|
|
895
951
|
let result;
|
|
@@ -903,6 +959,7 @@ export class ClaudeAcpAgent {
|
|
|
903
959
|
result = await this.createSessionWhileReplaying(params, timing);
|
|
904
960
|
}
|
|
905
961
|
timing.phase("replay");
|
|
962
|
+
result = await this.withInitialConfigOptions(result, initial);
|
|
906
963
|
// After the replay, so the commands do not interleave with the history.
|
|
907
964
|
this.afterSetupResponse(params.sessionId, params.mcpServers ?? []);
|
|
908
965
|
return result;
|
|
@@ -5844,7 +5901,12 @@ export class ClaudeAcpAgent {
|
|
|
5844
5901
|
setSessionConfigOption(params) {
|
|
5845
5902
|
return this.serializeConfigurationChange(params.sessionId, () => this.selectSessionConfigOption(params));
|
|
5846
5903
|
}
|
|
5847
|
-
|
|
5904
|
+
/**
|
|
5905
|
+
* `duringSetup`: the value is one of a setup request's `configOptions`. No
|
|
5906
|
+
* mode update goes out, and the warning of an Auto mode fallback waits for
|
|
5907
|
+
* the next prompt.
|
|
5908
|
+
*/
|
|
5909
|
+
async selectSessionConfigOption(params, duringSetup = false) {
|
|
5848
5910
|
const session = this.sessions[params.sessionId];
|
|
5849
5911
|
if (!session) {
|
|
5850
5912
|
throw RequestError.sessionNotFound(params.sessionId);
|
|
@@ -5873,8 +5935,9 @@ export class ClaudeAcpAgent {
|
|
|
5873
5935
|
const resolvedValue = selected.value;
|
|
5874
5936
|
let effectiveValue = resolvedValue;
|
|
5875
5937
|
if (params.configId === MODE_CONFIG_ID) {
|
|
5876
|
-
effectiveValue = await this.sessionModes.selectMode(params.sessionId, resolvedValue);
|
|
5877
|
-
|
|
5938
|
+
effectiveValue = await this.sessionModes.selectMode(params.sessionId, resolvedValue, duringSetup);
|
|
5939
|
+
if (!duringSetup)
|
|
5940
|
+
await this.sessionModes.publishCurrent(params.sessionId, effectiveValue);
|
|
5878
5941
|
}
|
|
5879
5942
|
else if (params.configId === MODEL_CONFIG_ID) {
|
|
5880
5943
|
await this.sessions[params.sessionId].query.setModel(resolvedValue);
|
|
@@ -5882,7 +5945,7 @@ export class ClaudeAcpAgent {
|
|
|
5882
5945
|
// Effort SDK sync is handled inside applyConfigOptionValue so that direct
|
|
5883
5946
|
// effort changes and effort changes induced by a model switch go through
|
|
5884
5947
|
// the same path.
|
|
5885
|
-
await this.applyConfigOptionValue(params.sessionId, session, params.configId, effectiveValue);
|
|
5948
|
+
await this.applyConfigOptionValue(params.sessionId, session, params.configId, effectiveValue, duringSetup);
|
|
5886
5949
|
return { configOptions: session.configOptions };
|
|
5887
5950
|
}
|
|
5888
5951
|
async replaySessionHistory(sessionId, resumedMessages, pending) {
|
|
@@ -7092,7 +7155,9 @@ export class ClaudeAcpAgent {
|
|
|
7092
7155
|
this.logger.error("Failed to read the context window:", error);
|
|
7093
7156
|
});
|
|
7094
7157
|
}
|
|
7095
|
-
async applyConfigOptionValue(sessionId, session, configId, value
|
|
7158
|
+
async applyConfigOptionValue(sessionId, session, configId, value,
|
|
7159
|
+
/** See {@link selectSessionConfigOption}. */
|
|
7160
|
+
duringSetup = false) {
|
|
7096
7161
|
if (configId === MODE_CONFIG_ID) {
|
|
7097
7162
|
this.sessionModes.syncConfig(session, value);
|
|
7098
7163
|
}
|
|
@@ -7173,7 +7238,10 @@ export class ClaudeAcpAgent {
|
|
|
7173
7238
|
// still precedes the caller's config_option_update so order-sensitive
|
|
7174
7239
|
// clients update currentModeId before re-rendering the option list.
|
|
7175
7240
|
if (modeDowngraded) {
|
|
7176
|
-
|
|
7241
|
+
if (duringSetup)
|
|
7242
|
+
this.sessionModes.deferFallbackWarning(session);
|
|
7243
|
+
else
|
|
7244
|
+
await this.sessionModes.publishFallbackState(sessionId, session);
|
|
7177
7245
|
}
|
|
7178
7246
|
// Last, so the switch's own control requests don't queue behind it.
|
|
7179
7247
|
if (modelChanged)
|
|
@@ -7738,6 +7806,7 @@ export class ClaudeAcpAgent {
|
|
|
7738
7806
|
},
|
|
7739
7807
|
...(creationOpts.resume !== undefined && { resume: creationOpts.resume }),
|
|
7740
7808
|
...(creationOpts.forkSession !== undefined && { forkSession: creationOpts.forkSession }),
|
|
7809
|
+
...(creationOpts.optionsOnly ? { persistSession: false } : {}),
|
|
7741
7810
|
abortController,
|
|
7742
7811
|
};
|
|
7743
7812
|
// Prefer the official ACP `additionalDirectories` field. Fall back to the
|
|
@@ -7893,6 +7962,10 @@ export class ClaudeAcpAgent {
|
|
|
7893
7962
|
const configOptions = buildConfigOptions(modes, models, modelInfos, userProvidedOptions?.effort ?? settingsEffortForModel(effortSettings, currentModelInfo), agents, currentAgent, fastMode, {
|
|
7894
7963
|
useRecommendedValue,
|
|
7895
7964
|
}, ultracode);
|
|
7965
|
+
if (creationOpts.optionsOnly) {
|
|
7966
|
+
this.discardUnregisteredQuery(q, input, settingsManager);
|
|
7967
|
+
return { sessionId, modes, configOptions };
|
|
7968
|
+
}
|
|
7896
7969
|
const initialEffort = configOptions.find((option) => option.id === EFFORT_CONFIG_ID);
|
|
7897
7970
|
if (useRecommendedValue && typeof initialEffort?.currentValue === "string") {
|
|
7898
7971
|
await q.applyFlagSettings(effortFlagSettings(initialEffort.currentValue, ultracodeEnabled));
|
|
@@ -8493,6 +8566,7 @@ export function v1AgentApp(logger, onAgent) {
|
|
|
8493
8566
|
.onRequest(methods.agent.session.resume, (ctx) => agent.resumeSession(ctx.params))
|
|
8494
8567
|
.onRequest(methods.agent.session.close, (ctx) => agent.closeSession(ctx.params))
|
|
8495
8568
|
.onRequest(methods.agent.session.status, (ctx) => agent.sessionStatus(ctx.params))
|
|
8569
|
+
.onRequest(methods.agent.session.options, (ctx) => agent.sessionOptions(ctx.params))
|
|
8496
8570
|
.onRequest(methods.agent.session.setMode, (ctx) => agent.setSessionMode(ctx.params))
|
|
8497
8571
|
.onRequest(methods.agent.session.setConfigOption, (ctx) => agent.setSessionConfigOption(ctx.params))
|
|
8498
8572
|
.onRequest(methods.agent.authenticate, (ctx) => agent.authenticate(ctx.params))
|
package/dist/v2/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/v2/agent.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAYxE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/v2/agent.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAYxE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AA4D3C,sEAAsE;AACtE,MAAM,WAAW,WAAW;IAC1B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAED,8CAA8C;AAC9C,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GACpC,EAAE,CAAC,QAAQ,CA2Cb"}
|
package/dist/v2/agent.js
CHANGED
|
@@ -36,7 +36,8 @@ import { STARTUP_FAILURE_RESULTS_ENV, startupFailureError } from "../startup-fai
|
|
|
36
36
|
import { createPostToolUseHook } from "../tools.js";
|
|
37
37
|
import { Pushable } from "../utils.js";
|
|
38
38
|
import { V2_SESSION_CAPABILITIES } from "./initialize.js";
|
|
39
|
-
import { v1ForkSessionRequest, v1NewSessionRequest } from "./session-requests.js";
|
|
39
|
+
import { initialConfigRequests, v1ForkSessionRequest, v1NewSessionRequest, } from "./session-requests.js";
|
|
40
|
+
import { SessionCommands } from "./commands.js";
|
|
40
41
|
import { V2UpdateTranslator } from "./update-translator.js";
|
|
41
42
|
import { airInitializeMeta, airSupport, NO_AIR } from "./air.js";
|
|
42
43
|
import { V2Auth } from "./auth.js";
|
|
@@ -75,6 +76,7 @@ export function v2AgentApp(logger, onAgent) {
|
|
|
75
76
|
.onRequest(v2.methods.agent.session.list, ({ params }) => agent.listSessions(params))
|
|
76
77
|
.onRequest(v2.methods.agent.session.close, ({ params }) => agent.closeSession(params))
|
|
77
78
|
.onRequest(v2.methods.agent.session.status, ({ params }) => agent.sessionStatus(params))
|
|
79
|
+
.onRequest(v2.methods.agent.session.options, ({ params }) => agent.sessionOptions(params))
|
|
78
80
|
.onRequest(v2.methods.agent.session.delete, ({ params }) => agent.deleteSession(params))
|
|
79
81
|
.onRequest(v2.methods.agent.session.setTitle, ({ params }) => agent.setTitle(params))
|
|
80
82
|
.onRequest(v2.methods.agent.session.setConfigOption, ({ params }) => agent.setConfigOption(params))
|
|
@@ -240,7 +242,9 @@ class V2Agent {
|
|
|
240
242
|
}
|
|
241
243
|
async newSession(params) {
|
|
242
244
|
const sessionId = randomUUID();
|
|
245
|
+
const initial = initialConfigRequests(sessionId, params.configOptions);
|
|
243
246
|
const session = await this.startSession(sessionId, params, undefined);
|
|
247
|
+
await session.setInitialConfigOptions(initial);
|
|
244
248
|
const response = { sessionId, ...(await this.setupFields(session)) };
|
|
245
249
|
this.afterSetup(session, params);
|
|
246
250
|
return response;
|
|
@@ -266,7 +270,9 @@ class V2Agent {
|
|
|
266
270
|
/**
|
|
267
271
|
* Resumes a stored session, or attaches to a live one. With `replayFrom:
|
|
268
272
|
* { type: "start" }` the stored history replays first. Either way, the
|
|
269
|
-
* state snapshot goes out after any replay and before the response.
|
|
273
|
+
* state snapshot goes out after any replay and before the response. The
|
|
274
|
+
* request's `configOptions` are set before the replay, on an active session
|
|
275
|
+
* too.
|
|
270
276
|
*/
|
|
271
277
|
resumeSession(params) {
|
|
272
278
|
const { sessionId } = params;
|
|
@@ -291,6 +297,7 @@ class V2Agent {
|
|
|
291
297
|
}
|
|
292
298
|
if (this.ownerOfChild(sessionId))
|
|
293
299
|
throw restrictedChild(sessionId, "resume");
|
|
300
|
+
const initial = initialConfigRequests(sessionId, params.configOptions);
|
|
294
301
|
await this.restarts.settled(sessionId);
|
|
295
302
|
// A concurrent resume of this session started its query: this one then
|
|
296
303
|
// attaches to the session that it started.
|
|
@@ -304,9 +311,7 @@ class V2Agent {
|
|
|
304
311
|
// and the request's MCP servers and additional directories replace the
|
|
305
312
|
// session's.
|
|
306
313
|
const request = await validatedSetup(params);
|
|
307
|
-
|
|
308
|
-
throw RequestError.invalidParams({ cwd: request.cwd }, `Session ${sessionId} works in ${session.cwd}: resume it with that \`cwd\``);
|
|
309
|
-
}
|
|
314
|
+
assertCwdOf(session, request.cwd, "resume it");
|
|
310
315
|
await session.setMcpServers({
|
|
311
316
|
...clientOptions(params._meta)?.mcpServers,
|
|
312
317
|
...sdkMcpServers(request.mcpServers),
|
|
@@ -331,6 +336,7 @@ class V2Agent {
|
|
|
331
336
|
replayed?.catch(() => { });
|
|
332
337
|
session = await this.startSession(sessionId, params, sessionId, history);
|
|
333
338
|
}
|
|
339
|
+
await session.setInitialConfigOptions(initial);
|
|
334
340
|
let subagents;
|
|
335
341
|
if (replayFrom != null) {
|
|
336
342
|
const cwd = session.cwd;
|
|
@@ -404,6 +410,66 @@ class V2Agent {
|
|
|
404
410
|
throw restrictedChild(sessionId, "ask the status of");
|
|
405
411
|
return savedSessionStatus(sessionId);
|
|
406
412
|
}
|
|
413
|
+
/**
|
|
414
|
+
* `session/options`: the config options and commands that `session/new`
|
|
415
|
+
* with the same `cwd`, additional directories and `_meta` would answer
|
|
416
|
+
* with, or `session/resume` of `sessionId`.
|
|
417
|
+
*
|
|
418
|
+
* An active session answers with what it has now. Otherwise a query starts
|
|
419
|
+
* as the session's would, without MCP servers, and closes once its options
|
|
420
|
+
* are read. So the commands lack the MCP prompts, and a failed read of the
|
|
421
|
+
* commands leaves them out. The query does not persist
|
|
422
|
+
* (`persistSession: false`): it stores no session, and it does not write to
|
|
423
|
+
* the transcript of `sessionId`. Claude Code runs the user's `SessionStart`
|
|
424
|
+
* hooks in it, as in every query.
|
|
425
|
+
*
|
|
426
|
+
* It sends no update, and it creates, resumes and changes no session. A
|
|
427
|
+
* `sessionId` without a stored conversation fails with `-32002`.
|
|
428
|
+
*/
|
|
429
|
+
async sessionOptions(params) {
|
|
430
|
+
const { sessionId } = params;
|
|
431
|
+
const setup = {
|
|
432
|
+
cwd: params.cwd,
|
|
433
|
+
additionalDirectories: params.additionalDirectories,
|
|
434
|
+
_meta: params._meta,
|
|
435
|
+
};
|
|
436
|
+
let session;
|
|
437
|
+
if (sessionId != null) {
|
|
438
|
+
if (this.ownerOfChild(sessionId))
|
|
439
|
+
throw restrictedChild(sessionId, "read the options of");
|
|
440
|
+
// A restart or a resume that runs makes the session active.
|
|
441
|
+
await this.restarts.settled(sessionId);
|
|
442
|
+
await this.startSettled(sessionId);
|
|
443
|
+
session = this.sessions.get(sessionId);
|
|
444
|
+
}
|
|
445
|
+
const fields = (config, commands) => ({
|
|
446
|
+
configOptions: config.options(),
|
|
447
|
+
// The draft leaves out an empty list.
|
|
448
|
+
...(commands.length > 0 ? { availableCommands: commands } : {}),
|
|
449
|
+
});
|
|
450
|
+
const listed = (commands) => commands.list().catch((error) => {
|
|
451
|
+
this.logger.error("session/options: failed to read the commands", error);
|
|
452
|
+
return [];
|
|
453
|
+
});
|
|
454
|
+
if (session) {
|
|
455
|
+
assertCwdOf(session, (await validatedSetup(setup)).cwd, "ask for its options");
|
|
456
|
+
return fields(session.config, await listed(session.commands));
|
|
457
|
+
}
|
|
458
|
+
// The probe's own id: its records never meet those of the session `sessionId`.
|
|
459
|
+
const probeId = randomUUID();
|
|
460
|
+
const probe = await this.openQuery(probeId, setup, sessionId ?? undefined, undefined, {
|
|
461
|
+
persist: false,
|
|
462
|
+
});
|
|
463
|
+
try {
|
|
464
|
+
return fields(probe.config, await listed(new SessionCommands(probe.query)));
|
|
465
|
+
}
|
|
466
|
+
finally {
|
|
467
|
+
probe.query.close();
|
|
468
|
+
probe.settings.dispose();
|
|
469
|
+
this.auth.sessionEnded(probeId);
|
|
470
|
+
this.guard.sessionEnded(probeId);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
407
473
|
/** Closing is idempotent: a session that is not active closes at once. */
|
|
408
474
|
async closeSession({ sessionId }) {
|
|
409
475
|
if (this.ownerOfChild(sessionId))
|
|
@@ -617,13 +683,42 @@ class V2Agent {
|
|
|
617
683
|
start.then(settled, settled);
|
|
618
684
|
return start;
|
|
619
685
|
}
|
|
620
|
-
/**
|
|
621
|
-
* The query start of {@link startSession}. Its options are the client's
|
|
622
|
-
* `_meta.claudeCode.options` under the ones this core controls.
|
|
623
|
-
*/
|
|
686
|
+
/** The query start of {@link startSession}: {@link openQuery}, then the session is active. */
|
|
624
687
|
async launchSession(sessionId, params, resume,
|
|
625
688
|
/** The resumed transcript, when the caller reads it anyway (a replay). */
|
|
626
689
|
history) {
|
|
690
|
+
const { session, query: q, config, models, ...opened } = await this.openQuery(sessionId, params, resume, history);
|
|
691
|
+
session.reports.configure({
|
|
692
|
+
settings: opened.settings,
|
|
693
|
+
configuredSettings: opened.configured,
|
|
694
|
+
env: opened.env,
|
|
695
|
+
mcpServers: opened.request.mcpServers.map((server) => server.name),
|
|
696
|
+
mcpOAuth: this.elicitation.url && supportsMcpOAuth(q),
|
|
697
|
+
query: q,
|
|
698
|
+
model: { id: models.models.currentModelId, info: models.allowlistedModelInfo },
|
|
699
|
+
});
|
|
700
|
+
session.start(q, config, opened.mcpServers, resume !== undefined);
|
|
701
|
+
this.sessions.set(sessionId, session);
|
|
702
|
+
this.stopped.delete(sessionId);
|
|
703
|
+
// A route change during the start did not find this session live.
|
|
704
|
+
this.restarts.track(sessionId, params, {
|
|
705
|
+
staleRoute: this.auth.routeGeneration !== opened.routeGeneration,
|
|
706
|
+
});
|
|
707
|
+
return session;
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* Starts the query of a session and builds its config. Its options are the
|
|
711
|
+
* client's `_meta.claudeCode.options` under the ones this core controls.
|
|
712
|
+
* The session is not active yet, and nothing of it goes out. The caller
|
|
713
|
+
* closes the query and disposes the settings when it does not keep them.
|
|
714
|
+
*
|
|
715
|
+
* `resume`: the stored session that the query resumes, `sessionId` itself
|
|
716
|
+
* but for a `session/options` probe. Without `persist`, Claude Code stores
|
|
717
|
+
* nothing of the query (see {@link sessionOptions}).
|
|
718
|
+
*/
|
|
719
|
+
async openQuery(sessionId, params, resume,
|
|
720
|
+
/** The resumed transcript, when the caller reads it anyway (a replay). */
|
|
721
|
+
history, { persist = true } = {}) {
|
|
627
722
|
const request = await validatedSetup(params);
|
|
628
723
|
const client = clientOptions(params._meta);
|
|
629
724
|
// After a provider change that is still listing its models.
|
|
@@ -752,6 +847,7 @@ class V2Agent {
|
|
|
752
847
|
...STARTUP_FAILURE_RESULTS_ENV,
|
|
753
848
|
},
|
|
754
849
|
...(resume !== undefined ? { resume } : { sessionId }),
|
|
850
|
+
...(persist ? {} : { persistSession: false }),
|
|
755
851
|
};
|
|
756
852
|
const q = query({ prompt: input, options });
|
|
757
853
|
let initialization;
|
|
@@ -764,7 +860,7 @@ class V2Agent {
|
|
|
764
860
|
if (resume !== undefined &&
|
|
765
861
|
error instanceof Error &&
|
|
766
862
|
error.message.includes("No conversation found with session ID")) {
|
|
767
|
-
throw RequestError.sessionNotFound(
|
|
863
|
+
throw RequestError.sessionNotFound(resume);
|
|
768
864
|
}
|
|
769
865
|
throw startupFailureError(error) ?? error;
|
|
770
866
|
}
|
|
@@ -809,23 +905,18 @@ class V2Agent {
|
|
|
809
905
|
settings.dispose();
|
|
810
906
|
throw error;
|
|
811
907
|
}
|
|
812
|
-
|
|
908
|
+
return {
|
|
909
|
+
session,
|
|
910
|
+
query: q,
|
|
911
|
+
config,
|
|
912
|
+
models,
|
|
813
913
|
settings,
|
|
814
|
-
|
|
914
|
+
configured,
|
|
815
915
|
env: options.env ?? {},
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
});
|
|
821
|
-
session.start(q, config, mcpServers, resume !== undefined);
|
|
822
|
-
this.sessions.set(sessionId, session);
|
|
823
|
-
this.stopped.delete(sessionId);
|
|
824
|
-
// A route change during the start did not find this session live.
|
|
825
|
-
this.restarts.track(sessionId, params, {
|
|
826
|
-
staleRoute: this.auth.routeGeneration !== routeGeneration,
|
|
827
|
-
});
|
|
828
|
-
return session;
|
|
916
|
+
request,
|
|
917
|
+
mcpServers,
|
|
918
|
+
routeGeneration,
|
|
919
|
+
};
|
|
829
920
|
}
|
|
830
921
|
}
|
|
831
922
|
/**
|
|
@@ -853,6 +944,12 @@ async function validatedSetup(params) {
|
|
|
853
944
|
}
|
|
854
945
|
return request;
|
|
855
946
|
}
|
|
947
|
+
/** A request of the active `session` names its `cwd`, as `session/resume` must. */
|
|
948
|
+
function assertCwdOf(session, cwd, action) {
|
|
949
|
+
if (cwd === session.cwd)
|
|
950
|
+
return;
|
|
951
|
+
throw RequestError.invalidParams({ cwd }, `Session ${session.sessionId} works in ${session.cwd}: ${action} with that \`cwd\``);
|
|
952
|
+
}
|
|
856
953
|
function sameDirectories(left, right) {
|
|
857
954
|
const normalize = (directories) => [...new Set(directories.map((directory) => path.resolve(directory)))].sort().join("\n");
|
|
858
955
|
return normalize(left) === normalize(right);
|
package/dist/v2/config.d.ts
CHANGED
|
@@ -110,6 +110,14 @@ export declare class SessionConfig {
|
|
|
110
110
|
* entries (or a model alias), a boolean takes a boolean.
|
|
111
111
|
*/
|
|
112
112
|
set(params: v2.SetSessionConfigOptionRequest): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* Sets the initial values of a setup request's `configOptions`, in list
|
|
115
|
+
* order, as {@link set} sets each one. An entry that the session refuses is
|
|
116
|
+
* skipped (`applyInitialConfigOptions`). Nothing goes out: the setup
|
|
117
|
+
* response carries the options, and the notice of an Auto mode fallback
|
|
118
|
+
* waits for the next prompt.
|
|
119
|
+
*/
|
|
120
|
+
setInitial(entries: readonly v2.SetSessionConfigOptionRequest[]): Promise<void>;
|
|
113
121
|
/**
|
|
114
122
|
* Sets the choices of `previous`, the config of the query that this one
|
|
115
123
|
* replaced (see `restarts.ts`), as the v1 core's `restoreSessionChoices`
|
|
@@ -120,6 +128,7 @@ export declare class SessionConfig {
|
|
|
120
128
|
*/
|
|
121
129
|
restoreFrom(previous: SessionConfig): Promise<void>;
|
|
122
130
|
private serialized;
|
|
131
|
+
/** `duringSetup`: see {@link setInitial}. */
|
|
123
132
|
private apply;
|
|
124
133
|
/**
|
|
125
134
|
* Sets the mode `requested` on the query, and records it once Claude Code
|
|
@@ -130,6 +139,8 @@ export declare class SessionConfig {
|
|
|
130
139
|
/** The mode that `requested` runs as on the current model (see the module doc). */
|
|
131
140
|
effectiveMode(requested: PermissionMode): PermissionMode;
|
|
132
141
|
private applyMode;
|
|
142
|
+
/** The notice of an Auto mode fallback: now, or with the next prompt during setup. */
|
|
143
|
+
private warnOfFallback;
|
|
133
144
|
/** Claude Code switched the mode itself. Returns whether the option changed. */
|
|
134
145
|
modeChanged(mode: PermissionMode): boolean;
|
|
135
146
|
/**
|
package/dist/v2/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/v2/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAC7E,OAAO,KAAK,EAEV,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,SAAS,EACT,cAAc,EACd,g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AAgF;YAClE,WAAW;IAMzB;;;;OAIG;YACW,YAAY;IAM1B,OAAO,CAAC,qBAAqB;IAU7B,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,eAAe;IAQvB;;;;;;OAMG;YACW,WAAW;CA4D1B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,mBAAmB,CAmBtF"}
|
package/dist/v2/config.js
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
* its end, so a change that ran meanwhile would be lost.
|
|
27
27
|
*/
|
|
28
28
|
import { RequestError, } from "@agentclientprotocol/sdk/unstable";
|
|
29
|
+
import { applyInitialConfigOptions } from "../initial-config-options.js";
|
|
29
30
|
import { DEFAULT_AGENT_ID } from "../session-config-ids.js";
|
|
30
31
|
import { AGENT_CONFIG_ID, buildConfigOptions, configOptionValue, discoverCustomAgents, } from "../session-config-options.js";
|
|
31
32
|
import { EFFORT_CONFIG_ID, effortFlagSettings, effortForModelSwitch, settleEffortAfterModelSwitch, settingsEffortForModel, } from "../session-effort.js";
|
|
@@ -210,6 +211,16 @@ export class SessionConfig {
|
|
|
210
211
|
set(params) {
|
|
211
212
|
return this.serialized(() => this.apply(params));
|
|
212
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Sets the initial values of a setup request's `configOptions`, in list
|
|
216
|
+
* order, as {@link set} sets each one. An entry that the session refuses is
|
|
217
|
+
* skipped (`applyInitialConfigOptions`). Nothing goes out: the setup
|
|
218
|
+
* response carries the options, and the notice of an Auto mode fallback
|
|
219
|
+
* waits for the next prompt.
|
|
220
|
+
*/
|
|
221
|
+
setInitial(entries) {
|
|
222
|
+
return this.serialized(() => applyInitialConfigOptions(entries, (entry) => this.apply(entry, true), this.logger));
|
|
223
|
+
}
|
|
213
224
|
/**
|
|
214
225
|
* Sets the choices of `previous`, the config of the query that this one
|
|
215
226
|
* replaced (see `restarts.ts`), as the v1 core's `restoreSessionChoices`
|
|
@@ -270,7 +281,8 @@ export class SessionConfig {
|
|
|
270
281
|
this.changes = result.then(() => { }, () => { });
|
|
271
282
|
return result;
|
|
272
283
|
}
|
|
273
|
-
|
|
284
|
+
/** `duringSetup`: see {@link setInitial}. */
|
|
285
|
+
async apply(params, duringSetup = false) {
|
|
274
286
|
const request = v1SetSessionConfigOptionRequest(params);
|
|
275
287
|
const option = this.session.configOptions.find((entry) => entry.id === request.configId);
|
|
276
288
|
if (!option) {
|
|
@@ -287,11 +299,11 @@ export class SessionConfig {
|
|
|
287
299
|
const value = selected.value;
|
|
288
300
|
switch (request.configId) {
|
|
289
301
|
case MODE_CONFIG_ID:
|
|
290
|
-
await this.applyMode(value);
|
|
302
|
+
await this.applyMode(value, duringSetup);
|
|
291
303
|
return;
|
|
292
304
|
case MODEL_CONFIG_ID:
|
|
293
305
|
await this.session.query.setModel(value);
|
|
294
|
-
await this.recordModel(value);
|
|
306
|
+
await this.recordModel(value, duringSetup);
|
|
295
307
|
return;
|
|
296
308
|
case EFFORT_CONFIG_ID:
|
|
297
309
|
// Applied first, so a rejected control request leaves the option as it was.
|
|
@@ -322,11 +334,18 @@ export class SessionConfig {
|
|
|
322
334
|
effectiveMode(requested) {
|
|
323
335
|
return this.rules.effectiveMode(this.session, requested);
|
|
324
336
|
}
|
|
325
|
-
async applyMode(requested) {
|
|
337
|
+
async applyMode(requested, duringSetup = false) {
|
|
326
338
|
const mode = this.rules.effectiveMode(this.session, requested);
|
|
327
339
|
await this.session.query.setPermissionMode(mode);
|
|
328
340
|
this.rules.syncConfig(this.session, mode);
|
|
329
341
|
if (mode !== requested)
|
|
342
|
+
await this.warnOfFallback(duringSetup);
|
|
343
|
+
}
|
|
344
|
+
/** The notice of an Auto mode fallback: now, or with the next prompt during setup. */
|
|
345
|
+
async warnOfFallback(duringSetup) {
|
|
346
|
+
if (duringSetup)
|
|
347
|
+
this.rules.deferFallbackWarning(this.session);
|
|
348
|
+
else
|
|
330
349
|
await this.rules.publishFallbackWarning(this.sessionId, this.session);
|
|
331
350
|
}
|
|
332
351
|
/** Claude Code switched the mode itself. Returns whether the option changed. */
|
|
@@ -429,7 +448,7 @@ export class SessionConfig {
|
|
|
429
448
|
* show only on a model that supports them, with the user's retained
|
|
430
449
|
* choice.
|
|
431
450
|
*/
|
|
432
|
-
async recordModel(value) {
|
|
451
|
+
async recordModel(value, duringSetup = false) {
|
|
433
452
|
const info = this.modelInfos.find((model) => model.value === value);
|
|
434
453
|
this.session.models = { ...this.session.models, currentModelId: value };
|
|
435
454
|
const modeDowngraded = await this.rules.reconcileForModel(this.session, info);
|
|
@@ -465,7 +484,7 @@ export class SessionConfig {
|
|
|
465
484
|
this.logger.error(`Session ${this.sessionId}: failed to synchronize effort after the switch to ${value}`, effort.error);
|
|
466
485
|
}
|
|
467
486
|
if (modeDowngraded)
|
|
468
|
-
await this.
|
|
487
|
+
await this.warnOfFallback(duringSetup);
|
|
469
488
|
}
|
|
470
489
|
}
|
|
471
490
|
/**
|
package/dist/v2/initialize.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ import type * as v2 from "@agentclientprotocol/sdk/experimental/v2/unstable";
|
|
|
16
16
|
* images, embedded context, and HTTP servers. v2 has no SSE transport.
|
|
17
17
|
* - `systemPrompt`, in `append` and `override` mode.
|
|
18
18
|
* - `session/status` (unstable), with the foreground state of an open session.
|
|
19
|
+
* - `session/options` (unstable), and `configOptions` on `session/new` and
|
|
20
|
+
* `session/resume`.
|
|
19
21
|
*/
|
|
20
22
|
export declare const V2_SESSION_CAPABILITIES: v2.SessionCapabilities;
|
|
21
23
|
/** v2 names the id of a method `methodId`, requires `type`, and lists `env` as name and value pairs. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../src/v2/initialize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,KAAK,KAAK,EAAE,MAAM,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../src/v2/initialize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,KAAK,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAK7E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,mBAWxC,CAAC;AAEF,wGAAwG;AACxG,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,EAAE,CAAC,UAAU,CAW9D"}
|
package/dist/v2/initialize.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SYSTEM_PROMPT_CAPABILITY } from "../client-system-prompt.js";
|
|
2
|
+
import { SESSION_OPTIONS_CAPABILITY } from "../initial-config-options.js";
|
|
2
3
|
import { SESSION_STATUS_CAPABILITY } from "../session-status.js";
|
|
3
4
|
/**
|
|
4
5
|
* The session capabilities that the v2 core serves.
|
|
@@ -11,6 +12,8 @@ import { SESSION_STATUS_CAPABILITY } from "../session-status.js";
|
|
|
11
12
|
* images, embedded context, and HTTP servers. v2 has no SSE transport.
|
|
12
13
|
* - `systemPrompt`, in `append` and `override` mode.
|
|
13
14
|
* - `session/status` (unstable), with the foreground state of an open session.
|
|
15
|
+
* - `session/options` (unstable), and `configOptions` on `session/new` and
|
|
16
|
+
* `session/resume`.
|
|
14
17
|
*/
|
|
15
18
|
export const V2_SESSION_CAPABILITIES = {
|
|
16
19
|
prompt: { image: {}, embeddedContext: {} },
|
|
@@ -20,6 +23,7 @@ export const V2_SESSION_CAPABILITIES = {
|
|
|
20
23
|
additionalDirectories: {},
|
|
21
24
|
systemPrompt: SYSTEM_PROMPT_CAPABILITY,
|
|
22
25
|
status: SESSION_STATUS_CAPABILITY,
|
|
26
|
+
options: SESSION_OPTIONS_CAPABILITY,
|
|
23
27
|
// `session/set_title`.
|
|
24
28
|
title: {},
|
|
25
29
|
};
|
|
@@ -6,14 +6,21 @@
|
|
|
6
6
|
import { type AvailableCommand, type ForkSessionRequest, type NewSessionRequest, type SessionConfigOption, type SetSessionConfigOptionRequest } from "@agentclientprotocol/sdk/unstable";
|
|
7
7
|
import * as v2 from "@agentclientprotocol/sdk/experimental/v2/unstable";
|
|
8
8
|
/**
|
|
9
|
-
* Without `configOptions`:
|
|
10
|
-
*
|
|
9
|
+
* Without `configOptions`: the session applies them once it started (see
|
|
10
|
+
* {@link initialConfigRequests}).
|
|
11
11
|
*/
|
|
12
12
|
export declare function v1NewSessionRequest(params: v2.NewSessionRequest): NewSessionRequest;
|
|
13
13
|
/** The v1 request of a v2 `session/fork`. */
|
|
14
14
|
export declare function v1ForkSessionRequest(params: v2.ForkSessionRequest): ForkSessionRequest;
|
|
15
15
|
/** v2 tags a select value with `type: "id"`; v1 leaves it untagged. */
|
|
16
16
|
export declare function v1SetSessionConfigOptionRequest(params: v2.SetSessionConfigOptionRequest): SetSessionConfigOptionRequest;
|
|
17
|
+
/**
|
|
18
|
+
* The `configOptions` of a setup request, as the `session/set_config_option`
|
|
19
|
+
* requests of `sessionId` that set them. Fails with invalid params (-32602)
|
|
20
|
+
* for two entries with the same `configId`, and for an entry of a value type
|
|
21
|
+
* that `session/set_config_option` does not take: any but `id` and `boolean`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function initialConfigRequests(sessionId: string, entries: v2.InitialSessionConfigOption[] | null | undefined): v2.SetSessionConfigOptionRequest[];
|
|
17
24
|
/** v2 names the id of an option `configId` and the id of a select group `groupId`. */
|
|
18
25
|
export declare function v2ConfigOptions(options: SessionConfigOption[]): v2.SessionConfigOption[];
|
|
19
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-requests.d.ts","sourceRoot":"","sources":["../../src/v2/session-requests.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAEvB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAGxB,KAAK,6BAA6B,EAEnC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"session-requests.d.ts","sourceRoot":"","sources":["../../src/v2/session-requests.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAEvB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAGxB,KAAK,6BAA6B,EAEnC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAKxE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,EAAE,CAAC,iBAAiB,GAAG,iBAAiB,CASnF;AAED,6CAA6C;AAC7C,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,GAAG,kBAAkB,CAOtF;AAaD,uEAAuE;AACvE,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,EAAE,CAAC,6BAA6B,GACvC,6BAA6B,CAgB/B;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,EAAE,CAAC,0BAA0B,EAAE,GAAG,IAAI,GAAG,SAAS,GAC1D,EAAE,CAAC,6BAA6B,EAAE,CAMpC;AAED,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,OAAO,EAAE,mBAAmB,EAAE,GAAG,EAAE,CAAC,mBAAmB,EAAE,CAQxF;AAWD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE,CAMvF"}
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { RequestError, } from "@agentclientprotocol/sdk/unstable";
|
|
7
7
|
import * as v2 from "@agentclientprotocol/sdk/experimental/v2/unstable";
|
|
8
|
+
import { initialConfigOptions } from "../initial-config-options.js";
|
|
8
9
|
import { V2_SESSION_CAPABILITIES } from "./initialize.js";
|
|
9
10
|
import { v1ContentBlock } from "./prompt.js";
|
|
10
11
|
/**
|
|
11
|
-
* Without `configOptions`:
|
|
12
|
-
*
|
|
12
|
+
* Without `configOptions`: the session applies them once it started (see
|
|
13
|
+
* {@link initialConfigRequests}).
|
|
13
14
|
*/
|
|
14
15
|
export function v1NewSessionRequest(params) {
|
|
15
16
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -54,6 +55,19 @@ export function v1SetSessionConfigOptionRequest(params) {
|
|
|
54
55
|
}
|
|
55
56
|
throw RequestError.invalidParams({ type: params.type }, `Config option values of type ${params.type} are not supported`);
|
|
56
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* The `configOptions` of a setup request, as the `session/set_config_option`
|
|
60
|
+
* requests of `sessionId` that set them. Fails with invalid params (-32602)
|
|
61
|
+
* for two entries with the same `configId`, and for an entry of a value type
|
|
62
|
+
* that `session/set_config_option` does not take: any but `id` and `boolean`.
|
|
63
|
+
*/
|
|
64
|
+
export function initialConfigRequests(sessionId, entries) {
|
|
65
|
+
return initialConfigOptions(entries).map((entry) => {
|
|
66
|
+
const request = { ...entry, sessionId };
|
|
67
|
+
v1SetSessionConfigOptionRequest(request);
|
|
68
|
+
return request;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
57
71
|
/** v2 names the id of an option `configId` and the id of a select group `groupId`. */
|
|
58
72
|
export function v2ConfigOptions(options) {
|
|
59
73
|
return options.map((option) => {
|
package/dist/v2/session.d.ts
CHANGED
|
@@ -203,6 +203,14 @@ export declare class V2Session implements RequestTarget {
|
|
|
203
203
|
* {@link closeTurn}).
|
|
204
204
|
*/
|
|
205
205
|
private stopForeground;
|
|
206
|
+
/**
|
|
207
|
+
* Sets the initial values of a setup request's `configOptions` (see
|
|
208
|
+
* `SessionConfig.setInitial`), and has the reports follow the model they
|
|
209
|
+
* leave. It sends nothing, on a session that a `session/resume` found
|
|
210
|
+
* active too: the setup response carries the options to the connection
|
|
211
|
+
* that asked, and a session is active on one connection only.
|
|
212
|
+
*/
|
|
213
|
+
setInitialConfigOptions(entries: readonly v2.SetSessionConfigOptionRequest[]): Promise<void>;
|
|
206
214
|
setConfigOption(params: v2.SetSessionConfigOptionRequest): Promise<v2.SessionConfigOption[]>;
|
|
207
215
|
/**
|
|
208
216
|
* Cancels as `session/cancel` does, ends the open turn with its cancelled
|
package/dist/v2/session.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/v2/session.ts"],"names":[],"mappings":"AAkCA,OAAO,EAEL,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAE9B,KAAK,cAAc,EACpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,EAAE,MAAM,mDAAmD,CAAC;AAC7E,OAAO,KAAK,EAGV,cAAc,EACd,gBAAgB,EAChB,KAAK,EAGL,cAAc,EACf,MAAM,gCAAgC,CAAC;AAGxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAMjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA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;;;OAGG;IACH,OAAO,CAAC,MAAM;IAoBd,OAAO,CAAC,SAAS;IAkCjB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,QAAQ;IAShB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,MAAM;IA8Dd;;;;OAIG;IACH,OAAO,CAAC,OAAO;IAQf;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAOtB;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAUtB,+EAA+E;IAC/E,OAAO,CAAC,cAAc;IAMtB,8EAA8E;IAC9E,OAAO,CAAC,KAAK;IAwCb,oFAAoF;IACpF,OAAO,CAAC,UAAU;IAQlB;;;OAGG;IACH,OAAO,CAAC,QAAQ;IAehB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IAgCjB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAMvB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,IAAI;IAIZ,gFAAgF;IAChF,OAAO,CAAC,gBAAgB;IAKxB,yFAAyF;IACzF,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,WAAW;CAGpB"}
|
package/dist/v2/session.js
CHANGED
|
@@ -518,6 +518,20 @@ export class V2Session {
|
|
|
518
518
|
if (heldTurn)
|
|
519
519
|
this.closeTurn();
|
|
520
520
|
}
|
|
521
|
+
/**
|
|
522
|
+
* Sets the initial values of a setup request's `configOptions` (see
|
|
523
|
+
* `SessionConfig.setInitial`), and has the reports follow the model they
|
|
524
|
+
* leave. It sends nothing, on a session that a `session/resume` found
|
|
525
|
+
* active too: the setup response carries the options to the connection
|
|
526
|
+
* that asked, and a session is active on one connection only.
|
|
527
|
+
*/
|
|
528
|
+
async setInitialConfigOptions(entries) {
|
|
529
|
+
if (entries.length === 0)
|
|
530
|
+
return;
|
|
531
|
+
await this.config.setInitial(entries);
|
|
532
|
+
// Nothing changes for the same model.
|
|
533
|
+
this.modelChangedReports();
|
|
534
|
+
}
|
|
521
535
|
async setConfigOption(params) {
|
|
522
536
|
await this.config.set(params);
|
|
523
537
|
if (params.configId === MODEL_CONFIG_ID)
|
package/package.json
CHANGED