docs(functions-build): map CLI eval-js to session.evaluate_js in deployed Functions - #39
Merged
Merged
Conversation
…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>
|
| 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. |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
exploration.mdteachesnotte page eval-jsfor 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 issession.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_jsships with nottelabs/notte#909 (merged); Functions built against an older installednotte-sdkwon'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