Repository navigation
feat(workbench): user-initiated live MCP probing with consent + redaction (#105 stage 5) - #299
Conversation
🦋 Changeset detectedLatest commit: 9cb6d76 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ce959612e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }); | ||
| return report; | ||
| } finally { | ||
| await Promise.allSettled([client.close(), transport.close()]); |
There was a problem hiding this comment.
Keep cleanup from defeating the probe timeout
When an unresponsive stdio child or Streamable HTTP endpoint causes transport.close() or client.close() not to settle, the timeout race creates a timed-out report but this unconditional Promise.allSettled still waits forever before returning it. Consequently the documented 10-second total budget does not bound the route response and the Workbench remains stuck on “Probing”; cleanup needs its own bounded or detached teardown path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
| const hasAbsolutePath = (value: string): boolean => | ||
| /(?:file:|(?:^|[\s"'([{])\/[^\s,;{}()[\]<>"']+|(?:^|[\s"'([{])[A-Za-z]:[\\/]|\\\\)/u.test(value); |
There was a problem hiding this comment.
Detect absolute paths after common separators
If server-controlled metadata or an error formats a path as config=/home/alice/private.json or cwd:C:\Users\alice\private, this expression does not recognize it because the path is preceded by = or : rather than one of the permitted boundary characters. redactProbeText therefore returns the full absolute path in instructions, tool metadata, or failure details despite its fail-closed redaction contract; include common key/value separators in the boundary detection.
Useful? React with 👍 / 👎.
5ce9596 to
ae9aec9
Compare
commit: |
ae9aec9 to
9cb6d76
Compare
Summary
#105 stage 5 — the final stage: user-initiated live MCP probing from the Hosts page, under the #107 G6 gate (read-only; anything that executes is user-initiated; no mutation ever enters the Workbench).
DiscoveryBundleFinding.mcpServers, read-only via each adapter's MCP runtime manifest; absent = honestly not enumerated, empty = declared none).POST /api/discovery/probes(AB8219–AB8223, registered indocs/diagnostics.md). The body is only{ host, serverName }— browser input never becomes a launcher, path, env, or JSON-RPC frame; the server re-resolves the bundle root from disk and reuses the existing MCP session launch machinery (resolveMcpSessionLaunch+@modelcontextprotocol/clienttransports). The probe is structurally read-only: exactlyinitialize+tools/list+ capability snapshot, then close — the wire admits no operation selection, nevertools/call. Strict 10 s total budget, named 16 MiB response budget, bounded tool/instruction text, per-target single-flight with no caching past settlement, plugin-data tempdir always removed.[REDACTED]args, env allowlist, sanitized URLs); all server-reported text passes credential redaction (redactCredentialText) plus absolute-path redaction per the dev-log wire precedent (bundle paths become<bundle>/…, other absolute paths fail closed to[REDACTED]).Unreachable/Timed outbadge — no error wall,role="alert"only for real request/decode failures (client decode is strict zod with AB8235, enforcing the ok⇔snapshot / down⇔failure invariants).discovery-atoms.tsbrowser-state module keyed to the current report view; re-running discovery drops them; in-flight probes abort on unmount (disposal-tested). Nothing persisted.Test plan (all run locally, green)
native-claude-contractload-flake, 17/17 green in isolation), route-unit 19 ✓, projection 57 ✓discovery.e2e): consent flow (zero probe requests before confirm; Cancel sends nothing; exactly one POST), populated live probe of the realtimelineserver, honest neutral down state for a dead stdio server, re-run clears ephemeral results, stale→repair regression, zero page errorsoverview.e2e13 ✓,runtime-playground.e2e3 ✓,lifecycles.e2e✓,host-discovery-dev-server✓,lifecycle-replay-dev-server✓, all three atom-disposal suites ✓Changeset:
agent-bundlepatch.