dsh-artifact-studio 0.3.2 → 0.7.1

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,296 @@
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` 0.16.0, and the host depends on
66
+ `@open-pencil/core` 0.16.0.
67
+
68
+ MIT License
69
+
70
+ Copyright (c) 2026 Danila Poyarkov and OpenPencil contributors
71
+
72
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
73
+ this software and associated documentation files (the "Software"), to deal in
74
+ the Software without restriction, including without limitation the rights to
75
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
76
+ the Software, and to permit persons to whom the Software is furnished to do so,
77
+ subject to the following conditions:
78
+
79
+ The above copyright notice and this permission notice shall be included in all
80
+ copies or substantial portions of the Software.
81
+
82
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
83
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
84
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
85
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
86
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
87
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
88
+
89
+ ## Material Design Icons and Roboto
90
+
91
+ The package ships the Material Design Icons set (@iconify-json/mdi 1.2.3)
92
+ as assets/icons.json, and Roboto 0.10.0 from roboto-fontface as three woff2
93
+ files under assets/fonts. Both are licensed under the Apache License,
94
+ Version 2.0.
95
+
96
+ Apache License
97
+ Version 2.0, January 2004
98
+ http://www.apache.org/licenses/
99
+
100
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
101
+
102
+ 1. Definitions.
103
+
104
+ "License" shall mean the terms and conditions for use, reproduction,
105
+ and distribution as defined by Sections 1 through 9 of this document.
106
+
107
+ "Licensor" shall mean the copyright owner or entity authorized by
108
+ the copyright owner that is granting the License.
109
+
110
+ "Legal Entity" shall mean the union of the acting entity and all
111
+ other entities that control, are controlled by, or are under common
112
+ control with that entity. For the purposes of this definition,
113
+ "control" means (i) the power, direct or indirect, to cause the
114
+ direction or management of such entity, whether by contract or
115
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
116
+ outstanding shares, or (iii) beneficial ownership of such entity.
117
+
118
+ "You" (or "Your") shall mean an individual or Legal Entity
119
+ exercising permissions granted by this License.
120
+
121
+ "Source" form shall mean the preferred form for making modifications,
122
+ including but not limited to software source code, documentation
123
+ source, and configuration files.
124
+
125
+ "Object" form shall mean any form resulting from mechanical
126
+ transformation or translation of a Source form, including but
127
+ not limited to compiled object code, generated documentation,
128
+ and conversions to other media types.
129
+
130
+ "Work" shall mean the work of authorship, whether in Source or
131
+ Object form, made available under the License, as indicated by a
132
+ copyright notice that is included in or attached to the work
133
+ (an example is provided in the Appendix below).
134
+
135
+ "Derivative Works" shall mean any work, whether in Source or Object
136
+ form, that is based on (or derived from) the Work and for which the
137
+ editorial revisions, annotations, elaborations, or other modifications
138
+ represent, as a whole, an original work of authorship. For the purposes
139
+ of this License, Derivative Works shall not include works that remain
140
+ separable from, or merely link (or bind by name) to the interfaces of,
141
+ the Work and Derivative Works thereof.
142
+
143
+ "Contribution" shall mean any work of authorship, including
144
+ the original version of the Work and any modifications or additions
145
+ to that Work or Derivative Works thereof, that is intentionally
146
+ submitted to Licensor for inclusion in the Work by the copyright owner
147
+ or by an individual or Legal Entity authorized to submit on behalf of
148
+ the copyright owner. For the purposes of this definition, "submitted"
149
+ means any form of electronic, verbal, or written communication sent
150
+ to the Licensor or its representatives, including but not limited to
151
+ communication on electronic mailing lists, source code control systems,
152
+ and issue tracking systems that are managed by, or on behalf of, the
153
+ Licensor for the purpose of discussing and improving the Work, but
154
+ excluding communication that is conspicuously marked or otherwise
155
+ designated in writing by the copyright owner as "Not a Contribution."
156
+
157
+ "Contributor" shall mean Licensor and any individual or Legal Entity
158
+ on behalf of whom a Contribution has been received by Licensor and
159
+ subsequently incorporated within the Work.
160
+
161
+ 2. Grant of Copyright License. Subject to the terms and conditions of
162
+ this License, each Contributor hereby grants to You a perpetual,
163
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
164
+ copyright license to reproduce, prepare Derivative Works of,
165
+ publicly display, publicly perform, sublicense, and distribute the
166
+ Work and such Derivative Works in Source or Object form.
167
+
168
+ 3. Grant of Patent License. Subject to the terms and conditions of
169
+ this License, each Contributor hereby grants to You a perpetual,
170
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
171
+ (except as stated in this section) patent license to make, have made,
172
+ use, offer to sell, sell, import, and otherwise transfer the Work,
173
+ where such license applies only to those patent claims licensable
174
+ by such Contributor that are necessarily infringed by their
175
+ Contribution(s) alone or by combination of their Contribution(s)
176
+ with the Work to which such Contribution(s) was submitted. If You
177
+ institute patent litigation against any entity (including a
178
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
179
+ or a Contribution incorporated within the Work constitutes direct
180
+ or contributory patent infringement, then any patent licenses
181
+ granted to You under this License for that Work shall terminate
182
+ as of the date such litigation is filed.
183
+
184
+ 4. Redistribution. You may reproduce and distribute copies of the
185
+ Work or Derivative Works thereof in any medium, with or without
186
+ modifications, and in Source or Object form, provided that You
187
+ meet the following conditions:
188
+
189
+ (a) You must give any other recipients of the Work or
190
+ Derivative Works a copy of this License; and
191
+
192
+ (b) You must cause any modified files to carry prominent notices
193
+ stating that You changed the files; and
194
+
195
+ (c) You must retain, in the Source form of any Derivative Works
196
+ that You distribute, all copyright, patent, trademark, and
197
+ attribution notices from the Source form of the Work,
198
+ excluding those notices that do not pertain to any part of
199
+ the Derivative Works; and
200
+
201
+ (d) If the Work includes a "NOTICE" text file as part of its
202
+ distribution, then any Derivative Works that You distribute must
203
+ include a readable copy of the attribution notices contained
204
+ within such NOTICE file, excluding those notices that do not
205
+ pertain to any part of the Derivative Works, in at least one
206
+ of the following places: within a NOTICE text file distributed
207
+ as part of the Derivative Works; within the Source form or
208
+ documentation, if provided along with the Derivative Works; or,
209
+ within a display generated by the Derivative Works, if and
210
+ wherever such third-party notices normally appear. The contents
211
+ of the NOTICE file are for informational purposes only and
212
+ do not modify the License. You may add Your own attribution
213
+ notices within Derivative Works that You distribute, alongside
214
+ or as an addendum to the NOTICE text from the Work, provided
215
+ that such additional attribution notices cannot be construed
216
+ as modifying the License.
217
+
218
+ You may add Your own copyright statement to Your modifications and
219
+ may provide additional or different license terms and conditions
220
+ for use, reproduction, or distribution of Your modifications, or
221
+ for any such Derivative Works as a whole, provided Your use,
222
+ reproduction, and distribution of the Work otherwise complies with
223
+ the conditions stated in this License.
224
+
225
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
226
+ any Contribution intentionally submitted for inclusion in the Work
227
+ by You to the Licensor shall be under the terms and conditions of
228
+ this License, without any additional terms or conditions.
229
+ Notwithstanding the above, nothing herein shall supersede or modify
230
+ the terms of any separate license agreement you may have executed
231
+ with Licensor regarding such Contributions.
232
+
233
+ 6. Trademarks. This License does not grant permission to use the trade
234
+ names, trademarks, service marks, or product names of the Licensor,
235
+ except as required for reasonable and customary use in describing the
236
+ origin of the Work and reproducing the content of the NOTICE file.
237
+
238
+ 7. Disclaimer of Warranty. Unless required by applicable law or
239
+ agreed to in writing, Licensor provides the Work (and each
240
+ Contributor provides its Contributions) on an "AS IS" BASIS,
241
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
242
+ implied, including, without limitation, any warranties or conditions
243
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
244
+ PARTICULAR PURPOSE. You are solely responsible for determining the
245
+ appropriateness of using or redistributing the Work and assume any
246
+ risks associated with Your exercise of permissions under this License.
247
+
248
+ 8. Limitation of Liability. In no event and under no legal theory,
249
+ whether in tort (including negligence), contract, or otherwise,
250
+ unless required by applicable law (such as deliberate and grossly
251
+ negligent acts) or agreed to in writing, shall any Contributor be
252
+ liable to You for damages, including any direct, indirect, special,
253
+ incidental, or consequential damages of any character arising as a
254
+ result of this License or out of the use or inability to use the
255
+ Work (including but not limited to damages for loss of goodwill,
256
+ work stoppage, computer failure or malfunction, or any and all
257
+ other commercial damages or losses), even if such Contributor
258
+ has been advised of the possibility of such damages.
259
+
260
+ 9. Accepting Warranty or Additional Liability. While redistributing
261
+ the Work or Derivative Works thereof, You may choose to offer,
262
+ and charge a fee for, acceptance of support, warranty, indemnity,
263
+ or other liability obligations and/or rights consistent with this
264
+ License. However, in accepting such obligations, You may act only
265
+ on Your own behalf and on Your sole responsibility, not on behalf
266
+ of any other Contributor, and only if You agree to indemnify,
267
+ defend, and hold each Contributor harmless for any liability
268
+ incurred by, or claims asserted against, such Contributor by reason
269
+ of your accepting any such warranty or additional liability.
270
+
271
+ END OF TERMS AND CONDITIONS
272
+
273
+ APPENDIX: How to apply the Apache License to your work.
274
+
275
+ To apply the Apache License to your work, attach the following
276
+ boilerplate notice, with the fields enclosed by brackets "[]"
277
+ replaced with your own identifying information. (Don't include
278
+ the brackets!) The text should be enclosed in the appropriate
279
+ comment syntax for the file format. We also recommend that a
280
+ file or class name and description of purpose be included on the
281
+ same "printed page" as the copyright notice for easier
282
+ identification within third-party archives.
283
+
284
+ Copyright 2013 Christian Hoffmeister
285
+
286
+ Licensed under the Apache License, Version 2.0 (the "License");
287
+ you may not use this file except in compliance with the License.
288
+ You may obtain a copy of the License at
289
+
290
+ http://www.apache.org/licenses/LICENSE-2.0
291
+
292
+ Unless required by applicable law or agreed to in writing, software
293
+ distributed under the License is distributed on an "AS IS" BASIS,
294
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
295
+ See the License for the specific language governing permissions and
296
+ limitations under the License.