dsh-more 0.0.1 → 0.0.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/CONTRIBUTING.md +6 -6
- package/README.md +21 -9
- package/README.zh-CN.md +21 -9
- package/dist/client.js +1232 -174
- package/dist/index.js +451 -25
- package/dist/types/generated/host-settings-schema.d.ts +6 -0
- package/dist/types/generated/patch-catalog.d.ts +24 -0
- package/dist/types/patches/conversation-markdown-export/client/filename.d.ts +1 -0
- package/dist/types/patches/conversation-markdown-export/client/index.d.ts +2 -0
- package/dist/types/patches/conversation-markdown-export/host/index.d.ts +2 -0
- package/dist/types/patches/conversation-markdown-export/host/transcript.d.ts +9 -0
- package/dist/types/patches/conversation-markdown-export/shared.d.ts +5 -0
- package/dist/types/patches/conversation-quick-navigation/client/index.d.ts +22 -0
- package/dist/types/patches/conversation-quick-navigation/client/navigation.d.ts +26 -0
- package/dist/types/patches/conversation-quick-navigation/host/index.d.ts +2 -0
- package/dist/types/patches/conversation-quick-navigation/shared.d.ts +1 -0
- package/dist/types/patches/model-reasoning-efforts/client/index.d.ts +39 -0
- package/dist/types/patches/model-reasoning-efforts/host/index.d.ts +2 -0
- package/dist/types/patches/model-reasoning-efforts/host/validate.d.ts +13 -0
- package/dist/types/patches/model-reasoning-efforts/shared.d.ts +51 -0
- package/dist/types/patches/session-delete/host/session-deletion.d.ts +0 -1
- package/dist/types/platform/dsh/client/api.d.ts +2 -0
- package/dist/types/platform/dsh/client/message-targets.d.ts +13 -1
- package/dist/types/platform/dsh/client/styles.d.ts +1 -1
- package/dist/types/platform/dsh/host/continuation.d.ts +4 -0
- package/dist/types/platform/dsh/host/error.d.ts +1 -1
- package/dist/types/platform/dsh/host/wire.d.ts +7 -0
- package/dsh.plugin.json +12 -2
- package/package.json +7 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SessionEvent } from '@deepseek-ai/dsh-session';
|
|
2
|
+
import type { ConversationMarkdownExport } from '../shared.js';
|
|
3
|
+
export interface ConversationMarkdownOptions {
|
|
4
|
+
title: string;
|
|
5
|
+
sessionId: string;
|
|
6
|
+
exportedAt?: number;
|
|
7
|
+
}
|
|
8
|
+
/** Convert one immutable Session event snapshot into a complete Markdown transcript. */
|
|
9
|
+
export declare function conversationMarkdown(events: readonly SessionEvent[], options: ConversationMarkdownOptions): ConversationMarkdownExport;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { PatchActivationSource } from '../../../kernel/client/activation.js';
|
|
3
|
+
import type { ClientPatch } from '../../../kernel/client/patch.js';
|
|
4
|
+
import { type ConversationTurnSummary } from './navigation.js';
|
|
5
|
+
type HeaderUtilityProps = PropsRuntime<'conversation.session.header.utilities'>;
|
|
6
|
+
export declare function ConversationNavigationMenu({ turns, activeKey, hasMore, loadingOlder, autoLoadPaused, collapsed, onRetry, onToggleCollapsed, onJump, listRef, }: {
|
|
7
|
+
turns: readonly ConversationTurnSummary[];
|
|
8
|
+
activeKey: string | null;
|
|
9
|
+
hasMore: boolean;
|
|
10
|
+
loadingOlder: boolean;
|
|
11
|
+
autoLoadPaused: boolean;
|
|
12
|
+
collapsed: boolean;
|
|
13
|
+
onRetry: () => void;
|
|
14
|
+
onToggleCollapsed: () => void;
|
|
15
|
+
onJump: (key: string) => void;
|
|
16
|
+
listRef: React.RefObject<HTMLDivElement>;
|
|
17
|
+
}): JSX.Element;
|
|
18
|
+
export declare function ConversationQuickNavigation(props: HeaderUtilityProps & {
|
|
19
|
+
activation: PatchActivationSource;
|
|
20
|
+
}): JSX.Element | null;
|
|
21
|
+
export declare const clientPatch: ClientPatch;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ConversationSnapshot } from '@deepseek-ai/dsh-client-runtime/client';
|
|
2
|
+
export interface ConversationTurnSummary {
|
|
3
|
+
key: string;
|
|
4
|
+
seq: number;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TurnPosition {
|
|
8
|
+
key: string;
|
|
9
|
+
top: number;
|
|
10
|
+
}
|
|
11
|
+
export interface AutoLoadOlderState {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
surfaceAvailable: boolean;
|
|
14
|
+
hasMore: boolean;
|
|
15
|
+
loadingOlder: boolean;
|
|
16
|
+
paused: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Select stable user-authored turn summaries without observing assistant streaming frames. */
|
|
19
|
+
export declare function createConversationTurnSelector(): (snapshot: ConversationSnapshot) => readonly ConversationTurnSummary[];
|
|
20
|
+
/** Stable evidence that an older history page prepended visible conversation material. */
|
|
21
|
+
export declare function historyWindowSignature(snapshot: ConversationSnapshot): string;
|
|
22
|
+
export declare function shouldAutoLoadOlder(state: AutoLoadOlderState): boolean;
|
|
23
|
+
/** Pick the last turn at or above the reading line, falling back to the first turn. */
|
|
24
|
+
export declare function activeTurnAt(positions: readonly TurnPosition[], readingLine: number): string | null;
|
|
25
|
+
/** Translate a row's viewport coordinate into a bounded scrollport offset. */
|
|
26
|
+
export declare function scrollOffsetForRow(currentScrollTop: number, scrollportTop: number, rowTop: number, topInset?: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CONVERSATION_QUICK_NAVIGATION_PATCH_ID = "conversation-quick-navigation";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { SettingsScope } from '@deepseek-ai/dsh-client-runtime/client';
|
|
2
|
+
import type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
import type { PatchActivationSource } from '../../../kernel/client/activation.js';
|
|
4
|
+
import type { ClientPatch } from '../../../kernel/client/patch.js';
|
|
5
|
+
import { type ThinkingLevel } from '../shared.js';
|
|
6
|
+
type OverlayProps = PropsRuntime<'shell.overlay'>;
|
|
7
|
+
/** One level's editing state inside a model's draft. */
|
|
8
|
+
interface LevelDraft {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
wire: string;
|
|
11
|
+
}
|
|
12
|
+
/** One model's in-progress reasoning-effort draft. */
|
|
13
|
+
export interface ModelDraft {
|
|
14
|
+
nonReasoning: boolean;
|
|
15
|
+
levels: Partial<Record<ThinkingLevel, LevelDraft>>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The level toggles + wire-value inputs shared by the editor modal. Draft
|
|
19
|
+
* state lives in the caller so the modal survives models-page re-renders.
|
|
20
|
+
*/
|
|
21
|
+
export declare function EffortEditorBody({ draft, setDraft, writable, busy }: {
|
|
22
|
+
draft: ModelDraft;
|
|
23
|
+
setDraft: (updater: (current: ModelDraft) => ModelDraft) => void;
|
|
24
|
+
writable: boolean;
|
|
25
|
+
busy: boolean;
|
|
26
|
+
}): JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Persistent frame entry that drops a reasoning-effort button into every model
|
|
29
|
+
* row of the shipped Models page model catalog and owns the editor modal. The
|
|
30
|
+
* buttons are plain DOM (stateless) re-synced by a MutationObserver, so the
|
|
31
|
+
* models page can re-render freely; the modal's state lives in this component,
|
|
32
|
+
* which the slot system never unmounts.
|
|
33
|
+
*/
|
|
34
|
+
export declare function ModelsPageEffortPortal(props: OverlayProps & {
|
|
35
|
+
scope: SettingsScope<unknown>;
|
|
36
|
+
activation: PatchActivationSource;
|
|
37
|
+
}): JSX.Element | null;
|
|
38
|
+
export declare const clientPatch: ClientPatch;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ModelReasoningEfforts } from '../shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validate a client-supplied `reasoningEfforts` payload, mirroring the
|
|
4
|
+
* pi-ai profile rules the adapter enforces when it resolves a route:
|
|
5
|
+
* - `null`/`undefined` means "clear" (fall back to the installed catalog).
|
|
6
|
+
* - `false` means "this model does not reason".
|
|
7
|
+
* - otherwise a dict whose keys are known levels, whose non-`off` values are
|
|
8
|
+
* non-empty wire spellings, and which offers at least one level beyond `off`.
|
|
9
|
+
*
|
|
10
|
+
* Rejecting invalid payloads here refuses the `settings.mutate` that would
|
|
11
|
+
* otherwise store a profile the adapter would refuse on its next resolution.
|
|
12
|
+
*/
|
|
13
|
+
export declare function validateReasoningEfforts(raw: unknown): ModelReasoningEfforts | null;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare const MODEL_REASONING_EFFORTS_PATCH_ID = "model-reasoning-efforts";
|
|
2
|
+
/**
|
|
3
|
+
* The llm-pi-ai settings namespace this patch reads and writes. The shipped
|
|
4
|
+
* Models settings page writes custom providers into the same namespace, so a
|
|
5
|
+
* profile stored there is exactly what this patch annotates with
|
|
6
|
+
* `reasoningEfforts`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const LLM_PI_AI_SETTINGS_NAMESPACE = "llm-pi-ai";
|
|
9
|
+
/**
|
|
10
|
+
* Every pi-ai thinking level a model may offer, in escalation order. Mirror of
|
|
11
|
+
* the `THINKING_LEVELS` the installed `dsh-llm-pi-ai` adapter accepts; a level
|
|
12
|
+
* absent from a model's dict is simply not offered.
|
|
13
|
+
*/
|
|
14
|
+
export declare const THINKING_LEVELS: readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
15
|
+
export type ThinkingLevel = typeof THINKING_LEVELS[number];
|
|
16
|
+
/**
|
|
17
|
+
* The reasoning-effort set auto-filled onto a model that has none. DSH does
|
|
18
|
+
* not expose a model's true supported levels for custom providers (the pi-ai
|
|
19
|
+
* catalog lives behind the adapter, and `resolveModelInfo` does not surface
|
|
20
|
+
* reasoning for custom routes), so the patch fills a common default which the
|
|
21
|
+
* user can adjust per model. A model with no `reasoningEfforts` at all is
|
|
22
|
+
* treated as non-reasoning by the adapter, so this override is what makes a
|
|
23
|
+
* freshly fetched model think.
|
|
24
|
+
*/
|
|
25
|
+
export declare const DEFAULT_REASONING_EFFORTS: Partial<Record<ThinkingLevel, string>>;
|
|
26
|
+
/**
|
|
27
|
+
* One model's reasoning-effort capability as stored in `settings.yaml`:
|
|
28
|
+
* `false` means the model does not reason at all; a dict maps each offered
|
|
29
|
+
* level to the wire spelling dispatch should send for it (`off` may leave its
|
|
30
|
+
* spelling empty — "supported, send nothing").
|
|
31
|
+
*/
|
|
32
|
+
export type ModelReasoningEfforts = false | Partial<Record<ThinkingLevel, string | null>>;
|
|
33
|
+
/** One configured model's reasoning-effort state; `null` = not configured (falls back to the installed catalog). */
|
|
34
|
+
export interface ModelReasoningEffortsRow {
|
|
35
|
+
provider: string;
|
|
36
|
+
providerName: string;
|
|
37
|
+
modelId: string;
|
|
38
|
+
reasoningEfforts: ModelReasoningEfforts | null;
|
|
39
|
+
}
|
|
40
|
+
/** What the settings page renders from, returned by the `read` route. */
|
|
41
|
+
export interface ModelReasoningEffortsSnapshot {
|
|
42
|
+
rows: readonly ModelReasoningEffortsRow[];
|
|
43
|
+
writable: boolean;
|
|
44
|
+
documentPath: string | undefined;
|
|
45
|
+
}
|
|
46
|
+
/** The `save` route payload; `reasoningEfforts: null` clears the field. */
|
|
47
|
+
export interface SaveModelReasoningEffortsPayload {
|
|
48
|
+
provider: string;
|
|
49
|
+
modelId: string;
|
|
50
|
+
reasoningEfforts: ModelReasoningEfforts | null;
|
|
51
|
+
}
|
|
@@ -2,5 +2,4 @@ import type { Context } from '@deepseek-ai/cordis';
|
|
|
2
2
|
/** Stop/unload a Session, then recursively remove its exact persistence directory. */
|
|
3
3
|
export declare function deleteSessionPermanently(ctx: Context, rawSessionId: string): Promise<{
|
|
4
4
|
sessionId: string;
|
|
5
|
-
deletedPath: string;
|
|
6
5
|
}>;
|
|
@@ -3,4 +3,6 @@ export declare class DshMoreApiError extends Error {
|
|
|
3
3
|
constructor(code: string, message: string);
|
|
4
4
|
}
|
|
5
5
|
export declare function callPatchApi<T>(patchId: string, action: string, payload: unknown): Promise<T>;
|
|
6
|
+
/** Fetch a large successful payload as a Blob, avoiding JSON stringify/parse copies. */
|
|
7
|
+
export declare function callPatchBlobApi(patchId: string, action: string, payload: unknown): Promise<Blob>;
|
|
6
8
|
export declare function apiErrorText(error: unknown): string;
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
+
import type { ConversationSnapshot } from '@deepseek-ai/dsh-client-runtime/client';
|
|
1
2
|
import type { ConversationHeaderProps, MessageTarget } from '../../../kernel/client/message-actions.js';
|
|
2
|
-
export
|
|
3
|
+
export interface MessageSurfaceRow {
|
|
4
|
+
key: string;
|
|
5
|
+
presentationSeq: number | undefined;
|
|
6
|
+
action: Omit<MessageTarget, 'key' | 'host'> | null;
|
|
7
|
+
}
|
|
8
|
+
export interface MessageSurfaceSnapshot {
|
|
9
|
+
rows: readonly MessageSurfaceRow[];
|
|
10
|
+
byKey: ReadonlyMap<string, MessageSurfaceRow>;
|
|
11
|
+
}
|
|
12
|
+
/** Select only facts used by message actions, retaining identity across unrelated stream frames. */
|
|
13
|
+
export declare function createMessageSurfaceSelector(active?: boolean): (snapshot: ConversationSnapshot) => MessageSurfaceSnapshot;
|
|
14
|
+
export declare function useMessageTargets(props: ConversationHeaderProps, hiddenSeqs: ReadonlySet<number>, hiddenTrajectoryKeys: ReadonlySet<string>, active?: boolean): readonly MessageTarget[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const styles = "\n.dshmore-inline-actions { display: inline-flex; align-items: center; gap: 10px; }\n.dshmore-inline-button { width: 28px; height: 28px; color: var(--dsw-alias-label-tertiary); cursor: pointer; background: transparent; border: 0; border-radius: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 6px; }\n.dshmore-inline-button:hover { color: var(--dsw-alias-label-secondary); background: var(--dsw-alias-interactive-bg-hover); }\n.dshmore-edit-modal { box-sizing: border-box; width: min(620px, calc(100vw - 32px)) !important; max-width: min(620px, calc(100vw - 32px)) !important; }\n.dshmore-dialog-body { box-sizing: border-box; display: grid; gap: 12px; width: 100%; min-width: 0; overflow: hidden; }\n.dshmore-message-preview { box-sizing: border-box; width: 100%; min-width: 0; max-height: 132px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; padding: 12px; border-radius: 10px; color: var(--dsw-alias-label-secondary); background: var(--dsw-alias-bg-layer-1); font-size: 13px; line-height: 1.55; }\n.dshmore-editor { box-sizing: border-box; display: block; width: 100%; min-width: 0; max-width: 100%; resize: vertical; min-height: 150px; border: 1px solid var(--dsw-alias-border-l2); border-radius: 10px; outline: none; padding: 12px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1); font: inherit; line-height: 1.55; overflow-x: hidden; overflow-wrap: anywhere; word-break: break-word; }\n.dshmore-editor:focus { border-color: var(--dsw-alias-state-business-primary); }\n.dshmore-warning { padding: 10px 12px; border: 1px solid rgba(220,138,40,.35); border-radius: 10px; background: rgba(220,138,40,.09); color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 1.5; }\n.dshmore-danger { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(208,58,58,.10); color: var(--dsw-alias-state-error-primary, rgb(220,90,90)); font-size: 12px; line-height: 1.5; }\n.dshmore-error { padding: 10px 12px; border-radius: 10px; background: rgba(208,58,58,.10); color: var(--dsw-alias-state-error-primary, rgb(220,90,90)); font-size: 12px; line-height: 1.5; }\n@media (max-width: 620px) { .dshmore-edit-modal { width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important; } }\n.dshmore-action-contribution { display: inline-flex; align-items: center; order: var(--dshmore-action-order); }\n.dshmore-config-card { box-sizing: border-box; list-style: none; border: 1px solid var(--dsw-alias-border-l2); border-radius: 12px; background: var(--dsw-alias-bg-layer-3); overflow: hidden; transition: border-color .16s, background .16s; }\n.dshmore-config-card:hover { border-color: var(--dsw-alias-label-dimmed); }\n.dshmore-config-card-open { border-color: var(--dsw-alias-label-dimmed); background: var(--dsw-alias-bg-layer-2); }\n.dshmore-config-heading { appearance: none; box-sizing: border-box; width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; background: transparent; border: 0; border-radius: 12px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }\n.dshmore-config-heading:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dshmore-config-heading-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }\n.dshmore-config-heading-copy strong { color: var(--dsw-alias-label-primary); font-size: 15px; line-height: 1.4; }\n.dshmore-config-heading-copy > span, .dshmore-config-copy span, .dshmore-config-note { color: var(--dsw-alias-label-tertiary); font-size: 13px; line-height: 1.5; }\n.dshmore-config-chevron { flex: none; color: var(--dsw-alias-label-tertiary); }\n.dshmore-config-chevron-open { transform: rotate(180deg); }\n.dshmore-config-body { margin: 0 16px; padding-bottom: 8px; border-top: 1px solid var(--dsw-alias-border-l2); }\n.dshmore-config-list { display: grid; }\n.dshmore-config-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; cursor: pointer; }\n.dshmore-config-row + .dshmore-config-row { border-top: 1px solid var(--dsw-alias-border-l1); }\n.dshmore-config-row:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dshmore-config-copy { min-width: 0; display: grid; gap: 2px; }\n.dshmore-config-copy strong { color: var(--dsw-alias-label-primary); font-size: 13px; }\n.dshmore-config-row input { width: 34px; height: 18px; flex: none; cursor: pointer; accent-color: var(--dsw-alias-state-business-primary); }\n.dshmore-config-row input:disabled { cursor: default; opacity: .5; }\n.dshmore-config-note, .dshmore-config-error { margin: 0; padding: 10px 0; border-top: 1px solid var(--dsw-alias-border-l1); }\n.dshmore-config-error { color: var(--dsw-alias-state-error-primary, rgb(220,90,90)); font-size: 12px; }\n@media (prefers-reduced-motion: no-preference) { .dshmore-config-chevron { transition: transform .16s; } }\n";
|
|
1
|
+
export declare const styles = "\n[data-dshmore-hidden] { display: none !important; }\n.dshmore-inline-actions { display: inline-flex; align-items: center; gap: 10px; }\n.dshmore-inline-button { width: 28px; height: 28px; color: var(--dsw-alias-label-tertiary); cursor: pointer; background: transparent; border: 0; border-radius: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 6px; }\n.dshmore-inline-button:hover { color: var(--dsw-alias-label-secondary); background: var(--dsw-alias-interactive-bg-hover); }\n.dshmore-edit-modal { box-sizing: border-box; width: min(620px, calc(100vw - 32px)) !important; max-width: min(620px, calc(100vw - 32px)) !important; }\n.dshmore-dialog-body { box-sizing: border-box; display: grid; gap: 12px; width: 100%; min-width: 0; overflow: hidden; }\n.dshmore-message-preview { box-sizing: border-box; width: 100%; min-width: 0; max-height: 132px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; padding: 12px; border-radius: 10px; color: var(--dsw-alias-label-secondary); background: var(--dsw-alias-bg-layer-1); font-size: 13px; line-height: 1.55; }\n.dshmore-editor { box-sizing: border-box; display: block; width: 100%; min-width: 0; max-width: 100%; resize: vertical; min-height: 150px; border: 1px solid var(--dsw-alias-border-l2); border-radius: 10px; outline: none; padding: 12px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1); font: inherit; line-height: 1.55; overflow-x: hidden; overflow-wrap: anywhere; word-break: break-word; }\n.dshmore-editor:focus { border-color: var(--dsw-alias-state-business-primary); }\n.dshmore-warning { padding: 10px 12px; border: 1px solid rgba(220,138,40,.35); border-radius: 10px; background: rgba(220,138,40,.09); color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 1.5; }\n.dshmore-danger { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(208,58,58,.10); color: var(--dsw-alias-state-error-primary, rgb(220,90,90)); font-size: 12px; line-height: 1.5; }\n.dshmore-error { padding: 10px 12px; border-radius: 10px; background: rgba(208,58,58,.10); color: var(--dsw-alias-state-error-primary, rgb(220,90,90)); font-size: 12px; line-height: 1.5; }\n@media (max-width: 620px) { .dshmore-edit-modal { width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important; } }\n.dshmore-action-contribution { display: inline-flex; align-items: center; order: var(--dshmore-action-order); }\n.dshmore-config-card { box-sizing: border-box; list-style: none; border: 1px solid var(--dsw-alias-border-l2); border-radius: 12px; background: var(--dsw-alias-bg-layer-3); overflow: hidden; transition: border-color .16s, background .16s; }\n.dshmore-config-card:hover { border-color: var(--dsw-alias-label-dimmed); }\n.dshmore-config-card-open { border-color: var(--dsw-alias-label-dimmed); background: var(--dsw-alias-bg-layer-2); }\n.dshmore-config-heading { appearance: none; box-sizing: border-box; width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; background: transparent; border: 0; border-radius: 12px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }\n.dshmore-config-heading:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dshmore-config-heading-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }\n.dshmore-config-heading-copy strong { color: var(--dsw-alias-label-primary); font-size: 15px; line-height: 1.4; }\n.dshmore-config-heading-copy > span, .dshmore-config-copy span, .dshmore-config-note { color: var(--dsw-alias-label-tertiary); font-size: 13px; line-height: 1.5; }\n.dshmore-config-chevron { flex: none; color: var(--dsw-alias-label-tertiary); }\n.dshmore-config-chevron-open { transform: rotate(180deg); }\n.dshmore-config-body { margin: 0 16px; padding-bottom: 8px; border-top: 1px solid var(--dsw-alias-border-l2); }\n.dshmore-config-list { display: grid; }\n.dshmore-config-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; cursor: pointer; }\n.dshmore-config-row + .dshmore-config-row { border-top: 1px solid var(--dsw-alias-border-l1); }\n.dshmore-config-row:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dshmore-config-copy { min-width: 0; display: grid; gap: 2px; }\n.dshmore-config-copy strong { color: var(--dsw-alias-label-primary); font-size: 13px; }\n.dshmore-config-row input { width: 34px; height: 18px; flex: none; cursor: pointer; accent-color: var(--dsw-alias-state-business-primary); }\n.dshmore-config-row input:disabled { cursor: default; opacity: .5; }\n.dshmore-config-note, .dshmore-config-error { margin: 0; padding: 10px 0; border-top: 1px solid var(--dsw-alias-border-l1); }\n.dshmore-config-error { color: var(--dsw-alias-state-error-primary, rgb(220,90,90)); font-size: 12px; }\n@media (prefers-reduced-motion: no-preference) { .dshmore-config-chevron { transition: transform .16s; } }\n";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentHandle } from '@deepseek-ai/dsh-agent';
|
|
2
|
+
import type { Workspace } from '@deepseek-ai/dsh-workspace';
|
|
3
|
+
/** Undo the public side effects of a continuation that failed before publication. */
|
|
4
|
+
export declare function rollbackFailedContinuation(child: AgentHandle, workspace: Workspace | undefined, attached: boolean, cause: unknown): Promise<never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type DshMoreErrorCode = 'bad-request' | 'forbidden' | 'method-not-allowed' | 'not-found' | 'session-not-live' | 'session-busy' | 'invalid-turn-range' | 'selection-empty' | 'stale-preview' | 'patch-disabled' | 'internal';
|
|
1
|
+
export type DshMoreErrorCode = 'bad-request' | 'payload-too-large' | 'forbidden' | 'method-not-allowed' | 'unsupported-media-type' | 'not-found' | 'session-not-live' | 'session-busy' | 'invalid-turn-range' | 'selection-empty' | 'stale-preview' | 'patch-disabled' | 'internal';
|
|
2
2
|
export declare class DshMoreError extends Error {
|
|
3
3
|
readonly code: DshMoreErrorCode;
|
|
4
4
|
readonly status: number;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
/** Successful non-JSON payload that should pass through without serialization. */
|
|
3
|
+
export declare class RawPatchResponse {
|
|
4
|
+
readonly body: string;
|
|
5
|
+
readonly contentType: string;
|
|
6
|
+
constructor(body: string, contentType: string);
|
|
7
|
+
}
|
|
8
|
+
export declare function requireJsonContentType(req: IncomingMessage): void;
|
|
2
9
|
export declare function readJson(req: IncomingMessage): Promise<unknown>;
|
|
3
10
|
export declare function requireString(value: unknown, key: string): string;
|
|
4
11
|
export declare function requireInteger(value: unknown, key: string): number;
|
package/dsh.plugin.json
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-more",
|
|
3
3
|
"description": "Practical patches for missing DSH Web context and history controls",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"entry": {
|
|
6
6
|
"name": "dsh-more",
|
|
7
|
-
"inject": [
|
|
7
|
+
"inject": [
|
|
8
|
+
"webServer",
|
|
9
|
+
"webRuntime",
|
|
10
|
+
"agents",
|
|
11
|
+
"sessions",
|
|
12
|
+
"sessionPersistence",
|
|
13
|
+
"sessionProjections",
|
|
14
|
+
"workspaceRegistry",
|
|
15
|
+
"agentPresets",
|
|
16
|
+
"settings"
|
|
17
|
+
]
|
|
8
18
|
},
|
|
9
19
|
"client": {
|
|
10
20
|
"platform": "web"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-more",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Practical patches for missing DeepSeek Harness Web context and history controls.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dsh-plugin"
|
|
20
20
|
],
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": "
|
|
22
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
23
23
|
},
|
|
24
24
|
"packageManager": "pnpm@11.6.0",
|
|
25
25
|
"publishConfig": {
|
|
@@ -66,11 +66,13 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
|
+
"validate:package": "node scripts/validate-package-manifests.mjs",
|
|
70
|
+
"peers:check": "pnpm peers check",
|
|
69
71
|
"generate": "node scripts/generate-patch-registry.mjs",
|
|
70
72
|
"build": "node build.mjs",
|
|
71
73
|
"typecheck": "npm run generate && tsc --noEmit",
|
|
72
74
|
"test": "npm run generate && vitest run",
|
|
73
|
-
"check": "npm run typecheck && npm run test && npm run build",
|
|
75
|
+
"check": "npm run validate:package && npm run peers:check && npm run typecheck && npm run test && npm run build",
|
|
74
76
|
"package": "npm pack",
|
|
75
77
|
"package:check": "npm pack --dry-run",
|
|
76
78
|
"release": "node scripts/release.mjs",
|
|
@@ -78,6 +80,7 @@
|
|
|
78
80
|
"release:patch": "node scripts/release.mjs patch",
|
|
79
81
|
"release:minor": "node scripts/release.mjs minor",
|
|
80
82
|
"release:major": "node scripts/release.mjs major",
|
|
83
|
+
"version": "node scripts/sync-plugin-version.mjs && git add -- dsh.plugin.json",
|
|
81
84
|
"prepack": "npm run check"
|
|
82
85
|
},
|
|
83
86
|
"peerDependencies": {
|
|
@@ -130,7 +133,7 @@
|
|
|
130
133
|
"@types/node": "^24.0.0",
|
|
131
134
|
"@types/react": "~18.3.0",
|
|
132
135
|
"@types/react-dom": "~18.3.0",
|
|
133
|
-
"esbuild": "^0.
|
|
136
|
+
"esbuild": "^0.28.2",
|
|
134
137
|
"react": "18.3.1",
|
|
135
138
|
"react-dom": "18.3.1",
|
|
136
139
|
"typescript": "^5.9.2",
|