Skip to content

feat: add VeChain Kit expert agent and website embed#642

Draft
Agilulfo1820 wants to merge 2 commits into
mainfrom
feat/vechain-kit-expert-agent-embed
Draft

feat: add VeChain Kit expert agent and website embed#642
Agilulfo1820 wants to merge 2 commits into
mainfrom
feat/vechain-kit-expert-agent-embed

Conversation

@Agilulfo1820

@Agilulfo1820 Agilulfo1820 commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

  • add the production-ready VeChain Kit Expert bundle, system prompt, guardrails, acceptance suite, official links, and vechain-kit-support Marketplace skill
  • add a reproducible 11-document knowledge corpus generated from 760 VeChain Kit and VeChain AI Skills sources, with source paths, snapshot commits, hashes, and upload-size checks
  • replace the homepage GitBook/Kapa assistant with the Agent Marketplace widget and add the same agent to the playground
  • remove the unused GitBook embed dependency and keep the homepage Get Started CTA clear of the persistent chat launcher

Verification

  • yarn workspace vechain-kit-homepage build
  • yarn workspace vechain-kit-playground build
  • node agent-marketplace/vechain-kit-expert/build-knowledge.mjs
  • git diff --check

Both production builds completed successfully. Next.js reports the pre-existing unsupported eslint next.config option warning.

Summary by CodeRabbit

  • New Features

    • Added the VeChain Kit Expert agent bundle with setup guidance, curated knowledge, official references, support instructions, and validation questions.
    • Added embeddable Agent Marketplace widgets to the homepage and playground.
    • Added comprehensive VeChain Kit guidance covering wallets, transactions, smart accounts, theming, localization, and integrations.
  • Updates

    • Simplified the homepage floating action to a single “Get Started” button that scrolls to Quick Start.
    • Removed the deprecated embedded documentation modal and its related integration.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a production VeChain Kit Expert marketplace bundle with generated knowledge documents, agent instructions, validation material, support skill guidance, and embed integration in the homepage and playground examples.

Changes

VeChain Kit Expert bundle

Layer / File(s) Summary
Agent contract and release workflow
agent-marketplace/vechain-kit-expert/README.md, agent-config.md, system-prompt.md, skill/*, test-questions.md
Defines agent metadata, guardrails, knowledge retrieval behavior, support skill usage, publishing workflow, official links, and acceptance questions.
Knowledge generation and manifest
agent-marketplace/vechain-kit-expert/build-knowledge.mjs, knowledge/manifest.json
Collects repository sources, renders topic documents, validates coverage and size, and records source snapshots, counts, sizes, and hashes.
Generated VeChain Kit references
agent-marketplace/vechain-kit-expert/knowledge/*.md
Adds curated integration, API, provider, wallet, transaction, domain, swap, utility, AI Skills, example, cross-app host, and test knowledge documents.
Homepage embed integration
examples/homepage/package.json, examples/homepage/src/app/..., examples/*/layout.tsx
Removes the GitBook modal and dependency, simplifies the floating CTA, and loads the Agent Marketplace embed script.

Estimated code review effort: 4 (Complex) | ~60 minutes

Suggested reviewers: mikeredmond

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding the VeChain Kit expert agent and embedding it on the website.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/vechain-kit-expert-agent-embed

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview environment deployed!

Preview URL: https://preview.vechainkit.vechain.org/featvechain-kit-expert-agent-embed

@github-actions

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 8.89 MB

ℹ️ View Unchanged
Filename Size
packages/vechain-kit/dist/assets 4.1 kB
packages/vechain-kit/dist/assets-C0RHiZ9a.mjs 51.4 kB
packages/vechain-kit/dist/assets-C0RHiZ9a.mjs.map 74.6 kB
packages/vechain-kit/dist/assets-CZs6EVH8.cjs 58.9 kB
packages/vechain-kit/dist/assets-CZs6EVH8.cjs.map 76.1 kB
packages/vechain-kit/dist/assets/index.cjs 716 B
packages/vechain-kit/dist/assets/index.d.cts 973 B
packages/vechain-kit/dist/assets/index.d.mts 973 B
packages/vechain-kit/dist/assets/index.mjs 718 B
packages/vechain-kit/dist/index-BhZoNazq.d.cts 186 kB
packages/vechain-kit/dist/index-BhZoNazq.d.cts.map 50.5 kB
packages/vechain-kit/dist/index-BnbKPLXG.d.mts 186 kB
packages/vechain-kit/dist/index-BnbKPLXG.d.mts.map 49.3 kB
packages/vechain-kit/dist/index-BwtTabHc.d.mts 5.63 kB
packages/vechain-kit/dist/index-BwtTabHc.d.mts.map 2.99 kB
packages/vechain-kit/dist/index-CGSAbAt3.d.cts 5.63 kB
packages/vechain-kit/dist/index-CGSAbAt3.d.cts.map 2.99 kB
packages/vechain-kit/dist/index.cjs 1.14 MB
packages/vechain-kit/dist/index.cjs.map 2.85 MB
packages/vechain-kit/dist/index.d.cts 24.5 kB
packages/vechain-kit/dist/index.d.mts 24.5 kB
packages/vechain-kit/dist/index.mjs 1.1 MB
packages/vechain-kit/dist/index.mjs.map 2.79 MB
packages/vechain-kit/dist/utils 4.1 kB
packages/vechain-kit/dist/utils-C4gc1L9t.cjs 27.4 kB
packages/vechain-kit/dist/utils-C4gc1L9t.cjs.map 68.2 kB
packages/vechain-kit/dist/utils-DPIscp9_.mjs 22.2 kB
packages/vechain-kit/dist/utils-DPIscp9_.mjs.map 67.5 kB
packages/vechain-kit/dist/utils/index.cjs 2.02 kB
packages/vechain-kit/dist/utils/index.d.cts 3.1 kB
packages/vechain-kit/dist/utils/index.d.mts 3.1 kB
packages/vechain-kit/dist/utils/index.mjs 2.04 kB

