fix(browser): accept legacy flattened act params#31359
fix(browser): accept legacy flattened act params#31359vincentkoc merged 7 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR restores backward compatibility for legacy Key observations:
Confidence Score: 4/5
Last reviewed commit: 46f257e |
|
Addressed in 8fe239d. I added the missing nested |
* fix(browser-tool): accept flattened act params * schema(browser-tool): add flattened act fields * test(browser-tool): cover flattened act compatibility * changelog: note browser act compatibility fix * fix(schema): align browser act request fields
* fix(browser-tool): accept flattened act params * schema(browser-tool): add flattened act fields * test(browser-tool): cover flattened act compatibility * changelog: note browser act compatibility fix * fix(schema): align browser act request fields
* fix(browser-tool): accept flattened act params * schema(browser-tool): add flattened act fields * test(browser-tool): cover flattened act compatibility * changelog: note browser act compatibility fix * fix(schema): align browser act request fields
* fix(browser-tool): accept flattened act params * schema(browser-tool): add flattened act fields * test(browser-tool): cover flattened act compatibility * changelog: note browser act compatibility fix * fix(schema): align browser act request fields
* fix(browser-tool): accept flattened act params * schema(browser-tool): add flattened act fields * test(browser-tool): cover flattened act compatibility * changelog: note browser act compatibility fix * fix(schema): align browser act request fields
* fix(browser-tool): accept flattened act params * schema(browser-tool): add flattened act fields * test(browser-tool): cover flattened act compatibility * changelog: note browser act compatibility fix * fix(schema): align browser act request fields
Summary
browsertool rejected legacyaction="act"calls that sendkind/ref/text/...at the top level and returnedrequest required.request={...}and flattened act params work./actroute validation and Playwright action execution semantics remain unchanged.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
browser(action="act", kind="type", ref="...", text="...", targetId="...")now works again.request={...}remains supported and still takes precedence when both styles are provided.Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
action="act"and flattened params (norequest).request required.requestand flattened fields; verifyrequestis used.Expected
Actual
Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm vitest run src/agents/tools/browser-tool.test.tsincluding new flattened compatibility tests.Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
src/agents/tools/browser-tool.ts,src/agents/tools/browser-tool.schema.ts.Risks and Mitigations
/actendpoint still performs strict per-kind validation and returns explicit 400 errors.