feat(adapter): T2 — Melvor adapter (Bridge over the game)#28
Open
cyber-ayi wants to merge 1 commit into
Open
Conversation
…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
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.
Closes #25.
Summary
harness/adapters/melvor/— aBridge<MelvorState>over a running Melvor Idle instance, against the T1 contract inharness/bridge/. Mirrors thesynthetic-bridge.tsreference structure.observe()snapshots every skill (id/name/level/xp) and the active action from the in-processgameglobal, surfacing atrain:<skillId>affordance per skill plusstop.act()starts/stops a skill; unknown/unwired targets arerejected.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
adr-0006already made at the architectural level (it picked the TS harness precisely to readgamein-process and rejected CDPevalfor perception). Justified in-code (melvor-bridge.tsheader + README); no new ADR filed.Out of scope (surfaced, not solved)
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) greennpm run test:coverage— 22 tests pass; 100% line/branch/function coverage incl. the new adapter (Melvorgamefaked; no game vendored)observe()returns a populatedPerceptionvalidating against the canonical schema;act()performs a skill action reflected in the nextobserve()gamemember names; out of CI scope per issue preconditions)