[backend] refactor tools metadata schema #320
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
AI Description
This PR makes changes to the
agent_tool_metadata
table.type
column is dropped.artifacts
column is dropped and a new column with the same name is added, changing the data type fromARRAY(TEXT)
toARRAY(JSONB)
._user_agent_tool_name_type_uc
is dropped and a new one,_user_agent_tool_name_uc
, is created without thetype
column.The changes are also reflected in the
AgentToolMetadata
model and related test files.type
attribute is removed from theAgentToolMetadata
model and related test files.artifacts
attribute is updated to a list of dictionaries in theAgentToolMetadata
model and related test files.Agent
model now includes atools_metadata
attribute, which is a list ofAgentToolMetadata
.AgentToolMetadata
model is imported in theagent.py
file.generate:client
script inpackage.json
now uses0.0.0.0
as the IP address instead oflocalhost
.AgentToolMetadata
type inAgent.ts
now includes an import statement and thetools_metadata
attribute is added to theAgent
type.type
attribute is removed from theAgentToolMetadata
type inAgentToolMetadata.ts
, and theartifacts
attribute is updated to an array of records.type
attribute is removed from theCreateAgentToolMetadata
type inCreateAgentToolMetadata.ts
, and theartifacts
attribute is updated to an array of records.type
attribute is made optional in theUpdateAgentToolMetadata
type inUpdateAgentToolMetadata.ts
, and theartifacts
attribute is updated to accept null values.