@chatcode/chatcode-cli 3.0.4-rc.7 → 3.0.5-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +6 -6
- package/README.md +10 -4
- package/README.zh.md +10 -4
- package/lib/bin.js +23 -9
- package/lib/{command-errors-Ca64Lgba.js → command-errors-CsRCh0gk.js} +12 -12
- package/lib/{command-trees-CVc4Xu_z.js → command-trees-CD_43rxX.js} +2 -2
- package/lib/{component-identity-6aEut5Yt.js → component-identity-DGA2-TeB.js} +3 -3
- package/lib/{dump-config-ZzrfvtnX.js → dump-config-D8kXfdTs.js} +1 -1
- package/lib/dump-config-DuCc-QB7.js +2 -0
- package/lib/{dump-config-schema-BlO-eZ-J.js → dump-config-schema-CtZbroi6.js} +2 -2
- package/lib/{extension-events-C7MUpqVE.js → extension-events-D0BjYRqT.js} +21 -21
- package/lib/{host-access-CLbyAGT5.js → host-access-DLJjuR07.js} +1 -1
- package/lib/{keymap-82JwLLHe.js → keymap-C4cs2IBN.js} +2 -2
- package/lib/{plugin-BlQlWIR5.js → plugin-CGtTByud.js} +801 -456
- package/lib/{plugin-BZdazFXS.js → plugin-CYw-MBRn.js} +1 -1
- package/lib/{profile-boot-B0aEEQIR.js → profile-boot-CffsubnV.js} +7 -7
- package/lib/profile-boot.js +1 -1
- package/lib/{scenes-BNS0ZFyQ.js → scenes-CbAGK5Uy.js} +3 -3
- package/lib/{settings-sections-CXH24cu5.js → settings-sections-DYKDa04e.js} +3 -3
- package/lib/{statusBarSettings-BAMzn8fX.js → statusBarSettings-T1m8xad4.js} +3 -3
- package/lib/{themes-DXUIvP7m.js → themes-BY2ui1Dv.js} +12 -12
- package/lib/tui-compat-command-trees.js +1 -1
- package/lib/tui-compat-extensions.js +3 -3
- package/lib/tui-compat-plugin-host.js +5 -5
- package/lib/tui-compat-scenes.js +1 -1
- package/lib/tui-compat-settings-sections.js +1 -1
- package/lib/tui-compat-working-activity.js +1 -1
- package/lib/tui-compat-workspaces.js +1 -1
- package/lib/tui-compat.js +7 -7
- package/lib/types/bin.d.ts +9 -0
- package/lib/types/tui-compat.d.ts +1 -1
- package/lib/types/web-instance-process.d.ts +20 -0
- package/lib/{web-instance-DbP7IHPv.js → web-instance-D_Ppi2Zo.js} +176 -14
- package/lib/{web-instance-B0jec7cq.js → web-instance-amvCJWnq.js} +1 -1
- package/lib/{workspaces-CUJXNU5W.js → workspaces-D5VKbESy.js} +2 -2
- package/package.json +28 -29
- package/runtime/manifest.json +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +7 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +11 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/contract/snapshot.d.ts +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/assistant-stream.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/assistant-stream.js +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/session.js +10 -3
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +32 -11
- package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/index.js +62 -11
- package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/darwin-lock.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/index.d.ts +7 -2
- package/runtime/node_modules/@deepseek-ai/dsh-atomic-write/lib/types/linux-lock.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +7 -7
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +62 -62
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/client.js +10 -10
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +49 -49
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +204 -204
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +16 -16
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +159 -157
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/types/client/service.d.ts +4 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +74 -74
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +129 -123
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/index.js +19 -14
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/changes.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/Deliverables.d.ts +1 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/locales.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/present-open.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +2 -4
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +39 -39
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +16 -16
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +23 -23
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +37 -37
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +9 -9
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +12 -12
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +119 -32
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/catalog.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/directory.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/effort-preferences.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/slots.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +8 -8
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +18 -18
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +22 -22
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +128 -128
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +182 -182
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +130 -130
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +50 -50
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +88 -88
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +36 -36
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +13 -13
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/lib/client.js +27 -27
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/lib/client.js +42 -42
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +44 -46
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/lib/client.js +25 -25
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.excel.js +9 -9
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +70 -70
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +9 -9
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +18 -18
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +26 -26
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.js +16 -16
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.terminal.js +11 -11
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +20 -20
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +37 -37
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +27 -27
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +95 -95
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +197 -197
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +49 -49
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +24 -24
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +656 -152
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/ArchivedSessions.d.ts +9 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/locales.d.ts +46 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/DeleteSession.d.ts +9 -10
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/deletion.d.ts +57 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +32 -32
- package/runtime/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/client.js +24 -24
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +899 -453
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/adapter.d.ts +4 -20
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/adapter.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/serialize.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/sse.d.ts +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/translate.d.ts +37 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/types.d.ts +159 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/file-store.d.ts +3 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/files-api.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/index.d.ts +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocol-adapter.d.ts +41 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/protocol.d.ts +35 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/transport.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/types.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +5 -4
- package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +4 -4
- package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/index.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +12 -10
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/index.js +208 -39
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/archive.d.ts +47 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/archive.js +129 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/index.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/index.js +31 -8
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/recorder.d.ts +7 -2
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/recorder.js +35 -19
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/types.d.ts +11 -10
- package/runtime/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +1 -0
- package/scripts/link-embedded-runtime.mjs +1 -1
- package/lib/dump-config-CDixiJNt.js +0 -2
- package/lib/{home-migration-BjDmRwBB.js → home-migration-lRjtl2fP.js} +1 -1
- package/lib/{startup-diagnostics-C_hRCp-q.js → startup-diagnostics-4mLHYTFc.js} +1 -1
|
@@ -1,24 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import type { GenerateOptions, PreparedAdapterCall, StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
4
|
-
import type { DeepSeekAdapterOptions, DeepSeekConnectionOptions as Connection } from './types.ts';
|
|
1
|
+
import type { DeepSeekAdapterOptions, DeepSeekConnectionOptions } from './types.ts';
|
|
2
|
+
import { DeepSeekProtocolAdapter } from './protocol-adapter.ts';
|
|
5
3
|
/** DeepSeek provider using Messages content and native thinking replay. */
|
|
6
|
-
export declare class DeepSeekAdapter<C extends
|
|
7
|
-
|
|
8
|
-
private readonly files;
|
|
9
|
-
private readonly imageAccess;
|
|
4
|
+
export declare class DeepSeekAdapter<C extends DeepSeekConnectionOptions = DeepSeekConnectionOptions> extends DeepSeekProtocolAdapter<C> {
|
|
5
|
+
/** @param dependencies - request-local configuration, credentials, and Host services. */
|
|
10
6
|
constructor(dependencies: DeepSeekAdapterOptions<C>);
|
|
11
|
-
providerInfo(provider: string): {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
};
|
|
15
|
-
providerRetryPolicy(_provider: string): import("@deepseek-ai/dsh-llm").ResolvedRetryPolicy;
|
|
16
|
-
listModels(provider: string): Promise<never[] | import("@deepseek-ai/dsh-llm").LlmModelInfo[]>;
|
|
17
|
-
resolveModel(provider: string, model: string, _signal?: AbortSignal): Promise<import("@deepseek-ai/dsh-llm").LlmResolvedModelInfo>;
|
|
18
|
-
imageRequestPricing(_provider: string, model: string): import("@deepseek-ai/dsh-llm").LlmImageRequestPricing;
|
|
19
|
-
prepareCall(provider: string, model: string, _signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
20
|
-
stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
21
|
-
private generate;
|
|
22
|
-
private request;
|
|
23
7
|
}
|
|
24
8
|
//# sourceMappingURL=adapter.d.ts.map
|
package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/adapter.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DeepSeekProtocolAdapter } from '../protocol-adapter.ts';
|
|
2
|
+
import type { DeepSeekAdapterOptions, DeepSeekConnectionOptions } from '../types.ts';
|
|
3
|
+
/** DeepSeek OpenAI-compatible transport with raw reasoning replay and Files recovery. */
|
|
4
|
+
export declare class DeepSeekChatCompletionsAdapter<C extends DeepSeekConnectionOptions = DeepSeekConnectionOptions> extends DeepSeekProtocolAdapter<C> {
|
|
5
|
+
/** @param dependencies - explicit API root, request authentication, defaults, and Host services. */
|
|
6
|
+
constructor(dependencies: DeepSeekAdapterOptions<C>);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=adapter.d.ts.map
|
package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/serialize.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { serialize as serializeMessages } from '../serialize.ts';
|
|
2
|
+
import type { WireRequest } from './types.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Serialize prepared history without rewriting durable reasoning or tool arguments.
|
|
5
|
+
* Tool-result images follow their complete consecutive tool-result group in a user message.
|
|
6
|
+
* @param args - request, validated connection, prepared history/images, access resolver, replay reporter, and Files ids.
|
|
7
|
+
* @returns a streaming Chat Completions request with usage enabled.
|
|
8
|
+
*/
|
|
9
|
+
export declare function serialize(...args: Parameters<typeof serializeMessages>): WireRequest;
|
|
10
|
+
//# sourceMappingURL=serialize.d.ts.map
|
package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/sse.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decode an SSE byte stream into event `data` payloads. Framing — chunk
|
|
3
|
+
* reassembly, UTF-8/CRLF/BOM handling, comment and non-data field skipping,
|
|
4
|
+
* multi-`data:` joining — is `eventsource-parser`'s. Comments are reported
|
|
5
|
+
* only through an optional transport-activity callback. This module keeps the
|
|
6
|
+
* DeepSeek protocol: the literal `[DONE]` is yielded so the caller owns final
|
|
7
|
+
* flushing, and EOF before it raises {@link LlmError}. Framing is spec-strict:
|
|
8
|
+
* an event dispatches only on its blank-line terminator, so an unterminated
|
|
9
|
+
* tail at EOF is truncation, not a flushable payload.
|
|
10
|
+
*
|
|
11
|
+
* @module dsh-llm-deepseek/sse
|
|
12
|
+
*/
|
|
13
|
+
/** The terminal payload DeepSeek (and OpenAI) send after the last chunk. */
|
|
14
|
+
export declare const DONE = "[DONE]";
|
|
15
|
+
/**
|
|
16
|
+
* Parse an SSE byte stream into data payloads. Yields `[DONE]` as the final
|
|
17
|
+
* value and returns; throws `LlmError('STREAM_CLOSED')` when the stream ends
|
|
18
|
+
* without it (truncated response — the model call cannot be trusted).
|
|
19
|
+
* @param stream - raw SSE bytes; reads may split anywhere, including mid-UTF-8 sequence.
|
|
20
|
+
* @param onComment - optional transport-activity callback; comments never enter the yielded payload stream.
|
|
21
|
+
* @returns each event's data payload in arrival order, the `[DONE]` sentinel last.
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseSse(stream: ReadableStream<BufferSource>, onComment?: (comment: string) => void): AsyncGenerator<string>;
|
|
24
|
+
//# sourceMappingURL=sse.d.ts.map
|
package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/translate.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translate DeepSeek SSE payloads with one stateful harness block per content, reasoning, or tool
|
|
3
|
+
* call index. An empty initial reasoning delta does not open a block. Finish reason and the latest
|
|
4
|
+
* usage are deferred until `[DONE]`, covering both finish-attached and trailing usage-only shapes
|
|
5
|
+
* while ensuring no chunk follows `finish`.
|
|
6
|
+
*
|
|
7
|
+
* Translate DeepSeek wire chunks into the harness `StreamChunk` protocol.
|
|
8
|
+
* @module dsh-llm-deepseek/translate
|
|
9
|
+
*/
|
|
10
|
+
import type { FinishReason, StreamChunk, TokenUsage } from '@deepseek-ai/dsh-llm';
|
|
11
|
+
import type { WireUsage } from './types.ts';
|
|
12
|
+
/**
|
|
13
|
+
* Map the wire finish_reason vocabulary to the harness FinishReason.
|
|
14
|
+
* @param reason - the wire `finish_reason` string.
|
|
15
|
+
* @returns the mapped reason; unrecognized values (content_filter, …) become `{kind: 'error'}` with the uppercased value as `code`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function mapFinishReason(reason: string): FinishReason;
|
|
18
|
+
/**
|
|
19
|
+
* Map wire usage fields. DeepSeek's `prompt_tokens` INCLUDES cache hits
|
|
20
|
+
* (`prompt_tokens = prompt_cache_hit_tokens + prompt_cache_miss_tokens`,
|
|
21
|
+
* api/create-chat-completion); the harness TokenUsage convention is
|
|
22
|
+
* DISJOINT counts, so cache reads are subtracted out of `inputTokens`.
|
|
23
|
+
* @param usage - wire usage from the finish chunk or the trailing usage-only chunk.
|
|
24
|
+
* @returns disjoint harness counts; an exact total is present only when the
|
|
25
|
+
* aggregate prompt/completion counters are valid and agree with any wire total.
|
|
26
|
+
*/
|
|
27
|
+
export declare function mapUsage(usage: WireUsage): TokenUsage;
|
|
28
|
+
/**
|
|
29
|
+
* Consume SSE data payloads (ending with `[DONE]`) and yield StreamChunks.
|
|
30
|
+
* Malformed JSON payloads abort the stream with `MALFORMED_RESPONSE`.
|
|
31
|
+
* @param payloads - SSE data payloads from {@link parseSse}, `[DONE]`-terminated.
|
|
32
|
+
* @returns deltas as they arrive; `block-end`s, `usage`, and `finish` are all deferred to the `[DONE]` sentinel.
|
|
33
|
+
* A `stop` (or absent) finish with no opened blocks is a degenerate provider completion and maps to an
|
|
34
|
+
* `EMPTY_RESPONSE` error finish instead of a successful empty message.
|
|
35
|
+
*/
|
|
36
|
+
export declare function translate(payloads: AsyncIterable<string>): AsyncGenerator<StreamChunk>;
|
|
37
|
+
//# sourceMappingURL=translate.d.ts.map
|
package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/types/chat-completions/types.d.ts
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/** DeepSeek Chat Completions request and streaming response types. */
|
|
2
|
+
/** Request body for `POST {baseURL}/chat/completions`. */
|
|
3
|
+
export type WireRequest = {
|
|
4
|
+
model: string;
|
|
5
|
+
messages: WireMessage[];
|
|
6
|
+
stream: true;
|
|
7
|
+
stream_options: {
|
|
8
|
+
include_usage: true;
|
|
9
|
+
};
|
|
10
|
+
/** Thinking-mode toggle (top level, NOT inside extra_body on the wire). */
|
|
11
|
+
thinking?: {
|
|
12
|
+
type: 'enabled' | 'disabled';
|
|
13
|
+
};
|
|
14
|
+
/** Thinking effort (official levels). */
|
|
15
|
+
reasoning_effort?: 'low' | 'high' | 'max';
|
|
16
|
+
tools?: WireTool[];
|
|
17
|
+
temperature?: number;
|
|
18
|
+
max_tokens?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Stop sequences (OpenAI `stop`): generation halts as soon as the model
|
|
21
|
+
* produces any one of these strings. Mapped from `GenerateOptions.stop`.
|
|
22
|
+
*/
|
|
23
|
+
stop?: string[];
|
|
24
|
+
};
|
|
25
|
+
/** System-role message: a single string of instructions. */
|
|
26
|
+
export type WireSystemMessage = {
|
|
27
|
+
role: 'system';
|
|
28
|
+
content: string;
|
|
29
|
+
};
|
|
30
|
+
/** Text part inside a multimodal user message. */
|
|
31
|
+
export type WireTextContentPart = {
|
|
32
|
+
type: 'text';
|
|
33
|
+
text: string;
|
|
34
|
+
};
|
|
35
|
+
/** Files API reference inside a multimodal user message. */
|
|
36
|
+
export type WireFileContentPart = {
|
|
37
|
+
type: 'file';
|
|
38
|
+
file_id: string;
|
|
39
|
+
};
|
|
40
|
+
/** Inline base64 data URL inside a multimodal user message. */
|
|
41
|
+
export type WireImageUrlContentPart = {
|
|
42
|
+
type: 'image_url';
|
|
43
|
+
image_url: {
|
|
44
|
+
url: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/** One image representation accepted by a multimodal user message. */
|
|
48
|
+
export type WireImageContentPart = WireFileContentPart | WireImageUrlContentPart;
|
|
49
|
+
/** Ordered input part accepted by a multimodal user message. */
|
|
50
|
+
export type WireUserContentPart = WireTextContentPart | WireImageContentPart;
|
|
51
|
+
/** User-role message: text-only string or ordered multimodal input. */
|
|
52
|
+
export type WireUserMessage = {
|
|
53
|
+
role: 'user';
|
|
54
|
+
content: string | WireUserContentPart[];
|
|
55
|
+
};
|
|
56
|
+
/** Tool-role message: the result of one tool call, keyed by its call id. */
|
|
57
|
+
export type WireToolMessage = {
|
|
58
|
+
role: 'tool';
|
|
59
|
+
tool_call_id: string;
|
|
60
|
+
content: string;
|
|
61
|
+
};
|
|
62
|
+
/** One entry of the request `messages` array, discriminated on `role`. */
|
|
63
|
+
export type WireMessage = WireSystemMessage | WireUserMessage | WireAssistantMessage | WireToolMessage;
|
|
64
|
+
/** Assistant history retains empty-string content on tool-only and reasoning-only turns. */
|
|
65
|
+
export type WireAssistantMessage = {
|
|
66
|
+
role: 'assistant';
|
|
67
|
+
content: string;
|
|
68
|
+
/** Exact reasoning text replayed on every reasoning-carrying assistant turn. */
|
|
69
|
+
reasoning_content?: string;
|
|
70
|
+
tool_calls?: WireToolCall[];
|
|
71
|
+
};
|
|
72
|
+
/** A completed tool call replayed on an assistant history message; `arguments` is the raw JSON string. */
|
|
73
|
+
export type WireToolCall = {
|
|
74
|
+
id: string;
|
|
75
|
+
type: 'function';
|
|
76
|
+
function: {
|
|
77
|
+
name: string;
|
|
78
|
+
arguments: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
/** One entry of the request `tools` array; `parameters` is a JSON Schema object. */
|
|
82
|
+
export type WireTool = {
|
|
83
|
+
type: 'function';
|
|
84
|
+
function: {
|
|
85
|
+
name: string;
|
|
86
|
+
description: string;
|
|
87
|
+
parameters: Record<string, unknown>;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
/** One parsed SSE `data:` payload (a chat.completion.chunk). */
|
|
91
|
+
export type WireChunk = {
|
|
92
|
+
choices?: WireChoice[];
|
|
93
|
+
/** Arrives attached to the finish chunk and/or as a trailing usage-only chunk. */
|
|
94
|
+
usage?: WireUsage | null;
|
|
95
|
+
};
|
|
96
|
+
/** One streamed choice (requests always ask for a single one); `finish_reason` is non-null only on its terminal chunk. */
|
|
97
|
+
export type WireChoice = {
|
|
98
|
+
delta?: WireDelta;
|
|
99
|
+
finish_reason?: string | null;
|
|
100
|
+
};
|
|
101
|
+
/** The incremental content of one streamed choice; any subset of fields may be present per chunk. */
|
|
102
|
+
export type WireDelta = {
|
|
103
|
+
role?: string;
|
|
104
|
+
/** Visible text. Null/empty on reasoning/tool-call chunks. */
|
|
105
|
+
content?: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Thinking-mode CoT. The FIRST chunk carries an empty string (must not
|
|
108
|
+
* open a reasoning block); absent entirely in non-thinking mode.
|
|
109
|
+
*/
|
|
110
|
+
reasoning_content?: string | null;
|
|
111
|
+
tool_calls?: WireToolCallDelta[];
|
|
112
|
+
};
|
|
113
|
+
/** A streamed fragment of one tool call; fragments sharing an `index` concatenate into one call. */
|
|
114
|
+
export type WireToolCallDelta = {
|
|
115
|
+
/** Disambiguates parallel tool calls; stable across a call's deltas. */
|
|
116
|
+
index: number;
|
|
117
|
+
/**
|
|
118
|
+
* Carried by the first delta of each call. Gateways observed in the wild
|
|
119
|
+
* repeat it on continuation deltas as `''` or `null`; both mean "unchanged".
|
|
120
|
+
*/
|
|
121
|
+
id?: string | null;
|
|
122
|
+
type?: 'function';
|
|
123
|
+
function?: {
|
|
124
|
+
/** Carried by the first delta of each call, with the same `''`/`null` repetition as {@link WireToolCallDelta.id}. */
|
|
125
|
+
name?: string | null;
|
|
126
|
+
/** Argument JSON fragment (concatenate across deltas). */
|
|
127
|
+
arguments?: string | null;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Wire token accounting. `prompt_tokens` INCLUDES cache hits (it equals
|
|
132
|
+
* `prompt_cache_hit_tokens + prompt_cache_miss_tokens`); `mapUsage` subtracts
|
|
133
|
+
* them to keep the harness convention of disjoint counts.
|
|
134
|
+
* `prompt_tokens_details.cached_tokens` is the OpenAI-compat spelling of the
|
|
135
|
+
* hit count.
|
|
136
|
+
*/
|
|
137
|
+
export type WireUsage = {
|
|
138
|
+
prompt_tokens: number;
|
|
139
|
+
completion_tokens: number;
|
|
140
|
+
/** Provider-reported aggregate across prompt and completion tokens. */
|
|
141
|
+
total_tokens?: number;
|
|
142
|
+
prompt_cache_hit_tokens?: number;
|
|
143
|
+
prompt_cache_miss_tokens?: number;
|
|
144
|
+
prompt_tokens_details?: {
|
|
145
|
+
cached_tokens?: number;
|
|
146
|
+
};
|
|
147
|
+
completion_tokens_details?: {
|
|
148
|
+
reasoning_tokens?: number;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
/** Non-2xx error body. */
|
|
152
|
+
export type WireError = {
|
|
153
|
+
error?: {
|
|
154
|
+
message?: string;
|
|
155
|
+
type?: string;
|
|
156
|
+
code?: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -23,12 +23,15 @@ export interface DeepSeekFileReference {
|
|
|
23
23
|
uploaded: boolean;
|
|
24
24
|
}
|
|
25
25
|
interface FileStoreOptions {
|
|
26
|
+
/** Files dialect; omission retains the existing Messages namespace. */
|
|
27
|
+
protocol?: 'messages' | 'chat-completions';
|
|
26
28
|
index?: DeepSeekUploadIndex;
|
|
27
29
|
now?: () => number;
|
|
28
30
|
fetch?: typeof fetch;
|
|
29
31
|
}
|
|
30
32
|
/** User-scoped durable file-id reuse for the DeepSeek route. */
|
|
31
33
|
export declare class DeepSeekFileStore {
|
|
34
|
+
private readonly protocol;
|
|
32
35
|
private readonly index;
|
|
33
36
|
private readonly now;
|
|
34
37
|
private readonly fetchImpl;
|
|
@@ -46,6 +46,8 @@ export declare class DeepSeekFilesError extends LlmError {
|
|
|
46
46
|
*/
|
|
47
47
|
export declare function isFilesQuotaError(error: unknown): error is DeepSeekFilesError;
|
|
48
48
|
interface FilesApiOptions {
|
|
49
|
+
/** API dialect; omission retains Messages. */
|
|
50
|
+
protocol?: 'messages' | 'chat-completions';
|
|
49
51
|
baseURL: string;
|
|
50
52
|
/** Provider-resolved authentication headers for this endpoint. */
|
|
51
53
|
headers: Readonly<Record<string, string>>;
|
|
@@ -53,6 +55,7 @@ interface FilesApiOptions {
|
|
|
53
55
|
}
|
|
54
56
|
/** Direct Files client retaining the configured URL root and refusing redirects before credentials can leave its origin. */
|
|
55
57
|
export declare class DeepSeekFilesClient {
|
|
58
|
+
private readonly protocol;
|
|
56
59
|
private readonly baseURL;
|
|
57
60
|
private readonly authHeaders;
|
|
58
61
|
private readonly fetchImpl;
|
|
@@ -60,6 +63,7 @@ export declare class DeepSeekFilesClient {
|
|
|
60
63
|
* @param options - endpoint, authentication headers, and optional test transport.
|
|
61
64
|
*/
|
|
62
65
|
constructor(options: FilesApiOptions);
|
|
66
|
+
private parseFile;
|
|
63
67
|
private request;
|
|
64
68
|
/**
|
|
65
69
|
* Upload one image with an explicit expiry.
|
|
@@ -3,6 +3,7 @@ export { deepSeekConfigFields, Config, plainOptions, resolveAdapterOptions, PUBL
|
|
|
3
3
|
export type { Options, ResolvedDeepSeekOptions } from './config.ts';
|
|
4
4
|
export { DEFAULT_CONTEXT_WINDOW, DEFAULT_FILE_EXPIRY_SECONDS, DEFAULT_FILE_QUOTA_CLEANUP_BATCH, DEFAULT_FILE_REFRESH_MARGIN_SECONDS, DEFAULT_FILES_API_TIMEOUT_MS, DEFAULT_IMAGE_OFFLOAD_BYTE_QUANTUM, DEFAULT_IMAGE_OFFLOAD_COUNT_QUANTUM, DEFAULT_INLINE_IMAGE_OFFLOAD_BYTE_QUANTUM, DEFAULT_MAX_INLINE_REQUEST_IMAGE_BYTES, DEFAULT_MAX_TOKENS, DEFAULT_STREAM_IDLE_TIMEOUT_MS, } from './defaults.ts';
|
|
5
5
|
export { DeepSeekAdapter } from './adapter.ts';
|
|
6
|
+
export { DeepSeekChatCompletionsAdapter } from './chat-completions/adapter.ts';
|
|
6
7
|
export type { DeepSeekRequestAuth, DeepSeekAdapterOptions, DeepSeekCatalogModel, DeepSeekConnectionOptions } from './types.ts';
|
|
7
8
|
export { DEFAULT_LOW_DETAIL_IMAGE_PIXEL_BUDGET, DEFAULT_MAX_IMAGES_PER_REQUEST, DEFAULT_MAX_REQUEST_FILES_BYTES, DEFAULT_REQUEST_IMAGE_MAX_BYTES, REQUEST_IMAGE_MAX_DIMENSION, deepSeekImageRequestPricing, resolveRequestImageMaxBytes, resolveRequestImageTarget, } from './request-pricing.ts';
|
|
8
9
|
export { deepSeekImageTokens, deepSeekRequestImageDimensions } from './image-tokens.ts';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Shared cancellation, image recovery, authentication, and delivery lifecycle for DeepSeek protocols. */
|
|
2
|
+
import { LlmAdapter } from '@deepseek-ai/dsh-llm';
|
|
3
|
+
import type { GenerateOptions, PreparedAdapterCall, StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
4
|
+
import type { DeepSeekAdapterOptions, DeepSeekConnectionOptions as Connection } from './types.ts';
|
|
5
|
+
import type { DeepSeekProtocol } from './protocol.ts';
|
|
6
|
+
/** Provider adapter with protocol-independent request ownership and image recovery. */
|
|
7
|
+
export declare class DeepSeekProtocolAdapter<C extends Connection = Connection> extends LlmAdapter {
|
|
8
|
+
private readonly dependencies;
|
|
9
|
+
private readonly protocol;
|
|
10
|
+
private readonly files;
|
|
11
|
+
private readonly imageAccess;
|
|
12
|
+
/**
|
|
13
|
+
* @param dependencies - request-local configuration, authentication, and Host services.
|
|
14
|
+
* @param protocol - serializer, resource URLs, and stream decoder.
|
|
15
|
+
*/
|
|
16
|
+
constructor(dependencies: DeepSeekAdapterOptions<C>, protocol: DeepSeekProtocol);
|
|
17
|
+
providerInfo(provider: string): {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
};
|
|
21
|
+
providerRetryPolicy(_provider: string): import("@deepseek-ai/dsh-llm").ResolvedRetryPolicy;
|
|
22
|
+
listModels(provider: string): Promise<never[] | import("@deepseek-ai/dsh-llm").LlmModelInfo[]>;
|
|
23
|
+
resolveModel(provider: string, model: string, _signal?: AbortSignal): Promise<{
|
|
24
|
+
context?: import("@deepseek-ai/dsh-llm").LlmModelContext;
|
|
25
|
+
defaultMaxTokens?: number;
|
|
26
|
+
reasoning?: import("@deepseek-ai/dsh-llm").LlmModelReasoningInfo;
|
|
27
|
+
systemPromptUpdate?: import("@deepseek-ai/dsh-llm").SystemPromptUpdate;
|
|
28
|
+
provider: string;
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
inputModalities?: readonly import("@deepseek-ai/dsh-llm").ModelModality[];
|
|
33
|
+
}>;
|
|
34
|
+
imageRequestPricing(_provider: string, model: string): import("@deepseek-ai/dsh-llm").LlmImageRequestPricing;
|
|
35
|
+
prepareCall(provider: string, model: string, _signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
36
|
+
stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
37
|
+
private describe;
|
|
38
|
+
private generate;
|
|
39
|
+
private request;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=protocol-adapter.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Wire-specific operations used by the shared DeepSeek request lifecycle. */
|
|
2
|
+
import type { StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
3
|
+
import type { DeepSeekLlmApiExtensionRequest } from '@deepseek-ai/dsh-deepseek-llm-api-extensions';
|
|
4
|
+
import type { serialize } from './serialize.ts';
|
|
5
|
+
/** Serialization and transport rules for one DeepSeek API dialect. */
|
|
6
|
+
export interface DeepSeekProtocol {
|
|
7
|
+
/** API family included in transport diagnostics. */
|
|
8
|
+
readonly name: string;
|
|
9
|
+
/** Files API dialect and upload-cache namespace. */
|
|
10
|
+
readonly files: 'messages' | 'chat-completions';
|
|
11
|
+
/**
|
|
12
|
+
* Resolve the model endpoint.
|
|
13
|
+
* @param baseURL - configured API root.
|
|
14
|
+
* @returns the model request URL.
|
|
15
|
+
*/
|
|
16
|
+
endpoint(baseURL: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Serialize one request and its protocol-specific headers.
|
|
19
|
+
* @param args - prepared request inputs shared with the Messages serializer.
|
|
20
|
+
* @returns the request body and protocol headers.
|
|
21
|
+
*/
|
|
22
|
+
prepare(...args: Parameters<typeof serialize>): {
|
|
23
|
+
body: DeepSeekLlmApiExtensionRequest['body'];
|
|
24
|
+
headers: Readonly<Record<string, string>>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Convert provider bytes to Harness chunks, preserving terminal ordering.
|
|
28
|
+
* @param stream - provider response bytes.
|
|
29
|
+
* @param activity - notification for each received SSE frame.
|
|
30
|
+
* @param model - requested model id for response replay.
|
|
31
|
+
* @returns the decoded chunks.
|
|
32
|
+
*/
|
|
33
|
+
translate(stream: ReadableStream<BufferSource>, activity: () => void, model: string): AsyncIterable<StreamChunk>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -9,7 +9,8 @@ export declare function providerErrorDetail(raw: unknown): string;
|
|
|
9
9
|
* @param raw - decoded response or in-band error event.
|
|
10
10
|
* @param status - HTTP status when the error preceded streaming.
|
|
11
11
|
* @param headers - response headers for retry delay and request identity.
|
|
12
|
+
* @param protocol - API family used in fallback diagnostics; defaults to Messages.
|
|
12
13
|
* @returns a stable error consumed by LlmRuntime and llm-retry.
|
|
13
14
|
*/
|
|
14
|
-
export declare function providerError(raw: unknown, status: number | undefined, headers?: Headers): LlmError;
|
|
15
|
+
export declare function providerError(raw: unknown, status: number | undefined, headers?: Headers, protocol?: string): LlmError;
|
|
15
16
|
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Model catalog and request-local dependencies for DeepSeek
|
|
1
|
+
/** Model catalog and request-local dependencies for DeepSeek transports. */
|
|
2
2
|
import type { LlmModelInfo, ModelModality, SystemPromptUpdate, ToolUpdate, ResolvedRetryPolicy, ImageAttachmentAccess } from '@deepseek-ai/dsh-llm';
|
|
3
3
|
import type { AttachmentStore, ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
|
|
4
4
|
import type { AnonymousUserId } from '@deepseek-ai/dsh-anonymous-user-id';
|
|
@@ -47,7 +47,7 @@ export interface DeepSeekCatalogModel {
|
|
|
47
47
|
* makes a configuration change reach the next request without re-registration.
|
|
48
48
|
*/
|
|
49
49
|
export interface DeepSeekConnectionOptions {
|
|
50
|
-
/**
|
|
50
|
+
/** API root for the selected adapter; custom paths remain unchanged. */
|
|
51
51
|
baseURL: string;
|
|
52
52
|
/** Request defaults applied to every call (thinking mode, effort). */
|
|
53
53
|
defaults: RequestDefaults;
|
|
@@ -19,13 +19,14 @@ import { assertSupportedJsonSchema } from "@deepseek-ai/dsh-tools";
|
|
|
19
19
|
*/
|
|
20
20
|
/**
|
|
21
21
|
* The subprocess seam's scrubbed parent env (credential-shaped and stale
|
|
22
|
-
* `DSH_*` names dropped),
|
|
23
|
-
*
|
|
24
|
-
* spawn path.
|
|
22
|
+
* `DSH_*` names dropped), without pnpm's inherited package-manager version
|
|
23
|
+
* control, plus the spec's explicit env. The MCP SDK owns the actual spawn.
|
|
25
24
|
*/
|
|
26
25
|
function buildChildEnv(extra) {
|
|
26
|
+
const env = scrubbedParentEnv();
|
|
27
|
+
for (const key of Object.keys(env)) if (/^npm_config_manage[-_]package[-_]manager[-_]versions$/iu.test(key)) Reflect.deleteProperty(env, key);
|
|
27
28
|
return {
|
|
28
|
-
...
|
|
29
|
+
...env,
|
|
29
30
|
...extra
|
|
30
31
|
};
|
|
31
32
|
}
|
|
@@ -20,7 +20,7 @@ window.__ModuleLoader__.load({
|
|
|
20
20
|
* @returns one safe browser download filename.
|
|
21
21
|
*/
|
|
22
22
|
function sessionLogZipFilename(sessionId) {
|
|
23
|
-
return `
|
|
23
|
+
return `cco-session-${String(sessionId).replace(/[^A-Za-z0-9_-]/g, "_")}.zip`;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Hand a Host download route to the browser download manager, which resolves it
|
|
@@ -169,8 +169,8 @@ window.__ModuleLoader__.load({
|
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
//#endregion
|
|
172
|
-
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/
|
|
173
|
-
const css = ".
|
|
172
|
+
//#region \0dsh-css:/Users/shiguifeng/IdeaProjects/chonggou/chatcode-cli-harness/packages/session-query/session-log-export/src/client/HeaderAction.module.css.mjs
|
|
173
|
+
const css = ".yAiIdG_moreButton{width:28px;color:var(--dsw-alias-label-secondary);flex:none;padding:0}.yAiIdG_moreButton svg{width:15px;height:15px}";
|
|
174
174
|
const tagId = "@deepseek-ai/dsh-session-log-export/HeaderAction.module.css";
|
|
175
175
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
176
176
|
const tag = document.createElement("style");
|
|
@@ -179,7 +179,7 @@ window.__ModuleLoader__.load({
|
|
|
179
179
|
tag.textContent = css;
|
|
180
180
|
document.head.appendChild(tag);
|
|
181
181
|
}
|
|
182
|
-
var HeaderAction_module_css_default = { "moreButton": "
|
|
182
|
+
var HeaderAction_module_css_default = { "moreButton": "yAiIdG_moreButton" };
|
|
183
183
|
//#endregion
|
|
184
184
|
//#region lib/types/client/HeaderAction.js
|
|
185
185
|
/**
|
|
@@ -245,7 +245,7 @@ function safeSessionIdSegment(id) {
|
|
|
245
245
|
* @returns the attachment filename for the session's export archive.
|
|
246
246
|
*/
|
|
247
247
|
function sessionLogZipFilename(sessionId) {
|
|
248
|
-
return `
|
|
248
|
+
return `cco-session-${safeSessionIdSegment(sessionId)}.zip`;
|
|
249
249
|
}
|
|
250
250
|
/**
|
|
251
251
|
* Yield the export entries in zip order: the preloaded root log first, then
|
|
@@ -2653,12 +2653,12 @@ var JsonlSessionPersistence = class extends SessionPersistence {
|
|
|
2653
2653
|
} finally {
|
|
2654
2654
|
await marker.close();
|
|
2655
2655
|
}
|
|
2656
|
-
await this.syncDirPosix(dir);
|
|
2656
|
+
if (process.platform !== "win32") await this.syncDirPosix(dir);
|
|
2657
2657
|
for (const entry of await readdir(dir)) if (entry !== "session.lock" && entry !== DELETED_FILENAME) await rm(join(dir, entry), {
|
|
2658
2658
|
recursive: true,
|
|
2659
2659
|
force: true
|
|
2660
2660
|
});
|
|
2661
|
-
await this.syncDirPosix(dir);
|
|
2661
|
+
if (process.platform !== "win32") await this.syncDirPosix(dir);
|
|
2662
2662
|
}
|
|
2663
2663
|
for (const id of claimed) {
|
|
2664
2664
|
this.coldLogMemo.delete(id);
|
|
@@ -1687,6 +1687,11 @@ export const SERVICE_API = [
|
|
|
1687
1687
|
description: 'Bundle packages used to start this process, before any persisted edits.',
|
|
1688
1688
|
parameters: [],
|
|
1689
1689
|
},
|
|
1690
|
+
{
|
|
1691
|
+
signature: 'readonly defaults?: readonly PatchOptions[]',
|
|
1692
|
+
description: 'Launcher-owned defaults, applied after bundles and before editable profile and home patches.',
|
|
1693
|
+
parameters: [],
|
|
1694
|
+
},
|
|
1690
1695
|
{
|
|
1691
1696
|
signature: 'readonly overlays: readonly PatchOptions[]',
|
|
1692
1697
|
description: 'Parsed command-line overlays, applied above profile and home patches.',
|
|
@@ -3474,21 +3479,22 @@ export const SERVICE_API = [
|
|
|
3474
3479
|
},
|
|
3475
3480
|
{
|
|
3476
3481
|
key: 'workspaceChanges',
|
|
3477
|
-
summary: 'Serves
|
|
3478
|
-
description: 'Serves
|
|
3482
|
+
summary: 'Serves live and archived turn summaries and file comparisons.',
|
|
3483
|
+
description: 'Serves live and archived turn summaries and file comparisons.',
|
|
3479
3484
|
methods: [
|
|
3480
3485
|
{
|
|
3481
|
-
signature: 'summary(sessionId: SessionId, seq: number): WorkspaceChangesSummary | undefined',
|
|
3486
|
+
signature: 'summary(sessionId: SessionId, seq: number): Promise<WorkspaceChangesSummary | undefined>',
|
|
3482
3487
|
description: 'The summary announced by one `workspace/changes` event.',
|
|
3483
3488
|
parameters: [{ name: 'sessionId', description: 'the Session that appended the event.' }, { name: 'seq', description: 'the event\'s sequence number.' }],
|
|
3484
|
-
returns: 'the summary, or undefined
|
|
3489
|
+
returns: 'the live or archived summary, or undefined when no record exists.',
|
|
3490
|
+
throws: ['when an archived summary cannot be read or validated.'],
|
|
3485
3491
|
},
|
|
3486
3492
|
{
|
|
3487
3493
|
signature: 'diff(sessionId: SessionId, seq: number, index: number, signal: AbortSignal): Promise<WorkspaceFileDiff | undefined>',
|
|
3488
3494
|
description: 'Compare one listed file\'s contents at turn start and turn end.',
|
|
3489
3495
|
parameters: [{ name: 'sessionId', description: 'the Session that appended the event.' }, { name: 'seq', description: 'the event\'s sequence number.' }, { name: 'index', description: 'the file\'s index in the summary\'s `files`.' }, { name: 'signal', description: 'cancels the reads.' }],
|
|
3490
|
-
returns: 'the comparison, or undefined
|
|
3491
|
-
throws: ['when a snapshot read fails
|
|
3496
|
+
returns: 'the live or archived comparison, or undefined when no record or file exists.',
|
|
3497
|
+
throws: ['when a snapshot or archive read fails.'],
|
|
3492
3498
|
},
|
|
3493
3499
|
],
|
|
3494
3500
|
},
|
|
@@ -6483,10 +6489,6 @@ export const TYPE_API = [
|
|
|
6483
6489
|
name: 'SessionCreateValue',
|
|
6484
6490
|
declaration: 'export interface SessionCreateValue {\n readonly sessionId: SessionId;\n readonly agentPreset?: string;\n}',
|
|
6485
6491
|
},
|
|
6486
|
-
{
|
|
6487
|
-
name: 'SessionDeletion',
|
|
6488
|
-
declaration: 'export interface SessionDeletion extends AsyncDisposable {\n commit(): Promise<void>;\n}',
|
|
6489
|
-
},
|
|
6490
6492
|
{
|
|
6491
6493
|
name: 'SessionEvent',
|
|
6492
6494
|
declaration: 'export type SessionEvent<T extends SessionEventType = SessionEventType> = {\n [K in SessionEventType]: {\n type: K;\n seq: SessionSeq;\n time: number;\n data: SessionEventMap[K];\n ignorable?: true;\n } & (K extends SurfaceEventType ? SurfaceIntent<K> : {\n surfaceOp?: never;\n sourceEventSeqs?: never;\n });\n}[T];',
|