Skip to content

feat(adapter): T2 — Melvor adapter (Bridge over the game)#28

Open
cyber-ayi wants to merge 1 commit into
mainfrom
ops/t2-melvor
Open

feat(adapter): T2 — Melvor adapter (Bridge over the game)#28
cyber-ayi wants to merge 1 commit into
mainfrom
ops/t2-melvor

Conversation

@cyber-ayi

Copy link
Copy Markdown
Collaborator

Closes #25.

Summary

  • Implements harness/adapters/melvor/ — a Bridge<MelvorState> over a running Melvor Idle instance, against the T1 contract in harness/bridge/. Mirrors the synthetic-bridge.ts reference structure.
  • observe() snapshots every skill (id/name/level/xp) and the active action from the in-process game global, surfacing a train:<skillId> affordance per skill plus stop. act() starts/stops a skill; unknown/unwired targets are rejected.
  • All game-coupling is isolated in melvor-mod.ts (bindMelvorGlobal + createMelvorBridge), which declares only the shape of the in-process surface — clean-room, game body not vendored (AGENTS.md rule 4 · adr-0003).

Decision-gates

  • Act path = in-process mod, not CDP. This is the choice adr-0006 already made at the architectural level (it picked the TS harness precisely to read game in-process and rejected CDP eval for perception). Justified in-code (melvor-bridge.ts header + README); no new ADR filed.
  • L2 runtime (ElizaOS/OpenClaw/Hermes) not selected here — T2 only needs the Bridge contract; deferred to T5.

Out of scope (surfaced, not solved)

  • Shared-avatar concurrency: Melvor is single-avatar; operator+agent act() calls race on the one action slot. Surfaced in comments + README only; the operator-acts-in-world half is staged to Stardew P1 (adr-0007).

Test plan

  • npm run typecheck (tsc --noEmit) green
  • npm run test:coverage — 22 tests pass; 100% line/branch/function coverage incl. the new adapter (Melvor game faked; no game vendored)
  • observe() returns a populated Perception validating against the canonical schema; act() performs a skill action reflected in the next observe()
  • integration against a live Melvor + mod toolchain (confirms concrete game member names; out of CI scope per issue preconditions)

…ss game global (#25)

Implement harness/adapters/melvor/ against the T1 Bridge contract:
observe() snapshots skills + the active action from the `game` global and
surfaces a `train:<skillId>` affordance per skill (plus `stop`); act()
starts/stops a skill. Mirrors synthetic-bridge.ts structure.

Act path = in-process mod, not CDP — the choice ADR-0006 already made
(rejecting CDP `eval` for perception); justified in-code, no new ADR. The
L2 runtime choice is left to T5. Shared-avatar concurrency is surfaced in
comments only (deferred to Stardew P1, adr-0007). Game body not vendored:
melvor-mod.ts declares only the in-process surface shape (clean-room,
adr-0003) and isolates all game-coupling.

Tooling: tsconfig + package.json globs extended to adapters/; 100% coverage
of the runtime surface holds (game faked in tests).

Session-Id: 019e90a1-fafa-774d-ab66-a437cbf5ef58
Agent: harness-bot
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.

[task] T2 — Melvor adapter (implement Bridge over the game)

1 participant