Commit Graph
1241 Commits
Author SHA1 Message Date
Chris Scott a0d1d91f18 fix(secrets): target the scope index in the secrets upsert
A bare ON CONFLICT DO UPDATE fires on any unique constraint violation; naming idx_secrets_scope keeps a future constraint from silently redirecting the update.
2026-10-23 22:59:57 -04:00
Chris Scott e46cf516c5 test(e2e): cover repository secret injection, masking and the Secrets panel
Against a real Manager and OpenCode server, with the shared mock
OpenAI-compatible provider:

- mapped values are absent from OpenCode shells while .ocm/project.json is
  untrusted and present once it is trusted;
- repo terminals receive them;
- an agent shell tool call that prints the secret is recorded as ***;
- the Secrets panel lists secrets by name without revealing values.

The shared mock provider can now script tool-call turns (setResponder) and
bind an ephemeral port (startMockProvider() exposes port), so specs no
longer have to reserve a fixed port.
2026-10-23 22:59:57 -04:00
Chris Scott 2884e68a69 feat(secrets): secrets and variables UI and env mapping in trust review
Add a Secrets manager for global values (Settings > Secrets and variables) and
repo values (Secrets tool panel and dialog), with environment scoping,
write-only secrets and copyable ${{ }} references. The trust review for
.ocm/project.json lists the environment and each mapped variable with the
expression it resolves from.
2026-10-23 22:59:57 -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 b431c121a2 test(e2e): start the E2E backend with only the variables the suite defines
The E2E backend inherited the caller's environment and Bun auto-loaded .env
files from the repo root, so local credentials and host variables could leak
into the run. server.sh now launches the backend with env -i, passing PATH and
only the keys from createServerEnv (E2E_SERVER_ENV_KEYS), runs bun with
--no-env-file, and starts it from a scratch directory with a frontend symlink
so no .env file is in reach.
2026-10-23 22:44:22 -04:00
Chris Scott 2e31cb45ba Merge pull request #460 from chriswritescode-dev/fix/eval-findings-2026-10-23
fix: resolve issues found in a full desktop and mobile evaluation
2026-10-23 16:24:32 -04:00
Chris Scott ac9e584448 fix(terminal): limit output capture to action terminals and release them by handshake
- only action and setup terminals get a hub; shells use the shared bridge
  and keep OpenCode's full replay
- upstream close 1000 or 4404 ends the stream with that code; any other
  close fails the hub with 1011 so viewers reconnect through the bridge
- each connect attempt times out, and pre-open input overflow closes with
  1013 instead of dropping keystrokes
- deferred commands wait for a release line instead of sleeping; the hub
  sends it once on open, and the bridge fallback sends it if the hub failed
2026-10-23 15:45:36 -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 d089dde466 chore(frontend): drop the new JSDoc from the TTS playback helpers
The repository keeps code self-documenting, and the helper names and the
voice flow call sites already describe what unlock primes.
2026-10-23 14:59:09 -04:00
Chris Scott 22ee356c10 test(e2e): expect the login redirect to carry the requested path 2026-10-23 14:41:48 -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
Chris Scott 36a5693b5c fix(frontend): float one jump-to-latest button above the composer
Match the mobile app: while the transcript is scrolled up, show a centered
round button above the composer instead of swapping the mobile composer tools
button for an arrow and hiding the desktop arrow when the prompt has text.

The composer tools menu now stays available on mobile at all times, and the
desktop in-composer arrow is gone.
2026-10-23 14:20:57 -04:00
Chris Scott 67cfd862b1 fix(tts): let voice mode read replies aloud on iOS
iOS rejects play() outside a user gesture unless the same media element was
already played inside one. Each chunk used a new Audio element, so replies in
voice mode failed with "Reading the reply failed".

- reuse one audio element for all external TTS playback
- add tts.unlock(), which plays a short silent clip on that element, and call
  it from the voice mode start and orb taps
- route every playback failure through failPlayback(message) and pass the
  message to onEnd so voice mode shows the underlying reason
- report a blocked play() as "Audio playback was blocked by the browser"
2026-10-23 14:08:33 -04:00
Chris Scott 10190940bd fix(stt): accept speech endpoints configured with a trailing /v1
An endpoint saved as http://host/v1 was turned into /v1/v1/audio/transcriptions
and every transcription returned 404. Strip a trailing /v1 when deriving the
server base URL, which also covers TTS and model discovery.
2026-10-23 14:08:33 -04:00
Chris Scott 811c22c7ec refactor(frontend): use async/await for composer send completion 2026-10-23 13:06:24 -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 1c22ef6ea1 Merge pull request #459 from chriswritescode-dev/feat/voice-conversation-mode
feat(frontend): hands-free voice conversation mode in the composer
2026-10-22 22:13:03 -04:00
Chris Scott 73de3db7f6 fix(frontend): keep external-provider dictations from aborting mid-turn 2026-10-22 22:10:48 -04:00
Chris Scott a5694d874f refactor(frontend): isolate voice conversation from the memoized composer re-renders 2026-10-22 21:58:13 -04:00
Chris Scott be98d94459 Merge pull request #458 from chriswritescode-dev/feat/mobile-home-add-repo-button
feat(frontend): move the mobile add-repo action into the search row
2026-10-22 21:33:13 -04:00
Chris Scott 95cd276e37 fix(frontend): keep voice mode listening for the full no-speech window
Chrome raises its own no-speech error after a few seconds of silence and sometimes ends a recognition session by itself. While voice mode is endpointing, restart recognition transparently against one fixed no-speech deadline, send captured words when Chrome ends a session after speech, and bound restarts so a failing recognizer surfaces an error instead of leaving the bar on Listening.
2026-10-22 21:31:47 -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 6ac264f9d0 test(frontend): cover RepoList empty-state add action
Asserts the empty-state Add repository button calls onAddRepo once, the only add path left on mobile after the header action became desktop-only.
2026-10-22 09:30:07 -04:00
Chris Scott 739f4d3d5c feat(frontend): move the mobile add-repo action into the search row
The header ran out of room on narrow screens now that the server switcher is
always present. The Repo button is desktop-only and mobile gets a bordered
icon button beside the search input instead. The empty state carries its own
add button, since it renders no search row.
2026-10-22 09:20:24 -04:00
Chris Scott 80ef211a94 Merge pull request #457 from chriswritescode-dev/feat/plain-log-transcript
feat(frontend): restyle the session transcript as a plain log with collapsible tool details
2026-10-22 00:12:18 -04:00
Chris Scott 9319579150 fix(frontend): queue TTS auto-play per step instead of cutting each off
The auto-play hook returned early whenever the last assistant message was
still streaming, before it could record that a reply had started, so the
first reply in a fresh session was never spoken. Remove that input and rely
on the message's own completion state.

