Skip to content

docs(adr): 0030 optional modules share one contract and load only when turned on - #592

Merged
V3RON merged 6 commits into
mainfrom
feature/591-adr
Oct 15, 2026
Merged

V3RON merged 6 commits into
mainfrom
feature/591-adr

Conversation

@V3RON

@V3RON V3RON commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Proposes ADR 0030 for #591 (optional modules share one contract and load only when turned on). It narrows ADR 0023 §3.

It decides:

  • An optional module is one definition.ts and one line in src/modules/registry.ts. Its one name is its capability, its relay target, its doctor module field and, in camelCase, its config key.
  • A module turned off is never loaded and reports off. A leftover agent-device daemon is no longer reaped while agent-device is off.
  • createWorker(ctx) returns a handle: what the module provides, plus hooks named for the host step they run at (afterSocketClaimed, beforeDeviceReclaim, beforeDrain, beforeDriversDispose). The host bounds them from one table.
  • The event bus is for observing only; a step the host waits for is a hook.
  • A gateway module gets a fleet context bound to its name; agent-device's fleet port leaves main.ts.
  • Each module owns its config; keys stay top-level.
  • ModuleMount lives in src/modules, so no module imports src/http.
  • agent-device-unavailable becomes module-unavailable with module. The protocol goes from 36 to 37.

Stays open as the bottom of #591's stack until the feature's last task merges.

Status

  • ADR drafted at Proposed, index row added
  • Spec check findings folded in
  • Maintainer accepts the ADR (Accepted — not yet implemented)

Assumptions

None.

Review

Spec review: skipped. Code review: skipped. Claims review: skipped.
Rounds: 0. Tokens: 0M.

The maintainer accepted the ADR directly; no review run was recorded on this PR.

Written by an agent.

@V3RON
V3RON merged commit 724226f into main Oct 15, 2026
32 of 33 checks passed
@V3RON
V3RON deleted the feature/591-adr branch October 15, 2026 17:21
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