diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 9e1ba85..0433bfd 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,16 +1,16 @@ lockVersion: 2.0.0 id: 7fd487cb-2a73-459e-99e5-2c4e6547175f management: - docChecksum: 4ca2e5a38cd1267ee6f3904ffb919fe6 + docChecksum: 79ddbb2076b20053002378b7278c736f docVersion: 2.0.0 - speakeasyVersion: 1.680.11 + speakeasyVersion: 1.680.12 generationVersion: 2.788.15 - releaseVersion: 3.4.1 - configChecksum: 2505d61983a54516502c3199a3877c7c + releaseVersion: 3.4.2 + configChecksum: 650aab4b1b2e78cf94486338ed78deac persistentEdits: - generation_id: c243171f-defa-4e30-9fef-03726035f93a - pristine_commit_hash: acd0fa57347a4055ff5a89cf590b5de329234259 - pristine_tree_hash: afc296ed1d811aa5354b5065995ab67b4ba15949 + generation_id: 5d9282eb-abd6-47e3-9bd5-4e9761f18b06 + pristine_commit_hash: bf373b9ae5e59a88b398a04ef542c6e7ec4f0826 + pristine_tree_hash: b236cb7d44d6878f0376c0c325ca21ed95b92cc9 features: typescript: additionalDependencies: 0.1.0 @@ -82,14 +82,6 @@ trackedFiles: id: 3a73378fa514 last_write_checksum: sha1:4f40d5985f539b0ecedcc5c59d1929a5a229830c pristine_git_object: 30c80ed6f9deb72d25ba1914aa65970a1e8e8750 - docs/models/appapipublicv2functioncallcallfunctionrequest.md: - id: 9cf1fdcedc3a - last_write_checksum: sha1:ff18b7f39d61ab6f8e0983fed58249a369f440ce - pristine_git_object: 01d2aa9691c85c520a676d2b65485be4d79cdbd1 - docs/models/appapipublicv2functioncallcallfunctionresponse.md: - id: 428a6cce6b14 - last_write_checksum: sha1:a51c7a09d03d54f4e4bf299fc1290c01873882d2 - pristine_git_object: 6878c439a8ca7ded8093f1c416005ed1b86dac36 docs/models/appapipublicv2functionscallfunctionrequest.md: id: e9f082ece3bc last_write_checksum: sha1:abb193368ce7bef80a85a16a6173aa9b5b25966b @@ -110,6 +102,14 @@ trackedFiles: id: 89cc22c950cb last_write_checksum: sha1:6917e6b053b1d43dd2392837acd793b3d65a36ea pristine_git_object: 61f52a3a329d9de087d65cff600d713d7c00f11f + docs/models/callfunctionrequest.md: + id: 6e402141eaaf + last_write_checksum: sha1:e2a29261c1baa39a8a8af476e778769097c5d593 + pristine_git_object: 3e14b6af37b47f1639155ffcd7fcbe1a604ce721 + docs/models/callfunctionresponse.md: + id: 7edcead03403 + last_write_checksum: sha1:1365f995386de2ceb0a96a1844c6c7504033d634 + pristine_git_object: 53bc878790a5e3314ee959977e6c44147a2b2bce docs/models/chatcompletion.md: id: 7087ed1b2694 last_write_checksum: sha1:bb6e9c542aa316ae5a0214b3651c2675025c8300 @@ -1012,8 +1012,8 @@ trackedFiles: pristine_git_object: b91b7fbdba7b1d4a82692d7b29f9cd3f9f890170 docs/models/operations/updatespanspansspanidpatchrequest.md: id: 3807d912b962 - last_write_checksum: sha1:3832cb1143b4a8ea9dcb0809b032942d8e720def - pristine_git_object: 0da6d5c0bf13d7af9b4bb7603a9693bc60f33d61 + last_write_checksum: sha1:2ef8591365a99d8cfeff68ec6d166ccd6fcc57a7 + pristine_git_object: 1d1f950bb1a7ec34bd91a728e0d85536af3efa32 docs/models/operations/uploadfileknowledgeknowledgebaseiduploadpostrequest.md: id: 660a4bf8bd1e last_write_checksum: sha1:d3db44f9870a08cad951ee61a78ef0c1f9d9f8b5 @@ -1228,8 +1228,8 @@ trackedFiles: pristine_git_object: 475ebf38d243b062fd2522c7848c7c5136d47ec0 docs/models/updatespanrequest.md: id: 0cc273f44164 - last_write_checksum: sha1:b19db8375d6f1b813bd81d5c810fdc29a64cc863 - pristine_git_object: f2a8f24129932c94124888a5c80a493c564823ec + last_write_checksum: sha1:bfd5e6da1643115086610cfbad65050aa3b2cde9 + pristine_git_object: c77b5c58071b9ec1b1ea9ab44ac9b4d8df685311 docs/models/updatespanresponse.md: id: 163e62c13f3d last_write_checksum: sha1:0f1aa3c4814eb509f0fa5f0ba8f6cb9e51542a76 @@ -1284,12 +1284,12 @@ trackedFiles: pristine_git_object: fe49b0d036cb4737c253de7bdd79294bb45c2890 jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:a32844da90a797c5ecd7aedc7aca129389648baf - pristine_git_object: 029e1aba29ef99d1b6bc463c75dd5a67073e318f + last_write_checksum: sha1:cee2848ee04ac72ef57a913c033725171aeed352 + pristine_git_object: 09e1d27fd104a000ed55ae5f90285d05985d21b3 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:5e9dc44d73656fa94a07bbd579d7258fd8613481 - pristine_git_object: dbe4d6769292c1dcc94898c4d5ced43ee83894ee + last_write_checksum: sha1:83471cdc4692d75c91a1f0ac7d162ccd242f00af + pristine_git_object: 4fe58183656240d65f2a6331e365b33fe5e40363 src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:7fe1d083a687c984082d7324a6c70efa04ac3019 @@ -1300,8 +1300,8 @@ trackedFiles: pristine_git_object: 1b6c999e1fb3bf64003026e9d624ebaa7d9f2544 src/funcs/call.ts: id: 4e1ce51400a7 - last_write_checksum: sha1:4d376fa7c3f8fd1256ef4916035a421afe5ca13e - pristine_git_object: 068898d82c97b65e58cb8c21e9f9dfb917eb4c92 + last_write_checksum: sha1:a9d829f207cef26bd04e898e2228ee0dac25293b + pristine_git_object: 948993517dd6168a3a775e02699c154a3d633ed4 src/funcs/datasetsCreateEntry.ts: id: 0f3184b43501 last_write_checksum: sha1:b4e714c80a3f3ff5b6f10e398308053f6324bcb5 @@ -1556,8 +1556,8 @@ trackedFiles: pristine_git_object: f1f86b5b0869d96055fd6ce5340f690128fe1441 src/funcs/stream.ts: id: cbe6de6fe85b - last_write_checksum: sha1:171e09db7c1ede33922eb41d95026627610e4d0e - pristine_git_object: 20697093db8ee682747ff005e6d5d1679acafac1 + last_write_checksum: sha1:2b4cb2f70afea96aab418cc8e98ac9868d6ce3ed + pristine_git_object: 1b162cb6db79b2bcb6ff18bbbe10a9a724579fca src/funcs/tracesGet.ts: id: f68b9e361165 last_write_checksum: sha1:385ebf632a53f39082bd4d879307302221ba7643 @@ -1588,8 +1588,8 @@ trackedFiles: pristine_git_object: 0aebd8b0a4867e35cb3348fc52921c3c0b4725b7 src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:6db96ee9f023e595f0af87d37558c21faa713794 - pristine_git_object: 7d8478ec487b3d2f106dafd22c85cf72246ab426 + last_write_checksum: sha1:9b3d67dea1d52f8ca64d219f583e968ae4081b2b + pristine_git_object: 8af9e54bb4ab9fbcf3b7245b509899e10e8639da src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:1dd3e3fbb4550c4bf31f5ef997faff355d6f3250 @@ -1676,8 +1676,8 @@ trackedFiles: pristine_git_object: 0955a573c2ce989d63c737410ab8cc28706d9f74 src/mcp-server/mcp-server.ts: id: aabbc4ab07c1 - last_write_checksum: sha1:630b11682e88bac36bbc88ec0ebb43823518b683 - pristine_git_object: 8df222da77bfab5b06933a886c14f53bae5dfbba + last_write_checksum: sha1:c22a980ca9d795c6ae4794939aa6c20c863594c7 + pristine_git_object: ed9ca8f4611ed0609bdef4ef55d572c506e5024f src/mcp-server/prompts.ts: id: 26f3d73cbf31 last_write_checksum: sha1:aab17727e4e0e625fffd088ba2943d9700e6c049 @@ -1692,8 +1692,8 @@ trackedFiles: pristine_git_object: c25696d4c4f70e081fa5d87ad6891874c509a577 src/mcp-server/server.ts: id: 2784dd48e82a - last_write_checksum: sha1:3ff63519ef2de8f1ea71a2a8d4d8e9ddb43d4e5f - pristine_git_object: 4513112dfd7a8da6011287fa82d88b03ab44943c + last_write_checksum: sha1:78fb732c2f1005f3b043592fba3e0b2b39a5166e + pristine_git_object: e3308bfa9ad2483f79e6a186ff6b6a5283c7ff9e src/mcp-server/shared.ts: id: 074e80d4be1e last_write_checksum: sha1:56c73d4429691516e35541825e759a0285747a2b @@ -1708,8 +1708,8 @@ trackedFiles: pristine_git_object: 2154577ceb7e8d9cff281b922d22a1c5329dfd11 src/mcp-server/tools/call.ts: id: 7ab1495f591e - last_write_checksum: sha1:5f17448fa1c0960e93a93a6cddd39a170cc8d418 - pristine_git_object: ac818fd9563d74fd472fe2162a8857872d0fa8b5 + last_write_checksum: sha1:c93d981e4090b9580ff33623f3914938129aa4d4 + pristine_git_object: 2c0c83b9db128949b11b348b8c7a01eb92e17c7b src/mcp-server/tools/datasetsCreateEntry.ts: id: af7e31bf7e49 last_write_checksum: sha1:43fc1bff69df0ee90d724097bd0545ca9c5e0fad @@ -1964,8 +1964,8 @@ trackedFiles: pristine_git_object: b868ca9dc8d19581bdb5263c95695e448e7866e4 src/mcp-server/tools/stream.ts: id: 3ca601f0e9ed - last_write_checksum: sha1:8db1e89337d01f1994af7dc4f5a73aeb478a3df1 - pristine_git_object: ee7c1e002f8d7d1ff6e77a5cce3ea23a28f6b036 + last_write_checksum: sha1:5c9b2e638289df82131b777c904ea42d49ec262a + pristine_git_object: d83d11c01a9b449d32946cce9621cf80f3dc7dd5 src/mcp-server/tools/tracesGet.ts: id: 42492f3ff12c last_write_checksum: sha1:fe0a6928963e4962e1f456a462686f299ef0db93 @@ -1986,14 +1986,6 @@ trackedFiles: id: 895bf7dfa898 last_write_checksum: sha1:f99500a572eeb48526b1b696941eb8362ae90c86 pristine_git_object: f60420de3f08bdc90eae584fae28fbda93a7e3d0 - src/models/appapipublicv2functioncallcallfunctionrequest.ts: - id: b2209fa1addc - last_write_checksum: sha1:f7336623a39952be54505834e5302db55df856d6 - pristine_git_object: 90e2bf0a4494b6fc3834a608cce0beaaf56b49e5 - src/models/appapipublicv2functioncallcallfunctionresponse.ts: - id: bc9b70199c5a - last_write_checksum: sha1:bc89171dc945ade15b64b261d963bfcdfbda75a2 - pristine_git_object: ddef5eb27611638b7db28433f1b6dbe0a6ac4d0d src/models/appapipublicv2functionscallfunctionrequest.ts: id: cfc6ca65127c last_write_checksum: sha1:21a85c34b00e3a3568d368314efbdbbf9f98d039 @@ -2010,6 +2002,14 @@ trackedFiles: id: 16bf9a5901fb last_write_checksum: sha1:7ab25367090caeb3260862b5e2a3067dee8a17e8 pristine_git_object: 07a13149845ba2a8e85708661cfe2776757c4928 + src/models/callfunctionrequest.ts: + id: e0432cc8379c + last_write_checksum: sha1:c792e47172cb7c2095d580e0cfecc4b0236ecb75 + pristine_git_object: 8d377adf69e5ee0c3aa2b68251c51aa58bde050a + src/models/callfunctionresponse.ts: + id: 9c7a1c14567a + last_write_checksum: sha1:eaf9e178a5922c735e927202435e327fdb1f4529 + pristine_git_object: a0e8a9549f30dd055025f104ac8a71e68f60f7bb src/models/chatcompletion.ts: id: 92c8e8bb5ac2 last_write_checksum: sha1:afd602d8f1b3a3d8c78dd639f84634b775c807dd @@ -2388,8 +2388,8 @@ trackedFiles: pristine_git_object: 61690cc62ba68deb1c15e548bf466dbf815de24b src/models/index.ts: id: f93644b0f37e - last_write_checksum: sha1:c26720b1ea4b6e33fc06e2a35d62aed2d25e5a81 - pristine_git_object: 60b3a6acc6559d117716f6b57946a04be5657c68 + last_write_checksum: sha1:6d228a1bb01e1afade793e24869873c9d5aaca97 + pristine_git_object: daf80d2db491487470382a27690c2854ddf5a1a6 src/models/inputaudio.ts: id: 9bdc14c7565f last_write_checksum: sha1:cbdd2b85ee862c49ab572f2a402be112b7d21c0a @@ -3012,8 +3012,8 @@ trackedFiles: pristine_git_object: 5869bac1e088a87e0e332d7062fbf06c50dee14d src/sdk/sdk.ts: id: 784571af2f69 - last_write_checksum: sha1:74b472a6339a54d166ebb3ae3cd21fa14f907739 - pristine_git_object: 92bc74075d36a8694e762a7fd3d7dc406b95551c + last_write_checksum: sha1:7f043cf06a82a7a96f914c97c3e1e9e6b4c9256d + pristine_git_object: 0e459a378a670f11185590c2d1d71e348ba4e768 src/sdk/spanmetrics.ts: id: 273ced1995d4 last_write_checksum: sha1:591300ee66cfb61b181225004ccfa68ddbb05ff6 @@ -3348,7 +3348,7 @@ examples: path: span_id: "77b258a2-45c1-4b87-a50c-9116bc8ed1d6" requestBody: - application/json: {"name": "my span", "start_time": "2026-01-02T11:36:47.278310Z", "type": "email_tool", "end_time": "2026-01-02T11:36:47.278372Z", "input": "Hello, world!", "output": "Hello, world!", "error": "Exception: This is an error message", "meta": {"key": "value"}, "score": 10} + application/json: {"name": "my span", "start_time": "2026-01-05T03:06:20.232545Z", "type": "email_tool", "end_time": "2026-01-05T03:06:20.232620Z", "input": "Hello, world!", "output": "Hello, world!", "error": "Exception: This is an error message", "meta": {"key": "value"}, "score": 10} responses: "200": application/json: {"name": "my span", "start_time": "2024-03-20T10:00:00+00:00", "id": "84d9ffc8-336c-4953-b92f-fe05d5405951", "trace_id": "123e4567-e89b-12d3-a456-426614174000", "parent_id": "123e4567-e89b-12d3-a456-426614174000", "type": "email_tool", "end_time": "2024-03-20T10:00:10+00:00", "input": "Hello, world!", "output": "Hello, world!", "error": "Exception: This is an error message", "meta": {"key": "value"}, "score": 10} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 5de72b5..96257d9 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false typescript: - version: 3.4.1 + version: 3.4.2 acceptHeaderEnum: true additionalDependencies: dependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 40af9e3..0b8c588 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.680.11 +speakeasyVersion: 1.680.12 sources: FastAPI: sourceNamespace: fast-api - sourceRevisionDigest: sha256:68b0cbe004a918df9af2bdb9f14fb8603d166eee2514fe752773b87a0b06a602 - sourceBlobDigest: sha256:9a8a62a66b7d61f0a406be7b4c63c1b2d555b9ce44d9e3f998d10c31df1d5009 + sourceRevisionDigest: sha256:e5734595abf1acb3f437b2a2070261133fc000665e62c1f5ed2c00e830e6a85a + sourceBlobDigest: sha256:0bd6ee016bf9efc712ccc3bd8f307d64e973dba8b3a456f346c1adae4afef01f tags: - latest - main @@ -12,10 +12,10 @@ targets: opper: source: FastAPI sourceNamespace: fast-api - sourceRevisionDigest: sha256:68b0cbe004a918df9af2bdb9f14fb8603d166eee2514fe752773b87a0b06a602 - sourceBlobDigest: sha256:9a8a62a66b7d61f0a406be7b4c63c1b2d555b9ce44d9e3f998d10c31df1d5009 + sourceRevisionDigest: sha256:e5734595abf1acb3f437b2a2070261133fc000665e62c1f5ed2c00e830e6a85a + sourceBlobDigest: sha256:0bd6ee016bf9efc712ccc3bd8f307d64e973dba8b3a456f346c1adae4afef01f codeSamplesNamespace: fast-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:5c5b7fb4892a2ddb5a8cf1e04b161f2742e976efee6a8b613f3d666aa8474a96 + codeSamplesRevisionDigest: sha256:ca06acbcfdb693040a2b5dcfe6aeece7404063497fdaae05b069a24bdc75023b workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/docs/models/appapipublicv2functioncallcallfunctionrequest.md b/docs/models/callfunctionrequest.md similarity index 99% rename from docs/models/appapipublicv2functioncallcallfunctionrequest.md rename to docs/models/callfunctionrequest.md index 01d2aa9..3e14b6a 100644 --- a/docs/models/appapipublicv2functioncallcallfunctionrequest.md +++ b/docs/models/callfunctionrequest.md @@ -1,11 +1,11 @@ -# AppApiPublicV2FunctionCallCallFunctionRequest +# CallFunctionRequest ## Example Usage ```typescript -import { AppApiPublicV2FunctionCallCallFunctionRequest } from "opperai/models"; +import { CallFunctionRequest } from "opperai/models"; -let value: AppApiPublicV2FunctionCallCallFunctionRequest = { +let value: CallFunctionRequest = { name: "add_numbers", instructions: "Calculate the sum of two numbers", inputSchema: { diff --git a/docs/models/appapipublicv2functioncallcallfunctionresponse.md b/docs/models/callfunctionresponse.md similarity index 98% rename from docs/models/appapipublicv2functioncallcallfunctionresponse.md rename to docs/models/callfunctionresponse.md index 6878c43..53bc878 100644 --- a/docs/models/appapipublicv2functioncallcallfunctionresponse.md +++ b/docs/models/callfunctionresponse.md @@ -1,12 +1,12 @@ -# AppApiPublicV2FunctionCallCallFunctionResponse +# CallFunctionResponse ## Example Usage ```typescript -import { AppApiPublicV2FunctionCallCallFunctionResponse } from "opperai/models"; +import { CallFunctionResponse } from "opperai/models"; -let value: AppApiPublicV2FunctionCallCallFunctionResponse = { - spanId: "fe8c2e6e-0531-4ec9-92e0-5633b8cd9b3a", +let value: CallFunctionResponse = { + spanId: "e9cdfdda-24c9-49c9-b80b-1a2728c3f909", message: "The sum of 1 and 3 is 4", jsonPayload: { "sum": 4, diff --git a/docs/models/operations/updatespanspansspanidpatchrequest.md b/docs/models/operations/updatespanspansspanidpatchrequest.md index 0da6d5c..1d1f950 100644 --- a/docs/models/operations/updatespanspansspanidpatchrequest.md +++ b/docs/models/operations/updatespanspansspanidpatchrequest.md @@ -9,9 +9,9 @@ let value: UpdateSpanSpansSpanIdPatchRequest = { spanId: "c4686ca8-5f9f-483e-8cc2-e12731bcf9e5", updateSpanRequest: { name: "my span", - startTime: new Date("2026-01-02T11:36:47.278310Z"), + startTime: new Date("2026-01-05T03:06:20.232545Z"), type: "email_tool", - endTime: new Date("2026-01-02T11:36:47.278372Z"), + endTime: new Date("2026-01-05T03:06:20.232620Z"), input: "Hello, world!", output: "Hello, world!", error: "Exception: This is an error message", diff --git a/docs/models/updatespanrequest.md b/docs/models/updatespanrequest.md index f2a8f24..c77b5c5 100644 --- a/docs/models/updatespanrequest.md +++ b/docs/models/updatespanrequest.md @@ -7,9 +7,9 @@ import { UpdateSpanRequest } from "opperai/models"; let value: UpdateSpanRequest = { name: "my span", - startTime: new Date("2026-01-02T11:36:47.278310Z"), + startTime: new Date("2026-01-05T03:06:20.232545Z"), type: "email_tool", - endTime: new Date("2026-01-02T11:36:47.278372Z"), + endTime: new Date("2026-01-05T03:06:20.232620Z"), input: "Hello, world!", output: "Hello, world!", error: "Exception: This is an error message", @@ -25,9 +25,9 @@ let value: UpdateSpanRequest = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | | `name` | *string* | :heavy_minus_sign: | The name of the span, something descriptive about the span that will be used to identify it when querying | my span | -| `startTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start time of the span in UTC | 2026-01-02T11:36:47.278310Z | +| `startTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start time of the span in UTC | 2026-01-05T03:06:20.232545Z | | `type` | *string* | :heavy_minus_sign: | The type of the span | email_tool | -| `endTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end time of the span in UTC | 2026-01-02T11:36:47.278372Z | +| `endTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end time of the span in UTC | 2026-01-05T03:06:20.232620Z | | `input` | *string* | :heavy_minus_sign: | The input of the span | Hello, world! | | `output` | *string* | :heavy_minus_sign: | The output of the span | Hello, world! | | `error` | *string* | :heavy_minus_sign: | In case of an error, the error message | Exception: This is an error message | diff --git a/examples/package-lock.json b/examples/package-lock.json index 044e782..cf6c345 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "opperai", - "version": "3.4.1", + "version": "3.4.2", "dependencies": { "@modelcontextprotocol/sdk": "^1.24.0", "zod": "^3.25.0 || ^4.0.0" diff --git a/jsr.json b/jsr.json index 029e1ab..09e1d27 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "opperai", - "version": "3.4.1", + "version": "3.4.2", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index d0b969c..165292b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "opperai", - "version": "3.4.1", + "version": "3.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "opperai", - "version": "3.4.1", + "version": "3.4.2", "dependencies": { "@modelcontextprotocol/sdk": "^1.24.0", "zod": "^3.25.0 || ^4.0.0" diff --git a/package.json b/package.json index dbe4d67..4fe5818 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opperai", - "version": "3.4.1", + "version": "3.4.2", "author": "Speakeasy", "repository": { "type": "git", diff --git a/src/funcs/call.ts b/src/funcs/call.ts index 068898d..9489935 100644 --- a/src/funcs/call.ts +++ b/src/funcs/call.ts @@ -34,11 +34,11 @@ import { Result } from "../types/fp.js"; */ export function call( client: OpperCore, - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, ): APIPromise< Result< - models.AppApiPublicV2FunctionCallCallFunctionResponse, + models.CallFunctionResponse, | errors.BadRequestError | errors.UnauthorizedError | errors.NotFoundError @@ -62,12 +62,12 @@ export function call( async function $do( client: OpperCore, - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, ): Promise< [ Result< - models.AppApiPublicV2FunctionCallCallFunctionResponse, + models.CallFunctionResponse, | errors.BadRequestError | errors.UnauthorizedError | errors.NotFoundError @@ -86,10 +86,7 @@ async function $do( > { const parsed = safeParse( request, - (value) => - models.AppApiPublicV2FunctionCallCallFunctionRequest$outboundSchema.parse( - value, - ), + (value) => models.CallFunctionRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { @@ -155,7 +152,7 @@ async function $do( }; const [result] = await M.match< - models.AppApiPublicV2FunctionCallCallFunctionResponse, + models.CallFunctionResponse, | errors.BadRequestError | errors.UnauthorizedError | errors.NotFoundError @@ -169,10 +166,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json( - 200, - models.AppApiPublicV2FunctionCallCallFunctionResponse$inboundSchema, - ), + M.json(200, models.CallFunctionResponse$inboundSchema), M.jsonErr(400, errors.BadRequestError$inboundSchema), M.jsonErr(401, errors.UnauthorizedError$inboundSchema), M.jsonErr(404, errors.NotFoundError$inboundSchema), diff --git a/src/funcs/stream.ts b/src/funcs/stream.ts index 2069709..1b162cb 100644 --- a/src/funcs/stream.ts +++ b/src/funcs/stream.ts @@ -101,7 +101,7 @@ import { Result } from "../types/fp.js"; */ export function stream( client: OpperCore, - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, ): APIPromise< Result< @@ -129,7 +129,7 @@ export function stream( async function $do( client: OpperCore, - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, ): Promise< [ @@ -153,10 +153,7 @@ async function $do( > { const parsed = safeParse( request, - (value) => - models.AppApiPublicV2FunctionCallCallFunctionRequest$outboundSchema.parse( - value, - ), + (value) => models.CallFunctionRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { diff --git a/src/lib/config.ts b/src/lib/config.ts index 7d8478e..8af9e54 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "2.0.0", - sdkVersion: "3.4.1", + sdkVersion: "3.4.2", genVersion: "2.788.15", - userAgent: "speakeasy-sdk/typescript 3.4.1 2.788.15 2.0.0 opperai", + userAgent: "speakeasy-sdk/typescript 3.4.2 2.788.15 2.0.0 opperai", } as const; diff --git a/src/mcp-server/mcp-server.ts b/src/mcp-server/mcp-server.ts index 8df222d..ed9ca8f 100644 --- a/src/mcp-server/mcp-server.ts +++ b/src/mcp-server/mcp-server.ts @@ -19,7 +19,7 @@ const routes = buildRouteMap({ export const app = buildApplication(routes, { name: "mcp", versionInfo: { - currentVersion: "3.4.1", + currentVersion: "3.4.2", }, }); diff --git a/src/mcp-server/server.ts b/src/mcp-server/server.ts index 4513112..e3308bf 100644 --- a/src/mcp-server/server.ts +++ b/src/mcp-server/server.ts @@ -92,7 +92,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "Opper", - version: "3.4.1", + version: "3.4.2", }); const client = new OpperCore({ diff --git a/src/mcp-server/tools/call.ts b/src/mcp-server/tools/call.ts index ac818fd..2c0c83b 100644 --- a/src/mcp-server/tools/call.ts +++ b/src/mcp-server/tools/call.ts @@ -7,7 +7,7 @@ import * as models from "../../models/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - request: models.AppApiPublicV2FunctionCallCallFunctionRequest$inboundSchema, + request: models.CallFunctionRequest$inboundSchema, }; export const tool$call: ToolDefinition = { diff --git a/src/mcp-server/tools/stream.ts b/src/mcp-server/tools/stream.ts index ee7c1e0..d83d11c 100644 --- a/src/mcp-server/tools/stream.ts +++ b/src/mcp-server/tools/stream.ts @@ -7,7 +7,7 @@ import * as models from "../../models/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - request: models.AppApiPublicV2FunctionCallCallFunctionRequest$inboundSchema, + request: models.CallFunctionRequest$inboundSchema, }; export const tool$stream: ToolDefinition = { diff --git a/src/models/appapipublicv2functioncallcallfunctionrequest.ts b/src/models/callfunctionrequest.ts similarity index 60% rename from src/models/appapipublicv2functioncallcallfunctionrequest.ts rename to src/models/callfunctionrequest.ts index 90e2bf0..8d377ad 100644 --- a/src/models/appapipublicv2functioncallcallfunctionrequest.ts +++ b/src/models/callfunctionrequest.ts @@ -26,7 +26,7 @@ import { TModel$outboundSchema, } from "./tmodel.js"; -export type AppApiPublicV2FunctionCallCallFunctionRequest = { +export type CallFunctionRequest = { /** * Provide a unique name of the task. A function with this name will be created in the project. Functions configuration is overridden by the request parameters. */ @@ -71,32 +71,31 @@ export type AppApiPublicV2FunctionCallCallFunctionRequest = { }; /** @internal */ -export const AppApiPublicV2FunctionCallCallFunctionRequest$inboundSchema: - z.ZodType< - AppApiPublicV2FunctionCallCallFunctionRequest, - z.ZodTypeDef, - unknown - > = z.object({ - name: z.string(), - instructions: z.nullable(z.string()).optional(), - input_schema: z.nullable(z.record(z.any())).optional(), - output_schema: z.nullable(z.record(z.any())).optional(), - input: z.nullable(z.any()).optional(), - model: TModel$inboundSchema.optional(), - examples: z.nullable(z.array(Example$inboundSchema)).optional(), - parent_span_id: z.nullable(z.string()).optional(), - tags: z.nullable(z.record(z.string())).optional(), - configuration: z.nullable(FunctionCallConfigurationInput$inboundSchema) - .optional(), - }).transform((v) => { - return remap$(v, { - "input_schema": "inputSchema", - "output_schema": "outputSchema", - "parent_span_id": "parentSpanId", - }); +export const CallFunctionRequest$inboundSchema: z.ZodType< + CallFunctionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + instructions: z.nullable(z.string()).optional(), + input_schema: z.nullable(z.record(z.any())).optional(), + output_schema: z.nullable(z.record(z.any())).optional(), + input: z.nullable(z.any()).optional(), + model: TModel$inboundSchema.optional(), + examples: z.nullable(z.array(Example$inboundSchema)).optional(), + parent_span_id: z.nullable(z.string()).optional(), + tags: z.nullable(z.record(z.string())).optional(), + configuration: z.nullable(FunctionCallConfigurationInput$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "input_schema": "inputSchema", + "output_schema": "outputSchema", + "parent_span_id": "parentSpanId", }); +}); /** @internal */ -export type AppApiPublicV2FunctionCallCallFunctionRequest$Outbound = { +export type CallFunctionRequest$Outbound = { name: string; instructions?: string | null | undefined; input_schema?: { [k: string]: any } | null | undefined; @@ -110,53 +109,43 @@ export type AppApiPublicV2FunctionCallCallFunctionRequest$Outbound = { }; /** @internal */ -export const AppApiPublicV2FunctionCallCallFunctionRequest$outboundSchema: - z.ZodType< - AppApiPublicV2FunctionCallCallFunctionRequest$Outbound, - z.ZodTypeDef, - AppApiPublicV2FunctionCallCallFunctionRequest - > = z.object({ - name: z.string(), - instructions: z.nullable(z.string()).optional(), - inputSchema: z.nullable(z.record(z.any())).optional(), - outputSchema: z.nullable(z.record(z.any())).optional(), - input: z.nullable(z.any()).optional(), - model: TModel$outboundSchema.optional(), - examples: z.nullable(z.array(Example$outboundSchema)).optional(), - parentSpanId: z.nullable(z.string()).optional(), - tags: z.nullable(z.record(z.string())).optional(), - configuration: z.nullable(FunctionCallConfigurationInput$outboundSchema) - .optional(), - }).transform((v) => { - return remap$(v, { - inputSchema: "input_schema", - outputSchema: "output_schema", - parentSpanId: "parent_span_id", - }); +export const CallFunctionRequest$outboundSchema: z.ZodType< + CallFunctionRequest$Outbound, + z.ZodTypeDef, + CallFunctionRequest +> = z.object({ + name: z.string(), + instructions: z.nullable(z.string()).optional(), + inputSchema: z.nullable(z.record(z.any())).optional(), + outputSchema: z.nullable(z.record(z.any())).optional(), + input: z.nullable(z.any()).optional(), + model: TModel$outboundSchema.optional(), + examples: z.nullable(z.array(Example$outboundSchema)).optional(), + parentSpanId: z.nullable(z.string()).optional(), + tags: z.nullable(z.record(z.string())).optional(), + configuration: z.nullable(FunctionCallConfigurationInput$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + inputSchema: "input_schema", + outputSchema: "output_schema", + parentSpanId: "parent_span_id", }); +}); -export function appApiPublicV2FunctionCallCallFunctionRequestToJSON( - appApiPublicV2FunctionCallCallFunctionRequest: - AppApiPublicV2FunctionCallCallFunctionRequest, +export function callFunctionRequestToJSON( + callFunctionRequest: CallFunctionRequest, ): string { return JSON.stringify( - AppApiPublicV2FunctionCallCallFunctionRequest$outboundSchema.parse( - appApiPublicV2FunctionCallCallFunctionRequest, - ), + CallFunctionRequest$outboundSchema.parse(callFunctionRequest), ); } -export function appApiPublicV2FunctionCallCallFunctionRequestFromJSON( +export function callFunctionRequestFromJSON( jsonString: string, -): SafeParseResult< - AppApiPublicV2FunctionCallCallFunctionRequest, - SDKValidationError -> { +): SafeParseResult { return safeParse( jsonString, - (x) => - AppApiPublicV2FunctionCallCallFunctionRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'AppApiPublicV2FunctionCallCallFunctionRequest' from JSON`, + (x) => CallFunctionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CallFunctionRequest' from JSON`, ); } diff --git a/src/models/appapipublicv2functioncallcallfunctionresponse.ts b/src/models/callfunctionresponse.ts similarity index 57% rename from src/models/appapipublicv2functioncallcallfunctionresponse.ts rename to src/models/callfunctionresponse.ts index ddef5eb..a0e8a95 100644 --- a/src/models/appapipublicv2functioncallcallfunctionresponse.ts +++ b/src/models/callfunctionresponse.ts @@ -13,7 +13,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; */ export type JsonPayload = { [k: string]: any } | Array | any; -export type AppApiPublicV2FunctionCallCallFunctionResponse = { +export type CallFunctionResponse = { /** * The ID of the span of the call */ @@ -74,29 +74,28 @@ export function jsonPayloadFromJSON( } /** @internal */ -export const AppApiPublicV2FunctionCallCallFunctionResponse$inboundSchema: - z.ZodType< - AppApiPublicV2FunctionCallCallFunctionResponse, - z.ZodTypeDef, - unknown - > = z.object({ - span_id: z.string(), - message: z.nullable(z.string()).optional(), - json_payload: z.nullable( - z.union([z.record(z.any()), z.array(z.any()), z.any()]), - ).optional(), - cached: z.nullable(z.boolean()).optional(), - images: z.nullable(z.array(z.string())).optional(), - usage: z.nullable(z.record(z.any())).optional(), - cost: z.nullable(z.record(z.any())).optional(), - }).transform((v) => { - return remap$(v, { - "span_id": "spanId", - "json_payload": "jsonPayload", - }); +export const CallFunctionResponse$inboundSchema: z.ZodType< + CallFunctionResponse, + z.ZodTypeDef, + unknown +> = z.object({ + span_id: z.string(), + message: z.nullable(z.string()).optional(), + json_payload: z.nullable( + z.union([z.record(z.any()), z.array(z.any()), z.any()]), + ).optional(), + cached: z.nullable(z.boolean()).optional(), + images: z.nullable(z.array(z.string())).optional(), + usage: z.nullable(z.record(z.any())).optional(), + cost: z.nullable(z.record(z.any())).optional(), +}).transform((v) => { + return remap$(v, { + "span_id": "spanId", + "json_payload": "jsonPayload", }); +}); /** @internal */ -export type AppApiPublicV2FunctionCallCallFunctionResponse$Outbound = { +export type CallFunctionResponse$Outbound = { span_id: string; message?: string | null | undefined; json_payload?: { [k: string]: any } | Array | any | null | undefined; @@ -107,50 +106,40 @@ export type AppApiPublicV2FunctionCallCallFunctionResponse$Outbound = { }; /** @internal */ -export const AppApiPublicV2FunctionCallCallFunctionResponse$outboundSchema: - z.ZodType< - AppApiPublicV2FunctionCallCallFunctionResponse$Outbound, - z.ZodTypeDef, - AppApiPublicV2FunctionCallCallFunctionResponse - > = z.object({ - spanId: z.string(), - message: z.nullable(z.string()).optional(), - jsonPayload: z.nullable( - z.union([z.record(z.any()), z.array(z.any()), z.any()]), - ).optional(), - cached: z.nullable(z.boolean()).optional(), - images: z.nullable(z.array(z.string())).optional(), - usage: z.nullable(z.record(z.any())).optional(), - cost: z.nullable(z.record(z.any())).optional(), - }).transform((v) => { - return remap$(v, { - spanId: "span_id", - jsonPayload: "json_payload", - }); +export const CallFunctionResponse$outboundSchema: z.ZodType< + CallFunctionResponse$Outbound, + z.ZodTypeDef, + CallFunctionResponse +> = z.object({ + spanId: z.string(), + message: z.nullable(z.string()).optional(), + jsonPayload: z.nullable( + z.union([z.record(z.any()), z.array(z.any()), z.any()]), + ).optional(), + cached: z.nullable(z.boolean()).optional(), + images: z.nullable(z.array(z.string())).optional(), + usage: z.nullable(z.record(z.any())).optional(), + cost: z.nullable(z.record(z.any())).optional(), +}).transform((v) => { + return remap$(v, { + spanId: "span_id", + jsonPayload: "json_payload", }); +}); -export function appApiPublicV2FunctionCallCallFunctionResponseToJSON( - appApiPublicV2FunctionCallCallFunctionResponse: - AppApiPublicV2FunctionCallCallFunctionResponse, +export function callFunctionResponseToJSON( + callFunctionResponse: CallFunctionResponse, ): string { return JSON.stringify( - AppApiPublicV2FunctionCallCallFunctionResponse$outboundSchema.parse( - appApiPublicV2FunctionCallCallFunctionResponse, - ), + CallFunctionResponse$outboundSchema.parse(callFunctionResponse), ); } -export function appApiPublicV2FunctionCallCallFunctionResponseFromJSON( +export function callFunctionResponseFromJSON( jsonString: string, -): SafeParseResult< - AppApiPublicV2FunctionCallCallFunctionResponse, - SDKValidationError -> { +): SafeParseResult { return safeParse( jsonString, - (x) => - AppApiPublicV2FunctionCallCallFunctionResponse$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'AppApiPublicV2FunctionCallCallFunctionResponse' from JSON`, + (x) => CallFunctionResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CallFunctionResponse' from JSON`, ); } diff --git a/src/models/index.ts b/src/models/index.ts index 60b3a6a..daf80d2 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -5,12 +5,12 @@ export * from "./addrequest.js"; export * from "./annotation.js"; export * from "./annotationurlcitation.js"; -export * from "./appapipublicv2functioncallcallfunctionrequest.js"; -export * from "./appapipublicv2functioncallcallfunctionresponse.js"; export * from "./appapipublicv2functionscallfunctionrequest.js"; export * from "./appapipublicv2functionscallfunctionresponse.js"; export * from "./audio.js"; export * from "./bodyuploadfileknowledgeknowledgebaseiduploadpost.js"; +export * from "./callfunctionrequest.js"; +export * from "./callfunctionresponse.js"; export * from "./chatcompletion.js"; export * from "./chatcompletionallowedtoolchoiceparam.js"; export * from "./chatcompletionallowedtoolsparam.js"; diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 92bc740..0e459a3 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -90,9 +90,9 @@ export class Opper extends ClientSDK { * It is a declarative interface with input and output schemas that supports text, image, audio inputs and outputs and is highly model agnostic. */ async call( - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(call( this, request, @@ -174,7 +174,7 @@ export class Opper extends ClientSDK { * ``` */ async stream( - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, ): Promise { return unwrapAsync(stream(