feat: exec channel-relay parity + dashboard daemon UX#3
Merged
Conversation
…onsole link - connect now dispatches job_assignment frames to executeRemoteAssignment, drains in-flight runs before disconnecting, and streams events back via the new sendRunEvent on InstanceSocketClient - doctor verifies pairing health and (with --runner) confirms the runner is bound to this instance via GET /api/runners/<id>; only refreshes the access token when the runner check actually needs it - console link <runnerId> writes ~/.config/athena/channels/console.json (mode 0600) with a derived ws/wss broker_url and reloads gateway channels - send() warns once per close transition when frames are dropped Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previously a workflow that ran without engaging the tracker was marked failed with a verbose stop reason. That penalised single-turn workflows where the agent legitimately had nothing to track. Now the loop ends in 'completed' with no stop reason. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…on autocapture - enableExceptionAutocapture so PostHog catches uncaught errors without manual trackError calls at every boundary - new helpers: trackWorkflowCommand, trackDashboardPaired, trackDashboardUnpaired, trackSetupCompleted, trackExecCompleted - SetupWizard fires trackSetupCompleted alongside the existing writeGlobalConfig Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… remove debug trace Outbound console.message.out now carries threadId only; the dashboard side stopped reading conversationId from outbound replies, and mirroring both fields was dead-weight. Also removes the writeGatewayTrace call that was left over from earlier debugging. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
registerAsyncCleanup() lets long-lived resources (sockets, daemons, file locks) flush before the process exits via SIGINT, SIGTERM, or an unhandled error. Hooks race against a 2s timeout so a hung cleanup can't block exit, and re-entrant signals are de-duplicated via an `exiting` guard. beforeExit still runs sync-only cleanup since it can't await. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Implements the "Pair Once, Dashboard-Spawned Headless Sessions" plan (docs/plans/2026-05-09-remote-runtime-daemon-ux.md). Closes the gaps left by the prior committed prototype (fd71141) so a single `drisp dashboard pair <token>` leaves the machine ready for dashboard-driven remote runs without keeping a foreground TUI alive. - New `src/infra/daemon/` substrate: PID lock, log file rotation, UDS IPC server/client, state-dir resolution, and launchd/systemd service-unit install/uninstall helpers (all with tests). - New `dashboardDaemon.ts` entry point and expanded `runtimeDaemon` to host long-lived InstanceSocket connection, proactive token refresh, and per-run abort handling. - `dashboard` subcommand expansion: `status`, `logs`, `runs`, `refresh`, `daemon foreground|start|stop|install`, and `console enable`. Status reports merge daemon UDS state with dashboard-side instance metadata. - Tests cover the new infra modules, daemon lifecycle, and the expanded command surface (3142 total, +46). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
One-shot report from the PostHog setup wizard documenting the new events (workflow/dashboard/setup/exec) and exception autocapture shipped in commit ac2b1db. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The test asserted the old subcommand-arg shape for `dashboard doctor` that no longer matches how `--runner` is forwarded. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lespaceman
added a commit
that referenced
this pull request
May 10, 2026
Extract seams, remove duplication, and sharpen module ownership across six areas of the codebase. All 3258 tests pass. **#4 RelayCoordinator**: extract generic PendingBroadcast<T> internal type; requestPermission/requestQuestion become thin wrappers. **#6 UDS IPC**: extract tryReadFrame/writeFrame codec to udsFrameCodec.ts; both server handleConnection and client sendUdsRequest consume it. **#5 Exec runner**: extract FailureLatch (registerFailure/hasFailure) and exitCodeFromFailure; finalMessage test coverage expanded to 11 tests. **#1+#2 Gateway binding + dispatch turn**: extract RuntimeBindingStore (binding state machine, grace timer, epoch, observer callbacks) from DispatchPipeline + SessionRegistry; delete dispatcher.ts; SessionRegistry shrinks to dispatch correlation directory. **#3 Plugin source resolution**: create workflowResolver.ts as the single home for workflow manifest traversal, ref-shape detection, version pinning, and ambiguity detection; strip workflow-specific code from marketplaceShared.ts; delete workflowSourceResolution.ts. **#7 Session persistence**: extract SessionRow type and rowToAthenaSession mapper to types.ts; remove identical duplicate definitions from store.ts and registry.ts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related lines of work, rebased cleanly on top of
main(currently at 0.4.1):1.
execchannel-relay parityMakes
drisp execfunctionally identical to interactive mode minus the Ink UI. Permission/question requests now route through--channel(relayed to telegram etc.) just like interactive; with no channel attached they block until--timeout-msfires.--on-permission/--on-questionpolicy flags andEXEC_EXIT_CODE.POLICY(slot kept as numeric gap for backward compat).src/app/channels/relayAdapter.tsandsessionBridgeLifecycle.tsextracted fromRuntimeProviderso exec and interactive share the same channel-relay machinery.src/app/exec/policies.{ts,test.ts}.2. Dashboard daemon UX (Pair Once)
Implements
docs/plans/2026-05-09-remote-runtime-daemon-ux.md— closes the gaps left by the prior "committed prototype" (fd71141) so a singledrisp dashboard pair <token>leaves the machine ready for dashboard-driven remote runs.src/infra/daemon/: PID lock, log file rotation, UDS IPC, state-dir, launchd/systemd service-unit install.src/app/entry/dashboardDaemon.tsentry + expandedruntimeDaemon.ts(long-lived InstanceSocket, proactive token refresh, per-run abort).dashboardsubcommand surface:status,logs,runs,refresh,daemon foreground|start|stop|install,console enable.Other
feat(telemetry): workflow / dashboard / setup / exec events + exception autocapture.feat(processRegistry): async cleanup hooks with 2s timeout.refactor(gateway/console): drop conversationId mirror on outbound and remove debug trace.fix(workflow): treat untouched tracker skeleton as a clean completion.feat(dashboard): wire connect to remote run executor + add doctor / console link.test(cli): drop staledashboard doctor --runnerforwarding test.posthog-setup-report.mddocumenting the wizard run that produced the telemetry events.Test plan
npm run typecheckcleannpm test— 273 files, 3142/3142 passingdrisp exec --channel telegram "..."relays permission to telegramdrisp dashboard pair <token>leaves a running daemon and dashboard-triggered runs workdrisp dashboard daemon installproduces a working launchd plist on macOS🤖 Generated with Claude Code