@orq-ai/node 4.1.0-rc.1 → 4.1.0-rc.13
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 +22 -18
- package/bin/mcp-server.js +35857 -37966
- package/bin/mcp-server.js.map +100 -74
- package/docs/sdks/agents/README.md +10 -10
- package/docs/sdks/evals/README.md +103 -1
- package/docs/sdks/responses/README.md +5 -5
- package/examples/package-lock.json +1 -1
- package/funcs/agentsCreate.d.ts +1 -1
- package/funcs/agentsCreate.d.ts.map +1 -1
- package/funcs/agentsCreate.js +2 -4
- package/funcs/agentsCreate.js.map +1 -1
- package/funcs/agentsResponsesCreate.d.ts +1 -1
- package/funcs/agentsResponsesCreate.d.ts.map +1 -1
- package/funcs/agentsResponsesCreate.js +4 -4
- package/funcs/agentsResponsesCreate.js.map +1 -1
- package/funcs/agentsRun.d.ts +1 -1
- package/funcs/agentsRun.d.ts.map +1 -1
- package/funcs/agentsRun.js +2 -4
- package/funcs/agentsRun.js.map +1 -1
- package/funcs/agentsStream.d.ts +1 -1
- package/funcs/agentsStream.d.ts.map +1 -1
- package/funcs/agentsStream.js +4 -4
- package/funcs/agentsStream.js.map +1 -1
- package/funcs/agentsStreamRun.d.ts +1 -1
- package/funcs/agentsStreamRun.d.ts.map +1 -1
- package/funcs/agentsStreamRun.js +2 -4
- package/funcs/agentsStreamRun.js.map +1 -1
- package/funcs/agentsUpdate.d.ts +1 -1
- package/funcs/agentsUpdate.d.ts.map +1 -1
- package/funcs/agentsUpdate.js +4 -4
- package/funcs/agentsUpdate.js.map +1 -1
- package/funcs/evalsInvoke.d.ts +15 -0
- package/funcs/evalsInvoke.d.ts.map +1 -0
- package/funcs/evalsInvoke.js +121 -0
- package/funcs/evalsInvoke.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/agentsCreate.d.ts +1 -1
- package/mcp-server/tools/agentsCreate.js +1 -1
- package/mcp-server/tools/agentsCreate.js.map +1 -1
- package/mcp-server/tools/agentsResponsesCreate.d.ts +1 -1
- package/mcp-server/tools/agentsResponsesCreate.d.ts.map +1 -1
- package/mcp-server/tools/agentsResponsesCreate.js +2 -3
- package/mcp-server/tools/agentsResponsesCreate.js.map +1 -1
- package/mcp-server/tools/agentsRun.d.ts +1 -1
- package/mcp-server/tools/agentsRun.js +1 -1
- package/mcp-server/tools/agentsRun.js.map +1 -1
- package/mcp-server/tools/agentsStream.d.ts +1 -1
- package/mcp-server/tools/agentsStream.js +2 -2
- package/mcp-server/tools/agentsStream.js.map +1 -1
- package/mcp-server/tools/agentsStreamRun.d.ts +1 -1
- package/mcp-server/tools/agentsStreamRun.js +1 -1
- package/mcp-server/tools/agentsStreamRun.js.map +1 -1
- package/mcp-server/tools/agentsUpdate.d.ts +1 -1
- package/mcp-server/tools/agentsUpdate.d.ts.map +1 -1
- package/mcp-server/tools/agentsUpdate.js +2 -3
- package/mcp-server/tools/agentsUpdate.js.map +1 -1
- package/mcp-server/tools/evalsInvoke.d.ts +8 -0
- package/mcp-server/tools/evalsInvoke.d.ts.map +1 -0
- package/mcp-server/tools/evalsInvoke.js +62 -0
- package/mcp-server/tools/evalsInvoke.js.map +1 -0
- package/models/components/actionreviewedstreamingevent.d.ts +76 -0
- package/models/components/actionreviewedstreamingevent.d.ts.map +1 -0
- package/models/components/actionreviewedstreamingevent.js +127 -0
- package/models/components/actionreviewedstreamingevent.js.map +1 -0
- package/models/components/actionreviewrequestedstreamingevent.d.ts +135 -0
- package/models/components/actionreviewrequestedstreamingevent.d.ts.map +1 -0
- package/models/components/actionreviewrequestedstreamingevent.js +180 -0
- package/models/components/actionreviewrequestedstreamingevent.js.map +1 -0
- package/models/components/agenterroredstreamingevent.d.ts +58 -0
- package/models/components/agenterroredstreamingevent.d.ts.map +1 -0
- package/models/components/agenterroredstreamingevent.js +91 -0
- package/models/components/agenterroredstreamingevent.js.map +1 -0
- package/models/components/agentexecutionstartedstreamingevent.d.ts +62 -0
- package/models/components/agentexecutionstartedstreamingevent.d.ts.map +1 -0
- package/models/components/agentexecutionstartedstreamingevent.js +103 -0
- package/models/components/agentexecutionstartedstreamingevent.js.map +1 -0
- package/models/components/agenthandedoffstreamingevent.d.ts +51 -0
- package/models/components/agenthandedoffstreamingevent.d.ts.map +1 -0
- package/models/components/agenthandedoffstreamingevent.js +96 -0
- package/models/components/agenthandedoffstreamingevent.js.map +1 -0
- package/models/components/agentinactivestreamingevent.d.ts +309 -0
- package/models/components/agentinactivestreamingevent.d.ts.map +1 -0
- package/models/components/agentinactivestreamingevent.js +385 -0
- package/models/components/agentinactivestreamingevent.js.map +1 -0
- package/models/components/agentmessagecreatedstreamingevent.d.ts +141 -0
- package/models/components/agentmessagecreatedstreamingevent.d.ts.map +1 -0
- package/models/components/agentmessagecreatedstreamingevent.js +190 -0
- package/models/components/agentmessagecreatedstreamingevent.js.map +1 -0
- package/models/components/agentstartedstreamingevent.d.ts +382 -0
- package/models/components/agentstartedstreamingevent.d.ts.map +1 -0
- package/models/components/agentstartedstreamingevent.js +441 -0
- package/models/components/agentstartedstreamingevent.js.map +1 -0
- package/models/components/agentthoughtstreamingevent.d.ts +542 -0
- package/models/components/agentthoughtstreamingevent.d.ts.map +1 -0
- package/models/components/agentthoughtstreamingevent.js +626 -0
- package/models/components/agentthoughtstreamingevent.js.map +1 -0
- package/models/components/datapart.d.ts +41 -0
- package/models/components/datapart.d.ts.map +1 -0
- package/models/components/datapart.js +69 -0
- package/models/components/datapart.js.map +1 -0
- package/models/components/errorstreamingevent.d.ts +51 -0
- package/models/components/errorstreamingevent.d.ts.map +1 -0
- package/models/components/errorstreamingevent.js +87 -0
- package/models/components/errorstreamingevent.js.map +1 -0
- package/models/components/executionnamedstreamingevent.d.ts +51 -0
- package/models/components/executionnamedstreamingevent.d.ts.map +1 -0
- package/models/components/executionnamedstreamingevent.js +96 -0
- package/models/components/executionnamedstreamingevent.js.map +1 -0
- package/models/components/executionreviewedstreamingevent.d.ts +45 -0
- package/models/components/executionreviewedstreamingevent.d.ts.map +1 -0
- package/models/components/executionreviewedstreamingevent.js +81 -0
- package/models/components/executionreviewedstreamingevent.js.map +1 -0
- package/models/components/executionreviewrequiredstreamingevent.d.ts +45 -0
- package/models/components/executionreviewrequiredstreamingevent.d.ts.map +1 -0
- package/models/components/executionreviewrequiredstreamingevent.js +82 -0
- package/models/components/executionreviewrequiredstreamingevent.js.map +1 -0
- package/models/components/filepart.d.ts +104 -0
- package/models/components/filepart.d.ts.map +1 -0
- package/models/components/filepart.js +134 -0
- package/models/components/filepart.js.map +1 -0
- package/models/components/index.d.ts +22 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +22 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +21 -21
- package/models/components/invokedeploymentrequest.d.ts.map +1 -1
- package/models/components/invokedeploymentrequest.js +27 -28
- package/models/components/invokedeploymentrequest.js.map +1 -1
- package/models/components/textpart.d.ts +31 -0
- package/models/components/textpart.d.ts.map +1 -0
- package/models/components/textpart.js +67 -0
- package/models/components/textpart.js.map +1 -0
- package/models/components/timeoutstreamingevent.d.ts +49 -0
- package/models/components/timeoutstreamingevent.d.ts.map +1 -0
- package/models/components/timeoutstreamingevent.js +85 -0
- package/models/components/timeoutstreamingevent.js.map +1 -0
- package/models/components/toolcallpart.d.ts +45 -0
- package/models/components/toolcallpart.d.ts.map +1 -0
- package/models/components/toolcallpart.js +84 -0
- package/models/components/toolcallpart.js.map +1 -0
- package/models/components/toolexecutionfailedstreamingevent.d.ts +144 -0
- package/models/components/toolexecutionfailedstreamingevent.d.ts.map +1 -0
- package/models/components/toolexecutionfailedstreamingevent.js +223 -0
- package/models/components/toolexecutionfailedstreamingevent.js.map +1 -0
- package/models/components/toolexecutionfinishedstreamingevent.d.ts +129 -0
- package/models/components/toolexecutionfinishedstreamingevent.d.ts.map +1 -0
- package/models/components/toolexecutionfinishedstreamingevent.js +205 -0
- package/models/components/toolexecutionfinishedstreamingevent.js.map +1 -0
- package/models/components/toolexecutionstartedstreamingevent.d.ts +139 -0
- package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -0
- package/models/components/toolexecutionstartedstreamingevent.js +217 -0
- package/models/components/toolexecutionstartedstreamingevent.js.map +1 -0
- package/models/components/toolresultpart.d.ts +39 -0
- package/models/components/toolresultpart.d.ts.map +1 -0
- package/models/components/toolresultpart.js +80 -0
- package/models/components/toolresultpart.js.map +1 -0
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/invokeeval.d.ts +55 -0
- package/models/errors/invokeeval.d.ts.map +1 -0
- package/models/errors/invokeeval.js +106 -0
- package/models/errors/invokeeval.js.map +1 -0
- package/models/operations/createagentrequest.d.ts +3 -0
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createagentresponserequest.d.ts +58 -167
- package/models/operations/createagentresponserequest.d.ts.map +1 -1
- package/models/operations/createagentresponserequest.js +89 -173
- package/models/operations/createagentresponserequest.js.map +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.d.ts +80 -145
- package/models/operations/createeval.d.ts.map +1 -1
- package/models/operations/createeval.js +190 -266
- package/models/operations/createeval.js.map +1 -1
- package/models/operations/createprompt.d.ts +9 -11
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +9 -11
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +12 -12
- package/models/operations/deploymentgetconfig.d.ts +241 -241
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +346 -351
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +24 -26
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +26 -28
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +24 -26
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +26 -28
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +25 -27
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +30 -34
- package/models/operations/deploymentstream.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getallprompts.d.ts +9 -11
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +9 -11
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.d.ts +14 -79
- package/models/operations/getevals.d.ts.map +1 -1
- package/models/operations/getevals.js +49 -132
- package/models/operations/getevals.js.map +1 -1
- package/models/operations/getoneprompt.d.ts +9 -11
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +9 -11
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +9 -11
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +9 -11
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/invokeagent.d.ts +63 -416
- package/models/operations/invokeagent.d.ts.map +1 -1
- package/models/operations/invokeagent.js +80 -429
- package/models/operations/invokeagent.js.map +1 -1
- package/models/operations/invokeeval.d.ts +719 -0
- package/models/operations/invokeeval.d.ts.map +1 -0
- package/models/operations/invokeeval.js +954 -0
- package/models/operations/invokeeval.js.map +1 -0
- package/models/operations/listagents.d.ts +3 -0
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/listknowledgebases.d.ts +16 -16
- package/models/operations/listknowledgebases.d.ts.map +1 -1
- package/models/operations/listknowledgebases.js +27 -25
- package/models/operations/listknowledgebases.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +9 -11
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +9 -11
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/retrieveagentrequest.d.ts +3 -0
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +12 -12
- package/models/operations/runagent.d.ts +49 -402
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +70 -418
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamagent.d.ts +240 -3281
- package/models/operations/streamagent.d.ts.map +1 -1
- package/models/operations/streamagent.js +160 -3604
- package/models/operations/streamagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +888 -3929
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +165 -3605
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +5 -2
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +2 -4
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.d.ts +14 -79
- package/models/operations/updateeval.d.ts.map +1 -1
- package/models/operations/updateeval.js +51 -134
- package/models/operations/updateeval.js.map +1 -1
- package/models/operations/updatememorystore.d.ts +9 -20
- package/models/operations/updatememorystore.d.ts.map +1 -1
- package/models/operations/updatememorystore.js +9 -14
- package/models/operations/updatememorystore.js.map +1 -1
- package/models/operations/updateprompt.d.ts +18 -22
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +18 -22
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/sdk/agents.d.ts +5 -5
- package/sdk/agents.d.ts.map +1 -1
- package/sdk/agents.js +4 -4
- package/sdk/agents.js.map +1 -1
- package/sdk/evals.d.ts +4 -0
- package/sdk/evals.d.ts.map +1 -1
- package/sdk/evals.js +7 -0
- package/sdk/evals.js.map +1 -1
- package/sdk/responses.d.ts +1 -1
- package/sdk/responses.d.ts.map +1 -1
- package/sdk/responses.js +2 -2
- package/sdk/responses.js.map +1 -1
- package/src/funcs/agentsCreate.ts +4 -8
- package/src/funcs/agentsResponsesCreate.ts +4 -4
- package/src/funcs/agentsRun.ts +4 -7
- package/src/funcs/agentsStream.ts +4 -4
- package/src/funcs/agentsStreamRun.ts +4 -9
- package/src/funcs/agentsUpdate.ts +4 -4
- package/src/funcs/evalsInvoke.ts +177 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/agentsCreate.ts +1 -1
- package/src/mcp-server/tools/agentsResponsesCreate.ts +2 -3
- package/src/mcp-server/tools/agentsRun.ts +1 -1
- package/src/mcp-server/tools/agentsStream.ts +2 -2
- package/src/mcp-server/tools/agentsStreamRun.ts +1 -1
- package/src/mcp-server/tools/agentsUpdate.ts +2 -3
- package/src/mcp-server/tools/evalsInvoke.ts +35 -0
- package/src/models/components/actionreviewedstreamingevent.ts +189 -0
- package/src/models/components/actionreviewrequestedstreamingevent.ts +326 -0
- package/src/models/components/agenterroredstreamingevent.ts +142 -0
- package/src/models/components/agentexecutionstartedstreamingevent.ts +145 -0
- package/src/models/components/agenthandedoffstreamingevent.ts +142 -0
- package/src/models/components/agentinactivestreamingevent.ts +857 -0
- package/src/models/components/agentmessagecreatedstreamingevent.ts +396 -0
- package/src/models/components/agentstartedstreamingevent.ts +909 -0
- package/src/models/components/agentthoughtstreamingevent.ts +1419 -0
- package/src/models/components/datapart.ts +71 -0
- package/src/models/components/errorstreamingevent.ts +129 -0
- package/src/models/components/executionnamedstreamingevent.ts +142 -0
- package/src/models/components/executionreviewedstreamingevent.ts +122 -0
- package/src/models/components/executionreviewrequiredstreamingevent.ts +130 -0
- package/src/models/components/filepart.ts +231 -0
- package/src/models/components/index.ts +22 -0
- package/src/models/components/invokedeploymentrequest.ts +66 -52
- package/src/models/components/textpart.ts +68 -0
- package/src/models/components/timeoutstreamingevent.ts +125 -0
- package/src/models/components/toolcallpart.ts +92 -0
- package/src/models/components/toolexecutionfailedstreamingevent.ts +406 -0
- package/src/models/components/toolexecutionfinishedstreamingevent.ts +373 -0
- package/src/models/components/toolexecutionstartedstreamingevent.ts +350 -0
- package/src/models/components/toolresultpart.ts +86 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/invokeeval.ts +128 -0
- package/src/models/operations/createagentrequest.ts +3 -0
- package/src/models/operations/createagentresponserequest.ts +190 -397
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +318 -615
- package/src/models/operations/createprompt.ts +9 -11
- package/src/models/operations/createtool.ts +12 -12
- package/src/models/operations/deploymentgetconfig.ts +877 -685
- package/src/models/operations/deploymentinvoke.ts +44 -46
- package/src/models/operations/deployments.ts +45 -47
- package/src/models/operations/deploymentstream.ts +64 -49
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getallprompts.ts +9 -11
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +52 -287
- package/src/models/operations/getoneprompt.ts +9 -11
- package/src/models/operations/getpromptversion.ts +9 -11
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/invokeagent.ts +180 -1041
- package/src/models/operations/invokeeval.ts +2062 -0
- package/src/models/operations/listagents.ts +3 -0
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/listknowledgebases.ts +82 -102
- package/src/models/operations/listpromptversions.ts +9 -11
- package/src/models/operations/retrieveagentrequest.ts +3 -0
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +12 -12
- package/src/models/operations/runagent.ts +238 -1140
- package/src/models/operations/streamagent.ts +780 -9308
- package/src/models/operations/streamrunagent.ts +3839 -12309
- package/src/models/operations/updateagent.ts +7 -6
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +52 -287
- package/src/models/operations/updatememorystore.ts +9 -20
- package/src/models/operations/updateprompt.ts +18 -22
- package/src/models/operations/updatetool.ts +14 -14
- package/src/sdk/agents.ts +7 -7
- package/src/sdk/evals.ts +15 -0
- package/src/sdk/responses.ts +2 -2
|
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { ClosedEnum } from "../../types/enums.js";
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as components from "../components/index.js";
|
|
10
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -42,101 +43,13 @@ export type InvokeAgentRole =
|
|
|
42
43
|
| InvokeAgentRoleUserMessage
|
|
43
44
|
| InvokeAgentRoleToolMessage;
|
|
44
45
|
|
|
45
|
-
export const InvokeAgentPublicMessagePartAgentsRequestKind = {
|
|
46
|
-
ToolResult: "tool_result",
|
|
47
|
-
} as const;
|
|
48
|
-
export type InvokeAgentPublicMessagePartAgentsRequestKind = ClosedEnum<
|
|
49
|
-
typeof InvokeAgentPublicMessagePartAgentsRequestKind
|
|
50
|
-
>;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Tool execution result part. Use this ONLY when providing results for a pending tool call from the agent. The tool_call_id must match the ID from the agent's tool call request.
|
|
54
|
-
*/
|
|
55
|
-
export type PublicMessagePartToolResultPart = {
|
|
56
|
-
kind: InvokeAgentPublicMessagePartAgentsRequestKind;
|
|
57
|
-
toolCallId: string;
|
|
58
|
-
result?: any | undefined;
|
|
59
|
-
metadata?: { [k: string]: any } | undefined;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const InvokeAgentPublicMessagePartAgentsKind = {
|
|
63
|
-
File: "file",
|
|
64
|
-
} as const;
|
|
65
|
-
export type InvokeAgentPublicMessagePartAgentsKind = ClosedEnum<
|
|
66
|
-
typeof InvokeAgentPublicMessagePartAgentsKind
|
|
67
|
-
>;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* File in URI format. Check in the model's documentation for the supported mime types for the URI format
|
|
71
|
-
*/
|
|
72
|
-
export type FileFileInURIFormat = {
|
|
73
|
-
/**
|
|
74
|
-
* URL for the File content
|
|
75
|
-
*/
|
|
76
|
-
uri: string;
|
|
77
|
-
/**
|
|
78
|
-
* Optional mimeType for the file
|
|
79
|
-
*/
|
|
80
|
-
mimeType?: string | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* Optional name for the file
|
|
83
|
-
*/
|
|
84
|
-
name?: string | undefined;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
|
|
89
|
-
*/
|
|
90
|
-
export type FileBinaryFormat = {
|
|
91
|
-
/**
|
|
92
|
-
* base64 encoded content of the file
|
|
93
|
-
*/
|
|
94
|
-
bytes: string;
|
|
95
|
-
/**
|
|
96
|
-
* Optional mimeType for the file
|
|
97
|
-
*/
|
|
98
|
-
mimeType?: string | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* Optional name for the file
|
|
101
|
-
*/
|
|
102
|
-
name?: string | undefined;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export type InvokeAgentPublicMessagePartFile =
|
|
106
|
-
| FileBinaryFormat
|
|
107
|
-
| FileFileInURIFormat;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* File attachment part. Use this to send files (images, documents, etc.) to the agent for processing.
|
|
111
|
-
*/
|
|
112
|
-
export type PublicMessagePartFilePart = {
|
|
113
|
-
kind: InvokeAgentPublicMessagePartAgentsKind;
|
|
114
|
-
file: FileBinaryFormat | FileFileInURIFormat;
|
|
115
|
-
metadata?: { [k: string]: any } | undefined;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
export const InvokeAgentPublicMessagePartKind = {
|
|
119
|
-
Text: "text",
|
|
120
|
-
} as const;
|
|
121
|
-
export type InvokeAgentPublicMessagePartKind = ClosedEnum<
|
|
122
|
-
typeof InvokeAgentPublicMessagePartKind
|
|
123
|
-
>;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Text content part. Use this to send text messages to the agent.
|
|
127
|
-
*/
|
|
128
|
-
export type PublicMessagePartTextPart = {
|
|
129
|
-
kind: InvokeAgentPublicMessagePartKind;
|
|
130
|
-
text: string;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
46
|
/**
|
|
134
47
|
* Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
|
|
135
48
|
*/
|
|
136
49
|
export type InvokeAgentPublicMessagePart =
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
50
|
+
| components.TextPart
|
|
51
|
+
| components.FilePart
|
|
52
|
+
| components.ToolResultPart;
|
|
140
53
|
|
|
141
54
|
/**
|
|
142
55
|
* The A2A message to send to the agent (user input or tool results)
|
|
@@ -154,9 +67,7 @@ export type InvokeAgentA2AMessage = {
|
|
|
154
67
|
* A2A message parts (text, file, or tool_result only)
|
|
155
68
|
*/
|
|
156
69
|
parts: Array<
|
|
157
|
-
|
|
|
158
|
-
| PublicMessagePartFilePart
|
|
159
|
-
| PublicMessagePartToolResultPart
|
|
70
|
+
components.TextPart | components.FilePart | components.ToolResultPart
|
|
160
71
|
>;
|
|
161
72
|
};
|
|
162
73
|
|
|
@@ -256,13 +167,13 @@ export type InvokeAgentRequest = {
|
|
|
256
167
|
/**
|
|
257
168
|
* A2A entity type identifier
|
|
258
169
|
*/
|
|
259
|
-
export const
|
|
170
|
+
export const Kind = {
|
|
260
171
|
Task: "task",
|
|
261
172
|
} as const;
|
|
262
173
|
/**
|
|
263
174
|
* A2A entity type identifier
|
|
264
175
|
*/
|
|
265
|
-
export type
|
|
176
|
+
export type Kind = ClosedEnum<typeof Kind>;
|
|
266
177
|
|
|
267
178
|
/**
|
|
268
179
|
* Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
|
|
@@ -282,10 +193,10 @@ export const TaskState = {
|
|
|
282
193
|
*/
|
|
283
194
|
export type TaskState = ClosedEnum<typeof TaskState>;
|
|
284
195
|
|
|
285
|
-
export const
|
|
196
|
+
export const InvokeAgentKind = {
|
|
286
197
|
Message: "message",
|
|
287
198
|
} as const;
|
|
288
|
-
export type
|
|
199
|
+
export type InvokeAgentKind = ClosedEnum<typeof InvokeAgentKind>;
|
|
289
200
|
|
|
290
201
|
/**
|
|
291
202
|
* Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
|
|
@@ -301,147 +212,29 @@ export const ExtendedMessageRole = {
|
|
|
301
212
|
*/
|
|
302
213
|
export type ExtendedMessageRole = ClosedEnum<typeof ExtendedMessageRole>;
|
|
303
214
|
|
|
304
|
-
export
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
|
|
313
|
-
*/
|
|
314
|
-
export type PartsToolResultPart = {
|
|
315
|
-
kind: InvokeAgentPartsAgentsResponse200Kind;
|
|
316
|
-
toolCallId: string;
|
|
317
|
-
result?: any | undefined;
|
|
318
|
-
metadata?: { [k: string]: any } | undefined;
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
export const InvokeAgentPartsAgentsResponseKind = {
|
|
322
|
-
ToolCall: "tool_call",
|
|
323
|
-
} as const;
|
|
324
|
-
export type InvokeAgentPartsAgentsResponseKind = ClosedEnum<
|
|
325
|
-
typeof InvokeAgentPartsAgentsResponseKind
|
|
326
|
-
>;
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
|
|
330
|
-
*/
|
|
331
|
-
export type ToolCallPart = {
|
|
332
|
-
kind: InvokeAgentPartsAgentsResponseKind;
|
|
333
|
-
toolName: string;
|
|
334
|
-
toolCallId: string;
|
|
335
|
-
arguments: { [k: string]: any };
|
|
336
|
-
metadata?: { [k: string]: any } | undefined;
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
export const InvokeAgentPartsAgentsKind = {
|
|
340
|
-
File: "file",
|
|
341
|
-
} as const;
|
|
342
|
-
export type InvokeAgentPartsAgentsKind = ClosedEnum<
|
|
343
|
-
typeof InvokeAgentPartsAgentsKind
|
|
344
|
-
>;
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* File in URI format. Check in the model's documentation for the supported mime types for the URI format
|
|
348
|
-
*/
|
|
349
|
-
export type InvokeAgentFileFileInURIFormat = {
|
|
350
|
-
/**
|
|
351
|
-
* URL for the File content
|
|
352
|
-
*/
|
|
353
|
-
uri: string;
|
|
354
|
-
/**
|
|
355
|
-
* Optional mimeType for the file
|
|
356
|
-
*/
|
|
357
|
-
mimeType?: string | undefined;
|
|
358
|
-
/**
|
|
359
|
-
* Optional name for the file
|
|
360
|
-
*/
|
|
361
|
-
name?: string | undefined;
|
|
362
|
-
};
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
|
|
366
|
-
*/
|
|
367
|
-
export type InvokeAgentFileBinaryFormat = {
|
|
368
|
-
/**
|
|
369
|
-
* base64 encoded content of the file
|
|
370
|
-
*/
|
|
371
|
-
bytes: string;
|
|
372
|
-
/**
|
|
373
|
-
* Optional mimeType for the file
|
|
374
|
-
*/
|
|
375
|
-
mimeType?: string | undefined;
|
|
376
|
-
/**
|
|
377
|
-
* Optional name for the file
|
|
378
|
-
*/
|
|
379
|
-
name?: string | undefined;
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
export type PartsFile =
|
|
383
|
-
| InvokeAgentFileBinaryFormat
|
|
384
|
-
| InvokeAgentFileFileInURIFormat;
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* A file content part that can contain either base64-encoded bytes or a URI reference. Used for images, documents, and other binary content in agent communications.
|
|
388
|
-
*/
|
|
389
|
-
export type PartsFilePart = {
|
|
390
|
-
kind: InvokeAgentPartsAgentsKind;
|
|
391
|
-
file: InvokeAgentFileBinaryFormat | InvokeAgentFileFileInURIFormat;
|
|
392
|
-
metadata?: { [k: string]: any } | undefined;
|
|
393
|
-
};
|
|
394
|
-
|
|
395
|
-
export const InvokeAgentPartsKind = {
|
|
396
|
-
Data: "data",
|
|
397
|
-
} as const;
|
|
398
|
-
export type InvokeAgentPartsKind = ClosedEnum<typeof InvokeAgentPartsKind>;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
|
|
402
|
-
*/
|
|
403
|
-
export type DataPart = {
|
|
404
|
-
kind: InvokeAgentPartsKind;
|
|
405
|
-
data: { [k: string]: any };
|
|
406
|
-
metadata?: { [k: string]: any } | undefined;
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
export const PartsKind = {
|
|
410
|
-
Text: "text",
|
|
411
|
-
} as const;
|
|
412
|
-
export type PartsKind = ClosedEnum<typeof PartsKind>;
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
|
|
416
|
-
*/
|
|
417
|
-
export type PartsTextPart = {
|
|
418
|
-
kind: PartsKind;
|
|
419
|
-
text: string;
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
export type Parts =
|
|
423
|
-
| ToolCallPart
|
|
424
|
-
| PartsTextPart
|
|
425
|
-
| DataPart
|
|
426
|
-
| PartsFilePart
|
|
427
|
-
| PartsToolResultPart;
|
|
215
|
+
export type InvokeAgentParts =
|
|
216
|
+
| (components.ToolCallPart & { kind: "tool_call" })
|
|
217
|
+
| (components.TextPart & { kind: "text" })
|
|
218
|
+
| (components.DataPart & { kind: "data" })
|
|
219
|
+
| (components.FilePart & { kind: "file" })
|
|
220
|
+
| (components.ToolResultPart & { kind: "tool_result" });
|
|
428
221
|
|
|
429
222
|
/**
|
|
430
223
|
* Optional A2A message providing additional context about the current status
|
|
431
224
|
*/
|
|
432
225
|
export type TaskStatusMessage = {
|
|
433
|
-
kind:
|
|
226
|
+
kind: InvokeAgentKind;
|
|
434
227
|
messageId: string;
|
|
435
228
|
/**
|
|
436
229
|
* Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
|
|
437
230
|
*/
|
|
438
231
|
role: ExtendedMessageRole;
|
|
439
232
|
parts: Array<
|
|
440
|
-
| ToolCallPart
|
|
441
|
-
|
|
|
442
|
-
| DataPart
|
|
443
|
-
|
|
|
444
|
-
|
|
|
233
|
+
| (components.ToolCallPart & { kind: "tool_call" })
|
|
234
|
+
| (components.TextPart & { kind: "text" })
|
|
235
|
+
| (components.DataPart & { kind: "data" })
|
|
236
|
+
| (components.FilePart & { kind: "file" })
|
|
237
|
+
| (components.ToolResultPart & { kind: "tool_result" })
|
|
445
238
|
>;
|
|
446
239
|
};
|
|
447
240
|
|
|
@@ -478,7 +271,7 @@ export type InvokeAgentA2ATaskResponse = {
|
|
|
478
271
|
/**
|
|
479
272
|
* A2A entity type identifier
|
|
480
273
|
*/
|
|
481
|
-
kind:
|
|
274
|
+
kind: Kind;
|
|
482
275
|
/**
|
|
483
276
|
* Current task status information
|
|
484
277
|
*/
|
|
@@ -523,336 +316,24 @@ export type InvokeAgentRole$Outbound = string | string;
|
|
|
523
316
|
export const InvokeAgentRole$outboundSchema: z.ZodType<
|
|
524
317
|
InvokeAgentRole$Outbound,
|
|
525
318
|
z.ZodTypeDef,
|
|
526
|
-
InvokeAgentRole
|
|
527
|
-
> = z.union([
|
|
528
|
-
InvokeAgentRoleUserMessage$outboundSchema,
|
|
529
|
-
InvokeAgentRoleToolMessage$outboundSchema,
|
|
530
|
-
]);
|
|
531
|
-
|
|
532
|
-
export function invokeAgentRoleToJSON(
|
|
533
|
-
invokeAgentRole: InvokeAgentRole,
|
|
534
|
-
): string {
|
|
535
|
-
return JSON.stringify(InvokeAgentRole$outboundSchema.parse(invokeAgentRole));
|
|
536
|
-
}
|
|
537
|
-
export function invokeAgentRoleFromJSON(
|
|
538
|
-
jsonString: string,
|
|
539
|
-
): SafeParseResult<InvokeAgentRole, SDKValidationError> {
|
|
540
|
-
return safeParse(
|
|
541
|
-
jsonString,
|
|
542
|
-
(x) => InvokeAgentRole$inboundSchema.parse(JSON.parse(x)),
|
|
543
|
-
`Failed to parse 'InvokeAgentRole' from JSON`,
|
|
544
|
-
);
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
/** @internal */
|
|
548
|
-
export const InvokeAgentPublicMessagePartAgentsRequestKind$inboundSchema:
|
|
549
|
-
z.ZodNativeEnum<typeof InvokeAgentPublicMessagePartAgentsRequestKind> = z
|
|
550
|
-
.nativeEnum(InvokeAgentPublicMessagePartAgentsRequestKind);
|
|
551
|
-
/** @internal */
|
|
552
|
-
export const InvokeAgentPublicMessagePartAgentsRequestKind$outboundSchema:
|
|
553
|
-
z.ZodNativeEnum<typeof InvokeAgentPublicMessagePartAgentsRequestKind> =
|
|
554
|
-
InvokeAgentPublicMessagePartAgentsRequestKind$inboundSchema;
|
|
555
|
-
|
|
556
|
-
/** @internal */
|
|
557
|
-
export const PublicMessagePartToolResultPart$inboundSchema: z.ZodType<
|
|
558
|
-
PublicMessagePartToolResultPart,
|
|
559
|
-
z.ZodTypeDef,
|
|
560
|
-
unknown
|
|
561
|
-
> = z.object({
|
|
562
|
-
kind: InvokeAgentPublicMessagePartAgentsRequestKind$inboundSchema,
|
|
563
|
-
tool_call_id: z.string(),
|
|
564
|
-
result: z.any().optional(),
|
|
565
|
-
metadata: z.record(z.any()).optional(),
|
|
566
|
-
}).transform((v) => {
|
|
567
|
-
return remap$(v, {
|
|
568
|
-
"tool_call_id": "toolCallId",
|
|
569
|
-
});
|
|
570
|
-
});
|
|
571
|
-
/** @internal */
|
|
572
|
-
export type PublicMessagePartToolResultPart$Outbound = {
|
|
573
|
-
kind: string;
|
|
574
|
-
tool_call_id: string;
|
|
575
|
-
result?: any | undefined;
|
|
576
|
-
metadata?: { [k: string]: any } | undefined;
|
|
577
|
-
};
|
|
578
|
-
|
|
579
|
-
/** @internal */
|
|
580
|
-
export const PublicMessagePartToolResultPart$outboundSchema: z.ZodType<
|
|
581
|
-
PublicMessagePartToolResultPart$Outbound,
|
|
582
|
-
z.ZodTypeDef,
|
|
583
|
-
PublicMessagePartToolResultPart
|
|
584
|
-
> = z.object({
|
|
585
|
-
kind: InvokeAgentPublicMessagePartAgentsRequestKind$outboundSchema,
|
|
586
|
-
toolCallId: z.string(),
|
|
587
|
-
result: z.any().optional(),
|
|
588
|
-
metadata: z.record(z.any()).optional(),
|
|
589
|
-
}).transform((v) => {
|
|
590
|
-
return remap$(v, {
|
|
591
|
-
toolCallId: "tool_call_id",
|
|
592
|
-
});
|
|
593
|
-
});
|
|
594
|
-
|
|
595
|
-
export function publicMessagePartToolResultPartToJSON(
|
|
596
|
-
publicMessagePartToolResultPart: PublicMessagePartToolResultPart,
|
|
597
|
-
): string {
|
|
598
|
-
return JSON.stringify(
|
|
599
|
-
PublicMessagePartToolResultPart$outboundSchema.parse(
|
|
600
|
-
publicMessagePartToolResultPart,
|
|
601
|
-
),
|
|
602
|
-
);
|
|
603
|
-
}
|
|
604
|
-
export function publicMessagePartToolResultPartFromJSON(
|
|
605
|
-
jsonString: string,
|
|
606
|
-
): SafeParseResult<PublicMessagePartToolResultPart, SDKValidationError> {
|
|
607
|
-
return safeParse(
|
|
608
|
-
jsonString,
|
|
609
|
-
(x) => PublicMessagePartToolResultPart$inboundSchema.parse(JSON.parse(x)),
|
|
610
|
-
`Failed to parse 'PublicMessagePartToolResultPart' from JSON`,
|
|
611
|
-
);
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
/** @internal */
|
|
615
|
-
export const InvokeAgentPublicMessagePartAgentsKind$inboundSchema:
|
|
616
|
-
z.ZodNativeEnum<typeof InvokeAgentPublicMessagePartAgentsKind> = z.nativeEnum(
|
|
617
|
-
InvokeAgentPublicMessagePartAgentsKind,
|
|
618
|
-
);
|
|
619
|
-
/** @internal */
|
|
620
|
-
export const InvokeAgentPublicMessagePartAgentsKind$outboundSchema:
|
|
621
|
-
z.ZodNativeEnum<typeof InvokeAgentPublicMessagePartAgentsKind> =
|
|
622
|
-
InvokeAgentPublicMessagePartAgentsKind$inboundSchema;
|
|
623
|
-
|
|
624
|
-
/** @internal */
|
|
625
|
-
export const FileFileInURIFormat$inboundSchema: z.ZodType<
|
|
626
|
-
FileFileInURIFormat,
|
|
627
|
-
z.ZodTypeDef,
|
|
628
|
-
unknown
|
|
629
|
-
> = z.object({
|
|
630
|
-
uri: z.string(),
|
|
631
|
-
mimeType: z.string().optional(),
|
|
632
|
-
name: z.string().optional(),
|
|
633
|
-
});
|
|
634
|
-
/** @internal */
|
|
635
|
-
export type FileFileInURIFormat$Outbound = {
|
|
636
|
-
uri: string;
|
|
637
|
-
mimeType?: string | undefined;
|
|
638
|
-
name?: string | undefined;
|
|
639
|
-
};
|
|
640
|
-
|
|
641
|
-
/** @internal */
|
|
642
|
-
export const FileFileInURIFormat$outboundSchema: z.ZodType<
|
|
643
|
-
FileFileInURIFormat$Outbound,
|
|
644
|
-
z.ZodTypeDef,
|
|
645
|
-
FileFileInURIFormat
|
|
646
|
-
> = z.object({
|
|
647
|
-
uri: z.string(),
|
|
648
|
-
mimeType: z.string().optional(),
|
|
649
|
-
name: z.string().optional(),
|
|
650
|
-
});
|
|
651
|
-
|
|
652
|
-
export function fileFileInURIFormatToJSON(
|
|
653
|
-
fileFileInURIFormat: FileFileInURIFormat,
|
|
654
|
-
): string {
|
|
655
|
-
return JSON.stringify(
|
|
656
|
-
FileFileInURIFormat$outboundSchema.parse(fileFileInURIFormat),
|
|
657
|
-
);
|
|
658
|
-
}
|
|
659
|
-
export function fileFileInURIFormatFromJSON(
|
|
660
|
-
jsonString: string,
|
|
661
|
-
): SafeParseResult<FileFileInURIFormat, SDKValidationError> {
|
|
662
|
-
return safeParse(
|
|
663
|
-
jsonString,
|
|
664
|
-
(x) => FileFileInURIFormat$inboundSchema.parse(JSON.parse(x)),
|
|
665
|
-
`Failed to parse 'FileFileInURIFormat' from JSON`,
|
|
666
|
-
);
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
/** @internal */
|
|
670
|
-
export const FileBinaryFormat$inboundSchema: z.ZodType<
|
|
671
|
-
FileBinaryFormat,
|
|
672
|
-
z.ZodTypeDef,
|
|
673
|
-
unknown
|
|
674
|
-
> = z.object({
|
|
675
|
-
bytes: z.string(),
|
|
676
|
-
mimeType: z.string().optional(),
|
|
677
|
-
name: z.string().optional(),
|
|
678
|
-
});
|
|
679
|
-
/** @internal */
|
|
680
|
-
export type FileBinaryFormat$Outbound = {
|
|
681
|
-
bytes: string;
|
|
682
|
-
mimeType?: string | undefined;
|
|
683
|
-
name?: string | undefined;
|
|
684
|
-
};
|
|
685
|
-
|
|
686
|
-
/** @internal */
|
|
687
|
-
export const FileBinaryFormat$outboundSchema: z.ZodType<
|
|
688
|
-
FileBinaryFormat$Outbound,
|
|
689
|
-
z.ZodTypeDef,
|
|
690
|
-
FileBinaryFormat
|
|
691
|
-
> = z.object({
|
|
692
|
-
bytes: z.string(),
|
|
693
|
-
mimeType: z.string().optional(),
|
|
694
|
-
name: z.string().optional(),
|
|
695
|
-
});
|
|
696
|
-
|
|
697
|
-
export function fileBinaryFormatToJSON(
|
|
698
|
-
fileBinaryFormat: FileBinaryFormat,
|
|
699
|
-
): string {
|
|
700
|
-
return JSON.stringify(
|
|
701
|
-
FileBinaryFormat$outboundSchema.parse(fileBinaryFormat),
|
|
702
|
-
);
|
|
703
|
-
}
|
|
704
|
-
export function fileBinaryFormatFromJSON(
|
|
705
|
-
jsonString: string,
|
|
706
|
-
): SafeParseResult<FileBinaryFormat, SDKValidationError> {
|
|
707
|
-
return safeParse(
|
|
708
|
-
jsonString,
|
|
709
|
-
(x) => FileBinaryFormat$inboundSchema.parse(JSON.parse(x)),
|
|
710
|
-
`Failed to parse 'FileBinaryFormat' from JSON`,
|
|
711
|
-
);
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
/** @internal */
|
|
715
|
-
export const InvokeAgentPublicMessagePartFile$inboundSchema: z.ZodType<
|
|
716
|
-
InvokeAgentPublicMessagePartFile,
|
|
717
|
-
z.ZodTypeDef,
|
|
718
|
-
unknown
|
|
719
|
-
> = z.union([
|
|
720
|
-
z.lazy(() => FileBinaryFormat$inboundSchema),
|
|
721
|
-
z.lazy(() => FileFileInURIFormat$inboundSchema),
|
|
722
|
-
]);
|
|
723
|
-
/** @internal */
|
|
724
|
-
export type InvokeAgentPublicMessagePartFile$Outbound =
|
|
725
|
-
| FileBinaryFormat$Outbound
|
|
726
|
-
| FileFileInURIFormat$Outbound;
|
|
727
|
-
|
|
728
|
-
/** @internal */
|
|
729
|
-
export const InvokeAgentPublicMessagePartFile$outboundSchema: z.ZodType<
|
|
730
|
-
InvokeAgentPublicMessagePartFile$Outbound,
|
|
731
|
-
z.ZodTypeDef,
|
|
732
|
-
InvokeAgentPublicMessagePartFile
|
|
733
|
-
> = z.union([
|
|
734
|
-
z.lazy(() => FileBinaryFormat$outboundSchema),
|
|
735
|
-
z.lazy(() => FileFileInURIFormat$outboundSchema),
|
|
736
|
-
]);
|
|
737
|
-
|
|
738
|
-
export function invokeAgentPublicMessagePartFileToJSON(
|
|
739
|
-
invokeAgentPublicMessagePartFile: InvokeAgentPublicMessagePartFile,
|
|
740
|
-
): string {
|
|
741
|
-
return JSON.stringify(
|
|
742
|
-
InvokeAgentPublicMessagePartFile$outboundSchema.parse(
|
|
743
|
-
invokeAgentPublicMessagePartFile,
|
|
744
|
-
),
|
|
745
|
-
);
|
|
746
|
-
}
|
|
747
|
-
export function invokeAgentPublicMessagePartFileFromJSON(
|
|
748
|
-
jsonString: string,
|
|
749
|
-
): SafeParseResult<InvokeAgentPublicMessagePartFile, SDKValidationError> {
|
|
750
|
-
return safeParse(
|
|
751
|
-
jsonString,
|
|
752
|
-
(x) => InvokeAgentPublicMessagePartFile$inboundSchema.parse(JSON.parse(x)),
|
|
753
|
-
`Failed to parse 'InvokeAgentPublicMessagePartFile' from JSON`,
|
|
754
|
-
);
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
/** @internal */
|
|
758
|
-
export const PublicMessagePartFilePart$inboundSchema: z.ZodType<
|
|
759
|
-
PublicMessagePartFilePart,
|
|
760
|
-
z.ZodTypeDef,
|
|
761
|
-
unknown
|
|
762
|
-
> = z.object({
|
|
763
|
-
kind: InvokeAgentPublicMessagePartAgentsKind$inboundSchema,
|
|
764
|
-
file: z.union([
|
|
765
|
-
z.lazy(() => FileBinaryFormat$inboundSchema),
|
|
766
|
-
z.lazy(() => FileFileInURIFormat$inboundSchema),
|
|
767
|
-
]),
|
|
768
|
-
metadata: z.record(z.any()).optional(),
|
|
769
|
-
});
|
|
770
|
-
/** @internal */
|
|
771
|
-
export type PublicMessagePartFilePart$Outbound = {
|
|
772
|
-
kind: string;
|
|
773
|
-
file: FileBinaryFormat$Outbound | FileFileInURIFormat$Outbound;
|
|
774
|
-
metadata?: { [k: string]: any } | undefined;
|
|
775
|
-
};
|
|
776
|
-
|
|
777
|
-
/** @internal */
|
|
778
|
-
export const PublicMessagePartFilePart$outboundSchema: z.ZodType<
|
|
779
|
-
PublicMessagePartFilePart$Outbound,
|
|
780
|
-
z.ZodTypeDef,
|
|
781
|
-
PublicMessagePartFilePart
|
|
782
|
-
> = z.object({
|
|
783
|
-
kind: InvokeAgentPublicMessagePartAgentsKind$outboundSchema,
|
|
784
|
-
file: z.union([
|
|
785
|
-
z.lazy(() => FileBinaryFormat$outboundSchema),
|
|
786
|
-
z.lazy(() => FileFileInURIFormat$outboundSchema),
|
|
787
|
-
]),
|
|
788
|
-
metadata: z.record(z.any()).optional(),
|
|
789
|
-
});
|
|
790
|
-
|
|
791
|
-
export function publicMessagePartFilePartToJSON(
|
|
792
|
-
publicMessagePartFilePart: PublicMessagePartFilePart,
|
|
793
|
-
): string {
|
|
794
|
-
return JSON.stringify(
|
|
795
|
-
PublicMessagePartFilePart$outboundSchema.parse(publicMessagePartFilePart),
|
|
796
|
-
);
|
|
797
|
-
}
|
|
798
|
-
export function publicMessagePartFilePartFromJSON(
|
|
799
|
-
jsonString: string,
|
|
800
|
-
): SafeParseResult<PublicMessagePartFilePart, SDKValidationError> {
|
|
801
|
-
return safeParse(
|
|
802
|
-
jsonString,
|
|
803
|
-
(x) => PublicMessagePartFilePart$inboundSchema.parse(JSON.parse(x)),
|
|
804
|
-
`Failed to parse 'PublicMessagePartFilePart' from JSON`,
|
|
805
|
-
);
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
/** @internal */
|
|
809
|
-
export const InvokeAgentPublicMessagePartKind$inboundSchema: z.ZodNativeEnum<
|
|
810
|
-
typeof InvokeAgentPublicMessagePartKind
|
|
811
|
-
> = z.nativeEnum(InvokeAgentPublicMessagePartKind);
|
|
812
|
-
/** @internal */
|
|
813
|
-
export const InvokeAgentPublicMessagePartKind$outboundSchema: z.ZodNativeEnum<
|
|
814
|
-
typeof InvokeAgentPublicMessagePartKind
|
|
815
|
-
> = InvokeAgentPublicMessagePartKind$inboundSchema;
|
|
816
|
-
|
|
817
|
-
/** @internal */
|
|
818
|
-
export const PublicMessagePartTextPart$inboundSchema: z.ZodType<
|
|
819
|
-
PublicMessagePartTextPart,
|
|
820
|
-
z.ZodTypeDef,
|
|
821
|
-
unknown
|
|
822
|
-
> = z.object({
|
|
823
|
-
kind: InvokeAgentPublicMessagePartKind$inboundSchema,
|
|
824
|
-
text: z.string(),
|
|
825
|
-
});
|
|
826
|
-
/** @internal */
|
|
827
|
-
export type PublicMessagePartTextPart$Outbound = {
|
|
828
|
-
kind: string;
|
|
829
|
-
text: string;
|
|
830
|
-
};
|
|
831
|
-
|
|
832
|
-
/** @internal */
|
|
833
|
-
export const PublicMessagePartTextPart$outboundSchema: z.ZodType<
|
|
834
|
-
PublicMessagePartTextPart$Outbound,
|
|
835
|
-
z.ZodTypeDef,
|
|
836
|
-
PublicMessagePartTextPart
|
|
837
|
-
> = z.object({
|
|
838
|
-
kind: InvokeAgentPublicMessagePartKind$outboundSchema,
|
|
839
|
-
text: z.string(),
|
|
840
|
-
});
|
|
319
|
+
InvokeAgentRole
|
|
320
|
+
> = z.union([
|
|
321
|
+
InvokeAgentRoleUserMessage$outboundSchema,
|
|
322
|
+
InvokeAgentRoleToolMessage$outboundSchema,
|
|
323
|
+
]);
|
|
841
324
|
|
|
842
|
-
export function
|
|
843
|
-
|
|
325
|
+
export function invokeAgentRoleToJSON(
|
|
326
|
+
invokeAgentRole: InvokeAgentRole,
|
|
844
327
|
): string {
|
|
845
|
-
return JSON.stringify(
|
|
846
|
-
PublicMessagePartTextPart$outboundSchema.parse(publicMessagePartTextPart),
|
|
847
|
-
);
|
|
328
|
+
return JSON.stringify(InvokeAgentRole$outboundSchema.parse(invokeAgentRole));
|
|
848
329
|
}
|
|
849
|
-
export function
|
|
330
|
+
export function invokeAgentRoleFromJSON(
|
|
850
331
|
jsonString: string,
|
|
851
|
-
): SafeParseResult<
|
|
332
|
+
): SafeParseResult<InvokeAgentRole, SDKValidationError> {
|
|
852
333
|
return safeParse(
|
|
853
334
|
jsonString,
|
|
854
|
-
(x) =>
|
|
855
|
-
`Failed to parse '
|
|
335
|
+
(x) => InvokeAgentRole$inboundSchema.parse(JSON.parse(x)),
|
|
336
|
+
`Failed to parse 'InvokeAgentRole' from JSON`,
|
|
856
337
|
);
|
|
857
338
|
}
|
|
858
339
|
|
|
@@ -862,15 +343,15 @@ export const InvokeAgentPublicMessagePart$inboundSchema: z.ZodType<
|
|
|
862
343
|
z.ZodTypeDef,
|
|
863
344
|
unknown
|
|
864
345
|
> = z.union([
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
346
|
+
components.TextPart$inboundSchema,
|
|
347
|
+
components.FilePart$inboundSchema,
|
|
348
|
+
components.ToolResultPart$inboundSchema,
|
|
868
349
|
]);
|
|
869
350
|
/** @internal */
|
|
870
351
|
export type InvokeAgentPublicMessagePart$Outbound =
|
|
871
|
-
|
|
|
872
|
-
|
|
|
873
|
-
|
|
|
352
|
+
| components.TextPart$Outbound
|
|
353
|
+
| components.FilePart$Outbound
|
|
354
|
+
| components.ToolResultPart$Outbound;
|
|
874
355
|
|
|
875
356
|
/** @internal */
|
|
876
357
|
export const InvokeAgentPublicMessagePart$outboundSchema: z.ZodType<
|
|
@@ -878,9 +359,9 @@ export const InvokeAgentPublicMessagePart$outboundSchema: z.ZodType<
|
|
|
878
359
|
z.ZodTypeDef,
|
|
879
360
|
InvokeAgentPublicMessagePart
|
|
880
361
|
> = z.union([
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
362
|
+
components.TextPart$outboundSchema,
|
|
363
|
+
components.FilePart$outboundSchema,
|
|
364
|
+
components.ToolResultPart$outboundSchema,
|
|
884
365
|
]);
|
|
885
366
|
|
|
886
367
|
export function invokeAgentPublicMessagePartToJSON(
|
|
@@ -915,9 +396,9 @@ export const InvokeAgentA2AMessage$inboundSchema: z.ZodType<
|
|
|
915
396
|
]),
|
|
916
397
|
parts: z.array(
|
|
917
398
|
z.union([
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
399
|
+
components.TextPart$inboundSchema,
|
|
400
|
+
components.FilePart$inboundSchema,
|
|
401
|
+
components.ToolResultPart$inboundSchema,
|
|
921
402
|
]),
|
|
922
403
|
),
|
|
923
404
|
});
|
|
@@ -926,9 +407,9 @@ export type InvokeAgentA2AMessage$Outbound = {
|
|
|
926
407
|
messageId?: string | undefined;
|
|
927
408
|
role: string | string;
|
|
928
409
|
parts: Array<
|
|
929
|
-
|
|
|
930
|
-
|
|
|
931
|
-
|
|
|
410
|
+
| components.TextPart$Outbound
|
|
411
|
+
| components.FilePart$Outbound
|
|
412
|
+
| components.ToolResultPart$Outbound
|
|
932
413
|
>;
|
|
933
414
|
};
|
|
934
415
|
|
|
@@ -945,9 +426,9 @@ export const InvokeAgentA2AMessage$outboundSchema: z.ZodType<
|
|
|
945
426
|
]),
|
|
946
427
|
parts: z.array(
|
|
947
428
|
z.union([
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
429
|
+
components.TextPart$outboundSchema,
|
|
430
|
+
components.FilePart$outboundSchema,
|
|
431
|
+
components.ToolResultPart$outboundSchema,
|
|
951
432
|
]),
|
|
952
433
|
),
|
|
953
434
|
});
|
|
@@ -1238,13 +719,12 @@ export function invokeAgentRequestFromJSON(
|
|
|
1238
719
|
}
|
|
1239
720
|
|
|
1240
721
|
/** @internal */
|
|
1241
|
-
export const
|
|
1242
|
-
|
|
1243
|
-
|
|
722
|
+
export const Kind$inboundSchema: z.ZodNativeEnum<typeof Kind> = z.nativeEnum(
|
|
723
|
+
Kind,
|
|
724
|
+
);
|
|
1244
725
|
/** @internal */
|
|
1245
|
-
export const
|
|
1246
|
-
|
|
1247
|
-
> = InvokeAgentKind$inboundSchema;
|
|
726
|
+
export const Kind$outboundSchema: z.ZodNativeEnum<typeof Kind> =
|
|
727
|
+
Kind$inboundSchema;
|
|
1248
728
|
|
|
1249
729
|
/** @internal */
|
|
1250
730
|
export const TaskState$inboundSchema: z.ZodNativeEnum<typeof TaskState> = z
|
|
@@ -1254,13 +734,13 @@ export const TaskState$outboundSchema: z.ZodNativeEnum<typeof TaskState> =
|
|
|
1254
734
|
TaskState$inboundSchema;
|
|
1255
735
|
|
|
1256
736
|
/** @internal */
|
|
1257
|
-
export const
|
|
1258
|
-
typeof
|
|
1259
|
-
> = z.nativeEnum(
|
|
737
|
+
export const InvokeAgentKind$inboundSchema: z.ZodNativeEnum<
|
|
738
|
+
typeof InvokeAgentKind
|
|
739
|
+
> = z.nativeEnum(InvokeAgentKind);
|
|
1260
740
|
/** @internal */
|
|
1261
|
-
export const
|
|
1262
|
-
typeof
|
|
1263
|
-
> =
|
|
741
|
+
export const InvokeAgentKind$outboundSchema: z.ZodNativeEnum<
|
|
742
|
+
typeof InvokeAgentKind
|
|
743
|
+
> = InvokeAgentKind$inboundSchema;
|
|
1264
744
|
|
|
1265
745
|
/** @internal */
|
|
1266
746
|
export const ExtendedMessageRole$inboundSchema: z.ZodNativeEnum<
|
|
@@ -1272,461 +752,80 @@ export const ExtendedMessageRole$outboundSchema: z.ZodNativeEnum<
|
|
|
1272
752
|
> = ExtendedMessageRole$inboundSchema;
|
|
1273
753
|
|
|
1274
754
|
/** @internal */
|
|
1275
|
-
export const
|
|
1276
|
-
|
|
1277
|
-
InvokeAgentPartsAgentsResponse200Kind,
|
|
1278
|
-
);
|
|
1279
|
-
/** @internal */
|
|
1280
|
-
export const InvokeAgentPartsAgentsResponse200Kind$outboundSchema:
|
|
1281
|
-
z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200Kind> =
|
|
1282
|
-
InvokeAgentPartsAgentsResponse200Kind$inboundSchema;
|
|
1283
|
-
|
|
1284
|
-
/** @internal */
|
|
1285
|
-
export const PartsToolResultPart$inboundSchema: z.ZodType<
|
|
1286
|
-
PartsToolResultPart,
|
|
1287
|
-
z.ZodTypeDef,
|
|
1288
|
-
unknown
|
|
1289
|
-
> = z.object({
|
|
1290
|
-
kind: InvokeAgentPartsAgentsResponse200Kind$inboundSchema,
|
|
1291
|
-
tool_call_id: z.string(),
|
|
1292
|
-
result: z.any().optional(),
|
|
1293
|
-
metadata: z.record(z.any()).optional(),
|
|
1294
|
-
}).transform((v) => {
|
|
1295
|
-
return remap$(v, {
|
|
1296
|
-
"tool_call_id": "toolCallId",
|
|
1297
|
-
});
|
|
1298
|
-
});
|
|
1299
|
-
/** @internal */
|
|
1300
|
-
export type PartsToolResultPart$Outbound = {
|
|
1301
|
-
kind: string;
|
|
1302
|
-
tool_call_id: string;
|
|
1303
|
-
result?: any | undefined;
|
|
1304
|
-
metadata?: { [k: string]: any } | undefined;
|
|
1305
|
-
};
|
|
1306
|
-
|
|
1307
|
-
/** @internal */
|
|
1308
|
-
export const PartsToolResultPart$outboundSchema: z.ZodType<
|
|
1309
|
-
PartsToolResultPart$Outbound,
|
|
1310
|
-
z.ZodTypeDef,
|
|
1311
|
-
PartsToolResultPart
|
|
1312
|
-
> = z.object({
|
|
1313
|
-
kind: InvokeAgentPartsAgentsResponse200Kind$outboundSchema,
|
|
1314
|
-
toolCallId: z.string(),
|
|
1315
|
-
result: z.any().optional(),
|
|
1316
|
-
metadata: z.record(z.any()).optional(),
|
|
1317
|
-
}).transform((v) => {
|
|
1318
|
-
return remap$(v, {
|
|
1319
|
-
toolCallId: "tool_call_id",
|
|
1320
|
-
});
|
|
1321
|
-
});
|
|
1322
|
-
|
|
1323
|
-
export function partsToolResultPartToJSON(
|
|
1324
|
-
partsToolResultPart: PartsToolResultPart,
|
|
1325
|
-
): string {
|
|
1326
|
-
return JSON.stringify(
|
|
1327
|
-
PartsToolResultPart$outboundSchema.parse(partsToolResultPart),
|
|
1328
|
-
);
|
|
1329
|
-
}
|
|
1330
|
-
export function partsToolResultPartFromJSON(
|
|
1331
|
-
jsonString: string,
|
|
1332
|
-
): SafeParseResult<PartsToolResultPart, SDKValidationError> {
|
|
1333
|
-
return safeParse(
|
|
1334
|
-
jsonString,
|
|
1335
|
-
(x) => PartsToolResultPart$inboundSchema.parse(JSON.parse(x)),
|
|
1336
|
-
`Failed to parse 'PartsToolResultPart' from JSON`,
|
|
1337
|
-
);
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
/** @internal */
|
|
1341
|
-
export const InvokeAgentPartsAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
|
|
1342
|
-
typeof InvokeAgentPartsAgentsResponseKind
|
|
1343
|
-
> = z.nativeEnum(InvokeAgentPartsAgentsResponseKind);
|
|
1344
|
-
/** @internal */
|
|
1345
|
-
export const InvokeAgentPartsAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
|
|
1346
|
-
typeof InvokeAgentPartsAgentsResponseKind
|
|
1347
|
-
> = InvokeAgentPartsAgentsResponseKind$inboundSchema;
|
|
1348
|
-
|
|
1349
|
-
/** @internal */
|
|
1350
|
-
export const ToolCallPart$inboundSchema: z.ZodType<
|
|
1351
|
-
ToolCallPart,
|
|
1352
|
-
z.ZodTypeDef,
|
|
1353
|
-
unknown
|
|
1354
|
-
> = z.object({
|
|
1355
|
-
kind: InvokeAgentPartsAgentsResponseKind$inboundSchema,
|
|
1356
|
-
tool_name: z.string(),
|
|
1357
|
-
tool_call_id: z.string(),
|
|
1358
|
-
arguments: z.record(z.any()),
|
|
1359
|
-
metadata: z.record(z.any()).optional(),
|
|
1360
|
-
}).transform((v) => {
|
|
1361
|
-
return remap$(v, {
|
|
1362
|
-
"tool_name": "toolName",
|
|
1363
|
-
"tool_call_id": "toolCallId",
|
|
1364
|
-
});
|
|
1365
|
-
});
|
|
1366
|
-
/** @internal */
|
|
1367
|
-
export type ToolCallPart$Outbound = {
|
|
1368
|
-
kind: string;
|
|
1369
|
-
tool_name: string;
|
|
1370
|
-
tool_call_id: string;
|
|
1371
|
-
arguments: { [k: string]: any };
|
|
1372
|
-
metadata?: { [k: string]: any } | undefined;
|
|
1373
|
-
};
|
|
1374
|
-
|
|
1375
|
-
/** @internal */
|
|
1376
|
-
export const ToolCallPart$outboundSchema: z.ZodType<
|
|
1377
|
-
ToolCallPart$Outbound,
|
|
1378
|
-
z.ZodTypeDef,
|
|
1379
|
-
ToolCallPart
|
|
1380
|
-
> = z.object({
|
|
1381
|
-
kind: InvokeAgentPartsAgentsResponseKind$outboundSchema,
|
|
1382
|
-
toolName: z.string(),
|
|
1383
|
-
toolCallId: z.string(),
|
|
1384
|
-
arguments: z.record(z.any()),
|
|
1385
|
-
metadata: z.record(z.any()).optional(),
|
|
1386
|
-
}).transform((v) => {
|
|
1387
|
-
return remap$(v, {
|
|
1388
|
-
toolName: "tool_name",
|
|
1389
|
-
toolCallId: "tool_call_id",
|
|
1390
|
-
});
|
|
1391
|
-
});
|
|
1392
|
-
|
|
1393
|
-
export function toolCallPartToJSON(toolCallPart: ToolCallPart): string {
|
|
1394
|
-
return JSON.stringify(ToolCallPart$outboundSchema.parse(toolCallPart));
|
|
1395
|
-
}
|
|
1396
|
-
export function toolCallPartFromJSON(
|
|
1397
|
-
jsonString: string,
|
|
1398
|
-
): SafeParseResult<ToolCallPart, SDKValidationError> {
|
|
1399
|
-
return safeParse(
|
|
1400
|
-
jsonString,
|
|
1401
|
-
(x) => ToolCallPart$inboundSchema.parse(JSON.parse(x)),
|
|
1402
|
-
`Failed to parse 'ToolCallPart' from JSON`,
|
|
1403
|
-
);
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
/** @internal */
|
|
1407
|
-
export const InvokeAgentPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
|
|
1408
|
-
typeof InvokeAgentPartsAgentsKind
|
|
1409
|
-
> = z.nativeEnum(InvokeAgentPartsAgentsKind);
|
|
1410
|
-
/** @internal */
|
|
1411
|
-
export const InvokeAgentPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
|
|
1412
|
-
typeof InvokeAgentPartsAgentsKind
|
|
1413
|
-
> = InvokeAgentPartsAgentsKind$inboundSchema;
|
|
1414
|
-
|
|
1415
|
-
/** @internal */
|
|
1416
|
-
export const InvokeAgentFileFileInURIFormat$inboundSchema: z.ZodType<
|
|
1417
|
-
InvokeAgentFileFileInURIFormat,
|
|
1418
|
-
z.ZodTypeDef,
|
|
1419
|
-
unknown
|
|
1420
|
-
> = z.object({
|
|
1421
|
-
uri: z.string(),
|
|
1422
|
-
mimeType: z.string().optional(),
|
|
1423
|
-
name: z.string().optional(),
|
|
1424
|
-
});
|
|
1425
|
-
/** @internal */
|
|
1426
|
-
export type InvokeAgentFileFileInURIFormat$Outbound = {
|
|
1427
|
-
uri: string;
|
|
1428
|
-
mimeType?: string | undefined;
|
|
1429
|
-
name?: string | undefined;
|
|
1430
|
-
};
|
|
1431
|
-
|
|
1432
|
-
/** @internal */
|
|
1433
|
-
export const InvokeAgentFileFileInURIFormat$outboundSchema: z.ZodType<
|
|
1434
|
-
InvokeAgentFileFileInURIFormat$Outbound,
|
|
1435
|
-
z.ZodTypeDef,
|
|
1436
|
-
InvokeAgentFileFileInURIFormat
|
|
1437
|
-
> = z.object({
|
|
1438
|
-
uri: z.string(),
|
|
1439
|
-
mimeType: z.string().optional(),
|
|
1440
|
-
name: z.string().optional(),
|
|
1441
|
-
});
|
|
1442
|
-
|
|
1443
|
-
export function invokeAgentFileFileInURIFormatToJSON(
|
|
1444
|
-
invokeAgentFileFileInURIFormat: InvokeAgentFileFileInURIFormat,
|
|
1445
|
-
): string {
|
|
1446
|
-
return JSON.stringify(
|
|
1447
|
-
InvokeAgentFileFileInURIFormat$outboundSchema.parse(
|
|
1448
|
-
invokeAgentFileFileInURIFormat,
|
|
1449
|
-
),
|
|
1450
|
-
);
|
|
1451
|
-
}
|
|
1452
|
-
export function invokeAgentFileFileInURIFormatFromJSON(
|
|
1453
|
-
jsonString: string,
|
|
1454
|
-
): SafeParseResult<InvokeAgentFileFileInURIFormat, SDKValidationError> {
|
|
1455
|
-
return safeParse(
|
|
1456
|
-
jsonString,
|
|
1457
|
-
(x) => InvokeAgentFileFileInURIFormat$inboundSchema.parse(JSON.parse(x)),
|
|
1458
|
-
`Failed to parse 'InvokeAgentFileFileInURIFormat' from JSON`,
|
|
1459
|
-
);
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
/** @internal */
|
|
1463
|
-
export const InvokeAgentFileBinaryFormat$inboundSchema: z.ZodType<
|
|
1464
|
-
InvokeAgentFileBinaryFormat,
|
|
1465
|
-
z.ZodTypeDef,
|
|
1466
|
-
unknown
|
|
1467
|
-
> = z.object({
|
|
1468
|
-
bytes: z.string(),
|
|
1469
|
-
mimeType: z.string().optional(),
|
|
1470
|
-
name: z.string().optional(),
|
|
1471
|
-
});
|
|
1472
|
-
/** @internal */
|
|
1473
|
-
export type InvokeAgentFileBinaryFormat$Outbound = {
|
|
1474
|
-
bytes: string;
|
|
1475
|
-
mimeType?: string | undefined;
|
|
1476
|
-
name?: string | undefined;
|
|
1477
|
-
};
|
|
1478
|
-
|
|
1479
|
-
/** @internal */
|
|
1480
|
-
export const InvokeAgentFileBinaryFormat$outboundSchema: z.ZodType<
|
|
1481
|
-
InvokeAgentFileBinaryFormat$Outbound,
|
|
1482
|
-
z.ZodTypeDef,
|
|
1483
|
-
InvokeAgentFileBinaryFormat
|
|
1484
|
-
> = z.object({
|
|
1485
|
-
bytes: z.string(),
|
|
1486
|
-
mimeType: z.string().optional(),
|
|
1487
|
-
name: z.string().optional(),
|
|
1488
|
-
});
|
|
1489
|
-
|
|
1490
|
-
export function invokeAgentFileBinaryFormatToJSON(
|
|
1491
|
-
invokeAgentFileBinaryFormat: InvokeAgentFileBinaryFormat,
|
|
1492
|
-
): string {
|
|
1493
|
-
return JSON.stringify(
|
|
1494
|
-
InvokeAgentFileBinaryFormat$outboundSchema.parse(
|
|
1495
|
-
invokeAgentFileBinaryFormat,
|
|
1496
|
-
),
|
|
1497
|
-
);
|
|
1498
|
-
}
|
|
1499
|
-
export function invokeAgentFileBinaryFormatFromJSON(
|
|
1500
|
-
jsonString: string,
|
|
1501
|
-
): SafeParseResult<InvokeAgentFileBinaryFormat, SDKValidationError> {
|
|
1502
|
-
return safeParse(
|
|
1503
|
-
jsonString,
|
|
1504
|
-
(x) => InvokeAgentFileBinaryFormat$inboundSchema.parse(JSON.parse(x)),
|
|
1505
|
-
`Failed to parse 'InvokeAgentFileBinaryFormat' from JSON`,
|
|
1506
|
-
);
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
/** @internal */
|
|
1510
|
-
export const PartsFile$inboundSchema: z.ZodType<
|
|
1511
|
-
PartsFile,
|
|
755
|
+
export const InvokeAgentParts$inboundSchema: z.ZodType<
|
|
756
|
+
InvokeAgentParts,
|
|
1512
757
|
z.ZodTypeDef,
|
|
1513
758
|
unknown
|
|
1514
759
|
> = z.union([
|
|
1515
|
-
|
|
1516
|
-
|
|
760
|
+
components.ToolCallPart$inboundSchema.and(
|
|
761
|
+
z.object({ kind: z.literal("tool_call") }).transform((v) => ({
|
|
762
|
+
kind: v.kind,
|
|
763
|
+
})),
|
|
764
|
+
),
|
|
765
|
+
components.TextPart$inboundSchema.and(
|
|
766
|
+
z.object({ kind: z.literal("text") }).transform((v) => ({ kind: v.kind })),
|
|
767
|
+
),
|
|
768
|
+
components.DataPart$inboundSchema.and(
|
|
769
|
+
z.object({ kind: z.literal("data") }).transform((v) => ({ kind: v.kind })),
|
|
770
|
+
),
|
|
771
|
+
components.FilePart$inboundSchema.and(
|
|
772
|
+
z.object({ kind: z.literal("file") }).transform((v) => ({ kind: v.kind })),
|
|
773
|
+
),
|
|
774
|
+
components.ToolResultPart$inboundSchema.and(
|
|
775
|
+
z.object({ kind: z.literal("tool_result") }).transform((v) => ({
|
|
776
|
+
kind: v.kind,
|
|
777
|
+
})),
|
|
778
|
+
),
|
|
1517
779
|
]);
|
|
1518
780
|
/** @internal */
|
|
1519
|
-
export type
|
|
1520
|
-
|
|
|
1521
|
-
|
|
|
781
|
+
export type InvokeAgentParts$Outbound =
|
|
782
|
+
| (components.ToolCallPart$Outbound & { kind: "tool_call" })
|
|
783
|
+
| (components.TextPart$Outbound & { kind: "text" })
|
|
784
|
+
| (components.DataPart$Outbound & { kind: "data" })
|
|
785
|
+
| (components.FilePart$Outbound & { kind: "file" })
|
|
786
|
+
| (components.ToolResultPart$Outbound & { kind: "tool_result" });
|
|
1522
787
|
|
|
1523
788
|
/** @internal */
|
|
1524
|
-
export const
|
|
1525
|
-
|
|
789
|
+
export const InvokeAgentParts$outboundSchema: z.ZodType<
|
|
790
|
+
InvokeAgentParts$Outbound,
|
|
1526
791
|
z.ZodTypeDef,
|
|
1527
|
-
|
|
792
|
+
InvokeAgentParts
|
|
1528
793
|
> = z.union([
|
|
1529
|
-
|
|
1530
|
-
|
|
794
|
+
components.ToolCallPart$outboundSchema.and(
|
|
795
|
+
z.object({ kind: z.literal("tool_call") }).transform((v) => ({
|
|
796
|
+
kind: v.kind,
|
|
797
|
+
})),
|
|
798
|
+
),
|
|
799
|
+
components.TextPart$outboundSchema.and(
|
|
800
|
+
z.object({ kind: z.literal("text") }).transform((v) => ({ kind: v.kind })),
|
|
801
|
+
),
|
|
802
|
+
components.DataPart$outboundSchema.and(
|
|
803
|
+
z.object({ kind: z.literal("data") }).transform((v) => ({ kind: v.kind })),
|
|
804
|
+
),
|
|
805
|
+
components.FilePart$outboundSchema.and(
|
|
806
|
+
z.object({ kind: z.literal("file") }).transform((v) => ({ kind: v.kind })),
|
|
807
|
+
),
|
|
808
|
+
components.ToolResultPart$outboundSchema.and(
|
|
809
|
+
z.object({ kind: z.literal("tool_result") }).transform((v) => ({
|
|
810
|
+
kind: v.kind,
|
|
811
|
+
})),
|
|
812
|
+
),
|
|
1531
813
|
]);
|
|
1532
814
|
|
|
1533
|
-
export function
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
): SafeParseResult<PartsFile, SDKValidationError> {
|
|
1539
|
-
return safeParse(
|
|
1540
|
-
jsonString,
|
|
1541
|
-
(x) => PartsFile$inboundSchema.parse(JSON.parse(x)),
|
|
1542
|
-
`Failed to parse 'PartsFile' from JSON`,
|
|
1543
|
-
);
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
/** @internal */
|
|
1547
|
-
export const PartsFilePart$inboundSchema: z.ZodType<
|
|
1548
|
-
PartsFilePart,
|
|
1549
|
-
z.ZodTypeDef,
|
|
1550
|
-
unknown
|
|
1551
|
-
> = z.object({
|
|
1552
|
-
kind: InvokeAgentPartsAgentsKind$inboundSchema,
|
|
1553
|
-
file: z.union([
|
|
1554
|
-
z.lazy(() => InvokeAgentFileBinaryFormat$inboundSchema),
|
|
1555
|
-
z.lazy(() => InvokeAgentFileFileInURIFormat$inboundSchema),
|
|
1556
|
-
]),
|
|
1557
|
-
metadata: z.record(z.any()).optional(),
|
|
1558
|
-
});
|
|
1559
|
-
/** @internal */
|
|
1560
|
-
export type PartsFilePart$Outbound = {
|
|
1561
|
-
kind: string;
|
|
1562
|
-
file:
|
|
1563
|
-
| InvokeAgentFileBinaryFormat$Outbound
|
|
1564
|
-
| InvokeAgentFileFileInURIFormat$Outbound;
|
|
1565
|
-
metadata?: { [k: string]: any } | undefined;
|
|
1566
|
-
};
|
|
1567
|
-
|
|
1568
|
-
/** @internal */
|
|
1569
|
-
export const PartsFilePart$outboundSchema: z.ZodType<
|
|
1570
|
-
PartsFilePart$Outbound,
|
|
1571
|
-
z.ZodTypeDef,
|
|
1572
|
-
PartsFilePart
|
|
1573
|
-
> = z.object({
|
|
1574
|
-
kind: InvokeAgentPartsAgentsKind$outboundSchema,
|
|
1575
|
-
file: z.union([
|
|
1576
|
-
z.lazy(() => InvokeAgentFileBinaryFormat$outboundSchema),
|
|
1577
|
-
z.lazy(() => InvokeAgentFileFileInURIFormat$outboundSchema),
|
|
1578
|
-
]),
|
|
1579
|
-
metadata: z.record(z.any()).optional(),
|
|
1580
|
-
});
|
|
1581
|
-
|
|
1582
|
-
export function partsFilePartToJSON(partsFilePart: PartsFilePart): string {
|
|
1583
|
-
return JSON.stringify(PartsFilePart$outboundSchema.parse(partsFilePart));
|
|
1584
|
-
}
|
|
1585
|
-
export function partsFilePartFromJSON(
|
|
1586
|
-
jsonString: string,
|
|
1587
|
-
): SafeParseResult<PartsFilePart, SDKValidationError> {
|
|
1588
|
-
return safeParse(
|
|
1589
|
-
jsonString,
|
|
1590
|
-
(x) => PartsFilePart$inboundSchema.parse(JSON.parse(x)),
|
|
1591
|
-
`Failed to parse 'PartsFilePart' from JSON`,
|
|
1592
|
-
);
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
/** @internal */
|
|
1596
|
-
export const InvokeAgentPartsKind$inboundSchema: z.ZodNativeEnum<
|
|
1597
|
-
typeof InvokeAgentPartsKind
|
|
1598
|
-
> = z.nativeEnum(InvokeAgentPartsKind);
|
|
1599
|
-
/** @internal */
|
|
1600
|
-
export const InvokeAgentPartsKind$outboundSchema: z.ZodNativeEnum<
|
|
1601
|
-
typeof InvokeAgentPartsKind
|
|
1602
|
-
> = InvokeAgentPartsKind$inboundSchema;
|
|
1603
|
-
|
|
1604
|
-
/** @internal */
|
|
1605
|
-
export const DataPart$inboundSchema: z.ZodType<
|
|
1606
|
-
DataPart,
|
|
1607
|
-
z.ZodTypeDef,
|
|
1608
|
-
unknown
|
|
1609
|
-
> = z.object({
|
|
1610
|
-
kind: InvokeAgentPartsKind$inboundSchema,
|
|
1611
|
-
data: z.record(z.any()),
|
|
1612
|
-
metadata: z.record(z.any()).optional(),
|
|
1613
|
-
});
|
|
1614
|
-
/** @internal */
|
|
1615
|
-
export type DataPart$Outbound = {
|
|
1616
|
-
kind: string;
|
|
1617
|
-
data: { [k: string]: any };
|
|
1618
|
-
metadata?: { [k: string]: any } | undefined;
|
|
1619
|
-
};
|
|
1620
|
-
|
|
1621
|
-
/** @internal */
|
|
1622
|
-
export const DataPart$outboundSchema: z.ZodType<
|
|
1623
|
-
DataPart$Outbound,
|
|
1624
|
-
z.ZodTypeDef,
|
|
1625
|
-
DataPart
|
|
1626
|
-
> = z.object({
|
|
1627
|
-
kind: InvokeAgentPartsKind$outboundSchema,
|
|
1628
|
-
data: z.record(z.any()),
|
|
1629
|
-
metadata: z.record(z.any()).optional(),
|
|
1630
|
-
});
|
|
1631
|
-
|
|
1632
|
-
export function dataPartToJSON(dataPart: DataPart): string {
|
|
1633
|
-
return JSON.stringify(DataPart$outboundSchema.parse(dataPart));
|
|
1634
|
-
}
|
|
1635
|
-
export function dataPartFromJSON(
|
|
1636
|
-
jsonString: string,
|
|
1637
|
-
): SafeParseResult<DataPart, SDKValidationError> {
|
|
1638
|
-
return safeParse(
|
|
1639
|
-
jsonString,
|
|
1640
|
-
(x) => DataPart$inboundSchema.parse(JSON.parse(x)),
|
|
1641
|
-
`Failed to parse 'DataPart' from JSON`,
|
|
1642
|
-
);
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
/** @internal */
|
|
1646
|
-
export const PartsKind$inboundSchema: z.ZodNativeEnum<typeof PartsKind> = z
|
|
1647
|
-
.nativeEnum(PartsKind);
|
|
1648
|
-
/** @internal */
|
|
1649
|
-
export const PartsKind$outboundSchema: z.ZodNativeEnum<typeof PartsKind> =
|
|
1650
|
-
PartsKind$inboundSchema;
|
|
1651
|
-
|
|
1652
|
-
/** @internal */
|
|
1653
|
-
export const PartsTextPart$inboundSchema: z.ZodType<
|
|
1654
|
-
PartsTextPart,
|
|
1655
|
-
z.ZodTypeDef,
|
|
1656
|
-
unknown
|
|
1657
|
-
> = z.object({
|
|
1658
|
-
kind: PartsKind$inboundSchema,
|
|
1659
|
-
text: z.string(),
|
|
1660
|
-
});
|
|
1661
|
-
/** @internal */
|
|
1662
|
-
export type PartsTextPart$Outbound = {
|
|
1663
|
-
kind: string;
|
|
1664
|
-
text: string;
|
|
1665
|
-
};
|
|
1666
|
-
|
|
1667
|
-
/** @internal */
|
|
1668
|
-
export const PartsTextPart$outboundSchema: z.ZodType<
|
|
1669
|
-
PartsTextPart$Outbound,
|
|
1670
|
-
z.ZodTypeDef,
|
|
1671
|
-
PartsTextPart
|
|
1672
|
-
> = z.object({
|
|
1673
|
-
kind: PartsKind$outboundSchema,
|
|
1674
|
-
text: z.string(),
|
|
1675
|
-
});
|
|
1676
|
-
|
|
1677
|
-
export function partsTextPartToJSON(partsTextPart: PartsTextPart): string {
|
|
1678
|
-
return JSON.stringify(PartsTextPart$outboundSchema.parse(partsTextPart));
|
|
1679
|
-
}
|
|
1680
|
-
export function partsTextPartFromJSON(
|
|
1681
|
-
jsonString: string,
|
|
1682
|
-
): SafeParseResult<PartsTextPart, SDKValidationError> {
|
|
1683
|
-
return safeParse(
|
|
1684
|
-
jsonString,
|
|
1685
|
-
(x) => PartsTextPart$inboundSchema.parse(JSON.parse(x)),
|
|
1686
|
-
`Failed to parse 'PartsTextPart' from JSON`,
|
|
815
|
+
export function invokeAgentPartsToJSON(
|
|
816
|
+
invokeAgentParts: InvokeAgentParts,
|
|
817
|
+
): string {
|
|
818
|
+
return JSON.stringify(
|
|
819
|
+
InvokeAgentParts$outboundSchema.parse(invokeAgentParts),
|
|
1687
820
|
);
|
|
1688
821
|
}
|
|
1689
|
-
|
|
1690
|
-
/** @internal */
|
|
1691
|
-
export const Parts$inboundSchema: z.ZodType<Parts, z.ZodTypeDef, unknown> = z
|
|
1692
|
-
.union([
|
|
1693
|
-
z.lazy(() => ToolCallPart$inboundSchema),
|
|
1694
|
-
z.lazy(() => PartsTextPart$inboundSchema),
|
|
1695
|
-
z.lazy(() => DataPart$inboundSchema),
|
|
1696
|
-
z.lazy(() => PartsFilePart$inboundSchema),
|
|
1697
|
-
z.lazy(() => PartsToolResultPart$inboundSchema),
|
|
1698
|
-
]);
|
|
1699
|
-
/** @internal */
|
|
1700
|
-
export type Parts$Outbound =
|
|
1701
|
-
| ToolCallPart$Outbound
|
|
1702
|
-
| PartsTextPart$Outbound
|
|
1703
|
-
| DataPart$Outbound
|
|
1704
|
-
| PartsFilePart$Outbound
|
|
1705
|
-
| PartsToolResultPart$Outbound;
|
|
1706
|
-
|
|
1707
|
-
/** @internal */
|
|
1708
|
-
export const Parts$outboundSchema: z.ZodType<
|
|
1709
|
-
Parts$Outbound,
|
|
1710
|
-
z.ZodTypeDef,
|
|
1711
|
-
Parts
|
|
1712
|
-
> = z.union([
|
|
1713
|
-
z.lazy(() => ToolCallPart$outboundSchema),
|
|
1714
|
-
z.lazy(() => PartsTextPart$outboundSchema),
|
|
1715
|
-
z.lazy(() => DataPart$outboundSchema),
|
|
1716
|
-
z.lazy(() => PartsFilePart$outboundSchema),
|
|
1717
|
-
z.lazy(() => PartsToolResultPart$outboundSchema),
|
|
1718
|
-
]);
|
|
1719
|
-
|
|
1720
|
-
export function partsToJSON(parts: Parts): string {
|
|
1721
|
-
return JSON.stringify(Parts$outboundSchema.parse(parts));
|
|
1722
|
-
}
|
|
1723
|
-
export function partsFromJSON(
|
|
822
|
+
export function invokeAgentPartsFromJSON(
|
|
1724
823
|
jsonString: string,
|
|
1725
|
-
): SafeParseResult<
|
|
824
|
+
): SafeParseResult<InvokeAgentParts, SDKValidationError> {
|
|
1726
825
|
return safeParse(
|
|
1727
826
|
jsonString,
|
|
1728
|
-
(x) =>
|
|
1729
|
-
`Failed to parse '
|
|
827
|
+
(x) => InvokeAgentParts$inboundSchema.parse(JSON.parse(x)),
|
|
828
|
+
`Failed to parse 'InvokeAgentParts' from JSON`,
|
|
1730
829
|
);
|
|
1731
830
|
}
|
|
1732
831
|
|
|
@@ -1736,16 +835,36 @@ export const TaskStatusMessage$inboundSchema: z.ZodType<
|
|
|
1736
835
|
z.ZodTypeDef,
|
|
1737
836
|
unknown
|
|
1738
837
|
> = z.object({
|
|
1739
|
-
kind:
|
|
838
|
+
kind: InvokeAgentKind$inboundSchema,
|
|
1740
839
|
messageId: z.string(),
|
|
1741
840
|
role: ExtendedMessageRole$inboundSchema,
|
|
1742
841
|
parts: z.array(
|
|
1743
842
|
z.union([
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
843
|
+
components.ToolCallPart$inboundSchema.and(
|
|
844
|
+
z.object({ kind: z.literal("tool_call") }).transform((v) => ({
|
|
845
|
+
kind: v.kind,
|
|
846
|
+
})),
|
|
847
|
+
),
|
|
848
|
+
components.TextPart$inboundSchema.and(
|
|
849
|
+
z.object({ kind: z.literal("text") }).transform((v) => ({
|
|
850
|
+
kind: v.kind,
|
|
851
|
+
})),
|
|
852
|
+
),
|
|
853
|
+
components.DataPart$inboundSchema.and(
|
|
854
|
+
z.object({ kind: z.literal("data") }).transform((v) => ({
|
|
855
|
+
kind: v.kind,
|
|
856
|
+
})),
|
|
857
|
+
),
|
|
858
|
+
components.FilePart$inboundSchema.and(
|
|
859
|
+
z.object({ kind: z.literal("file") }).transform((v) => ({
|
|
860
|
+
kind: v.kind,
|
|
861
|
+
})),
|
|
862
|
+
),
|
|
863
|
+
components.ToolResultPart$inboundSchema.and(
|
|
864
|
+
z.object({ kind: z.literal("tool_result") }).transform((v) => ({
|
|
865
|
+
kind: v.kind,
|
|
866
|
+
})),
|
|
867
|
+
),
|
|
1749
868
|
]),
|
|
1750
869
|
),
|
|
1751
870
|
});
|
|
@@ -1755,11 +874,11 @@ export type TaskStatusMessage$Outbound = {
|
|
|
1755
874
|
messageId: string;
|
|
1756
875
|
role: string;
|
|
1757
876
|
parts: Array<
|
|
1758
|
-
| ToolCallPart$Outbound
|
|
1759
|
-
|
|
|
1760
|
-
| DataPart$Outbound
|
|
1761
|
-
|
|
|
1762
|
-
|
|
|
877
|
+
| (components.ToolCallPart$Outbound & { kind: "tool_call" })
|
|
878
|
+
| (components.TextPart$Outbound & { kind: "text" })
|
|
879
|
+
| (components.DataPart$Outbound & { kind: "data" })
|
|
880
|
+
| (components.FilePart$Outbound & { kind: "file" })
|
|
881
|
+
| (components.ToolResultPart$Outbound & { kind: "tool_result" })
|
|
1763
882
|
>;
|
|
1764
883
|
};
|
|
1765
884
|
|
|
@@ -1769,16 +888,36 @@ export const TaskStatusMessage$outboundSchema: z.ZodType<
|
|
|
1769
888
|
z.ZodTypeDef,
|
|
1770
889
|
TaskStatusMessage
|
|
1771
890
|
> = z.object({
|
|
1772
|
-
kind:
|
|
891
|
+
kind: InvokeAgentKind$outboundSchema,
|
|
1773
892
|
messageId: z.string(),
|
|
1774
893
|
role: ExtendedMessageRole$outboundSchema,
|
|
1775
894
|
parts: z.array(
|
|
1776
895
|
z.union([
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
896
|
+
components.ToolCallPart$outboundSchema.and(
|
|
897
|
+
z.object({ kind: z.literal("tool_call") }).transform((v) => ({
|
|
898
|
+
kind: v.kind,
|
|
899
|
+
})),
|
|
900
|
+
),
|
|
901
|
+
components.TextPart$outboundSchema.and(
|
|
902
|
+
z.object({ kind: z.literal("text") }).transform((v) => ({
|
|
903
|
+
kind: v.kind,
|
|
904
|
+
})),
|
|
905
|
+
),
|
|
906
|
+
components.DataPart$outboundSchema.and(
|
|
907
|
+
z.object({ kind: z.literal("data") }).transform((v) => ({
|
|
908
|
+
kind: v.kind,
|
|
909
|
+
})),
|
|
910
|
+
),
|
|
911
|
+
components.FilePart$outboundSchema.and(
|
|
912
|
+
z.object({ kind: z.literal("file") }).transform((v) => ({
|
|
913
|
+
kind: v.kind,
|
|
914
|
+
})),
|
|
915
|
+
),
|
|
916
|
+
components.ToolResultPart$outboundSchema.and(
|
|
917
|
+
z.object({ kind: z.literal("tool_result") }).transform((v) => ({
|
|
918
|
+
kind: v.kind,
|
|
919
|
+
})),
|
|
920
|
+
),
|
|
1782
921
|
]),
|
|
1783
922
|
),
|
|
1784
923
|
});
|
|
@@ -1849,7 +988,7 @@ export const InvokeAgentA2ATaskResponse$inboundSchema: z.ZodType<
|
|
|
1849
988
|
> = z.object({
|
|
1850
989
|
id: z.string(),
|
|
1851
990
|
contextId: z.string(),
|
|
1852
|
-
kind:
|
|
991
|
+
kind: Kind$inboundSchema,
|
|
1853
992
|
status: z.lazy(() => TaskStatus$inboundSchema),
|
|
1854
993
|
metadata: z.record(z.any()).optional(),
|
|
1855
994
|
});
|
|
@@ -1870,7 +1009,7 @@ export const InvokeAgentA2ATaskResponse$outboundSchema: z.ZodType<
|
|
|
1870
1009
|
> = z.object({
|
|
1871
1010
|
id: z.string(),
|
|
1872
1011
|
contextId: z.string(),
|
|
1873
|
-
kind:
|
|
1012
|
+
kind: Kind$outboundSchema,
|
|
1874
1013
|
status: z.lazy(() => TaskStatus$outboundSchema),
|
|
1875
1014
|
metadata: z.record(z.any()).optional(),
|
|
1876
1015
|
});
|