feat(connect): on-demand per-client status REST route + denied remediation (spec 075 T025-T029)#711
Open
Dumbris wants to merge 1 commit into
Open
feat(connect): on-demand per-client status REST route + denied remediation (spec 075 T025-T029)#711Dumbris wants to merge 1 commit into
Dumbris wants to merge 1 commit into
Conversation
…ation (spec 075 T025-T029)
Polish for the macOS TCC-safe Connect wizard (spec 075). The overall
GET /api/v1/connect listing already serialized the additive access_state/
remediation fields; this completes the REST contract:
- Add GET /api/v1/connect/{client}: on-demand single-client status that
reads the config at request time and resolves access_state to
accessible|absent|malformed|denied (the sole endpoint that may raise a
macOS App-Data prompt, scoped to user action). Unknown client -> 404;
a denial is reported in-band (200 + access_state="denied" + remediation).
- Map a permission-denied connect/disconnect (*connect.AccessError) to 403
carrying the remediation text, distinct from a generic 400 or 404.
- Docs: macOS "App Data privacy & Connect" note (cause + tccutil reset) in
docs/api/rest-api.md and a CLAUDE.md REST-payload note for the new fields.
- Regenerate oas/ (swagger + docs.go) for the new route.
Verification: go build personal + -tags server; go test -race
./internal/connect/... ./internal/httpapi/... green; golangci-lint v2
(connect + httpapi) 0 issues; scripts/test-api-e2e.sh 65/65 pass.
Related #696
Deploying mcpproxy-docs with
|
| Latest commit: |
07c59f1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fc023c1f.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://feat-075-connect-rest-polish.mcpproxy-docs.pages.dev |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 27741995541 --repo smart-mcp-proxy/mcpproxy-go
|
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.
What
Polish for the macOS TCC-safe Connect wizard (spec 075, T025–T029). Completes the REST contract in
specs/075-macos-tcc-connect/contracts/connect-status.mdon top of the already-merged US1 (#706) and US2 (#707).GET /api/v1/connect/{client}(new): on-demand single-client status that reads the config at request time and resolvesaccess_statetoaccessible|absent|malformed|denied. This is the sole Connect endpoint that opens a client config file, so on macOS it is the only place an App-Data privacy prompt may legitimately appear (scoped to user action). Unknown client →404; a denial is reported in-band (200+access_state="denied"+remediation), not as an HTTP error.403: a permission-denied*connect.AccessErrormaps to403 Forbiddencarrying the remediation text, distinct from a generic400or a404not-found.GET /api/v1/connectlisting already serialized the additiveaccess_state(unknown) /remediationfields — confirmed additive-only, no content reads.tccutil reset) indocs/api/rest-api.md; CLAUDE.md REST-payload note for the new fields.oas/(swagger + docs.go) for the new route.Note: the diagnostics
<diag-pkg>doctor check (T027/T029 mention) is a separate issue (MCP-2831) not yet onmain, so it is out of this PR's lint/test scope.Tests (TDD)
New
internal/httpapi/connect_test.gocases, written failing first:TestHandleGetConnectStatus_IncludesAccessStateUnknown— overall listing additive, no content read.TestHandleGetConnectClientStatus_Connected|Absent|UnknownClient|DeniedSurfacesRemediation— on-demand route resolution + 404 + in-band denial.TestHandleConnectClient_DeniedReturnsRemediation— denied write →403with remediation.Verification
go build ./cmd/mcpproxy+go build -tags server ./cmd/mcpproxy✅go test -race ./internal/connect/... ./internal/httpapi/...✅golangci-lint run --config .github/.golangci.yml ./internal/connect/... ./internal/httpapi/...→ 0 issues ✅./scripts/test-api-e2e.sh→ 65/65 PASS (SC-006, no regression) ✅Related #696