Repository navigation
TeamCraft plugin for SolidCraft (plugins/solidcraft) - #391
Merged
Merged
Conversation
src/scdesign.rs opens the .sc ZIP design container with bounded, size- and CRC-checked reads and returns cache/thumbnail.png only when its key (solidcraft-thumbnail/1) names the SHA-256 of this document.json and of the PNG. Unknown versions, drawing containers, damaged or oversized entries are 'no picture', never an error. thumbnail.rs supports solidcraft-design; the existing thumbnail fuzz target covers the new path. Docs: guide/files.md, reference/formats.md, reference/interop.md, README, CHANGELOG, OPEN_WORK, CLAUDE.md architecture map; scdesign.rs added to the mutation-testing globs. Closes #364 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scdesign::document reads the document of a ZIP or plain-JSON design (bounded, 16 MiB), scdesign::linked_designs the file names of its links with the placements of the linked components as counts (a component without a placement counts once; standard parts are no files). cadrefs uses them for .sc files instead of the text heuristic and as instance counts. The JSON design check moved from cadformat to scdesign. New fuzz target scdesign (harness, target, seed, CI matrix). Docs: guide/structure.md, reference/formats.md (incl. rescan), reference/interop.md, dev/fuzzing.md, README, CHANGELOG, OPEN_WORK, CLAUDE.md architecture map. Closes #365 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
desktop/src/cadlock.rs reads SolidCraft's .~<file>.lock beside a design (regular file only, at most 4 KiB, stale after 180 s either way) into LocalFile.open_in (program, computer, user, since). The Workspace tab marks such files 'Open in SolidCraft', the check-in dialog warns that unsaved changes there are not checked in. Tests for fresh, stale, future, malformed, oversized locks, other formats, and that lock and backup files are never uploaded. Docs: desktop/README.md, guide/desktop.md, reference/interop.md, CHANGELOG, OPEN_WORK. Closes #370 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y system (#368) cadexport gains CadProgram::SolidCraft: .sc/.solidcraft files that are designs (ZIP container or JSON solidcraft/N, not scripts) are exported with 'solidcraft-cli run --in <design> --out <name>.stp', found through SOLIDCRAFT_CLI, PATH or SolidCraft's install folders (Windows, macOS app bundle, Linux packages, ~/.local/bin, snap), run without a shell or window under the same 15-minute limit; the wait loop is shared with the PowerShell exports. available() lists it on every system. Check-in: a failed or impossible STEP export (any program) no longer stops the check-in – the file goes without its STEP and the result says why (lessons from #342). Docs: desktop/README.md, guide/desktop.md, guide/files.md, reference/interop.md, README, CHANGELOG, OPEN_WORK. Closes #368 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
desktop/src/scprops.rs builds one document.metadata.set script (part_number, revision, description and TeamCraft's object with item and revision ids and the server under teamcraft.pdm) and runs 'solidcraft-cli run <script> --in <design> --save <design>'; refused for files that are not SolidCraft designs, read-only (not my check-out) or open in SolidCraft (cadlock). cadexport's CLI runner is shared (run_cli). Tauri command solidcraft_write_item_data and an 'Item data' button in the Workspace tab. Docs: desktop/README.md, guide/desktop.md, reference/interop.md, CHANGELOG, OPEN_WORK. Closes #369 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A WebAssembly component for SolidCraft's plugin runtime (craft:plugin@0.2.0, capability commands@0.2), its own Cargo project: - status: the TeamCraft item and revision of the design (teamcraft.pdm, written by the desktop app's Item data), the revision page, whether part number and revision still match; - check: what keeps the design from going into TeamCraft cleanly (part number, mismatch with the item, BOM rows without part number, one part number with two descriptions, uncountable quantities, absolute or same-named linked designs); - link / unlink: write or remove the item data from inside SolidCraft. No network (SolidCraft refuses it); only document.metadata(.set/.remove), assembly.bom and component.links. Logic in src/logic.rs with tests against a fake host; bindings only in the wasm build. build.sh makes the package and refuses any import but craft:plugin@0.2.0. Workflow 'SolidCraft plugin': fmt, clippy, tests, component, artifact. wit/plugin.wit is SolidCraft's interface, unchanged, MIT. Docs: plugin README, reference/interop.md, research page, README (features, licence table), CHANGELOG, OPEN_WORK, CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #390 → #389 → #387 → #386 → #385 → #384 (uses the
teamcraft.pdmobject of #369).What
A plugin for SolidCraft's experimental plugin runtime – a WebAssembly component (
craft:plugin@0.2.0, worldcommand-plugin, capabilitycommands@0.2), its own Cargo project likedesktop/:teamcraft.pdm), the revision page<server>/revisions/<id>, whether part number / revision still matchreadyflagteamcraft.pdmin one undo step; keeps the desktop app's ids for the same itemteamcraft.pdmSolidCraft's plugins have no network access, so check-out/check-in stay in the desktop app; the plugin works on the open design. Commands used (declared in
plugin.json, no file group):document.metadata,document.metadata.set,document.metadata.remove,assembly.bom,component.links.src/logic.rs: the entries over aHosttrait, tested against a fake design;src/lib.rs: wit-bindgen bindings (wasm32 only).build.sh:wasm32-unknown-unknown→wasm-tools component new→target/package/teamcraft/(plugin.json, plugin.wasm, SHA256SUMS); fails if the component imports anything butcraft:plugin@0.2.0(no WASI).solidcraft-plugin.yml(path-filtered): fmt, clippy (host + wasm), tests, package as artifact.Licence – please confirm
plugins/solidcraft/wit/plugin.witis SolidCraft's interface definition, unchanged, MIT (wit/LICENSE-MIT), needed to build a component for their runtime. Recorded in the README licence table, the plugin README, interop.md and the research page (as the one exception to "no SolidCraft code").Not done / not verified
wit-bindgen = "0.41"may need a bump.Docs
plugin README, reference/interop.md, research/solidcraft-design.md, README (features, licence table), CHANGELOG, OPEN_WORK, CLAUDE.md.
🤖 Generated with Claude Code