dsh-artifact-studio 0.3.2 → 0.7.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.
package/README.md CHANGED
@@ -1,15 +1,17 @@
1
1
  # Artifacts for DeepSeek Harness
2
2
 
3
- The agent creates pages and documents as versioned files, and you open them beside the chat. It works offline with no account and no hosted service.
3
+ The agent creates pages, documents, and OpenPencil designs as versioned files, and you open them beside the chat. It works offline with no account and no hosted service.
4
4
 
5
5
  ## What it does
6
6
 
7
7
  - Eight agent tools and one bundled skill: `artifact_create`, `artifact_read`, `artifact_update`, `artifact_list`, `artifact_delete`, `artifact_export`, `design_system_read`, and `design_system_update`.
8
- - Two artifact types. A page is a self-contained HTML document rendered in a sandboxed frame with no network. A doc is Markdown edited in a Tiptap rich-text editor.
8
+ - Three artifact types. A page is a self-contained HTML document rendered in a sandboxed frame with no network. A doc is Markdown edited in a Tiptap rich-text editor. A design, shown in the UI as a mockup, is OpenPencil Design JSX: the host compiles it and renders a PNG preview, and the panel opens it on a canvas.
9
+ - Design previews run in a separate child process with Node's permission model: no network, no file writes, no child processes, and a 20 s deadline. The canvas loads the same engine in the browser from a local asset route. Icons come from the bundled Material Design Icons set, and Inter, Roboto, and Noto Naskh Arabic ship with the package.
10
+ - A mockup opens in View: the canvas fills the panel with no toolbar, a floating zoom dock, and click selection. Edit adds select, hand, frame, and text tools, undo, and redo, and opens a React inspector in the right drawer with the layer tree and the selection's position, size, rotation, radius, opacity, visibility, and text properties. Selecting a layer shows a bar that turns it into an agent request with the layer name, path, and JSX. Edits become a draft and Save writes a new version of the Design JSX. A version opened from History stays a read-only PNG. Gallery tiles show the saved PNG for visible mockups.
9
11
  - Two storage scopes. Workspace artifacts live in `$DSH_HOME/artifacts/workspaces/<workspaceId>/`, keyed by the registered workspace, so the project folder stays clean. Library artifacts live in `$DSH_HOME/artifacts/v1/`, and every project can see them.
10
12
  - Every save creates a version. You can preview an older version and restore it, which adds a new version.
11
13
  - A save is refused when someone else saved first, so neither the agent nor you can silently overwrite the other.
12
- - Pages export as HTML. Docs export as Markdown, Word, or HTML. You can print either type or save it as a PDF from the print dialog.
14
+ - Pages export as HTML. Docs export as Markdown, Word, or HTML. You can print either type or save it as a PDF from the print dialog. Mockups export as PNG, SVG, or a `.fig` document that opens in OpenPencil.
13
15
  - A design system reaches pages as `--artifact-*` CSS variables. It has a library default and an optional project override.
14
16
  - The left sidebar opens the Artifacts page with one scope selector for all projects, one project, or the library. Artifacts open as tabs beside the chat. Back preserves gallery search, the scope and type filters, paging, and scroll.
15
17
  - A bundled `artifact-design` skill gives the agent design rules, and page writes return warnings for network URLs, browser storage, fixed widths over 960 pixels, and pages that ignore the design tokens.
@@ -39,4 +41,4 @@ npm run typecheck # host and client
39
41
  npm test # build, then host, client, and package tests
