@lincyaw/dsh 0.2.0-rc.91 → 0.2.0-rc.93
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/build/dist/client.js +180 -180
- package/build/dist/client.json +7 -0
- package/package.json +7 -7
- package/src/client/RootLayout.tsx +6 -5
- package/src/client/fallback.tsx +3 -3
- package/src/client/frame.css +0 -10
- package/src/client/index.tsx +2 -1
- package/src/client/layout.ts +9 -6
- package/src/client/navigation-shell.tsx +2 -2
- package/src/client/workspace-events.ts +1 -1
- package/src/node/workspace-events.ts +1 -0
- package/src/workspace-events.ts +1 -1
package/build/dist/client.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"inputs": [
|
|
3
3
|
"../kernel/src/contracts/service.ts",
|
|
4
4
|
"../kernel/src/contracts/agent.ts",
|
|
5
|
+
"../kernel/src/contracts/agent-activity.ts",
|
|
5
6
|
"../kernel/src/contracts/authoring.ts",
|
|
6
7
|
"../kernel/src/contracts/capture.ts",
|
|
7
8
|
"../kernel/src/contracts/document-reads.ts",
|
|
@@ -135,6 +136,7 @@
|
|
|
135
136
|
"../design/src/icons.ts",
|
|
136
137
|
"../design/src/tokens.ts",
|
|
137
138
|
"../design/src/assets/brand.ts",
|
|
139
|
+
"../design/src/length.ts",
|
|
138
140
|
"../design/src/index.ts",
|
|
139
141
|
"../workbench/src/base-controls.tsx",
|
|
140
142
|
"../workbench/src/sortable-list.tsx",
|
|
@@ -175,11 +177,13 @@
|
|
|
175
177
|
"../workbench/src/preview-playback.ts",
|
|
176
178
|
"../workbench/src/production-playback.ts",
|
|
177
179
|
"../workbench/src/workbench.ts",
|
|
180
|
+
"../workbench/src/container-layout.ts",
|
|
178
181
|
"../workbench/src/outline.ts",
|
|
179
182
|
"../workbench/src/panels/ExportPanel.tsx",
|
|
180
183
|
"../workbench/src/panels/HistoryPanel.tsx",
|
|
181
184
|
"../workbench/src/preview-pool.ts",
|
|
182
185
|
"../workbench/src/panels/PreviewPanel.tsx",
|
|
186
|
+
"../workbench/src/agent-activity.ts",
|
|
183
187
|
"../workbench/src/document-editor/blocknote-messages.ts",
|
|
184
188
|
"../workbench/src/document-editor/colors.ts",
|
|
185
189
|
"../workbench/src/document-editor/messages.ts",
|
|
@@ -232,6 +236,7 @@
|
|
|
232
236
|
"../workbench/src/panels/ProductionPanel.tsx",
|
|
233
237
|
"../workbench/src/panels/PageRenameDialog.tsx",
|
|
234
238
|
"../workbench/src/panels/PageDeleteDialog.tsx",
|
|
239
|
+
"../workbench/src/document-editor/agent-targets.ts",
|
|
235
240
|
"../workbench/src/document-editor/projection.ts",
|
|
236
241
|
"../workbench/src/document-editor/insertion-place.ts",
|
|
237
242
|
"../workbench/src/document-editor/DocumentEditor.tsx",
|
|
@@ -251,6 +256,8 @@
|
|
|
251
256
|
"../workbench/src/panels/SpeechSettingsPanel.tsx",
|
|
252
257
|
"../workbench/src/authoring-client.ts",
|
|
253
258
|
"../workbench/src/authoring-window.ts",
|
|
259
|
+
"../workbench/src/agent-activity-messages.ts",
|
|
260
|
+
"../workbench/src/AgentActivityBar.tsx",
|
|
254
261
|
"../workbench/src/index.ts",
|
|
255
262
|
"src/workspace-events.ts",
|
|
256
263
|
"src/client/workspace-events.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lincyaw/dsh",
|
|
3
|
-
"version": "0.2.0-rc.
|
|
3
|
+
"version": "0.2.0-rc.93",
|
|
4
4
|
"description": "Presmium's bundle for DeepSeek Harness: the workbench of presmium studio, its host side (Presmium's tools, approvals, document context, skills and routes) and its client side (the root layout and the workbench's panels, precompiled) (experimental)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -86,10 +86,10 @@
|
|
|
86
86
|
"node-addon-require-builtin": "0.1.9",
|
|
87
87
|
"ws": "8.22.0",
|
|
88
88
|
"zod": "4.4.3",
|
|
89
|
-
"@lincyaw/cli": "1.0.0-rc.
|
|
90
|
-
"@lincyaw/
|
|
91
|
-
"@lincyaw/
|
|
92
|
-
"@lincyaw/
|
|
89
|
+
"@lincyaw/cli": "1.0.0-rc.94",
|
|
90
|
+
"@lincyaw/skills": "1.0.0-rc.94",
|
|
91
|
+
"@lincyaw/kernel": "1.0.0-rc.94",
|
|
92
|
+
"@lincyaw/mcp": "1.0.0-rc.94"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
95
|
"@deepseek-ai/dsh": "0.2.1-alpha.4"
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"react": "18.3.1",
|
|
106
106
|
"react-dom": "18.3.1",
|
|
107
107
|
"react-resizable-panels": "^4.14.5",
|
|
108
|
-
"@lincyaw/
|
|
109
|
-
"@lincyaw/
|
|
108
|
+
"@lincyaw/workbench": "0.2.0-rc.94",
|
|
109
|
+
"@lincyaw/design": "1.0.0-rc.94"
|
|
110
110
|
},
|
|
111
111
|
"scripts": {}
|
|
112
112
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Group, Panel, Separator, usePanelRef } from 'react-resizable-panels'
|
|
2
|
-
import { DocumentView, HomePanel, PmDialog, PmIcon, PmMenu, SHORTCUTS, useWorkbenchState, WorkbenchApprovals, WorkbenchProvider } from '@lincyaw/workbench'
|
|
2
|
+
import { AgentActivityBar, DocumentView, HomePanel, PmDialog, PmIcon, PmMenu, SHORTCUTS, useWorkbenchState, WorkbenchApprovals, WorkbenchProvider } from '@lincyaw/workbench'
|
|
3
3
|
import type { Workbench } from '@lincyaw/workbench'
|
|
4
4
|
import { useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react'
|
|
5
5
|
import type { ReactNode, RefObject } from 'react'
|
|
6
6
|
import { Logo } from './brand.tsx'
|
|
7
7
|
import { mainViewAgentSession } from './document-context.ts'
|
|
8
|
-
import { clamp, CONVERSATION_MAX, CONVERSATION_MIN,
|
|
8
|
+
import { centreMinWidth, clamp, CONVERSATION_MAX, CONVERSATION_MIN, singlePaneWidth, RIGHTBAR_MAX_RATIO, RIGHTBAR_MIN, rightbarRoom, SIDE_COLLAPSE, SIDE_MAX, SIDE_MIN } from './layout.ts'
|
|
9
9
|
import type { LayoutActions, LayoutState, NarrowPane } from './layout.ts'
|
|
10
10
|
import { useClientMessages } from './messages.ts'
|
|
11
11
|
import { isSamePath } from './paths.ts'
|
|
@@ -45,7 +45,7 @@ export function rootLayoutFor(options: RootLayoutOptions) {
|
|
|
45
45
|
/** The columns' widths for the viewport: 0 for a column that is not shown. */
|
|
46
46
|
function solveGeometry(info: LayoutState['layoutInfo']) {
|
|
47
47
|
const viewport = info.viewportWidth
|
|
48
|
-
const narrow = viewport <
|
|
48
|
+
const narrow = viewport < singlePaneWidth()
|
|
49
49
|
const collapsed = viewport < SIDE_COLLAPSE
|
|
50
50
|
const side = narrow ? 0 : (collapsed ? info.isSideExpanded : info.isSideOpen) ? info.sideWidth : 0
|
|
51
51
|
const conversation = narrow || !info.isConversationOpen ? 0 : collapsed ? Math.min(info.conversationWidth, Math.max(300, Math.round(viewport * 0.4))) : info.conversationWidth
|
|
@@ -221,7 +221,7 @@ function RootLayout({ useStore, useSessions, usePanelInfo, actions, renderSlot,
|
|
|
221
221
|
<div className="pmw-frame__sidebar" data-pmw-slot="sidebar" data-shown={(narrow ? pane === 'sessions' : sideShown) || undefined}>{sidebar}</div>
|
|
222
222
|
</Panel>
|
|
223
223
|
{sideShown && <Separator className="pmw-frame__handle" data-side="side" aria-label={t.resize} />}
|
|
224
|
-
<Panel id="centre" minSize={narrow ? 0 :
|
|
224
|
+
<Panel id="centre" minSize={narrow ? 0 : centreMinWidth()} className="pmw-frame__centre-panel" hidden={narrow && (pane === 'sessions' || pane === 'conversation') && panel === null}>
|
|
225
225
|
<main id="pmw-centre" className="pmw-frame__centre" aria-label={documentTitle ?? t.centre}>{centre}</main>
|
|
226
226
|
</Panel>
|
|
227
227
|
{!narrow && info.isRightbarOpen && !info.isRightbarFullscreen && geometry.track > 0 && (
|
|
@@ -293,7 +293,7 @@ function AppBar({ workbench, info, actions, activePanel, globalPanels, pane, nar
|
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
return (
|
|
296
|
-
<nav className="pmw-appbar" aria-label={t.activity}>
|
|
296
|
+
<nav className="pm-ui-appbar pmw-appbar" aria-label={t.activity}>
|
|
297
297
|
<span className="pmw-appbar__brand"><Logo /><span className="pmw-brand-name">{t.product}</span></span>
|
|
298
298
|
<ol className="pmw-appbar__places">
|
|
299
299
|
<li>
|
|
@@ -311,6 +311,7 @@ function AppBar({ workbench, info, actions, activePanel, globalPanels, pane, nar
|
|
|
311
311
|
{panelLabel && <li><span className="pmw-appbar__place" aria-current="page"><span className="pmw-appbar__label">{panelLabel}</span></span></li>}
|
|
312
312
|
</ol>
|
|
313
313
|
<span className="pmw-spacer" />
|
|
314
|
+
<AgentActivityBar />
|
|
314
315
|
<span className="pmw-appbar__approvals" data-activity="approvals"><WorkbenchApprovals density={narrow ? 'touch' : 'compact'} /></span>
|
|
315
316
|
<button type="button" className="pmw-appbar__button pmw-appbar__assistant" data-activity="assistant" title={t.assistant} aria-pressed={chatShown} onClick={toggleAssistant}>
|
|
316
317
|
<PmIcon name="sparkle" /><span className="pmw-appbar__label">{t.assistant}</span>
|
package/src/client/fallback.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DocumentView, HistoryPanel, HomePanel, PreviewPanel, useWorkbench, useWorkbenchState, WorkbenchProvider, WorkbenchApprovals } from '@lincyaw/workbench'
|
|
1
|
+
import { AgentActivityBar, DocumentView, HistoryPanel, HomePanel, PreviewPanel, useWorkbench, useWorkbenchState, WorkbenchProvider, WorkbenchApprovals } from '@lincyaw/workbench'
|
|
2
2
|
import type { Workbench } from '@lincyaw/workbench'
|
|
3
3
|
import { useRef } from 'react'
|
|
4
4
|
import type { ComponentType } from 'react'
|
|
@@ -17,9 +17,9 @@ function Centre() {
|
|
|
17
17
|
return (
|
|
18
18
|
<div className="pmw-fallback pm-ui" data-pmw-fallback="">
|
|
19
19
|
<RuntimeDiagnosticsNotice workbench={workbench} />
|
|
20
|
-
{document_ === undefined && <HomePanel />}
|
|
20
|
+
{document_ === undefined && <HomePanel actions={<AgentActivityBar />} />}
|
|
21
21
|
{retainedDocument.current && <div className="pmw-fallback__doc" hidden={document_ === undefined}>
|
|
22
|
-
<DocumentView active={document_ !== undefined} />
|
|
22
|
+
<DocumentView active={document_ !== undefined} actions={<AgentActivityBar />} />
|
|
23
23
|
</div>}
|
|
24
24
|
</div>
|
|
25
25
|
)
|
package/src/client/frame.css
CHANGED
|
@@ -43,11 +43,7 @@ body,
|
|
|
43
43
|
align-items: center;
|
|
44
44
|
gap: var(--pm-space-px);
|
|
45
45
|
min-width: 0;
|
|
46
|
-
height: var(--pm-appbar-height);
|
|
47
46
|
padding: 0 var(--pm-space-2) 0 var(--pm-space-3);
|
|
48
|
-
border-bottom: var(--pm-size-hairline) solid var(--pm-color-line);
|
|
49
|
-
background: var(--pm-color-chrome);
|
|
50
|
-
font-size: var(--pm-text-sm);
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
.pmw-appbar__brand {
|
|
@@ -172,12 +168,6 @@ span.pmw-appbar__place {
|
|
|
172
168
|
height: var(--pm-size-logo);
|
|
173
169
|
}
|
|
174
170
|
|
|
175
|
-
.pmw-appbar__more > .pm-ui-icon-button {
|
|
176
|
-
width: var(--pm-size-tool);
|
|
177
|
-
height: var(--pm-size-tool);
|
|
178
|
-
border-radius: var(--pm-radius-tool);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
171
|
.pmw-appbar__busy {
|
|
182
172
|
position: absolute;
|
|
183
173
|
top: var(--pm-space-1);
|
package/src/client/index.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { connectAuthoringClient, connectAuthoringWindow, localeOf, Workbench, workspaceClient } from '@lincyaw/workbench'
|
|
1
|
+
import { connectAgentActivity, connectAuthoringClient, connectAuthoringWindow, localeOf, Workbench, workspaceClient } from '@lincyaw/workbench'
|
|
2
2
|
import type { Locale } from '@lincyaw/workbench'
|
|
3
3
|
import { workspaceSubscriptions } from './workspace-events.ts'
|
|
4
4
|
import { registerAuthorSettings } from './author-settings.ts'
|
|
@@ -56,6 +56,7 @@ export function apply(ctx: DshClientContext): void {
|
|
|
56
56
|
workbench.client.openSpeechSettings = openSpeechSettings
|
|
57
57
|
ctx.effect(() => connectAuthoringClient(workbench), 'presmium: authoring client control')
|
|
58
58
|
ctx.effect(() => connectAuthoringWindow(workbench), 'presmium: authoring window control')
|
|
59
|
+
ctx.effect(() => connectAgentActivity(workbench), 'presmium: agent activity')
|
|
59
60
|
ctx.effect(() => runtimeDiagnostics(workbench).start(), 'presmium: runtime diagnostics')
|
|
60
61
|
let showEditor = (layout: DshClientContext['layout']) => layout.selectPanel(FALLBACK_PANEL)
|
|
61
62
|
registerSourceLinks(ctx, workbench, layout => showEditor(layout))
|
package/src/client/layout.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineStore } from '@deepseek-ai/dsh-client-store'
|
|
2
|
+
import { designLength } from '@lincyaw/design'
|
|
2
3
|
|
|
3
|
-
export const
|
|
4
|
+
export const centreMinWidth = () => designLength('--pm-canvas-min-width')
|
|
4
5
|
export const RIGHTBAR_MIN = 300
|
|
5
6
|
export const RIGHTBAR_MAX_RATIO = 0.7
|
|
6
7
|
export const RIGHTBAR_DEFAULT_RATIO = 0.45
|
|
7
8
|
export const SIDE_COLLAPSE = 1024
|
|
8
|
-
export const NARROW = 768
|
|
9
9
|
export const SIDE_DEFAULT = 264
|
|
10
10
|
export const SIDE_MIN = 200
|
|
11
11
|
export const SIDE_MAX = 420
|
|
@@ -15,11 +15,14 @@ export const CONVERSATION_MAX = 640
|
|
|
15
15
|
/** The width of one resize handle between two columns: a hairline, with a wider area to grab. */
|
|
16
16
|
export const HANDLE = 1
|
|
17
17
|
|
|
18
|
+
/** A split view needs both panes and its divider; use one pane before constraints become impossible. */
|
|
19
|
+
export const singlePaneWidth = () => Math.max(designLength('--pm-layout-narrow-width'), centreMinWidth() + CONVERSATION_MIN + HANDLE)
|
|
20
|
+
|
|
18
21
|
export const clamp = (px: number, min: number, max: number) => Math.min(max, Math.max(min, Math.round(px)))
|
|
19
22
|
|
|
20
23
|
/** The width left for the rightbar column: the viewport less the side panel, the conversation, the centre's minimum and `handles` resize handles. */
|
|
21
24
|
export function rightbarRoom(viewport: number, side: number, conversation: number, handles: number): number {
|
|
22
|
-
return viewport - side - conversation -
|
|
25
|
+
return viewport - side - conversation - centreMinWidth() - handles * HANDLE
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
/** What the side panel shows: the chat history (DeepSeek Harness's sessions). */
|
|
@@ -61,7 +64,7 @@ function showHistory(d: LayoutState): void {
|
|
|
61
64
|
d.layoutInfo.isSideOpen = true
|
|
62
65
|
d.layoutInfo.narrowPane = 'sessions'
|
|
63
66
|
if (d.layoutInfo.viewportWidth < SIDE_COLLAPSE) {
|
|
64
|
-
d.layoutInfo.isSideExpanded = d.layoutInfo.viewportWidth >=
|
|
67
|
+
d.layoutInfo.isSideExpanded = d.layoutInfo.viewportWidth >= singlePaneWidth()
|
|
65
68
|
d.layoutInfo.isConversationOpen = false
|
|
66
69
|
} else d.layoutInfo.isConversationOpen = true
|
|
67
70
|
}
|
|
@@ -121,7 +124,7 @@ export function createLayoutStore() {
|
|
|
121
124
|
showHistory,
|
|
122
125
|
toggleConversations: (d: LayoutState) => {
|
|
123
126
|
const info = d.layoutInfo
|
|
124
|
-
if (info.viewportWidth <
|
|
127
|
+
if (info.viewportWidth < singlePaneWidth()) {
|
|
125
128
|
if (info.narrowPane === 'conversation') showHistory(d)
|
|
126
129
|
else revealConversation(d)
|
|
127
130
|
} else {
|
|
@@ -157,7 +160,7 @@ export function createLayoutStore() {
|
|
|
157
160
|
else d.layoutInfo.isSideOpen = true
|
|
158
161
|
d.layoutInfo.activity = activity
|
|
159
162
|
if (d.layoutInfo.viewportWidth < SIDE_COLLAPSE) {
|
|
160
|
-
d.layoutInfo.isSideExpanded = d.layoutInfo.viewportWidth >=
|
|
163
|
+
d.layoutInfo.isSideExpanded = d.layoutInfo.viewportWidth >= singlePaneWidth()
|
|
161
164
|
if (d.layoutInfo.isSideExpanded) d.layoutInfo.isConversationOpen = false
|
|
162
165
|
}
|
|
163
166
|
d.layoutInfo.narrowPane = activity
|
|
@@ -3,7 +3,7 @@ import type { Workbench } from '@lincyaw/workbench'
|
|
|
3
3
|
import type { ReactNode } from 'react'
|
|
4
4
|
import { isBootEntryLoaded, UI_SIDEBAR } from './contract.ts'
|
|
5
5
|
import type { LayoutActions, LayoutState } from './layout.ts'
|
|
6
|
-
import {
|
|
6
|
+
import { singlePaneWidth, SIDE_COLLAPSE } from './layout.ts'
|
|
7
7
|
import { useClientMessages } from './messages.ts'
|
|
8
8
|
|
|
9
9
|
interface SidebarProps {
|
|
@@ -55,7 +55,7 @@ export function registerNavigationShell(ctx: DshClientContext, workbench: Workbe
|
|
|
55
55
|
<PmIconButton icon="plus" label={t.newConversation} small onClick={() => void startSession()} />
|
|
56
56
|
<PmIconButton icon="history" label={t.conversationHistory} small onClick={() => actions.showHistory()} />
|
|
57
57
|
<PmIconButton icon="close" label={t.hideConversation} small onClick={() => {
|
|
58
|
-
if (layout.getSnapshot().layoutInfo.viewportWidth <
|
|
58
|
+
if (layout.getSnapshot().layoutInfo.viewportWidth < singlePaneWidth()) actions.showNarrowPane(workbench.state.document === undefined ? 'documents' : 'preview')
|
|
59
59
|
else actions.setConversationOpen(false)
|
|
60
60
|
}} />
|
|
61
61
|
</div>
|
|
@@ -6,7 +6,7 @@ import { WORKSPACE_EVENTS_PATH, workspaceEventMessage } from '../workspace-event
|
|
|
6
6
|
import type { WorkspaceEventTopic, WorkspaceEventCommand } from '../workspace-events.ts'
|
|
7
7
|
|
|
8
8
|
const TOPICS: Readonly<Record<string, WorkspaceEventTopic>> = {
|
|
9
|
-
document: 'document', diagnostics: 'diagnostics', review: 'review', revision: 'ir', job: 'jobs', 'viewer-site': 'viewer-site', 'viewer-control': 'viewer-control', approvals: 'approvals',
|
|
9
|
+
document: 'document', diagnostics: 'diagnostics', review: 'review', revision: 'ir', job: 'jobs', 'viewer-site': 'viewer-site', 'viewer-control': 'viewer-control', approvals: 'approvals', 'agent-activity': 'agent-activity',
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
/** Each live reader owns one logical subscription; the library owns physical reconnect timing. */
|
|
@@ -27,6 +27,7 @@ const ROUTES = {
|
|
|
27
27
|
review: { path: `${WORKSPACE_ROUTES}review`, event: 'review' },
|
|
28
28
|
ir: { path: `${WORKSPACE_ROUTES}ir/events`, event: 'revision' },
|
|
29
29
|
jobs: { path: `${WORKSPACE_ROUTES}jobs/events`, event: 'job' },
|
|
30
|
+
'agent-activity': { path: `${WORKSPACE_ROUTES}agent-activity/events`, event: 'agent-activity' },
|
|
30
31
|
} as const
|
|
31
32
|
const MAX_SUBSCRIPTIONS = 16
|
|
32
33
|
const MAX_BUFFERED_BYTES = 2 << 20
|
package/src/workspace-events.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from 'zod'
|
|
|
2
2
|
|
|
3
3
|
/** One authenticated Studio socket carries these existing workspace subscriptions. */
|
|
4
4
|
export const WORKSPACE_EVENTS_PATH = '/api/presmium/events'
|
|
5
|
-
export const WORKSPACE_EVENT_TOPICS = ['document', 'diagnostics', 'review', 'ir', 'jobs'] as const
|
|
5
|
+
export const WORKSPACE_EVENT_TOPICS = ['document', 'diagnostics', 'review', 'ir', 'jobs', 'agent-activity'] as const
|
|
6
6
|
const subscriptionId = z.string().min(1).max(80)
|
|
7
7
|
|
|
8
8
|
const viewerSite = z.strictObject({ type: z.literal('subscribe'), id: subscriptionId, topic: z.literal('viewer-site'), document: z.string().max(1024), app: z.string().max(200), lang: z.string().max(80), form: z.enum(['web', 'slides']) })
|