Skip to content

fix(mcp-server): stop validate_syntax flagging built-in and finder methods - #17

Open
asbis wants to merge 2 commits into
masterfrom
claude/ecstatic-dhawan-db71a3
Open

asbis wants to merge 2 commits into
masterfrom
claude/ecstatic-dhawan-db71a3

Conversation

@asbis

@asbis asbis commented Oct 13, 2026

Copy link
Copy Markdown
Owner

validate_syntax warned "unknown method(s)" on .shape.ts code that renders fine, because it only knew a hand-curated list of Replicad methods. Three kinds of calls now pass:

Call Example How it's accepted
ECMAScript built-in globals Math.cos(a), Number.isFinite(x) Resolved against the real built-in, so Math.cso( is still flagged
Finder filters in callbacks .fillet(2, (e) => e.inDirection("Y")) Added to the list; a test reads the bundled replicad typings and fails if a filter is missing
Array/String/Number instance methods pts.map(...), parts.push(x), n.toFixed(2), Object.keys(o).map(...) Accepted when Array.prototype, String.prototype or Number.prototype has the name as a function

Typos are still reported: .extrdue(, Math.cso(, pts.pussh(.

Trade-off. A Replicad typo that is also an array or string method now goes unflagged. Of the 92 built-in method names, five also exist in Replicad (find, normalize, reverse, sub, constructor) and are valid either way. The realistic typo that gets through is .filter( or .fill( for .fillet(. Excluding those names would bring back warnings on every arr.filter(...) and Array(n).fill(0), and the typo still fails at runtime with "not a function".

Extension, mcp-server and plugin manifest move to 1.30.1.

Test plan

  • pnpm --filter @shapeitup/mcp-server exec vitest run: 308/308. The three new instance-method tests fail with the prototype check switched off.
  • pnpm lint exits 0
  • pnpm release:check: version checks pass at 1.30.1. Before the commit it still reported a dirty working tree and that the branch isn't master.

🤖 Generated with Claude Code

…thods

validate_syntax warned "unknown method(s)" on code that renders fine,
because it only knew a hand-curated list of Replicad methods:

- Calls on ECMAScript built-ins (`Math.cos`, `Number.isFinite`) are now
  resolved against the real built-in, so `Math.cso(` is still flagged.
- EdgeFinder/FaceFinder/CornerFinder filters (`e.inDirection("Y")` in a
  fillet callback) join the list. A test reads the bundled replicad
  typings and fails if a new filter is missing.
- Array, String and Number instance methods (`pts.map`, `parts.push`,
  `n.toFixed`, `Object.keys(o).map`) are accepted when the prototype has
  them as functions, so the check can't drift.

Typos like `.extrdue(`, `Math.cso(` and `pts.pussh(` are still reported.
The cost: a Replicad typo that is also an array or string method goes
unflagged. Of the 92 built-in names, the realistic one is `.filter(` or
`.fill(` for `.fillet(`, and that still fails at runtime with "not a
function".

Extension, mcp-server and plugin manifest move to 1.30.1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shapeitup-landing Ready Ready Preview Oct 13, 2026 9:30pm UTC

This branch was successfully deployed

1 active deployment
Preview — d6d2603a Deployed Oct 13, 2026 by vercel[bot]
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.

1 participant