Skip to content

[codex] add agentic selector precondition parameter#139

Draft
kssteven418 wants to merge 1 commit into
mainfrom
codex/agentic-selector-precondition-sdk
Draft

[codex] add agentic selector precondition parameter#139
kssteven418 wants to merge 1 commit into
mainfrom
codex/agentic-selector-precondition-sdk

Conversation

@kssteven418
Copy link
Copy Markdown
Contributor

Summary

  • Add optional pre_cond support to AgenticSelectorRequest serialization.
  • Expose pre_cond on both Python and Pyodide agentic_selector methods.
  • Keep the field omitted from dispatch payloads when it is not provided.

Scope note

This PR was created from a clean origin/main worktree and intentionally excludes an unrelated local Pyodide workflow-trace compatibility fix that was present in the original dirty checkout.

Validation

  • uv run ruff check packages/narada-core/src/narada_core/actions/models.py packages/narada-pyodide/src/narada/window.py packages/narada/src/narada/window.py
  • uv run python -c 'from narada_core.actions.models import AgenticSelectorRequest; req=AgenticSelectorRequest(action={"type":"click"}, selectors={"tag_name":"BUTTON"}, fallback_operator_query="Click Submit", pre_cond="check Submit exists"); dumped=req.model_dump(); assert dumped["pre_cond"] == "check Submit exists"; req2=AgenticSelectorRequest(action={"type":"click"}, selectors={"tag_name":"BUTTON"}, fallback_operator_query="Click Submit"); assert "pre_cond" not in req2.model_dump(); print("pre_cond serialization ok")'
  • git diff --check origin/main...HEAD

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