compressed-size-action

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note

Due to the large number of review comments, Critical severity comments were prioritized as inline comments.

🟠 Major comments (24)
agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md-677-684 (1)

677-684: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Use the supported dapp-kit version.

This installation command pins @vechain/dapp-kit-react to 2.1.0-rc.1, but the package manifest requires exactly 2.3.2 as both dependency and peer dependency. Following this command can produce incompatible installs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md`
around lines 677 - 684, Update the installation command’s
`@vechain/dapp-kit-react` version to exactly 2.3.2, matching the package
manifest’s dependency and peer dependency requirements; leave the other package
versions unchanged.
agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md-408-408 (1)

408-408: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Correct the documented login-method contract.

The documentation contradicts validateConfig: email requires privy, more is allowed without Privy, and the no-Privy default is only [veworld].

  • agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md#L408-L408: state that email requires Privy and that more remains available without it.
  • agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md#L445-L445: remove the claimed email cross-app fallback.
  • agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md#L519-L520: change the no-Privy default to [veworld] and remove the claim that email no longer throws.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md`
at line 408, Correct the login-method documentation to match validateConfig: at
agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md lines
408-408, state that email requires Privy while more remains available without
it; at lines 445-445, remove the email cross-app fallback claim; and at lines
519-520, set the no-Privy default to [veworld] and remove the claim that email
no longer throws.
agent-marketplace/vechain-kit-expert/knowledge/00-curated-integration-guide.md-9-9 (1)

9-9: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Don't point non-React apps at @vechain/dapp-kit-react. Use @vechain/dapp-kit (and @vechain/dapp-kit-ui for UI) for non-React setups instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/00-curated-integration-guide.md`
at line 9, Correct the integration guidance to direct non-React applications to
`@vechain/dapp-kit`, adding `@vechain/dapp-kit-ui` when UI components are needed;
reserve `@vechain/dapp-kit-react` for React applications requiring lightweight
wallet connection.
agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md-1637-1655 (1)

1637-1655: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Apply complete validation to every documented transfer builder.

The ERC-20, ERC-721, and VET builders perform only partial validation before constructing clauses. Add address validation, strict numeric parsing, and domain checks before ABI encoding or BigInt conversion:

  • agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md#L1637-L1655: validate tokenAddress and require a positive amount.
  • agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md#L1780-L1812: require a valid non-negative integer tokenId.
  • agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md#L1916-L1936: require a strictly positive VET amount.

As per coding guidelines, transaction and contract interaction functions must validate addresses and ensure amounts are positive using BigInt comparisons.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md`
around lines 1637 - 1655, Update buildERC20Clauses
(agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md:1637-1655)
to validate tokenAddress and strictly parse the amount, requiring it to be
positive before ABI encoding. Update the ERC-721 transfer builder (same
file:1780-1812) to validate addresses and require tokenId to be a non-negative
integer before conversion or encoding. Update the VET transfer builder (same
file:1916-1936) to strictly parse the amount and require a positive BigInt value
before constructing clauses.

Source: Coding guidelines

agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md-1432-1441 (1)

1432-1441: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Pass hook-level clauses when per-call clauses are omitted

sendTransactionAdapter allows the hook’s clauses fallback, but it always forwards _clauses ?? []. That drops the configured clauses and can send an empty transaction when callers omit arguments.

Proposed fix
-                const response = await sendTransaction(_clauses ?? [], _delegationUrl, {
+                const response = await sendTransaction(_clauses ?? clauses ?? [], _delegationUrl, {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md`
around lines 1432 - 1441, The sendTransactionAdapter callback validates the
hook-level clauses fallback but does not use it when calling sendTransaction.
Update the sendTransaction invocation in sendTransactionAdapter to forward
_clauses when provided and otherwise use the configured clauses value,
preserving the existing required-clauses validation.
agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md-1169-1173 (1)

1169-1173: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Return the transaction promise. sendTransaction drops the result.sendTransaction(...) promise, so await sendTransaction(...) resolves before submission finishes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md`
around lines 1169 - 1173, Update the sendTransaction callback to return the
promise from result.sendTransaction(clauseBuilder(props), delegationUrl),
preserving its existing arguments and dependency array so callers awaiting
sendTransaction wait for submission completion.
agent-marketplace/vechain-kit-expert/knowledge/50-data-hooks-domains-nfts-swap-staking.md-6004-6009 (1)

6004-6009: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Document the reverted-quote fallback accurately.

The README says reverted quotes are filtered out, but the embedded useSwapQuotes implementation retains them when every candidate reverts (Line [2115]). Clarify that reverted quotes are excluded only when at least one non-reverted quote exists; otherwise the best reverted quote is still returned.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/50-data-hooks-domains-nfts-swap-staking.md`
around lines 6004 - 6009, Update the “Quote Selection” documentation to match
useSwapQuotes: exclude reverted quotes when at least one non-reverted candidate
exists, but retain and return the reverted quote with the highest outputAmount
when all candidates revert.
agent-marketplace/vechain-kit-expert/knowledge/50-data-hooks-domains-nfts-swap-staking.md-6230-6236 (1)

6230-6236: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Do not claim exact outflow matching.

