Skip to content

docs(functions-build): map CLI eval-js to session.evaluate_js in deployed Functions - #39

Merged
giordano-lucas merged 1 commit into
mainfrom
t3code/evaluate-js-function-mapping
Aug 25, 2026
Merged

docs(functions-build): map CLI eval-js to session.evaluate_js in deployed Functions#39
giordano-lucas merged 1 commit into
mainfrom
t3code/evaluate-js-function-mapping

Conversation

@giordano-lucas

Copy link
Copy Markdown
Member

What

exploration.md teaches notte page eval-js for exploration and maps the deployed-Function equivalent for scrape (session.scrape(..., response_format=Model)) — but not for eval-js, which is the technique catalogue Functions lean on most. This adds the parallel sentence: inside a Function the equivalent is session.evaluate_js(code), which returns the evaluated string directly (objects/arrays as JSON) and raises with the actual JavaScript error on failure — json.loads(session.evaluate_js(code)) is the whole read.

Audit note

This is an addition, not a replacement: the repo contains no session.execute(type="evaluate_js") usage anywhere — every existing eval reference is the CLI command (notte page eval-js), which is a separate surface and stays as-is. The Python snippets that do exist (function skeleton, migrate references) never evaluated JS.

Gate

session.evaluate_js ships with nottelabs/notte#909 (merged); Functions built against an older installed notte-sdk won't have it, so land this alongside (or after) the SDK release that includes it — same gate as the anything-api prompt update. anything-api pins this repo by commit (notte-skill.pin.json), so merge here doesn't reach sandboxes until that pin moves.

🤖 Generated with Claude Code

…oyed Functions

exploration.md mapped the Function equivalent for scrape but not for
eval-js; deployed Functions now read the evaluated string via
session.evaluate_js(code) (nottelabs/notte#909), so teach that mapping
in the same breath as the CLI command. All other eval references in
this repo are the CLI surface and stay unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown

Greptile Summary

Adds deployed-Function guidance mapping the CLI eval-js workflow to session.evaluate_js.

  • Documents direct string returns, JSON serialization for objects and arrays, and JavaScript error propagation.
  • Shows json.loads(session.evaluate_js(code)) as the corresponding read path.

Confidence Score: 4/5

The documentation-only change appears safe to merge, with the non-blocking concern that its new SDK contract is not protected by automated coverage.

The documented mapping is coherent with the stated SDK release gate; the remaining issue is that CI cannot detect later drift in the API name or behavior.

Files Needing Attention: plugins/notte/skills/notte-functions-build/references/exploration.md

Important Files Changed

Filename Overview
plugins/notte/skills/notte-functions-build/references/exploration.md Adds concise SDK interoperability guidance, but the newly documented API behavior has no accompanying automated coverage.

Fix all with Greploop Fix All in Claude Code

Prompt To Fix All With AI
### Issue 1
plugins/notte/skills/notte-functions-build/references/exploration.md:54
**Add coverage for SDK guidance**

The new `session.evaluate_js` sentence documents API naming, serialization, and error behavior without automated coverage, so later SDK drift can leave Function authors following stale instructions without CI detecting it.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "docs(functions-build): map CLI eval-js t..." | Re-trigger Greptile

@giordano-lucas
giordano-lucas merged commit ea7cb45 into main Aug 25, 2026
8 checks passed
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