dsh-brief-sidebar 0.3.0 → 0.4.0

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/package.json CHANGED
@@ -1,94 +1,106 @@
1
- {
2
- "name": "dsh-brief-sidebar",
3
- "version": "0.3.0",
4
- "description": "DSH web plugin (dsh-better-sidebar consumer): render the session brief — the todo list (the `todos` projection board) plus the artifact list (a live produced-files feed, codeplan artifacts marked) — as a summary tab in the right sidebar, and shadow the official composer-band todo panel so the board is the single visible carrier. Read-only.",
5
- "type": "module",
6
- "main": "lib/index.mjs",
7
- "types": "lib/types/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./lib/types/index.d.ts",
11
- "default": "./lib/index.mjs"
12
- },
13
- "./client": {
14
- "types": "./lib/types/client/index.d.ts",
15
- "default": "./lib/client.js"
16
- },
17
- "./cordis.patch.yml": "./cordis.patch.yml",
18
- "./package.json": "./package.json"
19
- },
20
- "files": [
21
- "lib",
22
- "src",
23
- "cordis.patch.yml",
24
- "dsh.plugin.json",
25
- "README.md"
26
- ],
27
- "dsh": {
28
- "bundle": {
29
- "patch": "./cordis.patch.yml"
30
- },
31
- "client": {
32
- "platform": "web",
33
- "inject": [
34
- "@deepseek-ai/dsh-client-locale"
35
- ]
36
- }
37
- },
38
- "keywords": [
39
- "dsh",
40
- "deepseek-harness",
41
- "plugin",
42
- "better-sidebar",
43
- "brief",
44
- "todo",
45
- "artifact-list",
46
- "task-board",
47
- "summary",
48
- "deliverables"
49
- ],
50
- "license": "MIT",
51
- "publishConfig": {
52
- "registry": "https://registry.npmjs.org",
53
- "access": "public"
54
- },
55
- "engines": {
56
- "node": ">=20",
57
- "dsh": ">=0.1.5-rc.1 <0.2.0-0"
58
- },
59
- "peerDependencies": {
60
- "@deepseek-ai/cordis": "^4.0.2",
61
- "dsh-better-sidebar": ">=0.18.1",
62
- "react": "^18.2.0"
63
- },
64
- "peerDependenciesMeta": {
65
- "dsh-better-sidebar": {
66
- "optional": true
67
- },
68
- "react": {
69
- "optional": true
70
- }
71
- },
72
- "scripts": {
73
- "build": "node -e \"require('node:fs').rmSync('lib',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && tsdown --config-loader tsx",
74
- "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.client.json",
75
- "test": "vitest run",
76
- "clean": "node -e \"require('node:fs').rmSync('lib',{recursive:true,force:true})\"",
77
- "prepublishOnly": "npm run build"
78
- },
79
- "devDependencies": {
80
- "@deepseek-ai/cordis": "^4.0.2",
81
- "@types/node": "^22.0.0",
82
- "@types/react": "~18.3.1",
83
- "@types/react-dom": "~18.3.7",
84
- "dsh-better-sidebar": "^0.19.1",
85
- "jsdom": "^26.0.0",
86
- "react": "^18.2.0",
87
- "react-dom": "^18.2.0",
88
- "tsdown": "^0.22.2",
89
- "tsx": "^4.23.12",
90
- "typescript": "^5.6.0",
91
- "vitest": "^3.0.0",
92
- "zod": "^4.4.3"
93
- }
94
- }
1
+ {
2
+ "name": "dsh-brief-sidebar",
3
+ "version": "0.4.0",
4
+ "description": "DSH web plugin (dsh-better-sidebar consumer): render the session brief — the todo list (the `todos` projection board) plus the artifact list (a live produced-files feed, codeplan artifacts marked) — as a summary tab in the right sidebar, and shadow the official composer-band todo panel so the board is the single visible carrier. Read-only.",
5
+ "type": "module",
6
+ "main": "lib/index.mjs",
7
+ "types": "lib/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/types/index.d.ts",
11
+ "default": "./lib/index.mjs"
12
+ },
13
+ "./client": {
14
+ "types": "./lib/types/client/index.d.ts",
15
+ "default": "./lib/client.js"
16
+ },
17
+ "./cordis.patch.yml": "./cordis.patch.yml",
18
+ "./package.json": "./package.json"
19
+ },
20
+ "files": [
21
+ "lib",
22
+ "src",
23
+ "assets",
24
+ "screenshots.json",
25
+ "cordis.patch.yml",
26
+ "dsh.plugin.json",
27
+ "README.md"
28
+ ],
29
+ "dsh": {
30
+ "bundle": {
31
+ "patch": "./cordis.patch.yml"
32
+ },
33
+ "client": {
34
+ "platform": "web",
35
+ "inject": [
36
+ "@deepseek-ai/dsh-client-locale"
37
+ ]
38
+ }
39
+ },
40
+ "keywords": [
41
+ "dsh",
42
+ "deepseek-harness",
43
+ "plugin",
44
+ "better-sidebar",
45
+ "brief",
46
+ "todo",
47
+ "artifact-list",
48
+ "task-board",
49
+ "summary",
50
+ "deliverables"
51
+ ],
52
+ "license": "MIT",
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://github.com/drscrewdriver/dsh-brief-sidebar.git"
56
+ },
57
+ "publishConfig": {
58
+ "registry": "https://registry.npmjs.org",
59
+ "access": "public",
60
+ "tag": "dsh-0.1.5"
61
+ },
62
+ "engines": {
63
+ "node": ">=20",
64
+ "dsh": ">=0.2.0-rc.1 <0.2.1-0"
65
+ },
66
+ "peerDependencies": {
67
+ "@deepseek-ai/cordis": "^4.0.2",
68
+ "@deepseek-ai/dsh-client-locale": ">=0.2.0-rc.1 <0.2.1-0",
69
+ "dsh-better-sidebar": ">=0.18.1",
70
+ "react": "^18.2.0"
71
+ },
72
+ "peerDependenciesMeta": {
73
+ "@deepseek-ai/dsh-client-locale": {
74
+ "optional": true
75
+ },
76
+ "dsh-better-sidebar": {
77
+ "optional": true
78
+ },
79
+ "react": {
80
+ "optional": true
81
+ }
82
+ },
83
+ "scripts": {
84
+ "build": "node -e \"require('node:fs').rmSync('lib',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && tsdown --config-loader tsx",
85
+ "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.client.json",
86
+ "test": "vitest run",
87
+ "clean": "node -e \"require('node:fs').rmSync('lib',{recursive:true,force:true})\"",
88
+ "prepublishOnly": "npm run build",
89
+ "release:015": "npm publish --tag dsh-0.1.5"
90
+ },
91
+ "devDependencies": {
92
+ "@deepseek-ai/cordis": "^4.0.2",
93
+ "@types/node": "^22.0.0",
94
+ "@types/react": "~18.3.1",
95
+ "@types/react-dom": "~18.3.7",
96
+ "dsh-better-sidebar": "^0.19.1",
97
+ "jsdom": "^26.0.0",
98
+ "react": "^18.2.0",
99
+ "react-dom": "^18.2.0",
100
+ "tsdown": "^0.22.2",
101
+ "tsx": "^4.23.12",
102
+ "typescript": "^5.6.0",
103
+ "vitest": "^3.0.0",
104
+ "zod": "^4.4.3"
105
+ }
106
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "screenshots": [
3
+ "assets/brief.png"
4
+ ]
5
+ }
@@ -1,56 +1,56 @@
1
- /**
2
- * Tab glyph for the task board.
3
- *
4
- * Skin contract: plugin-drawn glyphs take their colour from the `--dsw-alias-*`
5
- * tokens — no colour literals anywhere in this file.
6
- */
7
- import type { ReactNode } from 'react'
8
-
9
- /**
10
- * A checklist mark: three rows with ticks and text rails — the same status
11
- * vocabulary the board paints.
12
- * @param size - square edge in px (the host passes its own tab-icon size).
13
- */
14
- export function BriefIcon(size: number): ReactNode {
15
- return (
16
- <svg
17
- width={size}
18
- height={size}
19
- viewBox="0 0 16 16"
20
- fill="none"
21
- aria-hidden="true"
22
- focusable="false"
23
- style={{ display: 'block', flex: 'none' }}
24
- >
25
- <rect
26
- x={1.6}
27
- y={2.4}
28
- width={12.8}
29
- height={11.2}
30
- rx={2}
31
- stroke="var(--dsw-alias-label-tertiary)"
32
- strokeWidth={1.2}
33
- />
34
- <path
35
- d="M4.2 6.1l1 1 1.8-2"
36
- stroke="var(--dsw-alias-state-success-primary)"
37
- strokeWidth={1.3}
38
- strokeLinecap="round"
39
- strokeLinejoin="round"
40
- />
41
- <path
42
- d="M4.2 10.6l1 1 1.8-2"
43
- stroke="var(--dsw-alias-label-tertiary)"
44
- strokeWidth={1.3}
45
- strokeLinecap="round"
46
- strokeLinejoin="round"
47
- />
48
- <path
49
- d="M8.4 6.4h4M8.4 10.9h4"
50
- stroke="var(--dsw-alias-label-tertiary)"
51
- strokeWidth={1.2}
52
- strokeLinecap="round"
53
- />
54
- </svg>
55
- )
56
- }
1
+ /**
2
+ * Tab glyph for the task board.
3
+ *
4
+ * Skin contract: plugin-drawn glyphs take their colour from the `--dsw-alias-*`
5
+ * tokens — no colour literals anywhere in this file.
6
+ */
7
+ import type { ReactNode } from 'react'
8
+
9
+ /**
10
+ * A checklist mark: three rows with ticks and text rails — the same status
11
+ * vocabulary the board paints.
12
+ * @param size - square edge in px (the host passes its own tab-icon size).
13
+ */
14
+ export function BriefIcon(size: number): ReactNode {
15
+ return (
16
+ <svg
17
+ width={size}
18
+ height={size}
19
+ viewBox="0 0 16 16"
20
+ fill="none"
21
+ aria-hidden="true"
22
+ focusable="false"
23
+ style={{ display: 'block', flex: 'none' }}
24
+ >
25
+ <rect
26
+ x={1.6}
27
+ y={2.4}
28
+ width={12.8}
29
+ height={11.2}
30
+ rx={2}
31
+ stroke="var(--dsw-alias-label-tertiary)"
32
+ strokeWidth={1.2}
33
+ />
34
+ <path
35
+ d="M4.2 6.1l1 1 1.8-2"
36
+ stroke="var(--dsw-alias-state-success-primary)"
37
+ strokeWidth={1.3}
38
+ strokeLinecap="round"
39
+ strokeLinejoin="round"
40
+ />
41
+ <path
42
+ d="M4.2 10.6l1 1 1.8-2"
43
+ stroke="var(--dsw-alias-label-tertiary)"
44
+ strokeWidth={1.3}
45
+ strokeLinecap="round"
46
+ strokeLinejoin="round"
47
+ />
48
+ <path
49
+ d="M8.4 6.4h4M8.4 10.9h4"
50
+ stroke="var(--dsw-alias-label-tertiary)"
51
+ strokeWidth={1.2}
52
+ strokeLinecap="round"
53
+ />
54
+ </svg>
55
+ )
56
+ }
@@ -1,73 +1,73 @@
1
- /**
2
- * The summary tab body: the session's at-a-glance state, composed of sections.
3
- *
4
- * Section order: 进展 (the todos board) → 产物 (produced files, codeplan
5
- * artifacts marked inline) → the reserved memory-recall slot (see below).
6
- * Each section owns its own data chain and its own three-state contract; this
7
- * component owns only the shell.
8
- *
9
- * Two better-sidebar contracts are honoured:
10
- *
11
- * 1. **Height contract.** The tab body mounts inside a full-height column flex
12
- * host whose `.paneBody` is a definite-height BLOCK scroll container. The
13
- * root declares `height: 100%` + `min-height: 0`, and the scrolling element
14
- * is an inner div — not the root. Sections are non-scrolling slices with a
15
- * bottom border; the inner div scrolls them all.
16
- * 2. **`visible` pause.** Nothing is drawn while the tab is not the active
17
- * one, so a hidden tab does not re-render on every projection frame.
18
- */
19
- import { createElement } from 'react'
20
- import type { CSSProperties, ReactNode } from 'react'
21
- import type { Context } from '@deepseek-ai/cordis'
22
- import { TodoSection } from './TodoBoardTab'
23
- import type { TodoScope } from './TodoBoardTab'
24
- import { DeliverablesSection } from './summary/DeliverablesSection'
25
-
26
- export interface SummaryTabProps {
27
- /** The DSH locale lookup, passed down from `apply`. */
28
- t: (key: string) => string
29
- /** The client root context (the tab body's only way to reach services). */
30
- ctx?: Context
31
- /** The session this tab is scoped to. */
32
- scope?: TodoScope
33
- /** Whether the tab is the active one AND the panel is open. */
34
- visible?: boolean
35
- }
36
-
37
- const ROOT_STYLE: CSSProperties = {
38
- display: 'flex',
39
- flexDirection: 'column',
40
- height: '100%',
41
- minHeight: 0,
42
- background: 'var(--dsw-alias-bg-layer-1)',
43
- color: 'var(--dsw-alias-label-primary)',
44
- font: 'inherit',
45
- fontSize: 13,
46
- }
47
-
48
- const SCROLL_STYLE: CSSProperties = { flex: 1, minHeight: 0, overflow: 'auto' }
49
-
50
- /**
51
- * The summary tab.
52
- * @param props - translation, client context, session scope, visibility.
53
- */
54
- export function SummaryTab(props: SummaryTabProps): ReactNode {
55
- const { t, ctx, scope, visible = true } = props
56
-
57
- // A hidden tab renders NOTHING — not even the shell — so it never
58
- // re-renders on a projection frame while it is off screen.
59
- if (!visible) return null
60
-
61
- return createElement(
62
- 'div',
63
- { style: ROOT_STYLE, 'data-dsh-brief-sidebar': 'board' },
64
- createElement('div', { style: SCROLL_STYLE },
65
- createElement(TodoSection, { key: 'progress', t, ctx, scope }),
66
- createElement(DeliverablesSection, { key: 'deliverables', t, ctx, scope }),
67
- // 记忆召回插槽(远期,固定最底):概要从两区扩为三区时,记忆召回分区
68
- // 排在这里。系统中没有默认记忆,数据链等记忆类插件注册自己的投影 key
69
- // 后经同一个 `faceOf` 通道接入(`useProjectionValue`),本期不渲染。
70
- null,
71
- ),
72
- )
73
- }
1
+ /**
2
+ * The summary tab body: the session's at-a-glance state, composed of sections.
3
+ *
4
+ * Section order: 进展 (the todos board) → 产物 (produced files, codeplan
5
+ * artifacts marked inline) → the reserved memory-recall slot (see below).
6
+ * Each section owns its own data chain and its own three-state contract; this
7
+ * component owns only the shell.
8
+ *
9
+ * Two better-sidebar contracts are honoured:
10
+ *
11
+ * 1. **Height contract.** The tab body mounts inside a full-height column flex
12
+ * host whose `.paneBody` is a definite-height BLOCK scroll container. The
13
+ * root declares `height: 100%` + `min-height: 0`, and the scrolling element
14
+ * is an inner div — not the root. Sections are non-scrolling slices with a
15
+ * bottom border; the inner div scrolls them all.
16
+ * 2. **`visible` pause.** Nothing is drawn while the tab is not the active
17
+ * one, so a hidden tab does not re-render on every projection frame.
18
+ */
19
+ import { createElement } from 'react'
20
+ import type { CSSProperties, ReactNode } from 'react'
21
+ import type { Context } from '@deepseek-ai/cordis'
22
+ import { TodoSection } from './TodoBoardTab'
23
+ import type { TodoScope } from './TodoBoardTab'
24
+ import { DeliverablesSection } from './summary/DeliverablesSection'
25
+
26
+ export interface SummaryTabProps {
27
+ /** The DSH locale lookup, passed down from `apply`. */
28
+ t: (key: string) => string
29
+ /** The client root context (the tab body's only way to reach services). */
30
+ ctx?: Context
31
+ /** The session this tab is scoped to. */
32
+ scope?: TodoScope
33
+ /** Whether the tab is the active one AND the panel is open. */
34
+ visible?: boolean
35
+ }
36
+
37
+ const ROOT_STYLE: CSSProperties = {
38
+ display: 'flex',
39
+ flexDirection: 'column',
40
+ height: '100%',
41
+ minHeight: 0,
42
+ background: 'var(--dsw-alias-bg-layer-1)',
43
+ color: 'var(--dsw-alias-label-primary)',
44
+ font: 'inherit',
45
+ fontSize: 13,
46
+ }
47
+
48
+ const SCROLL_STYLE: CSSProperties = { flex: 1, minHeight: 0, overflow: 'auto' }
49
+
50
+ /**
51
+ * The summary tab.
52
+ * @param props - translation, client context, session scope, visibility.
53
+ */
54
+ export function SummaryTab(props: SummaryTabProps): ReactNode {
55
+ const { t, ctx, scope, visible = true } = props
56
+
57
+ // A hidden tab renders NOTHING — not even the shell — so it never
58
+ // re-renders on a projection frame while it is off screen.
59
+ if (!visible) return null
60
+
61
+ return createElement(
62
+ 'div',
63
+ { style: ROOT_STYLE, 'data-dsh-brief-sidebar': 'board' },
64
+ createElement('div', { style: SCROLL_STYLE },
65
+ createElement(TodoSection, { key: 'progress', t, ctx, scope }),
66
+ createElement(DeliverablesSection, { key: 'deliverables', t, ctx, scope }),
67
+ // 记忆召回插槽(远期,固定最底):概要从两区扩为三区时,记忆召回分区
68
+ // 排在这里。系统中没有默认记忆,数据链等记忆类插件注册自己的投影 key
69
+ // 后经同一个 `faceOf` 通道接入(`useProjectionValue`),本期不渲染。
70
+ null,
71
+ ),
72
+ )
73
+ }