arcade-mcp/libs/arcade-cli/arcade_cli
Sam Partee e188fc6ae9
Improve Typedict and Basemodel support (#523)
Improve Pydantic and Typedict support and add a bunch of tets.

1. Fixed the test failure where TypeDict was being serialized as a list
of tuples instead of a dict by:
- Adding proper handling for BaseModel instances in the output.py file
- Converting BaseModel results (from TypeDict conversion) to dicts using
model_dump()
    - Handling lists containing BaseModel objects
2. Fixed None handling to ensure None results are converted to empty
strings as expected
3. Updated the schema.py to allow dict and list types in
ToolCallOutput.value
  4. new tests
    - TypeDict output execution tests
    - Output factory tests
    - Executor tests with TypeDict support
    - Schema validation tests

  The key changes were:
- In ``arcade_core/output.py``: Added BaseModel conversion logic in the
success method
- In ``arcade_core/schema.py``: Changed ToolCallOutput.value type from
list[str] to list to support complex types


TODO
- [ ] Confirm engine compatibility without changes made to engine

---------

Co-authored-by: Eric Gustin <eric@arcade.dev>
2025-08-27 16:50:09 -07:00
..
templates/{{ toolkit_name }} Update arcade new (#520) 2025-07-29 10:35:36 -07:00
toolkit_docs added missing parameter to the usage example templates (#537) 2025-08-27 19:57:52 -03:00
__init__.py 🏗️ Restructure: Multi-Package Architecture + uv Migration (#412) 2025-06-11 16:48:17 -07:00
authn.py 🏗️ Restructure: Multi-Package Architecture + uv Migration (#412) 2025-06-11 16:48:17 -07:00
config.py 🏗️ Restructure: Multi-Package Architecture + uv Migration (#412) 2025-06-11 16:48:17 -07:00
constants.py Fix login callback (#489) 2025-07-15 11:21:33 -07:00
deployment.py Fix venv files not being found (#525) 2025-08-01 12:12:35 -07:00
display.py Improve Typedict and Basemodel support (#523) 2025-08-27 16:50:09 -07:00
main.py arcade docs: add support for GPT-5 series; improve error handling (#529) 2025-08-10 18:14:59 -05:00
new.py Update arcade new (#520) 2025-07-29 10:35:36 -07:00
serve.py 🏗️ Restructure: Multi-Package Architecture + uv Migration (#412) 2025-06-11 16:48:17 -07:00
show.py Support Tool Output in ValueSchema of ToolDefinition (#487) 2025-07-24 15:32:35 -07:00
utils.py Support Tool Output in ValueSchema of ToolDefinition (#487) 2025-07-24 15:32:35 -07:00
worker.py Fix arcade worker list endpoints (#504) 2025-07-21 14:43:58 -07:00