@lincyaw/dsh 0.2.0-rc.117 → 0.2.0-rc.119

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.
@@ -45,6 +45,8 @@
45
45
  "../kernel/src/contracts/projects.ts",
46
46
  "../kernel/src/contracts/document-image.ts",
47
47
  "../kernel/src/contracts/desktop.ts",
48
+ "../kernel/src/contracts/document-tree.ts",
49
+ "../kernel/src/contracts/document-tree-service.ts",
48
50
  "../kernel/src/contracts.ts",
49
51
  "../kernel/src/random-uuid.ts",
50
52
  "../kernel/src/access.ts",
@@ -71,6 +73,8 @@
71
73
  "../kernel/src/ir.ts",
72
74
  "../kernel/src/anchors.ts",
73
75
  "../kernel/src/diagnostics.ts",
76
+ "../kernel/src/document-settings.ts",
77
+ "../kernel/src/document-tree.ts",
74
78
  "../kernel/src/blocks.ts",
75
79
  "../kernel/src/checks.ts",
76
80
  "../kernel/src/events.ts",
@@ -114,6 +118,7 @@
114
118
  "../kernel/src/component-code.ts",
115
119
  "../kernel/src/jupyter-kernel.ts",
116
120
  "../kernel/src/preview-events.ts",
121
+ "../kernel/src/document-links.ts",
117
122
  "../kernel/src/index.ts",
118
123
  "../workbench/src/workbench-state.ts",
119
124
  "../workbench/src/document-return-point.ts",
@@ -121,6 +126,7 @@
121
126
  "../workbench/src/document-editor/selection.ts",
122
127
  "../workbench/src/shortcuts.ts",
123
128
  "../workbench/src/messages.ts",
129
+ "../workbench/src/effective-settings.ts",
124
130
  "../workbench/src/document-editing.ts",
125
131
  "../workbench/src/workspace-client.ts",
126
132
  "../workbench/src/sha256.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lincyaw/dsh",
3
- "version": "0.2.0-rc.117",
3
+ "version": "0.2.0-rc.119",
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": {
@@ -89,10 +89,10 @@
89
89
  "node-addon-require-builtin": "0.1.9",
90
90
  "ws": "8.22.0",
91
91
  "zod": "4.4.3",
92
- "@lincyaw/cli": "1.0.0-rc.118",
93
- "@lincyaw/kernel": "1.0.0-rc.118",
94
- "@lincyaw/mcp": "1.0.0-rc.118",
95
- "@lincyaw/skills": "1.0.0-rc.118"
92
+ "@lincyaw/mcp": "1.0.0-rc.120",
93
+ "@lincyaw/kernel": "1.0.0-rc.120",
94
+ "@lincyaw/cli": "1.0.0-rc.120",
95
+ "@lincyaw/skills": "1.0.0-rc.120"
96
96
  },
97
97
  "peerDependencies": {
98
98
  "@deepseek-ai/dsh": "0.2.1-alpha.4"
@@ -108,8 +108,8 @@
108
108
  "react": "18.3.1",
109
109
  "react-dom": "18.3.1",
110
110
  "react-resizable-panels": "^4.14.5",
111
- "@lincyaw/design": "1.0.0-rc.118",
112
- "@lincyaw/workbench": "0.2.0-rc.119"
111
+ "@lincyaw/design": "1.0.0-rc.120",
112
+ "@lincyaw/workbench": "0.2.0-rc.121"
113
113
  },
114
114
  "scripts": {}
115
115
  }
@@ -8,7 +8,7 @@ export const inject = ['presmium', 'systemPrompt']
8
8
 
9
9
  /** What every carrier's agent is told of Presmium: what is where, what it answers for, and what tells it what. */
