@jetecho/dsh-csv-and-image-preview 0.1.0 → 0.1.2

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.
@@ -1,32 +1,54 @@
1
- /**
2
- * Public type surface for the dsh-csv-and-image-preview host half.
3
- * The runtime is plain JS; these declarations describe the cordis plugin
4
- * contract so TS consumers and the `.d.ts` re-export resolve cleanly.
5
- */
6
-
7
- /** The `preview_image` tool definition (a dsh ToolDefinition object). */
8
- export interface PreviewToolDefinition {
9
- name: 'preview_image'
10
- description: string
11
- parameters: Record<string, unknown>
12
- output: Record<string, unknown>
13
- execute(args: unknown): Promise<string>
14
- presentCall(args: unknown): { card: string; title: string; kind: string } | undefined
15
- presentResult(args: unknown): { card: string; title: string } | undefined
16
- }
17
-
18
- /** Cordis plugin exported by the host half (lib/index.js). */
19
- export interface ImagePreviewPlugin {
20
- readonly name: 'csv-and-image-preview'
21
- apply(ctx: unknown): void
22
- }
23
-
24
- /** A keyed display image payload carried on tool result meta. */
25
- export interface PreviewMeta {
26
- src: string
27
- mime: string
28
- label: string
29
- }
30
-
31
- declare const plugin: ImagePreviewPlugin
32
- export default plugin
1
+ /**
2
+ * Public type surface for the dsh-csv-and-image-preview host half.
3
+ * The runtime is plain JS; these declarations describe the cordis plugin
4
+ * contract so TS consumers and the `.d.ts` re-export resolve cleanly.
5
+ */
6
+
7
+ /** The `preview_image` tool definition (a dsh ToolDefinition object). */
8
+ export interface PreviewToolDefinition {
9
+ name: 'preview_image'
10
+ description: string
11
+ parameters: Record<string, unknown>
12
+ output: Record<string, unknown>
13
+ execute(args: unknown): Promise<string>
14
+ presentCall(args: unknown): { card: string; title: string; kind: string } | undefined
15
+ presentResult(args: unknown): { card: string; title: string } | undefined
16
+ }
17
+
18
+ /** The `preview_csv` tool definition (a dsh ToolDefinition object). */
19
+ export interface CsvToolDefinition {
20
+ name: 'preview_csv'
21
+ description: string
22
+ parameters: Record<string, unknown>
23
+ output: Record<string, unknown>
24
+ execute(args: unknown): Promise<string>
25
+ presentCall(args: unknown): { card: string; title: string; kind: string } | undefined
26
+ presentResult(args: unknown): { card: string; title: string } | undefined
27
+ }
28
+
29
+ /** Cordis plugin exported by the host half (lib/index.js). */
30
+ export interface ImagePreviewPlugin {
31
+ readonly name: 'csv-and-image-preview'
32
+ apply(ctx: unknown): void
33
+ }
34
+
35
+ /** A keyed display image payload carried on tool result meta. */
36
+ export interface PreviewMeta {
37
+ src: string
38
+ mime: string
39
+ label: string
40
+ }
41
+
42
+ /** A keyed bounded table payload carried on tool result meta (rows[0] = header). */
43
+ export interface CsvPreviewMeta {
44
+ label: string
45
+ delimiter: string
46
+ rows: string[][]
47
+ totalRows: number
48
+ totalCols: number
49
+ rowsShown: number
50
+ colsShown: number
51
+ }
52
+
53
+ declare const plugin: ImagePreviewPlugin
54
+ export default plugin
package/package.json CHANGED
@@ -1,65 +1,67 @@
1
- {
2
- "name": "@jetecho/dsh-csv-and-image-preview",
3
- "version": "0.1.0",
4
- "description": "Preview images / SVG (and prepare CSV) in the DeepSeek Harness chat, rendered as real browser <img> elements. Preview-first workflow: show the user the asset, wait for approval, then apply the real change.",
5
- "type": "module",
6
- "main": "lib/index.js",
7
- "types": "lib/types/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./lib/types/index.d.ts",
11
- "default": "./lib/index.js"
12
- },
13
- "./client": {
14
- "default": "./lib/client.js"
15
- },
16
- "./package.json": "./package.json"
17
- },
18
- "files": [
19
- "lib",
20
- "cordis.patch.yml",
21
- "README.md",
22
- "README.en.md",
23
- "Agent.md",
24
- "LICENSE"
25
- ],
26
- "scripts": {
27
- "build": "node scripts/build.mjs",
28
- "prepack": "node scripts/prepack.mjs"
29
- },
30
- "dsh": {
31
- "bundle": {
32
- "patch": "./cordis.patch.yml"
33
- },
34
- "client": {
35
- "inject": [],
36
- "platform": "web"
37
- }
38
- },
39
- "keywords": [
40
- "dsh",
41
- "deepseek-harness",
42
- "dsh-plugin",
43
- "image",
44
- "svg",
45
- "preview",
46
- "visual"
47
- ],
48
- "license": "MIT",
49
- "author": "jetecho",
50
- "publishConfig": {
51
- "access": "public"
52
- },
53
- "repository": {
54
- "type": "git",
55
- "url": "git+https://github.com/jetecho/dsh-csv-and-image-preview.git"
56
- },
57
- "homepage": "https://github.com/jetecho/dsh-csv-and-image-preview#readme",
58
- "peerDependencies": {
59
- "@deepseek-ai/cordis": "^4.0.1",
60
- "react": "^18.0.0 || ^19.0.0"
61
- },
62
- "dependencies": {
63
- "react": "^18.3.1"
64
- }
65
- }
1
+ {
2
+ "name": "@jetecho/dsh-csv-and-image-preview",
3
+ "version": "0.1.2",
4
+ "description": "Preview images / SVG and CSV tables in the DeepSeek Harness chat, rendered as real browser <img> / <table> elements. Preview-first workflow: show the user the asset, wait for approval, then apply the real change.",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/types/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ },
13
+ "./client": {
14
+ "default": "./lib/client.js"
15
+ },
16
+ "./package.json": "./package.json"
17
+ },
18
+ "files": [
19
+ "lib",
20
+ "cordis.patch.yml",
21
+ "README.md",
22
+ "README.en.md",
23
+ "Agent.md",
24
+ "LICENSE"
25
+ ],
26
+ "scripts": {
27
+ "build": "node scripts/build.mjs",
28
+ "prepack": "node scripts/prepack.mjs"
29
+ },
30
+ "dsh": {
31
+ "bundle": {
32
+ "patch": "./cordis.patch.yml"
33
+ },
34
+ "client": {
35
+ "inject": [],
36
+ "platform": "web"
37
+ }
38
+ },
39
+ "keywords": [
40
+ "dsh",
41
+ "deepseek-harness",
42
+ "dsh-plugin",
43
+ "image",
44
+ "svg",
45
+ "csv",
46
+ "table",
47
+ "preview",
48
+ "visual"
49
+ ],
50
+ "license": "MIT",
51
+ "author": "jetecho",
52
+ "publishConfig": {
53
+ "access": "public"
54
+ },
55
+ "repository": {
56
+ "type": "git",
57
+ "url": "git+https://github.com/jetecho/dsh-csv-and-image-preview.git"
58
+ },
59
+ "homepage": "https://github.com/jetecho/dsh-csv-and-image-preview#readme",
60
+ "peerDependencies": {
61
+ "@deepseek-ai/cordis": "^4.0.1",
62
+ "react": "^18.0.0 || ^19.0.0"
63
+ },
64
+ "dependencies": {
65
+ "react": "^18.3.1"
66
+ }
67
+ }