…asks
Follow-up to the built-in workflow port (#2007), applying reviewer
feedback before the feature ships:
- Drop the deprecated `extraInstructions` option from GetEmailTask and
GetAddressTask. It was a `# deprecated` field in the Python source; a
brand-new JS API shouldn't inherit deprecated surface. Callers use
`instructions.extra` (InstructionParts). The non-deprecated
`extraInstructions` on name/phone/dob/credit-card tasks is kept.
- camelCase all LLM-facing tool argument names to match JS conventions:
street_address -> streetAddress, unit_number -> unitNumber,
first_name/middle_name/last_name -> firstName/middleName/lastName,
card_number -> cardNumber, security_code -> securityCode,
expiration_month/year -> expirationMonth/Year, phone_number ->
phoneNumber, and the repeated_* confirmation args. GetNameTask's
nameFormat placeholders and all internal instruction-template
placeholders are camelCased to match.
- Remove the pythonic `kwargs` bag from resolveWorkflowInstructions in
favour of explicit `modalitySpecific` / `confirmation` params.
- Drop the `| null` option types and the resulting `x ?? undefined`
pass-through noise at AgentTask.create call sites; optional params are
plain `?:` now.
Behavior is unchanged; these are API-surface and internal-plumbing
cleanups on code that has not shipped yet.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q3ZnFWr54AZysyyf4g5Dyd
Description
Follow-up to #2007 (built-in data-capture workflow port). All changes are API-surface / internal-plumbing cleanups on code that has not shipped yet — behavior is unchanged.
Changes Made
extraInstructionsfromGetEmailTaskandGetAddressTask. It was a# deprecatedfield in the Python source; a brand-new JS API shouldn't inherit deprecated surface. Those two tasks takeinstructions.extraviaInstructionPartsinstead. (The non-deprecatedextraInstructionson name/phone/dob/credit-card tasks — a real parameter in Python — is kept.)street_address→streetAddress,unit_number→unitNumberfirst_name/middle_name/last_name→firstName/middleName/lastNamecard_number→cardNumber,security_code→securityCode,expiration_month/expiration_year→expirationMonth/expirationYear,phone_number→phoneNumberrepeated_*confirmation args likewiseGetNameTask'snameFormatplaceholders ({first_name}→{firstName}) and every internal instruction-template placeholder are camelCased to matchkwargsbag fromresolveWorkflowInstructionsin favour of explicitmodalitySpecific/confirmationparams.| nulloption types and the resultingx ?? undefinedpass-through noise atAgentTask.createcall sites; optional params are plain?:now.Left as-is per reviewer: the
onEnterabort-signal suggestion forGetDtmfTask(auto-cancelling theroom.on/state listeners and the debounced reply) is deferred to a later change.Pre-Review Checklist
pnpm build:agents,pnpm lint(workflows),pnpm format:checkgreenagents/src/workflows/*Testing
pnpm build:agentsgreen; ESLint + Prettier clean onagents/src/workflows/agent.test.ts,chat_context.test.ts) passAdditional Notes
No new changeset — this refines the same unreleased workflows feature already covered by
port-builtin-workflows.mdon the base branch.