Skip to content

SolidCraft plugin ↔ desktop app through a shared folder - #404

Merged
Sebagrei merged 9 commits into
mainfrom
feature/solidcraft-bridge
Nov 22, 2026
Merged

Sebagrei merged 9 commits into
mainfrom
feature/solidcraft-bridge

Conversation

@Sebagrei

Copy link
Copy Markdown
Collaborator

Builds on #402 (merge that first; this branch contains its commits).

SolidCraft plugins have no network, so the TeamCraft plugin and the desktop app now share one folder, <working folder>/.teamcraft/solidcraft. Research page first: docs/src/research/solidcraft-bridge.md (channels of SolidCraft 0.45 compared, with sources).

Desktop (desktop/src/scbridge.rs, desktop/ui/js/solidcraft-bridge.js)

  • heartbeat every 30 s (desktop.json: the app runs, the server answers /me);
  • revision state on every Workspace refresh (state-<key>.json: checked out by, local changes, released);
  • every 5 s the plugin's requests (request-<key>.<time>.<action>.json) are checked – a revision of this working folder, one of three actions, ≤ 10 min old, ≤ 4 KiB, a regular file, name matching content – removed, and handed to the UI: open shows the revision, check out asks first, check in opens the check-in dialog.
  • Only for a working folder that exists; no secrets in the folder. Threat model row added.

Plugin

  • New entries live, check-out, check-in, open; folder grant teamcraft + clock. The desktop app not running is a message ("not running – as of 3 min ago: …"), never a failure; a request waits 10 minutes.
  • The old entries never touch files, so they work without the folder grant (test pins it).
  • plugins/solidcraft/tests/*.json: 14 cases, all pass on SolidCraft 0.45.0 via solidcraft-cli plugin test --require-cases.
  • build.sh also writes teamcraft.zip (what Install plugin… takes) when zip exists.

Not verified locally: the desktop Rust (Tauri) was not built here – desktop CI is the check. cargo test for the plugin was not run locally (permission); the plugin workflow runs it.

Docs: research page, CHANGELOG.md, README.md, desktop/README.md, docs/src/guide/desktop.md, docs/src/dev/threat-model.md, docs/OPEN_WORK.md, plugins/solidcraft/README.md.

🤖 Generated with Claude Code

fork and others added 9 commits November 22, 2026 09:49
The usage statistics page (#383) left three checks red: the table headers
had no scope (every_rendered_page_is_accessible), usage::record, ::overview
and ::spawn write without an audit entry and were not on NOT_AUDITED, and
`mod usage;` was out of rustfmt's order in src/web/mod.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SolidCraft refused status and check with "permission denied: edit command
document.metadata from read entry": its command catalog classes
document.metadata, assembly.bom and component.links as edit commands, and a
read entry may only call read commands. Both entries are now declared edit
(they still only read). The four ribbon buttons all read "TeamCraft"
because a ribbon slot's name is the button label; they now carry the entry
titles. A manifest test pins both; the finding and its source are in
docs/src/research/solidcraft-design.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
every_template_renders looked for "Page: /items/PRT-000042", but MiniJinja
escapes / in text as &#x2f;. The copied details are decoded by the browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…0.45

Bad input names the field (SolidCraft shows only the reason), damaged
teamcraft.pdm data is reported with the fix, and check no longer reports
ready when the BOM or the linked designs could not be read. Command
failures carry what to do. SolidCraft 0.45 ends a run on any failed
command with its own message, so the plugin only calls commands that
answer on any design; all four entries were run on the flatpak through
solidcraft-cli, also on an empty design. The test host now answers a part
with no BOM rows, as SolidCraft does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bridge folder granted to the plugin carries state (desktop app → plugin)
and requests (plugin → desktop app); design properties keep identity only.
Findings from SolidCraft's open source and the installed 0.45.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SolidCraft plugins have no network. The plugin and the desktop app share
<working folder>/.teamcraft/solidcraft (research page solidcraft-bridge):

- desktop (src/scbridge.rs): a heartbeat every 30 s, the state of each
  revision on every Workspace refresh, and every 5 s the plugin's requests
  - checked (a revision of this working folder, a known action, fresh,
  small, a regular file, name = content), removed, handed to the UI;
  ui/js/solidcraft-bridge.js asks before a check-out and opens the
  check-in dialog for a check-in.
- plugin: entries live, check-out, check-in and open (folder grant
  `teamcraft`, clock); the desktop app not running is a message, never a
  failure. The old entries never touch files.
- 14 cases in plugins/solidcraft/tests/ pass on SolidCraft 0.45.0
  (solidcraft-cli plugin test --require-cases); build.sh also makes the
  .zip SolidCraft installs.

The desktop side is not built locally (CI is the check).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…idge

# Conflicts:
#	plugins/solidcraft/README.md
#	plugins/solidcraft/plugin.json
#	plugins/solidcraft/src/logic.rs
@Sebagrei
Sebagrei merged commit 921e7e8 into main Nov 22, 2026
3 checks passed
@Sebagrei
Sebagrei deleted the feature/solidcraft-bridge branch November 22, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant