@sparkelf/dsh-plus 0.2.8-alpha.50 → 0.2.9-alpha.101

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 (56) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +1 -1
  3. package/README.zh.md +1 -1
  4. package/cordis.patch.yml +29 -7
  5. package/lib/{apply-DmICvIGh.js → apply-CvePS57c.js} +213 -43
  6. package/lib/{apply-08huHfLG.js → apply-DycMqLJO.js} +240 -53
  7. package/lib/apply-c_7SZFSh.js +1193 -0
  8. package/lib/apply.js +2 -2
  9. package/lib/bin.js +20 -319
  10. package/lib/types/apply.d.ts +14 -1
  11. package/lib/types/apply.js +275 -53
  12. package/lib/types/capabilities.js +25 -36
  13. package/lib/types/manifest.d.ts +24 -0
  14. package/lib/types/manifest.js +51 -0
  15. package/lib/types/profile.d.ts +1 -0
  16. package/lib/types/profile.js +14 -3
  17. package/package.json +531 -577
  18. package/patches/approval-allow-policy.patch +3 -3
  19. package/patches/atomic-write-zombie-lock-holder.patch +1 -1
  20. package/patches/bootstrap-exempt-names.patch +6 -6
  21. package/patches/composer-popover-boundaries.patch +41 -283
  22. package/patches/image-offload-hoist-replay.patch +34 -31
  23. package/patches/input-trigger-source-label.patch +63 -0
  24. package/patches/legacy-code-preset.patch +5 -5
  25. package/patches/llm-pi-ai-transport-truncation.patch +4 -4
  26. package/patches/mobile-journal-generation.patch +2 -2
  27. package/patches/office-preview-stable-load.patch +1 -1
  28. package/patches/officecli-deliverables.patch +2 -2
  29. package/patches/ptc-mcp-schema-types.patch +3 -3
  30. package/patches/responses-reasoning-status.patch +197 -48
  31. package/patches/session-controller-image-downgrade-and-tool-visibility.patch +16 -14
  32. package/patches/session-export-chinese.patch +11 -11
  33. package/patches/session-format-legacy-restart.patch +1 -1
  34. package/patches/sidebar-right-tab-menu.patch +119 -0
  35. package/patches/state-dot-brand-blue.patch +2 -2
  36. package/patches/ui-settings-compact-phone.patch +2 -9
  37. package/patches/ui-sidebar-right-global-panel.patch +3 -3
  38. package/patches/workspace-hide-group-rooms.patch +38 -0
  39. package/patches/workspace-storage-restore.patch +21 -5
  40. package/patches/wsl-native-open.patch +8 -8
  41. package/lib/apply-e0aMC4B4.js +0 -601
  42. package/lib/types/standalone-capabilities.d.ts +0 -139
  43. package/lib/types/standalone-capabilities.js +0 -688
  44. package/lib/types/standalone-cli.d.ts +0 -17
  45. package/lib/types/standalone-cli.js +0 -913
  46. package/lib/types/standalone-profile.d.ts +0 -258
  47. package/lib/types/standalone-profile.js +0 -747
  48. package/lib/types/standalone-server.d.ts +0 -70
  49. package/lib/types/standalone-server.js +0 -158
  50. package/patches/browser-auth-mode.patch +0 -127
  51. package/patches/diagram-preview.patch +0 -562
  52. package/patches/dsh-resource-ref-chip.patch +0 -40
  53. package/patches/session-envelope-ignorable.patch +0 -63
  54. package/patches/session-log-trajectory-toolbar.patch +0 -352
  55. package/patches/ui-schedule-plaza-tab.patch +0 -217
  56. package/patches/web-runtime-compat.patch +0 -83
