@yugoo-design/dsh-design-studio 0.0.0-stage → 0.1.0-beta.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/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,18 @@
1
+ Yugoo-design
2
+ Copyright 2026 YugooDesign Team
3
+
4
+ Yugoo Design was initiated by Jianfeng Yang, who independently completed
5
+ its initial design and development. The project is maintained by
6
+ YugooDesign Team.
7
+
8
+ Except where otherwise identified, the original code and documentation in this
9
+ repository are licensed under the Apache License, Version 2.0. See LICENSE.
10
+
11
+ Third-party code, dependencies, vendored runtimes, and attributed materials
12
+ retain their own licenses and copyright notices. This notice does not relicense
13
+ those materials. See THIRD_PARTY_NOTICES.md and applicable component notices.
14
+
15
+ DSH distribution materials for this package: licenses/dsh-distribution.json.
16
+ It lists actual output hashes, selected original texts in this package, and external npm dependencies separately.
17
+ Existing third-party materials retain their individual terms.
18
+ Historical Companion/source observations are not claims of complete coverage for this DSH archive.
package/README.md CHANGED
@@ -1,3 +1,76 @@
1
- # Temporary Holding Version
1
+ # Design Studio domain library
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `dsh-design-studio` is the host-neutral Studio domain layer. Its installed-content inspection remains read-only: compiled Kit/Bundle catalogs, exact Kit workspaces and real Bundle files with loader-compiled summaries. Optional Panel drafts use separately injected snapshot and persistence ports, never installed-content mutation. The library does not depend on DSH, Codex, Claude Code, Cordis or a browser UI.
4
+
5
+ ## Catalog composition
6
+
7
+ `buildStudioCompositionCatalog` derives one flat, immutable Bundle-version catalog from the Core-compiled installed snapshot. Identical `{name, version}` Bundle pins are coalesced without copying source, while different declared versions of the same Bundle name remain distinct. Each entry lists the exact published Kit versions that use it, so reverse dependencies are derived rather than maintained as a second authority. `searchStudioBundles` searches names and descriptions in deterministic catalog order.
8
+
9
+ Hosts may supply the independent `snapshot.bundles` catalog, including unmounted
10
+ versions. Kit bindings contribute reverse references only. Source inspection uses
11
+ an exact host-resolved Bundle root, not a path inferred from an owning Kit.
12
+ Catalog identity (`catalogName ?? name`) is distinct from a fork's preserved
13
+ runtime name. File-backed retained closures preserve methods, resources and
14
+ version pins after editable sources disappear; mutable discovery cannot replace
15
+ a retained resource root for the same pin.
16
+
17
+ ## Management service
18
+
19
+ `StudioManagementService` is the host-neutral read API for the Studio browser surface. `workspace` derives a JSON-only view from a `StudioCatalogSnapshotPort`: published Kit pins plus searched Bundle entries with exact reverse Kit pins. `readKitWorkspace` resolves one exact installed `name@version` and returns the complete raw `mindset.md` source byte-identically, the mounted Bundles with reverse Kit references, the loader-compiled resource paths, and a browser-safe read-only projection of the optional Core-validated `relations.yaml`; a missing Kit or version diagnoses explicitly. Executable Core definitions and filesystem authority never enter the view model.
20
+
21
+ ## Bundle source inspection
22
+
23
+ `StudioBundleSourceService` reads real Bundle source files through the read-only `StudioBundleSourcePort`. `readBundleWorkspace` returns the complete readable UTF-8 file tree with byte sizes plus the loader-compiled `skill.yaml` manifest, parsed schema, validation rule/driver summary, and Panel classification (`native` Panels are provider-owned code; `declarative` Panels are Bundle-authored data). `readBundleFile` returns one file byte-exactly. Identity is reconciled against the compiled catalog by exact Kit and Bundle `name+version`; an ambiguous physical source (`studio.duplicate_source`) or a catalog/source disagreement (`studio.source_catalog_mismatch`) fails loud instead of guessing. Traversal, `.git`, directories, and binary content are rejected with explicit diagnostics.
24
+
25
+ ## Validation
26
+
27
+ `validateKit` and `validateBundle` capture the Design Core loader's content errors as bounded, locatable diagnostics so an author can see why a definition does not load; a valid definition reports an empty list and validation never degrades to a silently empty result.
28
+
29
+ ## Authoring and remaining boundaries
30
+
31
+ The first authoring primitive, `prepareStudioPanelPreview`, compiles an in-memory `panel.yaml` edit against a host-resolved immutable Kit snapshot. It verifies the exact Kit and Bundle pins, uses the runtime loader (including translation and schema-binding checks), validates an isolated JSON sample, and returns runtime-interpreter input tagged with the editor revision. It writes no files, invokes no model or validation drivers, and grants no runtime/artifact/publication capabilities. Hosts must resolve the source snapshot themselves; arbitrary browser-supplied filesystem paths are not an API.
32
+
33
+ `StudioPanelDraftService` implements a bounded Panel authoring slice: exact installed Kit/Bundle → retained immutable source snapshot → editable Panel/sample draft → preview → save/reopen → confirm/lock → new editable fork. Hosts own snapshot storage and atomic compare-and-swap. Incomplete drafts may be saved for recovery; confirmation reruns compilation against the retained source and rejects conflicts. Confirmed drafts cannot be overwritten. Companion supplies content-addressed complete-source snapshots and an atomic local repository under its trusted `stateRoot`, with size/count limits and no fallback to live project files. Preview does not run Bundle validation drivers or a model. Full Kit copy/create, import/export, actual Bundle trial execution and catalog publication are not yet implemented by this slice.
34
+
35
+ `StudioKitDraftService` adds a Kit-owned authoring service over the same snapshot and
36
+ atomic-repository ports. It retains the exact base Kit and mounted Bundle pins;
37
+ only `mindset.md` and optional `relations.yaml` are editable in this slice. Shared
38
+ Bundle source cannot be changed through this API. The Mindset catalog may reorder
39
+ its entries but cannot add/remove/change mounted identities without a future
40
+ explicit mount operation. Changing the candidate Kit identity does not publish it
41
+ or retarget any installed Kit/session. Definition validation uses the full Core
42
+ loader, and declarative Panel preview uses the retained mounted Bundle and an
43
+ isolated sample through the existing preview implementation.
44
+
45
+ Companion supplies durable Kit draft storage separately from Panel draft records,
46
+ reusing the same locking, snapshot and confinement implementation. Authenticated
47
+ `studioKitDraft*` RPC operations expose create/list/read/save/validate/preview/
48
+ confirm/fork. Confirmation locks a successfully compiled working copy only; it is
49
+ not a catalog publication or a runtime Bundle test. The optional shared Kit draft
50
+ editor is exposed by `studio-ui` and wired to these RPC operations in Companion;
51
+ it reuses the sample-only runtime renderer and protects pending navigation and
52
+ confirmation. New-Kit scaffolding, independent Bundle working-copy adoption and
53
+ release flow remain subsequent work, not claimed capabilities of these endpoints.
54
+
55
+ The content archive functions described in [the archive contract](docs/content-archive.md)
56
+ are exported from this library. Companion adds bounded private envelope storage
57
+ and authenticated export/import/read/list/adopt routes. `studioContentImportAdopt`
58
+ accepts a retained Kit or independent Bundle import ID, rechecks the archive and
59
+ its definition, and passes the prepared units to the host's shared
60
+ `contentLibrary.adoptPrepared` adapter. It retains the exact content closure in
61
+ the local content library, rejecting different bytes at an existing pin and
62
+ reusing identical bytes. Kit adoption additionally creates a new unconfirmed
63
+ working copy through the existing snapshot/CAS service; repeated adoption creates
64
+ separate Kit working-copy identities. Bundle adoption returns its independent
65
+ pin without inventing a Kit, creating a Kit draft or mounting it into a project.
66
+ Source/license/trust declarations remain in the import record. This operation
67
+ does not overwrite installed sources, publish a new version, retarget project
68
+ pins, register trusted providers or execute content. The shared archive browser
69
+ is wired through `contentClient`: adopted Kits open their exact working copy;
70
+ adopted Bundles open their exact source workspace after refreshing the catalog.
71
+
72
+ Focused source-plane checks: `pnpm --filter dsh-design-studio test:kit-drafts`.
73
+ The checked-in test configuration resolves Core source explicitly. Companion's
74
+ `test/studio-panel-drafts.test.mjs` additionally exercises actual temporary storage,
75
+ fresh service instances and retained declarative preview. These are not installed
76
+ package or browser-interaction claims.
@@ -0,0 +1,35 @@
1
+ # Third-party licensing inventory
2
+
3
+ Original Yugoo-design code and documentation are licensed under Apache-2.0,
4
+ except where otherwise identified. Third-party material retains its original
5
+ license. This inventory is a preparation record, not a complete release SBOM
6
+ or a substitute for license texts, source provision, or other obligations.
7
+
8
+ ## Known components requiring release checks
9
+
10
+ | Component | License / location | Release requirement to verify |
11
+ | --- | --- | --- |
12
+ | Official Ladybug WASM dependency `@ladybugdb/wasm-core@0.21.1` | Package declares MIT; original text and public source locator in `third-party/native/ladybug-wasm-core-0.21.1/` | Current `packages/knowledge-ladybug` dependency route. Preserve Kùzu Inc./Ladybug Memory Inc. notices and verify actual release inclusion. The installed package has no separate third-party inventory or precise build-provenance file; embedded components and source/build correspondence remain unresolved. Package MIT is not a blanket license for the complete WASM. |
13
+ | Historical vendored Ladybug WASM runtime | MIT; `vendor/ladybug/runtime/LICENSE` | Separate legacy route: preserve its own copyright/license, provenance and patch if distributed. Do not use its patch/source evidence as the build provenance of the official npm dependency. Compiled-in component checks remain separate. |
14
+ | DSH code and reused utilities | MIT; `deepseek-harness/LICENSE` | Retain original notices; distinguish external host from copied/bundled utilities. |
15
+ | Pinned DSH JSON value utility (Core) | MIT; repository `packages/core/third-party/dsh-json/LICENSE`, Core package `third-party/dsh-json/LICENSE` | Preserve the original license and provenance README with the Core tarball; verify actual packed files. |
16
+ | ELK / elkjs | EPL-2.0 | Include license and corresponding source availability information; verify actual bundled version and modifications. |
17
+ | sharp | Apache-2.0 | Preserve applicable license and upstream notices. |
18
+ | Prebuilt sharp/libvips dependency bundle | Local `@img/sharp-libvips-*` package declares LGPL-3.0-or-later; contains multiple licenses | Inventory all bundled libraries per platform; provide required corresponding source/build materials and verify replacement/relinking conditions. libvips upstream alone is LGPL-2.1-or-later; do not confuse that with the distributed bundle's terms. |
19
+ | bpmn-js | bpmn.io License | Include original license/copyright; keep the required watermark visible and unchanged. |
20
+ | Design-style reference material and icon assets | Apache-2.0, MIT, ISC | Preserve the detailed notices in `packages/skills-web-app/skills/design_style/THIRD_PARTY_NOTICES.md`; verify required full license texts are distributed. |
21
+
22
+ ## Scope exclusions
23
+
24
+ - `deepseek-harness/` and `vendor/ladybug/` are not relicensed by the root LICENSE.
25
+ - External packages keep their own licenses even when bundled into an output.
26
+ - Separately licensed Kit content and assets keep their explicit licenses.
27
+ - Downloaded model weights require their own version-specific license review;
28
+ the inference engine's license does not license the weights.
29
+
30
+ ## Release work still pending
31
+
32
+ Generate a versioned inventory from actual tarballs and CLI plugin outputs,
33
+ include every required license/NOTICE, arrange corresponding source access for
34
+ applicable components, and verify Linux/Windows/macOS packaging separately.
35
+ See TODO.md. Do not label a release compliant based only on this inventory.