10
10
  export const GUIDE = [
11
- `This is a Presmium workspace. ${DOCUMENT_ENTRY} is the sole editable teaching document. Runtime snapshots and web/slides/notebook outputs are derived. Keep stable IDs; no Markdown mirror. Referenced code, data and media are separate project files. dist/ and .presmium/ contain generated outputs and state.`,
11
+ `This is a Presmium workspace. ${DOCUMENT_ENTRY} in each document folder is the sole editable document (JSON); documents nest through their placement. Runtime snapshots and web/slides/notebook outputs are derived. Keep stable IDs; no Markdown mirror. Referenced code, data and media are separate project files. dist/ and .presmium/ contain generated outputs and state.`,
12
12
  'Paths for file and shell tools are relative to your candidate workspace root. presmium.workspace.yaml lists documents and settings. Follow the workspace instructions. The <presmium-document> context identifies the selected document, sections, author focus and observed diagnostics; its paths are workspace-relative.',
13
13
  'The Presmium tool catalog is compact. presmium__get_context reads the current page/step. presmium__rename_page and presmium__edit_narration perform common edits in one call. Use presmium__operations to find other operations by query or inspect a named operation; generated summaries list variants. Select variant to read only that action’s arguments, with schema:true for its full definition. Other operation names are not direct tool names.',
14
14
  'Call discovered operations through presmium__read_operation, presmium__edit_operation, presmium__spend_operation, presmium__write_operation or presmium__agent_operation according to kind. Pass {operation: name, arguments: businessArguments}. Unavailable kinds are not offered. Routing, approval and review use the actual operation, not its dispatcher. Parameter validation is unchanged.',
@@ -7,11 +7,12 @@ export const inject = ['presmium', 'connection']
7
7
  export const ROUTES: Record<string, string> = Object.fromEntries([
8
8
  ['mcp-settings', `${WORKSPACE_ROUTES}mcp-settings`],
9
9
  ['speech-settings', `${WORKSPACE_ROUTES}speech-settings`],
10
- ...['project/capabilities', 'project/plan', 'project/apply', 'documents', 'documents/import', 'document', 'document/capabilities', 'document/outline', 'document/part', 'document/page/plan', 'document/page/apply', 'document/action/plan', 'document/action/impact', 'document/action/apply', 'document/asset', 'document/events', 'document/change', 'document/image', 'document/audio', 'document/recording/adopt', 'document/media-clip', 'files', 'source', 'source/create', 'source/transaction', 'changes', 'changes/commit', 'changes/discard', 'revisions', 'revisions/revert', 'history/list', 'history/file', 'history/undo', 'history/redo',
10
+ ...['project/capabilities', 'project/plan', 'project/apply', 'documents', 'documents/import', 'workspace/migrate', 'document', 'document/capabilities', 'document/outline', 'document/part', 'document/page/plan', 'document/page/apply', 'document/action/plan', 'document/action/impact', 'document/action/apply', 'document/asset', 'document/events', 'document/change', 'document/image', 'document/audio', 'document/recording/adopt', 'document/media-clip', 'files', 'source', 'source/create', 'source/transaction', 'changes', 'changes/commit', 'changes/discard', 'revisions', 'revisions/revert', 'history/list', 'history/file', 'history/undo', 'history/redo',
11
11
  'document/media-clip/validate', 'document/transcription/capabilities', 'document/transcription', 'document/transcription/result', 'document/transcription/cancel',
12
12
  'document/transcription/adoption/plan', 'document/transcription/adoption/apply',
13
13
  'ir', 'ir/events', 'preview', 'build', 'check', 'jobs', 'jobs/cancel', 'jobs/events', 'voice-catalog', 'voice-capabilities',
14
- 'review', 'review/workspace', 'review/open', 'review/step', 'review/accept', 'review/reject', 'review/restore'].map(path => [path, `${WORKSPACE_ROUTES}${path}`]),
14
+ 'review', 'review/workspace', 'review/open', 'review/step', 'review/accept', 'review/reject', 'review/restore',
15
+ 'tree', 'tree/operation', 'document/links', 'documents/search', 'document/preview', 'embed/source'].map(path => [path, `${WORKSPACE_ROUTES}${path}`]),
15
16
  ['focus', `${SERVER_ROUTES}focus`],
16
17
  ['control', `${SERVER_ROUTES}control`],
17
18
  ['diagnostics', `${SERVER_ROUTES}diagnostics`],
@@ -50,7 +51,7 @@ export function apply(ctx: DshContext): void {
50
51
  ...request.method === 'POST' ? { raw: await request.arrayBuffer() } : {},
51
52
  signal: request.signal,
52
53
  })
53
- if ((path === 'documents' || path === 'documents/import' || path === 'project/apply') && request.method === 'POST' && upstream.ok) ctx.presmium.server.invalidateDocuments()
54
+ if ((path === 'documents' || path === 'documents/import' || path === 'project/apply' || path === 'tree/operation') && request.method === 'POST' && upstream.ok) ctx.presmium.server.invalidateDocuments()
54
55
  const answered = new Headers()
55
56
  for (const name of RETURNED) {
56
57
  const value = upstream.headers.get(name)
@@ -28,6 +28,8 @@ const ROUTES = {
28
28
  ir: { path: `${WORKSPACE_ROUTES}ir/events`, event: 'revision' },
29
29
  jobs: { path: `${WORKSPACE_ROUTES}jobs/events`, event: 'job' },
30
30
  'agent-activity': { path: `${WORKSPACE_ROUTES}agent-activity/events`, event: 'agent-activity' },
31
+ /** `{ type: 'tree' }` whenever the document tree or the trash changes; the client reads `tree` again. */
32
+ tree: { path: `${WORKSPACE_ROUTES}tree/events`, event: 'tree' },
31
33
  } as const
32
34
  const MAX_SUBSCRIPTIONS = 16
33
35
  const MAX_BUFFERED_BYTES = 2 << 20
@@ -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', 'agent-activity'] as const
5
+ export const WORKSPACE_EVENT_TOPICS = ['document', 'diagnostics', 'review', 'ir', 'jobs', 'agent-activity', 'tree'] 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']) })