Adom Bridge
Public Made by Adomby adom
Adom Bridge unleashes your AI onto your full PC: full power, full safety. The AI breaks out of the container it runs in and onto your real machine, managing and running your entire laptop as you: launch apps, move files, drive any window, control KiCad, Fusion 360 or your real signed-in browser. Works with any AI, cloud or local (Claude Desktop, Claude Code, Codex), no Hydrogen required. Bridge and its bridges are an operating system for AI, with managed Node and Python runtimes, and a human-onl
Let AI callers choose job-ID or streaming responses with approval and completion events
Environment: Codex Astra in Adom Hydrogen, running from a Linux/WSL2 container through the relay to AdomLapper (Windows). Last observed UI versions in this session: Hydrogen 1.0.210 and Adom Bridge 2.1.43; these are session observations, not newly verified version readings. Live AB status confirms the Windows target is reachable.
Please let the calling AI choose immediate job-ID responses or an open event stream over the same operation lifecycle. Preserve today's request/response behavior when the option is omitted.
The concrete problem: a requested Hydrogen window resize through run_script returned errorCode: needs_approval and run_script needs shell approval, and only the USER can grant it (shell approval is human-only). The AI received this immediately, but had no automatic indication of a later approval change. The user had to tell it to retry. Long-running bridge work has the same need for progress and completion delivery. This request concerns operation delivery, not changing who can approve actions.
Suggested API shape (names illustrative):
{"verb":"…","args":{},"responseMode":"job","idempotencyKey":"caller-generated-key"}
{"verb":"…","args":{},"responseMode":"stream","streamTimeoutSeconds":60,"idempotencyKey":"caller-generated-key"}
- Both return a stable jobId immediately. Job mode releases the call; stream mode continues emitting approval, execution and terminal events.
- Events include waiting_for_approval, approved, denied, approval_expired, started, progress, completed, failed and cancelled. Include jobId, ordered event cursor, timestamp and final result/error. Preserve the originating caller/thread and target identity.
- Stream heartbeat suggested every 15 seconds, default stream lifetime 60 seconds with a bounded caller override. Closing or timing out the stream detaches the observer; it does not cancel or resubmit the operation. Return the jobId and last cursor for recovery.
- Provide status/result lookup, attach/reconnect after a cursor, and explicit cancellation. Replay retained events; disclose a retention gap with a current snapshot when a cursor has expired.
- Preserve approval-gated requests as pending jobs. After real human approval, resume the same operation once, subject to current authorization and target validity. Use deduplication so retries/reconnects cannot submit the mutation twice; do not promise exactly-once external side effects across crashes when their outcome is unknown.
- Pending approvals need a separate expiry; completed jobs/events need bounded retention and cleanup. Surface cancelled/expired/unknown-outcome states explicitly.
- Deliver approval/completion notifications to the originating Hydrogen AI thread when it is detached. The relay, CLI and AI tool adapter must expose events incrementally instead of buffering the whole stream until EOF. A stream alone does not wake an idle AI conversation.
Acceptance examples:
- A stream-mode call waits for human approval and reports approval and completion without the user typing “try again.”
- A job-mode call returns immediately; the AI does other work and can later inspect or attach to that same job.
- A 60-second stream timeout/reconnect recovers missed events and the eventual result without rerunning the action.
- Denial, approval expiry, cancellation, relay loss and restart have explicit recoverable outcomes; unauthorized callers cannot read or resume another caller's jobs.
- Existing callers with no responseMode retain their current behavior.
Related but distinct: adom/adom-bridge#137 concerns mirroring approval prompts to Hydrogen; this proposal adds caller-selectable operation delivery and continuation.