Skip to content

feat: unify action format with openadapt-types#237

Closed
abrichr wants to merge 1 commit into
mainfrom
feat/action-format-unification
Closed

feat: unify action format with openadapt-types#237
abrichr wants to merge 1 commit into
mainfrom
feat/action-format-unification

Conversation

@abrichr
Copy link
Copy Markdown
Member

@abrichr abrichr commented Mar 29, 2026

Fix trl_rollout JSON/DSL contradiction, add openadapt-types dep, add _AgentOutput schema, 17 new tests

…ntradiction

- Fix the internal contradiction where SYSTEM_PROMPT described JSON format
  but ACTION_REGEX constrained to DSL format
- Replace DSL-format SYSTEM_PROMPT with unified JSON format including
  reasoning field, aligning with openadapt-types Action schema
- Add _AgentOutput Pydantic model for Outlines JSON schema mode
- Update ACTION_REGEX to match JSON format (fallback for regex mode)
- Update _build_outlines_generator to try JSON schema mode first,
  fall back to regex
- Add DSL fallback parsing in parse_action_json for backward compatibility
  with existing checkpoints (CLICK/TYPE/WAIT/DONE format)
- Add openadapt-types>=0.1.0 as core dependency
- Fix mock adapter observe() for pre-rollout health check tests
- Add 17 new tests covering DSL parsing, ACTION_REGEX, and _AgentOutput

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@abrichr
Copy link
Copy Markdown
Member Author

abrichr commented Mar 29, 2026

Closing: this PR replaces the DSL system prompt with JSON, which re-introduces the garbage output bug fixed in #236. Cherry-picking the good parts (openadapt-types dep, _AgentOutput model, tests) into a new PR on top of current main.

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