@agentclientprotocol/claude-agent-acp 0.102.0 → 0.102.1-preview.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/acp-agent.d.ts +119 -439
- package/dist/acp-agent.d.ts.map +1 -1
- package/dist/acp-agent.js +380 -2412
- package/dist/acp-subagents.d.ts +1 -2
- package/dist/acp-subagents.d.ts.map +1 -1
- package/dist/auth-methods.d.ts +21 -0
- package/dist/auth-methods.d.ts.map +1 -0
- package/dist/auth-methods.js +68 -0
- package/dist/auth-status-reporter.d.ts +112 -0
- package/dist/auth-status-reporter.d.ts.map +1 -0
- package/dist/auth-status-reporter.js +253 -0
- package/dist/background-work.d.ts +12 -265
- package/dist/background-work.d.ts.map +1 -1
- package/dist/background-work.js +8 -558
- package/dist/client-system-prompt.d.ts +7 -0
- package/dist/client-system-prompt.d.ts.map +1 -1
- package/dist/client-system-prompt.js +24 -0
- package/dist/context-compaction.d.ts +20 -0
- package/dist/context-compaction.d.ts.map +1 -1
- package/dist/context-compaction.js +26 -0
- package/dist/context-window.d.ts +70 -0
- package/dist/context-window.d.ts.map +1 -0
- package/dist/context-window.js +132 -0
- package/dist/diff.d.ts +1 -1
- package/dist/diff.js +1 -1
- package/dist/elicitation.d.ts +66 -1
- package/dist/elicitation.d.ts.map +1 -1
- package/dist/elicitation.js +109 -0
- package/dist/file-change-audit.d.ts +4 -3
- package/dist/file-change-audit.d.ts.map +1 -1
- package/dist/file-change-audit.js +3 -2
- package/dist/mcp-oauth.d.ts +44 -0
- package/dist/mcp-oauth.d.ts.map +1 -0
- package/dist/mcp-oauth.js +142 -0
- package/dist/mcp-servers.d.ts +10 -0
- package/dist/mcp-servers.d.ts.map +1 -0
- package/dist/mcp-servers.js +29 -0
- package/dist/native-subagents.d.ts +18 -8
- package/dist/native-subagents.d.ts.map +1 -1
- package/dist/native-subagents.js +7 -35
- package/dist/permissions/presentation.d.ts +29 -0
- package/dist/permissions/presentation.d.ts.map +1 -1
- package/dist/permissions/presentation.js +38 -11
- package/dist/plans.d.ts +36 -6
- package/dist/plans.d.ts.map +1 -1
- package/dist/plans.js +49 -11
- package/dist/prompt-suggestions.d.ts +29 -0
- package/dist/prompt-suggestions.d.ts.map +1 -1
- package/dist/prompt-suggestions.js +45 -0
- package/dist/providers.d.ts +139 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +286 -0
- package/dist/remote-control.d.ts +62 -0
- package/dist/remote-control.d.ts.map +1 -0
- package/dist/remote-control.js +78 -0
- package/dist/result-end.d.ts +39 -0
- package/dist/result-end.d.ts.map +1 -0
- package/dist/result-end.js +50 -0
- package/dist/serve.d.ts +7 -2
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +10 -5
- package/dist/session-config-ids.d.ts +1 -0
- package/dist/session-config-ids.d.ts.map +1 -1
- package/dist/session-config-ids.js +1 -0
- package/dist/session-config-options.d.ts +64 -0
- package/dist/session-config-options.d.ts.map +1 -0
- package/dist/session-config-options.js +162 -0
- package/dist/session-effort.d.ts +67 -0
- package/dist/session-effort.d.ts.map +1 -1
- package/dist/session-effort.js +98 -0
- package/dist/session-env.d.ts +22 -0
- package/dist/session-env.d.ts.map +1 -0
- package/dist/session-env.js +66 -0
- package/dist/session-fast-mode.d.ts +83 -0
- package/dist/session-fast-mode.d.ts.map +1 -0
- package/dist/session-fast-mode.js +142 -0
- package/dist/session-index/connection.d.ts +2 -5
- package/dist/session-index/connection.d.ts.map +1 -1
- package/dist/session-index/connection.js +3 -5
- package/dist/session-mode.d.ts +1 -0
- package/dist/session-mode.d.ts.map +1 -1
- package/dist/session-mode.js +1 -1
- package/dist/session-model.d.ts +41 -0
- package/dist/session-model.d.ts.map +1 -1
- package/dist/session-model.js +110 -45
- package/dist/session-notices.d.ts +44 -0
- package/dist/session-notices.d.ts.map +1 -1
- package/dist/session-notices.js +68 -0
- package/dist/session-titles.d.ts +34 -12
- package/dist/session-titles.d.ts.map +1 -1
- package/dist/session-titles.js +7 -6
- package/dist/session-usage.d.ts +125 -0
- package/dist/session-usage.d.ts.map +1 -0
- package/dist/session-usage.js +196 -0
- package/dist/streamed-text.d.ts +33 -0
- package/dist/streamed-text.d.ts.map +1 -0
- package/dist/streamed-text.js +71 -0
- package/dist/subagent-configuration.d.ts +32 -0
- package/dist/subagent-configuration.d.ts.map +1 -0
- package/dist/subagent-configuration.js +70 -0
- package/dist/subagent-replay.d.ts +18 -0
- package/dist/subagent-replay.d.ts.map +1 -1
- package/dist/subagent-replay.js +25 -15
- package/dist/tool-calls/client-capabilities.d.ts +8 -8
- package/dist/tool-calls/client-capabilities.js +4 -4
- package/dist/tool-calls/renderer.d.ts +4 -5
- package/dist/tool-calls/renderer.d.ts.map +1 -1
- package/dist/tool-calls/renderer.js +4 -5
- package/dist/turn-events.d.ts +6 -46
- package/dist/turn-events.d.ts.map +1 -1
- package/dist/v2/agent.d.ts +7 -11
- package/dist/v2/agent.d.ts.map +1 -1
- package/dist/v2/agent.js +751 -331
- package/dist/v2/air.d.ts +33 -0
- package/dist/v2/air.d.ts.map +1 -0
- package/dist/v2/air.js +29 -0
- package/dist/v2/auth.d.ts +97 -0
- package/dist/v2/auth.d.ts.map +1 -0
- package/dist/v2/auth.js +216 -0
- package/dist/v2/background.d.ts +27 -16
- package/dist/v2/background.d.ts.map +1 -1
- package/dist/v2/background.js +4 -32
- package/dist/v2/child-config.d.ts +55 -0
- package/dist/v2/child-config.d.ts.map +1 -0
- package/dist/v2/child-config.js +92 -0
- package/dist/v2/clear-context.d.ts +94 -0
- package/dist/v2/clear-context.d.ts.map +1 -0
- package/dist/v2/clear-context.js +176 -0
- package/dist/v2/commands.d.ts +46 -0
- package/dist/v2/commands.d.ts.map +1 -0
- package/dist/v2/commands.js +54 -0
- package/dist/v2/config.d.ts +187 -0
- package/dist/v2/config.d.ts.map +1 -0
- package/dist/v2/config.js +494 -0
- package/dist/v2/elicitation.d.ts +93 -0
- package/dist/v2/elicitation.d.ts.map +1 -0
- package/dist/v2/elicitation.js +160 -0
- package/dist/v2/file-changes.d.ts +61 -0
- package/dist/v2/file-changes.d.ts.map +1 -0
- package/dist/v2/file-changes.js +108 -0
- package/dist/v2/file-preview.d.ts +18 -0
- package/dist/v2/file-preview.d.ts.map +1 -0
- package/dist/v2/file-preview.js +29 -0
- package/dist/v2/initialize.d.ts +10 -24
- package/dist/v2/initialize.d.ts.map +1 -1
- package/dist/v2/initialize.js +4 -111
- package/dist/v2/outcome.d.ts +81 -0
- package/dist/v2/outcome.d.ts.map +1 -0
- package/dist/v2/outcome.js +165 -0
- package/dist/v2/permissions.d.ts +92 -0
- package/dist/v2/permissions.d.ts.map +1 -0
- package/dist/v2/permissions.js +162 -0
- package/dist/v2/prompt.d.ts +2 -42
- package/dist/v2/prompt.d.ts.map +1 -1
- package/dist/v2/prompt.js +2 -119
- package/dist/v2/remote-control.d.ts +41 -0
- package/dist/v2/remote-control.d.ts.map +1 -0
- package/dist/v2/remote-control.js +63 -0
- package/dist/v2/reports.d.ts +198 -0
- package/dist/v2/reports.d.ts.map +1 -0
- package/dist/v2/reports.js +487 -0
- package/dist/v2/restarts.d.ts +128 -0
- package/dist/v2/restarts.d.ts.map +1 -0
- package/dist/v2/restarts.js +348 -0
- package/dist/v2/session-requests.d.ts +20 -0
- package/dist/v2/session-requests.d.ts.map +1 -0
- package/dist/v2/session-requests.js +108 -0
- package/dist/v2/session-update.d.ts +2 -13
- package/dist/v2/session-update.d.ts.map +1 -1
- package/dist/v2/session-update.js +2 -22
- package/dist/v2/session.d.ts +340 -41
- package/dist/v2/session.d.ts.map +1 -1
- package/dist/v2/session.js +1223 -141
- package/dist/v2/setup.d.ts +49 -0
- package/dist/v2/setup.d.ts.map +1 -0
- package/dist/v2/setup.js +62 -0
- package/dist/v2/stopped-work.d.ts +123 -0
- package/dist/v2/stopped-work.d.ts.map +1 -0
- package/dist/v2/stopped-work.js +210 -0
- package/dist/v2/stream.d.ts +228 -0
- package/dist/v2/stream.d.ts.map +1 -0
- package/dist/v2/stream.js +506 -0
- package/dist/v2/subagent-replay.d.ts +115 -0
- package/dist/v2/subagent-replay.d.ts.map +1 -0
- package/dist/v2/subagent-replay.js +479 -0
- package/dist/v2/subscription-guard.d.ts +60 -0
- package/dist/v2/subscription-guard.d.ts.map +1 -0
- package/dist/v2/subscription-guard.js +84 -0
- package/dist/v2/tasks.d.ts +492 -0
- package/dist/v2/tasks.d.ts.map +1 -0
- package/dist/v2/tasks.js +1728 -0
- package/dist/v2/terminal.d.ts.map +1 -1
- package/dist/v2/terminal.js +6 -1
- package/dist/v2/tool-call.d.ts +3 -2
- package/dist/v2/tool-call.d.ts.map +1 -1
- package/dist/v2/update-translator.d.ts +36 -0
- package/dist/v2/update-translator.d.ts.map +1 -0
- package/dist/v2/update-translator.js +80 -0
- package/dist/workflow-progress.d.ts +23 -0
- package/dist/workflow-progress.d.ts.map +1 -1
- package/dist/workflow-progress.js +31 -8
- package/package.json +1 -1
- package/dist/v2/permission.d.ts +0 -28
- package/dist/v2/permission.d.ts.map +0 -1
- package/dist/v2/permission.js +0 -41
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session options that come from the agent's environment, shared by the v1
|
|
3
|
+
* core and the v2 core.
|
|
4
|
+
*/
|
|
5
|
+
import * as fs from "node:fs/promises";
|
|
6
|
+
import * as path from "node:path";
|
|
7
|
+
/** Translate the legacy `MAX_THINKING_TOKENS` env var, plus the optional
|
|
8
|
+
* `CLAUDE_CODE_THINKING_DISPLAY` env var, into the SDK's `thinking` option.
|
|
9
|
+
* The `maxThinkingTokens` option it used to feed is deprecated and reduced
|
|
10
|
+
* to on/off on current models, so map the value to explicit thinking config
|
|
11
|
+
* instead: unset → `undefined` (SDK default, adaptive on models that support
|
|
12
|
+
* it) unless a display mode is requested, in which case it becomes explicit
|
|
13
|
+
* `adaptive`; `0` → disabled; a positive integer → a fixed token budget.
|
|
14
|
+
* Anything else is ignored with a warning. `CLAUDE_CODE_THINKING_DISPLAY`
|
|
15
|
+
* must be `summarized` or `omitted`; it has no effect when thinking is
|
|
16
|
+
* disabled. */
|
|
17
|
+
export function resolveThinkingConfig(rawTokens, rawDisplay, logger) {
|
|
18
|
+
let display;
|
|
19
|
+
if (rawDisplay !== undefined) {
|
|
20
|
+
if (rawDisplay === "summarized" || rawDisplay === "omitted") {
|
|
21
|
+
display = rawDisplay;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
logger.error(`Ignoring CLAUDE_CODE_THINKING_DISPLAY: expected 'summarized' or 'omitted', got '${rawDisplay}'.`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (rawTokens === undefined) {
|
|
28
|
+
return display ? { type: "adaptive", display } : undefined;
|
|
29
|
+
}
|
|
30
|
+
const parsed = Number.parseInt(rawTokens, 10);
|
|
31
|
+
if (Number.isNaN(parsed) || parsed < 0) {
|
|
32
|
+
logger.error(`Ignoring MAX_THINKING_TOKENS: expected a non-negative integer, got '${rawTokens}'.`);
|
|
33
|
+
return display ? { type: "adaptive", display } : undefined;
|
|
34
|
+
}
|
|
35
|
+
return parsed === 0
|
|
36
|
+
? { type: "disabled" }
|
|
37
|
+
: { type: "enabled", budgetTokens: parsed, ...(display && { display }) };
|
|
38
|
+
}
|
|
39
|
+
/** The `CLAUDE_MODEL_CONFIG` JSON: Bedrock model overrides and an allowlist, say. */
|
|
40
|
+
function parseModelConfig(raw) {
|
|
41
|
+
if (!raw)
|
|
42
|
+
return undefined;
|
|
43
|
+
const parsed = JSON.parse(raw);
|
|
44
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
45
|
+
throw new Error("CLAUDE_MODEL_CONFIG must be a JSON object");
|
|
46
|
+
}
|
|
47
|
+
const result = {};
|
|
48
|
+
if (parsed.modelOverrides !== undefined)
|
|
49
|
+
result.modelOverrides = parsed.modelOverrides;
|
|
50
|
+
if (parsed.availableModels !== undefined)
|
|
51
|
+
result.availableModels = parsed.availableModels;
|
|
52
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The programmatic settings of a session, before the provider routing: the
|
|
56
|
+
* models of `CLAUDE_MODEL_CONFIG`, then the client's `settings` option, an
|
|
57
|
+
* object or a file path relative to `cwd`. Throws for a `CLAUDE_MODEL_CONFIG`
|
|
58
|
+
* that is no JSON object, before it reads the file.
|
|
59
|
+
*/
|
|
60
|
+
export async function configuredSettings(provided, cwd) {
|
|
61
|
+
const modelConfig = parseModelConfig(process.env.CLAUDE_MODEL_CONFIG);
|
|
62
|
+
const object = typeof provided === "string"
|
|
63
|
+
? JSON.parse(await fs.readFile(path.resolve(cwd, provided), "utf8"))
|
|
64
|
+
: provided;
|
|
65
|
+
return modelConfig ? { ...modelConfig, ...object } : object;
|
|
66
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { SessionConfigOption, SetSessionConfigOptionRequest } from "@agentclientprotocol/sdk/unstable";
|
|
2
|
+
import type { FastModeDisabledReason, FastModeState } from "@anthropic-ai/claude-agent-sdk";
|
|
3
|
+
export declare const FAST_MODE_CONFIG_ID = "fast";
|
|
4
|
+
/** Select-fallback values used when the client has not opted into boolean
|
|
5
|
+
* config options (see {@link createFastModeConfigOption}). */
|
|
6
|
+
export declare const FAST_MODE_ON = "on";
|
|
7
|
+
export declare const FAST_MODE_OFF = "off";
|
|
8
|
+
/** Map the SDK's tri-state `fast_mode_state` onto the boolean config toggle.
|
|
9
|
+
* `cooldown` (fast mode temporarily suspended after a rate limit, per the SDK
|
|
10
|
+
* docs) keeps the toggle on so it reflects the user's intent — only an
|
|
11
|
+
* explicit `off` clears it. */
|
|
12
|
+
export declare function fastModeStateEnabled(state: FastModeState): boolean;
|
|
13
|
+
/** Normalize an SDK-reported `fast_mode_disabled_reason` to the one we retain:
|
|
14
|
+
* a reason we have an explanation for, else `undefined`. Keeping only
|
|
15
|
+
* explainable reasons means state comparisons (see `fastModeStateChange`) track
|
|
16
|
+
* exactly what the user can see, so routine reports like
|
|
17
|
+
* `sdk_opt_in_required` never churn the config option. */
|
|
18
|
+
export declare function normalizeFastModeDisabledReason(reason: FastModeDisabledReason | undefined): FastModeDisabledReason | undefined;
|
|
19
|
+
/** Build the Fast mode config option. When the Client supports boolean config
|
|
20
|
+
* options we expose a native `type: "boolean"` toggle; otherwise we degrade to
|
|
21
|
+
* a two-value `select` ("on"/"off") so older Clients still get a usable
|
|
22
|
+
* control.
|
|
23
|
+
*
|
|
24
|
+
* `disabledReason` (the SDK's `fast_mode_disabled_reason`) is folded into the
|
|
25
|
+
* description while the toggle reads off, so a user whose account or provider
|
|
26
|
+
* can't serve Fast mode sees why instead of a switch that silently refuses to
|
|
27
|
+
* stay on. Ignored while enabled: a reason reported alongside an `on`/`cooldown`
|
|
28
|
+
* state isn't blocking anything right now. */
|
|
29
|
+
export declare function createFastModeConfigOption(enabled: boolean, useBooleanOption: boolean, disabledReason?: FastModeDisabledReason): SessionConfigOption;
|
|
30
|
+
/** Resolve the requested Fast mode value from a `session/set_config_option`
|
|
31
|
+
* request. Accepts a native boolean (boolean-capable Clients) or the
|
|
32
|
+
* "on"/"off" select-fallback strings. */
|
|
33
|
+
export declare function resolveFastModeEnabled(params: SetSessionConfigOptionRequest): boolean;
|
|
34
|
+
/** Per-model Fast mode state threaded into `buildConfigOptions`. The
|
|
35
|
+
* option is only surfaced when the current model `supported`s fast mode. */
|
|
36
|
+
export type FastModeOptionState = {
|
|
37
|
+
supported: boolean;
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
/** Whether the Client opted into boolean config options. */
|
|
40
|
+
useBooleanOption: boolean;
|
|
41
|
+
/** Latest explainable `fast_mode_disabled_reason`, folded into the option's
|
|
42
|
+
* description while the toggle reads off. */
|
|
43
|
+
disabledReason?: FastModeDisabledReason;
|
|
44
|
+
};
|
|
45
|
+
/** What a reported `fast_mode_state` changes in a Fast mode toggle that the
|
|
46
|
+
* current model shows. The SDK can flip fast mode independently of the
|
|
47
|
+
* user — e.g. back to `on` once a rate-limit `cooldown` clears — so
|
|
48
|
+
* definitive on/off changes are mirrored into the option.
|
|
49
|
+
*
|
|
50
|
+
* Undefined when nothing changes: an absent state, a `cooldown` (a transient
|
|
51
|
+
* suspension of an already-enabled fast mode: the toggle stays as-is rather
|
|
52
|
+
* than flapping, and a stray cooldown never enables a toggle the user has
|
|
53
|
+
* off), or the same state with the same explainable reason.
|
|
54
|
+
*
|
|
55
|
+
* `reason` is the SDK's `fast_mode_disabled_reason`, reported alongside the
|
|
56
|
+
* state. Only explainable reasons are retained (see
|
|
57
|
+
* {@link normalizeFastModeDisabledReason}), so a routine
|
|
58
|
+
* `sdk_opt_in_required` report on every turn's result can't churn the
|
|
59
|
+
* option, while a real blocker updates the description even when the
|
|
60
|
+
* toggle's own value is unchanged.
|
|
61
|
+
*
|
|
62
|
+
* `notice` is set when the user had Fast mode on and the SDK turned it off
|
|
63
|
+
* for an explainable reason: the description carries the same explanation,
|
|
64
|
+
* but a toggle silently snapping back is worth saying out loud once. */
|
|
65
|
+
export declare function fastModeStateChange(current: {
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
disabledReason?: FastModeDisabledReason;
|
|
68
|
+
}, state: FastModeState | undefined, reason: FastModeDisabledReason | undefined): {
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
disabledReason?: FastModeDisabledReason;
|
|
71
|
+
notice?: FastModeOffNotice;
|
|
72
|
+
} | undefined;
|
|
73
|
+
/** The notice of Fast mode that the SDK turned off, and its transcript line
|
|
74
|
+
* for a client without `notice` updates. */
|
|
75
|
+
export type FastModeOffNotice = {
|
|
76
|
+
notice: {
|
|
77
|
+
severity: "warning";
|
|
78
|
+
title: string;
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
transcript: string;
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=session-fast-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-fast-mode.d.ts","sour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O,CAAC;IAAC,cAAc,CAAC,EAAE,sBAAsB,CAAC;IAAC,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAAE,GACzF,SAAS,CAwBZ;AAED;6CAC6C;AAC7C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE;QAAE,QAAQ,EAAE,SAAS,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IACpE,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Fast mode toggle of a session: its config option, the value a
|
|
3
|
+
* `session/set_config_option` request sets, and the state Claude Code reports
|
|
4
|
+
* (`fast_mode_state` and `fast_mode_disabled_reason`, on `system`/init and on
|
|
5
|
+
* results). Shared by the v1 core and the v2 core.
|
|
6
|
+
*/
|
|
7
|
+
import { RequestError } from "@agentclientprotocol/sdk/unstable";
|
|
8
|
+
import { sentenceCase } from "./session-notices.js";
|
|
9
|
+
export const FAST_MODE_CONFIG_ID = "fast";
|
|
10
|
+
/** Select-fallback values used when the client has not opted into boolean
|
|
11
|
+
* config options (see {@link createFastModeConfigOption}). */
|
|
12
|
+
export const FAST_MODE_ON = "on";
|
|
13
|
+
export const FAST_MODE_OFF = "off";
|
|
14
|
+
const FAST_MODE_DESCRIPTION = "Faster responses on supported models";
|
|
15
|
+
/** Map the SDK's tri-state `fast_mode_state` onto the boolean config toggle.
|
|
16
|
+
* `cooldown` (fast mode temporarily suspended after a rate limit, per the SDK
|
|
17
|
+
* docs) keeps the toggle on so it reflects the user's intent — only an
|
|
18
|
+
* explicit `off` clears it. */
|
|
19
|
+
export function fastModeStateEnabled(state) {
|
|
20
|
+
return state !== "off";
|
|
21
|
+
}
|
|
22
|
+
/** User-facing explanations for the SDK's `fast_mode_disabled_reason` values
|
|
23
|
+
* that a user can act on (or at least wants to know about). Deliberately
|
|
24
|
+
* partial — the omitted reasons are not worth surfacing:
|
|
25
|
+
* - `sdk_opt_in_required`: every SDK session starts here (the toggle IS the
|
|
26
|
+
* opt-in), so it describes the default, not a problem.
|
|
27
|
+
* - `preference`: the user turned Fast mode off themselves.
|
|
28
|
+
* - `pending`: eligibility is still resolving; the next report supersedes it.
|
|
29
|
+
* - `unknown`: nothing meaningful to say.
|
|
30
|
+
* Unknown future reasons fall through the same way (open set — the SDK's docs
|
|
31
|
+
* say to ignore values you don't handle). */
|
|
32
|
+
const FAST_MODE_UNAVAILABLE_EXPLANATIONS = {
|
|
33
|
+
free: "not available on the free plan",
|
|
34
|
+
extra_usage_disabled: "requires extra usage to be enabled for this account",
|
|
35
|
+
model_not_allowed: "not available for the selected model",
|
|
36
|
+
not_first_party: "not available on this API provider",
|
|
37
|
+
disabled_by_env: "disabled by environment configuration",
|
|
38
|
+
network_error: "eligibility could not be verified (network error)",
|
|
39
|
+
};
|
|
40
|
+
/** Normalize an SDK-reported `fast_mode_disabled_reason` to the one we retain:
|
|
41
|
+
* a reason we have an explanation for, else `undefined`. Keeping only
|
|
42
|
+
* explainable reasons means state comparisons (see `fastModeStateChange`) track
|
|
43
|
+
* exactly what the user can see, so routine reports like
|
|
44
|
+
* `sdk_opt_in_required` never churn the config option. */
|
|
45
|
+
export function normalizeFastModeDisabledReason(reason) {
|
|
46
|
+
return reason && FAST_MODE_UNAVAILABLE_EXPLANATIONS[reason] ? reason : undefined;
|
|
47
|
+
}
|
|
48
|
+
/** Build the Fast mode config option. When the Client supports boolean config
|
|
49
|
+
* options we expose a native `type: "boolean"` toggle; otherwise we degrade to
|
|
50
|
+
* a two-value `select` ("on"/"off") so older Clients still get a usable
|
|
51
|
+
* control.
|
|
52
|
+
*
|
|
53
|
+
* `disabledReason` (the SDK's `fast_mode_disabled_reason`) is folded into the
|
|
54
|
+
* description while the toggle reads off, so a user whose account or provider
|
|
55
|
+
* can't serve Fast mode sees why instead of a switch that silently refuses to
|
|
56
|
+
* stay on. Ignored while enabled: a reason reported alongside an `on`/`cooldown`
|
|
57
|
+
* state isn't blocking anything right now. */
|
|
58
|
+
export function createFastModeConfigOption(enabled, useBooleanOption, disabledReason) {
|
|
59
|
+
const explanation = enabled
|
|
60
|
+
? undefined
|
|
61
|
+
: disabledReason && FAST_MODE_UNAVAILABLE_EXPLANATIONS[disabledReason];
|
|
62
|
+
const base = {
|
|
63
|
+
id: FAST_MODE_CONFIG_ID,
|
|
64
|
+
name: "Fast mode",
|
|
65
|
+
description: explanation ? `${FAST_MODE_DESCRIPTION} — ${explanation}` : FAST_MODE_DESCRIPTION,
|
|
66
|
+
category: "model_config",
|
|
67
|
+
};
|
|
68
|
+
if (useBooleanOption) {
|
|
69
|
+
return { ...base, type: "boolean", currentValue: enabled };
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
...base,
|
|
73
|
+
type: "select",
|
|
74
|
+
currentValue: enabled ? FAST_MODE_ON : FAST_MODE_OFF,
|
|
75
|
+
options: [
|
|
76
|
+
{ value: FAST_MODE_ON, name: "On" },
|
|
77
|
+
{ value: FAST_MODE_OFF, name: "Off" },
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/** Resolve the requested Fast mode value from a `session/set_config_option`
|
|
82
|
+
* request. Accepts a native boolean (boolean-capable Clients) or the
|
|
83
|
+
* "on"/"off" select-fallback strings. */
|
|
84
|
+
export function resolveFastModeEnabled(params) {
|
|
85
|
+
const value = params.value;
|
|
86
|
+
if (typeof value === "boolean") {
|
|
87
|
+
return value;
|
|
88
|
+
}
|
|
89
|
+
if (value === FAST_MODE_ON) {
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
if (value === FAST_MODE_OFF) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
throw RequestError.invalidParams(undefined, `Invalid value for config option ${FAST_MODE_CONFIG_ID}: ${value}`);
|
|
96
|
+
}
|
|
97
|
+
/** What a reported `fast_mode_state` changes in a Fast mode toggle that the
|
|
98
|
+
* current model shows. The SDK can flip fast mode independently of the
|
|
99
|
+
* user — e.g. back to `on` once a rate-limit `cooldown` clears — so
|
|
100
|
+
* definitive on/off changes are mirrored into the option.
|
|
101
|
+
*
|
|
102
|
+
* Undefined when nothing changes: an absent state, a `cooldown` (a transient
|
|
103
|
+
* suspension of an already-enabled fast mode: the toggle stays as-is rather
|
|
104
|
+
* than flapping, and a stray cooldown never enables a toggle the user has
|
|
105
|
+
* off), or the same state with the same explainable reason.
|
|
106
|
+
*
|
|
107
|
+
* `reason` is the SDK's `fast_mode_disabled_reason`, reported alongside the
|
|
108
|
+
* state. Only explainable reasons are retained (see
|
|
109
|
+
* {@link normalizeFastModeDisabledReason}), so a routine
|
|
110
|
+
* `sdk_opt_in_required` report on every turn's result can't churn the
|
|
111
|
+
* option, while a real blocker updates the description even when the
|
|
112
|
+
* toggle's own value is unchanged.
|
|
113
|
+
*
|
|
114
|
+
* `notice` is set when the user had Fast mode on and the SDK turned it off
|
|
115
|
+
* for an explainable reason: the description carries the same explanation,
|
|
116
|
+
* but a toggle silently snapping back is worth saying out loud once. */
|
|
117
|
+
export function fastModeStateChange(current, state, reason) {
|
|
118
|
+
if (state === undefined || state === "cooldown")
|
|
119
|
+
return undefined;
|
|
120
|
+
const enabled = state === "on";
|
|
121
|
+
// A reason only describes an off state; drop any that rides an `on` report
|
|
122
|
+
// so it can't decorate the option the next time fast mode goes off.
|
|
123
|
+
const disabledReason = enabled ? undefined : normalizeFastModeDisabledReason(reason);
|
|
124
|
+
if (enabled === current.enabled && disabledReason === current.disabledReason)
|
|
125
|
+
return undefined;
|
|
126
|
+
const explanation = disabledReason !== undefined ? FAST_MODE_UNAVAILABLE_EXPLANATIONS[disabledReason] : undefined;
|
|
127
|
+
if (!current.enabled || enabled || explanation === undefined) {
|
|
128
|
+
return { enabled, disabledReason };
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
enabled,
|
|
132
|
+
disabledReason,
|
|
133
|
+
notice: {
|
|
134
|
+
notice: {
|
|
135
|
+
severity: "warning",
|
|
136
|
+
title: "Fast mode turned off",
|
|
137
|
+
description: `${sentenceCase(explanation)}.`,
|
|
138
|
+
},
|
|
139
|
+
transcript: `**Fast mode turned off:** ${explanation}.`,
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
}
|
|
@@ -60,11 +60,8 @@ export declare class SessionIndexConnection {
|
|
|
60
60
|
/** When the query of a session failed here, by session id. */
|
|
61
61
|
private readonly failedQueries;
|
|
62
62
|
constructor(host: SessionIndexHost);
|
|
63
|
-
/** Sets the index up for the client of `initialize`.
|
|
64
|
-
|
|
65
|
-
negotiate(request: InitializeRequest, options: {
|
|
66
|
-
v2: boolean;
|
|
67
|
-
}): void;
|
|
63
|
+
/** Sets the index up for the client of `initialize`. */
|
|
64
|
+
negotiate(request: InitializeRequest): void;
|
|
68
65
|
/** A stored title as the client shows it: an AIR client gets the title
|
|
69
66
|
* of an archived session without the archive prefix, as in its list;
|
|
70
67
|
* every other client the title as stored. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../src/session-index/connection.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EAC1B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAalE,OAAO,EAML,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAYL,mBAAmB,EACnB,KAAK,oBAAoB,EAEzB,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAC;AAEtB,sDAAsD;AAC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IACrF,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACnF,sBAAsB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAC/E,kBAAkB,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACzE,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACjE,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CACpE,CAAC;AAEF;sEACsE;AACtE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,GAAG,QAAQ,CAgChG"}
|
|
@@ -34,13 +34,11 @@ export class SessionIndexConnection {
|
|
|
34
34
|
constructor(host) {
|
|
35
35
|
this.host = host;
|
|
36
36
|
}
|
|
37
|
-
/** Sets the index up for the client of `initialize`.
|
|
38
|
-
|
|
39
|
-
negotiate(request, options) {
|
|
37
|
+
/** Sets the index up for the client of `initialize`. */
|
|
38
|
+
negotiate(request) {
|
|
40
39
|
this.service?.dispose();
|
|
41
40
|
this.service = undefined;
|
|
42
|
-
if (
|
|
43
|
-
this.host.isAirClient() &&
|
|
41
|
+
if (this.host.isAirClient() &&
|
|
44
42
|
clientSupportsAirCapability(request.clientCapabilities, AIR_SESSION_INDEX_CAPABILITY)) {
|
|
45
43
|
this.service = new SessionIndexService({
|
|
46
44
|
ownSessionState: (sessionId) => this.ownSessionState(sessionId),
|
package/dist/session-mode.d.ts
CHANGED
|
@@ -102,5 +102,6 @@ export declare class SessionModeManager<S extends SessionMode> {
|
|
|
102
102
|
private parseMode;
|
|
103
103
|
private trySyncMode;
|
|
104
104
|
}
|
|
105
|
+
export declare function buildAvailableModes({ allowBypass, allowAuto }: ModeAvailability, air?: boolean): SessionModeState["availableModes"];
|
|
105
106
|
export {};
|
|
106
107
|
//# sourceMappingURL=session-mode.d.ts.map
|
|
@@ -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,yBAAyB,CAAC,CAAC,SAAS,WAAW,IAAI;IAC7D,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IAC7C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtF,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,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B;IAS1B,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,SAAS;YAcH,WAAW;CAW1B;AAED,wBAAgB,mBAAmB,CACjC,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,gBAAgB,EAC5C,GAAG,UAAQ,GACV,gBAAgB,CAAC,gBAAgB,CAAC,CA2CpC"}
|
package/dist/session-mode.js
CHANGED
|
@@ -261,7 +261,7 @@ export class SessionModeManager {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
function buildAvailableModes({ allowBypass, allowAuto }, air = false) {
|
|
264
|
+
export function buildAvailableModes({ allowBypass, allowAuto }, air = false) {
|
|
265
265
|
// Only AIR gets the mode kind.
|
|
266
266
|
const kind = (value) => {
|
|
267
267
|
const meta = airOnlyMeta(air, AIR_KIND_KEY, value);
|
package/dist/session-model.d.ts
CHANGED
|
@@ -16,6 +16,18 @@ type ModelLogger = {
|
|
|
16
16
|
type ModelSettingsSource = {
|
|
17
17
|
getSettings(): Settings;
|
|
18
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* The entry of `models` that `preference` names, or null when it names none.
|
|
21
|
+
* `best` names the entry `opus` resolves to, unless an entry's value is `best`.
|
|
22
|
+
* In order: an entry whose value, display name or `resolvedModel` equals it
|
|
23
|
+
* (in either context-hint spelling); an entry whose value or display name
|
|
24
|
+
* contains its words ("opus" for "claude-opus-4-5"), or whose value it
|
|
25
|
+
* contains while every model word of the preference is the entry's
|
|
26
|
+
* ("sonnet" for "us.anthropic.claude-sonnet-5-v1:0"); then any entry with all
|
|
27
|
+
* of its model words, preferring one with the same context hint ("sonnet[1m]"
|
|
28
|
+
* for "claude-sonnet-5-1m"). The fuzzy tiers need a compatible version, and
|
|
29
|
+
* words match whole: "not-a-model", "son" and "foo-sonnet" name no entry.
|
|
30
|
+
*/
|
|
19
31
|
export declare function resolveModelPreference(models: ModelInfo[], preference: string): ModelInfo | null;
|
|
20
32
|
export declare function matchResumedModel(models: ModelInfo[], liveModel: string): ModelInfo;
|
|
21
33
|
export declare function buildModelConfigOption(models: SessionModelState, modelInfos: ModelInfo[], useRecommendedValue: boolean): SessionConfigOption;
|
|
@@ -88,6 +100,35 @@ export declare function applyAvailableModelsAllowlist(sdkModels: ModelInfo[], al
|
|
|
88
100
|
* models, and nothing is left: the session offers no model.
|
|
89
101
|
*/
|
|
90
102
|
export declare function narrowToGatewayModels(models: ModelInfo[], listedModelIds: readonly string[], regionPrefix?: string): ModelInfo[];
|
|
103
|
+
/**
|
|
104
|
+
* The capabilities of the session's current model, and the model infos that
|
|
105
|
+
* every later lookup reads.
|
|
106
|
+
*
|
|
107
|
+
* A resumed session can be running a model outside the `availableModels`
|
|
108
|
+
* allowlist (currentModelId is then the verbatim live id, see
|
|
109
|
+
* `matchResumedModel`); its capabilities are still known to the SDK's
|
|
110
|
+
* unfiltered list, so they are resolved from that before the model is treated
|
|
111
|
+
* as unknown — otherwise auto mode would be spuriously clamped and the
|
|
112
|
+
* Fast-mode/Effort options hidden for a model that supports them.
|
|
113
|
+
*
|
|
114
|
+
* The fallback-resolved capabilities are registered under the verbatim live
|
|
115
|
+
* id, so every modelInfos consumer (the effort option, later rebuilds) agrees
|
|
116
|
+
* with that gating. `buildModelConfigOption` lists this model as its own
|
|
117
|
+
* entry while it is current and drops it once the user switches to a listed
|
|
118
|
+
* model; it is never added to `availableModels`. The spread keeps every
|
|
119
|
+
* capability flag (current and future); the identity fields are overridden
|
|
120
|
+
* because the fuzzy-matched sibling's resolvedModel/displayName/description
|
|
121
|
+
* can describe a different context lane and would poison later resolvedModel
|
|
122
|
+
* matching (a model switch that the adapter did not make) and context-window
|
|
123
|
+
* inference if they traveled under this id. `allowlistedModelInfo` is the
|
|
124
|
+
* allowlisted entry alone, the only one whose identity strings are a
|
|
125
|
+
* trustworthy window signal.
|
|
126
|
+
*/
|
|
127
|
+
export declare function withCurrentModelInfo(allowedModels: ModelInfo[], sdkModels: ModelInfo[], currentModelId: string): {
|
|
128
|
+
allowlistedModelInfo: ModelInfo | undefined;
|
|
129
|
+
currentModelInfo: ModelInfo | undefined;
|
|
130
|
+
modelInfos: ModelInfo[];
|
|
131
|
+
};
|
|
91
132
|
export declare function getAvailableModels(query: Query, models: ModelInfo[], sdkModels: ModelInfo[], settingsManager: ModelSettingsSource, logger: ModelLogger, isResumedSession: boolean, sessionId: string, resumedModelHint?: string, narrowedByGateway?: boolean): Promise<SessionModelState>;
|
|
92
133
|
/** The display name of the model id `model` in `modelInfos`, if it is there. */
|
|
93
134
|
export declare function modelDisplayName(modelInfos: ModelInfo[], model: string): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-model.d.ts","sourceRoot":"","sources":["../src/session-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIjF,eAAO,MAAM,eAAe,UAAU,CAAC;AAEvC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChF,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACrC,CAAC;AACF,KAAK,mBAAmB,GAAG;IAAE,WAAW,IAAI,QAAQ,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"session-model.d.ts","sourceRoot":"","sources":["../src/session-model.ts"],"names":[],"mappings":"AAAA,OAAO,K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