* fix(sandbox): wait for the guest agent before provisioning the exec user
A freshly created microVM does not accept msb exec until its guest agent is
up, so provisioning raced the boot and died on three 15s timeouts, which then
failed the whole enforcement-enable path. Gate provisioning on msb ping
bounded by SANDBOX_START_TIMEOUT_MS, give the exec a 30s budget, and downgrade
a provisioning failure to a warning so a missing sudo entry never blocks
sandboxed commands.
* fix(sandbox): align canonical shell spec with msb and pin the rebuilt guest image
- pass --shell /bin/sh explicitly at create and derive the canonical
spec from the create args so msb 0.6.15 recordings match attestation
- bump the SANDBOX_IMAGE pin to the rebuilt guest image digest
- verify the provisioned exec user inside the guest and give the
provisioning exec the full start timeout, bounded by a deadline
* docs(sandbox): sync the image digest pin into the docker and environment docs
* fix(sandbox): verify the guest image as an unknown uid and pin the rebuild
The build verification ran as uid 1000, which is the base image's node user,
so it exercised the known-user path and would have passed even if the numeric
exec uid the runtime actually uses were broken. Verify the toolchain as uid
4242 instead and keep the sudo check on the known user, since sudo refuses
unknown uids by design. Also only write the shadow entry when the passwd entry
is created, so a uid that already exists leaves no orphan record.
* fix(sandbox): close spawned command stdin so msb exec completes
msb exec reads its stdin during session setup and waits for EOF, so
every child spawned through executeCommand with an open stdin pipe hung
until its timeout while identical CLI execs finished instantly. Spawn
children with stdin ignored.
Also verify the provisioned exec user from a fresh guest exec after
each provisioning attempt and move failed provisioning to a logged
background retry bounded by five attempts so a slow guest no longer
blocks enforcement or leaves sudo silently missing.
* test(sandbox): derive expected inspect spec from canonical builders
* fix(sandbox): cancel provisioning retries on stop and serialize attempts
Advance the provisioning retry generation and drop the pending retry at the
start of every managed-sandbox stop, so a retry scheduled before a toggle-off
no longer pings and provisions a stopped sandbox. Clearing the promise as well
keeps later retries schedulable, since the generation guard would otherwise
strand it and short-circuit scheduling.
Route every provisioning caller through a single in-flight promise so the
boot-path attempt and the background retry cannot run the check-then-append
passwd and shadow script concurrently and append duplicate account entries.
msb caches images by reference and pull without --force never contacts the
registry, while attestation compares the reference string. A floating tag
therefore keeps a stale guest image forever and still passes attestation.
Pinning the default to the published index digest makes IfMissing pull the
new image and forces the running microVM to be recreated on deploy.
Startup and the enforcement toggle now run the same ensureWorkspaceSandbox
path a command triggers, so the image pull, microVM boot, attestation and
exec-user provisioning are done before the first command instead of on it.
One microVM serves every repo and schedule worktree.
Pull the configured guest image in the background when the Manager boots and
when sandbox enforcement is switched on, so a sandboxed command no longer
pays the multi-gigabyte download. msb pull is a no-op once cached, startup is
never blocked by it, and a command racing the pull joins the same in-flight
boot.
Set a writable guest HOME and shared COREPACK_HOME, expose bunx, redirect
npm/pnpm global installs to a PATH dir, lift Debian's externally-managed
pip guard, and verify the toolchain as an unprivileged uid at build time.
Provision passwd/group/shadow entries for the numeric exec uid at sandbox
create, start, and Manager boot so passwordless sudo works in the guest.
* feat(sandbox): add KVM-backed agent sandboxing via microsandbox
* feat(sandbox): route host-shell surfaces into microVM via shell wrapper
* feat(sandbox): route host-shell surfaces into microVM via shell wrapper
* fix(sandbox): harden enforcement validation and backup handling
* fix(sandbox): bound lifecycle queue and harden install/backup paths
Bound the OpenCode supervisor lifecycle queue to one running plus one
pending operation so repeated restarts cannot stack unbounded HTTP
requests, while exempting stop() so shutdown is never dropped.
Reject enforcement backups that carry no recoverable removed sections,
matching the existing fail-closed handling of unparseable backups.
Install OpenCode through a private mktemp staging directory instead of
the predictable /tmp/opencode path.
Use named path/os imports in the files added by this branch.
* refactor(sandbox): remove OpenCode version allowlist gating under enforcement
* fix(settings): use resolved opencode binary and verify installed version
* refactor(sandbox): scope enforcement to agent bash tool only
* fix(sandbox): plan bash against factory directory and attest runtime tmpfs; align permission reply API
* fix(sandbox): pin neutral entrypoint and persist opencode upgrades across rebuilds
* fix(sandbox): align canonical spec with msb 0.6.8 runtime defaults
* feat(sandbox): show unwrapped sandboxed bash commands in message UI
* refactor(sandbox): pin shell shim to sandbox agent bash without rewriting commands
* feat(sandbox): route notifications through a host-side manager tool
* feat(sandbox): route all assistant capabilities through the ocm tool
Add an allow-listed request action to the generated ocm plugin so agents
reach settings, assistant reload, repos, git-info, workspaces, and
schedules through the tool instead of curling the internal API with a
bearer token, which is impossible under sandboxing.
Rewrite the curl-based skills to use the ocm request action and drop the
apiBaseUrl plumbing. Remove the now-unread .opencode/internal-token file
and the sandbox tmpfs mask that hid it; attestation now rejects any
tmpfs other than the runtime /tmp mount.
* fix(sidebar): wire new-session and new-schedule actions to every page
AssistantRedirect never registered a listener for the sidebar's
new-session event, so the desktop sidebar CTA on /assistant was a
no-op; the Schedules pages had the same gap for new-schedule.
Make useSidebarAction the single source of truth for action keys and
event dispatch, and warn when an action is dispatched with no mounted
handler so an unhandled CTA fails loudly instead of silently. Wire the
missing listeners to the existing per-page handlers.
* feat(sandbox): forward git credentials into the microVM and add sandbox guest image
* feat(sandbox): add git credential forwarding toggle to settings
026e8f13c removed the host-access reference from the installation guide
but kept the test asserting that link, so docker-config.test.ts failed
on main. Remove the assertion and its now-unused path constant, and
close the blank line the dropped reference left behind.
* feat(ocm-cli): add file and keychain credential backends with auth commands
* feat(ocm-cli): refactor credentials into async TokenStore architecture
Replace the credential-backend module with a TokenStore interface and
file/keychain implementations behind an internal facade. Convert token
get/set/delete to async, add env-token precedence warnings on login and
logout, and surface store availability in status. Add token-store tests
and helpers; remove the old credential modules and tests. Bump to 0.2.6.
* fix(ocm-cli): keep tokens out of security argv and stop masking config read errors
Route every macOS Keychain call through `security -i`, sending the quoted
command on stdin so the token is never visible in process arguments. Reject
arguments containing line breaks, which would otherwise inject additional
security commands.
Let unexpected state file read failures propagate so a broken config dir is
reported instead of being reduced to "no manager configured", and stop
consuming the install notice when reading it fails unexpectedly.
---------
Co-authored-by: CS <chris@chriswritescode.dev>
* feat(docker): run container as host user with bind-mounted workspace
* fix(docker): warn on workspace gid mismatch as well as uid
* fix(docker): eval snippet passed as positional arg in container-user tests
* docs(installation): drop stale host repository access reference
Replace try/access/mkdir pattern with single mkdirSafe call in ssh-key-manager; drop unused mkdir mocks from stt/tts/repo tests and mock fs-safe's mkdirSafe instead; add zod peer dep extension to pnpm workspace; note EACCES-tolerant startup in troubleshooting doc.
* feat(ocm-cli): add session warp with progress reporting
Add warp functionality for moving sessions between local and remote
Managers. Includes TUI dialogs, remote replay, progress reporting
during event transfer, and comprehensive test coverage.
* feat(ocm-cli): add granular push progress with phase reporting and upload tracking
* chore(ocm-cli): bump version to 0.2.5
* docs(ocm-cli): document push progress phases in README
* feat(ocm-cli): add remote indicator to TUI when attached to Manager
* chore(ocm-cli): bump version to 0.2.3
* feat(ocm-cli): show remote indicator on home screen and session prompt
* feat(ocm-cli): remove arrow icon from remote indicator
* docs: remove arrow icon from remote indicator description
* loop: ocm-session-move completed after 7 iterations
* feat(ocm-cli): add session move with local history export and TUI plugin
* docs(ocm-cli): update plugin config to tui-only entry and clarify session history source
* fix(ocm-cli): replace raw postinstall output with TUI toast notification
* test(backend): replace better-sqlite3 test mock with node:sqlite
Reimplement the bun:sqlite test mock on top of node:sqlite with an
explicit BEGIN/COMMIT/ROLLBACK transaction wrapper.
* feat(assistant): self-configuring assistant mode
Add a self-editable assistant workspace and the APIs that support it:
- POST /assistant/reload disposes and re-bootstraps the assistant
instance (directory-scoped, rate-limited) so agent.md edits apply.
- Internal settings API accepts non-secret TTS/STT patches via
dedicated partial schemas.
- Strip the generated agent persona from opencode.json on repair so
user-customized agents are preserved across config recovery.
- Cache the last assistant session id to avoid redundant session
listing on launch.
* style(repo): align worktree and workspace tabs with primary/orange theme
Remove packages/memory from monorepo - plugin now lives at
chriswritescode-dev/opencode-memory and is installed from npm.
Update Dockerfile, docs, and workspace config to reflect the change.
Remove Dockerfile.kasm, kasm-startup.sh, and Kasm CI workflow.
- Update KV TTL from 24 hours to 7 days in memory.md
- Add AUTH_SECRET setup to Docker quickstart in installation.md
- Rename ralph to loop in docs and config.jsonc
- Add deprecation note for ralph.* prefix
- Fix test description in CONTRIBUTING.md
- Clarify skills path in skills.md
- Update setup-dev.sh to use curl install method
- Add memory-kv-delete documentation
- Add stallTimeoutMs to default config example
- Fix documentation drift across README, AGENTS.md, and CONTRIBUTING.md
- Update Docker configuration with process timing and OAuth env vars
- Simplify shared env config by removing unused Redis and OpenCode API URL
- Add skills documentation to navigation
- Improve .env.example with clearer AUTH_SECRET instructions
* feat: discover local repos and reconnect OpenCode sessions
Replace one-by-one local repo setup with parent-folder discovery and path-aware repo linking so first-time installs can recover existing OpenCode chats. Add first-run import support and onboarding docs for standalone OpenCode users, including Docker path-matching guidance.
* fix: address session discovery review feedback
* fix: improve delete/unlink messaging for local vs cloned repos
* feat: discover local repos and reconnect OpenCode sessions (#158)
---------
Co-authored-by: itz4blitz <justinscroggins@outlook.com>
Co-authored-by: itz4blitz <60281870+itz4blitz@users.noreply.github.com>
* refactor storage to use worker-based vector operations
* update memory service and agent implementations
* update opencode plugin sdk
* update memory plugin documentation
* add tests for memory service and injection hook
* update lockfile for dependency changes
* Add memory plugin v0.0.13 with message deduplication and config UI
* Remove planning state feature from memory plugin
* Add executionModel feature and refactor CLI into modular commands
- Add executionModel config option to memory plugin for specifying AI provider/model
- Refactor monolithic CLI into modular commands: export, import, list, stats, cleanup
- Add model selector UI with connected providers and recent models
- Add showClear prop to Combobox component
- Update documentation and bump version to 0.0.10
* Update execution model placeholder text
* Update docs with new CLI commands and ocm-mem binary usage
* Bump version to v0.9.06
* Add executionModel field to default config