Skip to content

Add waiting_for_user_input to AgentMessageToolCall status type#162

Merged
wixysam merged 1 commit into
mainfrom
drift-fix
Apr 28, 2026
Merged

Add waiting_for_user_input to AgentMessageToolCall status type#162
wixysam merged 1 commit into
mainfrom
drift-fix

Conversation

@hadashirt
Copy link
Copy Markdown
Contributor

Summary

  • Adds "waiting_for_user_input" to the status union in AgentMessageToolCall in agents.types.ts

What drifted

The backend ToolCall model in apper/backend/app/ai/models/message.py has:

status: Literal["running", "success", "error", "stopped", "waiting_for_user_input"]

But the SDK type was missing "waiting_for_user_input":

// Before
status: "running" | "success" | "error" | "stopped";

// After
status: "running" | "success" | "error" | "stopped" | "waiting_for_user_input";

Test plan

  • Verify AgentMessageToolCall.status includes "waiting_for_user_input" in the TypeScript type
  • Run npm run create-docs-local to regenerate SDK docs (companion PR: base44-dev/mintlify-docs)

🤖 Generated with Claude Code

@claude
Copy link
Copy Markdown

claude Bot commented Apr 27, 2026

Claude finished @hadashirt's task —— View job


Code Review for PR #162

Summary

This PR correctly adds the missing "waiting_for_user_input" status to the AgentMessageToolCall type to align with the backend Python model.

Review Feedback

✅ Code Quality and Best Practices

  • The change follows TypeScript best practices by using a union type for the status field
  • The implementation is clean and minimal, changing only what's necessary
  • The new status value is correctly positioned at the end of the union, maintaining backward compatibility

✅ Potential Bugs or Issues

  • No bugs identified. The change is straightforward and correct
  • The type addition won't cause any runtime errors for existing code

✅ Performance Considerations

  • This is a type-only change with no runtime performance impact
  • TypeScript compilation time impact is negligible

✅ Security Concerns

  • No security concerns. This is a type definition change only

📝 Test Coverage

  • Missing: No unit tests exist for the agents module types based on my search
  • Recommendation: While type changes don't require runtime tests, consider adding type tests to ensure the AgentMessageToolCall interface works correctly with all status values
  • The PR includes a manual test plan to verify the type change and regenerate docs, which is appropriate for this change

Additional Observations

  1. Type Export: The AgentMessageToolCall type is properly exported through src/index.ts, so consumers of the SDK will have access to the updated type

  2. Documentation: The interface has good JSDoc comments explaining what each field represents

  3. Backend Alignment: The change correctly matches the backend Python model's status field, resolving the drift between frontend and backend types

Recommendation

Approve - This is a correct and necessary change that fixes type drift between the frontend SDK and backend API. The implementation is clean and follows best practices.

Review Tasks:

  • Read and analyze the changed file
  • Verify type alignment with backend
  • Check for related types that may need updating
  • Review test coverage
  • Provide comprehensive feedback

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 27, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.26-pr.162.4daaf84

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.26-pr.162.4daaf84"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.26-pr.162.4daaf84"
  }
}

Preview published to npm registry — try new features instantly!

The backend ToolCall model includes "waiting_for_user_input" as a valid
status value, but the SDK type was missing it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Apr 27, 2026

Claude finished @hadashirt's task —— View job


Code Review for PR #162

Summary

This PR correctly adds the missing "waiting_for_user_input" status to the AgentMessageToolCall type to align with the backend Python model.

Review Feedback

✅ Code Quality and Best Practices

  • The change follows TypeScript best practices by using a union type for the status field
  • The implementation is clean and minimal, changing only what's necessary
  • The new status value is correctly positioned at the end of the union, maintaining backward compatibility

✅ Potential Bugs or Issues

  • No bugs identified. The change is straightforward and correct
  • The type addition won't cause any runtime errors for existing code

✅ Performance Considerations

  • This is a type-only change with no runtime performance impact
  • TypeScript compilation time impact is negligible

✅ Security Concerns

  • No security concerns. This is a type definition change only

📝 Test Coverage

  • Missing: No unit tests exist for the agents module types based on my search
  • Recommendation: While type changes don't require runtime tests, consider adding type tests to ensure the AgentMessageToolCall interface works correctly with all status values
  • The PR includes a manual test plan to verify the type change and regenerate docs, which is appropriate for this change

Additional Observations

  1. Type Export: The AgentMessageToolCall type is properly exported through src/index.ts, so consumers of the SDK will have access to the updated type

  2. Documentation: The interface has good JSDoc comments explaining what each field represents

  3. Backend Alignment: The change correctly matches the backend Python model's status field, resolving the drift between frontend and backend types

Recommendation

Approve - This is a correct and necessary change that fixes type drift between the frontend SDK and backend API. The implementation is clean and follows best practices.

Review Tasks:

  • Read and analyze the changed file
  • Verify type alignment with backend
  • Check for related types that may need updating
  • Review test coverage
  • Provide comprehensive feedback

@wixysam wixysam merged commit 85e0aec into main Apr 28, 2026
6 checks passed
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.

2 participants