Auto-play now speaks every completed assistant step and queues steps that
arrive during playback, resuming after a short pause, rather than
interrupting the audio in progress. Manual playback and stop still interrupt
and clear the queue.
2026-10-22 00:08:11 -04:00
Chris Scott 276bc1b920 fix(frontend): address CodeRabbit review findings on the transcript branch
- wrap long retry errors instead of truncating them
- keep the server switcher in the home header for the local server too
- accept trailing-slash session detail routes in isSessionDetailRoute
2026-10-21 23:41:12 -04:00
Chris Scott 8d8960849e fix(frontend): open the more sheet on right-edge swipe in linked-server sessions
The swipe gate only matched local session URLs, which predates linked
servers, so the gesture never fired on /servers/<id>/sessions/<id>.
2026-10-21 23:28:01 -04:00
Chris Scott cbdd252d7a feat(frontend): switch servers from the home page header
Replace the read-only connection status with the server switcher, so the
header names the selected linked server and can change servers in place.
2026-10-21 23:14:12 -04:00
Chris Scott c4bb104cc0 fix(frontend): reveal transcript actions on focus and bound the shell preview
- expose the user message action buttons to keyboard focus, not just hover
- compute the shell preview tail once per output change and clamp very long lines
2026-10-21 23:14:12 -04:00
Chris Scott d8495df811 fix(frontend): keep transcript display settings working with the plain log layout 2026-10-21 22:26:33 -04:00
Chris Scott 8004496f10 feat(frontend): restyle the session transcript as a plain log with collapsible tool details 2026-10-21 21:42:11 -04:00
Chris Scott ac0e5d6fa0 Merge pull request #456 from chriswritescode-dev/feat/mobile-in-row-recorder
feat(frontend): in-row mobile voice recorder and reliable session scroll
2026-10-21 14:22:51 -04:00
Chris Scott d154d56645 fix(frontend): delay and de-duplicate desktop sidebar tooltips 2026-10-21 14:20:03 -04:00
Chris Scott 095d3a6b37 fix(frontend): keep the discard release from restarting the mic and let reduced motion stop the wave animation 2026-10-21 14:20:03 -04:00
Chris Scott 99cc8a7f24 fix(frontend): raise the mobile composer controls to 44px 2026-10-21 14:13:29 -04:00
Chris Scott a2ae98107d feat(frontend): replace the mobile voice overlay with an in-row recorder 2026-10-21 14:07:10 -04:00
Chris Scott 577d7e8b5b fix(sessions): scroll to the latest message once the transcript is ready 2026-10-21 14:07:10 -04:00
Chris Scott 055e4bbf55 Merge pull request #454 from chriswritescode-dev/feat/composer-layout-refresh
feat(frontend): composer layout refresh and activity scanner under the composer
2026-10-21 13:26:56 -04:00
Chris Scott 160770396f fix(frontend): lift the mobile composer row clear of the rounded screen corners and match the agent and model control height 2026-10-21 13:26:20 -04:00
Chris Scott 570e528ba1 feat(frontend): dock the mobile composer as a solid full-width strip and enlarge the mic and tools buttons 2026-10-21 13:08:43 -04:00
Chris Scott 32102cca3e fix(frontend): anchor the mobile activity scanner just below the composer controls 2026-10-21 13:01:48 -04:00
Chris Scott 648713268d feat(frontend): consolidate composer controls at 36px and repaint the activity scanner in CSS 2026-10-21 12:40:34 -04:00
ioplex 76d52b3550 feat(frontend): move send to the input and show key bar in the controls row
- Place Send/Queue/View at the end of the textarea and hide Send when the draft is empty
- Keep the model picker visible on mobile while a session is active
- Keep the mobile mic in the controls row alongside Send
- Show the /, @, ! keys in place of the agent/model selectors while focused on mobile
- Compact the mobile controls row while the prompt is focused
2026-10-21 12:40:34 -04:00
ioplex 332fb07f45 feat(frontend): move session activity scanner under the composer
- Keep the model picker visible while a session is active
- Render a full-width segmented scanner below the composer via shared ScannerBars
- Reduce SessionStatusIndicator to the list-row spinner
2026-10-21 12:40:34 -04:00
Chris Scott e8adbb3e65 Merge pull request #455 from chriswritescode-dev/fix/auth-security-updates
fix(auth): update auth stack and remove token logging
2026-10-21 11:45:45 -04:00
Chris Scott 993a635ce0 fix(auth): make session revocation immediate
Deleting session rows did not end a session while the 5 minute cookie
cache served the signed cookie without reading the database, so an admin
password reset left the old session usable. Drop the cache so session
state is always authoritative, and cover revocation with a test.
2026-10-21 15:18:50 +00:00