Skip to content

feat(workspace): offer OmO in the new-session dialog - #163

Merged
devswha merged 3 commits into
mainfrom
feat/new-session-omo
Sep 29, 2026
Merged

devswha merged 3 commits into
mainfrom
feat/new-session-omo

Conversation

@devswha

@devswha devswha commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Change

The new-session dialog listed every kind herdr's agent.start supports, and omo is not one of them (herdr agent start --kind accepts pi, claude, codex, … but no omo), so OmO could not be picked.

  • GET /api/agents adds { kind: "omo", label: "OmO" } when omo is on this server's PATH (Bun.which), so it is offered only where it can run. Remote PCs answer from their own bridge, so each PC decides for itself.
  • POST /api/workspace/create with agent.kind === "omo" calls the new startOmo (server/omo.ts) instead of agent.start. It types omo plus the shell-quoted args into the new root pane's shell with pane.send_text, then polls pane.process_info every 250 ms until an omo process is in the foreground. The deadline is 60 s, the same bound as agent.start and the dialog's "up to 60s". On timeout the response is the usual agent_started: false with error.code: "agent_start_failed", and the workspace is kept.
  • Every other kind still goes through agent.start unchanged. No client change: the picker already renders the omo mark.
  • The protocol doc comments and the demo's agents fixture include omo.

Validation

  • bun run typecheck: pass
  • bun test ./server/omo.contract.test.ts (isolated herdr): 3 pass. The new test starts a stand-in omo through a real pane's shell, checks that an argument with a quote arrives as one argv word, and checks that a command which never becomes omo rejects at the deadline.
  • bun test ./server/api.contract.test.ts -t 'agent kinds|workspace': 5 pass. The agent list is still sorted by label with omo in it.
  • End to end on the isolated herdr with the real omo 5.1.0, through a throwaway test file that was deleted afterwards: GET /api/agents listed {"kind":"omo","label":"OmO"}, and POST /api/workspace/create {agent:{kind:"omo"}} answered 200 agent_started: true in 757 ms with omo's bun …/senpi/dist/bundle/cli.js as the pane's foreground process.

Merging this and #162 in either order leaves a small CHANGELOG conflict under [Unreleased].

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6f11c445-b133-492e-8183-89cae2ffc013

📥 Commits

Reviewing files that changed from the base of the PR and between 9908843 and 1b99be2.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • server/index.ts
  • server/omo.contract.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features
    • Added OmO as an agent option in the new-session dialog when it is installed on the server.
    • Selecting OmO starts it in the new session’s shell, and the dialog waits for it to launch before continuing.
    • OmO launch attempts now report an error if the agent does not start within the allowed time.
    • Arguments supplied when starting OmO are preserved, including those containing spaces or apostrophes.

Walkthrough

The server lists OmO when omo is available on its PATH. When a workspace requests OmO, the server types the command into the root pane shell and waits for OmO to appear among the pane’s foreground processes.

Changes

OmO Agent Support

Layer / File(s) Summary
Shell startup and process detection
server/omo.ts, server/omo.contract.test.ts
startOmo sends a quoted command through the pane shell and polls foreground processes until OmO starts or the timeout expires. Tests check argument handling and timeout behavior.
Agent discovery and workspace routing
shared/protocol.ts, server/index.ts, site/demo/fixtures/agents.json, CHANGELOG.md
The server advertises OmO when omo is available and uses startOmo for OmO workspace requests. Protocol descriptions, the demo fixture, and the changelog document the changes.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: yoonwoo-ha

Merge Risk: ⚪ Minimal · up to 1b99b

The OmO option is scoped to the selected PC, and a startup timeout retains the workspace and returns the existing failure response. No confirmed material issue blocks merging.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to 1b99b

The new launcher can report a failed start without confirming that the launched process has stopped. Existing access controls remain in place, but the resulting workspace and process lifecycle warrants review.

Retained concerns

  • Medium · security · inferred: A startup failure does not establish that shell-launched OmO has stopped: process-info failures or delayed startup can leave a running process in a retained workspace after the API reports agent_started: false.
  • Low · reliability · inferred: Sequential workspace creation, shell delivery, and polling can outlast the remote proxy's 75-second limit, leaving the caller without the workspace identifier needed for direct cleanup. Whether a timed-out request cancels downstream work is unverified.
Security review details

Security Blast Radius

  • inferred — The new execution path reaches a pane shell on the selected server, under that server's workspace authority. The examined routing does not show an expansion to arbitrary target URLs or unauthenticated callers.

Security Findings and Attack Paths

  • inferred — An authorized launch can reach the shell, then lose startup confirmation when process-info fails or the request expires. The code can report failure without confirming termination; execution of tools or access to particular assets by such a process was not established.

Trust Boundaries and Controls

  • observed — The HTTP authentication gate, machine proxy target restrictions, string-array validation, and shell quoting remain controls on this path. Equivalence between pane-shell authority and agent.start policy cannot be determined from the available service-side evidence.

Resilience and Maintainability Implications

  • inferred — Neither process-name readiness nor the failure response correlates a particular process with this launch attempt. A retained workspace permits later inspection, but does not itself provide cancellation or proof of process ownership.

Hardening Proposals

  • proposed — Bound the entire create-and-launch operation to the response deadline, and establish a process-correlated outcome or explicit cleanup policy before treating a timed-out launch as stopped.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: offering OmO in the workspace new-session dialog.
Description check ✅ Passed The description includes both required sections, explains the behavior and implementation, and lists relevant typecheck, contract-test, and end-to-end validation results. It does not include the reque…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@devswha
devswha merged commit 346f4ee into main Sep 29, 2026
9 checks passed
@devswha
devswha deleted the feat/new-session-omo branch September 29, 2026 15:27
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