-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: Let the AI hold the line (New Wait Tool with Music & Interrupts) #572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
1fe20e0
6a9f827
69a7c36
b685ee9
ddb9eda
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| """add wait to tool category | ||
|
|
||
| Revision ID: ceeaf3c37b2f | ||
| Revises: gg11dd223344 | ||
| Create Date: 2026-07-22 12:42:18.521312 | ||
|
|
||
| """ | ||
| from typing import Sequence, Union | ||
|
|
||
| from alembic import op | ||
| import sqlalchemy as sa | ||
|
|
||
|
|
||
| from alembic_postgresql_enum import TableReference | ||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision: str = 'ceeaf3c37b2f' | ||
| down_revision: Union[str, None] = '0a1b2c3d4e5f' | ||
| branch_labels: Union[str, Sequence[str], None] = None | ||
| depends_on: Union[str, Sequence[str], None] = None | ||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| op.sync_enum_values( | ||
| enum_schema="public", | ||
| enum_name="tool_category", | ||
| new_values=[ | ||
| "http_api", | ||
| "end_call", | ||
| "transfer_call", | ||
| "calculator", | ||
| "native", | ||
| "integration", | ||
| "mcp", | ||
| "wait", | ||
| ], | ||
| affected_columns=[ | ||
| TableReference( | ||
| table_schema="public", table_name="tools", column_name="category" | ||
| ) | ||
| ], | ||
| enum_values_to_rename=[], | ||
| ) | ||
|
|
||
| def downgrade() -> None: | ||
| op.sync_enum_values( | ||
| enum_schema="public", | ||
| enum_name="tool_category", | ||
| new_values=[ | ||
| "http_api", | ||
| "end_call", | ||
| "transfer_call", | ||
| "calculator", | ||
| "native", | ||
| "integration", | ||
| "mcp", | ||
| ], | ||
| affected_columns=[ | ||
| TableReference( | ||
| table_schema="public", table_name="tools", column_name="category" | ||
| ) | ||
| ], | ||
| enum_values_to_rename=[], | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ | |
| "end_call", | ||
| "transfer_call", | ||
| "calculator", | ||
| "wait", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P0: Cannot create WaitToolDefinition through the API — ToolCategory enum in api/enums.py is missing a WAIT = "wait" member. The validate_category validator, DB CheckConstraint, and route-level validation all check category against ToolCategory values, so any request with category="wait" will be rejected before reaching the DB. Add Prompt for AI agents
greptile-apps[bot] marked this conversation as resolved.
|
||
| "native", | ||
| "integration", | ||
| "mcp", | ||
|
|
@@ -435,6 +436,13 @@ class CalculatorToolDefinition(BaseModel): | |
| type: Literal["calculator"] = Field(description="Tool type.") | ||
|
|
||
|
|
||
| class WaitToolDefinition(BaseModel): | ||
| """Tool definition for Wait tools.""" | ||
|
|
||
| schema_version: int = Field(default=1, description="Schema version.") | ||
| type: Literal["wait"] = Field(description="Tool type.") | ||
|
|
||
|
|
||
| class McpToolDefinition(BaseModel): | ||
| """Persisted MCP tool definition.""" | ||
|
|
||
|
|
@@ -449,6 +457,7 @@ class McpToolDefinition(BaseModel): | |
| EndCallToolDefinition, | ||
| TransferCallToolDefinition, | ||
| CalculatorToolDefinition, | ||
| WaitToolDefinition, | ||
| McpToolDefinition, | ||
| ], | ||
| Field(discriminator="type"), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.