@@ -1,352 +0,0 @@
1
- diff --git a/packages/client/ui-trajectory/src/client/TrajectoryToolbar.module.css b/packages/client/ui-trajectory/src/client/TrajectoryToolbar.module.css
2
- index 2bbc35663a..b2dde8dd3b 100644
3
- --- a/packages/client/ui-trajectory/src/client/TrajectoryToolbar.module.css
4
- +++ b/packages/client/ui-trajectory/src/client/TrajectoryToolbar.module.css
5
- @@ -174,13 +174,19 @@
6
- font: 14px/14px var(--ds-font-family-code);
7
- }
8
-
9
- +.utilities {
10
- + display: flex;
11
- + flex: none;
12
- + align-items: center;
13
- + margin-left: auto;
14
- +}
15
- +
16
- .search {
17
- display: flex;
18
- flex: 0 1 164px;
19
- align-items: center;
20
- min-width: 84px;
21
- height: 22px;
22
- - margin-left: auto;
23
- padding: 0 6px;
24
- gap: 4px;
25
- border: 0.5px solid var(--dsw-alias-border-l4);
26
- diff --git a/packages/client/ui-trajectory/src/client/TrajectoryToolbar.tsx b/packages/client/ui-trajectory/src/client/TrajectoryToolbar.tsx
27
- index c3861f03a9..a63ac8823b 100644
28
- --- a/packages/client/ui-trajectory/src/client/TrajectoryToolbar.tsx
29
- +++ b/packages/client/ui-trajectory/src/client/TrajectoryToolbar.tsx
30
- @@ -1,5 +1,6 @@
31
- /** Trajectory toolbar: timeline and ledger fold controls. */
32
-
33
- +import type { ReactNode } from 'react'
34
- import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots'
35
- import { IconSearchOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives'
36
- import type { NS } from './locales.ts'
37
- @@ -26,6 +27,8 @@ export interface TrajectoryToolbarProps {
38
- searchQuery: string
39
- /** Update the live ledger search query. */
40
- onSearchQueryChange: (query: string) => void
41
- + /** Session utilities contributed immediately before search. */
42
- + utilities: ReactNode
43
- /** Translate a toolbar dictionary key. */
44
- t: TranslateNS<typeof NS>
45
- }
46
- @@ -46,6 +49,7 @@ export function TrajectoryToolbar({
47
- onToggleAllAssistants,
48
- searchQuery,
49
- onSearchQueryChange,
50
- + utilities,
51
- t,
52
- }: TrajectoryToolbarProps) {
53
- return (
54
- @@ -111,7 +115,8 @@ export function TrajectoryToolbar({
55
- {t('toolbar.calls')}
56
- </button>
57
- </div>
58
- - <div className={css.search}>
59
- + <div className={css.utilities} data-trajectory-toolbar-utilities="">{utilities}</div>
60
- + <div className={css.search} data-trajectory-search="">
61
- <IconSearchOutlineRegular size={11} className={css.searchIcon} />
62
- <input
63
- type="search"
64
- diff --git a/packages/client/ui-trajectory/src/client/TrajectoryView.tsx b/packages/client/ui-trajectory/src/client/TrajectoryView.tsx
65
- index 6835939198..47db0ef561 100644
66
- --- a/packages/client/ui-trajectory/src/client/TrajectoryView.tsx
67
- +++ b/packages/client/ui-trajectory/src/client/TrajectoryView.tsx
68
- @@ -135,7 +135,9 @@ export function TrajectoryView({
69
- useSession, useTrajectory, useDuration, watchToolResult, loadOlder, loadImage, setActualDuration,
70
- viewRequest, completeViewRequest, renderSlot, t, jsonStringWrapping,
71
- }: ConvViewProps
72
- - & Pick<PropsRenderSlots<'conversation.trajectory.images'>, 'renderSlot'>
73
- + & PropsRenderSlots<
74
- + 'conversation.trajectory.images' | 'conversation.trajectory.toolbar.utilities'
75
- + >
76
- & InjectFace<TrajectoryViewInjected>
77
- & PropsLocale<'trajectory'>) {
78
- const [collapsedTurns, setCollapsedTurns] = useState<ReadonlySet<number>>(EMPTY_TURN_IDS)
79
- @@ -530,6 +532,7 @@ export function TrajectoryView({
80
- onToggleAllAssistants={toggleAllAssistants}
81
- searchQuery={searchQuery}
82
- onSearchQueryChange={setSearchQuery}
83
- + utilities={renderSlot('conversation.trajectory.toolbar.utilities', {})}
84
- t={t}
85
- />
86
- <TrajectoryTimeline
87
- diff --git a/packages/client/ui-trajectory/src/client/index.ts b/packages/client/ui-trajectory/src/client/index.ts
88
- index 28bf045ab4..6e44cb96f7 100644
89
- --- a/packages/client/ui-trajectory/src/client/index.ts
90
- +++ b/packages/client/ui-trajectory/src/client/index.ts
91
- @@ -38,6 +38,13 @@ export type {
92
- UseTrajectory,
93
- } from './trajectory-contract.ts'
94
-
95
- +declare module '@deepseek-ai/dsh-client-ui-slots' {
96
- + interface SlotMap {
97
- + /** Compact Session utilities immediately before the Trajectory search field. */
98
- + 'conversation.trajectory.toolbar.utilities': { kind: 'list'; scope: 'session' }
99
- + }
100
- +}
101
- +
102
- /** Required services: the conversation slot, registries, ordinary Session paging, and the locale service. */
103
- export const inject = ['slots', 'sessions', 'uiSession', 'uiConversation', 'locale', 'remote', 'remote.toolResults']
104
-
105
- @@ -83,7 +90,10 @@ export function apply(ctx: Context): void {
106
- order: 10,
107
- locale: NS,
108
- label: () => t('view.trajectory'),
109
- - children: { 'conversation.trajectory.images': { kind: 'single', scope: 'session' } },
110
- + children: {
111
- + 'conversation.trajectory.images': { kind: 'single', scope: 'session' },
112
- + 'conversation.trajectory.toolbar.utilities': { kind: 'list', scope: 'session' },
113
- + },
114
- inject: (sessionId: SessionId): TrajectoryViewInjected => {
115
- const session = ctx.sessions.binding(sessionId)?.session
116
- if (session === undefined) {
117
- diff --git a/packages/client/ui-trajectory/tests/views.client.spec.tsx b/packages/client/ui-trajectory/tests/views.client.spec.tsx
118
- index c233d3315a..93a0fb5f3f 100644
119
- --- a/packages/client/ui-trajectory/tests/views.client.spec.tsx
120
- +++ b/packages/client/ui-trajectory/tests/views.client.spec.tsx
121
- @@ -249,6 +249,9 @@ function standaloneProps(
122
- loadImage: () => Promise.reject(new Error('standalone views load no images')),
123
- // The locale seat the outlet would inject for the declared namespace.
124
- t: tZh,
125
- + // The rc.2 slot map widened this view to a session scope, so the
126
- + // standard kit the outlet would bake now includes the SessionProvider seat.
127
- + SessionProvider: ({ children }: { children: ReactNode }) => children,
128
- }
129
- }
130
-
131
- diff --git a/packages/session-query/session-log-export/package.json b/packages/session-query/session-log-export/package.json
132
- index 083b0e2ba7..a63d999978 100644
133
- --- a/packages/session-query/session-log-export/package.json
134
- +++ b/packages/session-query/session-log-export/package.json
135
- @@ -49,8 +49,8 @@
136
- "@deepseek-ai/dsh-session-persistence": "workspace:*"
137
- },
138
- "devDependencies": {
139
- - "@deepseek-ai/cordis": "workspace:~",
140
- "@deepseek-ai/cordis-plugin-loader": "workspace:~",
141
- + "@deepseek-ai/cordis": "workspace:~",
142
- "@deepseek-ai/dsh-agent": "workspace:*",
143
- "@deepseek-ai/dsh-attachment": "workspace:*",
144
- "@deepseek-ai/dsh-client-connection": "workspace:*",
145
- @@ -64,11 +64,13 @@
146
- "@deepseek-ai/dsh-client-ui-renderer": "workspace:*",
147
- "@deepseek-ai/dsh-client-ui-session": "workspace:*",
148
- "@deepseek-ai/dsh-client-ui-slots": "workspace:*",
149
- + "@deepseek-ai/dsh-client-ui-trajectory": "workspace:*",
150
- "@deepseek-ai/dsh-commands": "workspace:*",
151
- "@deepseek-ai/dsh-session": "workspace:*",
152
- "@deepseek-ai/dsh-session-persistence": "workspace:*",
153
- "@deepseek-ai/dsh-session-query": "workspace:*",
154
- "@deepseek-ai/dsh-session-title": "workspace:*",
155
- + "@types/react": "~18.3.1",
156
- "react": "^18.2.0"
157
- },
158
- "dsh": {
159
- @@ -79,7 +81,8 @@
160
- "@deepseek-ai/dsh-client-ui-conversation",
161
- "@deepseek-ai/dsh-client-ui-layout",
162
- "@deepseek-ai/dsh-client-ui-renderer",
163
- - "@deepseek-ai/dsh-client-ui-session"
164
- + "@deepseek-ai/dsh-client-ui-session",
165
- + "@deepseek-ai/dsh-client-ui-trajectory"
166
- ],
167
- "platform": "web"
168
- }
169
- diff --git a/packages/session-query/session-log-export/src/client/HeaderAction.module.css b/packages/session-query/session-log-export/src/client/HeaderAction.module.css
170
- index 90ca1eedbc..aa22e45ead 100644
171
- --- a/packages/session-query/session-log-export/src/client/HeaderAction.module.css
172
- +++ b/packages/session-query/session-log-export/src/client/HeaderAction.module.css
173
- @@ -10,3 +10,46 @@
174
- width: 15px;
175
- height: 15px;
176
- }
177
- +/* The Header action is the shared compact Button; the Trajectory action below
178
- + replaces it from 768px, where the header has room for a labelled control. */
179
- +
180
- +.trajectoryButton {
181
- + display: none;
182
- + flex: none;
183
- + align-items: center;
184
- + height: 22px;
185
- + padding: 0 6px;
186
- + gap: 4px;
187
- + border: 0;
188
- + border-radius: 3px;
189
- + color: var(--dsw-alias-label-tertiary);
190
- + background: transparent;
191
- + cursor: pointer;
192
- + font: var(--dsw-font-xxs-12);
193
- +}
194
- +
195
- +.trajectoryButton:hover:not(:disabled) {
196
- + color: var(--dsw-alias-label-primary);
197
- + background: var(--dsw-alias-interactive-bg-hover);
198
- +}
199
- +
200
- +.trajectoryButton:focus-visible {
201
- + outline: 1px solid var(--dsw-alias-state-business-primary);
202
- + outline-offset: 1px;
203
- +}
204
- +
205
- +.trajectoryButton:disabled {
206
- + color: var(--dsw-alias-label-dimmed);
207
- + cursor: wait;
208
- +}
209
- +
210
- +.trajectoryButton span,
211
- +.trajectoryButton svg { flex: none; }
212
- +.trajectoryButton span { white-space: nowrap; }
213
- +
214
- +/* Wider layouts replace the Header action with the compact Trajectory one. */
215
- +@media (min-width: 768px) {
216
- + .moreButton { display: none; }
217
- +
218
- + .trajectoryButton { display: inline-flex; }
219
- +}
220
- diff --git a/packages/session-query/session-log-export/src/client/HeaderAction.tsx b/packages/session-query/session-log-export/src/client/HeaderAction.tsx
221
- index fcf0cfd862..74a8209ffa 100644
222
- --- a/packages/session-query/session-log-export/src/client/HeaderAction.tsx
223
- +++ b/packages/session-query/session-log-export/src/client/HeaderAction.tsx
224
- @@ -1,12 +1,13 @@
225
- import { useState } from 'react'
226
- import type { ReactNode } from 'react'
227
- import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'
228
- -import type { InjectFace } from '@deepseek-ai/dsh-client-ui-slots'
229
- +import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
230
- import type { SessionId } from '@deepseek-ai/dsh-session/types'
231
- import {
232
- Button, IconCopyOutlineRegular, IconDownloadOutlineRegular, IconEllipsisOutlineRegular,
233
- IconPaperPlaneOutlineRegular, Menu,
234
- } from '@deepseek-ai/dsh-client-ui-primitives'
235
- +import { NS } from './locales.ts'
236
- import { SessionLogDownloadDialog, type SessionLogDownloadDialogProps } from './Dialog.tsx'
237
- import type { SessionLogDownloadDialogInjected } from './Dialog.tsx'
238
- import type { SessionMarkdownCopyState } from './copy-controller.ts'
239
- @@ -38,6 +39,12 @@ export interface SessionLogDownloadHeaderInjected
240
- /** Session download props plus the optional feedback action. */
241
- export type SessionLogDownloadHeaderProps = SessionLogDownloadDialogProps & InjectFace<SessionLogDownloadHeaderInjected>
242
-
243
- +/** Trajectory toolbar presentation of the same download controller. */
244
- +type SessionLogDownloadToolbarActionProps =
245
- + PropsRuntime<'conversation.trajectory.toolbar.utilities'>
246
- + & PropsLocale<typeof NS>
247
- + & InjectFace<SessionLogDownloadDialogInjected>
248
- +
249
- /**
250
- * Render the Session Header menu with Markdown copy, download, and optional
251
- * feedback actions.
252
- @@ -77,6 +84,7 @@ export function SessionLogDownloadHeaderAction(props: SessionLogDownloadHeaderPr
253
- <Button
254
- size="sm"
255
- className={css.moreButton}
256
- + data-session-log-header
257
- aria-label={t('header.more')}
258
- aria-haspopup="menu"
259
- aria-expanded={open}
260
- @@ -91,3 +99,31 @@ export function SessionLogDownloadHeaderAction(props: SessionLogDownloadHeaderPr
261
- </>
262
- )
263
- }
264
- +
265
- +/**
266
- + * Render the desktop Session export action in the Trajectory toolbar.
267
- + * @param props - Session runtime, shared download controller, and localized copy.
268
- + * @returns the compact toolbar action.
269
- + */
270
- +export function SessionLogDownloadToolbarAction(
271
- + props: SessionLogDownloadToolbarActionProps,
272
- +): ReactNode {
273
- + const { sessionId, useSessionLogDownload, request, t } = props
274
- + const entry = useSessionLogDownload(state => state.bySession[String(sessionId)])
275
- + const busy = entry?.status === 'downloading'
276
- +
277
- + return (
278
- + <button
279
- + type="button"
280
- + className={css.trajectoryButton}
281
- + data-session-log-toolbar
282
- + disabled={busy}
283
- + aria-busy={busy}
284
- + title={t('header.action')}
285
- + onClick={() => { void request(sessionId) }}
286
- + >
287
- + <IconDownloadOutlineRegular size={11} />
288
- + <span>{t('header.action')}</span>
289
- + </button>
290
- + )
291
- +}
292
- diff --git a/packages/session-query/session-log-export/src/client/index.ts b/packages/session-query/session-log-export/src/client/index.ts
293
- index 74808d1751..f3acaa0746 100644
294
- --- a/packages/session-query/session-log-export/src/client/index.ts
295
- +++ b/packages/session-query/session-log-export/src/client/index.ts
296
- @@ -8,11 +8,16 @@ import type {} from '@deepseek-ai/dsh-client-ui-conversation/client'
297
- import type {} from '@deepseek-ai/dsh-client-ui-renderer/client'
298
- import type {} from '@deepseek-ai/dsh-client-ui-session/client'
299
- import type {} from '@deepseek-ai/dsh-client-ui-message-feedback/client'
300
- +import type {} from '@deepseek-ai/dsh-client-ui-trajectory/client'
301
- import { createSnapshotStore } from '@deepseek-ai/dsh-client-store'
302
- import { SessionLogDownloadController } from './controller.ts'
303
- import { SessionMarkdownCopyController } from './copy-controller.ts'
304
- import { SessionMarkdownCopyToast, type SessionMarkdownCopyToastInjected } from './CopyToast.tsx'
305
- -import { SessionLogDownloadHeaderAction, type SessionLogDownloadHeaderInjected } from './HeaderAction.tsx'
306
- +import type { SessionLogDownloadDialogInjected } from './Dialog.tsx'
307
- +import {
308
- + SessionLogDownloadHeaderAction, SessionLogDownloadToolbarAction,
309
- + type SessionLogDownloadHeaderInjected,
310
- +} from './HeaderAction.tsx'
311
- import { en, ja, es, fr, de, ru, pt, NS, zh, type SessionLogDownloadKey } from './locales.ts'
312
-
313
- declare module '@deepseek-ai/cordis' {
314
- @@ -39,6 +44,13 @@ export const inject = ['slots', 'locale']
315
- export function apply(ctx: ClientContext): void {
316
- const controller = new SessionLogDownloadController()
317
- const copyController = new SessionMarkdownCopyController()
318
- + // The Trajectory presentation is download-only and shares the same controller,
319
- + // request, and dismiss as the Header one.
320
- + const injectAction = (): SessionLogDownloadDialogInjected => ({
321
- + hooks: { sessionLogDownload: controller.store },
322
- + request: (sessionId: SessionId) => controller.download(sessionId),
323
- + dismiss: (sessionId: SessionId) => { controller.dismiss(sessionId) },
324
- + })
325
- ctx.provide('sessionLogDownload', controller)
326
- ctx.effect(() => async () => { await controller.dispose() }, 'session-log-download: browser download lifecycle')
327
- ctx.effect(() => async () => { await copyController.dispose() }, 'session-log-download: browser Markdown copy lifecycle')
328
- @@ -79,6 +91,12 @@ export function apply(ctx: ClientContext): void {
329
- openFeedback: (sessionId: SessionId) => { ctx.get('feedbackUi')?.openSession(sessionId) },
330
- }),
331
- }, SessionLogDownloadHeaderAction))
332
- + ctx.slots.inject('conversation.trajectory.toolbar.utilities', () => ctx.slots.register({
333
- + name: 'conversation.trajectory.toolbar.utilities',
334
- + id: 'session-log-download',
335
- + locale: NS,
336
- + inject: injectAction,
337
- + }, SessionLogDownloadToolbarAction))
338
- }
339
-
340
- export type { SessionLogDownloadDialogInjected, SessionLogDownloadDialogProps } from './Dialog.tsx'
341
- diff --git a/packages/session-query/session-log-export/tsconfig.client.json b/packages/session-query/session-log-export/tsconfig.client.json
342
- index c78dbf6893..43a2f3e861 100644
343
- --- a/packages/session-query/session-log-export/tsconfig.client.json
344
- +++ b/packages/session-query/session-log-export/tsconfig.client.json
345
- @@ -28,6 +28,7 @@
346
- { "path": "../../client/ui-renderer" },
347
- { "path": "../../client/ui-session" },
348
- { "path": "../../client/ui-slots" },
349
- + { "path": "../../client/ui-trajectory/tsconfig.client.json" },
350
- { "path": "../../core/session" }
351
- ]
352
- }
@@ -1,217 +0,0 @@
1
- diff --git a/packages/client/ui-schedule/src/client/TaskManagerPage.module.css b/packages/client/ui-schedule/src/client/TaskManagerPage.module.css
2
- index 7c4acf5a3d..ea9d29e2e3 100644
3
- --- a/packages/client/ui-schedule/src/client/TaskManagerPage.module.css
4
- +++ b/packages/client/ui-schedule/src/client/TaskManagerPage.module.css
5
- @@ -149,6 +149,12 @@
6
- neutral hairline, the 10px radius, and the mock's `--muted` leading icon. The
7
- mock brightens the border on hover and takes the brand stroke on focus
8
- rather than drawing a ring around the control. */
9
- +/* The runtime extension tab keeps the page's centered column, so a contributor
10
- + body lines up with the search field and the task rows. */
11
- +.plazaBody {
12
- + min-width: 0;
13
- +}
14
- +
15
- .searchTools {
16
- --task-search-height: 36px;
17
- display: flex;
18
- diff --git a/packages/client/ui-schedule/src/client/TaskManagerPage.tsx b/packages/client/ui-schedule/src/client/TaskManagerPage.tsx
19
- index 3c330c9f26..f7e7b78312 100644
20
- --- a/packages/client/ui-schedule/src/client/TaskManagerPage.tsx
21
- +++ b/packages/client/ui-schedule/src/client/TaskManagerPage.tsx
22
- @@ -5,7 +5,7 @@ import {
23
- Button, IconClockOutlineRegular, IconCloseOutlineRegular, IconEllipsisOutlineRegular, IconPlusOutlineRegular,
24
- IconSearchOutlineRegular, IconTrashOutlineRegular, Input, Menu, Modal, Tooltip,
25
- } from '@deepseek-ai/dsh-client-ui-primitives'
26
- -import type { HostObservable, InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
27
- +import type { HostObservable, InjectFace, PropsLocale, PropsRenderSlots, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
28
- import type {} from '@deepseek-ai/dsh-client-ui-layout/client'
29
- import type { ScheduleCatalogEntry, ScheduleId } from '@deepseek-ai/dsh-schedule/client'
30
- import type { CatalogSnapshot } from './catalog-source.ts'
31
- @@ -36,14 +36,26 @@ export interface TaskManagerInjected extends TaskDetailInjected {
32
- * @returns resolution after the outcome is reported.
33
- */
34
- readonly onClearEnded: () => Promise<void>
35
- + /**
36
- + * Whether a plugin currently contributes the page's runtime extension tab.
37
- + *
38
- + * The page reads this while rendering, so a contributor that registers after
39
- + * the page mounted still makes its tab appear on the next render; with no
40
- + * contributor the page keeps exactly its three status tabs.
41
- + * @returns true when the `schedule.manager.tabs` seat has an occupant.
42
- + */
43
- + readonly plazaAvailable?: () => boolean
44
- }
45
-
46
- /** Root-scoped task catalog props derived from the framework and injected actions. */
47
- export type TaskManagerPageProps = PropsRuntime<'main'>
48
- & InjectFace<TaskManagerInjected>
49
- & PropsLocale<'schedule.manager'>
50
- + // Narrowed to the one seat this page declares; optional so a unit test can
51
- + // render the page without a slot host, as every other page-level test does.
52
- + & Partial<PropsRenderSlots<'schedule.manager.tabs'>>
53
-
54
- -type StatusFilter = 'all' | ScheduleCatalogEntry['status']
55
- +type StatusFilter = 'all' | ScheduleCatalogEntry['status'] | 'plaza'
56
-
57
- /**
58
- * Render retained tasks with authoritative deletion and timing-only edits.
59
- @@ -51,7 +63,7 @@ type StatusFilter = 'all' | ScheduleCatalogEntry['status']
60
- * @returns the searchable task list beside the selected task's detail.
61
- */
62
- export function TaskManagerPage(props: TaskManagerPageProps) {
63
- - const { useCatalog, onNewTask, onClearEnded, onRetry, t } = props
64
- + const { useCatalog, onNewTask, onClearEnded, onRetry, plazaAvailable, renderSlot, t } = props
65
- const catalog = useCatalog(snapshot => snapshot)
66
- const { records, status } = catalog
67
- const [search, setSearch] = useState('')
68
- @@ -85,7 +97,7 @@ export function TaskManagerPage(props: TaskManagerPageProps) {
69
- const rows = useMemo(() => {
70
- const query = search.trim().toLowerCase()
71
- return records.filter(record => (
72
- - (statusFilter === 'all' || record.status === statusFilter)
73
- + (statusFilter === 'all' || (statusFilter !== 'plaza' && record.status === statusFilter))
74
- && (record.prompt.toLowerCase().includes(query)
75
- || record.sessionId.toLowerCase().includes(query)
76
- || taskName(record).toLowerCase().includes(query))
77
- @@ -202,8 +214,24 @@ export function TaskManagerPage(props: TaskManagerPageProps) {
78
- {t(value === 'all' ? 'statusFilter.all' : `status.${value}`)}
79
- </button>
80
- ))}
81
- + {plazaAvailable?.() === true && (
82
- + <button
83
- + type="button"
84
- + className={clsx(css.filterTab, statusFilter === 'plaza' && css.filterTabActive)}
85
- + aria-pressed={statusFilter === 'plaza'}
86
- + data-testid="task-manager-plaza-tab"
87
- + onClick={() => { setStatusFilter('plaza') }}
88
- + >
89
- + {t('statusFilter.plaza')}
90
- + </button>
91
- + )}
92
- </div>
93
- </div>
94
- + {statusFilter === 'plaza' ? (
95
- + <div className={css.plazaBody} data-testid="task-manager-plaza-body">
96
- + {renderSlot?.('schedule.manager.tabs', {})}
97
- + </div>
98
- + ) : (<>
99
- <div className={css.searchTools}>
100
- <div className={css.searchField}>
101
- <Input
102
- @@ -299,6 +327,7 @@ export function TaskManagerPage(props: TaskManagerPageProps) {
103
- })}
104
- </ul>
105
- </div>
106
- + </>)}
107
- </div>
108
- </div>
109
- </div>
110
- diff --git a/packages/client/ui-schedule/src/client/index.ts b/packages/client/ui-schedule/src/client/index.ts
111
- index 7dcbc32ee3..cd072150e7 100644
112
- --- a/packages/client/ui-schedule/src/client/index.ts
113
- +++ b/packages/client/ui-schedule/src/client/index.ts
114
- @@ -73,6 +73,21 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
115
- /** Host task management page and task tab copy. */
116
- 'schedule.manager': TaskManagerKey
117
- }
118
- + interface SlotMap {
119
- + /**
120
- + * One extension body contributed at runtime to the automation-task page.
121
- + *
122
- + * The page renders the single occupant as an additional status tab and
123
- + * supplies no owner props: a contributor owns its own data and needs no
124
- + * identity from the page. The seat belongs to no Session, so opening the
125
- + * page never mounts a contributor against an arbitrary conversation.
126
- + */
127
- + 'schedule.manager.tabs': {
128
- + kind: 'single'
129
- + scope: 'root'
130
- + owner: Record<string, never>
131
- + }
132
- + }
133
- }
134
-
135
- /** Required services for catalogs, ambient Session marks, the right Sidebar, Remote queries, original-Session navigation, and access. */
136
- @@ -197,8 +212,13 @@ export function apply(ctx: ClientContext): void {
137
- name: 'main',
138
- key: PANEL_ID,
139
- locale: MANAGER_NS,
140
- + // The automation page is the one first-level page that accepts a runtime
141
- + // extension tab. Declaring the seat here is what lets a plugin contribute
142
- + // a tab body without this package importing that plugin.
143
- + children: { 'schedule.manager.tabs': { kind: 'single', scope: 'root' } },
144
- inject: (): TaskManagerInjected => ({
145
- ...detail,
146
- + plazaAvailable: () => ctx.slots.entriesOfSlot('schedule.manager.tabs').length > 0,
147
- // The page has no creation form: a new reminder starts in a Session.
148
- onNewTask: () => { ctx.uiWorkspace.startSession() },
149
- onClearEnded: async () => {
150
- diff --git a/packages/client/ui-schedule/src/client/task-manager-locales.ts b/packages/client/ui-schedule/src/client/task-manager-locales.ts
151
- index fffde14568..145b05a825 100644
152
- --- a/packages/client/ui-schedule/src/client/task-manager-locales.ts
153
- +++ b/packages/client/ui-schedule/src/client/task-manager-locales.ts
154
- @@ -20,6 +20,7 @@ export const en = {
155
- 'empty.action': 'New automation task',
156
- 'statusFilter.label': 'Task status',
157
- 'statusFilter.all': 'All',
158
- + 'statusFilter.plaza': 'Workflow plaza',
159
- 'status.active': 'Enabled',
160
- 'status.inactive': 'Inactive',
161
- 'detail.label': 'Task details',
162
- @@ -176,6 +177,7 @@ export const zh: Record<TaskManagerKey, string> = {
163
- 'empty.action': '新建自动化任务',
164
- 'statusFilter.label': '任务状态',
165
- 'statusFilter.all': '全部',
166
- + 'statusFilter.plaza': '工作流广场',
167
- 'status.active': '已开启',
168
- 'status.inactive': '已结束',
169
- 'detail.label': '任务详情',
170
- @@ -327,6 +329,7 @@ export const ja = {
171
- 'empty.action': '新規自動化タスク',
172
- 'statusFilter.label': 'タスクの状態',
173
- 'statusFilter.all': 'すべて',
174
- + 'statusFilter.plaza': 'ワークフロープラザ',
175
- 'status.active': '有効',
176
- 'status.inactive': '無効',
177
- 'detail.label': 'タスクの詳細',
178
- @@ -476,6 +479,7 @@ export const es = {
179
- 'empty.action': 'Nueva tarea de automatización',
180
- 'statusFilter.label': 'Estado de la tarea',
181
- 'statusFilter.all': 'Todos',
182
- + 'statusFilter.plaza': 'Plaza de flujos',
183
- 'status.active': 'Habilitado',
184
- 'status.inactive': 'Inactivo',
185
- 'detail.label': 'Detalles de la tarea',
186
- @@ -628,6 +632,7 @@ export const fr = {
187
- 'empty.action': "Nouvelle tâche d'automatisation",
188
- 'statusFilter.label': 'Statut de la tâche',
189
- 'statusFilter.all': 'Tout',
190
- + 'statusFilter.plaza': 'Place des workflows',
191
- 'status.active': 'Activé',
192
- 'status.inactive': 'Inactif',
193
- 'detail.label': 'Détails de la tâche',
194
- @@ -780,6 +785,7 @@ export const de = {
195
- 'empty.action': 'Neue Automatisierungsaufgabe',
196
- 'statusFilter.label': 'Aufgabenstatus',
197
- 'statusFilter.all': 'Alle',
198
- + 'statusFilter.plaza': 'Workflow-Plaza',
199
- 'status.active': 'Aktiviert',
200
- 'status.inactive': 'Inaktiv',
201
- 'detail.label': 'Aufgabendetails',
202
- @@ -932,6 +938,7 @@ export const ru = {
203
- 'empty.action': 'Новая задача автоматизации',
204
- 'statusFilter.label': 'Статус задачи',
205
- 'statusFilter.all': 'Все',
206
- + 'statusFilter.plaza': 'Витрина сценариев',
207
- 'status.active': 'Включено',
208
- 'status.inactive': 'Неактивный',
209
- 'detail.label': 'Подробности задачи',
210
- @@ -1084,6 +1091,7 @@ export const pt = {
211
- 'empty.action': 'Nova tarefa de automação',
212
- 'statusFilter.label': 'Status da tarefa',
213
- 'statusFilter.all': 'Todos',
214
- + 'statusFilter.plaza': 'Praça de fluxos',
215
- 'status.active': 'Habilitado',
216
- 'status.inactive': 'Inativo',
217
- 'detail.label': 'Detalhes da tarefa',
@@ -1,83 +0,0 @@
1
- diff --git a/packages/bundle/web-app/src/index.ts b/packages/bundle/web-app/src/index.ts
2
- index b93b559620..8b40aae24d 100644
3
- --- a/packages/bundle/web-app/src/index.ts
4
- +++ b/packages/bundle/web-app/src/index.ts
5
- @@ -14,13 +14,14 @@
6
-
7
- import { spawn, type ChildProcess } from 'node:child_process'
8
- import { createRequire } from 'node:module'
9
- +import { networkInterfaces } from 'node:os'
10
- import { dirname, join } from 'node:path'
11
- import type { Context } from '@deepseek-ai/cordis'
12
- import z from '@deepseek-ai/schemastery'
13
- import { auditStartupEntries } from '@deepseek-ai/dsh-app-boot'
14
- import type {} from '@deepseek-ai/dsh-client-connection'
15
- import * as FrontendStatic from '@deepseek-ai/dsh-host-frontend-static'
16
- -import { bindUrlHost, isLoopbackHost } from '@deepseek-ai/dsh-host-webserver'
17
- +import { bindUrlHost, isLoopbackHost, isWildcardHost } from '@deepseek-ai/dsh-host-webserver'
18
- import { launchedThroughSsh, launchEnvironmentOf } from '@deepseek-ai/dsh-launch-environment'
19
- import { scrubbedParentEnv } from '@deepseek-ai/dsh-subprocess'
20
- import type {} from '@deepseek-ai/cordis-plugin-loader'
21
- @@ -70,6 +71,17 @@ export interface Config {
22
- * Absent or YAML `null` advertises the bind-address URL.
23
- */
24
- publicUrl?: string
25
- + /**
26
- + * Non-loopback authorities a deployment serves this GUI on, appended to the
27
- + * sampled LAN literals. The listener's own bind address is accepted
28
- + * separately, so this list carries only what the bind cannot name: a reverse
29
- + * proxy's host, or a public origin a browser actually uses.
30
- + *
31
- + * Superseded by the `connection` row's own `trustedHosts`, which is where a
32
- + * deployment adds authorities today. Kept so a profile layer written against
33
- + * the pre-rename row keeps reaching the host fence.
34
- + */
35
- + trustedHosts?: string[]
36
- }
37
-
38
- export const Config: z<Config> = z.object({
39
- @@ -77,6 +89,7 @@ export const Config: z<Config> = z.object({
40
- printUrl: z.boolean().default(true),
41
- surfaceContext: z.boolean().default(true),
42
- publicUrl: z.transform(z.string(), value => parsePublicUrl(value).href),
43
- + trustedHosts: z.array(String).default([]),
44
- })
45
-
46
- /** Environment variable naming the advertised URL of this Web GUI. */
47
- @@ -204,6 +217,36 @@ export function apply(ctx: Context, config: Config): void {
48
- const appRootUrl = (): string => publicUrl ?? ctx.webServer.getOrigin()
49
- ctx.provide('webApp', { getAdvertisedUrl: appRootUrl } satisfies WebApp)
50
- ctx.plugin(FrontendStatic, { distIndex: internals.resolveDistIndex() })
51
- +
52
- + // WEB_RUNTIME_COMPAT: alpha.2 renamed the bind-dependent service from
53
- + // `webRuntime` to `webStartup` and taught its own rows the new name. A
54
- + // third-party bundle cannot follow the rename: dsh-better-sidebar and
55
- + // dsh-video-preview declare `inject: [..., 'webRuntime', ...]`, and Cordis
56
- + // holds an injected row pending until the named service appears. A deployment
57
- + // that mounts them loses the sidebar routes and the video preview that are the
58
- + // whole reason they are mounted, so the old shape is published beside the new
59
- + // one for as long as those bundles ask for it.
60
- + //
61
- + // The shape is the pre-rename service: LAN literals sampled once from a
62
- + // wildcard bind, then this invocation's and the deployment's own authorities.
63
- + // `webStartup` already carries the flag-supplied half, so it is read rather
64
- + // than re-parsed, and `isWildcardHost` is the webserver's own predicate
65
- + // rather than a string comparison against the IPv4 any-address. This row's
66
- + // `trustedHosts` reaches the fence again here: alpha.2 moved the deployment
67
- + // list to the `connection` row, which leaves a profile layer written against
68
- + // the old row — one that serves a reverse-proxied origin — configuring a key
69
- + // nothing reads.
70
- + const compatLanAddresses = isWildcardHost(boundHost)
71
- + ? Object.values(networkInterfaces()).flat()
72
- + .filter((iface): iface is NonNullable<typeof iface> => iface !== undefined && iface.family === 'IPv4' && !iface.internal)
73
- + .map(iface => iface.address)
74
- + : []
75
- + const compatStartup = ctx.get('webStartup') as { trustedHosts?: readonly string[] } | undefined
76
- + ctx.provide('webRuntime', {
77
- + lanAddresses: compatLanAddresses,
78
- + trustedHosts: [...compatLanAddresses, ...config.trustedHosts ?? [], ...compatStartup?.trustedHosts ?? []],
79
- + })
80
- +
81
- if (config.surfaceContext) {
82
- ctx.inject(['shellEnv'], (runtimeCtx) => {
83
- runtimeCtx.shellEnv.register({