Skip to content

Make developer-tools the home of the client and agent packages - #22

Merged
predatorx7 merged 6 commits into
mainfrom
feat/sdk-mirror-home
Nov 11, 2026
Merged

predatorx7 merged 6 commits into
mainfrom
feat/sdk-mirror-home

Conversation

@predatorx7

@predatorx7 predatorx7 commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Makes developer-tools the home of @reclaimprotocol/client and @reclaimprotocol/agent. Reclaim's private Builder repository includes this repository as a git submodule (reclaimprotocol/builder#101), so changes to packages/ are made, reviewed, and merged here, including outside contributions.

Changes

  • packages/client and packages/agent: the package source, imported from Builder.
  • Root npm workspaces, tsconfig.json, eslint, and .nvmrc.
  • ci.yml: build, typecheck, lint, and test both packages.
  • release.yml: on a version change merged to main, build without privileges, then publish both packages with npm trusted publishing (OIDC, provenance) in the npm environment, tag v<version>, and publish the MCP Registry entry. Reruns are safe.
  • The root package.json version is the release version. npm run version:bump (or npm run version:bump -- <version>) propagates it: it sets both package versions, pins the agent's client dependency, syncs the plugin manifests, and refreshes the lockfile. CI fails if any of these drift from the root version.
  • CONTRIBUTING.md, docs/maintainers.md (repository settings for an admin), distribution/npm-release.md, and a PR template.
  • Fixes check-builder-mcp.mjs: it now runs from a temporary directory, so npx runs the published package instead of the local, unbuilt workspace.
  • .github/CODEOWNERS uses a placeholder team, @reclaimprotocol/developer-tools-maintainers. Replace it before you require code owner review.

Before merging

An admin applies docs/maintainers.md:

  • the main and v* rulesets
  • the npm and mcp-registry environments
  • npm trusted publishers for both packages
  • the Actions settings

Test plan

  • npm run build, check, lint: clean without the Builder app
  • Tests: client 131, agent 511, scripts 9
  • check-builder-mcp.mjs passes locally against @reclaimprotocol/agent@0.1.45 (103 tools)
  • version:bump dry run on a throwaway copy

🤖 Generated with Claude Code

predatorx7 and others added 2 commits November 11, 2026 03:12
Add the npm workspace, CI and release tooling for packages/client and
packages/agent, which Reclaim mirrors here from its monorepo.

- Root workspaces, tsconfig, ESLint config, .nvmrc and a ci workflow.
- release.yml: an unprivileged job builds and packs; a main-only job
  in the npm environment publishes client then agent with npm trusted
  publishing; tag and MCP Registry jobs follow and can be re-run.
- publish-mcp-registry.yml: health check without OIDC; publish carries
  the prepared server.json and the exact released version.
- mirror-guard blocks package changes except bot-only mirror PRs;
  upstream-port label, comment and close-ported-prs workflows handle
  outside PRs that maintainers port upstream.
- CODEOWNERS, PR template, CONTRIBUTING.md and docs/maintainers.md
  with the repository settings to apply.
- sync-version.ts also updates gemini-extension.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Initial snapshot of packages/client and packages/agent, mirrored from
Reclaim's monorepo. Later updates arrive as rolling mirror PRs from
the mirror/builder branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread scripts/release-plan.mjs Fixed
@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130150227428

Result Head Blocking findings Ponytail suggestions Check
Human review required (incomplete diff) 92e9a19bea6d 18 53 View run

Human review required:

  • package-lock.json: GitHub provided no text patch (binary or unavailable).
  • packages/agent/src/mcp/api/operations.gen.ts: GitHub provided no text patch (binary or unavailable).
  • packages/agent/tests/mcp-credentials.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/old-devtools.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/org-keypair-tool.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/page-replay.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/patch-domhandler.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/pod-prover.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/post-publish-browser.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/proof-egress.test.ts: text patch exceeds the 1,200,000-character total review limit.

88 more unreviewed changes in the details below.

# Finding
1 package-lock.json resolves @adiwajshing/eslint-config as git+ssh://git@github.com/adiwajshing/eslint-config.git#607fc28f986c645194c69047292883ae0d1aec02. The new ci.yml…
2 packages/agent/samples/demo-server/server.js: const providerId = __PROVIDER_ID__; and const providerVersion = __PROVIDER_VERSION__; are undeclared JavaScript identifiers.…
3 packages/agent/src/authoring/tools.ts: find_requests_containing (implemented in mcp/tools/agent/find.ts and included here) returns an unredacted slice of each captured…
4 packages/agent/src/authoring/tools.ts: test_user_script leaks a non-kept script permanently when called without navigateUrl. The CDP new-document script is installed but its…
5 packages/agent/src/cdp/claims.ts and packages/agent/src/cdp/container.ts: claim acquisition is a non-atomic read-modify-write, despite being used to ensure exclusive ownership…
6 packages/agent/src/cdp/container.ts: reapOrphanedContainers() decides that a container is orphaned solely from the PID recorded in its immutable creation label. An adopted…
7 packages/agent/src/cdp/container.ts: after const token = claim(name), failures in image pull, docker run, or describe() do not release the token. In particular,…
8 packages/agent/src/cdp/capture-engine.ts: maxBodyBytes is not actually enforced for a capture. BodyStore evicts old entries, but onLoadingFinished() also assigns every…
9 packages/agent/src/mcp/tools/authenticate/issue-org-keypair.ts: The catch around client.call('SetOrgKeypair', ...) unconditionally restores/removes the local private key for…
10 packages/agent/src/mcp/tools/authenticate/issue.ts: issueTool always generates a key and passes it to writeEthKey, which upserts RECLAIM_PRIVATE_KEY in the project's…

8 more findings in the details below.

Human review required for unreviewed changes. Reviewed all 23 diff chunks. Changes required: package-lock.json resolves @adiwajshing/eslint-config as git+ssh://git@github.com/adiwajshing/eslint-config.git#607fc28f986c645194c69047292883ae0d1aec02. The new ci.yml and release.yml both run npm ci on standard GitHub-hosted runners without an SSH deploy key, so npm will attempt to clone via git@github.com and fail SSH authentication even if the repository is public. This prevents CI and

