Repository navigation
Add mieweb exec for running a command in a managed guest - #30
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Release coordination needs human confirmation because companion PR #543 remains unmerged and bundled provider 2026.12.1 lacks exec, requiring verification of deployment order and an exec-capable stable dependency and lockfile before publishing.
No open issues 🎉
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
Adds mieweb exec to run a one-shot command in a managed guest through the active provider and Manager login.
Changes:
- Adds an optional provider exec contract and CLI command that preserve arguments, output bytes, and guest exit status.
- Adds validation, failure diagnostics, and CLI tests.
- Documents usage, provider compatibility, and release requirements.
| File | Description |
|---|---|
| README.md | Introduces guest exec usage. |
| pnpm-lock.yaml | Updates the locked OS provider dependency. |
| packages/deploy-contract/src/index.ts | Defines exec requests, results, and optional provider capability. |
| packages/cli/test/exec.test.mjs | Tests arguments, streams, statuses, and failures. |
| packages/cli/src/index.mjs | Routes exec and preserves arguments after --. |
| packages/cli/src/exec.mjs | Implements exec validation, dispatch, and output handling. |
| packages/cli/README.md | Documents authentication, usage, diagnostics, and provider support. |
| packages/cli/package.json | Updates the OS provider dependency range. |
| .changeset/manager-guest-exec.md | Records minor releases for the new capability. |
Review effort: Balanced
|
I verified the release dependency using the published PR artifacts. CLI The npm stable version and this branch’s lockfile both resolve to |
Closes mieweb/opensource-server#541. Companion Manager and OS provider change: mieweb/opensource-server#543.
Run a command in an existing guest from a laptop or CI runner using the current Manager login.
mieweb exec --site 1 --container 42 -- node --version--literally, including empty strings, spaces, and guest flags such as--target.Verification
The CLI tests cover flags on either side of the separator, binary output, nonzero statuses, truncation, missing or old providers and transport errors. Workspace tests, typechecking and the packed CLI install smoke test passed. Tested the built OS provider end to end against the companion Manager and an unprivileged Linux LXC guest with no guest SSH route.
Release order
Release the Manager and OS provider from the companion PR first. The current npm provider (2026.12.1) predates exec. Install the provider preview in the test project for joint review. Before publishing the CLI, set its bundled provider dependency and lockfile to the first stable release containing exec.