@huanlin/dsh-plugin-aigc-canvas 0.1.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.
@@ -0,0 +1,22 @@
1
+ //#region src/invariant.ts
2
+ const PACKAGE_NAME = "@huanlin/dsh-plugin-aigc-canvas";
3
+ /** Cordis companion plugin name. */
4
+ const name = "dsh-aigc-canvas-invariant";
5
+ /** Service required before the companion can reserve package ownership. */
6
+ const inject = ["invariants"];
7
+ /**
8
+ * No runtime invariant: the canvas owns no service state or event protocol
9
+ * of its own beyond the registry's own assertions (uuid existence, kind
10
+ * checks) — every route is mounted under the host's webServer fence, the
11
+ * element table is exercised by the smoke spec, and the client view is a
12
+ * pure projection of the host state.
13
+ */
14
+ const install = () => {};
15
+ /**
16
+ * Register this package's invariant companion.
17
+ * @param ctx - Cordis context carrying the invariant service.
18
+ * @returns the installed registration's disposer after setup succeeds.
19
+ */
20
+ const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
21
+ //#endregion
22
+ export { apply, inject, name };
package/package.json ADDED
@@ -0,0 +1,124 @@
1
+ {
2
+ "name": "@huanlin/dsh-plugin-aigc-canvas",
3
+ "version": "0.1.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "keywords": ["dsh-plugin"],
8
+ "description": "DSH plugin: provider-agnostic AIGC HTTP bridge + free canvas + ffmpeg post-processing. Exposes aigc_get_provider_info / aigc_http_request (endpoint + apiKey auto-attached) / aigc_provider_set_instructions / aigc_provider_get_instructions / aigc_canvas_place / aigc_canvas_link / aigc_canvas_unlink / aigc_canvas_list_elements / aigc_media_edit tools; generated files are placed at arbitrary canvas positions and can be double-clicked for prompt + params.",
9
+ "type": "module",
10
+ "license": "AGPL-3.0",
11
+ "main": "./lib/index.js",
12
+ "types": "./lib/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./lib/index.d.ts",
16
+ "import": "./lib/index.js"
17
+ },
18
+ "./invariant": {
19
+ "types": "./lib/invariant.d.ts",
20
+ "import": "./lib/invariant.js"
21
+ },
22
+ "./client": {
23
+ "types": "./lib/client.d.ts",
24
+ "default": "./lib/client.js"
25
+ },
26
+ "./client/service": {
27
+ "types": "./lib/types/client/service.d.ts",
28
+ "default": "./lib/client.js"
29
+ },
30
+ "./package.json": "./package.json"
31
+ },
32
+ "engines": {
33
+ "node": ">=20"
34
+ },
35
+ "files": [
36
+ "lib/",
37
+ "assets/",
38
+ "cordis.patch.yml"
39
+ ],
40
+ "dsh": {
41
+ "bundle": {
42
+ "patch": "./cordis.patch.yml"
43
+ },
44
+ "client": {
45
+ "inject": [
46
+ "@deepseek-ai/dsh-client-runtime",
47
+ "@deepseek-ai/dsh-client-locale",
48
+ "@deepseek-ai/dsh-client-ui-conversation",
49
+ "@deepseek-ai/dsh-client-ui-slots",
50
+ "@deepseek-ai/dsh-client-ui-settings",
51
+ "@deepseek-ai/dsh-client-ui-primitives"
52
+ ],
53
+ "platform": "web"
54
+ }
55
+ },
56
+ "scripts": {
57
+ "typecheck": "tsc -p tsconfig.json --noEmit",
58
+ "test": "vitest run",
59
+ "test:watch": "vitest",
60
+ "build": "tsdown --config tsdown.config.ts && tsc -p tsconfig.build.json",
61
+ "bundle:client": "tsdown --config tsdown.config.ts",
62
+ "watch": "tsdown --config tsdown.config.ts --watch",
63
+ "prepare": "tsdown --config tsdown.prepare.config.ts"
64
+ },
65
+ "dependencies": {
66
+ "schemastery": "^3.18.0",
67
+ "ws": "^8.18.0"
68
+ },
69
+ "peerDependencies": {
70
+ "@deepseek-ai/dsh-client-locale": "^0.0.1-rc.1",
71
+ "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.1",
72
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.0.1-rc.1",
73
+ "@deepseek-ai/dsh-client-ui-settings": "^0.0.1-rc.1",
74
+ "@deepseek-ai/dsh-client-ui-conversation": "^0.0.1-rc.1",
75
+ "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.1",
76
+ "@deepseek-ai/dsh-host-webserver": "^0.0.1-rc.1",
77
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
78
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.1",
79
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.1",
80
+ "cordis": "^4.0.0-rc.7",
81
+ "dsh-better-sidebar": "^0.4.0",
82
+ "react": "^18.2.0",
83
+ "react-dom": "^18.2.0"
84
+ },
85
+ "peerDependenciesMeta": {
86
+ "@deepseek-ai/dsh-client-locale": { "optional": true },
87
+ "@deepseek-ai/dsh-client-runtime": { "optional": true },
88
+ "@deepseek-ai/dsh-client-ui-primitives": { "optional": true },
89
+ "@deepseek-ai/dsh-client-ui-settings": { "optional": true },
90
+ "@deepseek-ai/dsh-client-ui-conversation": { "optional": true },
91
+ "@deepseek-ai/dsh-client-ui-slots": { "optional": true },
92
+ "@deepseek-ai/dsh-host-webserver": { "optional": true },
93
+ "@deepseek-ai/dsh-invariants": { "optional": true },
94
+ "@deepseek-ai/dsh-session": { "optional": true },
95
+ "@deepseek-ai/dsh-tools": { "optional": true },
96
+ "cordis": { "optional": true },
97
+ "dsh-better-sidebar": { "optional": true },
98
+ "react": { "optional": true },
99
+ "react-dom": { "optional": true }
100
+ },
101
+ "devDependencies": {
102
+ "@deepseek-ai/dsh-client-locale": "^0.0.1-rc.1",
103
+ "@deepseek-ai/dsh-client-runtime": "^0.0.1-rc.1",
104
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.0.1-rc.1",
105
+ "@deepseek-ai/dsh-client-ui-settings": "^0.0.1-rc.1",
106
+ "@deepseek-ai/dsh-client-ui-conversation": "^0.0.1-rc.1",
107
+ "@deepseek-ai/dsh-client-ui-slots": "^0.0.1-rc.1",
108
+ "@deepseek-ai/dsh-host-webserver": "^0.0.1-rc.1",
109
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
110
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.1",
111
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.1",
112
+ "@types/node": "^24.0.0",
113
+ "@types/react": "~18.3.1",
114
+ "@types/react-dom": "~18.3.1",
115
+ "@types/ws": "^8.5.10",
116
+ "cordis": "^4.0.0-rc.7",
117
+ "dsh-better-sidebar": "link:D:/Projects/deepseek-harness/DSH-better-sidebar",
118
+ "react": "^18.2.0",
119
+ "react-dom": "18.2.0",
120
+ "tsdown": "^0.22.2",
121
+ "typescript": "^5.9.0",
122
+ "vitest": "^3.2.0"
123
+ }
124
+ }