# Ponytail suggestion
1 README.md:L27-31: shrink: duplicate contributor/mirroring overview already covered by CONTRIBUTING.md. Replace the section with `See CONTRIBUTING.md for…
2 distribution/npm-release.md:L32-52: shrink: repeat trusted-publisher and environment setup documented in docs/maintainers.md. Replace with a one-line link to the maintainer…
3 package.json:L19: delete: sync-version duplicates the existing version:sync script. Nothing replaces it; retain version:sync.
4 packages/agent/scripts/prepend-shebang.js:L2-17: shrink: path imports, BIN_FILES array, and loop for one fixed binary. Use `const path = new URL('../lib/mcp-bin.js',…
5 packages/agent/skill/SKILL.builder.md:L133-137: delete: Draft section table of contents duplicates the three headings immediately below. Nothing replaces it.
6 packages/agent/skill/SKILL.builder.md:L223-228: delete: Parameters section table of contents duplicates the four headings immediately below. Nothing replaces it.
7 packages/agent/skill/SKILL.common.md:L21-25: delete: Browser section table of contents duplicates the section headings. Nothing replaces it.
8 packages/agent/skill/community-contributions.md:L8-14: delete: Manual contents list duplicating the section headings. Use heading navigation.
9 packages/agent/skill/hash-validation.md:L3-10: delete: Manual contents list duplicating the section headings. Use heading navigation.
10 packages/agent/skill/js-sdk-integration.md:L5-9: delete: three-item contents list with no links; the section headings already provide navigation. Nothing replaces it.

43 more suggestions in the details below.

Full findings and Ponytail review

Human review required:

  • package-lock.json: GitHub provided no text patch (binary or unavailable).

  • packages/agent/src/mcp/api/operations.gen.ts: GitHub provided no text patch (binary or unavailable).

  • packages/agent/tests/mcp-credentials.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/old-devtools.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/org-keypair-tool.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/page-replay.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/patch-domhandler.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/pod-prover.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/post-publish-browser.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/proof-egress.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/propose-flow.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/provider-versioning.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/remap-errors.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/replay.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/secrets.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/share-browser-view.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/start-integration.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/static-asset.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/strip-pseudo-headers.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/stub-cdp.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/success-response.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/test-user-script.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/to-version.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/to-zod.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/verification-checks.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/wait-for-ai-session.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/wait-for-login.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/zk-files.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tsconfig.test.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/AGENTS.md: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/LICENSE: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/README.md: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/package.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/api.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/attestor-proof.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/canonical.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/client.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/consts.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/eip191.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/enckeys.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/encoding.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/errors.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/feature-flags.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/jwks.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/keypair.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/destination.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/device.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/environment.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/errors.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/extension.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/flow.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/mobile.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/modal.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/options.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/portal.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/qr.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/target.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/vendor/qrcodegen.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-hash.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-recipe.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-trust-constants.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-types.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-verification-error.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/reclaim.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/request-proof.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/result.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/routes.gen.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/secp.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/tee-binding.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/types/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/types/openapi.gen.ts: GitHub provided no text patch (binary or unavailable).

  • packages/client/src/types/openapi.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verification-clients.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verify-attestor-tee.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verify-tee.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/api.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/client.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/crypto-roundtrip.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/fetch.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-device.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-extension.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-fakes.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-flow.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-modal.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-target.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/reclaim.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/result-security.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/tee-binding.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/verification-clients.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tsconfig.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tsconfig.test.json: text patch exceeds the 1,200,000-character total review limit.

  • scripts/prepare-builder-registry.mjs: text patch exceeds the 1,200,000-character total review limit.

  • scripts/release-plan.mjs: text patch exceeds the 1,200,000-character total review limit.

  • scripts/sync-version.ts: text patch exceeds the 1,200,000-character total review limit.

  • tests/release-plan.test.mjs: text patch exceeds the 1,200,000-character total review limit.

  • tsconfig.json: text patch exceeds the 1,200,000-character total review limit.

  • package-lock.json resolves @adiwajshing/eslint-config as git+ssh://git@github.com/adiwajshing/eslint-config.git#607fc28f986c645194c69047292883ae0d1aec02. The new ci.yml and release.yml both run npm ci on standard GitHub-hosted runners without an SSH deploy key, so npm will attempt to clone via git@github.com and fail SSH authentication even if the repository is public. This prevents CI and the release build job from completing, blocking all releases. Smallest safe fix: depend on the pinned repository through git+https://github.com/adiwajshing/eslint-config.git#607fc28f986c645194c69047292883ae0d1aec02 (or a registry-published pinned version) and regenerate/commit package-lock.json so its resolved URL is HTTPS. Relevant interfaces: root package.json devDependencies, package-lock.json, and the npm ci steps in .github/workflows/ci.yml and .github/workflows/release.yml.

  • packages/agent/samples/demo-server/server.js: const providerId = __PROVIDER_ID__; and const providerVersion = __PROVIDER_VERSION__; are undeclared JavaScript identifiers. Running the documented npm start immediately throws ReferenceError: __PROVIDER_ID__ is not defined, so the distributed demo cannot be used. This also contradicts its README claim that it defaults to providerId "example", and no substitution mechanism is present in this chunk. Smallest safe fix: replace these template tokens with valid defaults (at minimum const providerId = "example" and an appropriate optional/undefined provider-version value), or add and document a build/generation step that substitutes them before users are instructed to run the sample.

  • packages/agent/src/authoring/tools.ts: find_requests_containing (implemented in mcp/tools/agent/find.ts and included here) returns an unredacted slice of each captured response body as snippet. This contradicts the stated secret-free/tool-output boundary: an authenticated API response can contain bearer tokens, session material, or unrelated personal data adjacent to the searched value, and the 40-character context on either side is copied into the model transcript. The smallest safe fix is to omit raw response snippets from tool output, or redact sensitive JSON/header-like values and return only a safe structural/location summary; response bodies must remain server-side.

  • packages/agent/src/authoring/tools.ts: test_user_script leaks a non-kept script permanently when called without navigateUrl. The CDP new-document script is installed but its identifier is neither retained nor removed. A later test_user_script({ navigateUrl }) installs/removes only its own script, despite the result text claiming that follow-up removes the prior script. Thus an arbitrary test script can continue running on every later navigation in the authenticated tab, including after the caller believes it was one-shot. The smallest safe fix is to retain the identifier for pending one-shot scripts and remove it after their first navigation (or before installing any subsequent test script), and make the reported lifetime match that behavior.

  • packages/agent/src/cdp/claims.ts and packages/agent/src/cdp/container.ts: claim acquisition is a non-atomic read-modify-write, despite being used to ensure exclusive ownership of a profile/container slot. Two MCP processes can both read an empty claims file, both select slot 0, and overwrite each other's claim. The losing process can still start or use reclaim-browser-0; when the surviving recorded claimant calls stop(), release() finds no other token and stops that browser while the first session is actively using it. This also permits concurrent startup against the same profile. Smallest safe fix: serialize slot selection and claim insertion with an inter-process lock (held across pickSlot() and claim()), and make release operate under that same lock; do not rely on last-writer-wins for ownership state.

  • packages/agent/src/cdp/container.ts: reapOrphanedContainers() decides that a container is orphaned solely from the PID recorded in its immutable creation label. An adopted container continues to have its original creator's PID label. Therefore, if session A starts a container, session B adopts it, and A exits, a later startContainer() from any session reaps the container because A's PID is dead—even though B has a live claim and is actively driving the browser. Smallest safe fix: before removing a labeled container, consult the live claim set for that container/slot (or maintain/update ownership for every claimant) and reap only when no live claimant remains.

  • packages/agent/src/cdp/container.ts: after const token = claim(name), failures in image pull, docker run, or describe() do not release the token. In particular, describe() stops a malformed container when no CDP websocket is returned but leaves its claim behind. Because the process remains alive, its stale token makes the slot busy for the lifetime of the agent and can eventually exhaust all four slots. Smallest safe fix: wrap all work after claim() in a try/catch/cleanup path that releases the token unless a successfully returned ContainerBrowser.stop assumes responsibility for it.

  • packages/agent/src/cdp/capture-engine.ts: maxBodyBytes is not actually enforced for a capture. BodyStore evicts old entries, but onLoadingFinished() also assigns every fetched body to CapturedRequest.responseBody, and requests is never evicted. A long-running capture can therefore retain an unbounded amount of response data despite the 200 MiB default, causing memory exhaustion. Smallest safe fix: keep response bodies only in BodyStore (and have consumers retrieve them there), or have eviction remove the corresponding responseBody from its captured request so all retained response data is subject to the limit.

  • packages/agent/src/mcp/tools/authenticate/issue-org-keypair.ts: The catch around client.call('SetOrgKeypair', ...) unconditionally restores/removes the local private key for every error. A network timeout or connection reset can occur after Builder has committed the new public key but before the response reaches the agent. In that case the organization now encrypts results / binds sessions to the newly registered key while this code removes that key from the app env file, potentially making new encrypted results permanently undecryptable and preventing the app from using its configured org key. Smallest safe fix: only roll back the env file for errors that conclusively establish the server did not apply the mutation (such as a validated 409), and for ambiguous transport/server failures retain the newly written key and report that the remote outcome must be checked (or query GetOrgKeypair and compare its public key before deciding whether rollback is safe).

  • packages/agent/src/mcp/tools/authenticate/issue.ts: issueTool always generates a key and passes it to writeEthKey, which upserts RECLAIM_PRIVATE_KEY in the project's .env. Thus invoking this tool overwrites an existing signing key with no confirmation or explicit replacement option, permanently changing the proof-owner identity and losing the prior key if it was only stored there. This contradicts the tool description and its non-destructive annotation. Smallest safe fix: detect an existing .env key and refuse to replace it unless the caller supplies an explicit confirmation/replacement boolean (and mark that path destructive), preserving the existing key by default.

  • packages/agent/src/old/tools/authenticate.ts: the new ethAddress authentication path permits account impersonation. It converts any supplied public Ethereum address into an eth:<address> UID, validates it only by listing that UID's providers, and persists it. ReclaimOldClient then authorizes requests solely with the unsigned x-eth-uid header (as the accompanying client comments explicitly state). Since Ethereum addresses are public, a caller can supply another provisioned user's address and act as that user for provider reads/updates and app-link operations. Smallest safe fix: remove the ethAddress/unsigned-UID authentication option from this tool (and reject unsigned eth identities in the client); retain only Firebase-token or browser authentication unless the backend is changed to verify a challenge signature tied to the address.

  • packages/agent/samples/demo-server/server.js: providerId is inserted unescaped into the /verify HTML response (<code>${providerId}</code>). Although scaffold-demo-server.ts safely JSON-stringifies it for the JavaScript literal, a providerId such as </code><script>…</script> is later rendered as HTML and becomes stored XSS in the generated server. Smallest safe fix: HTML-escape providerId before including it in the template (or render it as text through a client-side textContent assignment), while retaining the raw value for SDK calls.

  • packages/agent/samples/demo-server/server.js: the proof callback origin falls back to ${req.protocol}://${req.get("host")}. /api/reclaim/request is public, so an attacker can supply a Host / forwarded-proto value and cause the app to register an attacker-selected callback URL with Reclaim; when a proof completes, this turns the Reclaim callback mechanism into an outbound request to that selected destination. Smallest safe fix: require a configured, validated PUBLIC_URL for creating proof requests (return a configuration error when absent), rather than deriving a callback destination from request headers.

  • packages/agent/src/proof/patch-domhandler.ts: the added nodeName and localName getters return only this.name. domhandler document/root nodes do not have a name, so they still yield undefined. The XPath engine validates the context node as DOM-like and requires a string node name; response-redaction extraction starts from the parsed document/root, so XPath (including XPath+JSONPath) recipes continue to fail despite this patch. Smallest safe fix: make the getters return valid DOM names for non-element nodes as well—at minimum return '#document' for the root/document node (and a string for other node types), while preserving element nodes’ tag-name behavior—before setting the patch-installed flag.

  • packages/agent/src/provider/secrets.ts: STRIP_REQUEST_HEADERS strips all listed CSRF/XSRF headers before splitSecrets runs. Consequently draftProvider never emits a SecretParamRef for (for example) x-csrf-token, and that current per-user token cannot be supplied during replay/proof. Any endpoint that requires a CSRF header—an ordinary pattern for authenticated state-changing requests, and some authenticated reads—will therefore produce a drafted provider that cannot be replayed successfully, even though the captured request was valid. The comments already establish the intended correct behavior: these headers should be secret and re-captured per verification, not persisted publicly. Smallest safe fix: remove the CSRF/XSRF entries from STRIP_REQUEST_HEADERS while retaining the transport/framing entries; the existing allowlist classifier will place those headers in secrets, and draftProvider will create redacted secret references rather than publishing their values.

  • packages/agent/src/provider/matcher.ts: normalized response values are located but the original display value is still stored in paramValues. For example, drafting target "1,247" from JSON {"count":1247} lets findJsonPath/jsonKeyPrefix locate 1247, but jsonMatcher calls keyValueResult with target ("1,247"). The generated contains match is therefore evaluated with {{count}} = "1,247", which does not occur in the captured response (1247), so the drafted provider cannot prove. The same original-vs-observed mismatch exists in the HTML/content fallback paths after firstIndex finds an encoding/number-normalized candidate. Smallest safe fix: propagate the exact candidate/decoded value actually matched in the response through each matcher synthesis and use that value for paramValues (and ensure its matcher class/OPRF validation is applied to that selected value).

  • packages/agent/src/provider/matcher.ts: OPRF_MAX_BYTES is documented as an attestor limit, but synthesizeMatcher never enforces it when hash is explicitly supplied. draftProvider only applies the byte-length check when choosing its automatic sensitive-data hash; an explicit hash: "oprf-mpc" for a valid 63+-byte slug/email passes synthesis and emits a provider the attestor rejects at proof time. Smallest safe fix: before constructing a hashed redaction, reject a hashed target (and any normalized candidate selected for extraction) whose UTF-8 byte length exceeds OPRF_MAX_BYTES, with a clear draft-time error.

  • packages/agent/src/telemetry/tool-call.ts: allowlistedInput sends arbitrary free-form goal and userRequest text (up to 300/500 characters), plus arbitrary dataPoints, in default-on telemetry. These fields can directly contain API keys, authentication material, personal data, URLs, and proprietary integration requirements; Telemetry.signedIn() also calls identify(), associating prior anonymous events with the signed-in account. This contradicts the telemetry implementation’s anonymous-usage framing and creates an unbounded privacy exfiltration path. Smallest safe fix: do not transmit free-form prompt/request/data-point text by default—send only bounded categorical/structural metadata—or require explicit informed opt-in before collecting it, with robust secret/PII redaction.

Ponytail suggestions:

  • README.md:L27-31: shrink: duplicate contributor/mirroring overview already covered by CONTRIBUTING.md. Replace the section with See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution and package-source details., saving 4 lines.
  • distribution/npm-release.md:L32-52: shrink: repeat trusted-publisher and environment setup documented in docs/maintainers.md. Replace with a one-line link to the maintainer guide's npm trusted-publisher and environment sections, saving 20 lines.
  • package.json:L19: delete: sync-version duplicates the existing version:sync script. Nothing replaces it; retain version:sync.
  • packages/agent/scripts/prepend-shebang.js:L2-17: shrink: path imports, BIN_FILES array, and loop for one fixed binary. Use const path = new URL('../lib/mcp-bin.js', import.meta.url) and handle that file directly.
  • packages/agent/skill/SKILL.builder.md:L133-137: delete: Draft section table of contents duplicates the three headings immediately below. Nothing replaces it.
  • packages/agent/skill/SKILL.builder.md:L223-228: delete: Parameters section table of contents duplicates the four headings immediately below. Nothing replaces it.
  • packages/agent/skill/SKILL.common.md:L21-25: delete: Browser section table of contents duplicates the section headings. Nothing replaces it.
  • packages/agent/skill/community-contributions.md:L8-14: delete: Manual contents list duplicating the section headings. Use heading navigation.
  • packages/agent/skill/hash-validation.md:L3-10: delete: Manual contents list duplicating the section headings. Use heading navigation.
  • packages/agent/skill/js-sdk-integration.md:L5-9: delete: three-item contents list with no links; the section headings already provide navigation. Nothing replaces it.
  • packages/agent/skill/js-sdk-integration.md:L46-50: yagni: commented optional init configuration in the minimal integration path. Omit the fourth init argument until an option is needed.
  • packages/agent/skill/js-sdk-integration.md:L60-64: delete: optional correlation-metadata example unrelated to creating and verifying a proof. Nothing replaces it.
  • packages/agent/skill/js-sdk-integration.md:L69-73: delete: speculative request rehydration workflow in the basic integration example. Nothing replaces it.
  • packages/agent/skill/js-sdk-integration.md:L88-91: delete: alternate raw/form-encoded callback parsing path while the example explicitly configures JSON callbacks. const proof = req.body;.
  • packages/agent/src/authoring/backend.ts:L17-19: delete: SecretParams is an unreferenced secret-header wrapper. Nothing replaces it.
  • packages/agent/src/cdp/client.ts:L148: delete: Emit of the private event channel with no exposed subscriber. Nothing replaces it.
  • packages/agent/src/cdp/capture.ts:L25-28: shrink: Conditional object spread solely to omit an optional property. maxBodyBytes: opts.maxBodyBytes.
  • packages/agent/src/cdp/eviction.ts:L5-16: yagni: One-field BodyStoreOptions plus stored options object. constructor(private readonly maxBytes: number).
  • packages/agent/src/mcp/api/tools.ts:L71-86: shrink: Recompute toSnakeCase(opId) three times per registration. Bind const toolName = toSnakeCase(opId) once and reuse it.
  • packages/agent/src/mcp/tools/agent/build.ts:L61-111: shrink: mutable tools accumulator and seven one-item loops. Return one array literal with ...captureTools(...), ...sessionTools(...), etc., plus a conditional spread for client-only tools.
  • packages/agent/src/mcp/tools/agent/capture.ts:L48-56: yagni: requireAttached helper has one caller. Inline the attachRef.current check in start_capture.
  • session.ts:L47-63: delete: reset_session is a second name for the identical dispose_browser reset path. Keep dispose_browser only.
  • pod-proof.ts:L23,L89: shrink: temporary tool variable only feeds return [tool]. return [defineTool(...)], 1 line.
  • proof.ts:L14-20: shrink: two one-expression directory helpers. Inline join(reclaimHomeDirPath(), 'claims' | 'proof-runs') at their call sites, 6 lines.
  • packages/agent/src/mcp/tools/agent/start-integration.ts:L7-8, L55-61: delete: userRequest input that is neither rendered nor recorded. Nothing replaces it.
  • packages/agent/src/mcp/tools/authenticate/decrypt-key.ts:L25-43: yagni: private key-input resolver with one caller. Inline its env/file fallback into resolveDecryptionKey.
  • packages/agent/src/mcp/tools/verification/read-callback-events.ts:L22-28: shrink: duplicate RESULT_EVENTS set already needed by result.ts. Export it from result.ts and import it alongside resolveOrgSecret.
  • packages/agent/src/mcp/tools/verification/proxy-callback-events.ts:L3,L477-479: shrink: duplicate abortable sleep wrapper. Import sleepFor from callback-listener.ts and delete the local wrapper and timers import.
  • packages/agent/src/mcp/tools/mode/mode.ts:L91-92: shrink: two reads of the same config solely to extract fields. const { mode: persisted, old_devtools: oldIdentity } = config.read() ?? {}, 1 line.
  • packages/agent/src/mcp/tools/verification/result.ts:L162-165: shrink: unused catch binding plus void err. catch { undecryptable.push(item.subscriptionId); continue }, 1 line.
  • packages/agent/src/old/login-cdp.ts:L47-73: yagni: IndexedDB token-persistence fallback added solely in case a future build changes Firebase persistence. Scan the documented localStorage key only until that migration exists.
  • packages/agent/src/old/login-cdp.ts:L188-222: delete: page-interactivity state, probe, and dual-path timeout diagnosis. Throw one generic login-timeout error.
  • packages/agent/src/old/login-cdp.ts:L231-254: delete: single-caller pageIsInteractive helper made unnecessary by the generic timeout. Nothing replaces it.
  • packages/agent/src/old/client.ts:L465-474: shrink: special-case empty-body detection plus try/catch JSON parser. return res.json().catch(() => undefined).
  • packages/agent/src/old/sdk-client.ts:L74-80: shrink: seven-line JSON parse fallback. const json = await res.json().catch(() => undefined).
  • packages/agent/src/old/to-register.ts:L235-241: yagni: seven-line requestDataFrom wrapper with two fixed callers. Inline providers.map(requestDataFromProvider) at both call sites.
  • packages/agent/src/old/tools/publish.ts:L120-211: shrink: duplicate provider/request item schema definitions. Define one requestSchema and use it for provider and providers.items.
  • packages/agent/src/old/tools/session-logs.ts:L39-49: shrink: CompactEntry only annotates one private function’s inferred return. Delete it and let compact() infer its return type.
  • packages/agent/src/old/tools/session-logs.ts:L368-370: yagni: hasEvent wrapper with two trivial callers. Replace calls with entry => Boolean(entry.event_type).
  • packages/agent/src/old/tools/session-logs.ts:L372-374: yagni: one-use clampLimit helper. Inline Math.min(Math.max(Math.trunc(args.limit ?? DEFAULT_LIMIT), 1), MAX_PAGE) in page.
  • packages/agent/src/paths.ts:L8-10: yagni: one-line exported forwarding wrapper. Replace the import and wrapper with export { reclaimHome as reclaimHomeDirPath } from './consts.ts'.
  • packages/agent/src/proof/attestor-auth.ts:L31: shrink: six-line undefined conditional spread. ...(opts.expiresInSeconds !== undefined ? { expiresAt: Math.floor(Date.now() / 1000) + opts.expiresInSeconds } : {}),.
  • packages/agent/src/proof/page-replay.ts:L90: stdlib: seven-line loop filtering cookie secrets. Object.fromEntries(Object.entries(secrets).filter(([key]) => key.toLowerCase() !== 'cookie')).
  • packages/agent/src/proof/pod-prover.ts:L143: delete: one-use b64ToBytes wrapper. Pass Buffer.from(sig.claim_signature, 'base64') directly to bytesToHex.
  • packages/agent/src/provider/dom-xpath.ts:L25-125: delete: speculative token-shape durability scorer (Candidate metadata, weights, UUID/hash heuristics). Return the first uniquely verified candidate in the existing deliberate id/attribute/class/positional order.
  • packages/agent/src/provider/dom-xpath.ts:L157-175: shrink: collect, index, sort, and score every verified XPath. Loop through candidateXPaths(el) and return the first matchesUniquely(...) result.
  • packages/agent/src/provider/schema.ts:L116-121: shrink: six-line blank-geo normalizer. return value?.trim() || undefined, in a one-line function.
  • packages/agent/src/provider/secrets.ts:L84-L94: stdlib: Manual filter-and-copy loop for headers. return Object.fromEntries(Object.entries(headers).filter(([k]) => !STRIP_REQUEST_HEADERS.has(k.toLowerCase()) && !isPseudoHeader(k))).
  • packages/agent/src/tools/registry.ts:L119-L126: shrink: Rebuilds every unchanged ToolDefinition field just to override two. definition: { ...base, description: extra.description ?? base.description, inputSchema },.
  • packages/agent/tests/container.test.ts:L59-L61: delete: loopback re-check after the exact port-mapping deep equality already proves both mappings. Nothing replaces it.
  • packages/agent/tests/dom-xpath.test.ts:L33-L36: shrink: four-line assertion only adds a custom failure message. assert.ok(a?.xPath.startsWith('/html')), 1 line.
  • packages/agent/tests/login-timeout.test.ts:L54-85: delete: standalone reimplementation of the timeout-message branch and tests of that copy. Nothing replaces it.
  • packages/agent/tests/normalize.test.ts:L33-38: delete: duplicate unchanged-string/JSON-encoding case already covered by the octocat test. Nothing.

net: -497 lines possible.

@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130153343968

Result Head Blocking findings Ponytail suggestions Check
Human review required (incomplete diff) 92e9a19bea6d 11 43 View run

Human review required:

  • package-lock.json: GitHub provided no text patch (binary or unavailable).
  • packages/agent/src/mcp/api/operations.gen.ts: GitHub provided no text patch (binary or unavailable).
  • packages/agent/tests/mcp-credentials.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/old-devtools.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/org-keypair-tool.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/page-replay.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/patch-domhandler.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/pod-prover.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/post-publish-browser.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/proof-egress.test.ts: text patch exceeds the 1,200,000-character total review limit.

88 more unreviewed changes in the details below.

# Finding
1 package-lock.json: the newly added @adiwajshing/eslint-config dependency is locked as `git+ssh://git@github.com/adiwajshing/eslint-…
2 packages/agent/samples/demo-server/server.js:8-10 contains unreplaced __PROVIDER_ID__ and __PROVIDER_VERSION__ tokens. These are undeclared identifiers, so importing/running…
3 packages/agent/src/authoring/tools.ts — eval_in_page returns the direct result of an arbitrary expression executed in the authenticated page. Despite the tool description…
4 packages/agent/src/authoring/tools.ts — wait_for_login treats a login as detectable only when a cookie name not present in its initial snapshot appears. Many normal…
5 packages/agent/src/cdp/capture-engine.ts: onLoadingFinished assigns every fetched body to CapturedRequest.responseBody after putting it in BodyStore. BodyStore eviction…
6 packages/agent/src/cdp/container.ts: reapOrphanedContainers decides whether a container is orphaned solely from its immutable OWNER_LABEL PID. A second MCP process can…
7 packages/agent/src/cdp/claims.ts and packages/agent/src/cdp/container.ts: slot selection and claiming are not atomic across MCP processes. Concurrent calls can both read the same…
8 packages/agent/src/cdp/launcher.ts: startChrome treats any HTTP 2xx response from 127.0.0.1:${opts.port}/json/version as readiness before confirming that the newly spawned…
9 packages/agent/src/mcp/tools/authenticate/issue.ts: issue_credentials unconditionally generates and writes a new RECLAIM_PRIVATE_KEY via writeEthKey, which replaces any…
10 packages/agent/src/provider/matcher.ts: Normalized candidates are used to locate a value but the original target is still saved in paramValues and substituted into contains…

1 more findings in the details below.

Human review required for unreviewed changes. Reviewed all 23 diff chunks. Changes required: package-lock.json: the newly added @adiwajshing/eslint-config dependency is locked as git+ssh://git@github.com/adiwajshing/eslint-config.git#607fc28f986c645194c69047292883ae0d1aec02. Both ci.yml and the release build job run npm ci on a stock GitHub-hosted runner with no SSH private key for git@github.com, so installation will fail with SSH authentication failure and prevent CI and all releas

# Ponytail suggestion
1 eslint.config.js:L5-10: delete: files-only flat-config block has no settings and does not scope later blocks. Nothing.
2 package.json:L16: delete: duplicate version-sync script alias. Keep sync-version.
3 packages/agent/AGENTS.md:L48-85: yagni: hand-maintained directory inventory duplicates the repository tree. Nothing; inspect the tree when needed.
4 packages/agent/README.md:L139-141: delete: second explanation of the how_it_works guide immediately after its earlier dedicated section. Nothing.
5 packages/agent/samples/demo-server/.env.example:L4-11: delete: tunnel setup tutorial duplicated in the sample README. Nothing.
6 packages/agent/scripts/prepend-shebang.js:L7-17: yagni: one-element BIN_FILES loop. Directly read and prepend lib/mcp-bin.js.
7 packages/agent/skill/SKILL.builder.md:L48-51: delete: blocked-403 shortcut duplicates the detailed publish-from-capture flow in topic prove. Nothing; step 9 already links to…
8 packages/agent/skill/SKILL.common.md:L36-39: delete: unconditional side note about browser sharing duplicates the conditional share_browser_view flow below. Nothing; offer it…
9 packages/agent/skill/ai-sessions.md:L65-L71: delete: background verification-mechanism section repeats the supported client/version already required in step 3. Nothing replaces it.
10 packages/agent/skill/community-contributions.md:L8-L15: delete: eight-line contents list for a short linear guide. Nothing replaces it.

33 more suggestions in the details below.

Full findings and Ponytail review

Human review required:

  • package-lock.json: GitHub provided no text patch (binary or unavailable).

  • packages/agent/src/mcp/api/operations.gen.ts: GitHub provided no text patch (binary or unavailable).

  • packages/agent/tests/mcp-credentials.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/old-devtools.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/org-keypair-tool.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/page-replay.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/patch-domhandler.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/pod-prover.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/post-publish-browser.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/proof-egress.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/propose-flow.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/provider-versioning.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/remap-errors.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/replay.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/secrets.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/share-browser-view.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/start-integration.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/static-asset.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/strip-pseudo-headers.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/stub-cdp.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/success-response.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/test-user-script.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/to-version.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/to-zod.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/verification-checks.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/wait-for-ai-session.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/wait-for-login.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/zk-files.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tsconfig.test.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/AGENTS.md: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/LICENSE: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/README.md: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/package.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/api.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/attestor-proof.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/canonical.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/client.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/consts.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/eip191.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/enckeys.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/encoding.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/errors.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/feature-flags.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/jwks.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/keypair.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/destination.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/device.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/environment.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/errors.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/extension.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/flow.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/mobile.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/modal.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/options.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/portal.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/qr.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/target.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/vendor/qrcodegen.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-hash.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-recipe.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-trust-constants.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-types.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-verification-error.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/reclaim.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/request-proof.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/result.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/routes.gen.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/secp.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/tee-binding.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/types/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/types/openapi.gen.ts: GitHub provided no text patch (binary or unavailable).

  • packages/client/src/types/openapi.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verification-clients.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verify-attestor-tee.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verify-tee.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/api.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/client.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/crypto-roundtrip.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/fetch.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-device.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-extension.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-fakes.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-flow.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-modal.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-target.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/reclaim.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/result-security.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/tee-binding.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/verification-clients.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tsconfig.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tsconfig.test.json: text patch exceeds the 1,200,000-character total review limit.

  • scripts/prepare-builder-registry.mjs: text patch exceeds the 1,200,000-character total review limit.

  • scripts/release-plan.mjs: text patch exceeds the 1,200,000-character total review limit.

  • scripts/sync-version.ts: text patch exceeds the 1,200,000-character total review limit.

  • tests/release-plan.test.mjs: text patch exceeds the 1,200,000-character total review limit.

  • tsconfig.json: text patch exceeds the 1,200,000-character total review limit.

  • package-lock.json: the newly added @adiwajshing/eslint-config dependency is locked as git+ssh://git@github.com/adiwajshing/eslint-config.git#607fc28f986c645194c69047292883ae0d1aec02. Both ci.yml and the release build job run npm ci on a stock GitHub-hosted runner with no SSH private key for git@github.com, so installation will fail with SSH authentication failure and prevent CI and all releases. Smallest safe fix: declare the dependency using an HTTPS Git URL (or a registry-published immutable version), regenerate and commit the lockfile so its resolved URL is HTTPS, then retain the commit pin/integrity protections.

  • packages/agent/samples/demo-server/server.js:8-10 contains unreplaced __PROVIDER_ID__ and __PROVIDER_VERSION__ tokens. These are undeclared identifiers, so importing/running server.js immediately throws ReferenceError: __PROVIDER_ID__ is not defined; the README's documented npm start flow is therefore unusable. Replace these template tokens with valid defaults (for example, const providerId = "example" and an optional/undefined version), or ensure the published sample is generated with concrete JavaScript values before users are directed to run it.

  • packages/agent/src/authoring/tools.ts — eval_in_page returns the direct result of an arbitrary expression executed in the authenticated page. Despite the tool description saying never to return cookies or tokens, a caller can invoke document.cookie, localStorage.getItem(...), or sessionStorage.getItem(...); values shorter than the truncation threshold are returned verbatim to the tool transcript. This defeats the chunk’s stated secret boundary for any non-HTTP-only session/auth material and is especially unsafe because page content can prompt an agent to make such calls. Smallest safe fix: do not expose arbitrary page-evaluation results from an authenticated page; replace it with a constrained declarative DOM-reading interface that excludes browser storage/cookies and sensitive values (and keep any action such as reload as a separate non-result-bearing operation).

  • packages/agent/src/authoring/tools.ts — wait_for_login treats a login as detectable only when a cookie name not present in its initial snapshot appears. Many normal authentication flows update/rotate an existing pre-login session cookie under the same name after successful login. In that case baseline.has(c.name) remains true, hit is always empty, and the tool reports loggedIn: false until timeout even after login completes. Smallest safe fix: retain cookie values internally in the baseline and treat a relevant cookie whose value changes (with the existing post-auth-URL check) as a new authenticated session, without returning the value.

  • packages/agent/src/cdp/capture-engine.ts: onLoadingFinished assigns every fetched body to CapturedRequest.responseBody after putting it in BodyStore. BodyStore eviction removes only its own map entry; requests retains the same body indefinitely. Consequently maxBodyBytes (including an explicit value of 0) does not bound captured-response memory, and a long session or large API responses can exhaust the agent process. Smallest safe fix: make eviction also clear the corresponding CapturedRequest.responseBody (for example, have BodyStore.set report evicted request IDs and delete those fields), or do not retain responseBody outside the bounded store and require consumers to retrieve it through bodies.get.

  • packages/agent/src/cdp/container.ts: reapOrphanedContainers decides whether a container is orphaned solely from its immutable OWNER_LABEL PID. A second MCP process can successfully claim and adopt a container, but the label remains the original process's PID. If that original process exits, a later startContainer call reaps the container even though the adopter has a live claim and is actively using its browser, terminating its authenticated browser session. Smallest safe fix: before removing a labelled container, consult the live claim state for that container name and retain it whenever any live claimant exists (rather than treating only the creator PID as ownership).

  • packages/agent/src/cdp/claims.ts and packages/agent/src/cdp/container.ts: slot selection and claiming are not atomic across MCP processes. Concurrent calls can both read the same available slot and overwrite one another's claim file through the read-modify-write sequence. They can then share or race to create the same named/profile container, while only one claim remains recorded; when that recorded claimant stops, it can stop the browser underneath the unrecorded active session. The stated last-writer behavior is therefore not merely a redundant-container race. Smallest safe fix: use an interprocess lock and atomically perform slot selection, claim insertion, and claim-file update (or otherwise revalidate and retry selection under an exclusive lock).

  • packages/agent/src/cdp/launcher.ts: startChrome treats any HTTP 2xx response from 127.0.0.1:${opts.port}/json/version as readiness before confirming that the newly spawned child owns the debugging port. If the requested port is already occupied by another Chrome instance, the first poll succeeds against that existing instance while the new Chrome process subsequently exits because it cannot bind the port. The function returns the failed child as LocalBrowser.process, while later CDP calls operate on the pre-existing browser, potentially exposing the wrong browser’s tabs/session data and leaving lifecycle cleanup ineffective. Smallest safe fix: reject an already-bound requested port before spawning (for example, probe by binding a local server and fail with a port-conflict error), rather than accepting an existing CDP endpoint as readiness; also check child spawn/exit state before accepting readiness.

  • packages/agent/src/mcp/tools/authenticate/issue.ts: issue_credentials unconditionally generates and writes a new RECLAIM_PRIVATE_KEY via writeEthKey, which replaces any existing .env key without preserving it or requiring an explicit confirmation. This can silently destroy the project's existing proof-owner credential, despite the tool description saying to confirm before replacement and the tool being annotated destructiveHint: false. Smallest safe fix: detect an existing .env key and refuse unless an explicit replacement/confirmation argument is supplied (and ideally back it up using the existing credential backup mechanism before overwriting); mark the replacement operation as destructive.

  • packages/agent/src/provider/matcher.ts: Normalized candidates are used to locate a value but the original target is still saved in paramValues and substituted into contains matches. For example, drafting against JSON {"count":1247} with target "1,247" succeeds because normalizeCandidates includes 1247; jsonMatcher emits "count":{{count}} while keyValueResult sets count to 1,247. The resulting match requires "count":1,247, which is absent from the response, so the generated provider cannot prove. The same original-versus-normalized mismatch exists in the HTML and fallback paths. Smallest safe fix: carry the exact candidate/serialized response representation selected by each matcher through to the match template and paramValues, or reject normalized-only matches until that representation is handled consistently.

  • packages/agent/src/provider/matcher.ts: OPRF_MAX_BYTES is documented as an attestor hard limit, but synthesizeMatcher never checks it for an explicit hash argument. defaultSensitiveHash applies the limit only to its automatic hash choice; callers can explicitly request an OPRF mode for an otherwise hashable ASCII slug or email longer than 62 bytes, producing a draft that will fail at the attestor during proof generation. Smallest safe fix: before synthesizing a hashed matcher, reject hash requests whose UTF-8 target length exceeds OPRF_MAX_BYTES (using Buffer.byteLength(target, 'utf8')), with a clear draft-time error.

Ponytail suggestions:

  • eslint.config.js:L5-10: delete: files-only flat-config block has no settings and does not scope later blocks. Nothing.
  • package.json:L16: delete: duplicate version-sync script alias. Keep sync-version.
  • packages/agent/AGENTS.md:L48-85: yagni: hand-maintained directory inventory duplicates the repository tree. Nothing; inspect the tree when needed.
  • packages/agent/README.md:L139-141: delete: second explanation of the how_it_works guide immediately after its earlier dedicated section. Nothing.
  • packages/agent/samples/demo-server/.env.example:L4-11: delete: tunnel setup tutorial duplicated in the sample README. Nothing.
  • packages/agent/scripts/prepend-shebang.js:L7-17: yagni: one-element BIN_FILES loop. Directly read and prepend lib/mcp-bin.js.
  • packages/agent/skill/SKILL.builder.md:L48-51: delete: blocked-403 shortcut duplicates the detailed publish-from-capture flow in topic prove. Nothing; step 9 already links to prove.
  • packages/agent/skill/SKILL.common.md:L36-39: delete: unconditional side note about browser sharing duplicates the conditional share_browser_view flow below. Nothing; offer it only under that flow's stated condition.
  • packages/agent/skill/ai-sessions.md:L65-L71: delete: background verification-mechanism section repeats the supported client/version already required in step 3. Nothing replaces it.
  • packages/agent/skill/community-contributions.md:L8-L15: delete: eight-line contents list for a short linear guide. Nothing replaces it.
  • packages/agent/skill/hash-validation.md:L3-L11: delete: nine-line contents list duplicates the document headings. Nothing replaces it.
  • packages/agent/skill/interception.md:L3-L11: delete: nine-line contents list duplicates the document headings. Nothing replaces it.
  • packages/agent/skill/interception.md:L93-L98: delete: browser-extension API-version implementation details that do not change the interception diagnostic or remedy. Nothing replaces it.
  • packages/agent/src/authoring/backend.ts:L17-19: delete: unused SecretParams interface. Nothing replaces it.
  • packages/agent/src/authoring/index.ts:L9: delete: re-export of unused SecretParams. Nothing replaces it.
  • packages/agent/src/cdp/capture-engine.ts:L149-156: delete: unused InFlight.requestId and startedAt state (and their initializers). Omit both fields and initializers.
  • packages/agent/src/cdp/client.ts:L154: delete: generic 'event' emission has no subscriber in the typed CdpTabClient surface. Nothing replaces it.
  • packages/agent/src/mcp/tools/agent/build.ts:L69-111: shrink: Mutable tools accumulator plus repeated push/one-item loops. Return one array literal with spreads (return [howItWorksTool(...), attachTool(...), ...captureTools(...), ..., ...(client ? [...] : [])]).
  • packages/agent/src/mcp/tools/agent/capture.ts:L48-57: yagni: requireAttached closure has one caller. Inline the null check at start_capture.
  • packages/agent/src/mcp/tools/agent/session.ts:L51: delete: reset_session duplicates dispose_browser exactly, differing only in its result label. Keep dispose_browser; nothing replaces it.
  • packages/agent/src/mcp/tools/verification/proxy-callback-events.ts:L4: shrink: duplicate abortable sleepFor helper and node:timers/promises import. Import sleepFor from callback-listener.ts and delete the local helper.
  • packages/agent/src/mcp/tools/verification/read-callback-events.ts:L118-121: shrink: serial push loop builds decoded items. const items = await Promise.all(data.items.map(decode)), 1 line.
  • packages/agent/src/mcp/tools/mode/mode.ts:L90-91: shrink: two config reads for adjacent fields. const { mode: persisted, old_devtools: oldIdentity } = config.read() ?? {}, 1 line.
  • packages/agent/src/mcp/tools/verification/result.ts:L151-155: shrink: caught error is immediately discarded with void err. Use catch { ... }.
  • packages/agent/src/old/login-cdp.ts:L52-79: yagni: IndexedDB token extraction for a hypothetical Firebase persistence change. Scan the dashboard’s current localStorage key only.
  • packages/agent/src/old/login-cdp.ts:L170-204: shrink: interactive-page probe and bifurcated timeout diagnosis. One generic login-timeout error; delete pageIsInteractive too.
  • packages/agent/src/old/to-register.ts:L16: shrink: single-use DEFAULT_USE_PROXY constant. Inline true in opts.useProxy ?? true.
  • packages/agent/src/old/to-register.ts:L228-236: shrink: block-bodied map callback that only returns an object. return requests.map((req) => ({ ...requestDataFromProvider(req), required: req.required ?? true, multiple: req.multiple ?? true, templateParams: req.templateParams, templateParamsMode: req.templateParamsMode })).
  • packages/agent/src/old/tools/link-app.ts:L7-13: yagni: single-call buildLinkMessage wrapper. Inline `Link ${appId} to account ${userId} | nonce: ${nonce}` at its call site.
  • packages/agent/src/old/tools/publish.ts:L95-167: yagni: provider duplicates the complete providers item schema and merging path for a one-item convenience. Accept only providers, with one draft represented as a one-element array.
  • packages/agent/src/proof/page-replay.ts:L84-99: yagni: authenticatedPageFetch has one caller. Inline pageFetch(backend, provider, 'include', Object.fromEntries(Object.entries(secrets).filter(([key]) => key.toLowerCase() !== 'cookie'))) at the call site.
  • packages/agent/src/proof/check-matchers.ts:L223-227: yagni: one-use silentLogger wrapper. Replace silentLogger() with LOGGER.child({ scope: 'check-matchers' }, { level: 'silent' }).
  • packages/agent/src/proof/pod-prover.ts:L129-131: yagni: one-use b64ToBytes wrapper. Replace bytesToHex(b64ToBytes(sig.claim_signature)) with bytesToHex(Buffer.from(sig.claim_signature, 'base64')).
  • packages/agent/src/proof/debug-response-dump.ts:L50: stdlib: manual global replacement via split().join(). value.replaceAll({{${key}}}, val).
  • packages/agent/src/proof/proof-core.ts:L34-36: shrink: parenthesized multiline return. return override ?? attestorUrlOverride() ?? FALLBACK_ATTESTOR_URL.
  • packages/agent/src/proof/attestor.ts:L104-110: shrink: manual tail branch. return entries.slice(-n).
  • packages/agent/src/provider/normalize.ts:L25-28: shrink: six-entry case-sensitive suffix multiplier map. Index a three-entry map with suffixMatch[2].toLowerCase().
  • packages/agent/src/provider/secrets.ts:L82: shrink: six-line isPseudoHeader wrapper used once. Inline k.startsWith(':') in the filter.
  • packages/agent/src/provider/secrets.ts:L89: shrink: manual out accumulator and loop. Object.fromEntries(Object.entries(headers).filter(([k]) => !STRIP_REQUEST_HEADERS.has(k.toLowerCase()) && !k.startsWith(':'))).
  • packages/agent/tests/container.test.ts:L60-62: shrink: loop rechecks that the two explicitly expected port mappings are loopback. Keep the preceding assert.deepEqual(publishes(args), [...]) only.
  • packages/agent/tests/container.test.ts:L116: delete: notEqual is implied by the two exact, distinct profile-path assertions above. Nothing.
  • packages/agent/tests/container.test.ts:L124-131: delete: test only confirms optional TypeScript fields read as undefined; it does not exercise buildRunArgs. Nothing.
  • packages/agent/tests/login-timeout.test.ts:L50-87: delete: test-only reimplementation of the timeout-message branch and assertions that never invoke production code. Nothing replaces it.

net: -367 lines possible.

Builder now includes this repository as a git submodule instead of
mirroring the packages into it, so pull requests to packages/ merge here
like any other change.

- Remove the mirror workflows (mirror-guard, upstream port label and
  comment, close-ported-prs) and packages/MIRRORED_FROM.
- Add `npm run version:bump -- <version>`, which sets both package
  versions, pins the agent's client dependency, syncs the plugin
  manifests and refreshes the lockfile.
- Run the published-MCP check from a temporary directory, so npx runs
  the npm package rather than the local, unbuilt workspace.
- Encode the whole package name in npm registry URLs.
- Rewrite the contributing, maintainer and release docs, the package
  AGENTS.md files, and the report-bug skill for direct pull requests.
- Make the CODEOWNERS team own the whole repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@predatorx7 predatorx7 changed the title Make developer-tools the public home for the client and agent packages Make developer-tools the home of the client and agent packages Nov 11, 2026
@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130288249416

Result Head Blocking findings Ponytail suggestions Check
Human review required (incomplete diff) d8e508238961 10 65 View run

Human review required:

  • package-lock.json: GitHub provided no text patch (binary or unavailable).
  • packages/agent/src/mcp/api/operations.gen.ts: GitHub provided no text patch (binary or unavailable).
  • packages/agent/tests/old-devtools.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/page-replay.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/patch-domhandler.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/pod-prover.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/post-publish-browser.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/proof-egress.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/propose-flow.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/provider-versioning.test.ts: text patch exceeds the 1,200,000-character total review limit.

90 more unreviewed changes in the details below.

# Finding
1 packages/agent/samples/demo-server/server.js: __PROVIDER_ID__ and __PROVIDER_VERSION__ are undeclared JavaScript identifiers. Node evaluates these top-level initializers…
2 packages/agent/src/cdp/capture-engine.ts: maxBodyBytes does not actually bound captured response-body memory. onLoadingFinished puts each body into the bounded BodyStore,…
3 packages/agent/src/cdp/container.ts: an actively adopted browser can be killed by reapOrphanedContainers. The container label is set once to the PID that originally created…
4 packages/agent/src/cdp/claims.ts: claims are a read-modify-write file operation with no inter-process exclusion, so they cannot provide the stated guarantee that only one…
5 packages/agent/src/mcp/tools/verification/proxy-callback-events.ts: Forwarder.stop() cannot cancel an in-flight Builder polling or acknowledgement request.…
6 packages/agent/src/old/tools/scaffold-demo-server.ts: scaffold_reclaim_demo_server unconditionally overwrites server.js, package.json, .env.example, and README.md in…
7 packages/agent/src/old/tools/session-logs.ts: session_logs with saveTo calls writeFileSync(path, ...) without checking whether the resolved path already exists. The user-…
8 packages/agent/src/proof/page-replay.ts: pageFetch claims to support “Same-origin only” requests but never verifies that buildReplayRequest(provider, extraSecrets).url has…
9 packages/agent/src/provider/draft.ts: assertPortableMatches can be bypassed with regex-escaped captured values during editDraftProvider. Normalize/decode regex literal…
10 packages/agent/src/provider/secrets.ts — stripTransportHeaders() unconditionally drops csrf, x-csrf, xsrf, x-xsrf, x-csrf-token, and xsrf-token, despite its own…

Human review required for unreviewed changes. Reviewed all 23 diff chunks. Changes required: packages/agent/samples/demo-server/server.js: __PROVIDER_ID__ and __PROVIDER_VERSION__ are undeclared JavaScript identifiers. Node evaluates these top-level initializers before creating the Express server, so npm start immediately fails with ReferenceError: __PROVIDER_ID__ is not defined (and would then fail for the version too). The README says the sample defaults to providerId "example", bu

# Ponytail suggestion
1 packages/agent/.gitignore:L1-2: delete: duplicate ignore rules already covered by the root .gitignore. Nothing.
2 distribution/npm-release.md:L36-53: yagni: duplicate trusted-publisher and environment setup already maintained in docs/maintainers.md. Replace with a link to that guide.
3 packages/agent/README.md:L137: delete: duplicate how_it_works explanation immediately after the Provider-authoring guide section. Nothing; the preceding section already covers…
4 packages/agent/scripts/prepend-shebang.js:L1: shrink: 17-line post-build shebang mutator for one binary. Put #!/usr/bin/env node in the TypeScript entrypoint and let tsc…
5 packages/agent/skill/SKILL.builder.md:L165-169: delete: three-item contents list immediately followed by those headings. Nothing; the headings already provide navigation.
6 packages/agent/skill/SKILL.builder.md:L211-219: delete: provenance rationale repeats the preceding structural-context inspection requirement and the included rewrite-shape…
7 packages/agent/skill/SKILL.builder.md:L250-255: delete: second three-item contents list in a linear, short section. Nothing; retain the existing headings.
8 packages/agent/skill/SKILL.common.md:L35-38: delete: unsolicited sharing side note duplicates the later share_browser_view workflow and its offer criteria. Let that workflow…
9 packages/agent/skill/hash-validation.md:L3-10: delete: non-linked contents list repeats the headings. Nothing.
10 packages/agent/skill/interception.md:L3-10: delete: non-linked contents list repeats the headings. Nothing.

55 more suggestions in the details below.

Full findings and Ponytail review

Human review required:

  • package-lock.json: GitHub provided no text patch (binary or unavailable).

  • packages/agent/src/mcp/api/operations.gen.ts: GitHub provided no text patch (binary or unavailable).

  • packages/agent/tests/old-devtools.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/page-replay.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/patch-domhandler.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/pod-prover.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/post-publish-browser.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/proof-egress.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/propose-flow.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/provider-versioning.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/remap-errors.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/replay.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/secrets.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/share-browser-view.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/start-integration.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/static-asset.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/stub-cdp.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/success-response.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/test-user-script.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/to-version.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/to-zod.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/utils.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/verification-checks.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/wait-for-ai-session.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/wait-for-login.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/zk-files.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tsconfig.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tsconfig.test.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/.gitignore: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/AGENTS.md: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/LICENSE: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/README.md: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/package.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/api.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/attestor-proof.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/canonical.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/client.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/consts.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/eip191.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/enckeys.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/encoding.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/errors.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/feature-flags.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/jwks.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/keypair.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/destination.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/device.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/environment.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/errors.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/extension.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/flow.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/mobile.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/modal.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/options.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/portal.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/qr.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/target.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/vendor/qrcodegen.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-hash.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-recipe.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-trust-constants.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-types.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-verification-error.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/reclaim.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/request-proof.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/result.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/routes.gen.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/secp.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/tee-binding.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/types/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/types/openapi.gen.ts: GitHub provided no text patch (binary or unavailable).

  • packages/client/src/types/openapi.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verification-clients.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verify-attestor-tee.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verify-tee.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/api.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/client.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/crypto-roundtrip.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/fetch.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-device.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-extension.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-fakes.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-flow.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-modal.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-target.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/reclaim.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/result-security.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/tee-binding.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/verification-clients.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tsconfig.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tsconfig.test.json: text patch exceeds the 1,200,000-character total review limit.

  • scripts/bump-version.ts: text patch exceeds the 1,200,000-character total review limit.

  • scripts/check-builder-mcp.mjs: text patch exceeds the 1,200,000-character total review limit.

  • scripts/prepare-builder-registry.mjs: text patch exceeds the 1,200,000-character total review limit.

  • scripts/release-plan.mjs: text patch exceeds the 1,200,000-character total review limit.

  • scripts/sync-version.ts: text patch exceeds the 1,200,000-character total review limit.

  • tests/release-plan.test.mjs: text patch exceeds the 1,200,000-character total review limit.

  • tsconfig.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/samples/demo-server/server.js: __PROVIDER_ID__ and __PROVIDER_VERSION__ are undeclared JavaScript identifiers. Node evaluates these top-level initializers before creating the Express server, so npm start immediately fails with ReferenceError: __PROVIDER_ID__ is not defined (and would then fail for the version too). The README says the sample defaults to providerId "example", but no substitution mechanism is included in this sample's package.json or documented setup. Smallest safe fix: ship valid defaults, e.g. const providerId = "example"; const providerVersion = undefined;, or add and document a generation/substitution step that always replaces both placeholders before the sample is run.

  • packages/agent/src/cdp/capture-engine.ts: maxBodyBytes does not actually bound captured response-body memory. onLoadingFinished puts each body into the bounded BodyStore, but also assigns the same full string to CapturedRequest.responseBody in the unbounded requests map. Evicting an entry from BodyStore therefore releases no body retained by requests; a long capture can grow without limit despite the configured cap. Smallest safe fix: make BodyStore the sole body owner and retrieve bodies through it, or remove/clear responseBody from the corresponding captured request whenever the body is evicted (including the oversized-single-body case).

  • packages/agent/src/cdp/container.ts: an actively adopted browser can be killed by reapOrphanedContainers. The container label is set once to the PID that originally created it, but adoption adds claims from later processes without changing that label. If process A starts a container, process B adopts it, and A exits, a subsequent startContainer in process C sees A's dead owner label and removes the container even though B has a live claim and is using it. Smallest safe fix: before reaping a dead labeled owner, consult the live slot claims and do not remove a container with any live claimant (or otherwise maintain an ownership record that is atomically transferred/updated on adoption).

  • packages/agent/src/cdp/claims.ts: claims are a read-modify-write file operation with no inter-process exclusion, so they cannot provide the stated guarantee that only one session uses a slot. Two processes can both read an empty claim file and each write a file containing only its own token. The later writer erases the other live claim; when it releases, release() sees no remaining claimant and stops the shared container while the erased process is still using it. Smallest safe fix: serialize read/claim-or-release/write with an inter-process lock (and use a unique temporary file for the atomic replace), then choose and claim a slot within that same critical section.

  • packages/agent/src/mcp/tools/verification/proxy-callback-events.ts: Forwarder.stop() cannot cancel an in-flight Builder polling or acknowledgement request. proxyCallbackEventsTool constructs orgClient(secret, deps) without a signal, while Forwarder.#loop() awaits #tick() and stop() awaits that loop. A stalled ListCallbackEvents/AcknowledgeCallbackEvents request can therefore make an explicit stop and MCP shutdown hang indefinitely. Smallest safe fix: construct/use the forwarder's ReclaimClient with this.#abort.signal (or supply that signal on each API call), so aborting the forwarder cancels those requests.

  • packages/agent/src/old/tools/scaffold-demo-server.ts: scaffold_reclaim_demo_server unconditionally overwrites server.js, package.json, .env.example, and README.md in any supplied directory, including an existing project directory. For example, a normal targetDir: "." invocation replaces the project's package manifest and server source with the sample files, causing immediate data loss. Smallest safe fix: refuse when any destination file already exists, or add an explicit overwrite option that defaults to false and is only used after confirmation; mark the overwrite path destructive.

  • packages/agent/src/old/tools/session-logs.ts: session_logs with saveTo calls writeFileSync(path, ...) without checking whether the resolved path already exists. The user-directed absolute-path support means an invocation can silently replace any writable file with NDJSON diagnostic output, including project source/configuration files. Smallest safe fix: open with exclusive creation / reject an existing destination by default, and require a separate explicit overwrite flag for replacement (with destructive tool metadata on that path).

  • packages/agent/src/proof/page-replay.ts: pageFetch claims to support “Same-origin only” requests but never verifies that buildReplayRequest(provider, extraSecrets).url has the attached page's origin. On the authenticated path, authenticatedPageFetch passes every non-Cookie captured secret (including Authorization and other bearer headers) into that request. A crafted or malformed provider whose URL is an attacker-controlled origin can therefore cause the attached browser to send those credentials to that origin; CORS does not prevent the outbound request, and an attacker can permit the necessary preflight. Smallest safe fix: before executing fetch, reject URLs whose origin differs from the attached tab’s location.origin (for example, perform the comparison inside the Runtime.evaluate expression before the fetch), preserving the existing error path.

  • packages/agent/src/provider/draft.ts: assertPortableMatches can be bypassed with regex-escaped captured values during editDraftProvider. Normalize/decode regex literal escapes before scanning match and redaction text for all captured target values, then reject any match.

  • packages/agent/src/provider/secrets.ts — stripTransportHeaders() unconditionally drops csrf, x-csrf, xsrf, x-xsrf, x-csrf-token, and xsrf-token, despite its own contract saying it is used on the raw live per-user verification capture. These headers are commonly required alongside cookies for authenticated state-changing and API requests; removing them means the attestor replay lacks the current user's CSRF credential and is rejected (typically 403), making affected providers unverifiable. Do not strip CSRF headers from the live secret-header path. Keep them classified as secrets and exclude them only from persisted/public draft data if necessary.

Ponytail suggestions:

  • packages/agent/.gitignore:L1-2: delete: duplicate ignore rules already covered by the root .gitignore. Nothing.
  • distribution/npm-release.md:L36-53: yagni: duplicate trusted-publisher and environment setup already maintained in docs/maintainers.md. Replace with a link to that guide.
  • packages/agent/README.md:L137: delete: duplicate how_it_works explanation immediately after the Provider-authoring guide section. Nothing; the preceding section already covers on-demand topics and installation.
  • packages/agent/scripts/prepend-shebang.js:L1: shrink: 17-line post-build shebang mutator for one binary. Put #!/usr/bin/env node in the TypeScript entrypoint and let tsc preserve it; remove this script and its build invocation.
  • packages/agent/skill/SKILL.builder.md:L165-169: delete: three-item contents list immediately followed by those headings. Nothing; the headings already provide navigation.
  • packages/agent/skill/SKILL.builder.md:L211-219: delete: provenance rationale repeats the preceding structural-context inspection requirement and the included rewrite-shape guidance. Keep the one-line requirement that matches and redactions use surrounding context.
  • packages/agent/skill/SKILL.builder.md:L250-255: delete: second three-item contents list in a linear, short section. Nothing; retain the existing headings.
  • packages/agent/skill/SKILL.common.md:L35-38: delete: unsolicited sharing side note duplicates the later share_browser_view workflow and its offer criteria. Let that workflow introduce sharing only when applicable.
  • packages/agent/skill/hash-validation.md:L3-10: delete: non-linked contents list repeats the headings. Nothing.
  • packages/agent/skill/interception.md:L3-10: delete: non-linked contents list repeats the headings. Nothing.
  • packages/agent/skill/js-sdk-integration.md:L42-51: delete: unused optional-init configuration menu in the minimal integration path. Pass providerId as the final argument.
  • packages/agent/skill/js-sdk-integration.md:L61-65: delete: speculative correlation-metadata setup with no later use in this guide. Nothing replaces it.
  • packages/agent/src/authoring/backend.ts:L17-21: delete: unused SecretParams type. Nothing; also remove its barrel export at packages/agent/src/authoring/index.ts:L10.
  • packages/agent/src/cdp/capture-engine.ts:L124-132: shrink: separate empty-MIME guard and prefix branch. return STATIC_ASSET_MIME_PREFIXES.some((p) => m.startsWith(p)) || STATIC_ASSET_MIME_EXACT.has(m).
  • packages/agent/src/cdp/client.ts:L148: delete: emits the private generic event channel that CdpTabClient never exposes or subscribes to. Nothing replaces it.
  • packages/agent/src/mcp/api/tools.ts:L91: delete: isOperationArgs repeats the MCP SDK’s schema validation but only checks that args is an object. Pass args as IOperationArgs<typeof opId> to caller.call and delete isOperationArgs (L121-126).
  • packages/agent/src/mcp/tools/agent/attach.ts:L20: yagni: Singleton SHAREABLE_MODES set. Use the existing localView boolean in place of SHAREABLE_MODES.has(mode).
  • packages/agent/src/mcp/tools/agent/build.ts:L69-71: shrink: Three-line capture-tools append loop. tools.push(...captureTools(state.attach, state.captures)).
  • packages/agent/src/mcp/tools/agent/build.ts:L73-75: shrink: Three-line session-tools append loop. tools.push(...sessionTools(state.attach, state.captures)).
  • packages/agent/src/mcp/tools/agent/build.ts:L78-80: shrink: Three-line live-view-tools append loop. tools.push(...liveViewTools(state.attach)).
  • packages/agent/src/mcp/tools/agent/build.ts:L82-84: shrink: Three-line pod-proof-tools append loop. tools.push(...podProofTools(state.attach, state.captures)).
  • packages/agent/src/mcp/tools/agent/build.ts:L91-93: shrink: Three-line shared-authoring-tools append loop. tools.push(...sharedAuthoringTools(state.captures)).
  • packages/agent/src/mcp/tools/agent/build.ts:L97-99: shrink: Three-line draft-tools append loop. tools.push(...draftTools(state.captures)).
  • packages/agent/src/mcp/tools/agent/find.ts:L44-48: shrink: Snippet helper stores a one-use start offset. const snip = (body, idx, len) => body.slice(Math.max(0, idx - 40), Math.min(body.length, idx + len + 40)).
  • net: -16 lines possible.
  • packages/agent/src/mcp/tools/agent/proof.ts:L14-20: yagni: two one-call directory wrapper functions. Inline join(reclaimHomeDirPath(), 'claims' | 'proof-runs') at their call sites.
  • packages/agent/src/mcp/tools/agent/proof.ts:L91-103: shrink: manual byte-array validation loop. return v.length > 0 && v.every(x => typeof x === 'number' && Number.isInteger(x) && x >= 0 && x <= 255);.
  • packages/agent/src/mcp/tools/agent/session.ts:L50-65: delete: reset_session duplicates dispose_browser exactly, including capture reset, browser disposal, and kept-script clearing. dispose_browser.
  • packages/agent/src/mcp/tools/authenticate/decrypt-key.ts:L24-L41: yagni: single-caller resolveDecryptKeyInput layer. Inline its env/file fallback in resolveDecryptionKey.
  • packages/agent/src/mcp/tools/verification/read-callback-events.ts:L20: shrink: duplicate seven-line RESULT_EVENTS set already maintained in result.ts. Export and import RESULT_EVENTS from result.ts.
  • packages/agent/src/mcp/tools/verification/proxy-callback-events.ts:L3: shrink: local sleepFor duplicates the exported callback-listener helper. Import sleepFor from callback-listener.ts and delete the local helper.
  • packages/agent/src/mcp/tools/verification/proxy-callback-events.ts:L68-69: delete: ProxyDeps.sleep redeclares the identical member inherited from CallbackDeps. Inherit CallbackDeps.sleep.
  • packages/agent/src/mcp/tools/mode/mode.ts:L92-93: shrink: read the config twice to extract two fields. const { mode: persisted, old_devtools: oldIdentity } = config.read() ?? {}.
  • packages/agent/src/mcp/tools/index.ts:L1-3: delete: barrel import-policy comment. Nothing replaces it.
  • packages/agent/src/mcp/tools/mode/index.ts:L1-2: delete: barrel import-policy comment. Nothing replaces it.
  • packages/agent/src/mcp/tools/verification/index.ts:L1: delete: barrel description comment. Nothing replaces it.
  • packages/agent/src/old/login-cdp.ts:L47-79: yagni: IndexedDB fallback for a hypothetical Firebase persistence change. Return null after the documented localStorage scan.
  • packages/agent/src/old/login-cdp.ts:L176-248: yagni: separate interactive-page diagnosis and timeout branch. One generic login-timeout error; remove pageIsInteractive.
  • packages/agent/src/old/to-register.ts:L13-14: shrink: two single-purpose default constants. Inline {{DYNAMIC_GEO}} and true at their three use sites.
  • packages/agent/src/old/to-register.ts:L146: shrink: one-use sourceRedactions alias. Map (provider.responseRedactions ?? []) directly.
  • packages/agent/src/old/to-register.ts:L252-263: shrink: block-bodied map that only returns an object. return requests.map(req => ({ ... })).
  • packages/agent/src/old/to-register.ts:L372-374: yagni: exported bumpPatchString is only a zero-value alias. Call resolveNewVersionString(versions) directly.
  • packages/agent/src/old/tools/link-app.ts:L6-12: yagni: one-call buildLinkMessage wrapper. Inline its template literal at the signing call.
  • packages/agent/src/old/tools/publish.ts:L91-228,L510-519: yagni: Accepting both provider and providers duplicates the request schema and requires input-normalization logic. Keep only providers and require a one-item array for the common case.
  • packages/agent/src/old/tools/session-logs.ts:L31-42,L231-233,L344-395: yagni: Per-tool presentation layer that hoists context and renames/conditionally omits raw log fields. Return chronological SessionLogRow[] entries directly.
  • packages/agent/src/paths.ts:L6-10: yagni: reclaimHomeDirPath is a one-line alias with no added behavior. Import and call reclaimHome directly.
  • packages/agent/src/proof/page-replay.ts:L81-96: yagni: authenticatedPageFetch is a one-caller wrapper. Inline its cookie-filtering and pageFetch call in replayProviderInPage.
  • packages/agent/src/proof/check-matchers.ts:L224-227: yagni: silentLogger wraps one LOGGER.child call. Initialize logger directly with LOGGER.child({ scope: 'check-matchers' }, { level: 'silent' }).
  • packages/agent/src/proof/pod-prover.ts:L133-135: yagni: b64ToBytes has one call site. Inline new Uint8Array(Buffer.from(sig.claim_signature, 'base64')).
  • packages/agent/src/proof/proof-core.ts:L34-38: shrink: parenthesized multi-line URL return. return override ?? attestorUrlOverride() ?? FALLBACK_ATTESTOR_URL.
  • packages/agent/src/proof/debug-response-dump.ts:L46-48: native: manual split/join replacement loop. value = value.replaceAll({{${key}}}, () => val).
  • packages/agent/src/provider/dom-xpath.ts:L22-115: yagni: generated-token durability scoring and candidate metadata/ranking. Emit candidates in the existing explicit priority order and return the first uniquely verified XPath.
  • packages/agent/src/proof/replay.ts:L39-42: stdlib: manual header-map construction. Object.fromEntries(Object.entries(provider.headers ?? {}).map(([k, v]) => [k, expandTemplate(v, params)])).
  • packages/agent/src/provider/constraints.ts:L22-35: shrink: manual signature-header search loop. const h = SIGNATURE_HEADERS.find((h) => reqHeadersLower[h]); if(h) concerns.push(...).
  • packages/agent/src/provider/constraints.ts:L62-76: shrink: manual CSRF-header search loop. const h = CSRF_HEADERS.find((h) => reqHeadersLower[h]); if(h) concerns.push(...).
  • packages/agent/src/provider/draft.ts:L91-105: stdlib: manual filtered-header copy. Object.fromEntries(Object.entries(headers).filter(([, v]) => !isVolatileHeaderValue(v))).
  • packages/agent/src/provider/injection-doc.ts:L1: delete: 16-line migration rationale embedded beside three constants. Nothing replaces it; the on-demand guides and git history hold this context.
  • packages/agent/src/provider/matcher.ts:L67-79: shrink: inferValueClass(target) runs twice to validate hashability and choose the fallback class. Store it once: const inferred = inferValueClass(target); if(hash && !inferred) ...; const valueClass = inferred ?? '[^"<>\\n]+'.
  • packages/agent/src/provider/match-redaction-warning.ts:L1: delete: 10-line restatement of the advisory’s behavior above a small self-describing helper. Nothing replaces it.
  • packages/agent/src/provider/secrets.ts:L74-96: native: isPseudoHeader plus the manual record-filtering loop. return Object.fromEntries(Object.entries(headers).filter(([k]) => !STRIP_REQUEST_HEADERS.has(k.toLowerCase()) && !k.startsWith(':'))).
  • packages/agent/tests/container.test.ts:L54-58: delete: loopback loop repeats the preceding exact port-mapping assertion. Nothing replaces it.
  • packages/agent/tests/container.test.ts:L124-133: delete: runtime assertions that an empty object omits optional TypeScript properties. Nothing replaces it.
  • packages/agent/tests/draft.test.ts:L493-505: delete: no-conflict baseline repeats the successful email auto-OPRF draft at L443-453. Nothing replaces it.
  • packages/agent/tests/draft.test.ts:L532-543: delete: no-conflict baseline repeats the successful ordinary draft calls already exercised throughout this suite. Nothing replaces it.
  • packages/agent/tests/normalize.test.ts:L36-40: delete: duplicate bare-ASCII normalization coverage already asserted above. Nothing replaces it.

net: -583 lines possible.

predatorx7 and others added 3 commits November 11, 2026 08:51
Edit `version` in the root package.json and run `npm run version:bump`
(or pass the version, which sets the root too). The script propagates it
to both packages, the agent's client pin, the plugin and marketplace
manifests, and the lockfile.

CI reruns the bump and fails on any diff, so a version edited by hand
can't drift. The release plan also refuses to publish when the root
version differs from the packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove the separate sync-version script. Run on its own, it copied the
latest npm version into the manifests, which rolled them back between a
bump and its release and failed CI. version:bump now rewrites the plugin
and marketplace manifests itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130298840435

Result Head Blocking findings Ponytail suggestions Check
Superseded by a new commit 77813df0c0d2 0 0 View run

The pull-request head changed while AI review was running.

@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130300072907

Result Head Blocking findings Ponytail suggestions Check
Superseded by a new commit 0fdfa86a80a7 0 0 View run

The pull-request head changed while AI review was running.

@reclaim-pr-agent

Copy link
Copy Markdown

Reclaim PR Agent review · run 130301150741

Result Head Blocking findings Ponytail suggestions Check
Human review required (incomplete diff) b1763d732c3c 13 38 View run

Human review required:

  • package-lock.json: GitHub provided no text patch (binary or unavailable).
  • packages/agent/src/mcp/api/operations.gen.ts: GitHub provided no text patch (binary or unavailable).
  • packages/agent/tests/old-devtools.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/org-token-tool.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/page-replay.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/patch-domhandler.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/pod-prover.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/proof-egress.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/propose-flow.test.ts: text patch exceeds the 1,200,000-character total review limit.
  • packages/agent/tests/provider-versioning.test.ts: text patch exceeds the 1,200,000-character total review limit.

95 more unreviewed changes in the details below.

# Finding
1 packages/agent/samples/demo-server/server.js: const providerId = __PROVIDER_ID__; and const providerVersion = __PROVIDER_VERSION__; are undeclared JavaScript identifiers.…
2 packages/agent/skill/js-sdk-integration.md: The callback example treats any proof that passes verifyProof(proof, { providerId }) as an accepted result, while…
3 packages/agent/src/tools/registry.ts — extendTool widens only definition.inputSchema but reuses tool.handler, whose closure still parses arguments using the original,…
4 packages/agent/src/authoring/tools.ts — test_user_script does not remove a non-kept script when called without navigateUrl. Page.addScriptToEvaluateOnNewDocument persists…
5 packages/agent/src/cdp/capture-engine.ts: maxBodyBytes does not actually bound captured-response memory. onLoadingFinished stores each decoded body in BodyStore, but also…
6 packages/agent/src/cdp/capture-engine.ts: completed non-static requests are never removed from the private inFlight map. Every API request retains its URL, headers, and…
7 packages/agent/src/cdp/container.ts: startContainer claims a slot before image pulling and docker run, but only releases that claim in the readiness-timeout catch path. A…
8 packages/agent/src/mcp/tools/agent/attach.ts: A prior explicit attach_browser({ mode: "attach", port: 9333 }) persists { attachMode: "attach", port: 9333 }. A later…
9 packages/agent/src/mcp/tools/authenticate/issue.ts: issueTool always calls writeEthKey, which upserts RECLAIM_PRIVATE_KEY in .env and therefore replaces an existing…
10 packages/agent/src/provider/draft.ts: assertPortableMatches detects baked captured values with bare.includes(v) after removing only {{...}} placeholders. It does not…

3 more findings in the details below.

Human review required for unreviewed changes. Reviewed all 23 diff chunks. Changes required: packages/agent/samples/demo-server/server.js: const providerId = __PROVIDER_ID__; and const providerVersion = __PROVIDER_VERSION__; are undeclared JavaScript identifiers. Running the documented npm start evaluates these at module load and immediately throws ReferenceError: __PROVIDER_ID__ is not defined, so the sample described in README.md cannot serve any endpoint. This also contradicts the

# Ponytail suggestion
1 packages/agent/.gitignore:L1-2: delete: ignores already covered by root node_modules/ and packages/*/lib/ patterns. Nothing replaces it.
2 packages/agent/.test.env:L1-6: shrink: six-line explanation for a two-variable test fixture. # Test-only deterministic, non-secret values.
3 packages/agent/README.md:L151-153: delete: second explanation of the on-demand how_it_works guide immediately repeats the Provider-authoring guide section. Nothing replaces it.
4 packages/agent/samples/demo-server/server.js:L103-106: delete: serializing and returning request although the bundled /verify client consumes only requestUrl. Return `{…
5 packages/agent/scripts/prepend-shebang.js:L7-17: yagni: BIN_FILES collection and loop for the sole binary. Directly read and write lib/mcp-bin.js.
6 packages/agent/skill/SKILL.builder.md:L342-345: delete: duplicate run_proof network-error routing immediately before the shared prove-tail, which already provides the same…
7 packages/agent/skill/js-sdk-integration.md:L49-54: yagni: empty options object with three commented opt-ins in the basic path. Omit the fourth init argument.
8 packages/agent/skill/js-sdk-integration.md:L63-67: delete: unused correlation-context example with no later retrieval. Nothing.
9 packages/agent/skill/js-sdk-integration.md:L72-76: delete: request-rehydration digression in the create-request quickstart. Nothing.
10 packages/agent/skill/js-sdk-integration.md:L120: delete: deprecated-context gotcha made irrelevant by removing the unused context example. Nothing.

28 more suggestions in the details below.

Full findings and Ponytail review

Human review required:

  • package-lock.json: GitHub provided no text patch (binary or unavailable).

  • packages/agent/src/mcp/api/operations.gen.ts: GitHub provided no text patch (binary or unavailable).

  • packages/agent/tests/old-devtools.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/org-token-tool.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/page-replay.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/patch-domhandler.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/pod-prover.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/proof-egress.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/propose-flow.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/provider-versioning.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/remap-errors.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/replay.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/secrets.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/share-browser-view.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/start-integration.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/static-asset.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/strip-pseudo-headers.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/stub-cdp.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/success-response.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/test-user-script.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/to-version.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/to-zod.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/utils.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/verification-checks.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/wait-for-ai-session.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/wait-for-login.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tests/zk-files.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tsconfig.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/tsconfig.test.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/AGENTS.md: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/LICENSE: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/README.md: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/package.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/api.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/attestor-proof.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/canonical.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/client.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/consts.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/eip191.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/enckeys.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/encoding.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/errors.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/feature-flags.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/jwks.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/keypair.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/destination.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/device.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/environment.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/errors.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/extension.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/flow.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/mobile.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/modal.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/options.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/portal.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/qr.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/target.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/launch/vendor/qrcodegen.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-hash.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-recipe.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-trust-constants.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-types.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/proof-verification-error.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/reclaim.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/request-proof.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/result.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/routes.gen.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/secp.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/tee-binding.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/types/index.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/types/openapi.gen.ts: GitHub provided no text patch (binary or unavailable).

  • packages/client/src/types/openapi.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verification-clients.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verify-attestor-tee.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/src/verify-tee.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/api.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/client.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/crypto-roundtrip.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/fetch.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-device.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-extension.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-fakes.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-flow.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-modal.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/launch-target.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/reclaim.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/result-security.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/tee-binding.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tests/verification-clients.test.ts: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tsconfig.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/client/tsconfig.test.json: text patch exceeds the 1,200,000-character total review limit.

  • plugin.json: text patch exceeds the 1,200,000-character total review limit.

  • reclaim/.claude-plugin/plugin.json: text patch exceeds the 1,200,000-character total review limit.

  • reclaim/.codex-plugin/plugin.json: text patch exceeds the 1,200,000-character total review limit.

  • reclaim/.cursor-plugin/plugin.json: text patch exceeds the 1,200,000-character total review limit.

  • reclaim/.github/plugin/plugin.json: text patch exceeds the 1,200,000-character total review limit.

  • scripts/bump-version.ts: text patch exceeds the 1,200,000-character total review limit.

  • scripts/check-builder-mcp.mjs: text patch exceeds the 1,200,000-character total review limit.

  • scripts/prepare-builder-registry.mjs: text patch exceeds the 1,200,000-character total review limit.

  • scripts/release-plan.mjs: text patch exceeds the 1,200,000-character total review limit.

  • scripts/sync-version.ts: text patch exceeds the 1,200,000-character total review limit.

  • tests/release-plan.test.mjs: text patch exceeds the 1,200,000-character total review limit.

  • tsconfig.json: text patch exceeds the 1,200,000-character total review limit.

  • packages/agent/samples/demo-server/server.js: const providerId = __PROVIDER_ID__; and const providerVersion = __PROVIDER_VERSION__; are undeclared JavaScript identifiers. Running the documented npm start evaluates these at module load and immediately throws ReferenceError: __PROVIDER_ID__ is not defined, so the sample described in README.md cannot serve any endpoint. This also contradicts the README's claim that it defaults to providerId "example". Smallest safe fix: commit runnable defaults, e.g. const providerId = "example"; const providerVersion = undefined;, or add and document a generation/substitution step that replaces both tokens before npm start (with the default substitution producing "example").

  • packages/agent/skill/js-sdk-integration.md: The callback example treats any proof that passes verifyProof(proof, { providerId }) as an accepted result, while setContext(sessionId, ...) is presented as optional and the handler never reads or checks it. A valid proof for the same provider can therefore be replayed, or be submitted from another request/session, to an application's webhook and be accepted as the current request's result. This is a security defect for the documented backend integration because proof validity alone does not establish that it belongs to the pending user/session/action the application is completing. Smallest safe fix: make a cryptographically unguessable, server-stored request/session correlation value mandatory; include it with setContext; in the webhook, extract and compare the returned context against the outstanding request before accepting the proof, and atomically mark that correlation value consumed to reject replays.

  • packages/agent/src/tools/registry.ts — extendTool widens only definition.inputSchema but reuses tool.handler, whose closure still parses arguments using the original, narrow schema created by defineTool. Zod object parsing strips unknown keys by default, so MCP-added fields such as captureId never reach resolveBackend in sharedAuthoringTools; all of the shared MCP authoring tools consequently resolve args.captureId as undefined and fail with “no capture undefined.” run_proof also silently loses its MCP-only options. Smallest safe fix: make the runtime parser used by an extended tool be the merged schema and invoke an unwrapped implementation, or otherwise preserve extension fields through the base parse; do not merely change the advertised schema. Keep validation of both base and added fields intact.

  • packages/agent/src/authoring/tools.ts — test_user_script does not remove a non-kept script when called without navigateUrl. Page.addScriptToEvaluateOnNewDocument persists across every future document, while the stated follow-up behavior is not implemented: a later call with navigateUrl installs and removes its own new identifier, not the prior identifier. Thus a model-generated script intended for a one-shot test can continue executing on subsequent logged-in navigations, including redirects or data-exfiltration behavior. Smallest safe fix: retain the pending one-shot script identifier per AuthoringBackend session and remove that exact identifier after its next navigation/load (and when superseded or the session ends); alternatively require navigateUrl for non-kept scripts.

  • packages/agent/src/cdp/capture-engine.ts: maxBodyBytes does not actually bound captured-response memory. onLoadingFinished stores each decoded body in BodyStore, but also assigns the same body to CapturedRequest.responseBody in the unbounded requests map. When BodyStore evicts an entry, the full response remains reachable through requests, so a long capture can retain arbitrary amounts of response data despite the advertised 200 MiB limit. Smallest safe fix: make one bounded store authoritative—e.g. do not retain responseBody on the request, or have eviction clear the corresponding request field—and ensure request retrieval uses the bounded lookup/result semantics.

  • packages/agent/src/cdp/capture-engine.ts: completed non-static requests are never removed from the private inFlight map. Every API request retains its URL, headers, and request body for the lifetime of the capture even after responseReceived/loadingFinished, independently of the body-store limit. This is unbounded memory growth and unnecessarily retains credentials/request payloads during ordinary extended browsing. Smallest safe fix: delete the in-flight entry once its data has been copied into the finalized CapturedRequest (normally at onResponseReceived), while preserving any state needed for late extra-info handling.

  • packages/agent/src/cdp/container.ts: startContainer claims a slot before image pulling and docker run, but only releases that claim in the readiness-timeout catch path. A pull failure, docker run failure, or failure in describe leaves a live process's claim in browser-runtime-claims.json even though no usable browser exists. Repeated failures can consume all four slots and prevent other sessions from starting containers until the failed agent processes exit. Smallest safe fix: wrap all work after claim(name) in a success/ownership guard with finally release on every failure; transfer ownership only after returning a valid ContainerBrowser handle.

  • packages/agent/src/mcp/tools/agent/attach.ts: A prior explicit attach_browser({ mode: "attach", port: 9333 }) persists { attachMode: "attach", port: 9333 }. A later attach_browser({}) selects dedicated, but connect() still uses persisted?.port; since a browser is already listening there, it attaches to the developer's pre-existing Chrome rather than launching/using the dedicated Reclaim profile. This contradicts the default-mode privacy boundary and can silently expose/capture traffic from the developer's personal browser. Smallest safe fix: only reuse a persisted port when it belongs to the selected mode (for example, use persisted.port only when persisted.attachMode === mode), otherwise use the dedicated default port; preserve explicit port precedence.

  • packages/agent/src/mcp/tools/authenticate/issue.ts: issueTool always calls writeEthKey, which upserts RECLAIM_PRIVATE_KEY in .env and therefore replaces an existing signing key without any enforced confirmation or overwrite flag. This is concrete destructive data loss: the prior private key is not backed up and may be required to retain the proof-owner identity or access data associated with it. The tool description's instruction to confirm is not enforcement, while its destructiveHint is explicitly false. Smallest safe fix: first resolve/check for an existing project .env key and reject unless an explicit replace: true input is supplied (marked destructive); alternatively preserve the existing key and return its address. Do not overwrite the existing key implicitly.

  • packages/agent/src/provider/draft.ts: assertPortableMatches detects baked captured values with bare.includes(v) after removing only {{...}} placeholders. It does not normalize regex escapes for the general target scan. Consequently, an edit can embed a captured value literally but escaped—for example, a captured SSN 123-45-6789 can be added as 123\\-45\\-6789 in a response matcher/redaction. The portability check does not find the raw target string, but the regex still matches and the persisted provider contains the author’s PII, defeating the stated anti-leak gate. This is reachable through editDraftProvider, which accepts replacement matchers/redactions. Smallest safe fix: normalize/decode regex literal escapes before checking every captured target (including common \\xNN/\\uNNNN forms), or otherwise reject edited regexes that contain an encoded literal of a captured value unless it is represented by the approved placeholder/named-capture mechanism; apply the same check to both matchers and redactions.

  • packages/agent/src/provider/normalize.ts: normalizeCandidates eagerly enumerates every possible integer represented by a compact k/M/B value. For example, input 1.2B creates roughly 100,000,000 candidate strings (1,150,000,000 through 1,249,999,999). This helper is reached from draft/matcher processing of caller-supplied target values, so a normal-looking target can exhaust CPU and memory and make the agent unavailable. Smallest safe fix: impose a strict, small maximum expansion size (and reject or avoid range expansion above it) rather than materializing arbitrarily large suffix ranges.

  • packages/agent/src/provider/matcher.ts: OPRF_MAX_BYTES is documented as an attestor-enforced 62-byte limit, but synthesizeMatcher never checks it when hash is explicitly requested. defaultSensitiveHash happens to avoid the issue, but a caller can supply hash for a hashable value exceeding 62 UTF-8 bytes; this publishes a matcher that fails later at attestation/proof time. Smallest safe fix: when hash is set, reject targets whose Buffer.byteLength(target, 'utf8') > OPRF_MAX_BYTES before synthesizing the redaction.

  • packages/agent/src/provider/secrets.ts: STRIP_REQUEST_HEADERS removes CSRF headers (csrf, x-csrf-token, x-xsrf, etc.) before the secret/public split. These tokens are deliberately per-user, but during verification the captured token belongs to the current verifying user and must be replayed as a secret header. Removing it makes requests to CSRF-protected origins fail (typically 403), even though the token would not need to be persisted in the public recipe. Smallest safe fix: remove the CSRF header names from STRIP_REQUEST_HEADERS so they flow into splitSecrets and are supplied through the secret/runtime credential channel; continue stripping only actual transport/structural headers.

Ponytail suggestions:

  • packages/agent/.gitignore:L1-2: delete: ignores already covered by root node_modules/ and packages/*/lib/ patterns. Nothing replaces it.
  • packages/agent/.test.env:L1-6: shrink: six-line explanation for a two-variable test fixture. # Test-only deterministic, non-secret values.
  • packages/agent/README.md:L151-153: delete: second explanation of the on-demand how_it_works guide immediately repeats the Provider-authoring guide section. Nothing replaces it.
  • packages/agent/samples/demo-server/server.js:L103-106: delete: serializing and returning request although the bundled /verify client consumes only requestUrl. Return { requestUrl }.
  • packages/agent/scripts/prepend-shebang.js:L7-17: yagni: BIN_FILES collection and loop for the sole binary. Directly read and write lib/mcp-bin.js.
  • packages/agent/skill/SKILL.builder.md:L342-345: delete: duplicate run_proof network-error routing immediately before the shared prove-tail, which already provides the same flow in more detail. The following <!-- common: prove-tail --> guidance.
  • packages/agent/skill/js-sdk-integration.md:L49-54: yagni: empty options object with three commented opt-ins in the basic path. Omit the fourth init argument.
  • packages/agent/skill/js-sdk-integration.md:L63-67: delete: unused correlation-context example with no later retrieval. Nothing.
  • packages/agent/skill/js-sdk-integration.md:L72-76: delete: request-rehydration digression in the create-request quickstart. Nothing.
  • packages/agent/skill/js-sdk-integration.md:L120: delete: deprecated-context gotcha made irrelevant by removing the unused context example. Nothing.
  • packages/agent/src/authoring/backend.ts:L18-20: delete: unused SecretParams interface (and its re-export at index.ts:L10). Nothing replaces it.
  • packages/agent/src/cdp/client.ts:L154: delete: Emits the local EventEmitter's generic event, but CdpTabClient.subscribe cannot subscribe to it and no exposed path consumes it. Nothing replaces it.
  • packages/agent/src/mcp/tools/agent/attach.ts:L27-35: yagni: exported Set containing one shareable mode. Replace SHAREABLE_MODES.has(mode) with mode === 'container' until a second mode is shareable.
  • packages/agent/src/mcp/tools/agent/proof.ts:L14-20: yagni: two path helpers with one caller each. Inline join(reclaimHomeDirPath(), 'claims' | 'proof-runs') at their call sites.
  • packages/agent/src/mcp/tools/agent/proof.ts:L85-99: shrink: manual byte-array validation loop. return v.length > 0 && v.every((x) => typeof x === 'number' && Number.isInteger(x) && x >= 0 && x <= 255).
  • packages/agent/src/mcp/tools/agent/pod-proof.ts:L27: shrink: temporary tool exists only to return [tool]. Return [defineTool(...)] directly.
  • packages/agent/src/mcp/tools/agent/start-integration.ts:L7-8,L50-55: delete: userRequest is accepted but never used—the comment says telemetry records it, but this handler does not. Nothing replaces it.
  • packages/agent/src/mcp/tools/verification/read-callback-events.ts:L21-28: shrink: Duplicate RESULT_EVENTS set already defined in result.ts. Export and import RESULT_EVENTS from result.ts.
  • packages/agent/src/mcp/tools/verification/result.ts:L154-156: shrink: Unused catch binding plus void err. catch { undecryptable.push(item.subscriptionId); continue }.
  • packages/agent/src/old/login-cdp.ts:L50-79: yagni: IndexedDB token-persistence fallback for a hypothetical dashboard persistence change. Keep the localStorage scan and return null when it has no fresh token.
  • packages/agent/src/mcp/tools/verification/wait-for-ai-session.ts:L219-239: shrink: maps copy every candidate, data point, and error field unchanged. Return lookup.candidates, lookup.dataPoints, and lookup.error directly.
  • packages/agent/src/old/to-register.ts:L15: yagni: single-use DEFAULT_USE_PROXY constant. Inline opts.useProxy ?? true.
  • packages/agent/src/old/tools/link-app.ts:L7-13: yagni: one-call buildLinkMessage wrapper. Inline `Link ${appId} to account ${userId} | nonce: ${nonce}` in signEip191.
  • packages/agent/src/old/to-register.ts:L385-391: yagni: bumpPatchString is a no-behavior alias for resolveNewVersionString. Call resolveNewVersionString(versions) directly.
  • packages/agent/src/old/tools/session-logs.ts:L392: shrink: one-use hasEvent wrapper. .filter(entry => !!entry.event_type), then delete the helper.
  • packages/agent/src/proof/attestor.ts:L261-262: shrink: one-use traceEnabled temporary. const capture = agentTraceEnabled() ? makeCaptureLogger() : undefined;.
  • packages/agent/src/proof/attestor.ts:L302-304: shrink: post-construction attestorLogs assignment. Add ...(attestorLogs === undefined ? {} : { attestorLogs }) to errorResult.
  • packages/agent/src/proof/attestor.ts:L322-324: shrink: post-construction attestorLogs assignment. Add ...(attestorLogs === undefined ? {} : { attestorLogs }) to rejected.
  • packages/agent/src/proof/attestor.ts:L331-343: shrink: mutable result plus separate identifier/owner assignments. Build const result: ProofResult with conditional identifier and owner spreads.
  • packages/agent/src/proof/page-replay.ts:L91-99: stdlib: manual loop filters cookie headers. Object.fromEntries(Object.entries(secrets).filter(([key]) => key.toLowerCase() !== 'cookie')).
  • packages/agent/src/proof/pod-prover.ts:L133-135: yagni: one-call b64ToBytes wrapper. bytesToHex(Buffer.from(sig.claim_signature, 'base64')) directly.
  • packages/agent/src/proof/proof-core.ts:L31-33: shrink: parenthesized multi-line nullish-coalescing return. return override ?? attestorUrlOverride() ?? FALLBACK_ATTESTOR_URL;.
  • packages/agent/src/provider/dom-xpath.ts:L157: yagni: candidate metadata plus token-shape stability scoring and sorting every verified XPath for hypothetical future renders. Keep the first uniquely verified emitted selector and yield plain XPath strings.
  • packages/agent/src/provider/secrets.ts:L64-70: shrink: dedicated isPseudoHeader wrapper and its standalone comment. Inline k.startsWith(':') in stripTransportHeaders.
  • packages/agent/src/tools/registry.ts:L112-116: shrink: manually rehydrates ToolDefinition from base. definition: { ...base, description: extra.description ?? base.description, inputSchema }.
  • packages/agent/tests/container.test.ts:L54: delete: loop that rechecks every exact -p mapping starts with loopback after deepEqual already fixes both mappings. Nothing replaces it.
  • packages/agent/tests/container.test.ts:L120: delete: runtime test that reads optional TypeScript fields from {} without exercising buildRunArgs. Nothing replaces it.
  • packages/agent/tests/normalize.test.ts:L35: delete: duplicate plain-ASCII normalization coverage already exercised by the octocat case. Nothing replaces it.

net: -290 lines possible.

@predatorx7
predatorx7 merged commit 6417692 into main Nov 11, 2026
6 checks passed
@predatorx7
predatorx7 deleted the feat/sdk-mirror-home branch November 11, 2026 07:02
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.

4 participants