Commit Graph
229 Commits
Author SHA1 Message Date
Chris Scott 68f67327fc chore(opencode): move the OpenCode pin and supported floor to 2.4.2 2026-11-28 20:14:02 -05:00
Chris Scott 99b8d854d4 Keep voice mode listening after empty sends and transcription errors, and let failed sends be resent 2026-11-27 22:49:47 -05:00
Chris Scott 23d9d1c945 Move the OpenCode pin and supported floor to 2.3.0 2026-11-17 14:02:14 -05:00
Chris Scott 80e013ec81 Scope goal reads to the session directory and stabilize the background activity tests 2026-11-13 19:47:13 +00:00
Chris Scott b625acfc0c chore(lint): replace ESLint with Oxlint and clear anti-slop findings 2026-11-13 01:13:34 -05:00
Chris Scott 5ee0628fa5 chore(themes): regenerate OpenCode theme palettes from v2.2.5
PR #481 moved OPENCODE_PINNED_VERSION to 2.2.5 but left the generated palettes on an older tag. Rerun pnpm themes:sync against v2.2.5 and update the license attribution. Only colour values change, mainly the Catppuccin light variants.
2026-11-06 09:57:24 -05:00
Chris Scott bf7c6cdbac fix(opencode): address review feedback on the 2.2.5 pin
Document ocm 0.6.x as requiring OpenCode 2.2.5, matching its
@opencode/theme peer, and make the package compatibility test check
bounded peer ranges instead of treating them as one version.

Linked servers on another 2.x release keep the neutral version notice,
while a different major version is shown as unsupported again through
a shared version badge.

The Docker build now fails when the bundled OpenCode is below the
supported minimum, and the entrypoint falls back to the bundled version
as the floor when OPENCODE_MIN_VERSION is unset instead of discarding
every persisted binary.
2026-11-06 09:43:35 -05:00
Chris Scott 807c7cb896 chore(opencode): move the OpenCode pin to 2.2.5 from a workspace catalog
Manager builds against and requires OpenCode 2.2.5. Every @opencode
package, plus effect and the OpenTUI/solid dependencies they share,
resolves from one pnpm workspace catalog instead of separate pins.

The built-against version and the supported floor are now separate
settings, so a future OpenCode release can move the pin before raising
the floor. Docker and the dev setup script read the floor from its own
argument.