The documented guarantee says the user’s outflow “matches” amountIn, but the implementation only rejects outflows greater than amountIn (Lines [7094]-[7100] and [7121]-[7127]). Either tighten the implementation to require equality or revise the documentation to describe the current upper-bound check; otherwise the agent will overstate the swap-integrity protection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/50-data-hooks-domains-nfts-swap-staking.md`
around lines 6230 - 6236, Update the “Token Flow Verification” documentation to
describe the outflow check as an upper bound: the user’s token outflow must not
exceed amountIn, rather than claiming it exactly matches. Keep the inflow
minimumOutputAmount and ERC20/native VET coverage unchanged.
agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md-336-340 (1)

336-340: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Fix the inverted dark-mode branches.

All three wrappers render the light asset when isDark is true and the dark asset otherwise. This makes dark-mode branding incorrect.

-    return isDark ? <VeBetterIconLight {...props} /> : <VeBetterIconDark {...props} />;
+    return isDark ? <VeBetterIconDark {...props} /> : <VeBetterIconLight {...props} />;

Apply the same correction to VeBetterLogo and VechainIcon.

Also applies to: 415-419, 554-558

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md`
around lines 336 - 340, Correct the `VeBetterIcon` conditional so `isDark`
selects `VeBetterIconDark` and the default branch selects `VeBetterIconLight`;
apply the same branch correction to `VeBetterLogo` and `VechainIcon`.
agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md-1338-1352 (1)

1338-1352: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Make the App Hub fallback SSR-safe.

The normal fetch path guards browser storage, but the error fallback directly references localStorage. If the query runs server-side and the fetch fails, this raises ReferenceError and masks the original error. Use getLocalStorageItem or guard window.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md`
around lines 1338 - 1352, Update the error fallback in useAppHubApps to access
cached data through the SSR-safe getLocalStorageItem helper, or guard
localStorage access with a browser check, so server-side failures rethrow the
original fetch error instead of raising ReferenceError.
agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md-3521-3548 (1)

3521-3548: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Add a request timeout and validate the IPFS response.

The upload can wait indefinitely because fetch has no timeout, and data.IpfsHash is returned without verifying that it exists or is a string. This can report apparent success with invalid data and tie up callers during service outages.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md`
around lines 3521 - 3548, Update uploadBlobToIPFS to abort the fetch request
after a defined timeout using an AbortController and pass its signal to fetch.
After parsing the response, validate that data.IpfsHash exists and is a string
before returning it; otherwise throw an error so the existing catch path reports
the upload failure.
agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md-3903-3924 (1)

3903-3924: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Validate contract addresses before loading contracts.

These contract-call helpers accept arbitrary strings and pass them directly to thor.contracts.load. As per coding guidelines, contract interaction functions must validate addresses with isAddress() before making calls.

Also applies to: 3927-3943, 3955-3971

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md`
around lines 3903 - 3924, Update executeCallClause and the additional
contract-call helpers to validate contractAddress with isAddress() before
calling thor.contracts.load. Reject invalid addresses using the existing
validation/error-handling pattern, and ensure no contract interaction occurs
until validation succeeds.

Source: Coding guidelines

agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md-982-987 (1)

982-987: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Treat cached localStorage JSON as untrusted input.

Malformed or user-edited storage causes JSON.parse to escape the hook and crash its caller. Catch parse failures, remove the invalid cache entry, and return null.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md`
around lines 982 - 987, Update getConnectionCache to treat cached localStorage
data as untrusted: wrap JSON.parse in error handling, remove CACHE_KEY when
parsing fails, and return null for malformed or user-edited entries while
preserving the existing valid-cache behavior.
agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md-1058-1066 (1)

1058-1066: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Avoid reading localStorage during the initial SSR render.

The server returns initialValue, while the browser’s first render may return stored data. When this hook is used in an SSR application, those different renders can produce hydration mismatches. Load persisted state in an effect or gate the client-only render.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md`
around lines 1058 - 1066, Update useLocalStorage so its useState initializer
always returns initialValue without calling getLocalStorageItem during render.
Load and parse the persisted value in a client-side effect after mounting,
updating storedValue through setStoredValue while preserving the existing error
fallback behavior.
agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md-3927-3951 (1)

3927-3951: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Honor the allowFailure contract.

executeMultipleClausesCall exposes an allowFailure generic, but unconditionally throws when any clause fails. Calls instantiated with allowFailure: true therefore receive behavior inconsistent with the declared API. Either remove that parameter or return failure entries when failures are allowed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md`
around lines 3927 - 3951, The executeMultipleClausesCall function must honor its
allowFailure generic instead of always throwing when a clause fails. Preserve
the current exception behavior for allowFailure false, but when allowFailure is
true return the transaction results, including failed entries, with the declared
MultipleClausesCallReturnType; alternatively remove the unused allowFailure
parameter and its related typing if failure results are not supported.
agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md-1454-1475 (1)

1454-1475: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Avoid a module-global QueryClient on SSR. Create it per request on the server and keep the singleton only in the browser, otherwise cached query data can leak between users.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md`
around lines 1454 - 1475, Update getOrCreateQueryClient so the module-level
internalQueryClient singleton is reused only in the browser; when running on the
server, create and return a fresh QueryClient per request. Preserve the existing
QueryClient defaultOptions configuration and avoid storing server instances in
the module-global variable.
agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md-3684-3696 (1)

3684-3696: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Keep this signer out of funded browser flows. randomTransactionUser is re-exported from packages/vechain-kit/src/utils/index.ts and used by client-side wallet/delegator code, so its private key ships in the bundle. If that account ever receives funds, anyone can extract the key and drain it; make it strictly test-only or move signing server-side.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md`
around lines 3684 - 3696, Restrict randomTransactionUser to test-only usage and
remove it from the production utility export path, including its re-export from
utils/index.ts. Ensure client-side wallet and delegator bundles cannot import or
embed the generated private key; move any required signing usage to server-side
code instead.
agent-marketplace/vechain-kit-expert/knowledge/75-vechain-ai-skills.md-2351-2351 (1)

