Skip to content

refactor(workflows): cleanup data-capture tasks#2016

Merged
toubatbrian merged 1 commit into
brian/expressive-modefrom
claude/port-workflows-js-qa2164
Jul 10, 2026
Merged

refactor(workflows): cleanup data-capture tasks#2016
toubatbrian merged 1 commit into
brian/expressive-modefrom
claude/port-workflows-js-qa2164

Conversation

@toubatbrian

@toubatbrian toubatbrian commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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

  • Drop deprecated extraInstructions from GetEmailTask and GetAddressTask. It was a # deprecated field in the Python source; a brand-new JS API shouldn't inherit deprecated surface. Those two tasks take instructions.extra via InstructionParts instead. (The non-deprecated extraInstructions on name/phone/dob/credit-card tasks — a real parameter in Python — is kept.)
  • camelCase all LLM-facing tool argument names to match JS/TS conventions:
    • street_addressstreetAddress, unit_numberunitNumber
    • first_name/middle_name/last_namefirstName/middleName/lastName
    • card_numbercardNumber, security_codesecurityCode, expiration_month/expiration_yearexpirationMonth/expirationYear, phone_numberphoneNumber
    • the repeated_* confirmation args likewise
    • GetNameTask's nameFormat placeholders ({first_name}{firstName}) and every internal instruction-template placeholder 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.

Left as-is per reviewer: the onEnter abort-signal suggestion for GetDtmfTask (auto-cancelling the room.on/state listeners and the debounced reply) is deferred to a later change.

Pre-Review Checklist

  • Build passes: pnpm build:agents, pnpm lint (workflows), pnpm format:check green
  • AI-generated code reviewed
  • Changes explained above
  • Scope appropriate: touches only agents/src/workflows/*

Testing

Additional Notes

No new changeset — this refines the same unreleased workflows feature already covered by port-builtin-workflows.md on the base branch.

…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
@toubatbrian toubatbrian requested a review from a team as a code owner July 10, 2026 05:06
@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1cf9530

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread agents/src/workflows/name.ts
@toubatbrian toubatbrian changed the title refactor(workflows): review-feedback cleanup for data-capture tasks refactor(workflows): cleanup data-capture tasks Jul 10, 2026
@toubatbrian toubatbrian merged commit 0034077 into brian/expressive-mode Jul 10, 2026
1 of 2 checks passed
@toubatbrian toubatbrian deleted the claude/port-workflows-js-qa2164 branch July 10, 2026 05:36
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.

4 participants