@eddyskywalker/dsh-chatgpt-subscription 0.80.4 → 0.81.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/CHANGELOG.md +69 -0
- package/README.md +17 -7
- package/lib/aws-quick-mcp.js +54 -0
- package/lib/client.js +4232 -2203
- package/lib/client.js.map +1 -1
- package/lib/entry-plan-mode-pipeline-BCAZPcOz.js +433 -0
- package/lib/entry-tool-result-pruner-DY67oa5d.js +545 -0
- package/lib/index.js +53741 -47455
- package/lib/plan-mode-pipeline.js +1 -432
- package/lib/tool-result-pruner.js +1 -404
- package/lib/types/client/aws-quick/AwsQuickSection.d.ts +8 -0
- package/lib/types/client/aws-quick/AwsQuickSection.d.ts.map +1 -0
- package/lib/types/client/aws-quick/api.d.ts +11 -0
- package/lib/types/client/aws-quick/api.d.ts.map +1 -0
- package/lib/types/client/aws-quick/locales.d.ts +117 -0
- package/lib/types/client/aws-quick/locales.d.ts.map +1 -0
- package/lib/types/client/aws-quick/styles.d.ts +2 -0
- package/lib/types/client/aws-quick/styles.d.ts.map +1 -0
- package/lib/types/client/claude/ClaudeSection.d.ts.map +1 -1
- package/lib/types/client/claude/locales.d.ts +17 -5
- package/lib/types/client/claude/locales.d.ts.map +1 -1
- package/lib/types/client/claude/useClaudeSection.d.ts +2 -0
- package/lib/types/client/claude/useClaudeSection.d.ts.map +1 -1
- package/lib/types/client/claude-api/ClaudeApiSection.d.ts +5 -0
- package/lib/types/client/claude-api/ClaudeApiSection.d.ts.map +1 -0
- package/lib/types/client/claude-api/api.d.ts +23 -0
- package/lib/types/client/claude-api/api.d.ts.map +1 -0
- package/lib/types/client/claude-api/locales.d.ts +161 -0
- package/lib/types/client/claude-api/locales.d.ts.map +1 -0
- package/lib/types/client/claude-api/styles.d.ts +4 -0
- package/lib/types/client/claude-api/styles.d.ts.map +1 -0
- package/lib/types/client/claude-api/useClaudeApiSection.d.ts +37 -0
- package/lib/types/client/claude-api/useClaudeApiSection.d.ts.map +1 -0
- package/lib/types/client/command-code/locales.d.ts +2 -2
- package/lib/types/client/glm-coding-plan/locales.d.ts +2 -2
- package/lib/types/client/hub/HubOverview.d.ts +2 -0
- package/lib/types/client/hub/HubOverview.d.ts.map +1 -1
- package/lib/types/client/hub/brand-icons.d.ts +1 -1
- package/lib/types/client/hub/brand-icons.d.ts.map +1 -1
- package/lib/types/client/hub/hub-styles.d.ts.map +1 -1
- package/lib/types/client/hub/providers.d.ts +3 -0
- package/lib/types/client/hub/providers.d.ts.map +1 -1
- package/lib/types/client/index.d.ts +4 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
- package/lib/types/client/kimi-code/locales.d.ts +29 -2
- package/lib/types/client/kimi-code/locales.d.ts.map +1 -1
- package/lib/types/client/kimi-code/styles.d.ts.map +1 -1
- package/lib/types/client/locales-ru/aws-quick.d.ts +3 -0
- package/lib/types/client/locales-ru/aws-quick.d.ts.map +1 -0
- package/lib/types/client/locales-ru/claude-api.d.ts +3 -0
- package/lib/types/client/locales-ru/claude-api.d.ts.map +1 -0
- package/lib/types/client/locales-ru/claude.d.ts.map +1 -1
- package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
- package/lib/types/client/locales-ru/index.d.ts.map +1 -1
- package/lib/types/client/locales-ru/kimi-code.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +21 -3
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/minimax-code/locales.d.ts +2 -2
- package/lib/types/client/progress-updates/locales.d.ts +3 -3
- package/lib/types/client/qianwen-token-plan/locales.d.ts +1 -1
- package/lib/types/client/qoder/locales.d.ts +1 -1
- package/lib/types/client/relayone/locales.d.ts +1 -1
- package/lib/types/client/step-code/locales.d.ts +2 -2
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/entry-tool-result-pruner.d.ts.map +1 -1
- package/lib/types/host/antigravity-acp/adapter.d.ts +9 -0
- package/lib/types/host/antigravity-acp/adapter.d.ts.map +1 -1
- package/lib/types/host/antigravity-acp/catalog.d.ts.map +1 -1
- package/lib/types/host/antigravity-acp/types.d.ts +27 -5
- package/lib/types/host/antigravity-acp/types.d.ts.map +1 -1
- package/lib/types/host/aws-quick/adapter.d.ts +35 -0
- package/lib/types/host/aws-quick/adapter.d.ts.map +1 -0
- package/lib/types/host/aws-quick/binary.d.ts +3 -0
- package/lib/types/host/aws-quick/binary.d.ts.map +1 -0
- package/lib/types/host/aws-quick/client.d.ts +76 -0
- package/lib/types/host/aws-quick/client.d.ts.map +1 -0
- package/lib/types/host/aws-quick/execution-broker.d.ts +25 -0
- package/lib/types/host/aws-quick/execution-broker.d.ts.map +1 -0
- package/lib/types/host/aws-quick/images.d.ts +21 -0
- package/lib/types/host/aws-quick/images.d.ts.map +1 -0
- package/lib/types/host/aws-quick/outpost.d.ts +55 -0
- package/lib/types/host/aws-quick/outpost.d.ts.map +1 -0
- package/lib/types/host/aws-quick/protocol.d.ts +34 -0
- package/lib/types/host/aws-quick/protocol.d.ts.map +1 -0
- package/lib/types/host/aws-quick/routes.d.ts +15 -0
- package/lib/types/host/aws-quick/routes.d.ts.map +1 -0
- package/lib/types/host/aws-quick/settings.d.ts +24 -0
- package/lib/types/host/aws-quick/settings.d.ts.map +1 -0
- package/lib/types/host/aws-quick/tool-bridge.d.ts +39 -0
- package/lib/types/host/aws-quick/tool-bridge.d.ts.map +1 -0
- package/lib/types/host/aws-quick/types.d.ts +12 -0
- package/lib/types/host/aws-quick/types.d.ts.map +1 -0
- package/lib/types/host/claude/adapter.d.ts +19 -1
- package/lib/types/host/claude/adapter.d.ts.map +1 -1
- package/lib/types/host/claude/client.d.ts +22 -20
- package/lib/types/host/claude/client.d.ts.map +1 -1
- package/lib/types/host/claude/mapper.d.ts +37 -16
- package/lib/types/host/claude/mapper.d.ts.map +1 -1
- package/lib/types/host/claude/model-catalog.d.ts +9 -1
- package/lib/types/host/claude/model-catalog.d.ts.map +1 -1
- package/lib/types/host/claude/routes.d.ts +3 -0
- package/lib/types/host/claude/routes.d.ts.map +1 -1
- package/lib/types/host/claude/token-store.d.ts +10 -0
- package/lib/types/host/claude/token-store.d.ts.map +1 -1
- package/lib/types/host/claude/types.d.ts +2 -2
- package/lib/types/host/claude/types.d.ts.map +1 -1
- package/lib/types/host/claude-api/adapter.d.ts +74 -0
- package/lib/types/host/claude-api/adapter.d.ts.map +1 -0
- package/lib/types/host/claude-api/capability-memory.d.ts +4 -0
- package/lib/types/host/claude-api/capability-memory.d.ts.map +1 -0
- package/lib/types/host/claude-api/catalog-manager.d.ts +57 -0
- package/lib/types/host/claude-api/catalog-manager.d.ts.map +1 -0
- package/lib/types/host/claude-api/client-version.d.ts +4 -0
- package/lib/types/host/claude-api/client-version.d.ts.map +1 -0
- package/lib/types/host/claude-api/client.d.ts +55 -0
- package/lib/types/host/claude-api/client.d.ts.map +1 -0
- package/lib/types/host/claude-api/compaction-store.d.ts +62 -0
- package/lib/types/host/claude-api/compaction-store.d.ts.map +1 -0
- package/lib/types/host/claude-api/compaction.d.ts +47 -0
- package/lib/types/host/claude-api/compaction.d.ts.map +1 -0
- package/lib/types/host/claude-api/mapper.d.ts +61 -0
- package/lib/types/host/claude-api/mapper.d.ts.map +1 -0
- package/lib/types/host/claude-api/model-catalog.d.ts +76 -0
- package/lib/types/host/claude-api/model-catalog.d.ts.map +1 -0
- package/lib/types/host/claude-api/routes.d.ts +22 -0
- package/lib/types/host/claude-api/routes.d.ts.map +1 -0
- package/lib/types/host/claude-api/stream.d.ts +88 -0
- package/lib/types/host/claude-api/stream.d.ts.map +1 -0
- package/lib/types/host/claude-api/token-store.d.ts +60 -0
- package/lib/types/host/claude-api/token-store.d.ts.map +1 -0
- package/lib/types/host/claude-api/types.d.ts +68 -0
- package/lib/types/host/claude-api/types.d.ts.map +1 -0
- package/lib/types/host/codex-catalog.d.ts +4 -0
- package/lib/types/host/codex-catalog.d.ts.map +1 -1
- package/lib/types/host/codex-remote-compaction.d.ts +41 -0
- package/lib/types/host/codex-remote-compaction.d.ts.map +1 -0
- package/lib/types/host/common/brand-compat.d.ts +2 -0
- package/lib/types/host/common/brand-compat.d.ts.map +1 -1
- package/lib/types/host/common/cache-activity.d.ts +3 -1
- package/lib/types/host/common/cache-activity.d.ts.map +1 -1
- package/lib/types/host/common/capabilities.d.ts.map +1 -1
- package/lib/types/host/common/claude-capability-memory.d.ts +51 -0
- package/lib/types/host/common/claude-capability-memory.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-cch.d.ts +20 -0
- package/lib/types/host/common/claude-code-cch.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-corrections.d.ts +6 -0
- package/lib/types/host/common/claude-code-corrections.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-first-party.d.ts +68 -0
- package/lib/types/host/common/claude-code-first-party.d.ts.map +1 -0
- package/lib/types/host/common/claude-code-version.d.ts +90 -0
- package/lib/types/host/common/claude-code-version.d.ts.map +1 -0
- package/lib/types/host/common/i18n/en.d.ts.map +1 -1
- package/lib/types/host/common/i18n/provider-name.d.ts.map +1 -1
- package/lib/types/host/common/i18n/ru.d.ts.map +1 -1
- package/lib/types/host/common/i18n/zh.d.ts +2 -0
- package/lib/types/host/common/i18n/zh.d.ts.map +1 -1
- package/lib/types/host/common/model-request-control.d.ts +1 -1
- package/lib/types/host/common/model-request-control.d.ts.map +1 -1
- package/lib/types/host/common/prompt-cache-policy.d.ts +4 -0
- package/lib/types/host/common/prompt-cache-policy.d.ts.map +1 -1
- package/lib/types/host/common/request-diagnostics.d.ts +1 -1
- package/lib/types/host/common/request-diagnostics.d.ts.map +1 -1
- package/lib/types/host/compaction-policy-guard.d.ts +7 -0
- package/lib/types/host/compaction-policy-guard.d.ts.map +1 -1
- package/lib/types/host/kimi-code/account-pool.d.ts +11 -0
- package/lib/types/host/kimi-code/account-pool.d.ts.map +1 -1
- package/lib/types/host/kimi-code/api-key.d.ts +55 -0
- package/lib/types/host/kimi-code/api-key.d.ts.map +1 -0
- package/lib/types/host/kimi-code/cache-wait.d.ts +20 -3
- package/lib/types/host/kimi-code/cache-wait.d.ts.map +1 -1
- package/lib/types/host/kimi-code/oauth.d.ts.map +1 -1
- package/lib/types/host/kimi-code/routes.d.ts.map +1 -1
- package/lib/types/host/kimi-code/token-store.d.ts +13 -0
- package/lib/types/host/kimi-code/token-store.d.ts.map +1 -1
- package/lib/types/host/model-catalog.d.ts.map +1 -1
- package/lib/types/host/responses-client.d.ts +5 -1
- package/lib/types/host/responses-client.d.ts.map +1 -1
- package/lib/types/host/responses-mapper.d.ts +5 -0
- package/lib/types/host/responses-mapper.d.ts.map +1 -1
- package/lib/types/index.d.ts +7 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/aws-quick-contracts.d.ts +61 -0
- package/lib/types/shared/aws-quick-contracts.d.ts.map +1 -0
- package/lib/types/shared/claude-api-contracts.d.ts +98 -0
- package/lib/types/shared/claude-api-contracts.d.ts.map +1 -0
- package/lib/types/shared/claude-contracts.d.ts +6 -0
- package/lib/types/shared/claude-contracts.d.ts.map +1 -1
- package/lib/types/shared/contracts.d.ts +1 -1
- package/lib/types/shared/contracts.d.ts.map +1 -1
- package/lib/types/shared/kimi-code-contracts.d.ts +5 -0
- package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -1
- package/lib/types/shared/model-catalog.d.ts +6 -0
- package/lib/types/shared/model-catalog.d.ts.map +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side compaction for the claude-api line (spec: docs/claude-api-line-plan.md,
|
|
3
|
+
* server compaction section). The request is built THROUGH buildClaudeApiRequest so system, tools,
|
|
4
|
+
* cache markers and thinking are byte-identical to a main turn, then adjusted: the
|
|
5
|
+
* trailing directive message is stripped, context_management / stop_sequences /
|
|
6
|
+
* structured output / forced tool_choice are removed, compaction: { type: 'summarize',
|
|
7
|
+
* instructions } is added, and max_tokens is at least 8192.
|
|
8
|
+
*/
|
|
9
|
+
import type { GenerateOptions } from '../common/llm-compat.ts';
|
|
10
|
+
import type { ResolvedRequestImages } from '../common/request-images.ts';
|
|
11
|
+
import { type ClaudeApiRequestContext } from './mapper.ts';
|
|
12
|
+
/** The compaction engine's auxiliary call is the one with purpose 'compaction'. */
|
|
13
|
+
export declare function isClaudeApiCompactionRequest(options: GenerateOptions): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* A copy of the options without the trailing directive user message, or null when the
|
|
16
|
+
* last message is not that directive. The directive is recognized by the FIRST LINE of
|
|
17
|
+
* either the shipped instruction or this repo's replacement (both exported by
|
|
18
|
+
* src/host/compaction-prompt.ts); the harness may reword later sections without warning.
|
|
19
|
+
*/
|
|
20
|
+
export declare function stripClaudeApiCompactionDirective(options: GenerateOptions): GenerateOptions | null;
|
|
21
|
+
/**
|
|
22
|
+
* One compaction request. The shared mapper adds a wire-only user continuation when
|
|
23
|
+
* the stripped history ends in assistant content, because upstream rejects prefill.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildClaudeApiCompactionRequest(options: GenerateOptions, images: ResolvedRequestImages, context: ClaudeApiRequestContext): Record<string, unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* A 400 about the compaction BLOCK itself - its content/signature or its placement.
|
|
28
|
+
* Such a block is stale or misplaced, not a missing capability: the caller forgets the
|
|
29
|
+
* stored summary and retries once. Co-usage errors (compaction + context_management)
|
|
30
|
+
* are request-shape problems and match neither predicate.
|
|
31
|
+
*/
|
|
32
|
+
export declare function isClaudeApiCompactionBlockInvalid(status: number, bodyText: string): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether an upstream 400 is a real "server compaction not supported" signal: the
|
|
35
|
+
* compaction parameter refused as an unknown/extra input, an unexpected/unsupported
|
|
36
|
+
* anthropic-beta value naming compact-2026-09-04, or a message saying the model does
|
|
37
|
+
* not support compaction. Block-validity errors and the context_management co-usage
|
|
38
|
+
* error are explicitly NOT unsupported signals.
|
|
39
|
+
*/
|
|
40
|
+
export declare function isClaudeApiCompactionUnsupported(status: number, bodyText: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The trimmed text between <compacted-summary> and </compacted-summary> (the marker
|
|
43
|
+
* the harness wraps a checkpoint in, see compaction-prompt.ts PRIOR_CHECKPOINT_OPEN_TAG),
|
|
44
|
+
* or null when the text carries no such block.
|
|
45
|
+
*/
|
|
46
|
+
export declare function extractCheckpointSummary(text: string): string | null;
|
|
47
|
+
//# sourceMappingURL=compaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/compaction.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAExE,OAAO,EAAyB,KAAK,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAUjF,mFAAmF;AACnF,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAE9E;AAID;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,OAAO,EAAE,eAAe,GAAG,eAAe,GAAG,IAAI,CAQlG;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,uBAAuB,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYzB;AAwBD;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK3F;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAW1F;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIpE"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure wire mapping for the claude-api line: DSH GenerateOptions -> the body of
|
|
3
|
+
* POST <baseUrl>/v1/messages?beta=true in the official Claude Code shape.
|
|
4
|
+
*
|
|
5
|
+
* SPEC: docs/claude-api-line-plan.md (request shape / beta rules / message mapping). Wire constants and
|
|
6
|
+
* the identity/billing/fingerprint functions are frozen in ./types.ts; per-model
|
|
7
|
+
* capabilities are frozen in ./model-catalog.ts. This module holds no credential,
|
|
8
|
+
* performs no I/O and is deterministic: the same (options, images, context) always
|
|
9
|
+
* produces the same body, byte for byte.
|
|
10
|
+
*
|
|
11
|
+
* Reference implementations read but NOT imported: relayone/mapper-anthropic.ts
|
|
12
|
+
* (closest template; it drops system/developer messages, this line must not) and
|
|
13
|
+
* claude/mapper.ts (system-in-place rule, tool changes, placeholder tool, cache
|
|
14
|
+
* breakpoints, signed-thinking replay).
|
|
15
|
+
*/
|
|
16
|
+
import type { GenerateOptions } from '../common/llm-compat.ts';
|
|
17
|
+
import { type ClaudeCodeFirstPartyContext } from '../common/claude-code-first-party.ts';
|
|
18
|
+
import { type ResolvedRequestImages } from '../common/request-images.ts';
|
|
19
|
+
import type { ClaudeApiModelEntry } from './model-catalog.ts';
|
|
20
|
+
import type { ClaudeApiSettings } from './token-store.ts';
|
|
21
|
+
/** Everything one request build needs beyond the options and the resolved images. */
|
|
22
|
+
export interface ClaudeApiRequestContext {
|
|
23
|
+
entry: ClaudeApiModelEntry;
|
|
24
|
+
settings: ClaudeApiSettings;
|
|
25
|
+
/** The ONE version this request reports: billing block and fingerprint share it (the UA is the adapter's job). */
|
|
26
|
+
version: string;
|
|
27
|
+
deviceId: string;
|
|
28
|
+
sessionUuid: string;
|
|
29
|
+
firstParty: ClaudeCodeFirstPartyContext;
|
|
30
|
+
/** Synchronous lookup of stored server-compaction blocks, keyed by summary text. */
|
|
31
|
+
compactionBlocks?: {
|
|
32
|
+
lookup(summary: string): {
|
|
33
|
+
content: string;
|
|
34
|
+
signature: string;
|
|
35
|
+
toolChanges?: unknown;
|
|
36
|
+
} | undefined;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The user's OWN first prompt text: the first non-reminder text block of the first user
|
|
41
|
+
* turn that carries one. Tool-result turns are skipped, and so are <system-reminder>
|
|
42
|
+
* blocks placed ahead of the user's text (the capture shows both in the first turn).
|
|
43
|
+
* CHOICE: a reminder-only user turn is skipped entirely and the scan continues, because
|
|
44
|
+
* DSH appends reminder-only records that contain no user text at all.
|
|
45
|
+
*/
|
|
46
|
+
export declare function claudeApiFirstUserText(options: GenerateOptions): string;
|
|
47
|
+
/** How many cache_control markers one built body carries (walks the bytes, not the marking calls). */
|
|
48
|
+
export declare function countClaudeApiCacheBreakpoints(body: unknown): number;
|
|
49
|
+
/**
|
|
50
|
+
* Build one main-turn Messages request body. Pure: no clock, no randomness, no I/O.
|
|
51
|
+
* The leading compact-checkpoint message is replaced by the stored compaction block
|
|
52
|
+
* when the context's lookup finds it; otherwise it keeps its text form.
|
|
53
|
+
*/
|
|
54
|
+
export declare function buildClaudeApiRequest(options: GenerateOptions, images: ResolvedRequestImages, context: ClaudeApiRequestContext): Record<string, unknown>;
|
|
55
|
+
/**
|
|
56
|
+
* The anthropic-beta list derived from the FINAL BODY (never from settings): the base
|
|
57
|
+
* set first, then the conditional betas in the spec table's order. A gateway silently
|
|
58
|
+
* strips unlicensed fields, so the header must follow the bytes.
|
|
59
|
+
*/
|
|
60
|
+
export declare function deriveClaudeApiBetas(body: Record<string, unknown>, entry: ClaudeApiModelEntry, thinkingTokenCount?: boolean): string[];
|
|
61
|
+
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO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,MAAM,EAAE,CAkBV"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { ClaudeApiModelDto, ClaudeApiReasoningEffort } from '../../shared/claude-api-contracts.ts';
|
|
2
|
+
import type { ClaudeApiSettings } from './token-store.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Per-model capability table of the Claude API line.
|
|
5
|
+
*
|
|
6
|
+
* SOURCES. Support lists are the featureMetadata.supportedModels blocks of the official
|
|
7
|
+
* pages fetched 2026-11-21 under https://platform.claude.com/docs/en/ :
|
|
8
|
+
* build-with-claude/mid-conversation-system-messages -> midConversationSystem
|
|
9
|
+
* build-with-claude/preserved-thinking/prefix-checks -> preservedThinking
|
|
10
|
+
* build-with-claude/compaction-on-demand -> serverCompaction
|
|
11
|
+
* build-with-claude/fast-mode -> fastMode ('beta' = needs the fast-mode header)
|
|
12
|
+
* build-with-claude/context-editing -> contextEditing
|
|
13
|
+
* Window, output cap, thinking form, effort ladder and temperature come from the in-repo
|
|
14
|
+
* transcription src/host/claude/model-catalog.ts (read as a reference, not imported), and
|
|
15
|
+
* three of them were re-checked live: claude-haiku-5-5 rejects budget thinking and a
|
|
16
|
+
* non-default temperature, and 128000 is the output cap of claude-haiku-5-5 and claude-opus-5-5.
|
|
17
|
+
* UNVERIFIED: the Mythos rows mirror their Fable siblings because the docs list them together.
|
|
18
|
+
*/
|
|
19
|
+
export type ClaudeApiThinkingMode = 'adaptive' | 'budget' | 'none';
|
|
20
|
+
export type ClaudeApiFastMode = 'ga' | 'beta' | null;
|
|
21
|
+
type Effort = Exclude<ClaudeApiReasoningEffort, 'none'>;
|
|
22
|
+
export interface ClaudeApiModelEntry {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
contextWindow: number;
|
|
26
|
+
maxOutputTokens: number;
|
|
27
|
+
supportsImages: boolean;
|
|
28
|
+
supportsTemperature: boolean;
|
|
29
|
+
thinkingMode: ClaudeApiThinkingMode;
|
|
30
|
+
/** Selectable effort levels, lowest first; never contains 'none'. */
|
|
31
|
+
reasoningEfforts: readonly Effort[];
|
|
32
|
+
canDisableThinking: boolean;
|
|
33
|
+
/** Accepts role:system entries inside messages (and tool_addition / tool_removal in them). */
|
|
34
|
+
midConversationSystem: boolean;
|
|
35
|
+
/** Runs the preserved-thinking prefix check, so block_binding is sent. */
|
|
36
|
+
preservedThinking: boolean;
|
|
37
|
+
fastMode: ClaudeApiFastMode;
|
|
38
|
+
serverCompaction: boolean;
|
|
39
|
+
contextEditing: boolean;
|
|
40
|
+
/** false when the id is not in the shipped table and a template was used. */
|
|
41
|
+
known: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare const CLAUDE_API_MODELS: readonly ClaudeApiModelEntry[];
|
|
44
|
+
/** Facts for one model id: the caller's catalog first, then the shipped table, then a template. */
|
|
45
|
+
export declare function resolveClaudeApiModel(id: string, catalog?: readonly ClaudeApiModelEntry[]): ClaudeApiModelEntry;
|
|
46
|
+
/** The shipped table as a fresh array; the cold-start placeholder before any live listing. */
|
|
47
|
+
export declare function claudeApiFallbackEntries(): ClaudeApiModelEntry[];
|
|
48
|
+
/**
|
|
49
|
+
* Parse the live GET /v1/models envelope ({ data: [{ id, display_name }] }).
|
|
50
|
+
* Capabilities always come from this module, never from the listing: a gateway may
|
|
51
|
+
* synthesize the listing (observed: display_name equal to the id and no capability fields).
|
|
52
|
+
*/
|
|
53
|
+
export declare function parseClaudeApiModelListing(payload: unknown): ClaudeApiModelEntry[];
|
|
54
|
+
/** One persisted snapshot record. Written by persistedClaudeApiModelRecord, read by parsePersistedClaudeApiModelEntries. */
|
|
55
|
+
export interface PersistedClaudeApiModelRecord {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
}
|
|
59
|
+
/** Snapshot writer half. Only identity is persisted; capabilities are recomputed on read so a table fix reaches old snapshots. */
|
|
60
|
+
export declare function persistedClaudeApiModelRecord(entry: ClaudeApiModelEntry): PersistedClaudeApiModelRecord;
|
|
61
|
+
/** Snapshot reader half: the inverse of mapping persistedClaudeApiModelRecord over a catalog. */
|
|
62
|
+
export declare function parsePersistedClaudeApiModelEntries(value: unknown): ClaudeApiModelEntry[];
|
|
63
|
+
/**
|
|
64
|
+
* The ids a request may use: THE one selection rule for listModels, the settings card and the hub count.
|
|
65
|
+
*
|
|
66
|
+
* null means every listed model. An explicit [] means none, in both phases. An explicit list is
|
|
67
|
+
* applied only to a LIVE catalog: the shipped fallback table and a user's list are different id
|
|
68
|
+
* vocabularies, so filtering the fallback through the list could hide the whole line on a cold start.
|
|
69
|
+
*/
|
|
70
|
+
export declare function convergeClaudeApiSelection(entries: readonly ClaudeApiModelEntry[], settings: Pick<ClaudeApiSettings, 'enabledModelIds'>, live: boolean): Set<string>;
|
|
71
|
+
/** Context window after the user's override, or the model default. */
|
|
72
|
+
export declare function claudeApiContextWindow(entry: ClaudeApiModelEntry, settings: Pick<ClaudeApiSettings, 'contextWindowOverrides'>): number;
|
|
73
|
+
/** Public rows for the settings card. */
|
|
74
|
+
export declare function claudeApiModelOptions(entries: readonly ClaudeApiModelEntry[], settings: ClaudeApiSettings, live: boolean): ClaudeApiModelDto[];
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=model-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/model-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAA;AACvG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAA;AAClE,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;AACpD,KAAK,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM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MG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAOpK;AAOD,sEAAsE;AACtE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,wBAAwB,CAAC,GAAG,MAAM,CAEtI;AAED,yCAAyC;AACzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,EAAE,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,GAAG,iBAAiB,EAAE,CAe9I"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { type ClaudeApiStatusDto } from '../../shared/claude-api-contracts.ts';
|
|
3
|
+
import type { ClaudeApiCatalogManager } from './catalog-manager.ts';
|
|
4
|
+
import type { ClaudeApiClientVersionResolver } from './client-version.ts';
|
|
5
|
+
import type { ClaudeApiCredentialStore, ClaudeApiSettingsStore } from './token-store.ts';
|
|
6
|
+
export interface ClaudeApiRouteDeps {
|
|
7
|
+
version: ClaudeApiClientVersionResolver;
|
|
8
|
+
serving?: boolean | (() => boolean);
|
|
9
|
+
conflict?: string | null | (() => string | null);
|
|
10
|
+
fetchFn?: typeof fetch;
|
|
11
|
+
}
|
|
12
|
+
/** Local-first status; the network refresh begins behind the answer. */
|
|
13
|
+
export declare function getClaudeApiWebStatus(store: ClaudeApiCredentialStore, settingsStore: ClaudeApiSettingsStore, catalog: ClaudeApiCatalogManager, deps: ClaudeApiRouteDeps): Promise<ClaudeApiStatusDto>;
|
|
14
|
+
/**
|
|
15
|
+
* Route table mirrored by src/client/claude-api/api.ts. The settings body is a
|
|
16
|
+
* ClaudeApiSettingsUpdateDto; the key is removed with DELETE /key (the prefix
|
|
17
|
+
* router dispatches on request.method, so no extra registration is needed).
|
|
18
|
+
*/
|
|
19
|
+
export declare function registerClaudeApiRoutes(ctx: Context, store: ClaudeApiCredentialStore, settingsStore: ClaudeApiSettingsStore, catalog: ClaudeApiCatalogManager, deps: ClaudeApiRouteDeps): () => void;
|
|
20
|
+
/** Startup warm-up is deliberately fire-and-forget in the plugin entry. */
|
|
21
|
+
export declare function warmClaudeApiCatalogOnStartup(catalog: ClaudeApiCatalogManager): Promise<void>;
|
|
22
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,EAQL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAEnE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAA;AAEzE,OAAO,KAAK,EACV,wBAAwB,EAExB,sBAAsB,EACvB,MAAM,kBAAkB,CAAA;AA8BzB,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,8BAA8B,CAAA;IACvC,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAA;IAChD,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;CACvB;AAED,wEAAwE;AACxE,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,wBAAwB,EAC/B,aAAa,EAAE,sBAAsB,EACrC,OAAO,EAAE,uBAAuB,EAChC,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,kBAAkB,CAAC,CA2B7B;AAsDD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,wBAAwB,EAC/B,aAAa,EAAE,sBAAsB,EACrC,OAAO,EAAE,uBAAuB,EAChC,IAAI,EAAE,kBAAkB,GACvB,MAAM,IAAI,CA8EZ;AAED,2EAA2E;AAC3E,wBAAsB,6BAA6B,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGnG"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSE state machine for the claude-api line: one Anthropic Messages event line in,
|
|
3
|
+
* DSH StreamChunks out. Mirrors relayone/mapper-anthropic.ts (read, not imported)
|
|
4
|
+
* with the claude-api additions:
|
|
5
|
+
*
|
|
6
|
+
* - a content_block_start of type "compaction" arrives WHOLE (no deltas): its content
|
|
7
|
+
* is emitted as text and exposed as state.compaction for the adapter to store;
|
|
8
|
+
* - thinking blocks with empty text but a signature are kept for replay; unsigned
|
|
9
|
+
* thinking is not replayable and gets a null replay slot;
|
|
10
|
+
* - server_tool_use and its result blocks are kept for replay verbatim without
|
|
11
|
+
* emitting DSH blocks (the harness must not dispatch a server-side call locally);
|
|
12
|
+
* - usage is read from message_start / message_delta and, when usage.iterations is
|
|
13
|
+
* present, summed over the iterations (top-level counts are 0 on a compaction
|
|
14
|
+
* response);
|
|
15
|
+
* - stop_reason "compaction" finishes normally; a stream without message_stop is an
|
|
16
|
+
* error (assertClaudeApiStreamComplete), never a success.
|
|
17
|
+
*/
|
|
18
|
+
import { type OutboundContentBlock, type StreamChunk, type TokenUsage } from '../common/llm-compat.ts';
|
|
19
|
+
type Block = Record<string, unknown>;
|
|
20
|
+
interface OpenText {
|
|
21
|
+
index: number;
|
|
22
|
+
replayIndex: number;
|
|
23
|
+
text: string;
|
|
24
|
+
}
|
|
25
|
+
interface PendingTool {
|
|
26
|
+
index: number;
|
|
27
|
+
replayIndex: number;
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
arguments: string;
|
|
31
|
+
}
|
|
32
|
+
interface PendingThinking {
|
|
33
|
+
index: number;
|
|
34
|
+
replayIndex: number;
|
|
35
|
+
kind: 'thinking' | 'redacted_thinking';
|
|
36
|
+
text: string;
|
|
37
|
+
signature: string;
|
|
38
|
+
data: string;
|
|
39
|
+
}
|
|
40
|
+
interface PendingServerTool {
|
|
41
|
+
replay: Block;
|
|
42
|
+
arguments: string;
|
|
43
|
+
}
|
|
44
|
+
/** The whole-block compaction event the adapter stores and later replays. */
|
|
45
|
+
export interface ClaudeApiCompactionEvent {
|
|
46
|
+
content: string;
|
|
47
|
+
signature: string;
|
|
48
|
+
toolChanges?: unknown;
|
|
49
|
+
}
|
|
50
|
+
export interface ClaudeApiStreamState {
|
|
51
|
+
blocks: OutboundContentBlock[];
|
|
52
|
+
openText: Map<number, OpenText>;
|
|
53
|
+
tools: Map<number, PendingTool>;
|
|
54
|
+
thinking: Map<number, PendingThinking>;
|
|
55
|
+
serverTools: Map<number, PendingServerTool>;
|
|
56
|
+
/** One slot per DSH block (reserved at open) plus replay-only wire blocks in wire order. */
|
|
57
|
+
replayBlocks: (Block | null)[];
|
|
58
|
+
compaction: ClaudeApiCompactionEvent | null;
|
|
59
|
+
sawMessageStart: boolean;
|
|
60
|
+
sawMessageStop: boolean;
|
|
61
|
+
finishReason: string | null;
|
|
62
|
+
stopExplanation: string | null;
|
|
63
|
+
inputTokens: number;
|
|
64
|
+
outputTokens: number;
|
|
65
|
+
cacheReadTokens: number;
|
|
66
|
+
cacheWriteTokens: number;
|
|
67
|
+
reasoningTokens: number;
|
|
68
|
+
speed?: 'standard' | 'fast';
|
|
69
|
+
serviceTier?: string;
|
|
70
|
+
inferenceGeo?: string;
|
|
71
|
+
sawUsage: boolean;
|
|
72
|
+
sawIterations: boolean;
|
|
73
|
+
finished: boolean;
|
|
74
|
+
hasToolCall: boolean;
|
|
75
|
+
}
|
|
76
|
+
export declare function createClaudeApiStreamState(): ClaudeApiStreamState;
|
|
77
|
+
export type ClaudeApiTokenUsage = TokenUsage & {
|
|
78
|
+
speed?: 'standard' | 'fast';
|
|
79
|
+
service_tier?: string;
|
|
80
|
+
inference_geo?: string;
|
|
81
|
+
};
|
|
82
|
+
export declare function closeClaudeApiStream(state: ClaudeApiStreamState): StreamChunk[];
|
|
83
|
+
/** A stream that ends without message_stop is an error, never a success. */
|
|
84
|
+
export declare function assertClaudeApiStreamComplete(state: ClaudeApiStreamState): void;
|
|
85
|
+
export declare function feedClaudeApiPayload(state: ClaudeApiStreamState, event: unknown): StreamChunk[];
|
|
86
|
+
export declare function processClaudeApiLine(line: string, state: ClaudeApiStreamState): StreamChunk[];
|
|
87
|
+
export {};
|
|
88
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAY,KAAK,oBAAoB,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGhH,KAAK,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAkBpC,UAAU,QAAQ;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACvE,UAAU,WAAW;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE;AACzG,UAAU,eAAe;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,GAAG,mBAAmB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAA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EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,wBAAgB,0BAA0B,IAAI,oBAAoB,CAQjE;AAiGD,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG;IAC7C,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAeD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,GAAG,WAAW,EAAE,CAgB/E;AAED,4EAA4E;AAC5E,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAE/E;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,OAAO,GAAG,WAAW,EAAE,CAqJ/F;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,GAAG,WAAW,EAAE,CAS7F"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { CredentialStore } from '../token-store.ts';
|
|
2
|
+
import { type ContextWindowOverridePatch } from '../common/context-window-overrides.ts';
|
|
3
|
+
import { type ClaudeApiCacheTtl, type ClaudeApiReasoningEffort } from '../../shared/claude-api-contracts.ts';
|
|
4
|
+
export interface ClaudeApiCredentials {
|
|
5
|
+
apiKey: string;
|
|
6
|
+
authenticatedAt: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ClaudeApiSettings {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
/** Normalized endpoint; always a valid http(s) origin with an optional path prefix. */
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
/** null = every currently listed model; [] = explicitly none. */
|
|
13
|
+
enabledModelIds: string[] | null;
|
|
14
|
+
contextWindowOverrides: Record<string, number>;
|
|
15
|
+
defaultReasoningEffort: ClaudeApiReasoningEffort | null;
|
|
16
|
+
cacheTtl: ClaudeApiCacheTtl;
|
|
17
|
+
fastMode: boolean;
|
|
18
|
+
serverCompaction: boolean;
|
|
19
|
+
/** 64 hex chars, generated once per install; '' until ensureDeviceId ran. Never sent to the client. */
|
|
20
|
+
deviceId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ClaudeApiSettingsPatch {
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
/** null restores the default endpoint. A value must already be normalized by the caller. */
|
|
25
|
+
baseUrl?: string | null;
|
|
26
|
+
enabledModelIds?: string[];
|
|
27
|
+
contextWindowOverrides?: ContextWindowOverridePatch;
|
|
28
|
+
defaultReasoningEffort?: ClaudeApiReasoningEffort | null;
|
|
29
|
+
cacheTtl?: ClaudeApiCacheTtl;
|
|
30
|
+
fastMode?: boolean;
|
|
31
|
+
serverCompaction?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function parseClaudeApiCredentials(value: unknown): ClaudeApiCredentials;
|
|
34
|
+
export declare function claudeApiCredentialPath(): string;
|
|
35
|
+
export declare function claudeApiSettingsPath(): string;
|
|
36
|
+
/** Scope of everything cached per credential: the key AND the endpoint it is used against. */
|
|
37
|
+
export declare function claudeApiCredentialFingerprint(credentials: ClaudeApiCredentials, baseUrl: string): string;
|
|
38
|
+
export declare class ClaudeApiCredentialStore {
|
|
39
|
+
private readonly filePath;
|
|
40
|
+
private readonly backend;
|
|
41
|
+
constructor(filePath?: string, backend?: CredentialStore<ClaudeApiCredentials>);
|
|
42
|
+
path(): string;
|
|
43
|
+
read(): Promise<ClaudeApiCredentials | null>;
|
|
44
|
+
write(credentials: ClaudeApiCredentials): Promise<void>;
|
|
45
|
+
delete(): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
export declare function defaultClaudeApiSettings(): ClaudeApiSettings;
|
|
48
|
+
export declare function parseClaudeApiSettings(value: unknown): ClaudeApiSettings;
|
|
49
|
+
export declare function mergeClaudeApiSettings(current: ClaudeApiSettings, patch: ClaudeApiSettingsPatch): ClaudeApiSettings;
|
|
50
|
+
export declare class ClaudeApiSettingsStore {
|
|
51
|
+
private readonly filePath;
|
|
52
|
+
constructor(filePath?: string);
|
|
53
|
+
path(): string;
|
|
54
|
+
read(): Promise<ClaudeApiSettings>;
|
|
55
|
+
write(settings: ClaudeApiSettings): Promise<void>;
|
|
56
|
+
update(patch: ClaudeApiSettingsPatch): Promise<ClaudeApiSettings>;
|
|
57
|
+
/** The persisted device id, generated on first use. Stable for the life of the install. */
|
|
58
|
+
ensureDeviceId(): Promise<string>;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=token-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-store.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/token-store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAKxD,OAAO,EAA+B,KAAK,0BAA0B,EAAE,MAAM,uCAAuC,CAAA;AACpH,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC9B,MAAM,sCAAsC,CAAA;AAG7C,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,uFAAuF;IACvF,OAAO,EAAE,MAAM,CAAA;IACf,iEAAiE;IACjE,eAAe,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAChC,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9C,sBAAsB,EAAE,wBAAwB,GAAG,IAAI,CAAA;IACvD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,OAAO,CAAA;IACzB,uGAAuG;IACvG,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CA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QAAQ;gBAAR,QAAQ,GAAE,MAAgC;IACvE,IAAI,IAAI,MAAM;IACR,IAAI,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAIlC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAcjD,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAOvE,2FAA2F;IACrF,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;CASxC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type ClaudeCodeFirstPartyContext } from '../common/claude-code-first-party.ts';
|
|
2
|
+
export declare const PROVIDER_ID = "claude-api";
|
|
3
|
+
export declare const PROVIDER_NAME = "Claude API";
|
|
4
|
+
/**
|
|
5
|
+
* Wire constants of the official Claude Code client as an API-key user sends them.
|
|
6
|
+
*
|
|
7
|
+
* SOURCE for every value in this file unless stated otherwise: a local capture of
|
|
8
|
+
* @anthropic-ai/claude-code@2.1.330 pointed at a loopback port with an API key
|
|
9
|
+
* (structural copy in test/fixtures/claude-api/request-2.1.330.json), cross-checked
|
|
10
|
+
* against the 2026-03-31 source snapshot (services/api/client.ts, constants/system.ts,
|
|
11
|
+
* utils/fingerprint.ts, services/api/claude.ts getAPIMetadata). See docs/claude-api-line-plan.md.
|
|
12
|
+
*/
|
|
13
|
+
export declare const CLAUDE_API_MESSAGES_PATH = "/v1/messages?beta=true";
|
|
14
|
+
export declare const CLAUDE_API_COUNT_TOKENS_PATH = "/v1/messages/count_tokens?beta=true";
|
|
15
|
+
export declare const CLAUDE_API_MODELS_PATH = "/v1/models";
|
|
16
|
+
export declare const CLAUDE_API_ANTHROPIC_VERSION = "2023-06-01";
|
|
17
|
+
/** Shipped fallback. npm updates are adopted only when a verified cch seed exists (client-version.ts). */
|
|
18
|
+
export declare const CLAUDE_API_DEFAULT_CLI_VERSION = "2.1.330";
|
|
19
|
+
/** Operator pin, mirroring DSH_CLAUDE_CLI_VERSION of the subscription line. */
|
|
20
|
+
export declare const CLAUDE_API_CLI_VERSION_ENV = "DSH_CLAUDE_API_CLI_VERSION";
|
|
21
|
+
/** npm registry document whose version field is the latest published client. */
|
|
22
|
+
export declare const CLAUDE_API_NPM_LATEST_URL = "https://registry.npmjs.org/@anthropic-ai/claude-code/latest";
|
|
23
|
+
export declare const CLAUDE_API_CLIENT_VERSION_REFRESH_MS: number;
|
|
24
|
+
export declare const CLAUDE_API_CLIENT_VERSION_TIMEOUT_MS = 10000;
|
|
25
|
+
/** Interactive entrypoint. UNVERIFIED BY CAPTURE: the capture ran print mode (sdk-cli); cli comes from the source snapshot and was accepted live. */
|
|
26
|
+
export declare const CLAUDE_API_ENTRYPOINT = "cli";
|
|
27
|
+
/** Identity line of the interactive client (constants/system.ts DEFAULT_PREFIX). */
|
|
28
|
+
export declare const CLAUDE_API_IDENTITY_TEXT = "You are Claude Code, Anthropic's official CLI for Claude.";
|
|
29
|
+
export declare const CLAUDE_API_BILLING_HEADER_PREFIX = "x-anthropic-billing-header";
|
|
30
|
+
/** utils/fingerprint.ts FINGERPRINT_SALT; re-verified against the 2.1.330 capture (9e1). */
|
|
31
|
+
export declare const CLAUDE_API_FINGERPRINT_SALT = "59cf53e54c78";
|
|
32
|
+
/** Stainless SDK headers exactly as captured. They do NOT follow the npm version; see the plan's limitations. */
|
|
33
|
+
export declare const CLAUDE_API_STAINLESS_HEADERS: Readonly<Record<string, string>>;
|
|
34
|
+
/** First-party API-key betas in capture order; model-specific order comes from the shared helper. */
|
|
35
|
+
export declare const CLAUDE_API_BASE_BETAS: readonly string[];
|
|
36
|
+
/** Licenses thinking.block_binding. Without it the gateway strips the field and upstream rejects it. */
|
|
37
|
+
export declare const CLAUDE_API_BETA_THINKING_BINDING = "thinking-binding-controls-2026-08-01";
|
|
38
|
+
/** Licenses the compaction parameter and every later request that carries a signed compaction block. */
|
|
39
|
+
export declare const CLAUDE_API_BETA_COMPACT = "compact-2026-09-04";
|
|
40
|
+
/** Licenses a tool defined by value inside tool_addition, and tool_changes on a compaction block. */
|
|
41
|
+
export declare const CLAUDE_API_BETA_INLINE_TOOLS = "inline-tools-2026-09-15";
|
|
42
|
+
/** Licenses clear_at on a role:system message. */
|
|
43
|
+
export declare const CLAUDE_API_BETA_CLEAR_AT = "mid-conversation-system-clear-at-2026-08-21";
|
|
44
|
+
/** Required for speed on models whose fast mode is still beta. */
|
|
45
|
+
export declare const CLAUDE_API_BETA_FAST_MODE = "fast-mode-2026-02-01";
|
|
46
|
+
export declare const CLAUDE_API_CATALOG_TTL_MS: number;
|
|
47
|
+
export declare const CLAUDE_API_MAX_REQUEST_IMAGE_BYTES: number;
|
|
48
|
+
/** Message source kinds rendered as turn-scoped system messages (clear_at). A user decision; see the plan. */
|
|
49
|
+
export declare const CLAUDE_API_TURN_SCOPED_SOURCE_KINDS: readonly string[];
|
|
50
|
+
/** Remove a credential echoed by an upstream error before truncating its public detail. */
|
|
51
|
+
export declare function claudeApiSafeDetail(value: unknown, apiKey?: string, limit?: number): string;
|
|
52
|
+
/** Join a normalized base URL with one of the path constants above. */
|
|
53
|
+
export declare function claudeApiUrl(baseUrl: string, path: string): string;
|
|
54
|
+
/** User-Agent of the interactive client for one version. */
|
|
55
|
+
export declare function claudeApiUserAgent(version: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* Three-hex attribution fingerprint: SHA256(salt + text[4] + text[7] + text[20] + version)[:3],
|
|
58
|
+
* with '0' standing in for a missing character. The text is the user's OWN first prompt text,
|
|
59
|
+
* not a reminder block placed in front of it (verified against the capture).
|
|
60
|
+
*/
|
|
61
|
+
export declare function claudeApiFingerprint(firstUserText: string, version: string): string;
|
|
62
|
+
/** Text of the first system block. It carries no cache marker. */
|
|
63
|
+
export declare function claudeApiBillingBlock(version: string, firstUserText: string, context: ClaudeCodeFirstPartyContext): string;
|
|
64
|
+
/** Deterministic UUID-shaped id for one DSH session, stable across retries and restarts. */
|
|
65
|
+
export declare function claudeApiSessionUuid(sessionId: string): string;
|
|
66
|
+
/** metadata.user_id in the JSON form current clients send. account_uuid is empty for API-key users. */
|
|
67
|
+
export declare function claudeApiMetadataUserId(deviceId: string, sessionUuid: string): string;
|
|
68
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/claude-api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,2BAA2B,EACjC,MAAM,sCAAsC,CAAA;AAM7C,eAAO,MAAM,WAAW,eAAyB,CAAA;AACjD,eAAO,MAAM,aAAa,eAA2B,CAAA;AAErD;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,2BAA2B,CAAA;AAChE,eAAO,MAAM,4BAA4B,wCAAwC,CAAA;AACjF,eAAO,MAAM,sBAAsB,eAAe,CAAA;AAClD,eAAO,MAAM,4BAA4B,eAAe,CAAA;AAExD,0GAA0G;AAC1G,eAAO,MAAM,8BAA8B,YAAY,CAAA;AACvD,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,+BAA+B,CAAA;AACtE,gFAAgF;AAChF,eAAO,MAAM,yBAAyB,gEAAgE,CAAA;AACtG,eAAO,MAAM,oCAAoC,QAAmB,CAAA;AACpE,eAAO,MAAM,oCAAoC,QAAS,CAAA;AAE1D,qJAAqJ;AACrJ,eAAO,MAAM,qBAAqB,QAAQ,CAAA;AAC1C,oFAAoF;AACpF,eAAO,MAAM,wBAAwB,8DAA8D,CAAA;AACnG,eAAO,MAAM,gCAAgC,+BAA+B,CAAA;AAC5E,4FAA4F;AAC5F,eAAO,MAAM,2BAA2B,iBAA+B,CAAA;AAEvE,iHAAiH;AACjH,eAAO,MAAM,4BAA4B,kCAAgC,CAAA;AAEzE,qGAAqG;AACrG,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAAkE,CAAA;AACrH,wGAAwG;AACxG,eAAO,MAAM,gCAAgC,yCAAyC,CAAA;AACtF,wGAAwG;AACxG,eAAO,MAAM,uBAAuB,uBAAuB,CAAA;AAC3D,qGAAqG;AACrG,eAAO,MAAM,4BAA4B,4BAA4B,CAAA;AACrE,kDAAkD;AAClD,eAAO,MAAM,wBAAwB,gDAAgD,CAAA;AACrF,kEAAkE;AAClE,eAAO,MAAM,yBAAyB,yBAAyB,CAAA;AAE/D,eAAO,MAAM,yBAAyB,QAAa,CAAA;AACnD,eAAO,MAAM,kCAAkC,QAAmB,CAAA;AAElE,8GAA8G;AAC9G,eAAO,MAAM,mCAAmC,EAAE,SAAS,MAAM,EAAqE,CAAA;AAEtI,2FAA2F;AAC3F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,SAAO,GAAG,MAAM,CAGzF;AAED,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,4DAA4D;AAC5D,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnF;AAED,kEAAkE;AAClE,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,2BAA2B,GACnC,MAAM,CAER;AAED,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,uGAAuG;AACvG,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAErF"}
|
|
@@ -19,6 +19,10 @@ export interface CodexCatalogEntry {
|
|
|
19
19
|
* the shipped table instead of being read as "not Lite".
|
|
20
20
|
*/
|
|
21
21
|
useResponsesLite?: boolean;
|
|
22
|
+
/** Server-stated automatic compaction threshold; null when absent. */
|
|
23
|
+
autoCompactTokenLimit?: number | null;
|
|
24
|
+
/** Opaque model-configuration compatibility key for compaction items. */
|
|
25
|
+
compHash?: string | null;
|
|
22
26
|
}
|
|
23
27
|
/** Drop the cached listing, forcing the next load to hit the network. */
|
|
24
28
|
export declare function clearCachedCatalog(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-catalog.d.ts","sourceRoot":"","sources":["../../../src/host/codex-catalog.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAG9D,KAAK,SAAS,GAAG,OAAO,KAAK,CAAA;AAe7B,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,8DAA8D;IAC9D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,eAAe,EAAE,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC,EAAE,CAAA;IAC9C,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtC;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"codex-catalog.d.ts","sourceRoot":"","sources":["../../../src/host/codex-catalog.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAG9D,KAAK,SAAS,GAAG,OAAO,KAAK,CAAA;AAe7B,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,8DAA8D;IAC9D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,eAAe,EAAE,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC,EAAE,CAAA;IAC9C,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtC;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,sEAAsE;IACtE,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AA+BD,yEAAyE;AACzE,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,SAAS,iBAAiB,EAAE,GAAG,SAAS,CAE3E;AAED,mFAAmF;AACnF,wBAAgB,iBAAiB,IAAI,OAAO,CAG3C;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,sBAAsB,EACnC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAwBvC;AA6FD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,EAAE,CAKlE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Message } from './common/llm-compat.ts';
|
|
2
|
+
/** Model/catalog facts that govern Codex Responses remote compaction v2. */
|
|
3
|
+
export interface CodexRemoteCompactionCapabilities {
|
|
4
|
+
contextWindow?: number | null;
|
|
5
|
+
autoCompactTokenLimit?: number | null;
|
|
6
|
+
compHash?: string | null;
|
|
7
|
+
}
|
|
8
|
+
/** An opaque server checkpoint plus the model configuration that minted it. */
|
|
9
|
+
export interface CodexRemoteCompactionCheckpoint {
|
|
10
|
+
item: Record<string, unknown>;
|
|
11
|
+
model: string;
|
|
12
|
+
compHash?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Whether the Codex line currently owns compaction instead of DSH. */
|
|
15
|
+
export declare function codexRemoteCompactionEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
16
|
+
/** A definite protocol refusal disables remote compaction until restart. */
|
|
17
|
+
export declare function noteCodexRemoteCompactionFailure(error: unknown): boolean;
|
|
18
|
+
/** Test seam; production resets only by restarting the host. */
|
|
19
|
+
export declare function resetCodexRemoteCompaction(): void;
|
|
20
|
+
/** Official catalog thresholds win; otherwise Codex derives 90% of the window. */
|
|
21
|
+
export declare function codexRemoteCompactionThreshold(capabilities: CodexRemoteCompactionCapabilities): number | null;
|
|
22
|
+
/** Conservative, transport-independent estimate used only to schedule compaction. */
|
|
23
|
+
export declare function estimateCodexPayloadTokens(payload: Record<string, unknown>): number;
|
|
24
|
+
export declare function shouldCompactCodexPayload(payload: Record<string, unknown>, capabilities: CodexRemoteCompactionCapabilities, env?: NodeJS.ProcessEnv): boolean;
|
|
25
|
+
/** Official Codex remote-v2 uses an input item, not public /responses/compact. */
|
|
26
|
+
export declare function withCodexCompactionTrigger(payload: Record<string, unknown>): Record<string, unknown>;
|
|
27
|
+
/** Keep the static head and the latest user turn around a fresh checkpoint. */
|
|
28
|
+
export declare function projectFreshCodexCompaction<T extends Record<string, unknown>>(payload: T, checkpoint: CodexRemoteCompactionCheckpoint): T;
|
|
29
|
+
/** Latest valid checkpoint in the persisted DSH transcript, if one exists. */
|
|
30
|
+
export declare function latestCodexCompaction(messages: readonly Message[], model: string, compHash: string | null | undefined): {
|
|
31
|
+
index: number;
|
|
32
|
+
checkpoint: CodexRemoteCompactionCheckpoint;
|
|
33
|
+
} | null;
|
|
34
|
+
/** Read a checkpoint only when its model configuration remains compatible. */
|
|
35
|
+
export declare function checkpointFromMetadata(metadata: Record<string, unknown> | null, model: string, compHash: string | null | undefined): CodexRemoteCompactionCheckpoint | null;
|
|
36
|
+
/** Extract exactly one opaque compaction item from a completed remote-v2 stream. */
|
|
37
|
+
export declare function checkpointFromOutputItems(items: readonly unknown[], model: string, compHash: string | null | undefined): CodexRemoteCompactionCheckpoint | null;
|
|
38
|
+
/** Finish-chunk metadata persisted on the ordinary assistant answer. */
|
|
39
|
+
export declare function codexCompactionReplayMetadata(checkpoint: CodexRemoteCompactionCheckpoint): Record<string, unknown>;
|
|
40
|
+
export declare function isCompactionItem(value: unknown): value is Record<string, unknown>;
|
|
41
|
+
//# sourceMappingURL=codex-remote-compaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-remote-compaction.d.ts","sourceRoot":"","sources":["../../../src/host/codex-remote-compaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAErD,4EAA4E;AAC5E,MAAM,WAAW,iCAAiC;IAChD,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,+EAA+E;AAC/E,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAID,uEAAuE;AACvE,wBAAgB,4BAA4B,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAI1F;AAED,4EAA4E;AAC5E,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CASxE;AAED,gEAAgE;AAChE,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD;AAED,kFAAkF;AAClF,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,iCAAiC,GAC9C,MAAM,GAAG,IAAI,CA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AA6B,CAC3C,UAAU,EAAE,+BAA+B,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-compat.d.ts","sourceRoot":"","sources":["../../../../src/host/common/brand-compat.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"brand-compat.d.ts","sourceRoot":"","sources":["../../../../src/host/common/brand-compat.ts"],"names":[],"mappings":"AAGA,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAMxD;AAED,eAAO,MAAM,YAAY,OAAQ,MAAM,KAAG,GAIzC,CAAA"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export interface PromptCacheActivity {
|
|
2
2
|
readonly lastActiveAt: number;
|
|
3
3
|
readonly totalTokens: number;
|
|
4
|
+
/** The cache lifetime this session's most recent request wrote with; absent = unknown. */
|
|
5
|
+
readonly ttlMs?: number;
|
|
4
6
|
}
|
|
5
7
|
export declare class PromptCacheActivityStore {
|
|
6
8
|
private readonly store;
|
|
7
9
|
constructor(provider: string, filePath?: string);
|
|
8
10
|
read(sessionId?: string): PromptCacheActivity | undefined;
|
|
9
|
-
record(sessionId: string | undefined, totalTokens: number, at?: number): void;
|
|
11
|
+
record(sessionId: string | undefined, totalTokens: number, at?: number, ttlMs?: number): void;
|
|
10
12
|
flush(): void;
|
|
11
13
|
}
|
|
12
14
|
/** One live store per provider; tests can still construct isolated instances by path. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-activity.d.ts","sourceRoot":"","sources":["../../../../src/host/common/cache-activity.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"cache-activity.d.ts","sourceRoot":"","sources":["../../../../src/host/common/cache-activity.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,0FAA0F;IAC1F,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AA0BD,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA8C;gBAExD,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAS/C,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAOzD,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,GAAE,MAAmB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAUzG,KAAK,IAAI,IAAI;CACd;AAID,yFAAyF;AACzF,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,wBAAwB,CAOnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/host/common/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CAAA;AAErE,iCAAiC;AACjC,MAAM,MAAM,aAAa,GACrB,gBAAgB,GAChB,kBAAkB,GAClB,YAAY,CAAA;AAEhB,uDAAuD;AACvD,MAAM,MAAM,UAAU,GAClB,mBAAmB,GACnB,oBAAoB,GACpB,iBAAiB,GACjB,kBAAkB,GAClB,wBAAwB,GACxB,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,cAAc,GAC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