feat(cli): unity-mcp-cli → @baizor/gamedev-cli-core (OAuth login, pinned setup-mcp, optional install-plugin path)#907
Merged
Merged
Conversation
…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).
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.
Summary
unity-mcp-clia thin wrapper over the shared@baizor/gamedev-cli-corepackage — the first consumer of the adapter pattern (auth-fixes design 02 §T7).unity-mcp-cli, scopemcp:plugin); stores the FULL credential set in the shared machine store; legacy/api/auth/device/*flow + PAT minting removed (B2/B3).<base>/mcp/p/<pin-v2>; stdioproject=<pin>) via cli-core's golden-vector-gated writers,--no-pinescape hatch, credential-free unless explicit--token(M7). Closes B4.Packages/manifest.jsonmarker probe with a helpful failure. Closes B1.projectRootForIdentity\→/workaround (B5).cliversion untouched).Test plan
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) andinstall-plugincwd resolution.setup-mcpwrites.../mcp/p/<pin>(and--no-pinwrites the unpinned URL);install-pluginworks from a project cwd with no path and gives a helpful failure otherwise.grepconfirms no/api/auth/device/*calls remain and no PAT minting.Closes #906