Skip to content

TKM-175: Pack a plugin build into one zip - #264

Closed
JustKira wants to merge 3 commits into
feat/tkm-172-doctor-reportfrom
feat/tkm-175-plugin-pack
Closed

JustKira wants to merge 3 commits into
feat/tkm-172-doctor-reportfrom
feat/tkm-175-plugin-pack

Conversation

@JustKira

@JustKira JustKira commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

plugin pack [folder]
  → build dist with the Tokamak CLI version in plugin.api
  → verify each manifest-listed file and write <id>-<version>.zip
  → return the absolute path, plugin id, version and manifest SHA-256

The server accepts full API versions on the same major and minor release line, from the build version onward. Existing range manifests still load. Doctor and the artifact build share a version accessor backed by packages/cli/package.json. Moving the version source to the root manifest stays with #262.

The builder runs from a fixed folder because Vite includes source path comments in its output. Packages preserve source map locations and omit embedded source text. The ZIP writer is fflate@0.8.3, which has no dependencies or install scripts.

Evidence

  • Before: Packing the same fixture from its parent and from the plugin folder produced different build ids because Vite embedded working-directory-relative labels in ui.js.
  • After: The command integration test verifies one build id across both invocations and a real server reload. System unzip verifies the manifest and every listed file; a separate command test verifies a build error reports its file and line and leaves no ZIP.
Check Result
proto run bun -- test packages/cli/tests 56 pass, 0 fail; Ran 56 tests across 3 files. [375.21s]
proto run bun -- test packages/build/tests 77 pass, 0 fail; Ran 77 tests across 11 files. [297.84s]
cargo test -p server --no-fail-fast -- --test-threads=2 190 passed across the test binaries, 0 failed, 2 ignored; chat_acp_backend ... ok
bash .ci/check.sh lint Tasks: 3 completed
bash .ci/check.sh ts Tasks: 10 completed, Tasks: 7 completed; release tests: 9 pass, 0 fail
bash .ci/check.sh rust test result: ok. 17 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.62s

Merge Danger

Door: Two-way

Blast Radius: Plugins

Newly built artifacts carry the full version in the existing API field. The server keeps its range parser for older artifacts.

@JustKira

Copy link
Copy Markdown
Contributor Author

Closing without merging. The plugin shape, the server engine and sign-in are being decided again (Linear TKM-194 and TKM-195), and this work sits on top of them. Nothing is lost: the head commit is c4687d4, and git fetch origin pull/264/head brings it back.

@JustKira JustKira closed this Nov 21, 2026
@JustKira
JustKira deleted the feat/tkm-175-plugin-pack branch November 21, 2026 18:09
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