@eddyskywalker/dsh-chatgpt-subscription 0.80.5 → 0.81.3
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 +64969 -58737
- 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/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,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,EAA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AAM,CAAA;IACvB,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,OAAO,CAAA;IACjB,aAAa,EAAE,OAAO,CAAA;IACtB,QAAQ,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;I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gB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAuBxE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,sBAAsB,GAAG,iBAAiB,CAanH;AAGD,qBAAa,sBAAsB;IACrB,OAAO,CAAC,QAAQ,CAAC,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;AA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AE,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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AED,oFAAoF;AACpF,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,OAAO,EAAE,EACzB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAClC,+BAA+B,GAAG,IAAI,CAQxC;AAED,wEAAwE;AACxE,wBAAgB,6BAA6B,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,GAC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KAAK,EAAE,eAAe,EACtB,QAAQ,GAAE,SAAS,wBAAwB,EAAiC,GAC3E,oBAAoB,CAuCtB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,eAAe,EACtB,QAAQ,GAAE,SAAS,wBAAwB,EAAiC,GAC3E,oBAAoB,CAUtB;AAMD,oGAAoG;AACpG,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,KAAK,SAAM,EACX,QAAQ,GAAE,MAA0D,GACnE,OAAO,CAET;AAED,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,SAAW,EAAE,QAAQ,SAAY,GAAG,OAAO,CAEjG;AAED,yEAAyE;AACzE,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,SAAW,EAAE,QAAQ,SAAY,GAAG,OAAO,CAE3G;AAeD,gEAAgE;AAChE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,eAAe,CAEtF;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAEzE;AAED,mDAAmD;AACnD,wBAAgB,eAAe,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAElH"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare const CLAUDE_CAPABILITY_MEMORY_TTL_MS: number;
|
|
2
|
+
export declare const CLAUDE_CAPABILITY_MEMORY_MAX_KEYS = 500;
|
|
3
|
+
export declare const CLAUDE_API_CAPABILITY_MEMORY_TTL_MS: number;
|
|
4
|
+
export declare const CLAUDE_API_CAPABILITY_MEMORY_MAX_KEYS = 500;
|
|
5
|
+
export type ClaudeFastModeConclusion = 'unsupported' | 'beta';
|
|
6
|
+
export type ClaudeApiFastModeConclusion = ClaudeFastModeConclusion;
|
|
7
|
+
interface StoredField<T> {
|
|
8
|
+
value: T;
|
|
9
|
+
expiresAt: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ClaudeCapabilityRecord {
|
|
12
|
+
compaction?: StoredField<'unsupported'>;
|
|
13
|
+
fastMode?: StoredField<ClaudeFastModeConclusion>;
|
|
14
|
+
systemRole?: StoredField<'unsupported'>;
|
|
15
|
+
thinkingTokenCount?: StoredField<'unsupported'>;
|
|
16
|
+
}
|
|
17
|
+
export type ClaudeApiCapabilityRecord = ClaudeCapabilityRecord;
|
|
18
|
+
export interface ClaudeCapabilityFacts {
|
|
19
|
+
compactionUnsupported: boolean;
|
|
20
|
+
fastMode: ClaudeFastModeConclusion | undefined;
|
|
21
|
+
systemRoleUnsupported: boolean;
|
|
22
|
+
thinkingTokenCountUnsupported: boolean;
|
|
23
|
+
}
|
|
24
|
+
export type ClaudeApiCapabilityFacts = ClaudeCapabilityFacts;
|
|
25
|
+
export declare function claudeCapabilityMemoryPath(line?: 'claude' | 'claude-api'): string;
|
|
26
|
+
export declare function claudeApiCapabilityMemoryPath(): string;
|
|
27
|
+
export declare function serializeClaudeCapabilityMemory(records: Readonly<Record<string, ClaudeCapabilityRecord>>): string;
|
|
28
|
+
export declare const serializeClaudeApiCapabilityMemory: typeof serializeClaudeCapabilityMemory;
|
|
29
|
+
export declare function parseClaudeCapabilityMemory(value: unknown): Record<string, ClaudeCapabilityRecord>;
|
|
30
|
+
export declare const parseClaudeApiCapabilityMemory: typeof parseClaudeCapabilityMemory;
|
|
31
|
+
export declare class ClaudeCapabilityMemory {
|
|
32
|
+
private readonly filePath;
|
|
33
|
+
private readonly now;
|
|
34
|
+
private records;
|
|
35
|
+
private warmed;
|
|
36
|
+
private writeSequence;
|
|
37
|
+
constructor(filePath?: string, now?: () => number);
|
|
38
|
+
path(): string;
|
|
39
|
+
warm(): Promise<void>;
|
|
40
|
+
get(scope: string, model: string): ClaudeCapabilityFacts;
|
|
41
|
+
setCompactionUnsupported(scope: string, model: string): Promise<void>;
|
|
42
|
+
setFastMode(scope: string, model: string, value: ClaudeFastModeConclusion): Promise<void>;
|
|
43
|
+
setSystemRoleUnsupported(scope: string, model: string): Promise<void>;
|
|
44
|
+
setThinkingTokenCountUnsupported(scope: string, model: string): Promise<void>;
|
|
45
|
+
private set;
|
|
46
|
+
private pruneRecord;
|
|
47
|
+
private prune;
|
|
48
|
+
private persist;
|
|
49
|
+
}
|
|
50
|
+
export { ClaudeCapabilityMemory as ClaudeApiCapabilityMemory };
|
|
51
|
+
//# sourceMappingURL=claude-capability-memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-capability-memory.d.ts","sourceRoot":"","sources":["../../../../src/host/common/claude-capability-memory.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,+BAA+B,QAAuB,CAAA;AACnE,eAAO,MAAM,iCAAiC,MAAM,CAAA;AACpD,eAAO,MAAM,mCAAmC,QAAkC,CAAA;AAClF,eAAO,MAAM,qCAAqC,MAAoC,CAAA;AAEtF,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG,MAAM,CAAA;AAC7D,MAAM,MAAM,2BAA2B,GAAG,wBAAwB,CAAA;AAClE,UAAU,WAAW,CAAC,CAAC;IAAI,KAAK,EAAE,CAAC,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE;AAExD,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,wBAAwB,CAAC,CAAA;IAChD,UAAU,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;IACvC,kBAAkB,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;CAChD;AACD,MAAM,MAAM,yBAAyB,GAAG,sBAAsB,CAAA;AAE9D,M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,OAAO,CAAC,IAAI,CAAC;IAGzF,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAGrE,gCAAgC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAIrE,GAAG;IAYjB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,KAAK;YAWC,OAAO;CActB;AAED,OAAO,EAAE,sBAAsB,IAAI,yBAAyB,EAAE,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code first-party request attestation.
|
|
3
|
+
*
|
|
4
|
+
* The signature covers a plain-text hash view of the final serialized body while
|
|
5
|
+
* its billing block still carries the five-character cch=00000 placeholder.
|
|
6
|
+
* This implementation follows the capture-backed 2.1.330 reference in
|
|
7
|
+
* docs/2026-11-21_cch-attestation-report.md.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CLAUDE_CODE_CCH_SEED = 5577024349156291176n;
|
|
10
|
+
export declare const CLAUDE_CODE_CCH_MASK = 1048575n;
|
|
11
|
+
export declare const CLAUDE_CODE_CCH_PATTERN: RegExp;
|
|
12
|
+
/** Standard xxHash64 over UTF-8 text or raw bytes. */
|
|
13
|
+
export declare function claudeCodeXxHash64(value: string | Uint8Array, seed?: bigint): bigint;
|
|
14
|
+
/** The client's two ordered, deliberately textual rewrites. */
|
|
15
|
+
export declare function claudeCodeCchHashView(body: string): string;
|
|
16
|
+
/** Compute the five-hex token for a body that still contains cch=00000. */
|
|
17
|
+
export declare function claudeCodeCchToken(body: string, seed?: bigint): string;
|
|
18
|
+
/** Sign after serialization. A body without the placeholder is returned verbatim. */
|
|
19
|
+
export declare function signClaudeCodeCch(body: string, seed?: bigint): string;
|
|
20
|
+
//# sourceMappingURL=claude-code-cch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code-cch.d.ts","sourceRoot":"","sources":["../../../../src/host/common/claude-code-cch.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,oBAAoB,uBAAsB,CAAA;AACvD,eAAO,MAAM,oBAAoB,WAAW,CAAA;AAC5C,eAAO,MAAM,uBAAuB,QAAyB,CAAA;AAyB7D,sDAAsD;AACtD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,EAAE,IAAI,SAAK,GAAG,MAAM,CAqDhF;AAED,+DAA+D;AAC/D,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI1D;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAuB,GAAG,MAAM,CAIpF;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAuB,GAAG,MAAM,CAKnF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Shared, deliberately narrow recognizers for pre-output protocol corrections. */
|
|
2
|
+
export declare function isClaudeSpeedUnsupported(bodyText: string): boolean;
|
|
3
|
+
export declare function isClaudeSpeedNeedsBeta(bodyText: string): boolean;
|
|
4
|
+
export declare function isClaudeSystemRoleUnsupported(bodyText: string): boolean;
|
|
5
|
+
export declare function isClaudeThinkingTokenCountUnsupported(bodyText: string): boolean;
|
|
6
|
+
//# sourceMappingURL=claude-code-corrections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code-corrections.d.ts","sourceRoot":"","sources":["../../../../src/host/common/claude-code-corrections.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGlE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGhE;AAED,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGvE;AAED,wBAAgB,qCAAqC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI/E"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Message } from './llm-compat.ts';
|
|
2
|
+
/** First real user text used by cc_version's fingerprint; reminders and tool results do not count. */
|
|
3
|
+
export declare function claudeCodeFirstUserText(messages: readonly Message[]): string;
|
|
4
|
+
export declare const CLAUDE_CODE_BILLING_HEADER_PREFIX = "x-anthropic-billing-header";
|
|
5
|
+
export declare const CLAUDE_CODE_FINGERPRINT_SALT = "59cf53e54c78";
|
|
6
|
+
export declare const CLAUDE_CODE_BETA_THINKING_TOKEN_COUNT = "thinking-token-count-2026-05-13";
|
|
7
|
+
export declare const CLAUDE_CODE_BETA_CACHE_KEEPALIVE = "cache-keepalive-2026-09-03";
|
|
8
|
+
export declare const CLAUDE_CODE_BETA_EXTENDED_CACHE_TTL = "extended-cache-ttl-2025-04-11";
|
|
9
|
+
export declare const CLAUDE_CODE_BETA_CLEAR_AT = "mid-conversation-system-clear-at-2026-08-21";
|
|
10
|
+
export declare const CLAUDE_CODE_BETA_FAST_MODE = "fast-mode-2026-02-01";
|
|
11
|
+
/** Stainless headers captured from Claude Code 2.1.330; independent of the reported client version. */
|
|
12
|
+
export declare const CLAUDE_CODE_STAINLESS_HEADERS: Readonly<Record<string, string>>;
|
|
13
|
+
export interface ClaudeCodeBetaOptions {
|
|
14
|
+
auth: 'api-key' | 'oauth';
|
|
15
|
+
model?: string;
|
|
16
|
+
cacheTtl?: '5m' | '1h';
|
|
17
|
+
thinkingTokenCount?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Capture-backed first-party order. The Haiku order comes from the OAuth Haiku
|
|
21
|
+
* capture; API-key Haiku uses the same order with the three OAuth-only values removed.
|
|
22
|
+
*/
|
|
23
|
+
export declare function claudeCodeFirstPartyBetas(options: ClaudeCodeBetaOptions): string[];
|
|
24
|
+
/** Stable first-seen order, with no duplicate beta emitted by body-derived additions. */
|
|
25
|
+
export declare function mergeClaudeCodeBetas(...groups: readonly (readonly string[])[]): string[];
|
|
26
|
+
/** Deterministic UUID-shaped session id, namespaced per line. */
|
|
27
|
+
export declare function claudeCodeSessionUuid(sessionId: string, namespace?: string): string;
|
|
28
|
+
export interface ClaudeCodeFirstPartyContext {
|
|
29
|
+
readonly sessionUuid: string;
|
|
30
|
+
readonly promptUuid: string;
|
|
31
|
+
readonly requestUuid: string;
|
|
32
|
+
readonly promptIndex: number;
|
|
33
|
+
readonly turnIndex: number;
|
|
34
|
+
}
|
|
35
|
+
/** Bounded per-session prompt sequence. One adapter call is one prompt; retries reuse its context. */
|
|
36
|
+
export declare class ClaudeCodeFirstPartyTracker {
|
|
37
|
+
private readonly cap;
|
|
38
|
+
private readonly sessions;
|
|
39
|
+
constructor(cap?: number);
|
|
40
|
+
begin(sessionUuid: string, sessionKey?: string): ClaudeCodeFirstPartyContext;
|
|
41
|
+
}
|
|
42
|
+
export declare function claudeCodeFirstPartyHeaders(context: ClaudeCodeFirstPartyContext): Record<string, string>;
|
|
43
|
+
/** Three-hex suffix of cc_version, including the user's own first text. */
|
|
44
|
+
export declare function claudeCodeFingerprint(firstUserText: string, version: string): string;
|
|
45
|
+
export declare function claudeCodeBillingBlock(version: string, entrypoint: string, firstUserText: string, context: ClaudeCodeFirstPartyContext): string;
|
|
46
|
+
export declare function claudeCodeMetadataUserId(deviceId: string, accountUuid: string, sessionUuid: string): string;
|
|
47
|
+
export interface ClaudeCodeSystemBlock {
|
|
48
|
+
type: 'text';
|
|
49
|
+
text: string;
|
|
50
|
+
cache_control?: {
|
|
51
|
+
type: 'ephemeral';
|
|
52
|
+
ttl?: '1h';
|
|
53
|
+
scope?: 'global';
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface ClaudeCodeSystemOptions {
|
|
57
|
+
version: string;
|
|
58
|
+
entrypoint: string;
|
|
59
|
+
firstUserText: string;
|
|
60
|
+
context: ClaudeCodeFirstPartyContext;
|
|
61
|
+
identityText: string;
|
|
62
|
+
staticText?: string;
|
|
63
|
+
dynamicText?: string;
|
|
64
|
+
cacheTtl: '5m' | '1h';
|
|
65
|
+
}
|
|
66
|
+
/** First-party ordering without inventing prompt content the host does not have. */
|
|
67
|
+
export declare function buildClaudeCodeSystemBlocks(options: ClaudeCodeSystemOptions): ClaudeCodeSystemBlock[];
|
|
68
|
+
//# sourceMappingURL=claude-code-first-party.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code-first-party.d.ts","sourceRoot":"","sources":["../../../../src/host/common/claude-code-first-party.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C,sGAAsG;AACtG,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAY5E;AAED,eAAO,MAAM,iCAAiC,+BAA+B,CAAA;AAC7E,eAAO,MAAM,4BAA4B,iBAAiB,CAAA;AAC1D,eAAO,MAAM,qCAAqC,oCAAoC,CAAA;AACtF,eAAO,MAAM,gCAAgC,+BAA+B,CAAA;AAC5E,eAAO,MAAM,mCAAmC,kCAAkC,CAAA;AAClF,eAAO,MAAM,yBAAyB,gDAAgD,CAAA;AACtF,eAAO,MAAM,0BAA0B,yBAAyB,CAAA;AAEhE,uGAAuG;AACvG,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASzE,CAAA;AAqCF,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,qBAAq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