40
42
  ```
41
43
 
42
- Sources are TypeScript in `src/`. `npm run build` compiles the host into `dist/` and bundles `client.js` plus the lazy `client.doc.js`. Do not edit the built files.
44
+ Sources are TypeScript in `src/`. `npm run build` compiles the host into `dist/`, bundles `client.js` plus the lazy `client.doc.js` and `client.canvas.js`, and copies the canvas engine and its assets into `assets/`. Do not edit the built files.
@@ -0,0 +1,297 @@
1
+ # Third-party notices
2
+
3
+ This package is MIT licensed. It bundles or ships the following third-party
4
+ components at build time. Runtime dependencies are listed in `package.json` and
5
+ are MIT licensed.
6
+
7
+ ## CanvasKit
8
+
9
+ The canvas chunk bundles the CanvasKit JavaScript loader, and the package ships
10
+ `assets/canvaskit.wasm` (CanvasKit 0.41.1). CanvasKit is part of Skia and is
11
+ licensed under the BSD-3-Clause license.
12
+
13
+ Copyright (c) 2011 Google Inc. All rights reserved.
14
+
15
+ Redistribution and use in source and binary forms, with or without
16
+ modification, are permitted provided that the following conditions are met:
17
+
18
+ 1. Redistributions of source code must retain the above copyright notice, this
19
+ list of conditions and the following disclaimer.
20
+ 2. Redistributions in binary form must reproduce the above copyright notice,
21
+ this list of conditions and the following disclaimer in the documentation
22
+ and/or other materials provided with the distribution.
23
+ 3. Neither the name of Google Inc. nor the names of its contributors may be
24
+ used to endorse or promote products derived from this software without
25
+ specific prior written permission.
26
+
27
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
28
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
31
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
32
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
34
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
+
38
+ ## Vue
39
+
40
+ The canvas chunk bundles Vue 3.5.41.
41
+
42
+ MIT License
43
+
44
+ Copyright (c) 2018-present, Yuxi (Evan) You
45
+
46
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
47
+ this software and associated documentation files (the "Software"), to deal in
48
+ the Software without restriction, including without limitation the rights to
49
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
50
+ the Software, and to permit persons to whom the Software is furnished to do so,
51
+ subject to the following conditions:
52
+
53
+ The above copyright notice and this permission notice shall be included in all
54
+ copies or substantial portions of the Software.
55
+
56
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
57
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
58
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
59
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
60
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
61
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
62
+
63
+ ## OpenPencil
64
+
65
+ The canvas chunk bundles `@open-pencil/vue` and `@open-pencil/design-jsx`
66
+ 0.16.0, and the host depends on `@open-pencil/core` and
67
+ `@open-pencil/scene-graph` 0.16.0.
68
+
69
+ MIT License
70
+
71
+ Copyright (c) 2026 Danila Poyarkov and OpenPencil contributors
72
+
73
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
74
+ this software and associated documentation files (the "Software"), to deal in
75
+ the Software without restriction, including without limitation the rights to
76
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
77
+ the Software, and to permit persons to whom the Software is furnished to do so,
78
+ subject to the following conditions:
79
+
80
+ The above copyright notice and this permission notice shall be included in all
81
+ copies or substantial portions of the Software.
82
+
83
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
84
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
85
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
86
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
87
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
88
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
89
+
90
+ ## Material Design Icons and Roboto
91
+
92
+ The package ships the Material Design Icons set (@iconify-json/mdi 1.2.3)
93
+ as assets/icons.json, and Roboto 0.10.0 from roboto-fontface as three woff2
94
+ files under assets/fonts. Both are licensed under the Apache License,
95
+ Version 2.0.
96
+
97
+ Apache License
98
+ Version 2.0, January 2004
99
+ http://www.apache.org/licenses/
100
+
101
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
102
+
103
+ 1. Definitions.
104
+
105
+ "License" shall mean the terms and conditions for use, reproduction,
106
+ and distribution as defined by Sections 1 through 9 of this document.
107
+
108
+ "Licensor" shall mean the copyright owner or entity authorized by
109
+ the copyright owner that is granting the License.
110
+
111
+ "Legal Entity" shall mean the union of the acting entity and all
112
+ other entities that control, are controlled by, or are under common
113
+ control with that entity. For the purposes of this definition,
114
+ "control" means (i) the power, direct or indirect, to cause the
115
+ direction or management of such entity, whether by contract or
116
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
117
+ outstanding shares, or (iii) beneficial ownership of such entity.
118
+
119
+ "You" (or "Your") shall mean an individual or Legal Entity
120
+ exercising permissions granted by this License.
121
+
122
+ "Source" form shall mean the preferred form for making modifications,
123
+ including but not limited to software source code, documentation
124
+ source, and configuration files.
125
+
126
+ "Object" form shall mean any form resulting from mechanical
127
+ transformation or translation of a Source form, including but
128
+ not limited to compiled object code, generated documentation,
129
+ and conversions to other media types.
130
+
131
+ "Work" shall mean the work of authorship, whether in Source or
132
+ Object form, made available under the License, as indicated by a
133
+ copyright notice that is included in or attached to the work
134
+ (an example is provided in the Appendix below).
135
+
136
+ "Derivative Works" shall mean any work, whether in Source or Object
137
+ form, that is based on (or derived from) the Work and for which the
138
+ editorial revisions, annotations, elaborations, or other modifications
139
+ represent, as a whole, an original work of authorship. For the purposes
140
+ of this License, Derivative Works shall not include works that remain
141
+ separable from, or merely link (or bind by name) to the interfaces of,
142
+ the Work and Derivative Works thereof.
143
+
144
+ "Contribution" shall mean any work of authorship, including
145
+ the original version of the Work and any modifications or additions
146
+ to that Work or Derivative Works thereof, that is intentionally
147
+ submitted to Licensor for inclusion in the Work by the copyright owner
148
+ or by an individual or Legal Entity authorized to submit on behalf of
149
+ the copyright owner. For the purposes of this definition, "submitted"
150
+ means any form of electronic, verbal, or written communication sent
151
+ to the Licensor or its representatives, including but not limited to
152
+ communication on electronic mailing lists, source code control systems,
153
+ and issue tracking systems that are managed by, or on behalf of, the
154
+ Licensor for the purpose of discussing and improving the Work, but
155
+ excluding communication that is conspicuously marked or otherwise
156
+ designated in writing by the copyright owner as "Not a Contribution."
157
+
158
+ "Contributor" shall mean Licensor and any individual or Legal Entity
159
+ on behalf of whom a Contribution has been received by Licensor and
160
+ subsequently incorporated within the Work.
161
+
162
+ 2. Grant of Copyright License. Subject to the terms and conditions of
163
+ this License, each Contributor hereby grants to You a perpetual,
164
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
165
+ copyright license to reproduce, prepare Derivative Works of,
166
+ publicly display, publicly perform, sublicense, and distribute the
167
+ Work and such Derivative Works in Source or Object form.
168
+
169
+ 3. Grant of Patent License. Subject to the terms and conditions of
170
+ this License, each Contributor hereby grants to You a perpetual,
171
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
172
+ (except as stated in this section) patent license to make, have made,
173
+ use, offer to sell, sell, import, and otherwise transfer the Work,
174
+ where such license applies only to those patent claims licensable
175
+ by such Contributor that are necessarily infringed by their
176
+ Contribution(s) alone or by combination of their Contribution(s)
177
+ with the Work to which such Contribution(s) was submitted. If You
178
+ institute patent litigation against any entity (including a
179
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
180
+ or a Contribution incorporated within the Work constitutes direct
181
+ or contributory patent infringement, then any patent licenses
182
+ granted to You under this License for that Work shall terminate
183
+ as of the date such litigation is filed.
184
+
185
+ 4. Redistribution. You may reproduce and distribute copies of the
186
+ Work or Derivative Works thereof in any medium, with or without
187
+ modifications, and in Source or Object form, provided that You
188
+ meet the following conditions:
189
+
190
+ (a) You must give any other recipients of the Work or
191
+ Derivative Works a copy of this License; and
192
+
193
+ (b) You must cause any modified files to carry prominent notices
194
+ stating that You changed the files; and
195
+
196
+ (c) You must retain, in the Source form of any Derivative Works
197
+ that You distribute, all copyright, patent, trademark, and
198
+ attribution notices from the Source form of the Work,
199
+ excluding those notices that do not pertain to any part of
200
+ the Derivative Works; and
201
+
202
+ (d) If the Work includes a "NOTICE" text file as part of its
203
+ distribution, then any Derivative Works that You distribute must
204
+ include a readable copy of the attribution notices contained
205
+ within such NOTICE file, excluding those notices that do not
206
+ pertain to any part of the Derivative Works, in at least one
207
+ of the following places: within a NOTICE text file distributed
208
+ as part of the Derivative Works; within the Source form or
209
+ documentation, if provided along with the Derivative Works; or,
210
+ within a display generated by the Derivative Works, if and
211
+ wherever such third-party notices normally appear. The contents
212
+ of the NOTICE file are for informational purposes only and
213
+ do not modify the License. You may add Your own attribution
214
+ notices within Derivative Works that You distribute, alongside
215
+ or as an addendum to the NOTICE text from the Work, provided
216
+ that such additional attribution notices cannot be construed
217
+ as modifying the License.
218
+
219
+ You may add Your own copyright statement to Your modifications and
220
+ may provide additional or different license terms and conditions
221
+ for use, reproduction, or distribution of Your modifications, or
222
+ for any such Derivative Works as a whole, provided Your use,
223
+ reproduction, and distribution of the Work otherwise complies with
224
+ the conditions stated in this License.
225
+
226
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
227
+ any Contribution intentionally submitted for inclusion in the Work
228
+ by You to the Licensor shall be under the terms and conditions of
229
+ this License, without any additional terms or conditions.
230
+ Notwithstanding the above, nothing herein shall supersede or modify
231
+ the terms of any separate license agreement you may have executed
232
+ with Licensor regarding such Contributions.
233
+
234
+ 6. Trademarks. This License does not grant permission to use the trade
235
+ names, trademarks, service marks, or product names of the Licensor,
236
+ except as required for reasonable and customary use in describing the
237
+ origin of the Work and reproducing the content of the NOTICE file.
238
+
239
+ 7. Disclaimer of Warranty. Unless required by applicable law or
240
+ agreed to in writing, Licensor provides the Work (and each
241
+ Contributor provides its Contributions) on an "AS IS" BASIS,
242
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
243
+ implied, including, without limitation, any warranties or conditions
244
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
245
+ PARTICULAR PURPOSE. You are solely responsible for determining the
246
+ appropriateness of using or redistributing the Work and assume any
247
+ risks associated with Your exercise of permissions under this License.
248
+
249
+ 8. Limitation of Liability. In no event and under no legal theory,
250
+ whether in tort (including negligence), contract, or otherwise,
251
+ unless required by applicable law (such as deliberate and grossly
252
+ negligent acts) or agreed to in writing, shall any Contributor be
253
+ liable to You for damages, including any direct, indirect, special,
254
+ incidental, or consequential damages of any character arising as a
255
+ result of this License or out of the use or inability to use the
256
+ Work (including but not limited to damages for loss of goodwill,
257
+ work stoppage, computer failure or malfunction, or any and all
258
+ other commercial damages or losses), even if such Contributor
259
+ has been advised of the possibility of such damages.
260
+
261
+ 9. Accepting Warranty or Additional Liability. While redistributing
262
+ the Work or Derivative Works thereof, You may choose to offer,
263
+ and charge a fee for, acceptance of support, warranty, indemnity,
264
+ or other liability obligations and/or rights consistent with this
265
+ License. However, in accepting such obligations, You may act only
266
+ on Your own behalf and on Your sole responsibility, not on behalf
267
+ of any other Contributor, and only if You agree to indemnify,
268
+ defend, and hold each Contributor harmless for any liability
269
+ incurred by, or claims asserted against, such Contributor by reason
270
+ of your accepting any such warranty or additional liability.
271
+
272
+ END OF TERMS AND CONDITIONS
273
+
274
+ APPENDIX: How to apply the Apache License to your work.
275
+
276
+ To apply the Apache License to your work, attach the following
277
+ boilerplate notice, with the fields enclosed by brackets "[]"
278
+ replaced with your own identifying information. (Don't include
279
+ the brackets!) The text should be enclosed in the appropriate
280
+ comment syntax for the file format. We also recommend that a
281
+ file or class name and description of purpose be included on the
282
+ same "printed page" as the copyright notice for easier
283
+ identification within third-party archives.
284
+
285
+ Copyright 2013 Christian Hoffmeister
286
+
287
+ Licensed under the Apache License, Version 2.0 (the "License");
288
+ you may not use this file except in compliance with the License.
289
+ You may obtain a copy of the License at
290
+
291
+ http://www.apache.org/licenses/LICENSE-2.0
292
+
293
+ Unless required by applicable law or agreed to in writing, software
294
+ distributed under the License is distributed on an "AS IS" BASIS,
295
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
296
+ See the License for the specific language governing permissions and
297
+ limitations under the License.