Skip to content

feat(sdk): expose MCP workspace enrollment - #1690

Merged
samuv merged 4 commits into
plan/sdk-mcp-workspace-enrollmentfrom
impl/sdk-mcp-workspace-enrollment
Sep 18, 2026
Merged

samuv merged 4 commits into
plan/sdk-mcp-workspace-enrollmentfrom
impl/sdk-mcp-workspace-enrollment

Conversation

@samuv

@samuv samuv commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Stage

Implementation

Stacked on Plan / Interface PR #1688 under the directing user's explicit waiver to begin implementation before that plan merges.

What changed

  • Add session-bound connector inventory and whole-workspace enrollment methods to the TypeScript SDK.
  • Add SDK-owned typed states and detached projections, including future-value normalization to Unknown.
  • Validate enrollment correlations, service counts, terminal states, and pending-only absolute HTTP(S) presentation URLs without leaking rejected values.
  • Preserve gRPC and HTTP request options, session affinity, cancellation, typed failures, and explicit-only retry/cancel policy.
  • Export the surface from root, Node, and Deno entry points, update all API reports and packed-artifact oracles, and add the focused user guide and generated SDK reference.

All acceptance criteria AC1.1 through AC3.5 are complete. Targeted strict trace resolves all 10 criteria with zero failures.

Verification

  • task sdk:format, task sdk:lint, task sdk:typecheck, task sdk:test (54 files, 296 tests), task sdk:build, and task sdk:api:check: pass
  • task lint: pass
  • CGO_ENABLED=0 task docs: pass (432 documents, 3,934 references, no broken links or anchors)
  • task site:build: pass
  • go run ./cmd/mecademo: pass
  • Engine, authn, and provider race suites plus standalone module proofs: pass
  • Targeted strict AC trace: pass (10 ACs, zero failures)
  • Panel review: PANEL: ship_blockers=0 important=0 advisory=2 reviewer_failures=0

Two local whole-repository exceptions are unrelated to this diff:

  • task test cannot bind four fixed-redirect mcp/oauthlogin tests because an existing operator-owned development server occupies 127.0.0.1:18473. Every other root race package, all module race suites, all standalone proofs, and the remaining OAuth login race tests pass.
  • Whole-tree task ac-trace-strict reports a pre-existing missing proof in the landed operator-defined-llm-providers plan. That proof is already absent at the approved baseline. This plan's targeted strict trace passes.

Closes #1467

@samuv
samuv added this pull request to stack #1691 September 17, 2026 21:09
@samuv samuv changed the title impl/sdk mcp workspace enrollment feat(sdk): expose MCP workspace enrollment Sep 17, 2026
@samuv samuv self-assigned this Sep 17, 2026

@jhrozek jhrozek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with one non-blocking follow-up: please consider sanitizing malformed-success decoding errors in the SDK’s shared HTTP transport.

The enrollment projection correctly returns generic, cause-free validation errors. However, JSON/protobuf decoding can fail before that projection runs, and the HTTP transport preserves the decoder exception as ProtocolError.cause . Native JSON errors can include excerpts of the response body, potentially
exposing sensitive response content to application error logging.

This is existing SDK transport behavior, not a demonstrated defect in the server’s enrollment API. The offline reproduction showed a URL prefix in a parser cause; it did not demonstrate full credential disclosure or automatic logging.

A shared SDK decoding policy could retain safe metadata such as HTTP status and transport while omitting raw decoder causes. Please evaluate that as a follow-up, preserving existing server-error, cancellation, and transport-failure semantics.

@samuv

samuv commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Approving with one non-blocking follow-up: please consider sanitizing malformed-success decoding errors in the SDK’s shared HTTP transport.

The enrollment projection correctly returns generic, cause-free validation errors. However, JSON/protobuf decoding can fail before that projection runs, and the HTTP transport preserves the decoder exception as ProtocolError.cause . Native JSON errors can include excerpts of the response body, potentially exposing sensitive response content to application error logging.

This is existing SDK transport behavior, not a demonstrated defect in the server’s enrollment API. The offline reproduction showed a URL prefix in a parser cause; it did not demonstrate full credential disclosure or automatic logging.

A shared SDK decoding policy could retain safe metadata such as HTTP status and transport while omitting raw decoder causes. Please evaluate that as a follow-up, preserving existing server-error, cancellation, and transport-failure semantics.

yeah, we have an initial implementation here #1686 I will follow up with this ancestry after I merge that

@samuv
samuv merged commit 4c31f11 into main Sep 18, 2026
36 checks passed
@samuv
samuv deleted the impl/sdk-mcp-workspace-enrollment branch September 18, 2026 08:20
This was referenced Sep 21, 2026
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.

SDK: expose MCP connector inventory and workspace enrollment

2 participants