Skip to content

feat(cli): unity-mcp-cli → @baizor/gamedev-cli-core (OAuth login, pinned setup-mcp, optional install-plugin path)#907

Merged
IvanMurzak merged 2 commits into
mainfrom
worktree-55611aa8791a
Jul 18, 2026
Merged

feat(cli): unity-mcp-cli → @baizor/gamedev-cli-core (OAuth login, pinned setup-mcp, optional install-plugin path)#907
IvanMurzak merged 2 commits into
mainfrom
worktree-55611aa8791a

Conversation

@IvanMurzak

Copy link
Copy Markdown
Owner

Summary

  • Make unity-mcp-cli a thin wrapper over the shared @baizor/gamedev-cli-core package — the first consumer of the adapter pattern (auth-fixes design 02 §T7).
  • T1 login: OAuth 2.1 device grant (RFC 8628; client_id unity-mcp-cli, scope mcp:plugin); stores the FULL credential set in the shared machine store; legacy /api/auth/device/* flow + PAT minting removed (B2/B3).
  • T4 setup-mcp: pinned URL by default (<base>/mcp/p/<pin-v2>; stdio project=<pin>) via cli-core's golden-vector-gated writers, --no-pin escape hatch, credential-free unless explicit --token (M7). Closes B4.
  • T5 install-plugin: path optional → cwd + Packages/manifest.json marker probe with a helpful failure. Closes B1.
  • enroll: cli-core v2 project identity; removes the local projectRootForIdentity \/ workaround (B5).
  • No version-field changes (plugin/cli version untouched).

Test plan

  • Target-specific local tests passed — cli/ vitest suite green (512 passed / 2 skipped), including new parity tests (adapter identity, v2 golden vectors, RFC 8628 device-flow behaviors, setup-mcp pinned-URL output) and install-plugin cwd resolution.
  • Verified end-to-end against the built CLI: setup-mcp writes .../mcp/p/<pin> (and --no-pin writes the unpinned URL); install-plugin works from a project cwd with no path and gives a helpful failure otherwise.
  • grep confirms no /api/auth/device/* calls remain and no PAT minting.

Closes #906

…ogin, pinned setup-mcp, optional install-plugin path)

Make unity-mcp-cli a thin wrapper over the shared @baizor/gamedev-cli-core package
(the first consumer of the adapter pattern), delivering the auth-fixes CLI seams:

- T1 (login): OAuth 2.1 device-authorization grant via cli-core (client_id
  unity-mcp-cli, scope mcp:plugin); the FULL credential set (accessToken,
  refreshToken, expiresAt, serverTarget, subject) is stored in the shared machine
  store. The legacy /api/auth/device/* flow and PAT minting are removed (B2/B3).
- T4 (setup-mcp): pinned URL by default (<base>/mcp/p/<pin-v2>; stdio project=<pin>)
  via cli-core's golden-vector-gated writers, with --no-pin escape hatch; the config
  stays credential-free unless an explicit --token PAT opt-in (M7). Closes B4.
- T5 (install-plugin): path optional -> cwd + Packages/manifest.json marker probe
  with a helpful failure that lists what was checked. Closes B1.
- enroll: cli-core v2 project identity; the local projectRootForIdentity workaround
  is removed (B5).
- agents / project-identity (pin+port) / project-marker / machine-credentials /
  enroll / setup-mcp / install-plugin resolution now re-export cli-core; the Unity
  command surface + UX are unchanged. Adapter: serverName ai-game-developer, stdio ON.

Parity tests gate the adapter identity, v2 golden vectors, RFC 8628 device-flow
behaviors, and setup-mcp's pinned-URL output. No version-field changes.

Closes #906
/simplify: remove the vestigial local `warnings`/`nextSteps` arrays from
lib/setup-mcp.ts (never mutated after the cli-core migration — cli-core owns
the warning channel via `result.warnings`; `nextSteps` is always empty).
Inline `[]` literals at each return; behavior and setup-mcp config output
unchanged. /code-review --fix surfaced no correctness fixes to apply.

Gates: tsc build green; CLI vitest Suite 3 = 512 passed / 2 skipped / 0 failed
(npm run build && npx vitest run --testTimeout=30000).
@IvanMurzak
IvanMurzak merged commit 95de899 into main Jul 18, 2026
16 checks passed
@IvanMurzak
IvanMurzak deleted the worktree-55611aa8791a branch July 18, 2026 23:51
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.

unity-mcp-cli → @baizor/gamedev-cli-core: OAuth login (T1), pinned setup-mcp (T4), optional install-plugin path (T5)

1 participant