2351-2351: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use getCallClauseQueryKeyWithArgs for calls with arguments.
balanceOf takes an address, so these examples should use the argument-aware helper; getCallClauseQueryKey is for calls without args. This applies to the matching cases at 2377-2382 and 4336-4338 as well.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/knowledge/75-vechain-ai-skills.md` at
line 2351, Replace getCallClauseQueryKey with getCallClauseQueryKeyWithArgs for
the balanceOf call and pass its address argument through the argument-aware
helper. Apply the same update to the matching balanceOf examples referenced near
the other occurrences, while leaving argumentless contract calls unchanged.

Source: Coding guidelines

agent-marketplace/vechain-kit-expert/knowledge/85-cross-app-social-login-host.md-2091-2103 (1)

2091-2103: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not inherit mainnet contracts into the testnet verification map.

Lines 2091-2103 merge MAINNET into TESTNET, so addresses omitted from the partial testnet map are still treated as verified mainnet contracts on testnet. This undermines the phishing-defense signal exposed by resolveContractLabel. Use complete per-network maps or only verify addresses explicitly defined for the selected network.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/85-cross-app-social-login-host.md`
around lines 2091 - 2103, Update the knownContracts selection so testnet uses
only explicitly defined TESTNET contracts, without spreading or inheriting
MAINNET entries. Preserve MAINNET for the main network and ensure
resolveContractLabel can verify an address only against contracts defined for
the selected network.
agent-marketplace/vechain-kit-expert/knowledge/85-cross-app-social-login-host.md-3645-3667 (1)

3645-3667: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Avoid persisting raw email and phone identifiers in localStorage.

labelFromPrivyUser returns raw email/phone values, and setLastIdentity stores them for 30 days before rendering them on the re-login screen. This exposes PII to same-origin scripts and shared browsers. Persist only a redacted label/provider hint, or use shorter-lived session-scoped storage.

Also applies to: 3694-3698, 3717-3722

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/85-cross-app-social-login-host.md`
around lines 3645 - 3667, Update labelFromPrivyUser and setLastIdentity so
persisted LastIdentity labels never contain raw email or phone identifiers;
redact or replace them with a non-sensitive provider hint before writing to
localStorage. Preserve the existing provider information and re-login greeting
behavior, and apply the same sanitization to all identity persistence paths.
agent-marketplace/vechain-kit-expert/knowledge/85-cross-app-social-login-host.md-5126-5144 (1)

5126-5144: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Reject malformed batch shapes instead of silently normalizing them.

parseClauses uses unchecked casts and defaults missing value/data entries to 0/0x. A malformed request can therefore produce a UI representation that differs from the typed data being signed. Require to, value, and data to be arrays of equal length, validate each address, and block the request on mismatch.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/85-cross-app-social-login-host.md`
around lines 5126 - 5144, Update parseClauses to reject malformed batch typed
data instead of defaulting missing entries: require to, value, and data to be
arrays with equal lengths, validate every address, and block or throw on any
mismatch. Preserve scalar handling only for valid non-batch data, and remove
unchecked casts and fallback values that can alter the signed request
representation.
agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md-303-326 (1)

303-326: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Correct the email and Twitter field mappings.

The email branch fills twitterInput with the Twitter value, while the twitter branch fills emailInput with the email value. An email-only payload can therefore attempt to fill a field with undefined, and both values are persisted to the wrong controls.

