Skip to content

Feat/host wiring#1

Open
buYoung wants to merge 6 commits into
mainfrom
feat/host-wiring
Open

Feat/host wiring#1
buYoung wants to merge 6 commits into
mainfrom
feat/host-wiring

Conversation

@buYoung

@buYoung buYoung commented Jun 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

BuYoungLee and others added 6 commits June 9, 2026 17:41
Execution-management parent plus six independently-executable child briefs
that drive wiring the design-stage repo into a running operations console:
01 foundation, 02 daemon, 03 tauri-bridge, 04 ui-wiring, 05 cli,
06 macos-service. Captures waves, dependencies, conflict hotspots, the
parity invariant, and the loopback-no-auth networking posture (DD-011).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… app-core, Router + host assembly (01, +06 backend)

Realize the Hexagonal foundation every host builds on (briefs 01, +06 backend):

- core: Process/Job/Log domain + port traits (LifecycleController, ShutdownSignaler,
  ProcessServiceRegistrar, StateRepository, JobRepository, Scheduler, JobRunner,
  LogSink, ConfigSource, SystemClock). No serde/OS leakage (DD-017/018).
- application: transport-agnostic OperationsFacade + use cases over core ports only,
  ProcessJobRunner, NullProcessServiceRegistrar, AppError → API.md §5 codes.
- shared: snake_case wire DTOs (API.md §4) + TOML config schema + §5.4 error envelope.
- config: TomlConfigSource.
- infra/sqlite: StateRepository + JobRepository over real SQLite (WAL).
- infra/scheduler: cron/interval/one-shot evaluation via croner + tokio timers.
- infra/logging: in-memory LogSink (ring buffer + broadcast).
- infra/http: the frozen axum Router (REST + per-process/run WS) pinned to API.md,
  domain↔DTO mapping, loopback CORS (DD-011), and assemble(deps) → (Router, facade).
- platform/macos: Direct-mode MacLifecycle + UnixShutdown (setsid process groups),
  and the macOS launchd LaunchdAgentProcess + convert vertical (06 backend) —
  woven across facade/http/shared because SystemRegistered is a vertical slice.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The GUI-less supervisor host: builds AppDeps (the only #[cfg(target_os)] in the
app, per DD-018), assembles the shared Router, binds 127.0.0.1:9876 (DD-011,
loopback no-auth), runs the scheduler loop, and handles graceful shutdown
(SIGINT/SIGTERM or POST /daemon/shutdown) — reaping tied children so none are
orphaned while leaving detached ones running. Injects the macOS launchd
registrar so SystemRegistered convert works headless.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A thin HTTP/WS client (no core embed) reusing the shared wire DTOs: the flat
command surface from ARCHITECTURE §4.1.2 (ps/start/stop/restart/logs[-f]/add -c/
remove/reload/daemon status + job ls/trigger/runs), comfy-table output, -o json,
a --url override, and the §5 error envelope mapped onto exit codes
(0 ok / 1 general / 2 no such process / 3 daemon not running). logs -f follows
over WebSocket.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e, tray (03)

The GUI host embeds the shared core in-process (DD-002: no daemon spawn). The
production UI ↔ core path is `tauri invoke` (thin handlers over the same facade);
a test-only devBridge mirrors that surface by serving the identical assemble()
Router on loopback and writing devbridge.json for out-of-process test discovery.
Parity holds because both call the SAME OperationsFacade. Tray with close-to-tray
(hide, keep supervising) + quit; per-process log follow via the `process-log:{name}`
event channel. cmd_convert_process / cmd_remove_job keep the invoke surface at
parity with HTTP.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… (04, +06 UI)

Replace mock arrays with a transport-agnostic services/ layer: one OperationsClient
interface behind two adapters — invoke (Tauri, production) and HTTP+WS (standalone
against the daemon) — selected at runtime, sharing one wire-mapping module
(snake_case → camelCase, reconciling uptime / triggeredBy / LogLine.id+source).
Processes/Jobs/Logs render live data with loading/error/empty states; Logs follows
a selected process (WS or invoke event); the header indicator reflects real
daemon reachability. SystemRegistered convert is a real per-row action (06 UI),
keeping the launchd preview as a "what will be applied" confirmation. Daemon and
Settings stay on mock this slice; no auth token.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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