@deepseek-ai/dsh-client-ui-conversation 0.0.1-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.
Files changed (77) hide show
  1. package/LICENSE +28 -0
  2. package/README.i18n.yaml +6 -0
  3. package/README.md +65 -0
  4. package/README.zh.md +65 -0
  5. package/lib/client.js +9612 -0
  6. package/lib/index.js +28 -0
  7. package/lib/invariant.js +25 -0
  8. package/lib/types/client/apply.d.ts +16 -0
  9. package/lib/types/client/chat/AssistantMarkdown.d.ts +19 -0
  10. package/lib/types/client/chat/AssistantNodeView.d.ts +4 -0
  11. package/lib/types/client/chat/ChatNodeSeat.d.ts +11 -0
  12. package/lib/types/client/chat/ChatView.d.ts +7 -0
  13. package/lib/types/client/chat/CommandNodeView.d.ts +9 -0
  14. package/lib/types/client/chat/CompactionCommandCard.d.ts +8 -0
  15. package/lib/types/client/chat/CompactionItem.d.ts +19 -0
  16. package/lib/types/client/chat/ContextBody.d.ts +130 -0
  17. package/lib/types/client/chat/ContextInjectionRow.d.ts +26 -0
  18. package/lib/types/client/chat/GenericCommandCard.d.ts +9 -0
  19. package/lib/types/client/chat/MessageIconActions.d.ts +30 -0
  20. package/lib/types/client/chat/MessageImage.d.ts +20 -0
  21. package/lib/types/client/chat/MessageItem.d.ts +27 -0
  22. package/lib/types/client/chat/ReasoningRow.d.ts +14 -0
  23. package/lib/types/client/chat/StatsLine.d.ts +83 -0
  24. package/lib/types/client/chat/TurnTailNodeView.d.ts +7 -0
  25. package/lib/types/client/chat/message-chrome.d.ts +49 -0
  26. package/lib/types/client/chat/register-node-renderers.d.ts +7 -0
  27. package/lib/types/client/chat/tool-node-reader.d.ts +16 -0
  28. package/lib/types/client/chat/turn-assistant.d.ts +8 -0
  29. package/lib/types/client/chat/turn-metrics.d.ts +38 -0
  30. package/lib/types/client/chat/use-calendar-day.d.ts +6 -0
  31. package/lib/types/client/chat/use-throttled-visual-update.d.ts +8 -0
  32. package/lib/types/client/contract/chat-nodes.d.ts +68 -0
  33. package/lib/types/client/contract/composer-submission.d.ts +8 -0
  34. package/lib/types/client/contract/queue.d.ts +9 -0
  35. package/lib/types/client/contract/slots.d.ts +614 -0
  36. package/lib/types/client/contract/views.d.ts +39 -0
  37. package/lib/types/client/conversation-nodes/assistant.d.ts +35 -0
  38. package/lib/types/client/conversation-nodes/chat-snapshot-builder.d.ts +28 -0
  39. package/lib/types/client/conversation-nodes/command.d.ts +54 -0
  40. package/lib/types/client/conversation-nodes/common.d.ts +37 -0
  41. package/lib/types/client/conversation-nodes/compaction.d.ts +21 -0
  42. package/lib/types/client/conversation-nodes/fallback.d.ts +16 -0
  43. package/lib/types/client/conversation-nodes/inbox.d.ts +21 -0
  44. package/lib/types/client/conversation-nodes/message.d.ts +22 -0
  45. package/lib/types/client/conversation-nodes/register.d.ts +7 -0
  46. package/lib/types/client/conversation-nodes/retry.d.ts +23 -0
  47. package/lib/types/client/conversation-nodes/tool.d.ts +23 -0
  48. package/lib/types/client/conversation-nodes/turn-error.d.ts +27 -0
  49. package/lib/types/client/conversation-nodes/turn-tail.d.ts +28 -0
  50. package/lib/types/client/index.d.ts +29 -0
  51. package/lib/types/client/input/blocks.d.ts +57 -0
  52. package/lib/types/client/input/contract.d.ts +333 -0
  53. package/lib/types/client/input/decorations.d.ts +63 -0
  54. package/lib/types/client/input/facade.d.ts +219 -0
  55. package/lib/types/client/input/hub.d.ts +88 -0
  56. package/lib/types/client/input/machine.d.ts +114 -0
  57. package/lib/types/client/input/submission-policy.d.ts +46 -0
  58. package/lib/types/client/locales.d.ts +312 -0
  59. package/lib/types/client/queue/QueueDock.d.ts +29 -0
  60. package/lib/types/client/queue/store.d.ts +19 -0
  61. package/lib/types/client/service.d.ts +148 -0
  62. package/lib/types/client/settings/EnterBehaviorRow.d.ts +21 -0
  63. package/lib/types/client/skeleton/ApprovalPanel.d.ts +13 -0
  64. package/lib/types/client/skeleton/ContextMeter.d.ts +14 -0
  65. package/lib/types/client/skeleton/ConversationRoot.d.ts +5 -0
  66. package/lib/types/client/skeleton/ConversationSession.d.ts +20 -0
  67. package/lib/types/client/skeleton/DetailsPanel.d.ts +5 -0
  68. package/lib/types/client/skeleton/EmptyHero.d.ts +55 -0
  69. package/lib/types/client/skeleton/ImageLightbox.d.ts +9 -0
  70. package/lib/types/client/skeleton/InputBar.d.ts +16 -0
  71. package/lib/types/client/skeleton/PermissionSelect.d.ts +11 -0
  72. package/lib/types/client/skeleton/TodoPanel.d.ts +28 -0
  73. package/lib/types/client/stores.d.ts +22 -0
  74. package/lib/types/index.d.ts +9 -0
  75. package/lib/types/invariant.d.ts +16 -0
  76. package/lib/types/submission-settings.d.ts +20 -0
  77. package/package.json +105 -0
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Scope-addressed conversation send, cancel, and history orchestration.
3
+ *
4
+ * Scope addressing rides the cordis Service tracker: property access through
5
+ * `ctx.conversation` rebinds `this.ctx` to the caller's context, so methods
6
+ * read the session tag with `scopeOf`. Mutable state must remain reachable
7
+ * through one property read; assignment through the tracker proxy and `#`
8
+ * private fields bypass that rebinding.
9
+ */
10
+ import { Service } from '@deepseek-ai/cordis';
11
+ import type { Context } from '@deepseek-ai/cordis';
12
+ import type { SessionFace, SessionId } from '@deepseek-ai/dsh-client-runtime/client';
13
+ import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
14
+ import type { ComposerAttachment } from './contract/slots.ts';
15
+ import type { QueueAction, QueueItemId } from './contract/queue.ts';
16
+ import type { ComposerBlocks } from './input/blocks.ts';
17
+ import type { DraftAttachmentId, InputService } from './input/contract.ts';
18
+ import type { InputSubmitMode } from './contract/composer-submission.ts';
19
+ /**
20
+ * The outward conversation face (`ctx.conversation`): the scope-addressed
21
+ * verbs and the input registry other plugins may reach — and exactly what a
22
+ * test fake must supply.
23
+ */
24
+ export interface IConversation {
25
+ /** The per-session input machine registry (InputService face). */
26
+ readonly input: InputService;
27
+ /**
28
+ * The per-session composer-block registry: how a plugin the composer
29
+ * cannot import makes a session's input inert with its own reason.
30
+ */
31
+ readonly blocks: ComposerBlocks;
32
+ /**
33
+ * Send a prompt into the caller scope's session (queued turn).
34
+ * @param text - prompt text, sent verbatim as one text block.
35
+ * @returns completion; business failures reject (and land in promptError).
36
+ */
37
+ send(text: string): Promise<void>;
38
+ /**
39
+ * Apply one edit, remove, or strict steer operation to a pending queue occurrence.
40
+ * @param itemId - agent-owned inbox occurrence identity.
41
+ * @param action - requested queue operation.
42
+ * @returns completion; converged strict-steer races resolve, while other failures reject.
43
+ */
44
+ updateQueue(itemId: QueueItemId, action: QueueAction): Promise<void>;
45
+ /**
46
+ * Cancel the scoped session's in-flight turn while preserving its pending Queue.
47
+ * @returns completion; failures reject as in send.
48
+ */
49
+ cancel(): Promise<void>;
50
+ /**
51
+ * Pull one older history page for the scoped session.
52
+ * @returns completion of the page pull.
53
+ */
54
+ loadOlder(): Promise<void>;
55
+ }
56
+ /** Unsupported browser-declared image type, localized by the UI boundary. */
57
+ export declare class UnsupportedImageMediaTypeError extends Error {
58
+ /** Browser-declared MIME value, possibly empty. */
59
+ readonly mediaType: string;
60
+ /** @param mediaType - Browser-declared MIME value, possibly empty. */
61
+ constructor(mediaType: string);
62
+ }
63
+ /** Scope-addressed conversation service (root singleton, provided as `conversation`). */
64
+ export declare class ConversationService extends Service implements IConversation {
65
+ /** The per-session input machine registry (InputService face). */
66
+ readonly input: InputService;
67
+ /** The per-session composer-block registry. */
68
+ readonly blocks: ComposerBlocks;
69
+ private readonly draftAttachments;
70
+ private readonly imageUrls;
71
+ private readonly imageGenerations;
72
+ private readonly createdImageUrls;
73
+ private disposed;
74
+ /**
75
+ * @param ctx - owning root context (the plugin apply context; the service
76
+ * registers itself and follows that fiber's lifetime).
77
+ * @param config - carries the InputService and composer-block registry
78
+ * constructed by the plugin apply (the same instances the slot inject
79
+ * factories close over).
80
+ */
81
+ constructor(ctx: Context, config: {
82
+ input: InputService;
83
+ blocks: ComposerBlocks;
84
+ });
85
+ /**
86
+ * Send a prompt into the scoped session. Business failures also land in the
87
+ * session snapshot's promptError (object-layer surface); the rejection here
88
+ * exists for caller choreography (the composer restores the draft on it).
89
+ * @param text - prompt text, sent verbatim as one text block.
90
+ */
91
+ send(text: string): Promise<void>;
92
+ /**
93
+ * Submit ordered draft images with text through one host admission.
94
+ * @param session - target session.
95
+ * @param text - serialized prompt text.
96
+ * @param imageIds - ordered draft-local attachment ids.
97
+ * @param mode - queue or steer delivery selected by composer policy.
98
+ */
99
+ sendSession(session: SessionFace, text: string, imageIds: readonly DraftAttachmentId[], mode: InputSubmitMode): Promise<void>;
100
+ /**
101
+ * Create runtime-only draft images and their object URLs.
102
+ * @param files - browser files to register after MIME validation.
103
+ * @returns ordered draft descriptors.
104
+ */
105
+ createDraftImages(files: readonly File[]): readonly ComposerAttachment[];
106
+ /**
107
+ * Resolve ordered input-state ids to runtime-owned draft images.
108
+ * @param ids - draft attachment ids.
109
+ * @returns descriptors that remain live, in requested order.
110
+ */
111
+ draftImages(ids: readonly DraftAttachmentId[]): readonly ComposerAttachment[];
112
+ /**
113
+ * Release one browser-owned draft image and preview URL.
114
+ * @param id - draft attachment id.
115
+ */
116
+ releaseDraftImage(id: DraftAttachmentId): void;
117
+ /**
118
+ * Release a set of browser-owned draft images.
119
+ * @param attachments - descriptors to release.
120
+ */
121
+ releaseDraftImages(attachments: readonly ComposerAttachment[]): void;
122
+ /**
123
+ * Resolve and cache one session-authorized historical image URL.
124
+ * @param sessionId - owning session authorization scope.
125
+ * @param attachment - durable image reference.
126
+ * @returns browser URL valid until its rendered session is released.
127
+ */
128
+ resolveImage(sessionId: SessionId, attachment: ImageAttachmentRef): Promise<string>;
129
+ /**
130
+ * Release every historical image URL owned by one rendered session.
131
+ * @param sessionId - rendered session scope.
132
+ */
133
+ releaseSessionImages(sessionId: SessionId): void;
134
+ /** Apply one operation to a pending queue occurrence. */
135
+ updateQueue(itemId: QueueItemId, action: QueueAction): Promise<void>;
136
+ /** Cancel the scoped session's in-flight turn while preserving Queue (failures land in promptError and reject, as in send). */
137
+ cancel(): Promise<void>;
138
+ /** Pull one older history page for the scoped Session. */
139
+ loadOlder(): Promise<void>;
140
+ /** Resolve the caller scope's session face or throw on root contexts. */
141
+ private scopedSession;
142
+ /** Read the caller's session scope tag via the sessions service; root contexts fail loud. */
143
+ private scopeId;
144
+ private requireSessions;
145
+ /** Convert browser files to canonical base64 prompt parts. */
146
+ private serializeImages;
147
+ }
148
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1,21 @@
1
+ import type { SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
2
+ import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { BusyEnterBehavior } from '../contract/composer-submission.ts';
4
+ /** Registration-side preference face. */
5
+ export interface EnterBehaviorRowInjected {
6
+ hooks: {
7
+ /** Persisted busy-state preference bound as useBusyEnter. */
8
+ busyEnter: SnapshotStore<BusyEnterBehavior>;
9
+ };
10
+ /** Change the busy-state plain-Enter behavior. */
11
+ setBusyEnter: (behavior: BusyEnterBehavior) => void;
12
+ }
13
+ /** Full Settings-row props. */
14
+ export type EnterBehaviorRowProps = PropsRuntime<'settings.general.item'> & PropsLocale<'conversation'> & InjectFace<EnterBehaviorRowInjected>;
15
+ /**
16
+ * Render the busy-state Enter behavior selector.
17
+ * @param props - composed Settings slot props.
18
+ * @returns the preference row.
19
+ */
20
+ export declare function EnterBehaviorRow({ useBusyEnter, setBusyEnter, t }: EnterBehaviorRowProps): import("react").JSX.Element;
21
+ //# sourceMappingURL=EnterBehaviorRow.d.ts.map
@@ -0,0 +1,13 @@
1
+ import type { RunningToolCall } from '@deepseek-ai/dsh-client-runtime/client';
2
+ import { type ApprovalComposerProps } from '../contract/slots.ts';
3
+ /** Extract the shell command from an approval's paired running call (bash-family args carry `command`); undefined hides the line. */
4
+ export declare function commandOf(call: RunningToolCall | undefined): string | undefined;
5
+ /**
6
+ * Composer takeover boundary: mints the domain face on the carrier's stable
7
+ * identity and remounts the flow per request key, so the one-shot answered
8
+ * latch never leaks to the next pending approval.
9
+ * @param props - the selector-matched pending approval carrier plus the framework standard kit.
10
+ * @returns The approval prompt for this request.
11
+ */
12
+ export declare function ApprovalPanel(props: ApprovalComposerProps): import("react").JSX.Element;
13
+ //# sourceMappingURL=ApprovalPanel.d.ts.map
@@ -0,0 +1,14 @@
1
+ /** Composer context-occupancy meter: a ring beside the send button fed by the
2
+ * `contextPressure` projection, with a click-open panel of the heuristic
3
+ * `contextBreakdown` composition (system prompt, tools, conversation).
4
+ * Renders nothing until a provider reports both pressure and a route
5
+ * capacity. */
6
+ import type { UseProjection } from '@deepseek-ai/dsh-client-runtime/client';
7
+ import type { ComposerBarProps } from '../contract/slots.ts';
8
+ export interface ContextMeterProps {
9
+ useProjection: UseProjection;
10
+ /** The owning bar's locale seat, passed down as a plain prop. */
11
+ t: ComposerBarProps['t'];
12
+ }
13
+ export declare function ContextMeter({ useProjection, t }: ContextMeterProps): import("react").JSX.Element | null;
14
+ //# sourceMappingURL=ContextMeter.d.ts.map
@@ -0,0 +1,5 @@
1
+ import type { ConversationSlotProps } from '../contract/slots.ts';
2
+ /** Full props composed from the slot contract. */
3
+ export type ConversationRootProps = ConversationSlotProps;
4
+ export declare function ConversationRoot({ sessionId, useSession, useSessions, useWorkspaces, useInput, useComposerBlock, renderSlot, renderSlotChain, selectWorkspace, t, }: ConversationRootProps): import("react").JSX.Element;
5
+ //# sourceMappingURL=ConversationRoot.d.ts.map
@@ -0,0 +1,20 @@
1
+ /** Strict per-session header/body content inserted into the resident conversation layout. */
2
+ import type { ConversationSessionHeaderSlotProps, ConversationSessionSlotProps } from '../contract/slots.ts';
3
+ /** Full props composed from the strict session body contract. */
4
+ export type ConversationSessionProps = ConversationSessionSlotProps;
5
+ /** Full props composed from the strict session header contract. */
6
+ export type ConversationSessionHeaderProps = ConversationSessionHeaderSlotProps;
7
+ /**
8
+ * Renders Session header chrome above the resident conversation scrollport.
9
+ * @param props - Strict Session store, view ledger, navigation, render, and locale shares.
10
+ * @returns the hidden blank-session header or visible title and tabs.
11
+ */
12
+ export declare function ConversationSessionHeader({ sessionId, useSession, useSessions, useStore, actions, renderSlot, views, open, t, }: ConversationSessionHeaderProps): import("react").JSX.Element;
13
+ /**
14
+ * Renders the active Session view inside the resident scrollport and keeps
15
+ * the input draft mirrored while blank Hero chrome is visible.
16
+ * @param props - Strict Session input/store, view ledger, and render shares.
17
+ * @returns the active view area, or null while the Session remains blank.
18
+ */
19
+ export declare function ConversationSession({ sessionId, useSession, useInput, inputActions, useStore, actions, renderSlot, views, bindDraftMirror, releaseSessionImages, }: ConversationSessionProps): import("react").JSX.Element | null;
20
+ //# sourceMappingURL=ConversationSession.d.ts.map
@@ -0,0 +1,5 @@
1
+ import type { DetailsSlotProps } from '../contract/slots.ts';
2
+ /** Full props composed by reference from the contract (automatic shares & injected share). */
3
+ export type DetailsPanelProps = DetailsSlotProps;
4
+ export declare function DetailsPanel({ useSession, useSessions, sessionId, useStore, renderSlot, closeDetails, t }: DetailsPanelProps): import("react").JSX.Element;
5
+ //# sourceMappingURL=DetailsPanel.d.ts.map
@@ -0,0 +1,55 @@
1
+ import type { ReactNode, RefObject } from 'react';
2
+ import type { ConversationSlotProps } from '../contract/slots.ts';
3
+ /** The owner's locale seat type, passed to hero chrome as a plain prop. */
4
+ type HeroTranslate = ConversationSlotProps['t'];
5
+ /**
6
+ * Basename label for the workspace chip (the shared derivation);
7
+ * separator-only paths echo the raw cwd.
8
+ * @param cwd - workspace directory path (non-empty).
9
+ * @returns chip label.
10
+ */
11
+ export declare function workspaceLabel(cwd: string): string;
12
+ /**
13
+ * The workspace chip (folder + label + chevron), always interactive: before
14
+ * the first message the workspace stays switchable — picking another one
15
+ * moves the New Session flow to that workspace's blank session. Without a
16
+ * label the chip renders its placeholder state: closed folder + the
17
+ * "Choose workspace" call to action.
18
+ * @param props.label - chip label (see {@link workspaceLabel}); omitted → placeholder.
19
+ * @param props.menuOpen - menu expansion echo.
20
+ * @param props.onClick - menu toggle.
21
+ * @returns the chip button element.
22
+ */
23
+ export declare function WorkspaceChip({ buttonRef, label, menuOpen, onClick, t }: {
24
+ buttonRef?: RefObject<HTMLButtonElement>;
25
+ label?: string | undefined;
26
+ menuOpen?: boolean;
27
+ onClick?: () => void;
28
+ t: HeroTranslate;
29
+ }): import("react").JSX.Element;
30
+ /**
31
+ * The soft blue backdrop ellipse (figma 313:14109). Rendered by the hero
32
+ * owner (ConversationRoot), not HeroShell, so it can center on the input
33
+ * card; the owner's className supplies all positioning.
34
+ * @param props.className - positioning class from the owner.
35
+ * @returns the blurred-ellipse svg element.
36
+ */
37
+ export declare function HeroGlow({ className }: {
38
+ className?: string | undefined;
39
+ }): import("react").JSX.Element;
40
+ /** Hero chrome props. The workspace row rides the InputBar accessory hole, not here. */
41
+ export interface HeroShellProps {
42
+ /** The owner's locale seat, passed down as a plain prop. */
43
+ t: HeroTranslate;
44
+ /** Overlay content after the stack (modals). */
45
+ children?: ReactNode;
46
+ }
47
+ /**
48
+ * Render the hero chrome (headline only; no glow, no composer, no workspace
49
+ * row — the glow is the owner's {@link HeroGlow}).
50
+ * @param props - see {@link HeroShellProps}.
51
+ * @returns the centered hero element tree.
52
+ */
53
+ export declare function HeroShell({ t, children }: HeroShellProps): import("react").JSX.Element;
54
+ export {};
55
+ //# sourceMappingURL=EmptyHero.d.ts.map
@@ -0,0 +1,9 @@
1
+ import type { ChatViewSlotProps } from '../contract/slots.ts';
2
+ /** Document-level original-image preview opened by an explicit double-click. */
3
+ export declare function ImageLightbox({ src, alt, onClose, t }: {
4
+ src: string;
5
+ alt: string;
6
+ onClose: () => void;
7
+ t: ChatViewSlotProps['t'];
8
+ }): import("react").JSX.Element;
9
+ //# sourceMappingURL=ImageLightbox.d.ts.map
@@ -0,0 +1,16 @@
1
+ /** The default composer body: the 'conversation.composer.bar' slot entry.
2
+ * Machine state arrives through the standard provide channel
3
+ * (useInput + inputActions); the keyboard/DOM command face and stop arrive
4
+ * through this entry's own inject, whose hooks compartment binds
5
+ * useNotices/useLexicon; layout-phase inputs (variant, placeholder,
6
+ * region-slot content) ride the owner props. Session facts
7
+ * (running/removed/promptError) are self-selected via useSession. */
8
+ import type { ComposerBarProps } from '../contract/slots.ts';
9
+ /** Prompt failure surface (derived from promptError). */
10
+ export interface InputBarError {
11
+ op: 'send' | 'stop';
12
+ message: string;
13
+ }
14
+ export type InputBarProps = ComposerBarProps;
15
+ export declare function InputBar({ useSession, useInput, inputActions, keyboard, addImages, removeImage, draftImages, resolveSubmitMode, toggleCommandMenu, stop, command, t, renderSlot, useNotices, useLexicon, useMenuLauncher, useProjection, sessionId, variant, disabled: inert, blocked, placeholder, accessory, overlay, leftItems, rightItems, footer, }: InputBarProps): import("react").JSX.Element;
16
+ //# sourceMappingURL=InputBar.d.ts.map
@@ -0,0 +1,11 @@
1
+ import type { PermissionSelect as PermissionSelectValue } from '@deepseek-ai/dsh-permission/client';
2
+ import type { ComposerBarProps } from '../contract/slots.ts';
3
+ export interface PermissionSelectProps {
4
+ value: PermissionSelectValue | undefined;
5
+ locked: boolean;
6
+ command: (line: string) => Promise<boolean>;
7
+ /** The owning bar's locale seat, passed down as a plain prop. */
8
+ t: ComposerBarProps['t'];
9
+ }
10
+ export declare function PermissionSelect({ value, locked, command, t }: PermissionSelectProps): import("react").JSX.Element | null;
11
+ //# sourceMappingURL=PermissionSelect.d.ts.map
@@ -0,0 +1,28 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { TodoItem } from '@deepseek-ai/dsh-tool-todo/client';
4
+ export interface TodoPanelProps {
5
+ /** The session's current plan (empty renders nothing) — selected by the dock adapter. */
6
+ todos: readonly TodoItem[];
7
+ /** The dock entry's locale seat, passed down as a plain prop. */
8
+ t: TodoDockProps['t'];
9
+ }
10
+ export declare function TodoPanel({ todos, t }: TodoPanelProps): import("react").JSX.Element | null;
11
+ /** Full props of a dock entry: InputZone owner share + session standard kit + global seat + the locale seat. */
12
+ export type TodoDockProps = PropsRuntime<'conversation.input.dock'> & PropsLocale<'conversation'>;
13
+ /** Dock adapter: reads the host-computed 'todos' projection (whole list; absent or null renders nothing). */
14
+ export declare function TodoDock({ useProjection, t }: TodoDockProps): import("react").JSX.Element;
15
+ /**
16
+ * The plan strip as a plain registrant plugin (QueueDock posture), following
17
+ * the input-dock declaration across independent activation and reload.
18
+ */
19
+ export declare const todoDockEntry: {
20
+ name: string;
21
+ inject: string[];
22
+ /**
23
+ * Register the plan strip before the goal and queue entries (order 0).
24
+ * @param ctx - registrant context (disposal rides ctx.effect inside slots.register).
25
+ */
26
+ apply(ctx: Context): void;
27
+ };
28
+ //# sourceMappingURL=TodoPanel.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Per-session chat store shared by conversation and details registrations.
3
+ * The plugin creates its handle at apply time so identity follows the fiber.
4
+ */
5
+ import { type EngineStoreHandle } from '@deepseek-ai/dsh-client-runtime/client';
6
+ import type { CallId, ChatStoreState, SelectionTarget } from './contract/views.ts';
7
+ /** Declared action shape used to give the exported factory a stable return type. */
8
+ type ChatActions = {
9
+ select: (draft: ChatStoreState, target: SelectionTarget | null) => void;
10
+ setDraft: (draft: ChatStoreState, text: string) => void;
11
+ setView: (draft: ChatStoreState, view: string) => void;
12
+ setInspect: (draft: ChatStoreState, target: {
13
+ callId: CallId;
14
+ } | null) => void;
15
+ };
16
+ /**
17
+ * Declares the per-session chat state and write surface.
18
+ * @returns the store handle.
19
+ */
20
+ export declare function createChatStore(): EngineStoreHandle<ChatStoreState, ChatActions>;
21
+ export {};
22
+ //# sourceMappingURL=stores.d.ts.map
@@ -0,0 +1,9 @@
1
+ /** Host registration for browser conversation preferences. */
2
+ import type { Context } from '@deepseek-ai/cordis';
3
+ export { BUSY_ENTER_BEHAVIORS, BUSY_ENTER_FIELD, CONVERSATION_SETTINGS_NAMESPACE, DEFAULT_BUSY_ENTER_BEHAVIOR, type BusyEnterBehavior, type ConversationSettings, } from './submission-settings.ts';
4
+ /**
5
+ * Register the durable conversation section when a settings provider exists.
6
+ * @param ctx - Host context whose optional settings service owns the section.
7
+ */
8
+ export declare function apply(ctx: Context): void;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Package-owned invariant companion for `@deepseek-ai/dsh-client-ui-conversation`.
3
+ * @module @deepseek-ai/dsh-client-ui-conversation/invariant
4
+ */
5
+ import type { Context } from '@deepseek-ai/cordis';
6
+ /** Cordis companion plugin name. */
7
+ export declare const name = "client-ui-conversation-invariant";
8
+ /** Service required before the companion can reserve package ownership. */
9
+ export declare const inject: string[];
10
+ /**
11
+ * Register this package's invariant companion.
12
+ * @param ctx - Cordis context carrying the invariant service.
13
+ * @returns the installed registration's disposer after setup succeeds.
14
+ */
15
+ export declare const apply: (ctx: Context) => Promise<() => void>;
16
+ //# sourceMappingURL=invariant.d.ts.map
@@ -0,0 +1,20 @@
1
+ /** Busy-Enter preference stored in the Host user-settings document. */
2
+ import z from '@deepseek-ai/schemastery';
3
+ /** Settings namespace owned by the conversation plugin. */
4
+ export declare const CONVERSATION_SETTINGS_NAMESPACE = "ui-conversation";
5
+ /** Field carrying the delivery mode for plain Enter while an agent is busy. */
6
+ export declare const BUSY_ENTER_FIELD = "busyEnter";
7
+ /** Busy-Enter behaviors accepted at settings and input boundaries. */
8
+ export declare const BUSY_ENTER_BEHAVIORS: readonly ["queue", "steer"];
9
+ /** Configurable meaning of plain Enter while the addressed agent is busy. */
10
+ export type BusyEnterBehavior = typeof BUSY_ENTER_BEHAVIORS[number];
11
+ /** Default preserves Enter-as-Queue for running conversations. */
12
+ export declare const DEFAULT_BUSY_ENTER_BEHAVIOR: BusyEnterBehavior;
13
+ /** Durable conversation section shared by the Host schema and the browser scope. */
14
+ export interface ConversationSettings {
15
+ /** Delivery mode for plain Enter while the addressed agent is busy. */
16
+ busyEnter: BusyEnterBehavior;
17
+ }
18
+ /** Durable conversation schema; also the wire envelope the browser scope validates against. */
19
+ export declare const ConversationSettingsSchema: z<ConversationSettings>;
20
+ //# sourceMappingURL=submission-settings.d.ts.map
package/package.json ADDED
@@ -0,0 +1,105 @@
1
+ {
2
+ "name": "@deepseek-ai/dsh-client-ui-conversation",
3
+ "description": "Conversation domain: skeleton, ordered chat flow, composer with the Host-backed busy-Enter preference, and details host",
4
+ "version": "0.0.1-rc.1",
5
+ "publishConfig": {
6
+ "access": "restricted"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
+ "directory": "packages/client/ui-conversation"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./invariant": {
22
+ "types": "./lib/types/invariant.d.ts",
23
+ "default": "./lib/invariant.js"
24
+ },
25
+ "./client": {
26
+ "types": "./lib/types/client/index.d.ts",
27
+ "default": "./lib/client.js"
28
+ },
29
+ "./src/*": "./src/*",
30
+ "./package.json": "./package.json"
31
+ },
32
+ "dsh": {
33
+ "client": {
34
+ "inject": [
35
+ "@deepseek-ai/dsh-client-connection",
36
+ "@deepseek-ai/dsh-client-locale",
37
+ "@deepseek-ai/dsh-client-runtime",
38
+ "@deepseek-ai/dsh-client-ui-layout"
39
+ ],
40
+ "platform": "web"
41
+ }
42
+ },
43
+ "license": "BSD-3-Clause",
44
+ "dependencies": {
45
+ "clsx": "^2.0.0",
46
+ "@deepseek-ai/dsh-settings": "^0.0.1-rc.1",
47
+ "@deepseek-ai/schemastery": "^3.18.1-rc.1"
48
+ },
49
+ "peerDependencies": {
50
+ "react": "^18.2.0",
51
+ "@deepseek-ai/dsh-agent": "^0.0.1-rc.1",
52
+ "@deepseek-ai/dsh-attachment": "^0.0.1-rc.1",
53
+ "@deepseek-ai/dsh-brand": "^0.0.1-rc.1",
54
+ "@deepseek-ai/dsh-client-connection": "^0.0.1-rc.1",
55
+ "@deepseek-ai/dsh-client-locale": "^0.0.1-rc.1",
56
+ "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.1",
57
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.0.1-rc.1",
58
+ "@deepseek-ai/dsh-client-ui-slash": "^0.0.1-rc.1",
59
+ "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.1",
60
+ "@deepseek-ai/dsh-compact": "^0.0.1-rc.1",
61
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
62
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.1",
63
+ "@deepseek-ai/cordis": "^4.0.1-rc.1",
64
+ "@deepseek-ai/dsh-llm-retry": "^0.0.1-rc.1",
65
+ "@deepseek-ai/dsh-token-meter": "^0.0.1-rc.1",
66
+ "@deepseek-ai/dsh-commands": "^0.0.1-rc.1"
67
+ },
68
+ "devDependencies": {
69
+ "@types/react": "~18.3.1",
70
+ "react": "^18.2.0",
71
+ "@deepseek-ai/dsh-agent": "^0.0.1-rc.1",
72
+ "@deepseek-ai/dsh-brand": "^0.0.1-rc.1",
73
+ "@deepseek-ai/dsh-client-connection": "^0.0.1-rc.1",
74
+ "@deepseek-ai/dsh-client-locale": "^0.0.1-rc.1",
75
+ "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.1",
76
+ "@deepseek-ai/dsh-client-test-runtime": "^0.0.1-rc.1",
77
+ "@deepseek-ai/dsh-compact": "^0.0.1-rc.1",
78
+ "@deepseek-ai/dsh-commands": "^0.0.1-rc.1",
79
+ "@deepseek-ai/dsh-goal": "^0.0.1-rc.1",
80
+ "@deepseek-ai/dsh-plan-mode": "^0.0.1-rc.1",
81
+ "@deepseek-ai/dsh-client-ui-layout": "^0.0.1-rc.1",
82
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.0.1-rc.1",
83
+ "@deepseek-ai/dsh-client-ui-slash": "^0.0.1-rc.1",
84
+ "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.1",
85
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
86
+ "@deepseek-ai/dsh-llm-retry": "^0.0.1-rc.1",
87
+ "@deepseek-ai/dsh-permission": "^0.0.1-rc.1",
88
+ "@deepseek-ai/dsh-session-projection": "^0.0.1-rc.1",
89
+ "@deepseek-ai/dsh-token-meter": "^0.0.1-rc.1",
90
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.1",
91
+ "@deepseek-ai/dsh-tool-todo": "^0.0.1-rc.1",
92
+ "@deepseek-ai/cordis": "^4.0.1-rc.1",
93
+ "@deepseek-ai/dsh-attachment": "^0.0.1-rc.1"
94
+ },
95
+ "files": [
96
+ "lib/index.js",
97
+ "lib/invariant.js",
98
+ "lib/client.js",
99
+ "lib/types/**/*.d.ts"
100
+ ],
101
+ "scripts": {
102
+ "bundle": "tsdown",
103
+ "watch": "tsdown --watch"
104
+ }
105
+ }