ocm-cli moves to 0.6.0 on the same 2.2.5 and OpenTUI 0.8 baseline. A
linked server on a different version is still connectable and now shows
a neutral version notice instead of an unsupported badge.
2026-11-06 09:26:56 -05:00
Chris Scott 0cecd4b364 chore(shared): publish @opencode-manager/shared to npm
Make the shared package public and publish it from the existing release workflow alongside ocm-cli so the mobile app can install it from npm instead of a pinned git commit.
2026-11-05 21:34:54 -05:00
Chris Scott 6297403a41 docs: document the OpenCode client migration surfaces (OM-179)
Adds JSDoc comments to the functions this branch adds or changes, so the touched-code docstring coverage clears the review threshold. Comments only; no code, formatting or import changes.
2026-11-05 16:32:43 -05:00
Chris Scott 8a6fd56e9a fix: keep config references on save and apply review batch 2 fixes (OM-179) 2026-11-02 23:21:33 -05:00
Chris Scott 49bb4ebd36 loop: om-179-finish-adopting-op completed after 19 iterations 2026-11-02 13:13:31 -05:00
Chris Scott 717536c5a6 section 12: Phase 12: One shared flattened stream event type; delete the 2026-11-02 11:34:45 -05:00
Chris Scott 0b2303a870 section 11: Phase 11: Assistant Mode writes v2 config; remove the hand-w 2026-11-02 11:20:39 -05:00
Chris Scott 6578e11eeb section 8: Phase 8: Managed effective config read through api.config.ge 2026-11-02 10:36:56 -05:00
Chris Scott 48ca38c4e3 section 6: Phase 6: Config.Info validation owner and v2 config types in 2026-11-02 10:23:14 -05:00
Chris Scott 65066ab0dc feat(schedules): per-schedule switch to keep runs out of the inbox and notifications 2026-10-30 13:11:35 -04:00
Chris Scott 5db74e3fa7 fix(goals): validate the goal RPC output before returning it 2026-10-30 01:03:14 -04:00
Chris Scott cbe92c92ad refactor(goals): replace the Manager session-goal API with OpenCode built-in /goal 2026-10-29 12:38:39 -04:00
Chris Scott 50d920fe6c chore(release): bump manager to 1.1.0 and ocm-cli to 0.4.1 2026-10-25 18:32:07 -04:00
Chris Scott 82c46bbdb2 Merge pull request #469 from chriswritescode-dev/feat/schedules-sandbox
feat(schedules): run scheduled jobs in a per-job sandbox microVM
2026-10-25 16:44:02 -04:00
Chris Scott 070cb2f729 feat(schedules): run scheduled jobs in a per-job sandbox microVM 2026-10-25 14:49:38 -04:00
Chris Scott 8747cfece9 fix(notifications): phrase permission labels without losing acronyms
The always-allow summary interpolated the raw action id ("always allow
shell") while every other surface shows the label ("Run Command"), and
the permission dialog lowercased the whole label, turning "Fetch URL"
into "fetch url". getPermissionPhrase lowercases each word of the label
unless it is all caps, and both the scope summary and the dialog
question use it.
2026-10-25 11:20:21 -04:00
Chris Scott 6e398c4d40 fix(device-pairing): clean up push subscriptions on admin reset and share URL helpers
The admin password reset finds the admin case-insensitively and deletes the push subscriptions of the sessions it ends. The app re-sends its push subscription once per signed-in session so revoke reaches re-signed-in devices, and the upsert keeps the stored device name. Plain-HTTP and URL parsing checks are shared helpers.
2026-10-24 19:26:21 -04:00
Chris Scott b9d8d18124 fix(device-pairing): refuse to mint pairing codes from an address that cannot pair
A loopback origin in production or plain HTTP on a public address still
minted a code and showed a browser QR no other device could use.

- one availability rule decides untrusted, loopback and public plain-HTTP
  origins; POST /api/device-pairing/links checks it before minting
- GET /api/device-pairing/availability reports the rule for the page origin
  without minting
- Connect a device disables "Show QR code" and explains the fix when the
  address cannot pair
- private-network plain HTTP keeps the browser QR; the app QR still needs
  the toggle
2026-10-24 19:26:21 -04:00
Chris Scott f8e4cfe136 feat(device-pairing): pair phones and browsers with a QR code
Settings -> Account gets "Connect a device", a paired-devices list, and a
remote access headers editor, so the mobile app and other browsers can sign
in without typing a password and pass a reverse proxy such as Cloudflare
Access.

- one-time pairing codes (3 min TTL) minted by a Better Auth plugin and
  redeemed into a new session that records the device name
- POST /api/device-pairing/links builds the ocm://link app link with the
  stored headers as h= parameters and a browser /pair link; plain-HTTP and
  loopback origins are blocked or warned about
- remote access headers are stored encrypted, returned by name only, and
  validated (8 headers, 512-char values, 1800 encoded characters, reserved
  transport names blocked); a Cloudflare Access service token preset fills
  CF-Access-Client-Id and CF-Access-Client-Secret
- login offers "Sign in with QR code" and /pair redeems a scanned code,
  returning to the login redirect target
- revoking a device deletes its session, closes its live connections and
  removes its push subscriptions; the current session cannot be revoked
2026-10-24 19:26:21 -04:00
Chris Scott 3e51280894 fix(secrets): forward only planned variables into the sandbox and cache repo env resolution
The sandbox shim forwards only the plan's pinned names, so turning sandbox Git credentials off withholds tokens. Sandboxed shells resolve repo env once, terminals on linked servers get no local env, mapping keys cannot override git credentials, masks are kept per directory, and directory resolution is cached. A legacy gh-env alias keeps adopted OpenCode processes working for one release.
2026-10-23 23:47:44 -04:00
Chris Scott e0331b43bf feat(secrets): repository secrets and variables injected into agent shells and terminals
Add a GitHub Actions-style store for secrets and variables so tests can read
credentials from the environment without .env files in the repo.

- secrets table keyed by kind, repo (NULL for global) and environment;
  secrets are encrypted with encryptSecret and write-only, variables are plain
  text. Names follow GitHub's rules and reject Manager-reserved names.
- Global (/api/secrets, /api/variables) and repo
  (/api/repos/:id/secrets|variables) routes.
- The trusted .ocm/project.json gains environment and env fields that map
  names to ${{ secrets.X }} / ${{ vars.X }} expressions. Both are part of the
  trust hash; files without them hash as before, so existing trust survives.
- RepoEnvService.resolveForDirectory resolves the repo and approved mapping
  for any directory, including worktrees outside the repo folder, with
  environment > repo > global precedence. It never throws.
- /api/internal/shell-env replaces /git-credentials/gh-env and feeds the
  ocm-gh-env plugin, the sandbox shell plan and TerminalService.create.
- The plugin masks injected secret values as *** in completed tool results.
- The sandbox shell plan is now the only source of the guest environment: the
  plugin pins OCM_SANDBOX_FORWARD_ENV and the shim forwards only those names.
2026-10-23 22:59:57 -04:00
Chris Scott 20017d2f7d chore(opencode): move the typed OpenCode SDK to the 2.1.2 pin
The runtime pin moved to 2.1.2 while @opencode/client stayed at 2.0.15, so
the shared typed contract no longer matched the server.

- @opencode/client and @opencode/plugin move to 2.1.2
- session projection follows the 2.1 event shape (native replaces
  providerState and state, compaction drops recent)
- worktree error stubs carry the _tag discriminator
- the contract test fails when the SDK version drifts from the pin
2026-10-23 15:45:36 -04:00
Chris Scott 0c4c024dcc fix(settings): validate git identity emails only on the request path
A stored identity email that failed the stricter rule made every settings
read fall back to defaults, and the next save persisted that reset.

- the stored preferences schema accepts any email string again
- PATCH /api/settings rejects an invalid gitIdentity or gitIdentities email
  with a field path, and saves the trimmed address
- the rule accepts local hosts such as root@localhost
2026-10-23 15:45:36 -04:00
Chris Scott 19b52ecd58 chore(opencode): move the pinned OpenCode version to 2.1.2
The supported floor is derived from the pin, so this raises the accepted
range to >=2.1.2 <3.0.0 for the bundled image, managed installs, and the
version check that gates startup.

- Dockerfile ARG OPENCODE_VERSION and the shared pin move together
- CI e2e installs 2.1.2 instead of 2.0.24
- contract, installer, manager, registry and settings fixtures follow the new
  floor, keeping their below-floor and wrong-major rejection cases
2026-10-23 14:41:48 -04:00
ioplex dabe750920 fix: key auth rate limiting on the socket address only and clear sent drafts after unmount
- auth: drop the AUTH_TRUSTED_PROXY_HEADERS opt-in. Configured headers were
  trusted from any peer, so direct access to the published port could still
  rotate them. Better Auth now reads only the Manager-set socket address
  header; the env, compose forwarding, docs and tests are removed.
- composer: a send that completes after the composer unmounted (session
  switched mid-send) left the submitted text in the per-session draft store.
  Sends now complete through mutateAsync and clear the stored draft only if
  it still matches what was submitted, so newer edits are kept.
2026-10-23 12:49:53 -04:00
ioplex 4ec62cd4e7 fix: address findings from the full Docker evaluation of main
Critical and high:
- repos: unlinking a local repo removes only the Manager reference and alias,
  never the repository files; confirm button reads "Unlink"
- auth: rate-limit by the socket address; trust proxy headers only when
  AUTH_TRUSTED_PROXY_HEADERS is set (documented and forwarded in compose)
- composer: per-session in-memory drafts (text, bash mode, attachments);
  Escape no longer clears the prompt
- url params: compose same-tick updates so schedule dialogs stay closed after
  create/delete; delete dialog names the job

Medium:
- tool rows show failures (non-zero shell exit, failed exploration members)
- voice conversation shows the specific error and a starting state
- settings: Escape in dropdowns and the shortcut recorder no longer closes
  the dialog; mobile deep links open the requested section; one content tree
  per platform
- closing pushed sheets, settings, tool panels and schedule dialogs goes back
  in history
- login returns to the requested page; signed-out pages make no
  authenticated requests
- action terminals keep their output (Manager-side output capture and replay)
- unpushed-commit detection, commit message kept on failure
- binary files with unknown extensions are detected and not editable
- tool panel resizes when docked and floats as a dismissible sheet when the
  page is too narrow
- Docker image runs tini as PID 1

Low: not-found states, add-repo and branch validation errors (4xx),
search-aware empty states, mobile repo sort/filter/select cues, sidebar
resize affordance and collapse shortcut, mobile unread badge, preview port
filtering, terminal close handling, walkthrough empty state and helper
session filtering, placeholder contrast, permission labels and focus,
TTS task-list sanitizing, git identity email validation, quieter git
logging, hermetic worktree tests, and accessible names for icon-only
controls.
2026-10-23 11:42:37 -04:00
Chris Scott 73af7aec89 fix(frontend): address CodeRabbit review findings on voice conversation mode
Report STT start and capture failures instead of staying on Listening, treat a failed reading as an error, skip replies with no readable text, stop auto-play replaying a reply voice mode already read, focus the text box after Edit in text box, and strip think blocks before text reaches TTS.
2026-10-22 20:36:01 -04:00
Chris Scott 5d8b2c9445 feat(frontend): hands-free voice conversation mode in the composer
The mic opens a voice loop that listens, sends on end of speech, reads each completed reply and reopens the mic when the agent is idle. The phase reducer, pause options and voice-mode instruction move to the shared package. TTS gains per-message completion and pause/resume. The old tap-and-drag recorder, its strip and its CSS are removed.
2026-10-22 20:18:16 -04:00
Chris Scott 2106722c07 fix(shared): import jsonc-parser ESM entry
Align with ocm-cli's import so shared resolves the ESM build and its
types consistently under Bun and Vite bundling.
2026-10-20 00:25:17 -04:00
Chris Scott 24745597f2 Merge remote-tracking branch 'origin/feat/linked-opencode-servers' into feat/remote-server-automation
# Conflicts:
#	frontend/src/lib/navigation.test.ts
2026-10-19 11:37:57 -04:00
Chris Scott 1659664d53 fix(servers): test edited server URLs with the stored password
Test always checks the draft URL. When the password is left blank, the stored password is reused only if the draft URL has the same origin as the saved server.
2026-10-19 11:37:40 -04:00
Chris Scott 5586120ba2 fix(servers): guard stored credentials and reconcile remote session status
Reject a server address change to a new origin unless a password or
pairing is supplied, so the stored password is never sent to another
host. Test connection now checks the edited values and warns when an
origin change needs credentials. Replay and reconcile remote session
statuses on stream reconnect and browser resync so linked-server
sessions no longer stay busy. Treat malformed server session URLs as
not found instead of throwing.
2026-10-18 21:53:19 -04:00
Chris Scott 780d31087b Merge remote-tracking branch 'origin/feat/linked-opencode-servers' into feat/remote-server-automation
# Conflicts:
#	backend/src/services/remote-server-events.ts
#	frontend/src/components/navigation/MoreDrawer.test.tsx
#	frontend/src/components/navigation/moreDrawerItems.test.ts
#	frontend/src/lib/opencode-event-stream/openCodeEventStream.ts
#	frontend/src/pages/SessionDetail.tsx
#	frontend/src/pages/__tests__/SessionDetail.remote.test.tsx
2026-10-18 20:53:23 -04:00
Chris Scott f566556fd6 feat(servers): harden pairing and run linked-server sessions in the UI
Replace the plaintext pairing exchange with a nonce and HMAC proof plus
AES-256-GCM encrypted credentials, bumping links to v2. Track session
ownership per linked server so activity, session picker, transcript, MCP
and skills views work against remote servers. Share encrypted secret
access, event routing and URL helpers across backend, shared and CLI.
2026-10-18 20:27:34 -04:00
Chris Scott a9bdb8358f feat(servers): run Manager automation on linked servers 2026-10-19 00:06:34 +00:00
Chris Scott c591c15743 feat(servers): link remote OpenCode servers with QR pairing 2026-10-18 22:35:39 +00:00
Chris Scott 9075ab1101 chore(release): bump manager to 1.0.1 2026-10-16 17:33:07 -04:00
Chris Scott 33d9523666 Merge pull request #436 from chriswritescode-dev/feat/activity-switcher
feat(activity): surface active work across the session picker, tool rail and mobile
2026-10-16 12:48:52 -04:00
Chris Scott 84cdffa261 fix(activity): roll subagent activity up to its root and accept only selectable windows
- List child sessions in the activity query and credit each child's latest update
  to its root, so Recent includes roots whose subagents were active inside the
  window; children never become rows, and only roots of in-window children are
  fetched
- Show and sort activity rows by that rolled-up time
- Restrict activityWindowMinutes to the selectable options on write, and coerce a
  stored unknown value to the default on read so it cannot reset every preference
2026-10-16 11:57:52 -04:00
Chris Scott d8f2fcf29c feat(activity): surface active work across the session picker, tool rail and mobile 2026-10-16 00:54:06 -04:00
Chris Scott 0b637cadf4 feat(walkthrough): build the change walkthrough in a spawned agent session
Replace the fixed, stop-based walkthrough with an agent-built one. Every
request (Generate, Update, Regenerate, /walkthrough, the multi-run button
and the agent's open_walkthrough) now spawns a separate walkthrough
session. That session reads the diff through a new walkthrough_changes
action, writes one self-contained HTML file into a Manager-owned
directory, and calls publish_walkthrough; the panel renders the file in a
sandboxed frame shared with the inline artifact card and the file browser
HTML preview.

Publication marks the walkthrough ready while execution is tracked
separately, so Stop, the 15-minute limit, polling, refine gating and
interruption when the target session is deleted follow the agent instead
of the first publish. One diff copy is reused per run. Regenerate
interrupts the previous session and removes its output directory.

Walkthrough sessions are kept and listed, with their completion and error
push notifications muted. The stop pipeline, its wire schemas and the
concurrency limiter it used are removed.
2026-10-16 03:58:31 +00:00
Chris Scott b21fdf5b94 feat(sandbox): per-session sandbox VMs with resource settings and provider arbitration
- Sandbox new root sessions by default with a per-session composer toggle;
  child sessions inherit their root session's mode (OM-82)
- Run each sandboxed root session in its own microVM that mounts only the
  session's repository, with per-session CPU/memory overrides, Settings
  defaults, idle stop, and a cap on running VMs (OM-89)
- Arbitrate shell sandboxing with other plugins (opencode-forge) through the
  shared opencode.sandbox-arbiter.v1 registry so exactly one provider
  sandboxes each call regardless of load order; fail closed on claim errors
- Throw when another plugin rewrites a pinned sandbox shell setting
- Tag sandboxed tool results with the owning provider and show it in the badge
- Hint the agent to start Docker inside the VM only when OCM owns the session
2026-10-15 16:53:49 -04:00
Chris Scott ccdf75d803 Merge pull request #429 from chriswritescode-dev/feature/mobile-friendly-replies
feat(chat): tailor replies for mobile and text-to-speech
2026-10-15 16:45:28 -04:00