GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — docs(mcpx): the FAQ and a runnable examples gallery (#1859) by dezren39 · Pull Request #2454 · developing-today/code Conversation
|
| example | shows |
|---|---|
call-a-tool.ts |
the whole shape: top-level await, one argument object, print the result |
discover.ts |
Object.keys(tools.demo), describe(), then two calls in one script |
stateful.ts |
open then state in one invocation, and log() |
recipe-echo.ts |
a real // @param recipe, saved and run through mcpx recipes |
examples_test.go builds the CLI and the fakemcp fixture through internal/testsupport, gives each run its own HOME, MCPX_STATE_DIR, MCPX_CACHE_DIR and MCPX_CONFIG, sets MCPX_AUTOSTART_IDLE_EXIT=60s, and runs mcpx stop --all on cleanup — the daemon-hygiene pattern from internal/e2e (#52/#182). Each script is run from a temp copy (so mcpx run's generated mcpx-client.ts never lands in the tree) and its stdout is compared with a checked-in .expected.txt, with a line diff on failure. Deterministic: the fixture server only, no Chrome, no network, no clock. Because it is a Go test in pkgs/mcpx, the existing mcpx workflow's go test ./... executes it — no new workflow, and an example that rots fails the build.
pkgs/mcpx/docs/examples.md — the gallery, derived from those files: per example the script, the command, and the exact stdout. faq#examples links to it. Every fenced block was checked against the .ts and .expected.txt bytes.
internal/defaults/links_test.go: a backticked path that is not at the module root is now also tried against the citing document. The plugin skills write examples/README.md and mean the directory beside SKILL.md; before, those were skipped only because no top-level examples/ existed. examples/servers/ joins foreignPrefixes — it is the cloned official conformance suite's layout, the same category as docs/extensions/.plugin/opencode/README.md named examples/screenshot-and-errors.ts for the browser skill's example; it names the real path now.go test ./examples/ -count=1 → ok (TestExamples, 4/4 subtests PASS)
go test ./internal/defaults/ -count=1 → ok (TestEveryDocumentationLinkResolves)
go test ./internal/cli/ -count=1 → ok (docs guards, story quote/line counts)
gofmt -l examples internal/defaults → empty
Not run locally: the full go test ./... (CI's job) and nix build (not triggered by a docs-only change).
faq#… anchors, so those pages can point at them when they land.docs/scripts.md (the other back-link the issue names) is mcpx docs interface pages A: interfaces, CLI, binary, scripts prose pages (split of #1851) #2108's page; the FAQ links to AGENTS.md instead of a page that is not there.OPENCODE-V2.md's stale body is left to the compendium tracker, per the issue's exclusion. Its correction block is what the FAQ cites.Queue task: 3069 (worker repo-worker-code, OpenChamber scheduled lane).
Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Level-2 faq page: the five questions from the notes as headings, verbatim, each at its fixed anchor (faq#do-you-like-mcp, faq#opencode-code-mode, faq#is-it-safe, faq#why, faq#examples), each answered in ~120 words in the notes' own 'we' voice and ending with one 'more' link. Code-mode facts use the OPENCODE-V2.md correction block and docs/opencode-plugin.md §1, never the stale body; security posture is described, not designed.
…atches (#1859) `examples/` holds four small scripts run against the deterministic fakemcp fixture: call one tool, search and describe inside the script, a stateful `open`/`state` pair, and a `// @param` recipe. `examples_test.go` builds the CLI and the fixture through internal/testsupport, isolates HOME, state, cache and config, sets MCPX_AUTOSTART_IDLE_EXIT=60s and runs `stop --all` on cleanup -- the e2e pattern -- so `go test ./...` in CI executes every example and compares stdout with its checked-in `.expected.txt`. `docs/examples.md` is the gallery derived from them: script, command, exact stdout per example, linked from `faq#examples`. Two corrections the examples directory forces: - `TestEveryDocumentationLinkResolves` now falls back to resolving a backticked path against the citing document when it is not at the module root, which is how the plugin skills write `examples/README.md`, and `examples/servers/` joins the foreign prefixes (the conformance clone). - `plugin/opencode/README.md` named `examples/screenshot-and-errors.ts` for the browser skill's example; it now names the real path.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · PR opened, parked for CI
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 5956d05c86
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Run them from `pkgs/mcpx`. The first run writes `mcpx-client.ts` and its | ||
| declarations beside the script, which is how `mcpx run` works for any file; | ||
| the `.gitignore` in that directory keeps them out of git. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Document fixture setup before the runnable examples
For a reader following this page from a normal checkout, none of the advertised commands can produce the shown output because the demo server has not been configured. A repository-wide search found the fixture setup in examples/examples_test.go, where the test builds internal/testsupport/fakemcp and writes a temporary mcpServers.demo configuration; running an example directly does neither. Add instructions to build the fixture and configure its namespace before presenting the scripts as runnable as-is. Renaming the namespace to an existing server is insufficient because these examples require the fixture-specific tools and responses.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| subprocesses. `script.permissions` defaults to `all`, and the narrower profiles | ||
| (`net`, `read`, `read-net`, `strict`) apply only on Deno: bun and node run with | ||
| the user's own authority whatever you ask for. The daemon API is |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Describe the permission profiles actually enforced
For users choosing a restricted runtime, this incorrectly says that Node and Bun silently run with full authority regardless of the requested profile. internal/runner/runtimes.go rejects a named profile when it has no flags for the selected runtime, and internal/defaults/defaults.json explicitly defines Node permission flags for read-net/readnet. The existing tests in internal/e2e/permissions_test.go cover both refusal of unsupported profiles and enforcement of Node's write restriction. Describe those behaviors instead so the safety guidance does not tell readers that supported restrictions are ineffective.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Disposition (2026-10-31, queue task 4761 / issue #3246): confirmed and fixed. The FAQ text was wrong exactly as flagged — node enforces readnet/read-net via --permission --allow-fs-read=*, and a named profile with no entry for the chosen runtime is refused with an error rather than run unenforced. Fix PR: #3263 rewrites the FAQ answer per-runtime against defaults.json + runtimes.go and adds a dated supersession note to decision 0003 §2 (which repeated the stale claim).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Dispositioned: this finding was verified by triage (task 4746, issue #3246) and fixed in PR #3263, merged 2026-11-01 as 3186e25. The mcpx FAQ "is it safe?" answer now describes per-runtime enforcement accurately (node enforces readnet/read-net via --permission --allow-fs-read=*; net/read/strict are Deno-only; a named profile with no entry for the chosen runtime is refused with an error, never run unenforced), and docs/decisions/0003 section 2 carries a dated supersession note pointing at the corrected FAQ. No code changes were needed — defaults.json and runtimes.go were already correct; the docs were wrong.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
🤖 Agent note · green and enqueued in the merge queue
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · green, waiting on the known merge-queue stall
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
mcpx docs: the FAQ, in the notes' own voice
There was an error while loading. Please reload this page.