Proposed fix
             if (data.socialLinks) {
                 if (data.socialLinks.email)
-                    await this.profile.twitterInput.fill(
-                        data.socialLinks!.twitter!,
+                    await this.profile.emailInput.fill(
+                        data.socialLinks.email,
                     );
                 if (data.socialLinks.website)
                     await this.profile.websiteInput.fill(
-                        data.socialLinks!.website!,
+                        data.socialLinks.website,
                     );
                 if (data.socialLinks.twitter)
-                    await this.profile.emailInput.fill(
-                        data.socialLinks!.email!,
+                    await this.profile.twitterInput.fill(
+                        data.socialLinks.twitter,
                     );
             }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md`
around lines 303 - 326, Correct the social link mappings in personalizeAccount:
the email branch must fill emailInput with data.socialLinks.email, and the
Twitter branch must fill twitterInput with data.socialLinks.twitter. Keep the
existing conditional behavior and other field mappings unchanged.
agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md-623-629 (1)

623-629: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not skip account index 0.

if (accountIndex) treats 0 as false, so calls such as initVWMock(0)—documented at Lines 1181, 1226, and 1255—never apply the requested account configuration. This can make wallet assertions run against the wrong account.

Proposed fix
-      if (accountIndex) await this.vwmock.setConfig(this.page, { accountIndex: accountIndex })
+      await this.vwmock.setConfig(this.page, { accountIndex })
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md`
around lines 623 - 629, Update initVWMock so accountIndex 0 is treated as a
valid configuration value; guard the vwmock.setConfig call against only absent
or undefined indices, while preserving the existing behavior for omitted
accountIndex values.
agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md-481-501 (1)

481-501: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Fail when the notification title is missing instead of defaulting to index 0.

If no notification matches, findNotificationByTitle returns 0, so archiveNotification silently archives the first notification rather than reporting that the requested notification was absent. Use a sentinel such as -1 and throw/assert before returning.

Proposed fix
     async findNotificationByTitle(title: string) {
         const count = await this.notificationsList.count()
-        let index = 0
+        let index = -1
         for (let i = 0; i < count; i++) {
             try {
                 const actualTitle = await this.notificationTitle(i).innerText()
                 expect(actualTitle).toBe(title)
                 index = i
                 break
             } catch(e) {console.error(e)}
         }
 
+        expect(index, `Notification "${title}" was not found`).toBeGreaterThanOrEqual(0)
         await this.notificationsList.nth(index).scrollIntoViewIfNeeded()
         return index
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md`
around lines 481 - 501, The findNotificationByTitle method must fail when no
notification title matches instead of returning index 0. Track the unmatched
state with a sentinel such as -1, assert or throw after the search when the
sentinel remains, and only scroll and return a valid index; preserve
archiveNotification’s existing use of the returned index.
🟡 Minor comments (10)
agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md-950-950 (1)

950-950: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the glass-effect example valid TypeScript.

intensity: 'low' | 'medium' | 'high' is a type union placed in a runtime object literal and will not compile. Use a concrete value such as intensity: 'medium' and describe the accepted values in prose.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md`
at line 950, Update the glass-effect example’s runtime object to use a concrete
intensity value such as 'medium' instead of the TypeScript union expression.
Describe the accepted low, medium, and high values in the surrounding prose.
agent-marketplace/vechain-kit-expert/knowledge/30-wallet-login-social-signing.md-176-178 (1)

176-178: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Gate WalletConnect on its required project ID in the main grid.

The main-grid visibility check only uses showWalletConnect, so it can render WalletConnect without dappKit.walletConnectOptions.projectId. The More Options flow correctly requires this value at Lines 2356-2362; apply the same predicate here to avoid exposing a button that fails on click.

Also applies to: 293-303

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/30-wallet-login-social-signing.md`
around lines 176 - 178, Update the wallet-connect case in the main-grid
visibility check to require both showWalletConnect and
dappKit.walletConnectOptions.projectId, matching the existing More Options
predicate. Apply the same condition to the corresponding wallet-connect
visibility logic in the additionally referenced section, leaving other wallet
types unchanged.
agent-marketplace/vechain-kit-expert/knowledge/30-wallet-login-social-signing.md-501-509 (1)

501-509: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Validate email before sending the login code.

The main-grid flow submits empty or malformed input, whereas the More Options flow validates with EMAIL_RE and disables submission until valid (Lines 2517-2521 and 2741-2750). Reuse the same validation and short-circuit invalid submissions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/30-wallet-login-social-signing.md`
around lines 501 - 509, Update handleSendCode to reuse the existing EMAIL_RE
validation used by the More Options flow, returning early when email is empty or
malformed. Only call sendCode and open emailCodeVerificationModal after the
email passes validation, preserving the existing valid-submission behavior.
agent-marketplace/vechain-kit-expert/knowledge/30-wallet-login-social-signing.md-182-188 (1)

182-188: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not select primary methods whose renderers ignore isPrimary.

primaryMethod can resolve to email, passkey, VeChain, dapp-kit, Sync2, or WalletConnect, but those render branches do not receive the isPrimary prop. Consequently, explicit or fallback primary selection silently has no visual effect for those methods. Pass the prop through or restrict primary selection to supported renderers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/30-wallet-login-social-signing.md`
around lines 182 - 188, Update the primary-method selection around
explicitPrimary, implicitPrimary, and primaryMethod so it only chooses methods
whose renderers consume isPrimary, or propagate isPrimary to every affected
render branch. Ensure email, passkey, VeChain, dapp-kit, Sync2, and
WalletConnect do not become primary unless their renderers visibly honor the
prop, while preserving supported primary behavior.
agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md-1999-2014 (1)

1999-2014: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document blockTimeout as blocks, not milliseconds. The value is multiplied by 10 * TIME.SECOND before being passed to timeoutMs, so callers are supplying a block count here.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md`
around lines 1999 - 2014, Update the useTxReceipt documentation to describe
blockTimeout as a number of blocks rather than milliseconds, including its
parameter description and any related timeout wording. Keep the implementation’s
conversion through BLOCK_GENERATION_INTERVAL unchanged.
agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md-1141-1154 (1)

1141-1154: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Await query invalidation before calling onSuccess.
forEach(async ...) doesn’t wait for the cancel/refetch calls, so onSuccess can run while the cache is still stale. Use await Promise.all(refetchQueryKeys?.map(async (queryKey) => { ... }) ?? []) or a for...of loop before invoking the callback.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md`
around lines 1141 - 1154, Update handleOnSuccess so all cancelQueries and
refetchQueries operations for refetchQueryKeys are awaited before invoking
onSuccess. Replace the asynchronous forEach with Promise.all or a sequential
for...of loop, while preserving the invalidateCache guard and optional callback
behavior.
agent-marketplace/vechain-kit-expert/knowledge/50-data-hooks-domains-nfts-swap-staking.md-6053-6070 (1)

6053-6070: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Scope approval-clause behavior to VeTrade.

The generic API-aggregator section states that API aggregators add an ERC-20 approval clause, but createApiAggregator only filters and returns clauses (Lines [6531]-[6551]). Approval insertion is implemented by the VeTrade wrapper (Lines [7594]-[7625]). Update this section so future aggregator implementations are not expected to provide behavior the base factory does not implement.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@agent-marketplace/vechain-kit-expert/knowledge/50-data-hooks-domains-nfts-swap-staking.md`
around lines 6053 - 6070, Update the API-Based section to describe only the
behavior implemented by createApiAggregator, removing the generic claim that API
aggregators add ERC-20 approval clauses. Document approval-clause insertion
specifically under the VeTrade wrapper, where that behavior is implemented.
agent-marketplace/vechain-kit-expert/knowledge/75-vechain-ai-skills.md-2671-2677 (1)

2671-2677: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add the required input validation to contract interaction examples.

These examples pass caller-supplied addresses and amounts directly into contract calls without validating addresses via isAddress() or ensuring amounts are positive with BigInt comparisons. Since this document is used as agent guidance, it can cause generated code to violate the repository’s required transaction-safety pattern.

As per coding guidelines, contract interaction functions must validate addresses with isAddress() and amounts with positive BigInt comparisons.

Also applies to: 4284-4296

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/knowledge/75-vechain-ai-skills.md`
around lines 2671 - 2677, Update the contract interaction examples, including
useTokenBalance and the corresponding examples near the referenced range, to
validate every caller-supplied address with isAddress() before invoking contract
calls and reject invalid inputs. For amount parameters, convert to BigInt and
require a positive value before proceeding, preserving the existing call
behavior for valid inputs.

Source: Coding guidelines

agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md-945-960 (1)

945-960: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Handle an omitted optional acceptTnc value correctly.

acceptTnc is optional, but undefined !== null is true, so omitting it enters the switch and logs an “unknown value” error. Check for undefined (or use args.acceptTnc != null) before evaluating the switch.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md`
around lines 945 - 960, Update the acceptTnc handling condition before the
switch to skip both null and undefined values, using a nullish check such as
args.acceptTnc != null. Preserve the existing true, false, and unknown-value
switch behavior for provided values.
agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md-10-10 (1)

10-10: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the heading hierarchy.

#### skips the required ### level after the ## Source heading, triggering MD001. Change this heading to ### VeChain Kit E2E Tests; update the generator/template if this document is regenerated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md` at
line 10, Update the “VeChain Kit E2E Tests” heading from level four to level
three so it follows the preceding “## Source” heading and satisfies MD001; if
this document is generated, make the same change in its generator or template.

Source: Linters/SAST tools

🧹 Nitpick comments (3)
agent-marketplace/vechain-kit-expert/build-knowledge.mjs (1)

3-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use import.meta.dirname for bundleDir. This repo targets Node 20.18.3, so the ESM-native dirname is available and avoids the extra node:url conversion.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/build-knowledge.mjs` around lines 3 -
11, Update the bundleDir initialization to use import.meta.dirname directly
instead of deriving it through new URL(import.meta.url).pathname, while leaving
repoRoot and outputDir path construction unchanged.
agent-marketplace/vechain-kit-expert/knowledge/75-vechain-ai-skills.md (1)

447-452: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Pin the VeChain Kit dependency in both scaffold templates.

Both templates use @vechain/vechain-kit: "latest" while pinning Next.js, React, and Chakra versions. A future Kit release can therefore resolve a different peer-dependency contract on every scaffold, causing non-reproducible builds or incompatibilities. Pin a tested Kit version and update it deliberately.

Also applies to: 2044-2049

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-marketplace/vechain-kit-expert/knowledge/75-vechain-ai-skills.md`
around lines 447 - 452, Replace the "latest" version of `@vechain/vechain-kit`
with a specific tested version in both scaffold dependency templates, including
the second occurrence noted in the comment. Keep the dependency pin consistent
across both templates and aligned with the existing pinned framework versions.
examples/homepage/src/app/components/features/FloatingGetStartedButton/FloatingGetStartedButton.tsx (1)

67-67: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the unused buttonRef.

This reference is attached to the Box component but is never utilized. You can safely remove it from here, as well as its corresponding useRef declaration.

♻️ Proposed fix
-            ref={buttonRef}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@examples/homepage/src/app/components/features/FloatingGetStartedButton/FloatingGetStartedButton.tsx`
at line 67, Remove the unused buttonRef useRef declaration and detach the ref
prop from the Box component in FloatingGetStartedButton, leaving the button
behavior and rendering unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Major comments:
In
`@agent-marketplace/vechain-kit-expert/knowledge/00-curated-integration-guide.md`:
- Line 9: Correct the integration guidance to direct non-React applications to
`@vechain/dapp-kit`, adding `@vechain/dapp-kit-ui` when UI components are needed;
reserve `@vechain/dapp-kit-react` for React applications requiring lightweight
wallet connection.

In `@agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md`:
- Around line 677-684: Update the installation command’s `@vechain/dapp-kit-react`
version to exactly 2.3.2, matching the package manifest’s dependency and peer
dependency requirements; leave the other package versions unchanged.
- Line 408: Correct the login-method documentation to match validateConfig: at
agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md lines
408-408, state that email requires Privy while more remains available without
it; at lines 445-445, remove the email cross-app fallback claim; and at lines
519-520, set the no-Privy default to [veworld] and remove the claim that email
no longer throws.

In
`@agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md`:
- Around line 1637-1655: Update buildERC20Clauses
(agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md:1637-1655)
to validate tokenAddress and strictly parse the amount, requiring it to be
positive before ABI encoding. Update the ERC-721 transfer builder (same
file:1780-1812) to validate addresses and require tokenId to be a non-negative
integer before conversion or encoding. Update the VET transfer builder (same
file:1916-1936) to strictly parse the amount and require a positive BigInt value
before constructing clauses.
- Around line 1432-1441: The sendTransactionAdapter callback validates the
hook-level clauses fallback but does not use it when calling sendTransaction.
Update the sendTransaction invocation in sendTransactionAdapter to forward
_clauses when provided and otherwise use the configured clauses value,
preserving the existing required-clauses validation.
- Around line 1169-1173: Update the sendTransaction callback to return the
promise from result.sendTransaction(clauseBuilder(props), delegationUrl),
preserving its existing arguments and dependency array so callers awaiting
sendTransaction wait for submission completion.

In
`@agent-marketplace/vechain-kit-expert/knowledge/50-data-hooks-domains-nfts-swap-staking.md`:
- Around line 6004-6009: Update the “Quote Selection” documentation to match
useSwapQuotes: exclude reverted quotes when at least one non-reverted candidate
exists, but retain and return the reverted quote with the highest outputAmount
when all candidates revert.
- Around line 6230-6236: Update the “Token Flow Verification” documentation to
describe the outflow check as an upper bound: the user’s token outflow must not
exceed amountIn, rather than claiming it exactly matches. Keep the inflow
minimumOutputAmount and ERC20/native VET coverage unchanged.

In
`@agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md`:
- Around line 336-340: Correct the `VeBetterIcon` conditional so `isDark`
selects `VeBetterIconDark` and the default branch selects `VeBetterIconLight`;
apply the same branch correction to `VeBetterLogo` and `VechainIcon`.
- Around line 1338-1352: Update the error fallback in useAppHubApps to access
cached data through the SSR-safe getLocalStorageItem helper, or guard
localStorage access with a browser check, so server-side failures rethrow the
original fetch error instead of raising ReferenceError.
- Around line 3521-3548: Update uploadBlobToIPFS to abort the fetch request
after a defined timeout using an AbortController and pass its signal to fetch.
After parsing the response, validate that data.IpfsHash exists and is a string
before returning it; otherwise throw an error so the existing catch path reports
the upload failure.
- Around line 3903-3924: Update executeCallClause and the additional
contract-call helpers to validate contractAddress with isAddress() before
calling thor.contracts.load. Reject invalid addresses using the existing
validation/error-handling pattern, and ensure no contract interaction occurs
until validation succeeds.
- Around line 982-987: Update getConnectionCache to treat cached localStorage
data as untrusted: wrap JSON.parse in error handling, remove CACHE_KEY when
parsing fails, and return null for malformed or user-edited entries while
preserving the existing valid-cache behavior.
- Around line 1058-1066: Update useLocalStorage so its useState initializer
always returns initialValue without calling getLocalStorageItem during render.
Load and parse the persisted value in a client-side effect after mounting,
updating storedValue through setStoredValue while preserving the existing error
fallback behavior.
- Around line 3927-3951: The executeMultipleClausesCall function must honor its
allowFailure generic instead of always throwing when a clause fails. Preserve
the current exception behavior for allowFailure false, but when allowFailure is
true return the transaction results, including failed entries, with the declared
MultipleClausesCallReturnType; alternatively remove the unused allowFailure
parameter and its related typing if failure results are not supported.
- Around line 1454-1475: Update getOrCreateQueryClient so the module-level
internalQueryClient singleton is reused only in the browser; when running on the
server, create and return a fresh QueryClient per request. Preserve the existing
QueryClient defaultOptions configuration and avoid storing server instances in
the module-global variable.
- Around line 3684-3696: Restrict randomTransactionUser to test-only usage and
remove it from the production utility export path, including its re-export from
utils/index.ts. Ensure client-side wallet and delegator bundles cannot import or
embed the generated private key; move any required signing usage to server-side
code instead.

In `@agent-marketplace/vechain-kit-expert/knowledge/75-vechain-ai-skills.md`:
- Line 2351: Replace getCallClauseQueryKey with getCallClauseQueryKeyWithArgs
for the balanceOf call and pass its address argument through the argument-aware
helper. Apply the same update to the matching balanceOf examples referenced near
the other occurrences, while leaving argumentless contract calls unchanged.

In
`@agent-marketplace/vechain-kit-expert/knowledge/85-cross-app-social-login-host.md`:
- Around line 2091-2103: Update the knownContracts selection so testnet uses
only explicitly defined TESTNET contracts, without spreading or inheriting
MAINNET entries. Preserve MAINNET for the main network and ensure
resolveContractLabel can verify an address only against contracts defined for
the selected network.
- Around line 3645-3667: Update labelFromPrivyUser and setLastIdentity so
persisted LastIdentity labels never contain raw email or phone identifiers;
redact or replace them with a non-sensitive provider hint before writing to
localStorage. Preserve the existing provider information and re-login greeting
behavior, and apply the same sanitization to all identity persistence paths.
- Around line 5126-5144: Update parseClauses to reject malformed batch typed
data instead of defaulting missing entries: require to, value, and data to be
arrays with equal lengths, validate every address, and block or throw on any
mismatch. Preserve scalar handling only for valid non-batch data, and remove
unchecked casts and fallback values that can alter the signed request
representation.

In `@agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md`:
- Around line 303-326: Correct the social link mappings in personalizeAccount:
the email branch must fill emailInput with data.socialLinks.email, and the
Twitter branch must fill twitterInput with data.socialLinks.twitter. Keep the
existing conditional behavior and other field mappings unchanged.
- Around line 623-629: Update initVWMock so accountIndex 0 is treated as a valid
configuration value; guard the vwmock.setConfig call against only absent or
undefined indices, while preserving the existing behavior for omitted
accountIndex values.
- Around line 481-501: The findNotificationByTitle method must fail when no
notification title matches instead of returning index 0. Track the unmatched
state with a sentinel such as -1, assert or throw after the search when the
sentinel remains, and only scroll and return a valid index; preserve
archiveNotification’s existing use of the returned index.

---

Minor comments:
In `@agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md`:
- Line 950: Update the glass-effect example’s runtime object to use a concrete
intensity value such as 'medium' instead of the TypeScript union expression.
Describe the accepted low, medium, and high values in the surrounding prose.

In
`@agent-marketplace/vechain-kit-expert/knowledge/30-wallet-login-social-signing.md`:
- Around line 176-178: Update the wallet-connect case in the main-grid
visibility check to require both showWalletConnect and
dappKit.walletConnectOptions.projectId, matching the existing More Options
predicate. Apply the same condition to the corresponding wallet-connect
visibility logic in the additionally referenced section, leaving other wallet
types unchanged.
- Around line 501-509: Update handleSendCode to reuse the existing EMAIL_RE
validation used by the More Options flow, returning early when email is empty or
malformed. Only call sendCode and open emailCodeVerificationModal after the
email passes validation, preserving the existing valid-submission behavior.
- Around line 182-188: Update the primary-method selection around
explicitPrimary, implicitPrimary, and primaryMethod so it only chooses methods
whose renderers consume isPrimary, or propagate isPrimary to every affected
render branch. Ensure email, passkey, VeChain, dapp-kit, Sync2, and
WalletConnect do not become primary unless their renderers visibly honor the
prop, while preserving supported primary behavior.

In
`@agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md`:
- Around line 1999-2014: Update the useTxReceipt documentation to describe
blockTimeout as a number of blocks rather than milliseconds, including its
parameter description and any related timeout wording. Keep the implementation’s
conversion through BLOCK_GENERATION_INTERVAL unchanged.
- Around line 1141-1154: Update handleOnSuccess so all cancelQueries and
refetchQueries operations for refetchQueryKeys are awaited before invoking
onSuccess. Replace the asynchronous forEach with Promise.all or a sequential
for...of loop, while preserving the invalidateCache guard and optional callback
behavior.

In
`@agent-marketplace/vechain-kit-expert/knowledge/50-data-hooks-domains-nfts-swap-staking.md`:
- Around line 6053-6070: Update the API-Based section to describe only the
behavior implemented by createApiAggregator, removing the generic claim that API
aggregators add ERC-20 approval clauses. Document approval-clause insertion
specifically under the VeTrade wrapper, where that behavior is implemented.

In `@agent-marketplace/vechain-kit-expert/knowledge/75-vechain-ai-skills.md`:
- Around line 2671-2677: Update the contract interaction examples, including
useTokenBalance and the corresponding examples near the referenced range, to
validate every caller-supplied address with isAddress() before invoking contract
calls and reject invalid inputs. For amount parameters, convert to BigInt and
require a positive value before proceeding, preserving the existing call
behavior for valid inputs.

In `@agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md`:
- Around line 945-960: Update the acceptTnc handling condition before the switch
to skip both null and undefined values, using a nullish check such as
args.acceptTnc != null. Preserve the existing true, false, and unknown-value
switch behavior for provided values.
- Line 10: Update the “VeChain Kit E2E Tests” heading from level four to level
three so it follows the preceding “## Source” heading and satisfies MD001; if
this document is generated, make the same change in its generator or template.

---

Nitpick comments:
In `@agent-marketplace/vechain-kit-expert/build-knowledge.mjs`:
- Around line 3-11: Update the bundleDir initialization to use
import.meta.dirname directly instead of deriving it through new
URL(import.meta.url).pathname, while leaving repoRoot and outputDir path
construction unchanged.

In `@agent-marketplace/vechain-kit-expert/knowledge/75-vechain-ai-skills.md`:
- Around line 447-452: Replace the "latest" version of `@vechain/vechain-kit` with
a specific tested version in both scaffold dependency templates, including the
second occurrence noted in the comment. Keep the dependency pin consistent
across both templates and aligned with the existing pinned framework versions.

In
`@examples/homepage/src/app/components/features/FloatingGetStartedButton/FloatingGetStartedButton.tsx`:
- Line 67: Remove the unused buttonRef useRef declaration and detach the ref
prop from the Box component in FloatingGetStartedButton, leaving the button
behavior and rendering unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d11979a8-488b-437b-9e28-a3ee426c4594

📥 Commits

Reviewing files that changed from the base of the PR and between 6384486 and ffb3a09.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (26)
  • agent-marketplace/vechain-kit-expert/README.md
  • agent-marketplace/vechain-kit-expert/agent-config.md
  • agent-marketplace/vechain-kit-expert/build-knowledge.mjs
  • agent-marketplace/vechain-kit-expert/knowledge/00-curated-integration-guide.md
  • agent-marketplace/vechain-kit-expert/knowledge/10-project-documentation.md
  • agent-marketplace/vechain-kit-expert/knowledge/20-public-api-provider-config-theme.md
  • agent-marketplace/vechain-kit-expert/knowledge/30-wallet-login-social-signing.md
  • agent-marketplace/vechain-kit-expert/knowledge/40-transactions-smart-accounts-blockchain.md
  • agent-marketplace/vechain-kit-expert/knowledge/50-data-hooks-domains-nfts-swap-staking.md
  • agent-marketplace/vechain-kit-expert/knowledge/60-components-modals-localization.md
  • agent-marketplace/vechain-kit-expert/knowledge/70-utilities-assets-and-remaining-api.md
  • agent-marketplace/vechain-kit-expert/knowledge/75-vechain-ai-skills.md
  • agent-marketplace/vechain-kit-expert/knowledge/80-working-examples.md
  • agent-marketplace/vechain-kit-expert/knowledge/85-cross-app-social-login-host.md
  • agent-marketplace/vechain-kit-expert/knowledge/90-tests-and-edge-cases.md
  • agent-marketplace/vechain-kit-expert/knowledge/manifest.json
  • agent-marketplace/vechain-kit-expert/official-links.txt
  • agent-marketplace/vechain-kit-expert/skill/vechain-kit-support/SKILL.md
  • agent-marketplace/vechain-kit-expert/system-prompt.md
  • agent-marketplace/vechain-kit-expert/test-questions.md
  • examples/homepage/package.json
  • examples/homepage/src/app/components/features/DocsModal/DocsModal.tsx
  • examples/homepage/src/app/components/features/DocsModal/index.ts
  • examples/homepage/src/app/components/features/FloatingGetStartedButton/FloatingGetStartedButton.tsx
  • examples/homepage/src/app/layout.tsx
  • examples/playground/src/app/layout.tsx
💤 Files with no reviewable changes (3)
  • examples/homepage/src/app/components/features/DocsModal/index.ts
  • examples/homepage/package.json
  • examples/homepage/src/app/components/features/DocsModal/DocsModal.tsx

@Agilulfo1820
Agilulfo1820 marked this pull request as draft July 17, 2026 13: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.

1 participant