@meetkai/mka1 0.54.93 → 0.54.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +332 -332
- package/bin/mcp-server.js +4882 -3799
- package/bin/mcp-server.js.map +43 -21
- package/dist/commonjs/funcs/agentRunsListAgentRuns.js +1 -0
- package/dist/commonjs/funcs/agentRunsListAgentRuns.js.map +1 -1
- package/dist/commonjs/funcs/agentVersionsListAgentVersions.js +1 -0
- package/dist/commonjs/funcs/agentVersionsListAgentVersions.js.map +1 -1
- package/dist/commonjs/funcs/agentsCreateFunctionTool.d.ts +17 -0
- package/dist/commonjs/funcs/agentsCreateFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentsCreateFunctionTool.js +128 -0
- package/dist/commonjs/funcs/agentsCreateFunctionTool.js.map +1 -0
- package/dist/commonjs/funcs/agentsDeleteAgent.d.ts +4 -1
- package/dist/commonjs/funcs/agentsDeleteAgent.d.ts.map +1 -1
- package/dist/commonjs/funcs/agentsDeleteAgent.js +4 -1
- package/dist/commonjs/funcs/agentsDeleteAgent.js.map +1 -1
- package/dist/commonjs/funcs/agentsDeleteFunctionTool.d.ts +19 -0
- package/dist/commonjs/funcs/agentsDeleteFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentsDeleteFunctionTool.js +133 -0
- package/dist/commonjs/funcs/agentsDeleteFunctionTool.js.map +1 -0
- package/dist/commonjs/funcs/agentsGetFunctionTool.d.ts +17 -0
- package/dist/commonjs/funcs/agentsGetFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentsGetFunctionTool.js +131 -0
- package/dist/commonjs/funcs/agentsGetFunctionTool.js.map +1 -0
- package/dist/commonjs/funcs/agentsListAgents.js +2 -0
- package/dist/commonjs/funcs/agentsListAgents.js.map +1 -1
- package/dist/commonjs/funcs/agentsListFunctionTools.d.ts +17 -0
- package/dist/commonjs/funcs/agentsListFunctionTools.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentsListFunctionTools.js +131 -0
- package/dist/commonjs/funcs/agentsListFunctionTools.js.map +1 -0
- package/dist/commonjs/funcs/agentsRestoreAgent.d.ts +21 -0
- package/dist/commonjs/funcs/agentsRestoreAgent.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentsRestoreAgent.js +138 -0
- package/dist/commonjs/funcs/agentsRestoreAgent.js.map +1 -0
- package/dist/commonjs/funcs/agentsUpdateFunctionTool.d.ts +20 -0
- package/dist/commonjs/funcs/agentsUpdateFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentsUpdateFunctionTool.js +137 -0
- package/dist/commonjs/funcs/agentsUpdateFunctionTool.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +13 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/agentsCreateFunctionTool.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/agentsCreateFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsCreateFunctionTool.js +62 -0
- package/dist/commonjs/mcp-server/tools/agentsCreateFunctionTool.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsDeleteAgent.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/agentsDeleteAgent.js +3 -1
- package/dist/commonjs/mcp-server/tools/agentsDeleteAgent.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/agentsDeleteFunctionTool.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/agentsDeleteFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsDeleteFunctionTool.js +64 -0
- package/dist/commonjs/mcp-server/tools/agentsDeleteFunctionTool.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsGetFunctionTool.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/agentsGetFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsGetFunctionTool.js +62 -0
- package/dist/commonjs/mcp-server/tools/agentsGetFunctionTool.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsListFunctionTools.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/agentsListFunctionTools.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsListFunctionTools.js +62 -0
- package/dist/commonjs/mcp-server/tools/agentsListFunctionTools.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsRestoreAgent.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/agentsRestoreAgent.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsRestoreAgent.js +64 -0
- package/dist/commonjs/mcp-server/tools/agentsRestoreAgent.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsUpdateFunctionTool.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/agentsUpdateFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/agentsUpdateFunctionTool.js +64 -0
- package/dist/commonjs/mcp-server/tools/agentsUpdateFunctionTool.js.map +1 -0
- package/dist/commonjs/models/components/agent.d.ts +12 -0
- package/dist/commonjs/models/components/agent.d.ts.map +1 -1
- package/dist/commonjs/models/components/agent.js +12 -0
- package/dist/commonjs/models/components/agent.js.map +1 -1
- package/dist/commonjs/models/components/agentsfunctiontooldefinition.d.ts +40 -0
- package/dist/commonjs/models/components/agentsfunctiontooldefinition.d.ts.map +1 -0
- package/dist/commonjs/models/components/agentsfunctiontooldefinition.js +84 -0
- package/dist/commonjs/models/components/agentsfunctiontooldefinition.js.map +1 -0
- package/dist/commonjs/models/components/functiontool.d.ts +35 -0
- package/dist/commonjs/models/components/functiontool.d.ts.map +1 -0
- package/dist/commonjs/models/components/functiontool.js +85 -0
- package/dist/commonjs/models/components/functiontool.js.map +1 -0
- package/dist/commonjs/models/components/functiontoollist.d.ts +35 -0
- package/dist/commonjs/models/components/functiontoollist.d.ts.map +1 -0
- package/dist/commonjs/models/components/functiontoollist.js +87 -0
- package/dist/commonjs/models/components/functiontoollist.js.map +1 -0
- package/dist/commonjs/models/components/functiontoolreference.d.ts +28 -0
- package/dist/commonjs/models/components/functiontoolreference.d.ts.map +1 -0
- package/dist/commonjs/models/components/functiontoolreference.js +76 -0
- package/dist/commonjs/models/components/functiontoolreference.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +4 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +4 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/openaichatcompletion.d.ts +10 -0
- package/dist/commonjs/models/components/openaichatcompletion.d.ts.map +1 -1
- package/dist/commonjs/models/components/openaichatcompletion.js +8 -0
- package/dist/commonjs/models/components/openaichatcompletion.js.map +1 -1
- package/dist/commonjs/models/components/openaichatcompletionchunk.d.ts +10 -0
- package/dist/commonjs/models/components/openaichatcompletionchunk.d.ts.map +1 -1
- package/dist/commonjs/models/components/openaichatcompletionchunk.js +8 -0
- package/dist/commonjs/models/components/openaichatcompletionchunk.js.map +1 -1
- package/dist/commonjs/models/components/responseobject.d.ts +5 -0
- package/dist/commonjs/models/components/responseobject.d.ts.map +1 -1
- package/dist/commonjs/models/components/responseobject.js +4 -0
- package/dist/commonjs/models/components/responseobject.js.map +1 -1
- package/dist/commonjs/models/components/tooldefinition.d.ts +115 -114
- package/dist/commonjs/models/components/tooldefinition.d.ts.map +1 -1
- package/dist/commonjs/models/components/tooldefinition.js +151 -147
- package/dist/commonjs/models/components/tooldefinition.js.map +1 -1
- package/dist/commonjs/models/operations/createfunctiontool.d.ts +23 -0
- package/dist/commonjs/models/operations/createfunctiontool.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createfunctiontool.js +72 -0
- package/dist/commonjs/models/operations/createfunctiontool.js.map +1 -0
- package/dist/commonjs/models/operations/deletefunctiontool.d.ts +51 -0
- package/dist/commonjs/models/operations/deletefunctiontool.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletefunctiontool.js +98 -0
- package/dist/commonjs/models/operations/deletefunctiontool.js.map +1 -0
- package/dist/commonjs/models/operations/getfunctiontool.d.ts +22 -0
- package/dist/commonjs/models/operations/getfunctiontool.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getfunctiontool.js +71 -0
- package/dist/commonjs/models/operations/getfunctiontool.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +6 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +6 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listagentruns.d.ts +5 -0
- package/dist/commonjs/models/operations/listagentruns.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listagentruns.js +2 -0
- package/dist/commonjs/models/operations/listagentruns.js.map +1 -1
- package/dist/commonjs/models/operations/listagents.d.ts +10 -0
- package/dist/commonjs/models/operations/listagents.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listagents.js +4 -0
- package/dist/commonjs/models/operations/listagents.js.map +1 -1
- package/dist/commonjs/models/operations/listagentversions.d.ts +5 -0
- package/dist/commonjs/models/operations/listagentversions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listagentversions.js +2 -0
- package/dist/commonjs/models/operations/listagentversions.js.map +1 -1
- package/dist/commonjs/models/operations/listfunctiontools.d.ts +39 -0
- package/dist/commonjs/models/operations/listfunctiontools.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listfunctiontools.js +81 -0
- package/dist/commonjs/models/operations/listfunctiontools.js.map +1 -0
- package/dist/commonjs/models/operations/restoreagent.d.ts +22 -0
- package/dist/commonjs/models/operations/restoreagent.d.ts.map +1 -0
- package/dist/commonjs/models/operations/restoreagent.js +71 -0
- package/dist/commonjs/models/operations/restoreagent.js.map +1 -0
- package/dist/commonjs/models/operations/updatefunctiontool.d.ts +25 -0
- package/dist/commonjs/models/operations/updatefunctiontool.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updatefunctiontool.js +76 -0
- package/dist/commonjs/models/operations/updatefunctiontool.js.map +1 -0
- package/dist/commonjs/react-query/agentRunsListAgentRuns.core.d.ts +1 -0
- package/dist/commonjs/react-query/agentRunsListAgentRuns.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/agentRunsListAgentRuns.core.js +1 -0
- package/dist/commonjs/react-query/agentRunsListAgentRuns.core.js.map +1 -1
- package/dist/commonjs/react-query/agentRunsListAgentRuns.d.ts +2 -0
- package/dist/commonjs/react-query/agentRunsListAgentRuns.d.ts.map +1 -1
- package/dist/commonjs/react-query/agentRunsListAgentRuns.js.map +1 -1
- package/dist/commonjs/react-query/agentVersionsListAgentVersions.core.d.ts +1 -0
- package/dist/commonjs/react-query/agentVersionsListAgentVersions.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/agentVersionsListAgentVersions.core.js +1 -0
- package/dist/commonjs/react-query/agentVersionsListAgentVersions.core.js.map +1 -1
- package/dist/commonjs/react-query/agentVersionsListAgentVersions.d.ts +2 -0
- package/dist/commonjs/react-query/agentVersionsListAgentVersions.d.ts.map +1 -1
- package/dist/commonjs/react-query/agentVersionsListAgentVersions.js.map +1 -1
- package/dist/commonjs/react-query/agentsCreateFunctionTool.d.ts +26 -0
- package/dist/commonjs/react-query/agentsCreateFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/react-query/agentsCreateFunctionTool.js +44 -0
- package/dist/commonjs/react-query/agentsCreateFunctionTool.js.map +1 -0
- package/dist/commonjs/react-query/agentsDeleteAgent.d.ts +4 -1
- package/dist/commonjs/react-query/agentsDeleteAgent.d.ts.map +1 -1
- package/dist/commonjs/react-query/agentsDeleteAgent.js +4 -1
- package/dist/commonjs/react-query/agentsDeleteAgent.js.map +1 -1
- package/dist/commonjs/react-query/agentsDeleteFunctionTool.d.ts +28 -0
- package/dist/commonjs/react-query/agentsDeleteFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/react-query/agentsDeleteFunctionTool.js +47 -0
- package/dist/commonjs/react-query/agentsDeleteFunctionTool.js.map +1 -0
- package/dist/commonjs/react-query/agentsGetFunctionTool.core.d.ts +15 -0
- package/dist/commonjs/react-query/agentsGetFunctionTool.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/agentsGetFunctionTool.core.js +36 -0
- package/dist/commonjs/react-query/agentsGetFunctionTool.core.js.map +1 -0
- package/dist/commonjs/react-query/agentsGetFunctionTool.d.ts +32 -0
- package/dist/commonjs/react-query/agentsGetFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/react-query/agentsGetFunctionTool.js +54 -0
- package/dist/commonjs/react-query/agentsGetFunctionTool.js.map +1 -0
- package/dist/commonjs/react-query/agentsListAgents.core.d.ts +2 -0
- package/dist/commonjs/react-query/agentsListAgents.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/agentsListAgents.core.js +2 -0
- package/dist/commonjs/react-query/agentsListAgents.core.js.map +1 -1
- package/dist/commonjs/react-query/agentsListAgents.d.ts +4 -0
- package/dist/commonjs/react-query/agentsListAgents.d.ts.map +1 -1
- package/dist/commonjs/react-query/agentsListAgents.js.map +1 -1
- package/dist/commonjs/react-query/agentsListFunctionTools.core.d.ts +18 -0
- package/dist/commonjs/react-query/agentsListFunctionTools.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/agentsListFunctionTools.core.js +39 -0
- package/dist/commonjs/react-query/agentsListFunctionTools.core.js.map +1 -0
- package/dist/commonjs/react-query/agentsListFunctionTools.d.ts +36 -0
- package/dist/commonjs/react-query/agentsListFunctionTools.d.ts.map +1 -0
- package/dist/commonjs/react-query/agentsListFunctionTools.js +54 -0
- package/dist/commonjs/react-query/agentsListFunctionTools.js.map +1 -0
- package/dist/commonjs/react-query/agentsRestoreAgent.d.ts +30 -0
- package/dist/commonjs/react-query/agentsRestoreAgent.d.ts.map +1 -0
- package/dist/commonjs/react-query/agentsRestoreAgent.js +47 -0
- package/dist/commonjs/react-query/agentsRestoreAgent.js.map +1 -0
- package/dist/commonjs/react-query/agentsUpdateFunctionTool.d.ts +29 -0
- package/dist/commonjs/react-query/agentsUpdateFunctionTool.d.ts.map +1 -0
- package/dist/commonjs/react-query/agentsUpdateFunctionTool.js +47 -0
- package/dist/commonjs/react-query/agentsUpdateFunctionTool.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +6 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +6 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/sdk/agents.d.ts +37 -1
- package/dist/commonjs/sdk/agents.d.ts.map +1 -1
- package/dist/commonjs/sdk/agents.js +55 -1
- package/dist/commonjs/sdk/agents.js.map +1 -1
- package/dist/esm/funcs/agentRunsListAgentRuns.js +1 -0
- package/dist/esm/funcs/agentRunsListAgentRuns.js.map +1 -1
- package/dist/esm/funcs/agentVersionsListAgentVersions.js +1 -0
- package/dist/esm/funcs/agentVersionsListAgentVersions.js.map +1 -1
- package/dist/esm/funcs/agentsCreateFunctionTool.d.ts +17 -0
- package/dist/esm/funcs/agentsCreateFunctionTool.d.ts.map +1 -0
- package/dist/esm/funcs/agentsCreateFunctionTool.js +92 -0
- package/dist/esm/funcs/agentsCreateFunctionTool.js.map +1 -0
- package/dist/esm/funcs/agentsDeleteAgent.d.ts +4 -1
- package/dist/esm/funcs/agentsDeleteAgent.d.ts.map +1 -1
- package/dist/esm/funcs/agentsDeleteAgent.js +4 -1
- package/dist/esm/funcs/agentsDeleteAgent.js.map +1 -1
- package/dist/esm/funcs/agentsDeleteFunctionTool.d.ts +19 -0
- package/dist/esm/funcs/agentsDeleteFunctionTool.d.ts.map +1 -0
- package/dist/esm/funcs/agentsDeleteFunctionTool.js +97 -0
- package/dist/esm/funcs/agentsDeleteFunctionTool.js.map +1 -0
- package/dist/esm/funcs/agentsGetFunctionTool.d.ts +17 -0
- package/dist/esm/funcs/agentsGetFunctionTool.d.ts.map +1 -0
- package/dist/esm/funcs/agentsGetFunctionTool.js +95 -0
- package/dist/esm/funcs/agentsGetFunctionTool.js.map +1 -0
- package/dist/esm/funcs/agentsListAgents.js +2 -0
- package/dist/esm/funcs/agentsListAgents.js.map +1 -1
- package/dist/esm/funcs/agentsListFunctionTools.d.ts +17 -0
- package/dist/esm/funcs/agentsListFunctionTools.d.ts.map +1 -0
- package/dist/esm/funcs/agentsListFunctionTools.js +95 -0
- package/dist/esm/funcs/agentsListFunctionTools.js.map +1 -0
- package/dist/esm/funcs/agentsRestoreAgent.d.ts +21 -0
- package/dist/esm/funcs/agentsRestoreAgent.d.ts.map +1 -0
- package/dist/esm/funcs/agentsRestoreAgent.js +102 -0
- package/dist/esm/funcs/agentsRestoreAgent.js.map +1 -0
- package/dist/esm/funcs/agentsUpdateFunctionTool.d.ts +20 -0
- package/dist/esm/funcs/agentsUpdateFunctionTool.d.ts.map +1 -0
- package/dist/esm/funcs/agentsUpdateFunctionTool.js +101 -0
- package/dist/esm/funcs/agentsUpdateFunctionTool.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +13 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/agentsCreateFunctionTool.d.ts +8 -0
- package/dist/esm/mcp-server/tools/agentsCreateFunctionTool.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/agentsCreateFunctionTool.js +26 -0
- package/dist/esm/mcp-server/tools/agentsCreateFunctionTool.js.map +1 -0
- package/dist/esm/mcp-server/tools/agentsDeleteAgent.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/agentsDeleteAgent.js +3 -1
- package/dist/esm/mcp-server/tools/agentsDeleteAgent.js.map +1 -1
- package/dist/esm/mcp-server/tools/agentsDeleteFunctionTool.d.ts +8 -0
- package/dist/esm/mcp-server/tools/agentsDeleteFunctionTool.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/agentsDeleteFunctionTool.js +28 -0
- package/dist/esm/mcp-server/tools/agentsDeleteFunctionTool.js.map +1 -0
- package/dist/esm/mcp-server/tools/agentsGetFunctionTool.d.ts +8 -0
- package/dist/esm/mcp-server/tools/agentsGetFunctionTool.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/agentsGetFunctionTool.js +26 -0
- package/dist/esm/mcp-server/tools/agentsGetFunctionTool.js.map +1 -0
- package/dist/esm/mcp-server/tools/agentsListFunctionTools.d.ts +8 -0
- package/dist/esm/mcp-server/tools/agentsListFunctionTools.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/agentsListFunctionTools.js +26 -0
- package/dist/esm/mcp-server/tools/agentsListFunctionTools.js.map +1 -0
- package/dist/esm/mcp-server/tools/agentsRestoreAgent.d.ts +8 -0
- package/dist/esm/mcp-server/tools/agentsRestoreAgent.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/agentsRestoreAgent.js +28 -0
- package/dist/esm/mcp-server/tools/agentsRestoreAgent.js.map +1 -0
- package/dist/esm/mcp-server/tools/agentsUpdateFunctionTool.d.ts +8 -0
- package/dist/esm/mcp-server/tools/agentsUpdateFunctionTool.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/agentsUpdateFunctionTool.js +28 -0
- package/dist/esm/mcp-server/tools/agentsUpdateFunctionTool.js.map +1 -0
- package/dist/esm/models/components/agent.d.ts +12 -0
- package/dist/esm/models/components/agent.d.ts.map +1 -1
- package/dist/esm/models/components/agent.js +12 -0
- package/dist/esm/models/components/agent.js.map +1 -1
- package/dist/esm/models/components/agentsfunctiontooldefinition.d.ts +40 -0
- package/dist/esm/models/components/agentsfunctiontooldefinition.d.ts.map +1 -0
- package/dist/esm/models/components/agentsfunctiontooldefinition.js +46 -0
- package/dist/esm/models/components/agentsfunctiontooldefinition.js.map +1 -0
- package/dist/esm/models/components/functiontool.d.ts +35 -0
- package/dist/esm/models/components/functiontool.d.ts.map +1 -0
- package/dist/esm/models/components/functiontool.js +47 -0
- package/dist/esm/models/components/functiontool.js.map +1 -0
- package/dist/esm/models/components/functiontoollist.d.ts +35 -0
- package/dist/esm/models/components/functiontoollist.d.ts.map +1 -0
- package/dist/esm/models/components/functiontoollist.js +49 -0
- package/dist/esm/models/components/functiontoollist.js.map +1 -0
- package/dist/esm/models/components/functiontoolreference.d.ts +28 -0
- package/dist/esm/models/components/functiontoolreference.d.ts.map +1 -0
- package/dist/esm/models/components/functiontoolreference.js +38 -0
- package/dist/esm/models/components/functiontoolreference.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +4 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +4 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/openaichatcompletion.d.ts +10 -0
- package/dist/esm/models/components/openaichatcompletion.d.ts.map +1 -1
- package/dist/esm/models/components/openaichatcompletion.js +8 -0
- package/dist/esm/models/components/openaichatcompletion.js.map +1 -1
- package/dist/esm/models/components/openaichatcompletionchunk.d.ts +10 -0
- package/dist/esm/models/components/openaichatcompletionchunk.d.ts.map +1 -1
- package/dist/esm/models/components/openaichatcompletionchunk.js +8 -0
- package/dist/esm/models/components/openaichatcompletionchunk.js.map +1 -1
- package/dist/esm/models/components/responseobject.d.ts +5 -0
- package/dist/esm/models/components/responseobject.d.ts.map +1 -1
- package/dist/esm/models/components/responseobject.js +4 -0
- package/dist/esm/models/components/responseobject.js.map +1 -1
- package/dist/esm/models/components/tooldefinition.d.ts +115 -114
- package/dist/esm/models/components/tooldefinition.d.ts.map +1 -1
- package/dist/esm/models/components/tooldefinition.js +129 -125
- package/dist/esm/models/components/tooldefinition.js.map +1 -1
- package/dist/esm/models/operations/createfunctiontool.d.ts +23 -0
- package/dist/esm/models/operations/createfunctiontool.d.ts.map +1 -0
- package/dist/esm/models/operations/createfunctiontool.js +34 -0
- package/dist/esm/models/operations/createfunctiontool.js.map +1 -0
- package/dist/esm/models/operations/deletefunctiontool.d.ts +51 -0
- package/dist/esm/models/operations/deletefunctiontool.d.ts.map +1 -0
- package/dist/esm/models/operations/deletefunctiontool.js +58 -0
- package/dist/esm/models/operations/deletefunctiontool.js.map +1 -0
- package/dist/esm/models/operations/getfunctiontool.d.ts +22 -0
- package/dist/esm/models/operations/getfunctiontool.d.ts.map +1 -0
- package/dist/esm/models/operations/getfunctiontool.js +33 -0
- package/dist/esm/models/operations/getfunctiontool.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +6 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +6 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listagentruns.d.ts +5 -0
- package/dist/esm/models/operations/listagentruns.d.ts.map +1 -1
- package/dist/esm/models/operations/listagentruns.js +2 -0
- package/dist/esm/models/operations/listagentruns.js.map +1 -1
- package/dist/esm/models/operations/listagents.d.ts +10 -0
- package/dist/esm/models/operations/listagents.d.ts.map +1 -1
- package/dist/esm/models/operations/listagents.js +4 -0
- package/dist/esm/models/operations/listagents.js.map +1 -1
- package/dist/esm/models/operations/listagentversions.d.ts +5 -0
- package/dist/esm/models/operations/listagentversions.d.ts.map +1 -1
- package/dist/esm/models/operations/listagentversions.js +2 -0
- package/dist/esm/models/operations/listagentversions.js.map +1 -1
- package/dist/esm/models/operations/listfunctiontools.d.ts +39 -0
- package/dist/esm/models/operations/listfunctiontools.d.ts.map +1 -0
- package/dist/esm/models/operations/listfunctiontools.js +43 -0
- package/dist/esm/models/operations/listfunctiontools.js.map +1 -0
- package/dist/esm/models/operations/restoreagent.d.ts +22 -0
- package/dist/esm/models/operations/restoreagent.d.ts.map +1 -0
- package/dist/esm/models/operations/restoreagent.js +33 -0
- package/dist/esm/models/operations/restoreagent.js.map +1 -0
- package/dist/esm/models/operations/updatefunctiontool.d.ts +25 -0
- package/dist/esm/models/operations/updatefunctiontool.d.ts.map +1 -0
- package/dist/esm/models/operations/updatefunctiontool.js +38 -0
- package/dist/esm/models/operations/updatefunctiontool.js.map +1 -0
- package/dist/esm/react-query/agentRunsListAgentRuns.core.d.ts +1 -0
- package/dist/esm/react-query/agentRunsListAgentRuns.core.d.ts.map +1 -1
- package/dist/esm/react-query/agentRunsListAgentRuns.core.js +1 -0
- package/dist/esm/react-query/agentRunsListAgentRuns.core.js.map +1 -1
- package/dist/esm/react-query/agentRunsListAgentRuns.d.ts +2 -0
- package/dist/esm/react-query/agentRunsListAgentRuns.d.ts.map +1 -1
- package/dist/esm/react-query/agentRunsListAgentRuns.js.map +1 -1
- package/dist/esm/react-query/agentVersionsListAgentVersions.core.d.ts +1 -0
- package/dist/esm/react-query/agentVersionsListAgentVersions.core.d.ts.map +1 -1
- package/dist/esm/react-query/agentVersionsListAgentVersions.core.js +1 -0
- package/dist/esm/react-query/agentVersionsListAgentVersions.core.js.map +1 -1
- package/dist/esm/react-query/agentVersionsListAgentVersions.d.ts +2 -0
- package/dist/esm/react-query/agentVersionsListAgentVersions.d.ts.map +1 -1
- package/dist/esm/react-query/agentVersionsListAgentVersions.js.map +1 -1
- package/dist/esm/react-query/agentsCreateFunctionTool.d.ts +26 -0
- package/dist/esm/react-query/agentsCreateFunctionTool.d.ts.map +1 -0
- package/dist/esm/react-query/agentsCreateFunctionTool.js +39 -0
- package/dist/esm/react-query/agentsCreateFunctionTool.js.map +1 -0
- package/dist/esm/react-query/agentsDeleteAgent.d.ts +4 -1
- package/dist/esm/react-query/agentsDeleteAgent.d.ts.map +1 -1
- package/dist/esm/react-query/agentsDeleteAgent.js +4 -1
- package/dist/esm/react-query/agentsDeleteAgent.js.map +1 -1
- package/dist/esm/react-query/agentsDeleteFunctionTool.d.ts +28 -0
- package/dist/esm/react-query/agentsDeleteFunctionTool.d.ts.map +1 -0
- package/dist/esm/react-query/agentsDeleteFunctionTool.js +42 -0
- package/dist/esm/react-query/agentsDeleteFunctionTool.js.map +1 -0
- package/dist/esm/react-query/agentsGetFunctionTool.core.d.ts +15 -0
- package/dist/esm/react-query/agentsGetFunctionTool.core.d.ts.map +1 -0
- package/dist/esm/react-query/agentsGetFunctionTool.core.js +31 -0
- package/dist/esm/react-query/agentsGetFunctionTool.core.js.map +1 -0
- package/dist/esm/react-query/agentsGetFunctionTool.d.ts +32 -0
- package/dist/esm/react-query/agentsGetFunctionTool.d.ts.map +1 -0
- package/dist/esm/react-query/agentsGetFunctionTool.js +44 -0
- package/dist/esm/react-query/agentsGetFunctionTool.js.map +1 -0
- package/dist/esm/react-query/agentsListAgents.core.d.ts +2 -0
- package/dist/esm/react-query/agentsListAgents.core.d.ts.map +1 -1
- package/dist/esm/react-query/agentsListAgents.core.js +2 -0
- package/dist/esm/react-query/agentsListAgents.core.js.map +1 -1
- package/dist/esm/react-query/agentsListAgents.d.ts +4 -0
- package/dist/esm/react-query/agentsListAgents.d.ts.map +1 -1
- package/dist/esm/react-query/agentsListAgents.js.map +1 -1
- package/dist/esm/react-query/agentsListFunctionTools.core.d.ts +18 -0
- package/dist/esm/react-query/agentsListFunctionTools.core.d.ts.map +1 -0
- package/dist/esm/react-query/agentsListFunctionTools.core.js +34 -0
- package/dist/esm/react-query/agentsListFunctionTools.core.js.map +1 -0
- package/dist/esm/react-query/agentsListFunctionTools.d.ts +36 -0
- package/dist/esm/react-query/agentsListFunctionTools.d.ts.map +1 -0
- package/dist/esm/react-query/agentsListFunctionTools.js +44 -0
- package/dist/esm/react-query/agentsListFunctionTools.js.map +1 -0
- package/dist/esm/react-query/agentsRestoreAgent.d.ts +30 -0
- package/dist/esm/react-query/agentsRestoreAgent.d.ts.map +1 -0
- package/dist/esm/react-query/agentsRestoreAgent.js +42 -0
- package/dist/esm/react-query/agentsRestoreAgent.js.map +1 -0
- package/dist/esm/react-query/agentsUpdateFunctionTool.d.ts +29 -0
- package/dist/esm/react-query/agentsUpdateFunctionTool.d.ts.map +1 -0
- package/dist/esm/react-query/agentsUpdateFunctionTool.js +42 -0
- package/dist/esm/react-query/agentsUpdateFunctionTool.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +6 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +6 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/sdk/agents.d.ts +37 -1
- package/dist/esm/sdk/agents.d.ts.map +1 -1
- package/dist/esm/sdk/agents.js +55 -1
- package/dist/esm/sdk/agents.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/agentRunsListAgentRuns.ts +1 -0
- package/src/funcs/agentVersionsListAgentVersions.ts +1 -0
- package/src/funcs/agentsCreateFunctionTool.ts +179 -0
- package/src/funcs/agentsDeleteAgent.ts +4 -1
- package/src/funcs/agentsDeleteFunctionTool.ts +186 -0
- package/src/funcs/agentsGetFunctionTool.ts +184 -0
- package/src/funcs/agentsListAgents.ts +2 -0
- package/src/funcs/agentsListFunctionTools.ts +183 -0
- package/src/funcs/agentsRestoreAgent.ts +194 -0
- package/src/funcs/agentsUpdateFunctionTool.ts +190 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +13 -1
- package/src/mcp-server/tools/agentsCreateFunctionTool.ts +35 -0
- package/src/mcp-server/tools/agentsDeleteAgent.ts +3 -1
- package/src/mcp-server/tools/agentsDeleteFunctionTool.ts +37 -0
- package/src/mcp-server/tools/agentsGetFunctionTool.ts +35 -0
- package/src/mcp-server/tools/agentsListFunctionTools.ts +35 -0
- package/src/mcp-server/tools/agentsRestoreAgent.ts +37 -0
- package/src/mcp-server/tools/agentsUpdateFunctionTool.ts +37 -0
- package/src/models/components/agent.ts +26 -0
- package/src/models/components/agentsfunctiontooldefinition.ts +99 -0
- package/src/models/components/functiontool.ts +95 -0
- package/src/models/components/functiontoollist.ts +101 -0
- package/src/models/components/functiontoolreference.ts +81 -0
- package/src/models/components/index.ts +4 -0
- package/src/models/components/openaichatcompletion.ts +18 -0
- package/src/models/components/openaichatcompletionchunk.ts +18 -0
- package/src/models/components/responseobject.ts +9 -0
- package/src/models/components/tooldefinition.ts +284 -279
- package/src/models/operations/createfunctiontool.ts +73 -0
- package/src/models/operations/deletefunctiontool.ts +142 -0
- package/src/models/operations/getfunctiontool.ts +69 -0
- package/src/models/operations/index.ts +6 -0
- package/src/models/operations/listagentruns.ts +7 -0
- package/src/models/operations/listagents.ts +14 -0
- package/src/models/operations/listagentversions.ts +7 -0
- package/src/models/operations/listfunctiontools.ts +96 -0
- package/src/models/operations/restoreagent.ts +69 -0
- package/src/models/operations/updatefunctiontool.ts +79 -0
- package/src/react-query/agentRunsListAgentRuns.core.ts +2 -0
- package/src/react-query/agentRunsListAgentRuns.ts +2 -0
- package/src/react-query/agentVersionsListAgentVersions.core.ts +2 -0
- package/src/react-query/agentVersionsListAgentVersions.ts +2 -0
- package/src/react-query/agentsCreateFunctionTool.ts +106 -0
- package/src/react-query/agentsDeleteAgent.ts +4 -1
- package/src/react-query/agentsDeleteFunctionTool.ts +109 -0
- package/src/react-query/agentsGetFunctionTool.core.ts +76 -0
- package/src/react-query/agentsGetFunctionTool.ts +135 -0
- package/src/react-query/agentsListAgents.core.ts +4 -0
- package/src/react-query/agentsListAgents.ts +4 -0
- package/src/react-query/agentsListFunctionTools.core.ts +83 -0
- package/src/react-query/agentsListFunctionTools.ts +144 -0
- package/src/react-query/agentsRestoreAgent.ts +111 -0
- package/src/react-query/agentsUpdateFunctionTool.ts +109 -0
- package/src/react-query/index.ts +6 -0
- package/src/sdk/agents.ts +103 -1
|
@@ -27,7 +27,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
27
27
|
import { Result } from "../types/fp.js";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Soft-delete an agent
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Preserves configuration versions and run history for audit. The restore deadline is pinned using AGENT_RETENTION_DAYS at deletion.
|
|
31
34
|
*
|
|
32
35
|
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
33
36
|
*/
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Delete a reusable function tool
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Attached agents fail until the unavailable reference is removed. Existing run snapshots remain usable.
|
|
33
|
+
*
|
|
34
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
35
|
+
*/
|
|
36
|
+
export function agentsDeleteFunctionTool(
|
|
37
|
+
client: SDKCore,
|
|
38
|
+
request: operations.DeleteFunctionToolRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
operations.DeleteFunctionToolResponseBody,
|
|
43
|
+
| SDKError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: SDKCore,
|
|
62
|
+
request: operations.DeleteFunctionToolRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
operations.DeleteFunctionToolResponseBody,
|
|
68
|
+
| SDKError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) => operations.DeleteFunctionToolRequest$outboundSchema.parse(value),
|
|
83
|
+
"Input validation failed",
|
|
84
|
+
);
|
|
85
|
+
if (!parsed.ok) {
|
|
86
|
+
return [parsed, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const payload = parsed.value;
|
|
89
|
+
const body = null;
|
|
90
|
+
|
|
91
|
+
const pathParams = {
|
|
92
|
+
tool_id: encodeSimple("tool_id", payload.tool_id, {
|
|
93
|
+
explode: false,
|
|
94
|
+
charEncoding: "percent",
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
const path = pathToFunc("/api/v1/agents/function-tools/{tool_id}")(
|
|
98
|
+
pathParams,
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
const headers = new Headers(compactMap({
|
|
102
|
+
Accept: "application/json",
|
|
103
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
104
|
+
"X-On-Behalf-Of",
|
|
105
|
+
payload["X-On-Behalf-Of"],
|
|
106
|
+
{ explode: false, charEncoding: "none" },
|
|
107
|
+
),
|
|
108
|
+
}));
|
|
109
|
+
|
|
110
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
111
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
112
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
113
|
+
|
|
114
|
+
const context = {
|
|
115
|
+
options: client._options,
|
|
116
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
117
|
+
operationID: "deleteFunctionTool",
|
|
118
|
+
oAuth2Scopes: null,
|
|
119
|
+
|
|
120
|
+
resolvedSecurity: requestSecurity,
|
|
121
|
+
|
|
122
|
+
securitySource: client._options.bearerAuth,
|
|
123
|
+
retryConfig: options?.retries
|
|
124
|
+
|| client._options.retryConfig
|
|
125
|
+
|| {
|
|
126
|
+
strategy: "backoff",
|
|
127
|
+
backoff: {
|
|
128
|
+
initialInterval: 500,
|
|
129
|
+
maxInterval: 5000,
|
|
130
|
+
exponent: 1.5,
|
|
131
|
+
maxElapsedTime: 15000,
|
|
132
|
+
},
|
|
133
|
+
retryConnectionErrors: true,
|
|
134
|
+
}
|
|
135
|
+
|| { strategy: "none" },
|
|
136
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const requestRes = client._createRequest(context, {
|
|
140
|
+
security: requestSecurity,
|
|
141
|
+
method: "DELETE",
|
|
142
|
+
baseURL: options?.serverURL,
|
|
143
|
+
path: path,
|
|
144
|
+
headers: headers,
|
|
145
|
+
body: body,
|
|
146
|
+
userAgent: client._options.userAgent,
|
|
147
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
148
|
+
}, options);
|
|
149
|
+
if (!requestRes.ok) {
|
|
150
|
+
return [requestRes, { status: "invalid" }];
|
|
151
|
+
}
|
|
152
|
+
const req = requestRes.value;
|
|
153
|
+
|
|
154
|
+
const doResult = await client._do(req, {
|
|
155
|
+
context,
|
|
156
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
157
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
158
|
+
retryConfig: context.retryConfig,
|
|
159
|
+
retryCodes: context.retryCodes,
|
|
160
|
+
});
|
|
161
|
+
if (!doResult.ok) {
|
|
162
|
+
return [doResult, { status: "request-error", request: req }];
|
|
163
|
+
}
|
|
164
|
+
const response = doResult.value;
|
|
165
|
+
|
|
166
|
+
const [result] = await M.match<
|
|
167
|
+
operations.DeleteFunctionToolResponseBody,
|
|
168
|
+
| SDKError
|
|
169
|
+
| ResponseValidationError
|
|
170
|
+
| ConnectionError
|
|
171
|
+
| RequestAbortedError
|
|
172
|
+
| RequestTimeoutError
|
|
173
|
+
| InvalidRequestError
|
|
174
|
+
| UnexpectedClientError
|
|
175
|
+
| SDKValidationError
|
|
176
|
+
>(
|
|
177
|
+
M.json(200, operations.DeleteFunctionToolResponseBody$inboundSchema),
|
|
178
|
+
M.fail([404, "4XX"]),
|
|
179
|
+
M.fail("5XX"),
|
|
180
|
+
)(response, req);
|
|
181
|
+
if (!result.ok) {
|
|
182
|
+
return [result, { status: "complete", request: req, response }];
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return [result, { status: "complete", request: req, response }];
|
|
186
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get a reusable function tool
|
|
31
|
+
*
|
|
32
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
33
|
+
*/
|
|
34
|
+
export function agentsGetFunctionTool(
|
|
35
|
+
client: SDKCore,
|
|
36
|
+
request: operations.GetFunctionToolRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
components.FunctionTool,
|
|
41
|
+
| SDKError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: SDKCore,
|
|
60
|
+
request: operations.GetFunctionToolRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
components.FunctionTool,
|
|
66
|
+
| SDKError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) => operations.GetFunctionToolRequest$outboundSchema.parse(value),
|
|
81
|
+
"Input validation failed",
|
|
82
|
+
);
|
|
83
|
+
if (!parsed.ok) {
|
|
84
|
+
return [parsed, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const payload = parsed.value;
|
|
87
|
+
const body = null;
|
|
88
|
+
|
|
89
|
+
const pathParams = {
|
|
90
|
+
tool_id: encodeSimple("tool_id", payload.tool_id, {
|
|
91
|
+
explode: false,
|
|
92
|
+
charEncoding: "percent",
|
|
93
|
+
}),
|
|
94
|
+
};
|
|
95
|
+
const path = pathToFunc("/api/v1/agents/function-tools/{tool_id}")(
|
|
96
|
+
pathParams,
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
const headers = new Headers(compactMap({
|
|
100
|
+
Accept: "application/json",
|
|
101
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
102
|
+
"X-On-Behalf-Of",
|
|
103
|
+
payload["X-On-Behalf-Of"],
|
|
104
|
+
{ explode: false, charEncoding: "none" },
|
|
105
|
+
),
|
|
106
|
+
}));
|
|
107
|
+
|
|
108
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
109
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
110
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
111
|
+
|
|
112
|
+
const context = {
|
|
113
|
+
options: client._options,
|
|
114
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
115
|
+
operationID: "getFunctionTool",
|
|
116
|
+
oAuth2Scopes: null,
|
|
117
|
+
|
|
118
|
+
resolvedSecurity: requestSecurity,
|
|
119
|
+
|
|
120
|
+
securitySource: client._options.bearerAuth,
|
|
121
|
+
retryConfig: options?.retries
|
|
122
|
+
|| client._options.retryConfig
|
|
123
|
+
|| {
|
|
124
|
+
strategy: "backoff",
|
|
125
|
+
backoff: {
|
|
126
|
+
initialInterval: 500,
|
|
127
|
+
maxInterval: 5000,
|
|
128
|
+
exponent: 1.5,
|
|
129
|
+
maxElapsedTime: 15000,
|
|
130
|
+
},
|
|
131
|
+
retryConnectionErrors: true,
|
|
132
|
+
}
|
|
133
|
+
|| { strategy: "none" },
|
|
134
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const requestRes = client._createRequest(context, {
|
|
138
|
+
security: requestSecurity,
|
|
139
|
+
method: "GET",
|
|
140
|
+
baseURL: options?.serverURL,
|
|
141
|
+
path: path,
|
|
142
|
+
headers: headers,
|
|
143
|
+
body: body,
|
|
144
|
+
userAgent: client._options.userAgent,
|
|
145
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
146
|
+
}, options);
|
|
147
|
+
if (!requestRes.ok) {
|
|
148
|
+
return [requestRes, { status: "invalid" }];
|
|
149
|
+
}
|
|
150
|
+
const req = requestRes.value;
|
|
151
|
+
|
|
152
|
+
const doResult = await client._do(req, {
|
|
153
|
+
context,
|
|
154
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
155
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
156
|
+
retryConfig: context.retryConfig,
|
|
157
|
+
retryCodes: context.retryCodes,
|
|
158
|
+
});
|
|
159
|
+
if (!doResult.ok) {
|
|
160
|
+
return [doResult, { status: "request-error", request: req }];
|
|
161
|
+
}
|
|
162
|
+
const response = doResult.value;
|
|
163
|
+
|
|
164
|
+
const [result] = await M.match<
|
|
165
|
+
components.FunctionTool,
|
|
166
|
+
| SDKError
|
|
167
|
+
| ResponseValidationError
|
|
168
|
+
| ConnectionError
|
|
169
|
+
| RequestAbortedError
|
|
170
|
+
| RequestTimeoutError
|
|
171
|
+
| InvalidRequestError
|
|
172
|
+
| UnexpectedClientError
|
|
173
|
+
| SDKValidationError
|
|
174
|
+
>(
|
|
175
|
+
M.json(200, components.FunctionTool$inboundSchema),
|
|
176
|
+
M.fail([404, "4XX"]),
|
|
177
|
+
M.fail("5XX"),
|
|
178
|
+
)(response, req);
|
|
179
|
+
if (!result.ok) {
|
|
180
|
+
return [result, { status: "complete", request: req, response }];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return [result, { status: "complete", request: req, response }];
|
|
184
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* List reusable function tools
|
|
31
|
+
*
|
|
32
|
+
* If set, this operation will use {@link Security.bearerAuth} from the global security.
|
|
33
|
+
*/
|
|
34
|
+
export function agentsListFunctionTools(
|
|
35
|
+
client: SDKCore,
|
|
36
|
+
request: operations.ListFunctionToolsRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
components.FunctionToolList,
|
|
41
|
+
| SDKError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: SDKCore,
|
|
60
|
+
request: operations.ListFunctionToolsRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
components.FunctionToolList,
|
|
66
|
+
| SDKError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) => operations.ListFunctionToolsRequest$outboundSchema.parse(value),
|
|
81
|
+
"Input validation failed",
|
|
82
|
+
);
|
|
83
|
+
if (!parsed.ok) {
|
|
84
|
+
return [parsed, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const payload = parsed.value;
|
|
87
|
+
const body = null;
|
|
88
|
+
|
|
89
|
+
const path = pathToFunc("/api/v1/agents/function-tools")();
|
|
90
|
+
|
|
91
|
+
const query = encodeFormQuery({
|
|
92
|
+
"after": payload.after,
|
|
93
|
+
"limit": payload.limit,
|
|
94
|
+
"order": payload.order,
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const headers = new Headers(compactMap({
|
|
98
|
+
Accept: "application/json",
|
|
99
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
100
|
+
"X-On-Behalf-Of",
|
|
101
|
+
payload["X-On-Behalf-Of"],
|
|
102
|
+
{ explode: false, charEncoding: "none" },
|
|
103
|
+
),
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
107
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
108
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
109
|
+
|
|
110
|
+
const context = {
|
|
111
|
+
options: client._options,
|
|
112
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
113
|
+
operationID: "listFunctionTools",
|
|
114
|
+
oAuth2Scopes: null,
|
|
115
|
+
|
|
116
|
+
resolvedSecurity: requestSecurity,
|
|
117
|
+
|
|
118
|
+
securitySource: client._options.bearerAuth,
|
|
119
|
+
retryConfig: options?.retries
|
|
120
|
+
|| client._options.retryConfig
|
|
121
|
+
|| {
|
|
122
|
+
strategy: "backoff",
|
|
123
|
+
backoff: {
|
|
124
|
+
initialInterval: 500,
|
|
125
|
+
maxInterval: 5000,
|
|
126
|
+
exponent: 1.5,
|
|
127
|
+
maxElapsedTime: 15000,
|
|
128
|
+
},
|
|
129
|
+
retryConnectionErrors: true,
|
|
130
|
+
}
|
|
131
|
+
|| { strategy: "none" },
|
|
132
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const requestRes = client._createRequest(context, {
|
|
136
|
+
security: requestSecurity,
|
|
137
|
+
method: "GET",
|
|
138
|
+
baseURL: options?.serverURL,
|
|
139
|
+
path: path,
|
|
140
|
+
headers: headers,
|
|
141
|
+
query: query,
|
|
142
|
+
body: body,
|
|
143
|
+
userAgent: client._options.userAgent,
|
|
144
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
145
|
+
}, options);
|
|
146
|
+
if (!requestRes.ok) {
|
|
147
|
+
return [requestRes, { status: "invalid" }];
|
|
148
|
+
}
|
|
149
|
+
const req = requestRes.value;
|
|
150
|
+
|
|
151
|
+
const doResult = await client._do(req, {
|
|
152
|
+
context,
|
|
153
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
154
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
155
|
+
retryConfig: context.retryConfig,
|
|
156
|
+
retryCodes: context.retryCodes,
|
|
157
|
+
});
|
|
158
|
+
if (!doResult.ok) {
|
|
159
|
+
return [doResult, { status: "request-error", request: req }];
|
|
160
|
+
}
|
|
161
|
+
const response = doResult.value;
|
|
162
|
+
|
|
163
|
+
const [result] = await M.match<
|
|
164
|
+
components.FunctionToolList,
|
|
165
|
+
| SDKError
|
|
166
|
+
| ResponseValidationError
|
|
167
|
+
| ConnectionError
|
|
168
|
+
| RequestAbortedError
|
|
169
|
+
| RequestTimeoutError
|
|
170
|
+
| InvalidRequestError
|
|
171
|
+
| UnexpectedClientError
|
|
172
|
+
| SDKValidationError
|
|
173
|
+
>(
|
|
174
|
+
M.json(200, components.FunctionToolList$inboundSchema),
|
|
175
|
+
M.fail("4XX"),
|
|
176
|
+
M.fail("5XX"),
|
|
177
|
+
)(response, req);
|
|
178
|
+
if (!result.ok) {
|
|
179
|
+
return [result, { status: "complete", request: req, response }];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return [result, { status: "complete", request: req, response }];
|
|
183
|
+
}
|