From c94dc770391c1c98b5fbc9fa5be0a0204d67bfea Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 19 Nov 2026 10:43:12 +0000 Subject: [PATCH 1/2] ## Typescript SDK Changes: * `glean.agents.search()`: `response.agents[]` **Changed** * `glean.agents.get()`: `response.agent` **Changed** * `glean.admin.agents.list()`: `response.results[]` **Changed** --- .speakeasy/gen.lock | 394 +++++- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 1152 +++++++++++++++-- .speakeasy/tests.arazzo.yaml | 2 +- .speakeasy/workflow.lock | 10 +- RELEASES.md | 12 +- docs/models/components/agentconfig.md | 2 +- .../{mode.md => agentconfigmode.md} | 6 +- docs/models/components/content.md | 19 + docs/models/components/customisationdata.md | 17 + .../components/insightsoverviewresponse.md | 2 +- docs/models/components/messagesrequest.md | 2 +- ...rection.md => messagesrequestdirection.md} | 6 +- docs/models/components/platformagent.md | 38 +- .../components/platformagentchannels.md | 17 + .../components/platformagentcontenttrigger.md | 24 + .../platformagentcontenttriggerfilter.md | 22 + ...atformagentcontenttriggerfilteroperator.md | 19 + .../components/platformagentdependency.md | 21 + .../components/platformagentdependencytype.md | 19 + .../components/platformagentgetresponse.md | 9 +- .../platformagentgleansearchconfig.md | 20 + .../components/platformagentinputfield.md | 26 + .../platformagentinputfieldoption.md | 19 + .../components/platformagentinputfieldtype.md | 19 + .../components/platformagentllmmodel.md | 19 + .../components/platformagentllmmodelmode.md | 19 + docs/models/components/platformagentprompt.md | 21 + .../components/platformagentschedule.md | 22 + .../components/platformagentselectedtool.md | 19 + .../platformagentservicecredential.md | 19 + docs/models/components/platformagentskill.md | 23 + .../components/platformagentslackchannel.md | 20 + .../platformagentslackchannelmapping.md | 20 + .../models/components/platformagenttoolset.md | 21 + .../models/components/platformagenttrigger.md | 23 + .../components/platformagenttriggertype.md | 19 + .../platformlistadminagentsresponse.md | 7 +- .../platformskillsourcepreviewfile.md | 2 + docs/models/components/platformsubagent.md | 29 + examples/package-lock.json | 2 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/__tests__/messages.test.ts | 2 +- .../handler/pathgetapiagentsagentid.go | 7 +- .../handler/pathpostrestapiv1getchat.go | 6 +- .../sdk/models/components/agentconfig.go | 20 +- .../components/insightsoverviewresponse.go | 2 +- .../sdk/models/components/messagesrequest.go | 20 +- .../sdk/models/components/platformagent.go | 172 ++- .../components/platformagentchannels.go | 17 + .../components/platformagentcontenttrigger.go | 55 + .../platformagentcontenttriggerfilter.go | 35 + ...atformagentcontenttriggerfilteroperator.go | 42 + .../components/platformagentdependency.go | 59 + .../components/platformagentgetresponse.go | 1 + .../platformagentgleansearchconfig.go | 38 + .../components/platformagentinputfield.go | 101 ++ .../platformagentinputfieldoption.go | 17 + .../components/platformagentllmmodel.go | 68 + .../models/components/platformagentprompt.go | 27 + .../components/platformagentschedule.go | 52 + .../components/platformagentselectedtool.go | 17 + .../platformagentservicecredential.go | 17 + .../models/components/platformagentskill.go | 35 + .../components/platformagentslackchannel.go | 44 + .../platformagentslackchannelmapping.go | 26 + .../models/components/platformagenttoolset.go | 49 + .../models/components/platformagenttrigger.go | 102 ++ .../platformskillsourcepreviewfile.go | 1 + .../sdk/models/components/platformsubagent.go | 101 ++ src/__tests__/summarize.test.ts | 4 +- src/lib/config.ts | 4 +- src/models/components/agentconfig.ts | 24 +- src/models/components/index.ts | 19 + .../components/insightsoverviewresponse.ts | 2 +- src/models/components/messagesrequest.ts | 15 +- src/models/components/platformagent.ts | 143 +- .../components/platformagentchannels.ts | 42 + .../components/platformagentcontenttrigger.ts | 66 + .../platformagentcontenttriggerfilter.ts | 52 + ...atformagentcontenttriggerfilteroperator.ts | 43 + .../components/platformagentdependency.ts | 74 ++ .../components/platformagentgetresponse.ts | 3 + .../platformagentgleansearchconfig.ts | 56 + .../components/platformagentinputfield.ts | 108 ++ .../platformagentinputfieldoption.ts | 38 + .../components/platformagentllmmodel.ts | 79 ++ src/models/components/platformagentprompt.ts | 45 + .../components/platformagentschedule.ts | 51 + .../components/platformagentselectedtool.ts | 38 + .../platformagentservicecredential.ts | 38 + src/models/components/platformagentskill.ts | 54 + .../components/platformagentslackchannel.ts | 58 + .../platformagentslackchannelmapping.ts | 43 + src/models/components/platformagenttoolset.ts | 83 ++ src/models/components/platformagenttrigger.ts | 135 ++ .../platformskillsourcepreviewfile.ts | 3 + src/models/components/platformsubagent.ts | 116 ++ 100 files changed, 4495 insertions(+), 246 deletions(-) rename docs/models/components/{mode.md => agentconfigmode.md} (62%) create mode 100644 docs/models/components/content.md create mode 100644 docs/models/components/customisationdata.md rename docs/models/components/{direction.md => messagesrequestdirection.md} (59%) create mode 100644 docs/models/components/platformagentchannels.md create mode 100644 docs/models/components/platformagentcontenttrigger.md create mode 100644 docs/models/components/platformagentcontenttriggerfilter.md create mode 100644 docs/models/components/platformagentcontenttriggerfilteroperator.md create mode 100644 docs/models/components/platformagentdependency.md create mode 100644 docs/models/components/platformagentdependencytype.md create mode 100644 docs/models/components/platformagentgleansearchconfig.md create mode 100644 docs/models/components/platformagentinputfield.md create mode 100644 docs/models/components/platformagentinputfieldoption.md create mode 100644 docs/models/components/platformagentinputfieldtype.md create mode 100644 docs/models/components/platformagentllmmodel.md create mode 100644 docs/models/components/platformagentllmmodelmode.md create mode 100644 docs/models/components/platformagentprompt.md create mode 100644 docs/models/components/platformagentschedule.md create mode 100644 docs/models/components/platformagentselectedtool.md create mode 100644 docs/models/components/platformagentservicecredential.md create mode 100644 docs/models/components/platformagentskill.md create mode 100644 docs/models/components/platformagentslackchannel.md create mode 100644 docs/models/components/platformagentslackchannelmapping.md create mode 100644 docs/models/components/platformagenttoolset.md create mode 100644 docs/models/components/platformagenttrigger.md create mode 100644 docs/models/components/platformagenttriggertype.md create mode 100644 docs/models/components/platformsubagent.md create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentchannels.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttrigger.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilter.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilteroperator.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentdependency.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentgleansearchconfig.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentinputfield.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentinputfieldoption.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentllmmodel.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentprompt.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentschedule.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentselectedtool.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentservicecredential.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentskill.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentslackchannel.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentslackchannelmapping.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagenttoolset.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagenttrigger.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformsubagent.go create mode 100644 src/models/components/platformagentchannels.ts create mode 100644 src/models/components/platformagentcontenttrigger.ts create mode 100644 src/models/components/platformagentcontenttriggerfilter.ts create mode 100644 src/models/components/platformagentcontenttriggerfilteroperator.ts create mode 100644 src/models/components/platformagentdependency.ts create mode 100644 src/models/components/platformagentgleansearchconfig.ts create mode 100644 src/models/components/platformagentinputfield.ts create mode 100644 src/models/components/platformagentinputfieldoption.ts create mode 100644 src/models/components/platformagentllmmodel.ts create mode 100644 src/models/components/platformagentprompt.ts create mode 100644 src/models/components/platformagentschedule.ts create mode 100644 src/models/components/platformagentselectedtool.ts create mode 100644 src/models/components/platformagentservicecredential.ts create mode 100644 src/models/components/platformagentskill.ts create mode 100644 src/models/components/platformagentslackchannel.ts create mode 100644 src/models/components/platformagentslackchannelmapping.ts create mode 100644 src/models/components/platformagenttoolset.ts create mode 100644 src/models/components/platformagenttrigger.ts create mode 100644 src/models/components/platformsubagent.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 57fc6e351..3065dfe2f 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 664aaca5-a41f-4434-8f2a-642dba92fe68 management: - docChecksum: b5e6aaf09569e076c7321d15cf12c515 + docChecksum: 4bb1c752f9e3a56aa7b9a22b1afd798a docVersion: 0.9.0 speakeasyVersion: 1.810.0 generationVersion: 2.961.1 - releaseVersion: 0.20.25 - configChecksum: 08e8962bfef820a2365a0caaf92dbfd6 + releaseVersion: 0.20.26 + configChecksum: 220b308714190872a1ddb38cb3895b4b repoURL: https://github.com/gleanwork/api-client-typescript.git installationURL: https://github.com/gleanwork/api-client-typescript published: true persistentEdits: - generation_id: 1ecfd04f-7299-4e9b-a27e-5bc110672613 - pristine_commit_hash: 46a83c7679ec4f4308997d5cff1a59a02e7b6d4f - pristine_tree_hash: eba423e4682dafa8cf99ed7212ee6a46efcf191c + generation_id: 84e96a2d-5107-4051-a1d6-3ed4578ef1f9 + pristine_commit_hash: ad3489e2ae00cadd8cca844680f1923f01de3c10 + pristine_tree_hash: c2499406a1b944a6e38bd0212a845941d5598e8d features: typescript: acceptHeaders: 2.81.2 @@ -171,8 +171,12 @@ trackedFiles: pristine_git_object: 4fd4669f9a5b9e8567bb46bb0795b6ac9e642d78 docs/models/components/agentconfig.md: id: 27416a525e98 - last_write_checksum: sha1:8622d4a67e39a95a1b919b8932ec9336725a9e06 - pristine_git_object: 0469415b443b20b3ce74484c99aae45a5eb191d6 + last_write_checksum: sha1:7c6c60a51d39695f59de31cfa816b4db691439a0 + pristine_git_object: 5f479e7fba89cd7f5bb6e33d2d91d0fe0da13537 + docs/models/components/agentconfigmode.md: + id: a0d7d8dbe8d8 + last_write_checksum: sha1:b2ec504ed48d91849dd22fee06471879d392ea8d + pristine_git_object: d7ce7b44440a37d3a5d79a4e96794f460ae05be7 docs/models/components/agentenum.md: id: 6e164020cfe3 last_write_checksum: sha1:7b3b8a5006f8f220f4fd2d05a6a7557ebe2aff62 @@ -669,6 +673,10 @@ trackedFiles: id: 4114dd6af998 last_write_checksum: sha1:7120b9dfa5441a3ac4ff0e5d2bb7517ff58944fc pristine_git_object: 3713fe84f255df5c8943680087d34de3c05e1d13 + docs/models/components/content.md: + id: 171de262e3cc + last_write_checksum: sha1:e1f1830c6aacd25bb9971310166a85556ac49862 + pristine_git_object: efda7ac504dbcebcef8fb9947e92b84e25c38458 docs/models/components/contentdefinition.md: id: f571764e76ee last_write_checksum: sha1:b0bb34feef7c7b925cc61fc05559a13991843625 @@ -777,6 +785,10 @@ trackedFiles: id: 3d1ca6d0168a last_write_checksum: sha1:e3d235fe2eefa498ee42e132a4bfcb00b66c4897 pristine_git_object: db7b788672a7e2937f5cbc83ff21aa00f53423eb + docs/models/components/customisationdata.md: + id: d434eb5a0b3f + last_write_checksum: sha1:b765a0fcd41beaaa753667370d154a0d1c7dedfd + pristine_git_object: e5aece5cc1899287653d8df58af8aed71b3fd1a1 docs/models/components/custommetadatapropertydefinition.md: id: 3540950fb0e2 last_write_checksum: sha1:ea261639db1b06cdf4c7291e574b7ac8ee09efe3 @@ -993,10 +1005,6 @@ trackedFiles: id: c502559585dc last_write_checksum: sha1:2014a014f3419d42179a9fd21a200226d8f5bdba pristine_git_object: 30c8ea6ea8461bfce181b9e9a5f95dda997cb9f5 - docs/models/components/direction.md: - id: 184efcdcbc2f - last_write_checksum: sha1:5cd393b7d0dff85367c06c71131b8e8e19195f6d - pristine_git_object: 45379f4d204a0b9fa621d4912e5fa63505cb4c10 docs/models/components/disambiguation.md: id: c541b25a8973 last_write_checksum: sha1:ab120ec832dbc40f5ad8bde30370f0d7d6721c4a @@ -1647,8 +1655,8 @@ trackedFiles: pristine_git_object: 46e1535e7634f97634159ce6123be0d9f5801598 docs/models/components/insightsoverviewresponse.md: id: e490ed19892d - last_write_checksum: sha1:1575e88e91e97011ee9851bf67271dfcad6d0140 - pristine_git_object: fb35094a60b32980704431fce7dbe2ac8e3d5312 + last_write_checksum: sha1:8108ce93eabe1726f7c30c5cb223015a68dcb9c4 + pristine_git_object: 16302a7560da6121e2c093f4d181dc2eedd0a0b6 docs/models/components/insightsrequest.md: id: cf96ae543699 last_write_checksum: sha1:7b0b54a539ee4f5acede497dfad48889b8d60bb4 @@ -1835,8 +1843,12 @@ trackedFiles: pristine_git_object: 840729f4a47b9e3d9490026d224fe16f60d3ccf8 docs/models/components/messagesrequest.md: id: e568fd3ac212 - last_write_checksum: sha1:4cfebbfbb0a4d202772efb0e3957243e7df26004 - pristine_git_object: fc03375d6e29319854d4fecf9da1d2f04398e83b + last_write_checksum: sha1:cd298fee6a75457d797f2eff6508747a67ed03bf + pristine_git_object: 1e7c345e22a18a09e7d97b16e6f7c3dd8d42d85c + docs/models/components/messagesrequestdirection.md: + id: 1f2ddc9739ec + last_write_checksum: sha1:028fb98aa3199f278059d4564dbe3469d7c8629e + pristine_git_object: 62c35ce568d8e6b0c2e4a43dd202b99951cadb3d docs/models/components/messagesresponse.md: id: 8e8d535e494a last_write_checksum: sha1:8a4e78a241d1523d0cd2e4089e0b60410ef0ff16 @@ -1853,10 +1865,6 @@ trackedFiles: id: a794af33d840 last_write_checksum: sha1:2da2d26d02f21acd94018516db66225283d955c8 pristine_git_object: 9b14efa9867e535341431b339119bbee116c32a6 - docs/models/components/mode.md: - id: ecad6afdf106 - last_write_checksum: sha1:0e82cae4018c15c80686e7d35f261eabb79c35f2 - pristine_git_object: 29bccd3be95ae4c1c78f04e268a3ddf5cf048550 docs/models/components/objectdefinition.md: id: 62ae4ce20229 last_write_checksum: sha1:678d7a3bc5d3d162f3a274bd5a617ba13e4c114d @@ -1983,20 +1991,72 @@ trackedFiles: pristine_git_object: 45e29825f1b0f85f0902abccffd1bee8668638b6 docs/models/components/platformagent.md: id: cfc6f19bfa42 - last_write_checksum: sha1:8e1d63e2509a943025b4485faf691adc3c6bbf91 - pristine_git_object: 4964c59114e0cf74d7b729cab4596c40808de15d + last_write_checksum: sha1:fc85d19ddedc07545a33f9684643cd1238582e56 + pristine_git_object: 9a2dd99f46a2bdf04a9f15a1880500a9bbebf40c docs/models/components/platformagentcapabilities.md: id: 5589f386e676 last_write_checksum: sha1:04ce7870aa870604f625cb507bb120bf09220fe9 pristine_git_object: db5ccfe2f50a8f9e0ca943db840f82a56ccb4d3b + docs/models/components/platformagentchannels.md: + id: 2a4a7fde476d + last_write_checksum: sha1:cbfa3d63d9c02a110730c3c585079abe1f777dc5 + pristine_git_object: 2ecc0ab0fb4a8ec5f955ca0bc4516c67b99d4d5b + docs/models/components/platformagentcontenttrigger.md: + id: fe8db30d1071 + last_write_checksum: sha1:761b9508cb76a02ca96cfb28f8e8817507e827db + pristine_git_object: 95b0f3a67cb9cd0be85e53c244f868af36777cd3 + docs/models/components/platformagentcontenttriggerfilter.md: + id: 309d244e59a0 + last_write_checksum: sha1:2ff67185b48d58b692361be188b6d806e1c7c2f2 + pristine_git_object: 7935fe3de9f87e874d5cb37de5a5e84318fdbe00 + docs/models/components/platformagentcontenttriggerfilteroperator.md: + id: e21f0261c210 + last_write_checksum: sha1:a9f733b0c2cf6dd61484c9e238ca1231f07a8c8b + pristine_git_object: 29cf76a9c9b5018c364cc61f6e166aff47c1928e + docs/models/components/platformagentdependency.md: + id: 4dd8582bc040 + last_write_checksum: sha1:006bfcfb9b4966473f5915602149db278994b27f + pristine_git_object: 712f900b638e7188c49f3ad34b164fb849984fd5 + docs/models/components/platformagentdependencytype.md: + id: c061885ff2d0 + last_write_checksum: sha1:4af2abc3b3bee2330a6fa81c2d7f258f7fe2a56f + pristine_git_object: f5c3f232ab6588d31e4d3328b0b42094b6f6e666 docs/models/components/platformagentexecutionstatus.md: id: 2a01e25cee85 last_write_checksum: sha1:66022e55c2d1882ac726609ac75fc615ead029fc pristine_git_object: e609997422bb115ffbbc4c29fee7a0e83a393aa4 docs/models/components/platformagentgetresponse.md: id: 17095cf4b554 - last_write_checksum: sha1:f1b7af0535430d6dd0889482fdb5a411fe4051c8 - pristine_git_object: 3bf9df7ffcf8dcc03a2ce066342225118fb55530 + last_write_checksum: sha1:a58748c1fba189825bf189dc0891aaeb868d8ab5 + pristine_git_object: ce9b8c57daabfd49b5733e3a4faba2f099e23c7a + docs/models/components/platformagentgleansearchconfig.md: + id: f959f1c6f622 + last_write_checksum: sha1:da6a3bd412b30dd91d521137119e4d2af3e406b1 + pristine_git_object: a822ce4024b7f1fdf619b3ab5b9c476eb25ec4c6 + docs/models/components/platformagentinputfield.md: + id: f722f77951c5 + last_write_checksum: sha1:2e97ce6842761abb3644d3616876bfe646c068f1 + pristine_git_object: 2daa6fd4a7a3afabc1382747a36888203f1c6ac7 + docs/models/components/platformagentinputfieldoption.md: + id: 9a0aca1f5dd9 + last_write_checksum: sha1:115f61539eeb144e25e80b46aeaaf890fbe2c467 + pristine_git_object: 0aaa25f732776af730a97a31e314f596e5ac3251 + docs/models/components/platformagentinputfieldtype.md: + id: 46db7af0491c + last_write_checksum: sha1:f1a81724f7e8a5a4a1d9b57ddfd778914829b0ec + pristine_git_object: 218e63544170186788e3f74c11d7267b9768d336 + docs/models/components/platformagentllmmodel.md: + id: 0a3f6f854dd4 + last_write_checksum: sha1:c3e2453678fcb8762eef86e9efea63e6ad7031ce + pristine_git_object: 7bf80f831b01d75f00eaf45dbbff52109272e1bc + docs/models/components/platformagentllmmodelmode.md: + id: 4484d7f78f0c + last_write_checksum: sha1:f5f518c0749503acd59c272bcfce7f1727a0350c + pristine_git_object: e2f7c3280430985f170b4cee40f8124b8be3e87f + docs/models/components/platformagentprompt.md: + id: c91576f2361e + last_write_checksum: sha1:2857f5f81fd4384c704cc7852d21133a26bfb750 + pristine_git_object: 51bd9ba17aa7f88e59e5fbbeffcde4a57aa3fede docs/models/components/platformagentrun.md: id: 2623b503a857 last_write_checksum: sha1:970511c8b71fe88ba0d20a67e86be4d306438ea2 @@ -2041,10 +2101,34 @@ trackedFiles: id: 5a1e78680e6a last_write_checksum: sha1:1e06fbea33a12fa4c471d42869c6d3d14c83caad pristine_git_object: b0128f9bd1d19c9c9838993f6414ffb2d3b1163c + docs/models/components/platformagentschedule.md: + id: 3bdee62cc258 + last_write_checksum: sha1:2798aa0a8e7173ab869adb7c4e2b6fc2ddd0f5c4 + pristine_git_object: 13e78f2c8c6edce79222795ea6807f36c291a21e docs/models/components/platformagentschemasresponse.md: id: ffe202d90c33 last_write_checksum: sha1:a7c73287b2c8f542036432a225a2d0352df37c9d pristine_git_object: 54b821107095388ab62ddd6b9bde91e5b9033b28 + docs/models/components/platformagentselectedtool.md: + id: 72d6605bab35 + last_write_checksum: sha1:2f07b37c034f0d37a0f469b40495faaa30bb810b + pristine_git_object: 502a72d6f46a6b52586fd0c3adcf7af059556eee + docs/models/components/platformagentservicecredential.md: + id: a08e46b75d96 + last_write_checksum: sha1:d1f38ab5a2b85d9176ea1156d98576e141a8ad54 + pristine_git_object: ef0cc25477d724387388da71bcb65813708ac5bb + docs/models/components/platformagentskill.md: + id: 177c0ecdce5b + last_write_checksum: sha1:d962616e8b64c8f51620d233a324501a544aba3a + pristine_git_object: 2233d8f478851dbd5794792740d1282cc90831d4 + docs/models/components/platformagentslackchannel.md: + id: 98375df17399 + last_write_checksum: sha1:ba299e9063c2fcee3a26206a2f8f803fd054b91e + pristine_git_object: 948ae1bbab46faa0a6dcc90c6bac037b891062ea + docs/models/components/platformagentslackchannelmapping.md: + id: 78c96155cf9d + last_write_checksum: sha1:daee7fa74ca747dc507d0fff21b75036e831152f + pristine_git_object: 226dc173c44ea49a1bb1be1a5974db7915c9c669 docs/models/components/platformagentssearchrequest.md: id: 8be0757e3290 last_write_checksum: sha1:b6361198a8d77ca846bd8bbecbc1e6251db5d8a7 @@ -2053,6 +2137,18 @@ trackedFiles: id: 80dc362d4880 last_write_checksum: sha1:ac9de6625eb35cda5665ae4fb4714e51541d3ecb pristine_git_object: bdb37b0b0e8a2f00a9fc1456d236bdcfdd4ee12f + docs/models/components/platformagenttoolset.md: + id: ccbd00960c90 + last_write_checksum: sha1:90f7ffa6cc9b6a2b8d8da59b411d344ce8bb4a29 + pristine_git_object: e3e64c0628f5546c5fc8d11a2b1693f6a87b9407 + docs/models/components/platformagenttrigger.md: + id: a2ea68e1ab30 + last_write_checksum: sha1:4b5fe43fd8e454d93288a82dd2b7abf7ede47981 + pristine_git_object: 81e7c65b1c1005d6eb8602be8f82bdd509c306a9 + docs/models/components/platformagenttriggertype.md: + id: b067596fa1e9 + last_write_checksum: sha1:aa9a10ab908dd39918586e6e64f750dfa3f46369 + pristine_git_object: 96ec93c9d09e4d40919310560ccac7f32448c2f1 docs/models/components/platformauthenticationsuggestion.md: id: 601a727ded23 last_write_checksum: sha1:d6613e467b78f594970c7362828a19273c34a860 @@ -2371,8 +2467,8 @@ trackedFiles: pristine_git_object: 9e0f8026fcddc05b9334be2e0c54bb17bf2b0042 docs/models/components/platformlistadminagentsresponse.md: id: 4be45e1b869b - last_write_checksum: sha1:0153b1373706ccabf7ac667564ebffe8c5dd4bcc - pristine_git_object: 111d27831b9c11b34cee009f8be85ecaf6fa8be4 + last_write_checksum: sha1:e035802c451692b7e55592ceee6d549b3d78377a + pristine_git_object: 614b3da87d5822d9f6552fbe218e748b3bd7e692 docs/models/components/platformlistdepartmentsresponse.md: id: 66b99e1c4244 last_write_checksum: sha1:1483af072fce0d9db7f2d84f533f7aeffdf78f4e @@ -2531,8 +2627,8 @@ trackedFiles: pristine_git_object: 38c3bb3ed56dd852afaa68ccc2bc2b571df55443 docs/models/components/platformskillsourcepreviewfile.md: id: 1b1d78e3ecce - last_write_checksum: sha1:1d77ef95821f87f2254f5a1d4a46d9181d8743f7 - pristine_git_object: 7a0ec949d69951dfc2bd73fce235bb3e36ca16f1 + last_write_checksum: sha1:5ba7a44949ffe2924d0c897bde3b89f488cec531 + pristine_git_object: 350300dd2ebd4fd665e779aca014c0928d6942fc docs/models/components/platformskillsourcepreviewresponse.md: id: c042e21aa523 last_write_checksum: sha1:1dce6fdf671bf993f9409706587f3ee4cb520ea3 @@ -2673,6 +2769,10 @@ trackedFiles: id: 4eb8de7042ef last_write_checksum: sha1:2229ae5ea155b7be40360df7b0d3fcd8d9fad70c pristine_git_object: 4d46ab83ba7f6f9bb28db8e2534b9b27ba36d5ee + docs/models/components/platformsubagent.md: + id: 3c500f2ada2f + last_write_checksum: sha1:f3b5bac900dbe8df396406f331e2e0b86d718978 + pristine_git_object: 24fc49b87667a4c0cdc69123f1fae4c838da5842 docs/models/components/platformtimerange.md: id: d2e589bb488c last_write_checksum: sha1:b16b0fb45a16cafd4942fc70075e8ba92d0b9386 @@ -4315,12 +4415,12 @@ trackedFiles: pristine_git_object: 5a2797590d4be351d62915017d5b2a0f853537c8 jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:7672139b5f00e1d069467814dc693809d4e75552 - pristine_git_object: d506de751f0fb4a2dbfdd5b88f5816b7071f47b3 + last_write_checksum: sha1:535b15781ea8408646f7c2d159ec112d8ecaa777 + pristine_git_object: e4a5c02b2209bceca787faaa508c9cf4a9b779dc package.json: id: 7030d0b2f71b - last_write_checksum: sha1:11b1d1296ee142ac23ddcc73312ccf9e9b142bb2 - pristine_git_object: fdad49ed6072c03e32346c2d99549e17717f1e40 + last_write_checksum: sha1:3fe3fac7b7954e665f4e6948846e6550d2354a97 + pristine_git_object: 192c4ca031b633ab7ed160f5168958157023da23 src/__tests__/activities.test.ts: id: 65fa859b8f59 last_write_checksum: sha1:756bc40095f4495bbf62739b8218bb4a559a24f2 @@ -4455,8 +4555,8 @@ trackedFiles: pristine_git_object: d252821b825c62856886e3ab9287181d7ef7f9de src/__tests__/messages.test.ts: id: 39e293f09219 - last_write_checksum: sha1:c78b09c09e64da0655a3e0ecbadabe82980ef7d1 - pristine_git_object: f390543460d7bd3c678c17579e755b9e06faac16 + last_write_checksum: sha1:d71d67d8ed6743e623401b4101f70705c2eb5172 + pristine_git_object: a4785e3180745bef1ba299e2191e9c49bec1da88 src/__tests__/mockserver/.gitignore: id: 4a7fc421b6b6 last_write_checksum: sha1:228e1b05712a973948fd771323a2140a3b355ff4 @@ -4543,8 +4643,8 @@ trackedFiles: pristine_git_object: 780582e3aa9e08e0454c7b41c14fd01895f2939d src/__tests__/mockserver/internal/handler/pathgetapiagentsagentid.go: id: cb3e9dff49b4 - last_write_checksum: sha1:47dc233b6278547f5eaf1352daf99b6e546a0348 - pristine_git_object: 3e63328587f0a6513d83e949148e330a4f621bf4 + last_write_checksum: sha1:0354fa223ed664b493be385e9a4656b50c434768 + pristine_git_object: bc7488be179fbe0a36fd192475e508158ec1f362 src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidrunsrunid.go: id: b6f113ba98ea last_write_checksum: sha1:684058e2116df6d2711f6d91b1f552757747cf9a @@ -5007,8 +5107,8 @@ trackedFiles: pristine_git_object: 2e612d4143e02dd5e90750945b781302230969b3 src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchat.go: id: 4a9c64bf3a68 - last_write_checksum: sha1:2766e6a943d9c18dc4d8a7f9e3bc7122a76bde0c - pristine_git_object: e2243868c4ccfbb9c80e49f9ca99c92735f4978f + last_write_checksum: sha1:40b2c4bb7181fa072a9bc4e210e459b9bfb9ede5 + pristine_git_object: 85c74eb185f534784d37e753c7b807e0ed3ac0d6 src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchatapplication.go: id: 069e6f3638f9 last_write_checksum: sha1:fe7b6e94356f030628f826fdaa494f1f87bcba8a @@ -5227,8 +5327,8 @@ trackedFiles: pristine_git_object: 26db87b6ce41dd3da02a61b40780ed9e95b8c5a7 src/__tests__/mockserver/internal/sdk/models/components/agentconfig.go: id: 2e476854d408 - last_write_checksum: sha1:28196a771a0e77871ee769e8fa442ea38f8c310e - pristine_git_object: 49fee887cd6394b575e9fba289eeb95ea1321968 + last_write_checksum: sha1:c01ee792b95aef6d358ce3f173691ef0341c32e6 + pristine_git_object: ae655bc1a2bb2594742940512de7781b2c72d0cc src/__tests__/mockserver/internal/sdk/models/components/agentexecutionstatus.go: id: bde2ec3533f9 last_write_checksum: sha1:05cac4a152d5f481328fa821107dacb932da21e2 @@ -6387,8 +6487,8 @@ trackedFiles: pristine_git_object: 1268193cfb830edd13e92263f799e8ea6d8c8bcb src/__tests__/mockserver/internal/sdk/models/components/insightsoverviewresponse.go: id: 020be168c9a9 - last_write_checksum: sha1:87871c6e14a88fd11fe7ef45865bc04f19668318 - pristine_git_object: c4aa4a9a60ffad3cb124492a7f98bc5744b30c08 + last_write_checksum: sha1:0d92d007086cea72bf3c6627c640cd9d18b5d921 + pristine_git_object: 70daa2ecb5a88d7d1a8c9ac9bedaa116c6f29e6c src/__tests__/mockserver/internal/sdk/models/components/insightsrequest.go: id: bcad59832cc7 last_write_checksum: sha1:64f4f999676830754e7917fe95bb730f6b1b064a @@ -6523,8 +6623,8 @@ trackedFiles: pristine_git_object: 492d23106185d20b31696d26ca46fbdebb787651 src/__tests__/mockserver/internal/sdk/models/components/messagesrequest.go: id: c03849a9fcac - last_write_checksum: sha1:334dab0b189a3f04c86659c295340fa54db731d0 - pristine_git_object: 856590e1c268671d299dbfa0a20545f363b13bde + last_write_checksum: sha1:bba355245f81f654dd5d500dce507430865aea0c + pristine_git_object: 6c6d497ee56e50780df55ccb9a0cf7b13fc09b8f src/__tests__/mockserver/internal/sdk/models/components/messagesresponse.go: id: 15fe454eca21 last_write_checksum: sha1:6510a45bd03987ef5b3cc8aaf791f3b362a6f788 @@ -6619,20 +6719,60 @@ trackedFiles: pristine_git_object: e02ca02d78e0987e979ffc7ee8e680c2853df357 src/__tests__/mockserver/internal/sdk/models/components/platformagent.go: id: 295e6fdc8185 - last_write_checksum: sha1:6e79108103c356bdb3ec8dd103d5bec5063712c8 - pristine_git_object: e81931eb8a00b057118419a8303308c672794f50 + last_write_checksum: sha1:febb835176179597dde557ec93114d6bb7521803 + pristine_git_object: ea2339fc379ccfed2e0fd6f50222ca7800f92123 src/__tests__/mockserver/internal/sdk/models/components/platformagentcapabilities.go: id: d7953f8005cd last_write_checksum: sha1:cacb5a3e7ff63c8b3068cbd641122271b1f02272 pristine_git_object: 62a24950faaf53b38e72d07fbeaff5e4436ec4f7 + src/__tests__/mockserver/internal/sdk/models/components/platformagentchannels.go: + id: 561f6b58901b + last_write_checksum: sha1:2310a064d20dd14f77fe599e1d72a762da14afdd + pristine_git_object: 5668fad91a1e49857e3efb66d796792ae01df080 + src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttrigger.go: + id: 0a6221a0d57c + last_write_checksum: sha1:7b568a9b4156c42e4e8f58716140c24eb5b8c5f8 + pristine_git_object: e204cb0a546e93fcc5bc7714722c445056e19bd5 + src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilter.go: + id: b9b22350db77 + last_write_checksum: sha1:a1b3564897487575f11019838750f6277abe5739 + pristine_git_object: 6bc96126c3f553e1f8d70b54af9c211705b5ed10 + src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilteroperator.go: + id: b89baf290fda + last_write_checksum: sha1:17086c86ac76c368ca894f2b77ff6b16cea514b2 + pristine_git_object: 75bf076b47b5ec5c740447cc170a205a731560a0 + src/__tests__/mockserver/internal/sdk/models/components/platformagentdependency.go: + id: 0f1c0846aee2 + last_write_checksum: sha1:e1df96b28f3c073dfeecf7d54f63bb0aa0f37ac6 + pristine_git_object: 465bf89d56b7fe1f5f500b0f694bbef074a4b7ca src/__tests__/mockserver/internal/sdk/models/components/platformagentexecutionstatus.go: id: 427ee3a8d44d last_write_checksum: sha1:55bc834f436f45c6ca43838d98fc23a08ff0f3ca pristine_git_object: c32ab5e6215218818bcc574025dc2643684fa34a src/__tests__/mockserver/internal/sdk/models/components/platformagentgetresponse.go: id: a2106a7f5d0d - last_write_checksum: sha1:f91d3ae2d0196cc64015c92986ead2c9827f4735 - pristine_git_object: 5b67366587d737fe54801ccca768b69a9d5d07ce + last_write_checksum: sha1:c2869dd6bbe8efaf482a768ef9dcba15a84bec28 + pristine_git_object: 0bda6da05b529bb4c5761576cbe3eac0e05f987d + src/__tests__/mockserver/internal/sdk/models/components/platformagentgleansearchconfig.go: + id: d204c67d7f0a + last_write_checksum: sha1:ea6b4393a2e83b8ec4d9ecf8dd35baf40711ef36 + pristine_git_object: 8bf2303e13b86550436cb69d5f503f199fc0af90 + src/__tests__/mockserver/internal/sdk/models/components/platformagentinputfield.go: + id: 298b7ad613d0 + last_write_checksum: sha1:ecd9508f1b6c9db19fd1e4299d96edf80e40168b + pristine_git_object: f69b9616337272cb9898f271b0d33a16fb640a80 + src/__tests__/mockserver/internal/sdk/models/components/platformagentinputfieldoption.go: + id: dc755e97b0a0 + last_write_checksum: sha1:6484ada3d146c8e4dcbbdb44d2eac840ed248232 + pristine_git_object: 35696f7ea83610da96590e6353e78d4117c12ffb + src/__tests__/mockserver/internal/sdk/models/components/platformagentllmmodel.go: + id: f45719bfd8e8 + last_write_checksum: sha1:f91d449da49a2bf7e7f93f3c88ab08e8e269f27c + pristine_git_object: 4dae99b1d5e268fd49f55c88989983f3bf3f6424 + src/__tests__/mockserver/internal/sdk/models/components/platformagentprompt.go: + id: 8dbbaece194c + last_write_checksum: sha1:06e288fbf61dd83ca52bd7c17abd40bd8dc2245e + pristine_git_object: 565327bbcd88727c5c24b8b747a97f58441e0448 src/__tests__/mockserver/internal/sdk/models/components/platformagentrun.go: id: bb2d9f675f4a last_write_checksum: sha1:77e6650613602883baf6a1b3832e397f59508c36 @@ -6673,10 +6813,34 @@ trackedFiles: id: 949626f75f93 last_write_checksum: sha1:239b3f36488b7d9f367cc23a149bd723bebec529 pristine_git_object: cc33b46f2e1d3135322ee8397d8ff1143f1130d3 + src/__tests__/mockserver/internal/sdk/models/components/platformagentschedule.go: + id: bad3e930982d + last_write_checksum: sha1:01193873b980905136a7d60dee9af438c042aef8 + pristine_git_object: 8c1de389efa2b30d373cfb67703c5ffeccc992d9 src/__tests__/mockserver/internal/sdk/models/components/platformagentschemasresponse.go: id: 32d47ed99b91 last_write_checksum: sha1:a22ae1e737aef2ac0f4d5c86355cc0cb341aef7a pristine_git_object: 4e2519ce3eb1af4c1e98369553d24c07ae059963 + src/__tests__/mockserver/internal/sdk/models/components/platformagentselectedtool.go: + id: 79ebba8d16d2 + last_write_checksum: sha1:697b293bf6b5aa1c57a2e456744843ea55942f08 + pristine_git_object: 662a5ce289fc8601f318151d51585f66c2717db4 + src/__tests__/mockserver/internal/sdk/models/components/platformagentservicecredential.go: + id: c5cce25aab58 + last_write_checksum: sha1:7992113db6c602d55fff0f663ce0b822ba489863 + pristine_git_object: a5be5aca2292545e9d58133d8f9b4b7b608b9ba7 + src/__tests__/mockserver/internal/sdk/models/components/platformagentskill.go: + id: 1a227b06b9f1 + last_write_checksum: sha1:a98f8a44c80908b7f96c03b0025aedb0db98f197 + pristine_git_object: 8aa14ce79104e86f67dfc93fbb38fa209a347fc4 + src/__tests__/mockserver/internal/sdk/models/components/platformagentslackchannel.go: + id: a1e54f251440 + last_write_checksum: sha1:feaf8feed84f0e9bf8c6d1c4dbf9a4c04dd751fc + pristine_git_object: cb9491251cc812fe4f215c9953ab8560f4e16979 + src/__tests__/mockserver/internal/sdk/models/components/platformagentslackchannelmapping.go: + id: 082dfbab916e + last_write_checksum: sha1:1a8b4d7869cb54c7fdcea53af0620bddaad4e7ef + pristine_git_object: f80575bf970f15122a6646372ad5a3338be5e2d1 src/__tests__/mockserver/internal/sdk/models/components/platformagentssearchrequest.go: id: 2ce2663e75bc last_write_checksum: sha1:ecbd66b2931482e539758a95f7e708b1e4f2bc59 @@ -6685,6 +6849,14 @@ trackedFiles: id: 9c7f20c6f3c5 last_write_checksum: sha1:f9597b52061dd4a7974523162383b14c6b14610e pristine_git_object: 233e621c689eef6d95a9dfd06f6c0c2ee05a8adf + src/__tests__/mockserver/internal/sdk/models/components/platformagenttoolset.go: + id: 0473b35a380a + last_write_checksum: sha1:a380d0bc22b4361348014a3c8305a94768d35b31 + pristine_git_object: 34a083e19aac89b095d959f049559654b19da22c + src/__tests__/mockserver/internal/sdk/models/components/platformagenttrigger.go: + id: 55cf237dce20 + last_write_checksum: sha1:94745f02378c3d7bc0bc2eebaeba374601cf84cc + pristine_git_object: 18d9ba2e73fbdc6f97945acbb5d59c7e917a6ddd src/__tests__/mockserver/internal/sdk/models/components/platformauthenticationsuggestion.go: id: 75dd283c70f9 last_write_checksum: sha1:57284113b9a9e80f8233e456ad4514923a2591a9 @@ -7067,8 +7239,8 @@ trackedFiles: pristine_git_object: 9f834ad3da1c3a4f8a51189b464d4c33bd255af7 src/__tests__/mockserver/internal/sdk/models/components/platformskillsourcepreviewfile.go: id: 27e43bc64103 - last_write_checksum: sha1:91afd70b0be3636e723331c096152b695825ca13 - pristine_git_object: 18a28adb31ebcfb7349d38d2992ecf0ff9198185 + last_write_checksum: sha1:e66e0e5f7d8ae1a9a6a2d81a3235525462ebfd36 + pristine_git_object: 6f84aeb0ce0b077521e5e16cbdd692fca7a0fb40 src/__tests__/mockserver/internal/sdk/models/components/platformskillsourcepreviewresponse.go: id: 14a375f5948d last_write_checksum: sha1:74a0379317b24ef55f6897d4ad2214529604e169 @@ -7181,6 +7353,10 @@ trackedFiles: id: d2102202e6dd last_write_checksum: sha1:3c0f5ebc37f3e4b331c4888b6f026d1fa5457bb2 pristine_git_object: 8e197fc4c1647910480c35bd7172d04cc2f69655 + src/__tests__/mockserver/internal/sdk/models/components/platformsubagent.go: + id: 835bb81b7d6b + last_write_checksum: sha1:aa3b389a744e12e3ebb89735680f8916d717ddc7 + pristine_git_object: f9f623b666397ce85ec6973c206ee2e50aa1d881 src/__tests__/mockserver/internal/sdk/models/components/platformtimerange.go: id: b8e92c9af7ab last_write_checksum: sha1:4e21c170201779eccc4d8c31ddbd56673895e674 @@ -8731,8 +8907,8 @@ trackedFiles: pristine_git_object: 80853fce6d86d20766336fb2fd27c8669cd12ca8 src/__tests__/summarize.test.ts: id: 3105d6ebc7eb - last_write_checksum: sha1:f8b1ac06da928f5ff27c1f48119753f085864297 - pristine_git_object: f5f3af07582f537ee59b55dc600c9219dfec9229 + last_write_checksum: sha1:ad03f34f05bbcb0030a089d85dee65c0713fe603 + pristine_git_object: f81553d2ffa1684b665cbdbd40689f3b72119543 src/__tests__/testclient.ts: id: f142c080bff8 last_write_checksum: sha1:3a38647391f52221c009a9273eebf90793b3d430 @@ -9523,8 +9699,8 @@ trackedFiles: pristine_git_object: 42d9739ab67c2fec0689f83777ffa5e1f875e5d5 src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:cb548faa23efc7276f12426a380114a17ef12bfc - pristine_git_object: 923c7d0806b9ad55a08796dd30d234adf77e2f09 + last_write_checksum: sha1:104770143b9413991c883220ac80d634df6c3903 + pristine_git_object: 83cd3baa5af6a43024dd6a5824b45cfd87d1eba6 src/lib/encodings.ts: id: 3bd8ead98afd last_write_checksum: sha1:d1917169abb226ccb0d2e93fd211a1d2987822b4 @@ -9643,8 +9819,8 @@ trackedFiles: pristine_git_object: fa0e86b52497a02c14a56a17913f2e9574f1ddd4 src/models/components/agentconfig.ts: id: cd070a80f1f6 - last_write_checksum: sha1:3a11d2a4ead85d745834488e847789f28916aadc - pristine_git_object: 0c4f93835d7d396e5e79648ef2735e8588d37eb5 + last_write_checksum: sha1:43d9fe582013434ebab8418f40e78dd301ee0e7a + pristine_git_object: 86201da9f8faec2ec7fe740f074c231677279a54 src/models/components/agentexecutionstatus.ts: id: 1c95851f35bd last_write_checksum: sha1:7f49ec981a1482f205abfdfa2efdabe10a94bddd @@ -10747,8 +10923,8 @@ trackedFiles: pristine_git_object: dcb8bad1c6e1addd393690e78a63631baa47f7be src/models/components/index.ts: id: 0aa842dce54d - last_write_checksum: sha1:86f01285f9b73ba3960697c081e283fa3bb1ce7e - pristine_git_object: 0d5f1769d87aab961216cd5d42413578bc88ebbe + last_write_checksum: sha1:92f9187f93f7187fcfbb7246883fc9d1ea2da533 + pristine_git_object: 7b12635208a0f0838394dcb8ef610c97da0a58e5 src/models/components/indexdocumentrequest.ts: id: deb13e2cdc65 last_write_checksum: sha1:33e2093c7fcdd3c90ef45c48e7b79c4cb2aea6e5 @@ -10803,8 +10979,8 @@ trackedFiles: pristine_git_object: b12c8b685548b3444713a0e3ceb79c3ed1f7e6e0 src/models/components/insightsoverviewresponse.ts: id: 8aa9174883fb - last_write_checksum: sha1:a57fca4a880579466ed670dd317f4ddd52e24278 - pristine_git_object: 0aed293dba2a2fd9bd22789d3579dcc8946d9618 + last_write_checksum: sha1:03273131fdd5187d0f6d022f580643d0d45cc52f + pristine_git_object: d95ff14281ac4068a23d86015c57bca48634f188 src/models/components/insightsrequest.ts: id: b68de921ae9d last_write_checksum: sha1:66159b3689b464951795a6e814a83f7fc9379938 @@ -10939,8 +11115,8 @@ trackedFiles: pristine_git_object: 17607f8e14b9fc1b1b5b9a90c7742607526ffe9f src/models/components/messagesrequest.ts: id: a40ad4c092f7 - last_write_checksum: sha1:c7191cab234ab0765f47bca2a96186c32dac2c29 - pristine_git_object: a8f0e820fb9fd1a355f02fd8013a9fbcae53b06d + last_write_checksum: sha1:df32f6c30cf572e52f632b4bf010e1983f81ba35 + pristine_git_object: a526df3ab9da944a8b17b2fe3a542203f13d5b64 src/models/components/messagesresponse.ts: id: 776301779c4d last_write_checksum: sha1:688b6f649f03cf8915d2a057b42ddca525e1488d @@ -11035,20 +11211,60 @@ trackedFiles: pristine_git_object: 4bfd35e2bc88ddf77f2c677d7651ac79c13a3ebc src/models/components/platformagent.ts: id: 0573787fcf08 - last_write_checksum: sha1:d0cd3355d0b05183911729e49c0533cb91377f97 - pristine_git_object: 89363931e78b1d8828373b6d4a0a1dac4ade8864 + last_write_checksum: sha1:99c6a59fc6c36b1580ff20131fc36314a405f57f + pristine_git_object: d323386054f5ff675a26bb325acedc12f7456778 src/models/components/platformagentcapabilities.ts: id: daefec738f28 last_write_checksum: sha1:062dfd2c3c765afb8c2497ab0077e05732a6e4b0 pristine_git_object: 0bbc0c9ecd0bea81fc591dfd8c36043eecdf69e2 + src/models/components/platformagentchannels.ts: + id: 68d03ace1a89 + last_write_checksum: sha1:ecc6d5aa051f4855f40061d79adbcf53d7bca57d + pristine_git_object: 3e4c862873c714b0f5ee243b944ee32d96757aab + src/models/components/platformagentcontenttrigger.ts: + id: 98f85ff3afb5 + last_write_checksum: sha1:8785df2f443eb52748f706b4cfc1f43930882e31 + pristine_git_object: b45b6fdf2ff2643745abf03473d181336b577718 + src/models/components/platformagentcontenttriggerfilter.ts: + id: fb29f8842ec1 + last_write_checksum: sha1:4726b14aa3085514adc1455a7a3d38d907582d57 + pristine_git_object: c7246007adf66368b71b02a800f78f5a2ddd2f7a + src/models/components/platformagentcontenttriggerfilteroperator.ts: + id: 74c2dcb7d8be + last_write_checksum: sha1:03ab9674f512072ed27faee61798fa1a895c0c23 + pristine_git_object: 4f25ef941e29d682425f296942a8be11c7a67bdb + src/models/components/platformagentdependency.ts: + id: 189680202ecb + last_write_checksum: sha1:8b4d2ca89ee5b81c7eaf481390322aaddbf1d5ef + pristine_git_object: d8b06a0ab4e096a91491196f7d27594538d8a3a0 src/models/components/platformagentexecutionstatus.ts: id: 2d23bf28f1e8 last_write_checksum: sha1:c8e1a0b3acf692770c5413305f707208dbf42a38 pristine_git_object: 32bfb38ba2cf02cb2683584fee55b56515aefb11 src/models/components/platformagentgetresponse.ts: id: e38387a46922 - last_write_checksum: sha1:f51c2ed0388b6654fad65ad255c67834776e10d0 - pristine_git_object: 62e5470bb7c7528f002256f81298c4f72d38ad99 + last_write_checksum: sha1:619839355901e9dd74db027d9dc710ab5c42c493 + pristine_git_object: 1667a324ec226b954d94db8cb5cc2c2226bdd6cb + src/models/components/platformagentgleansearchconfig.ts: + id: e283baa6b9d2 + last_write_checksum: sha1:3b96a939cca056a6e83d0799c08bff60db41f7c5 + pristine_git_object: 7f1d9855579ae7fe782e637b4dc8eb883a6f2322 + src/models/components/platformagentinputfield.ts: + id: 9d8c26c6dea6 + last_write_checksum: sha1:3662f31469f730fd2bfeb51ef1ad724c1f0f9064 + pristine_git_object: c663591678b38c1dd47b367e3ddcb7365072196c + src/models/components/platformagentinputfieldoption.ts: + id: 62d5035c76c4 + last_write_checksum: sha1:33a035b5bfeaa6fded347925a7b9af1256c9b948 + pristine_git_object: d99158f65b456b0527e76a21f50ab38cc98762b7 + src/models/components/platformagentllmmodel.ts: + id: 37c99e724e66 + last_write_checksum: sha1:9661ae699c331b8325de30ad8d8165acb7e9c96d + pristine_git_object: d42bd0d8cbe7d712b4a853c08f48ed932f929085 + src/models/components/platformagentprompt.ts: + id: 93b1e7909ff9 + last_write_checksum: sha1:87d5bc0953902b303c619742edbdf810b00ddcd3 + pristine_git_object: cc398d44b3c5356b4969ca6b0c3408f9f96b3d3e src/models/components/platformagentrun.ts: id: b60e7899d3b0 last_write_checksum: sha1:2501eb626af3fd578f7afa5ed40effcf26c69d96 @@ -11089,10 +11305,34 @@ trackedFiles: id: 123f244b0399 last_write_checksum: sha1:ac85dc29aa6b907b7b2b1a194f6933c197691d3a pristine_git_object: deb2a35aa0b932a7a5505495998230300f40e36f + src/models/components/platformagentschedule.ts: + id: a020cde6af1e + last_write_checksum: sha1:5488f972417b307e1aa0f9c354af22fe56f86914 + pristine_git_object: dc8c695500510dea37a7567a5a7908502009965d src/models/components/platformagentschemasresponse.ts: id: 68103f28d594 last_write_checksum: sha1:cecc2137307cb1f628f7f480aba89bb64435719a pristine_git_object: c91ea55b46598b20e979d95991d7ef835fea4fd5 + src/models/components/platformagentselectedtool.ts: + id: db58dcb63436 + last_write_checksum: sha1:c6fe055a9d5a51017fa3b83c70965c9b2706edd6 + pristine_git_object: 05c9b69fe5439db7078ccd7dac5f41d33610e0e1 + src/models/components/platformagentservicecredential.ts: + id: 2d71237c5696 + last_write_checksum: sha1:a647524998f86fee3f09444680ea039329f8e6ca + pristine_git_object: f3f8663d761b66db627111389468ad2ec4cddb46 + src/models/components/platformagentskill.ts: + id: f7e3a84a2b87 + last_write_checksum: sha1:c3b6bb0c618ff9e9fd3caf030ac38217b498e23e + pristine_git_object: 6c7ae3956dc712495502826708ddb974fe2d56be + src/models/components/platformagentslackchannel.ts: + id: 84e30ed0a22c + last_write_checksum: sha1:be0a47c5b973175ee13f3112d05f086f43514cd7 + pristine_git_object: 74f978b755de75ebae825e6bbfe1c439ef7f6254 + src/models/components/platformagentslackchannelmapping.ts: + id: 3ad3276af67f + last_write_checksum: sha1:38222da8380606dae0bedd8e7d9f72a3749b532d + pristine_git_object: dc1c8605a141fd670f13703fde740a42d838bcd0 src/models/components/platformagentssearchrequest.ts: id: b1d63f2468c7 last_write_checksum: sha1:01e1cd79c3e5f58aaf9ad96071c6a1d1f4556579 @@ -11101,6 +11341,14 @@ trackedFiles: id: ce95b592315d last_write_checksum: sha1:4f9fc3d7ef83e581e8d869d668355d5e7139694f pristine_git_object: 9b5e6b39935646f23d5859d23124dcbc6b0017d5 + src/models/components/platformagenttoolset.ts: + id: 795c11ac05f1 + last_write_checksum: sha1:b7b8628da1632a91f8d097ffc5b98426008a176a + pristine_git_object: 25d5f6c45499b6288bbed920ddfe7b9292b3046f + src/models/components/platformagenttrigger.ts: + id: 4c96f9182580 + last_write_checksum: sha1:06d5801171f014eb883ed4f8059faa0dfe7cd539 + pristine_git_object: 14d0488a03a56e3849bacbb306dc54e6aca7d19f src/models/components/platformauthenticationsuggestion.ts: id: b7fd21fddef4 last_write_checksum: sha1:b6bf25d0b2cf7aa2f9a9128459446908c6a03960 @@ -11483,8 +11731,8 @@ trackedFiles: pristine_git_object: 13fe3485a0daa876f9d0d3e760b744deb9ac8232 src/models/components/platformskillsourcepreviewfile.ts: id: 2d121cf79d2a - last_write_checksum: sha1:889e88ad873e24dce50baf5f51637da35d67ada5 - pristine_git_object: 79ebcdf2b3ea62b664ca05c422dd6819721906e3 + last_write_checksum: sha1:7e31733528e83f47713e1801d009aa470846b81e + pristine_git_object: 629e64bf44f619690fdee6829744ae9bb9a9eff4 src/models/components/platformskillsourcepreviewresponse.ts: id: a4013769ac82 last_write_checksum: sha1:da41ad3d8c19d4a63eb8bbb163047d27aed66ada @@ -11597,6 +11845,10 @@ trackedFiles: id: fc6cbf29ca76 last_write_checksum: sha1:a0f43b895c56bcf1107020af5ee5919911254a4a pristine_git_object: cac176018da1aec07c8bd4f80ec43583dca5bda2 + src/models/components/platformsubagent.ts: + id: 36d7853f8fed + last_write_checksum: sha1:d82000eabd4721cd10b6dc0c623a46026e6919b2 + pristine_git_object: bb27ae00a0c37f9ecff65ec9baa2686098240fc0 src/models/components/platformtimerange.ts: id: fb9ab6343c3a last_write_checksum: sha1:5816eda5ae4c626e40a45ad8f94a2409bc885d49 @@ -14977,7 +15229,7 @@ examples: agent_id: "" responses: "200": - application/json: {"agent": {"agent_id": "mho4lwzylcozgoc2", "name": "HR Policy Agent", "capabilities": {}}, "request_id": ""} + application/json: {"agent": {"name": "HR Policy Agent", "agent_id": "mho4lwzylcozgoc2", "capabilities": {}, "subagents": [{"name": "HR Policy Agent"}]}, "request_id": ""} "400": application/problem+json: {"type": "https://developer.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developer.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} "500": @@ -15878,7 +16130,9 @@ generatedTests: platform-search-enumeration: "2026-11-16T11:53:18Z" releaseNotes: | ## Typescript SDK Changes: - * `glean.search.enumerate()`: **Removed** (Breaking ⚠️) + * `glean.agents.search()`: `response.agents[]` **Changed** + * `glean.agents.get()`: `response.agent` **Changed** + * `glean.admin.agents.list()`: `response.results[]` **Changed** generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index eb63802ae..7351a2d21 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true typescript: - version: 0.20.25 + version: 0.20.26 acceptHeaderEnum: true additionalDependencies: dependencies: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index ad10f2967..c09a31cae 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,8 +2,8 @@ openapi: 3.1.0 info: version: "0.9.0" title: Glean API - x-source-commit-sha: 2f6fc4fe9fed01ad76ee9aa694041c743bd74875 - x-open-api-commit-sha: 241062eca12866ea62b6e58d504ef481935fcf48 + x-source-commit-sha: 88a6c970bc2595551d275a7c0f6c482f7dc74bf3 + x-open-api-commit-sha: 552255087a44252dc86e22aa5b09093cdb4a9a29 description: | # Introduction In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean. @@ -1899,6 +1899,139 @@ paths: x-speakeasy-name-override: applyLimits security: - APIToken: [] + /api/usage/search: + post: + tags: + - Usage + summary: Search measured usage + description: | + Search delayed measured spend, not live enforcement counters or invoices. Principal filters select the scope; there is no target. With no user_id or agent_id filter, the scope is the authenticated user. A single-value EQUALS user_id filter must name the caller. A single-value EQUALS agent_id filter, with no user_id filter, must name a top-level agent the caller can currently edit, including disabled agents, and measures that agent. Any other principal filter needs an organization read, so like other-user, subagent, and principal-dimension requests it is accepted structurally but returns 403 insufficient_permissions. Unknown product and feature values remain in OTHER; absent attribution remains null. Results, totals, and cursor pages share one pinned read snapshot. Totals cover observed stored rows, not certified exports or verified absent usage. AGENT uses app-compatible best-effort recorded top-agent/root attribution and same-run AGENT/LLM_CALL events, not complete run lineage. Source freshness and earliest historical coverage are null when unsupported. Usage billed in GCU on full-consumption plans isn't reported yet and is excluded from results and totals. A month whose source rows exceed 200,000 at the day and user detail the query needs, or whose source read exceeds its size, billed-byte or 30-second limit, returns 422 unprocessable_query; use a coarser granularity, fewer dimensions, or a shorter range. + operationId: platform-usage-search + x-visibility: Public + x-glean-scopes: + legacy: + - USAGE + platform: + - usage:read + x-glean-experimental: + id: 99b8297a-ead7-4a58-bbeb-26fe0a3c51e6 + introduced: "2026-10-09" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSearchCallerUsageRequest" + example: + time_range: + start: "2026-09-01T00:00:00Z" + end: "2026-10-01T00:00:00Z" + group_by: + - CLIENT_ID + include: + - DISPLAY_NAMES + responses: + "200": + description: Measured usage buckets and complete-query totals. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSearchUsageResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "422": + $ref: "#/components/responses/PlatformUnprocessableEntity" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: usage + x-speakeasy-name-override: search + security: + - APIToken: [] + /api/admin/usage/search: + post: + tags: + - Admin Usage + summary: Search workspace measured usage + description: | + Search delayed measured spend. Principal filters select the scope; there is no target. With no user_id or agent_id filter, the scope is the organization. A single-value EQUALS user_id filter reads that user's measured events. A single-value EQUALS agent_id filter, with no user_id filter, reads that top-level agent. Any other principal filter reads the organization, then narrows rows. Requires admin.usage:read and workspace billing read permission; an administrator role alone is not sufficient. USER_ID grouping is supported; DEPARTMENT_NAME and GROUP_ID are deferred and return invalid_parameter. The calculation and response are shared with personal search. Labels remain subject to current resource visibility, not billing access. Historical agent attribution is never reparented at query time. AGENT uses app-compatible best-effort recorded top-agent/root attribution and same-run AGENT/LLM_CALL events, not complete run lineage. Totals describe the observed stored snapshot, not certified billing history. Usage billed in GCU on full-consumption plans isn't reported yet and is excluded from results and totals. A month whose source rows exceed 200,000 at the day and user detail the query needs, or whose source read exceeds its size, billed-byte or 30-second limit, returns 422 unprocessable_query; use a coarser granularity, fewer dimensions, or a shorter range. Organization and agent reads return 503 while the directory loads. In workspaces with more than 100,000 directory identities, reads that group or filter by user return 503. + operationId: platform-admin-usage-search + x-visibility: Public + x-glean-scopes: + legacy: + - ADMIN_USAGE + platform: + - admin.usage:read + x-glean-experimental: + id: 8302f34b-a55b-4d29-aecb-3ee7d170309b + introduced: "2026-10-09" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSearchAdminUsageRequest" + example: + time_range: + start: "2026-09-01T00:00:00Z" + end: "2026-10-01T00:00:00Z" + group_by: + - USER_ID + filters: + - field: client_id + values: + - glean + sort: + field: USED + direction: DESC + unit: CREDITS + include: + - TOTAL_COUNT + page_size: 100 + responses: + "200": + description: Measured usage buckets and complete-query totals. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSearchUsageResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "422": + $ref: "#/components/responses/PlatformUnprocessableEntity" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: admin.usage + x-speakeasy-name-override: search + security: + - APIToken: [] /api/admin/usage/limits/evaluate: post: tags: @@ -9055,6 +9188,190 @@ components: type: string description: Case-insensitive substring to match against agent names. If omitted or empty, no name filter is applied. example: HR Policy Agent + PlatformSkillSourcePreviewFile: + type: object + description: A supporting file bundled with a skill. + required: + - path + - content + properties: + path: + type: string + description: Relative path within the skill bundle. + content: + type: string + description: UTF-8 file content. + PlatformAgentSkill: + type: object + description: | + A skill defined inline in the agent. Reference a published skill through `dependencies` instead. + required: + - display_name + - main_content + properties: + display_name: + type: string + description: Human-readable skill name. + main_content: + type: string + description: Main skill content, inlined from `SKILL.md`. + files: + type: array + description: Additional files bundled in the skill folder. + items: + $ref: "#/components/schemas/PlatformSkillSourcePreviewFile" + PlatformAgentDependency: + type: object + description: A published artifact the agent references by platform ID. + required: + - id + - type + properties: + id: + type: string + description: | + ID of the referenced artifact: the `skill_id` of a published skill when `type` is SKILL, or the `agent_id` of a published agent when `type` is AGENT. + type: + type: string + description: Type of a published artifact referenced as a dependency. + enum: + - SKILL + - AGENT + x-enumDescriptions: + SKILL: A published skill. + AGENT: A published agent. Not valid for subagents. + x-speakeasy-enum-descriptions: + SKILL: A published skill. + AGENT: A published agent. Not valid for subagents. + PlatformAgentSelectedTool: + type: object + description: A tool selected from a tool provider. + required: + - display_name + properties: + display_name: + type: string + description: Name of the tool within its provider. + PlatformAgentToolset: + type: object + description: A tool provider and the subset of its tools available to the agent. + required: + - tool_provider_id + properties: + tool_provider_id: + type: string + description: ID of the tool provider, or `native` for built-in Glean tools. + selected_tools: + type: array + description: Tools from the provider that are exposed to the agent. + items: + $ref: "#/components/schemas/PlatformAgentSelectedTool" + customisation_data: + type: object + additionalProperties: false + description: Settings applied to every tool in this provider entry. + properties: + skip_confirmation: + type: boolean + description: | + Whether tools in this entry run without asking the user for confirmation. Defaults to false. + PlatformAgentGleanSearchConfig: + type: object + description: | + Glean Search configuration. When omitted, Glean Search is disabled for the agent. An empty object searches all company knowledge available to the invoking user. Populated lists restrict search to the union of the listed datasource instances and URLs. + properties: + knowledge_profile_id: + type: string + description: | + ID of a knowledge profile whose permissions Glean Search uses instead of the invoking user's permissions. + datasource_instances: + type: array + description: | + Datasource instance names that search is restricted to. Each name selects one instance, not every instance of a datasource type. + items: + type: string + description: | + Datasource instance name. The default instance of a datasource uses the datasource name, for example `confluence`. + urls: + type: array + description: | + Document or folder URLs that search is restricted to. Folder URLs include every document contained in the folder. + items: + type: string + description: Document or folder URL. + PlatformAgentLlmModel: + type: object + description: Agentic model the agent runs on and its reasoning effort. + properties: + model_set_id: + type: string + description: Agentic model set ID. When omitted, the tenant default is used. + mode: + type: string + description: Reasoning effort per turn. Defaults to ADVANCED. + enum: + - ADVANCED + - FAST + x-enumDescriptions: + ADVANCED: High reasoning effort. + FAST: Low reasoning effort for latency-sensitive, narrow tasks. + x-speakeasy-enum-descriptions: + ADVANCED: High reasoning effort. + FAST: Low reasoning effort for latency-sensitive, narrow tasks. + auto_upgrade: + type: boolean + description: | + Whether the agent follows model upgrades. When omitted, a model with a `model_set_id` is pinned, and a model without one follows the tenant default. + PlatformAgentServiceCredential: + type: object + description: A service credential the agent uses. + required: + - service_credential_id + properties: + service_credential_id: + type: string + description: ID of the service credential. + PlatformAgentBase: + type: object + description: Definition fields shared by agents and subagents. + required: + - name + properties: + name: + type: string + description: Human-readable name. + example: HR Policy Agent + description: + type: string + description: Description of the agent's purpose and behavior. + instructions: + type: string + description: System prompt the agent follows. + skills: + type: array + description: Skills defined inline. + items: + $ref: "#/components/schemas/PlatformAgentSkill" + dependencies: + type: array + description: | + Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + items: + $ref: "#/components/schemas/PlatformAgentDependency" + tools: + type: array + description: Tool providers and the subset of their tools available to the agent. + items: + $ref: "#/components/schemas/PlatformAgentToolset" + glean_search_config: + $ref: "#/components/schemas/PlatformAgentGleanSearchConfig" + model: + $ref: "#/components/schemas/PlatformAgentLlmModel" + service_credentials: + type: array + description: Service credentials the agent uses to call tools. + items: + $ref: "#/components/schemas/PlatformAgentServiceCredential" PlatformAgentCapabilities: type: object additionalProperties: true @@ -9065,54 +9382,340 @@ components: ap.io.streaming: type: boolean description: Whether the agent supports streaming output. - PlatformAgent: + PlatformAgentSlackChannelMapping: type: object + description: A Slack channel the agent is mapped to. required: - - agent_id - - name - - capabilities + - channel_id properties: - agent_id: + channel_id: type: string - description: ID of the agent. - example: mho4lwzylcozgoc2 - name: + description: ID of the Slack channel. + auto_engage: + type: boolean + description: Whether the agent engages with messages without being mentioned. + PlatformAgentSlackChannel: + type: object + description: Slack deployment of the agent. + properties: + service_credential_id: type: string - description: Name of the agent. - example: HR Policy Agent - description: + description: ID of the service credential for the Slack app. + channel_mappings: + type: array + description: Slack channels the agent is mapped to. + items: + $ref: "#/components/schemas/PlatformAgentSlackChannelMapping" + engagement_filter_instructions: type: string - description: Description of the agent. - metadata: - type: object - description: Agent metadata. - additionalProperties: true - capabilities: - $ref: "#/components/schemas/PlatformAgentCapabilities" - PlatformAgentsSearchResponse: + description: Instructions that decide which messages the agent engages with. + allow_mentions_outside_channel_mappings: + type: boolean + description: Whether the agent responds to mentions in channels that are not mapped. + PlatformAgentChannels: + type: object + description: Messaging channels the agent is deployed to. Requires `use_agent_identity`. + properties: + slack: + $ref: "#/components/schemas/PlatformAgentSlackChannel" + PlatformSubagent: + description: | + An isolated execution unit that its parent agent dispatches work to. A subagent has no trigger, channels, or subagents of its own, and its dependencies may only reference published skills. + allOf: + - $ref: "#/components/schemas/PlatformAgentBase" + - type: object + properties: + subagent_id: + type: string + description: | + ID of the subagent, unique within its parent agent. It is not an agent ID and cannot be used with other Agents APIs. + PlatformAgentInputFieldOption: type: object + description: A choice of a SELECT input field. required: - - agents - - request_id + - value properties: - agents: - type: array - description: Agents matching the search request. - items: - $ref: "#/components/schemas/PlatformAgent" - request_id: + value: type: string - description: Platform-generated request ID for support correlation. - PlatformProblemDetailCode: - type: string - description: Stable machine-readable error code. - enum: - - invalid_request - - missing_required_field - - invalid_parameter - - unsupported_action_target - - invalid_cursor - - expired_cursor + description: Value substituted into the field's placeholder. + PlatformAgentInputField: + type: object + description: | + A typed input of the agent, referenced from the instructions as `[[display_name]]`. + required: + - display_name + - type + properties: + display_name: + type: string + description: Label of the field and its placeholder name in the instructions. Unique within the agent. + type: + type: string + description: Type of an agent input field. + enum: + - TEXT + - SELECT + - DATE + - DOCUMENT + x-enumDescriptions: + TEXT: Free-form text. + SELECT: One choice from the declared options. + DATE: Calendar date in `YYYY-MM-DD` format. + DOCUMENT: Glean file ID of an uploaded file. + x-speakeasy-enum-descriptions: + TEXT: Free-form text. + SELECT: One choice from the declared options. + DATE: Calendar date in `YYYY-MM-DD` format. + DOCUMENT: Glean file ID of an uploaded file. + description: + type: string + description: Helper text describing the field. + default_value: + type: string + description: | + Pre-filled value. For SELECT fields, one of the option values. For DATE fields, a `YYYY-MM-DD` date. + is_optional: + type: boolean + description: Whether the field accepts empty input. Defaults to false. + options: + type: array + description: Choices of a SELECT field. + items: + $ref: "#/components/schemas/PlatformAgentInputFieldOption" + PlatformAgentSchedule: + type: object + description: Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents. + required: + - frequency + - timezone + properties: + frequency: + type: string + description: Five-field Unix cron expression, for example `0 9 * * 1-5`. + timezone: + type: string + description: IANA time zone name, for example `America/Los_Angeles`. + start_at: + type: string + format: date-time + description: | + ISO 8601 timestamp with an explicit offset before which the schedule stays dormant. + PlatformAgentPrompt: + type: object + description: A conversation starter whose template is sent as the first chat message. + required: + - display_name + - template + properties: + display_name: + type: string + description: Short title of the conversation starter. + template: + type: string + description: | + Chat message that starts the conversation. May contain `[[variable_name]]` placeholders. + PlatformAgentContentTriggerFilterOperator: + type: string + description: Operator of a content trigger filter. + enum: + - IS_ONE_OF + - IS_NOT_ONE_OF + - CONTAINS + - FIELD_CHANGED + x-enum-varnames: + - AgentContentTriggerFilterOperatorISONEOF + - AgentContentTriggerFilterOperatorISNOTONEOF + - AgentContentTriggerFilterOperatorCONTAINS + - AgentContentTriggerFilterOperatorFIELDCHANGED + x-enumDescriptions: + IS_ONE_OF: The field equals one of the values. + IS_NOT_ONE_OF: The field equals none of the values. Not valid for TITLE or CONTENT. + CONTAINS: The field contains one of the values. + FIELD_CHANGED: The field changed in the event. Not valid for TITLE or CONTENT. + x-speakeasy-enum-descriptions: + IS_ONE_OF: The field equals one of the values. + IS_NOT_ONE_OF: The field equals none of the values. Not valid for TITLE or CONTENT. + CONTAINS: The field contains one of the values. + FIELD_CHANGED: The field changed in the event. Not valid for TITLE or CONTENT. + PlatformAgentContentTriggerFilter: + type: object + additionalProperties: false + description: A filter on the document that fired a content trigger. Values are ORed. + required: + - field + - operator + properties: + field: + type: string + description: "`TITLE` or `CONTENT` for the document's title or body, or a facet key." + operator: + $ref: "#/components/schemas/PlatformAgentContentTriggerFilterOperator" + values: + type: array + description: Match values. Required except for FIELD_CHANGED. + items: + type: string + description: A match value. + PlatformAgentContentTrigger: + type: object + description: A subscribed document event and the filters that narrow it. + required: + - datasource + - template_id + properties: + datasource: + type: string + description: Event source in enum form, for example `JIRA`. + template_id: + type: string + description: Subscribed event identifier, for example `JIRA_TICKET_CREATED`. + document_type: + type: string + description: Document type the entry watches. + time_offset_seconds: + type: integer + format: int32 + description: | + Seconds before an event time carried in the document at which the agent runs. Pre-event triggers only. + filters: + type: array + description: | + Filters on the document that fired the event. Every filter must match for the entry to fire. Without filters, every event for this entry fires. + items: + $ref: "#/components/schemas/PlatformAgentContentTriggerFilter" + PlatformAgentTrigger: + type: object + description: How the agent is invoked. Applies to top-level agents only. + required: + - type + properties: + type: + type: string + description: Invocation mode of the agent. + enum: + - CHAT_MESSAGE + - INPUT_FORM + - CONTENT_TRIGGER + x-enum-varnames: + - AgentTriggerTypeCHATMESSAGE + - AgentTriggerTypeINPUTFORM + - AgentTriggerTypeCONTENTTRIGGER + x-enumDescriptions: + CHAT_MESSAGE: The user converses with the agent. + INPUT_FORM: The agent runs on typed input fields, or with no input when none are declared. + CONTENT_TRIGGER: The agent runs on a document event. + x-speakeasy-enum-descriptions: + CHAT_MESSAGE: The user converses with the agent. + INPUT_FORM: The agent runs on typed input fields, or with no input when none are declared. + CONTENT_TRIGGER: The agent runs on a document event. + input_fields: + type: array + description: | + Typed inputs collected when the agent is invoked. Valid for INPUT_FORM and CONTENT_TRIGGER. An INPUT_FORM trigger without input fields runs with no input. + items: + $ref: "#/components/schemas/PlatformAgentInputField" + schedule: + $ref: "#/components/schemas/PlatformAgentSchedule" + prompts: + type: array + description: Conversation starters. Valid only for CHAT_MESSAGE. + items: + $ref: "#/components/schemas/PlatformAgentPrompt" + content: + type: object + description: Document events that run a CONTENT_TRIGGER agent. + required: + - triggers + properties: + triggers: + type: array + description: Event subscriptions. The agent runs when any entry matches. + items: + $ref: "#/components/schemas/PlatformAgentContentTrigger" + PlatformPersonReference: + type: object + description: A lightweight reference to a person, used where a payload merely points at someone. + required: + - name + properties: + id: + type: string + description: Opaque Glean person ID. + name: + type: string + description: Display name. + PlatformAgent: + description: An agent available to the authenticated user. + allOf: + - $ref: "#/components/schemas/PlatformAgentBase" + - type: object + required: + - agent_id + - capabilities + properties: + agent_id: + type: string + description: ID of the agent. + example: ef33aecf52c142a6873adf76037b642e + metadata: + type: object + description: Agent metadata. + additionalProperties: true + capabilities: + $ref: "#/components/schemas/PlatformAgentCapabilities" + use_agent_identity: + type: boolean + description: | + Whether the agent acts with its own identity instead of the invoking user's. Cannot be changed after the agent is created. + channels: + $ref: "#/components/schemas/PlatformAgentChannels" + subagents: + type: array + description: | + Subagents the agent dispatches work to. Subagents cannot contain subagents. + items: + $ref: "#/components/schemas/PlatformSubagent" + trigger: + $ref: "#/components/schemas/PlatformAgentTrigger" + created_by: + $ref: "#/components/schemas/PlatformPersonReference" + description: Person who created the agent. Omitted when the agent hides attribution. + updated_by: + $ref: "#/components/schemas/PlatformPersonReference" + description: | + Person who last updated the agent. Omitted when the agent hides attribution. + created_at: + type: string + format: date-time + description: Time the agent was created. + updated_at: + type: string + format: date-time + description: Time the agent was last updated. + PlatformAgentsSearchResponse: + type: object + required: + - agents + - request_id + properties: + agents: + type: array + description: Agents matching the search request. + items: + $ref: "#/components/schemas/PlatformAgent" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformProblemDetailCode: + type: string + description: Stable machine-readable error code. + enum: + - invalid_request + - missing_required_field + - invalid_parameter + - unsupported_action_target + - invalid_cursor + - expired_cursor - invalid_filter - invalid_datasource - authentication_required @@ -10230,18 +10833,6 @@ components: sync_error: type: string description: Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. - PlatformPersonReference: - type: object - description: A lightweight reference to a person, used where a payload merely points at someone. - required: - - name - properties: - id: - type: string - description: Opaque Glean person ID. - name: - type: string - description: Display name. PlatformSkill: type: object required: @@ -10445,18 +11036,6 @@ components: type: boolean default: false description: Whether to stream repository scan progress using server-sent events. - PlatformSkillSourcePreviewFile: - type: object - required: - - path - - content - properties: - path: - type: string - description: Relative path within the skill bundle. - content: - type: string - description: UTF-8 file content. PlatformSkillSourcePreview: type: object required: @@ -11802,6 +12381,431 @@ components: request_id: type: string description: Request identifier for correlating this response. + PlatformUsageSearchTimeRange: + type: object + additionalProperties: false + description: | + UTC midnight interval, end exclusive. A new search starts no earlier than the UTC day 90 days before the request; an earlier start is 400 invalid_parameter. Cursor pages keep the bound their first page passed. NONE and MONTH allow at most 12 calendar months; DAY and WEEK allow 180 days. USER_ID grouping with DAY allows 31 days. + required: + - start + - end + properties: + start: + type: string + format: date-time + description: | + Inclusive UTC midnight boundary, no earlier than midnight of the UTC day that contains the request time minus 90 days. + end: + type: string + format: date-time + description: Exclusive UTC midnight boundary, strictly after start. + allOf: + - $ref: "#/components/schemas/PlatformTimeRange" + PlatformUsageSearchGranularity: + type: string + description: NONE omits periods; DAY, Monday-based WEEK, and MONTH are clipped to the interval. + default: NONE + enum: + - NONE + - DAY + - WEEK + - MONTH + PlatformUsageDimension: + type: string + description: | + Grouping key, named for the response dimension it fills (MODEL_ID fills model_id). USER_ID is admin-only. DEPARTMENT_NAME and GROUP_ID are admin-only and deferred. Their well-formed personal requests return 403, not 400. + enum: + - PRODUCT + - FEATURE + - MODEL_ID + - CLIENT_ID + - AGENT_ID + - USER_ID + - DEPARTMENT_NAME + - GROUP_ID + x-enum-varnames: + - UsageDimensionProduct + - UsageDimensionFeature + - UsageDimensionModelId + - UsageDimensionClientId + - UsageDimensionAgentId + - UsageDimensionUserId + - UsageDimensionDepartmentName + - UsageDimensionGroupId + PlatformUsageSearchFilter: + type: object + additionalProperties: false + description: Exact, case-sensitive filter. Values OR together; filters AND together. Null cannot be selected. + required: + - field + - values + properties: + field: + type: string + minLength: 1 + description: | + Allowlist is product, feature, model_id, client_id, agent_id, user_id, department_name, group_id. Unknown names return invalid_filter. user_id and agent_id also select the scope (see the operation); department_name and group_id are admin-only and deferred. + values: + type: array + minItems: 1 + maxItems: 100 + description: | + Nonblank exact values with no trimming. client_id follows Usage limit target client_id validation: empty, whitespace-only, control, and synthetic IDs are invalid; unknown IDs are valid. PRODUCT and FEATURE match normalized taxonomy. + items: + type: string + minLength: 1 + maxLength: 512 + description: Exact value to match. + operator: + allOf: + - $ref: "#/components/schemas/PlatformFilterOperator" + enum: + - EQUALS + - NOT_EQUALS + default: EQUALS + description: EQUALS (default) or NOT_EQUALS only; range operators are invalid. + PlatformUsageSearchSort: + type: object + additionalProperties: false + description: | + Sort without converting units. Missing spend in the selected unit sorts last in either direction. Without unit, compare USD then CREDITS. Ties use dimension values ASC (null first), then period.start ASC. + required: + - field + - direction + properties: + field: + type: string + enum: + - USED + - PERIOD_START + description: PERIOD_START requires time granularity. + direction: + type: string + enum: + - ASC + - DESC + description: Sort direction; required whenever sort is supplied. + unit: + $ref: "#/components/schemas/PlatformUsageUnit" + description: Valid only with USED; omission compares USD first, then CREDITS. + PlatformSearchCallerUsageRequest: + type: object + description: | + Measured-usage query. user_id and agent_id filters select the scope; there is no target field. Structural principal acceptance does not grant permission; forbidden personal requests return 403. + additionalProperties: false + required: + - time_range + properties: + time_range: + $ref: "#/components/schemas/PlatformUsageSearchTimeRange" + description: | + UTC midnight bounds, with an exclusive end. Search requires an explicit range because an implicit default would hide an expensive warehouse scan. + granularity: + $ref: "#/components/schemas/PlatformUsageSearchGranularity" + description: Period size; defaults to NONE. + group_by: + type: array + maxItems: 5 + uniqueItems: true + description: Up to five unique dimensions, at most one principal dimension; principals require the admin route. + items: + $ref: "#/components/schemas/PlatformUsageDimension" + filters: + type: array + maxItems: 20 + description: Filters AND together; values within each filter OR together. + items: + $ref: "#/components/schemas/PlatformUsageSearchFilter" + metrics: + type: array + uniqueItems: true + description: USED is always returned; EVENT_COUNT sums raw billing events in both units. + items: + type: string + description: Optional measured-usage metric. + enum: + - USED + - EVENT_COUNT + sort: + $ref: "#/components/schemas/PlatformUsageSearchSort" + description: | + When omitted, defaults to PERIOD_START ASC for time series, otherwise USED DESC. When supplied, field and direction are both required. + include: + type: array + uniqueItems: true + description: Add page-only visible labels or the complete-query bucket count. + items: + type: string + description: Opt-in enrichment. + enum: + - DISPLAY_NAMES + - TOTAL_COUNT + page_size: + type: integer + minimum: 1 + maximum: 1000 + default: 100 + description: Maximum buckets per page; defaults to 100, maximum 1,000. + cursor: + type: string + minLength: 1 + maxLength: 512 + description: | + Opaque cursor from a prior page. Resend the same query and page size; it is bound to the route, caller, tenant, filter-derived scope, and snapshot. Missing retained state or a snapshot older than 24 hours is expired_cursor. + example: "" + PlatformUsageSearchDimensions: + type: object + additionalProperties: false + x-go-type: map[string]*string + description: | + A property is present only when its field is grouped. Absent attribution is an explicit null, not omitted. Raw AGENT scopes use best-effort recorded top-agent/root attribution across same-run AGENT/LLM_CALL events, and USER scopes use the same attribution. Current hierarchy is never used to reparent historical rows; missing complete run lineage is not reconstructed. + properties: + product: + type: + - string + - "null" + description: | + Server-owned product taxonomy: ASSISTANT (including LLM_CALL), AGENT, DESKTOP_APP (from GLEAN_DESKTOP_APP), API, MCP, AI_GATEWAY (from LLM_GATEWAY), or OTHER for unknown nonempty event types. Values can be added. + feature: + type: + - string + - "null" + description: | + Server-owned feature taxonomy: ARTIFACT_AUDIO, ASSISTANT, DEEP_RESEARCH, DICTATION, ENGRAM_MEMORY, GLEAN_CODE, GLEAN_IN_SLACK, GLEAN_IN_TEAMS, IMAGE_GENERATION, INDEPENDENT_AGENT_MEMORY, MEETING_NOTES (from AUDIO_TRANSCRIPTION), PRESENTATION_GENERATION, PRISM_PAID, REALTIME_VOICE (from VOICE_TRANSCRIPTION), SKILL_SCAN, API, SEARCH, or OTHER for unknown nonempty subtypes. API uses the recorded entity when subtype is absent. Values can be added. + model_id: + type: + - string + - "null" + description: Recorded model enum ID. + client_id: + type: + - string + - "null" + description: | + Recorded spend client ID. Usage with no client and Glean Desktop gateway usage are glean. + agent_id: + type: + - string + - "null" + description: Recorded top-level agent ID. + user_id: + type: + - string + - "null" + description: Canonical user ID; admin route only. + department_name: + type: + - string + - "null" + description: Deferred; not returned yet. + group_id: + type: + - string + - "null" + description: Deferred; not returned yet. + PlatformUsageUsedValue: + type: object + additionalProperties: false + description: Accrued usage in one unit, without combining or converting units. + required: + - used + - unit + properties: + used: + type: string + minLength: 1 + maxLength: 24 + pattern: ^(0|[1-9][0-9]*)(\.[0-9]{1,6})?$ + description: Nonnegative decimal usage with at most six fractional digits. + unit: + $ref: "#/components/schemas/PlatformUsageUnit" + description: Unit of accrued usage. + PlatformUsageSearchBucket: + type: object + additionalProperties: false + description: One observed period and grouped-dimension combination; empty buckets are omitted. + required: + - dimensions + - used_by_unit + properties: + period: + $ref: "#/components/schemas/PlatformUsageSearchTimeRange" + description: Clipped bucket interval; omitted for NONE. + dimensions: + $ref: "#/components/schemas/PlatformUsageSearchDimensions" + description: Grouped values for this bucket. + used_by_unit: + type: array + description: Observed spend units only, ordered USD then CREDITS; never combined or converted. + items: + $ref: "#/components/schemas/PlatformUsageUsedValue" + event_count: + type: integer + format: int64 + minimum: 0 + description: Raw billing events across both units; present only when requested. + PlatformUsageTaxonomyLabel: + type: object + additionalProperties: false + description: Display name of a product or feature value. + required: + - display_name + properties: + display_name: + type: string + description: Display name. + PlatformUsageModelLabel: + type: object + additionalProperties: false + description: Current model metadata. + required: + - display_name + properties: + display_name: + type: string + description: Current display name. + creator: + type: string + description: Model creator, when known. + PlatformUsageClientLabel: + type: object + additionalProperties: false + description: Current spend client metadata. + required: + - display_name + properties: + display_name: + type: string + description: Current application name; Glean for glean. + PlatformUsageAgentLabel: + type: object + additionalProperties: false + description: Current metadata of an agent the caller can read. + required: + - display_name + properties: + display_name: + type: string + description: Current agent name. + PlatformUsageUserLabel: + type: object + additionalProperties: false + description: Current user metadata from the People directory. + required: + - display_name + properties: + display_name: + type: string + description: Current display name. + email: + type: string + description: User email, when permitted and known. + PlatformUsageSearchLabels: + type: object + additionalProperties: false + description: | + Current visible metadata for grouped IDs on this page, one lookup per field. Missing, deleted, disabled, or hidden resources omit labels, not usage. + properties: + product: + type: object + description: Product value to label. + additionalProperties: + $ref: "#/components/schemas/PlatformUsageTaxonomyLabel" + feature: + type: object + description: Feature value to label. + additionalProperties: + $ref: "#/components/schemas/PlatformUsageTaxonomyLabel" + model_id: + type: object + description: Model ID to label. + additionalProperties: + $ref: "#/components/schemas/PlatformUsageModelLabel" + client_id: + type: object + description: Spend client ID to label. + additionalProperties: + $ref: "#/components/schemas/PlatformUsageClientLabel" + agent_id: + type: object + description: Agent ID to label. + additionalProperties: + $ref: "#/components/schemas/PlatformUsageAgentLabel" + user_id: + type: object + description: User ID to label. + additionalProperties: + $ref: "#/components/schemas/PlatformUsageUserLabel" + PlatformSearchUsageResponse: + type: object + additionalProperties: false + description: | + Measured spend observed in one pinned stored snapshot, not live counters, certified export completeness, verified absent usage or a final invoice. Source freshness and historical coverage are unknown when unsupported. Legacy rows without a unit use the app's current-plan fallback frozen at read selection; this is denomination inference, not certified historical denomination. + required: + - target + - results + - totals + - time_range + - data_updated_at + - earliest_available_at + - has_more + - next_cursor + - request_id + properties: + target: + $ref: "#/components/schemas/PlatformUsageTarget" + description: | + Scope measured for this query, derived from its user_id and agent_id filters: ORGANIZATION, USER with canonical user_id and known email, or AGENT. + results: + type: array + description: Requested page of observed buckets, at most page_size. + items: + $ref: "#/components/schemas/PlatformUsageSearchBucket" + totals: + type: array + description: Totals over all observed stored rows matching this query across every page; USD then CREDITS, observed units only. + items: + $ref: "#/components/schemas/PlatformUsageUsedValue" + total_count: + type: integer + minimum: 0 + maximum: 100000 + description: Bucket count across every page; present only with TOTAL_COUNT. + time_range: + $ref: "#/components/schemas/PlatformUsageSearchTimeRange" + description: Resolved inclusive-start, exclusive-end UTC interval. + data_updated_at: + type: + - string + - "null" + format: date-time + description: Last completed source refresh when supported, otherwise null; read selection time is not source freshness. + earliest_available_at: + type: + - string + - "null" + format: date-time + description: Earliest historical coverage when supported for this scope, otherwise null; an empty result does not verify absent usage. + labels: + $ref: "#/components/schemas/PlatformUsageSearchLabels" + description: | + With DISPLAY_NAMES, labels for grouped IDs on this page only, hydrated outside the shared measured-data cache. + has_more: + type: boolean + description: Whether another page exists in the pinned snapshot. + next_cursor: + type: + - string + - "null" + description: Opaque continuation cursor, or null when has_more is false. + request_id: + type: string + description: Request identifier for troubleshooting. + PlatformSearchAdminUsageRequest: + description: | + Administrative measured-usage query, the same shape as personal search. Without a principal filter it measures the organization. Requires billing read. + allOf: + - $ref: "#/components/schemas/PlatformSearchCallerUsageRequest" PlatformEvaluateUsageLimitRequest: type: object additionalProperties: false @@ -12018,23 +13022,6 @@ components: source: $ref: "#/components/schemas/PlatformUsagePolicySourceTarget" description: Configured policy supplying this restriction. - PlatformUsageUsedValue: - type: object - additionalProperties: false - description: Accrued usage in one unit, without combining or converting units. - required: - - used - - unit - properties: - used: - type: string - minLength: 1 - maxLength: 24 - pattern: ^(0|[1-9][0-9]*)(\.[0-9]{1,6})?$ - description: Nonnegative decimal usage with at most six fractional digits. - unit: - $ref: "#/components/schemas/PlatformUsageUnit" - description: Unit of accrued usage. PlatformUsageAggregateUsage: type: object additionalProperties: false @@ -20567,7 +21554,8 @@ components: description: Unix timestamp of the last update for the insights data in the response. totalSignupsWeekAgo: type: integer - description: Number of current employees in the specified departments who had signed up 7 days before the latest day of insights data. Compare with totalSignups for week-over-week signup change. + description: Number of current employees in the specified departments who had signed up 7 days before the latest day of insights data. Compare with totalSignups for week-over-week signup change. Included even when zero. + x-includeEmpty: true searchSessionSatisfaction: type: number format: float diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index d71c43d79..32f79fdad 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -164635,7 +164635,7 @@ workflows: - condition: $response.header.Content-Type == application/json - context: $response.body condition: | - {"agent":{"agent_id":"mho4lwzylcozgoc2","name":"HR Policy Agent","capabilities":{}},"request_id":""} + {"agent":{"name":"HR Policy Agent","agent_id":"mho4lwzylcozgoc2","capabilities":{},"subagents":[{"name":"HR Policy Agent"}]},"request_id":""} type: simple x-speakeasy-test-group: agents x-speakeasy-test-rebuild: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index a31f6ba74..eb75fe370 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.810.0 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:0ce4e9b2b8560aa2004ea154dba75c6bb685cccc1fc5dd9a0b10c8825182e0b5 - sourceBlobDigest: sha256:4f89567ad6174b01fa95ea0e4c705bcfe303ad158f8935313105767ec9cd3492 + sourceRevisionDigest: sha256:84a05dcb86918661f57b7d0e5069f3803f1aef3b43cfb1e78b2ad8ed8b8ca1ee + sourceBlobDigest: sha256:07098f3955607bd1f6f14da07359797de542881ca1deb3994198b6da9709cecf tags: - latest Glean Client API: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:0ce4e9b2b8560aa2004ea154dba75c6bb685cccc1fc5dd9a0b10c8825182e0b5 - sourceBlobDigest: sha256:4f89567ad6174b01fa95ea0e4c705bcfe303ad158f8935313105767ec9cd3492 + sourceRevisionDigest: sha256:84a05dcb86918661f57b7d0e5069f3803f1aef3b43cfb1e78b2ad8ed8b8ca1ee + sourceBlobDigest: sha256:07098f3955607bd1f6f14da07359797de542881ca1deb3994198b6da9709cecf codeSamplesNamespace: glean-api-specs-typescript-code-samples - codeSamplesRevisionDigest: sha256:14659b00bfa333c3c46b56bef3e89e3c04eed1683bc609c57a859de67b8fa53c + codeSamplesRevisionDigest: sha256:30e93c771bc7c1a4955bc846f78153335d661a71f57905d41d24e9b220bfce98 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index 46f040687..c11b0042b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1138,4 +1138,14 @@ Based on: ### Generated - [typescript v0.20.25] . ### Releases -- [NPM v0.20.25] https://www.npmjs.com/package/@gleanwork/api-client/v/0.20.25 - . \ No newline at end of file +- [NPM v0.20.25] https://www.npmjs.com/package/@gleanwork/api-client/v/0.20.25 - . + +## 2026-11-19 10:34:50 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.810.0 (2.961.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.20.26] . +### Releases +- [NPM v0.20.26] https://www.npmjs.com/package/@gleanwork/api-client/v/0.20.26 - . \ No newline at end of file diff --git a/docs/models/components/agentconfig.md b/docs/models/components/agentconfig.md index 0469415b4..5f479e7fb 100644 --- a/docs/models/components/agentconfig.md +++ b/docs/models/components/agentconfig.md @@ -16,5 +16,5 @@ let value: AgentConfig = {}; | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | `agent` | [components.AgentEnum](../../models/components/agentenum.md) | :heavy_minus_sign: | Name of the agent. | | `toolSets` | [components.ToolSets](../../models/components/toolsets.md) | :heavy_minus_sign: | The types of tools that the agent is allowed to use. Only works with FAST and ADVANCED `agent` values | -| `mode` | [components.Mode](../../models/components/mode.md) | :heavy_minus_sign: | Top level modes to run GleanChat in. | +| `mode` | [components.AgentConfigMode](../../models/components/agentconfigmode.md) | :heavy_minus_sign: | Top level modes to run GleanChat in. | | `useImageGeneration` | *boolean* | :heavy_minus_sign: | Whether the agent should create an image. | \ No newline at end of file diff --git a/docs/models/components/mode.md b/docs/models/components/agentconfigmode.md similarity index 62% rename from docs/models/components/mode.md rename to docs/models/components/agentconfigmode.md index 29bccd3be..d7ce7b444 100644 --- a/docs/models/components/mode.md +++ b/docs/models/components/agentconfigmode.md @@ -1,13 +1,13 @@ -# Mode +# AgentConfigMode Top level modes to run GleanChat in. ## Example Usage ```typescript -import { Mode } from "@gleanwork/api-client/models/components"; +import { AgentConfigMode } from "@gleanwork/api-client/models/components"; -let value: Mode = "QUICK"; +let value: AgentConfigMode = "QUICK"; // Open enum: unrecognized values are captured as Unrecognized ``` diff --git a/docs/models/components/content.md b/docs/models/components/content.md new file mode 100644 index 000000000..efda7ac50 --- /dev/null +++ b/docs/models/components/content.md @@ -0,0 +1,19 @@ +# Content + +Document events that run a CONTENT_TRIGGER agent. + +## Example Usage + +```typescript +import { Content } from "@gleanwork/api-client/models/components"; + +let value: Content = { + triggers: [], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `triggers` | [components.PlatformAgentContentTrigger](../../models/components/platformagentcontenttrigger.md)[] | :heavy_check_mark: | Event subscriptions. The agent runs when any entry matches. | \ No newline at end of file diff --git a/docs/models/components/customisationdata.md b/docs/models/components/customisationdata.md new file mode 100644 index 000000000..e5aece5cc --- /dev/null +++ b/docs/models/components/customisationdata.md @@ -0,0 +1,17 @@ +# CustomisationData + +Settings applied to every tool in this provider entry. + +## Example Usage + +```typescript +import { CustomisationData } from "@gleanwork/api-client/models/components"; + +let value: CustomisationData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `skipConfirmation` | *boolean* | :heavy_minus_sign: | Whether tools in this entry run without asking the user for confirmation. Defaults to false.
| \ No newline at end of file diff --git a/docs/models/components/insightsoverviewresponse.md b/docs/models/components/insightsoverviewresponse.md index fb35094a6..16302a756 100644 --- a/docs/models/components/insightsoverviewresponse.md +++ b/docs/models/components/insightsoverviewresponse.md @@ -35,7 +35,7 @@ let value: InsightsOverviewResponse = { | `extensionSummary` | [components.CurrentActiveUsers](../../models/components/currentactiveusers.md) | :heavy_minus_sign: | N/A | | `ugcSummary` | [components.CurrentActiveUsers](../../models/components/currentactiveusers.md) | :heavy_minus_sign: | N/A | | `lastUpdatedTs` | *number* | :heavy_minus_sign: | Unix timestamp of the last update for the insights data in the response. | -| `totalSignupsWeekAgo` | *number* | :heavy_minus_sign: | Number of current employees in the specified departments who had signed up 7 days before the latest day of insights data. Compare with totalSignups for week-over-week signup change. | +| `totalSignupsWeekAgo` | *number* | :heavy_minus_sign: | Number of current employees in the specified departments who had signed up 7 days before the latest day of insights data. Compare with totalSignups for week-over-week signup change. Included even when zero. | | ~~`searchSessionSatisfaction`~~ | *number* | :heavy_minus_sign: | :warning: **DEPRECATED**: Deprecated on 2026-05-13, removal scheduled for 2027-01-15: This property is no longer supported. Please contact Support for alternatives..

Search session satisfaction rate, over the specified time period in the specified departments. | | `monthlyActiveUserTimeseries` | [components.LabeledCountInfo](../../models/components/labeledcountinfo.md) | :heavy_minus_sign: | N/A | | `weeklyActiveUserTimeseries` | [components.LabeledCountInfo](../../models/components/labeledcountinfo.md) | :heavy_minus_sign: | N/A | diff --git a/docs/models/components/messagesrequest.md b/docs/models/components/messagesrequest.md index fc03375d6..1e7c345e2 100644 --- a/docs/models/components/messagesrequest.md +++ b/docs/models/components/messagesrequest.md @@ -19,7 +19,7 @@ let value: MessagesRequest = { | `idType` | [components.IdType](../../models/components/idtype.md) | :heavy_check_mark: | Type of the id in the incoming request. | | `id` | *string* | :heavy_check_mark: | ID corresponding to the requested idType. Note that channel and threads are represented by the underlying datasource's ID and conversations are represented by their document's ID. | | `workspaceId` | *string* | :heavy_minus_sign: | Id for the for the workspace in case of multiple workspaces. | -| `direction` | [components.Direction](../../models/components/direction.md) | :heavy_minus_sign: | The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. | +| `direction` | [components.MessagesRequestDirection](../../models/components/messagesrequestdirection.md) | :heavy_minus_sign: | The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. | | `timestampMillis` | *number* | :heavy_minus_sign: | Timestamp in millis of the reference message. Only applicable when using a message_id. | | `includeRootMessage` | *boolean* | :heavy_minus_sign: | Whether to include root message in response. | | `datasource` | [components.Datasource](../../models/components/datasource.md) | :heavy_check_mark: | The type of the data source. | diff --git a/docs/models/components/direction.md b/docs/models/components/messagesrequestdirection.md similarity index 59% rename from docs/models/components/direction.md rename to docs/models/components/messagesrequestdirection.md index 45379f4d2..62c35ce56 100644 --- a/docs/models/components/direction.md +++ b/docs/models/components/messagesrequestdirection.md @@ -1,13 +1,13 @@ -# Direction +# MessagesRequestDirection The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. ## Example Usage ```typescript -import { Direction } from "@gleanwork/api-client/models/components"; +import { MessagesRequestDirection } from "@gleanwork/api-client/models/components"; -let value: Direction = "NEWER"; +let value: MessagesRequestDirection = "OLDER"; ``` ## Values diff --git a/docs/models/components/platformagent.md b/docs/models/components/platformagent.md index 4964c5911..9a2dd99f4 100644 --- a/docs/models/components/platformagent.md +++ b/docs/models/components/platformagent.md @@ -1,23 +1,45 @@ # PlatformAgent +An agent available to the authenticated user. + ## Example Usage ```typescript import { PlatformAgent } from "@gleanwork/api-client/models/components"; let value: PlatformAgent = { - agent_id: "mho4lwzylcozgoc2", name: "HR Policy Agent", + agent_id: "ef33aecf52c142a6873adf76037b642e", capabilities: {}, + subagents: [ + { + name: "HR Policy Agent", + }, + ], }; ``` ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `agentId` | *string* | :heavy_check_mark: | ID of the agent. | mho4lwzylcozgoc2 | -| `name` | *string* | :heavy_check_mark: | Name of the agent. | HR Policy Agent | -| `description` | *string* | :heavy_minus_sign: | Description of the agent. | | -| `metadata` | Record | :heavy_minus_sign: | Agent metadata. | | -| `capabilities` | [components.PlatformAgentCapabilities](../../models/components/platformagentcapabilities.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Human-readable name. | HR Policy Agent | +| `description` | *string* | :heavy_minus_sign: | Description of the agent's purpose and behavior. | | +| `instructions` | *string* | :heavy_minus_sign: | System prompt the agent follows. | | +| `skills` | [components.PlatformAgentSkill](../../models/components/platformagentskill.md)[] | :heavy_minus_sign: | Skills defined inline. | | +| `dependencies` | [components.PlatformAgentDependency](../../models/components/platformagentdependency.md)[] | :heavy_minus_sign: | Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`.
| | +| `tools` | [components.PlatformAgentToolset](../../models/components/platformagenttoolset.md)[] | :heavy_minus_sign: | Tool providers and the subset of their tools available to the agent. | | +| `gleanSearchConfig` | [components.PlatformAgentGleanSearchConfig](../../models/components/platformagentgleansearchconfig.md) | :heavy_minus_sign: | Glean Search configuration. When omitted, Glean Search is disabled for the agent. An empty object searches all company knowledge available to the invoking user. Populated lists restrict search to the union of the listed datasource instances and URLs.
| | +| `model` | [components.PlatformAgentLlmModel](../../models/components/platformagentllmmodel.md) | :heavy_minus_sign: | Agentic model the agent runs on and its reasoning effort. | | +| `serviceCredentials` | [components.PlatformAgentServiceCredential](../../models/components/platformagentservicecredential.md)[] | :heavy_minus_sign: | Service credentials the agent uses to call tools. | | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent. | ef33aecf52c142a6873adf76037b642e | +| `metadata` | Record | :heavy_minus_sign: | Agent metadata. | | +| `capabilities` | [components.PlatformAgentCapabilities](../../models/components/platformagentcapabilities.md) | :heavy_check_mark: | N/A | | +| `useAgentIdentity` | *boolean* | :heavy_minus_sign: | Whether the agent acts with its own identity instead of the invoking user's. Cannot be changed after the agent is created.
| | +| `channels` | [components.PlatformAgentChannels](../../models/components/platformagentchannels.md) | :heavy_minus_sign: | Messaging channels the agent is deployed to. Requires `use_agent_identity`. | | +| `subagents` | [components.PlatformSubagent](../../models/components/platformsubagent.md)[] | :heavy_minus_sign: | Subagents the agent dispatches work to. Subagents cannot contain subagents.
| | +| `trigger` | [components.PlatformAgentTrigger](../../models/components/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | | +| `createdBy` | [components.PlatformPersonReference](../../models/components/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | +| `updatedBy` | [components.PlatformPersonReference](../../models/components/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time the agent was created. | | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time the agent was last updated. | | \ No newline at end of file diff --git a/docs/models/components/platformagentchannels.md b/docs/models/components/platformagentchannels.md new file mode 100644 index 000000000..2ecc0ab0f --- /dev/null +++ b/docs/models/components/platformagentchannels.md @@ -0,0 +1,17 @@ +# PlatformAgentChannels + +Messaging channels the agent is deployed to. Requires `use_agent_identity`. + +## Example Usage + +```typescript +import { PlatformAgentChannels } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentChannels = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `slack` | [components.PlatformAgentSlackChannel](../../models/components/platformagentslackchannel.md) | :heavy_minus_sign: | Slack deployment of the agent. | \ No newline at end of file diff --git a/docs/models/components/platformagentcontenttrigger.md b/docs/models/components/platformagentcontenttrigger.md new file mode 100644 index 000000000..95b0f3a67 --- /dev/null +++ b/docs/models/components/platformagentcontenttrigger.md @@ -0,0 +1,24 @@ +# PlatformAgentContentTrigger + +A subscribed document event and the filters that narrow it. + +## Example Usage + +```typescript +import { PlatformAgentContentTrigger } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentContentTrigger = { + datasource: "", + template_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `datasource` | *string* | :heavy_check_mark: | Event source in enum form, for example `JIRA`. | +| `templateId` | *string* | :heavy_check_mark: | Subscribed event identifier, for example `JIRA_TICKET_CREATED`. | +| `documentType` | *string* | :heavy_minus_sign: | Document type the entry watches. | +| `timeOffsetSeconds` | *number* | :heavy_minus_sign: | Seconds before an event time carried in the document at which the agent runs. Pre-event triggers only.
| +| `filters` | [components.PlatformAgentContentTriggerFilter](../../models/components/platformagentcontenttriggerfilter.md)[] | :heavy_minus_sign: | Filters on the document that fired the event. Every filter must match for the entry to fire. Without filters, every event for this entry fires.
| \ No newline at end of file diff --git a/docs/models/components/platformagentcontenttriggerfilter.md b/docs/models/components/platformagentcontenttriggerfilter.md new file mode 100644 index 000000000..7935fe3de --- /dev/null +++ b/docs/models/components/platformagentcontenttriggerfilter.md @@ -0,0 +1,22 @@ +# PlatformAgentContentTriggerFilter + +A filter on the document that fired a content trigger. Values are ORed. + +## Example Usage + +```typescript +import { PlatformAgentContentTriggerFilter } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentContentTriggerFilter = { + field: "", + operator: "FIELD_CHANGED", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `field` | *string* | :heavy_check_mark: | `TITLE` or `CONTENT` for the document's title or body, or a facet key. | +| `operator` | [components.PlatformAgentContentTriggerFilterOperator](../../models/components/platformagentcontenttriggerfilteroperator.md) | :heavy_check_mark: | Operator of a content trigger filter. | +| `values` | *string*[] | :heavy_minus_sign: | Match values. Required except for FIELD_CHANGED. | \ No newline at end of file diff --git a/docs/models/components/platformagentcontenttriggerfilteroperator.md b/docs/models/components/platformagentcontenttriggerfilteroperator.md new file mode 100644 index 000000000..29cf76a9c --- /dev/null +++ b/docs/models/components/platformagentcontenttriggerfilteroperator.md @@ -0,0 +1,19 @@ +# PlatformAgentContentTriggerFilterOperator + +Operator of a content trigger filter. + +## Example Usage + +```typescript +import { PlatformAgentContentTriggerFilterOperator } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentContentTriggerFilterOperator = "IS_ONE_OF"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"IS_ONE_OF" | "IS_NOT_ONE_OF" | "CONTAINS" | "FIELD_CHANGED" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/components/platformagentdependency.md b/docs/models/components/platformagentdependency.md new file mode 100644 index 000000000..712f900b6 --- /dev/null +++ b/docs/models/components/platformagentdependency.md @@ -0,0 +1,21 @@ +# PlatformAgentDependency + +A published artifact the agent references by platform ID. + +## Example Usage + +```typescript +import { PlatformAgentDependency } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentDependency = { + id: "", + type: "AGENT", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | ID of the referenced artifact: the `skill_id` of a published skill when `type` is SKILL, or the `agent_id` of a published agent when `type` is AGENT.
| +| `type` | [components.PlatformAgentDependencyType](../../models/components/platformagentdependencytype.md) | :heavy_check_mark: | Type of a published artifact referenced as a dependency. | \ No newline at end of file diff --git a/docs/models/components/platformagentdependencytype.md b/docs/models/components/platformagentdependencytype.md new file mode 100644 index 000000000..f5c3f232a --- /dev/null +++ b/docs/models/components/platformagentdependencytype.md @@ -0,0 +1,19 @@ +# PlatformAgentDependencyType + +Type of a published artifact referenced as a dependency. + +## Example Usage + +```typescript +import { PlatformAgentDependencyType } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentDependencyType = "SKILL"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"SKILL" | "AGENT" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/components/platformagentgetresponse.md b/docs/models/components/platformagentgetresponse.md index 3bf9df7ff..ce9b8c57d 100644 --- a/docs/models/components/platformagentgetresponse.md +++ b/docs/models/components/platformagentgetresponse.md @@ -7,9 +7,14 @@ import { PlatformAgentGetResponse } from "@gleanwork/api-client/models/component let value: PlatformAgentGetResponse = { agent: { - agent_id: "mho4lwzylcozgoc2", name: "HR Policy Agent", + agent_id: "ef33aecf52c142a6873adf76037b642e", capabilities: {}, + subagents: [ + { + name: "HR Policy Agent", + }, + ], }, request_id: "", }; @@ -19,5 +24,5 @@ let value: PlatformAgentGetResponse = { | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `agent` | [components.PlatformAgent](../../models/components/platformagent.md) | :heavy_check_mark: | N/A | +| `agent` | [components.PlatformAgent](../../models/components/platformagent.md) | :heavy_check_mark: | An agent available to the authenticated user. | | `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/platformagentgleansearchconfig.md b/docs/models/components/platformagentgleansearchconfig.md new file mode 100644 index 000000000..a822ce402 --- /dev/null +++ b/docs/models/components/platformagentgleansearchconfig.md @@ -0,0 +1,20 @@ +# PlatformAgentGleanSearchConfig + +Glean Search configuration. When omitted, Glean Search is disabled for the agent. An empty object searches all company knowledge available to the invoking user. Populated lists restrict search to the union of the listed datasource instances and URLs. + + +## Example Usage + +```typescript +import { PlatformAgentGleanSearchConfig } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentGleanSearchConfig = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `knowledgeProfileId` | *string* | :heavy_minus_sign: | ID of a knowledge profile whose permissions Glean Search uses instead of the invoking user's permissions.
| +| `datasourceInstances` | *string*[] | :heavy_minus_sign: | Datasource instance names that search is restricted to. Each name selects one instance, not every instance of a datasource type.
| +| `urls` | *string*[] | :heavy_minus_sign: | Document or folder URLs that search is restricted to. Folder URLs include every document contained in the folder.
| \ No newline at end of file diff --git a/docs/models/components/platformagentinputfield.md b/docs/models/components/platformagentinputfield.md new file mode 100644 index 000000000..2daa6fd4a --- /dev/null +++ b/docs/models/components/platformagentinputfield.md @@ -0,0 +1,26 @@ +# PlatformAgentInputField + +A typed input of the agent, referenced from the instructions as `[[display_name]]`. + + +## Example Usage + +```typescript +import { PlatformAgentInputField } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentInputField = { + display_name: "Kayden59", + type: "DATE", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `displayName` | *string* | :heavy_check_mark: | Label of the field and its placeholder name in the instructions. Unique within the agent. | +| `type` | [components.PlatformAgentInputFieldType](../../models/components/platformagentinputfieldtype.md) | :heavy_check_mark: | Type of an agent input field. | +| `description` | *string* | :heavy_minus_sign: | Helper text describing the field. | +| `defaultValue` | *string* | :heavy_minus_sign: | Pre-filled value. For SELECT fields, one of the option values. For DATE fields, a `YYYY-MM-DD` date.
| +| `isOptional` | *boolean* | :heavy_minus_sign: | Whether the field accepts empty input. Defaults to false. | +| `options` | [components.PlatformAgentInputFieldOption](../../models/components/platformagentinputfieldoption.md)[] | :heavy_minus_sign: | Choices of a SELECT field. | \ No newline at end of file diff --git a/docs/models/components/platformagentinputfieldoption.md b/docs/models/components/platformagentinputfieldoption.md new file mode 100644 index 000000000..0aaa25f73 --- /dev/null +++ b/docs/models/components/platformagentinputfieldoption.md @@ -0,0 +1,19 @@ +# PlatformAgentInputFieldOption + +A choice of a SELECT input field. + +## Example Usage + +```typescript +import { PlatformAgentInputFieldOption } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentInputFieldOption = { + value: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `value` | *string* | :heavy_check_mark: | Value substituted into the field's placeholder. | \ No newline at end of file diff --git a/docs/models/components/platformagentinputfieldtype.md b/docs/models/components/platformagentinputfieldtype.md new file mode 100644 index 000000000..218e63544 --- /dev/null +++ b/docs/models/components/platformagentinputfieldtype.md @@ -0,0 +1,19 @@ +# PlatformAgentInputFieldType + +Type of an agent input field. + +## Example Usage + +```typescript +import { PlatformAgentInputFieldType } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentInputFieldType = "TEXT"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"TEXT" | "SELECT" | "DATE" | "DOCUMENT" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/components/platformagentllmmodel.md b/docs/models/components/platformagentllmmodel.md new file mode 100644 index 000000000..7bf80f831 --- /dev/null +++ b/docs/models/components/platformagentllmmodel.md @@ -0,0 +1,19 @@ +# PlatformAgentLlmModel + +Agentic model the agent runs on and its reasoning effort. + +## Example Usage + +```typescript +import { PlatformAgentLlmModel } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentLlmModel = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `modelSetId` | *string* | :heavy_minus_sign: | Agentic model set ID. When omitted, the tenant default is used. | +| `mode` | [components.PlatformAgentLlmModelMode](../../models/components/platformagentllmmodelmode.md) | :heavy_minus_sign: | Reasoning effort per turn. Defaults to ADVANCED. | +| `autoUpgrade` | *boolean* | :heavy_minus_sign: | Whether the agent follows model upgrades. When omitted, a model with a `model_set_id` is pinned, and a model without one follows the tenant default.
| \ No newline at end of file diff --git a/docs/models/components/platformagentllmmodelmode.md b/docs/models/components/platformagentllmmodelmode.md new file mode 100644 index 000000000..e2f7c3280 --- /dev/null +++ b/docs/models/components/platformagentllmmodelmode.md @@ -0,0 +1,19 @@ +# PlatformAgentLlmModelMode + +Reasoning effort per turn. Defaults to ADVANCED. + +## Example Usage + +```typescript +import { PlatformAgentLlmModelMode } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentLlmModelMode = "ADVANCED"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"ADVANCED" | "FAST" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/components/platformagentprompt.md b/docs/models/components/platformagentprompt.md new file mode 100644 index 000000000..51bd9ba17 --- /dev/null +++ b/docs/models/components/platformagentprompt.md @@ -0,0 +1,21 @@ +# PlatformAgentPrompt + +A conversation starter whose template is sent as the first chat message. + +## Example Usage + +```typescript +import { PlatformAgentPrompt } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentPrompt = { + display_name: "Jameson_Ullrich", + template: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `displayName` | *string* | :heavy_check_mark: | Short title of the conversation starter. | +| `template` | *string* | :heavy_check_mark: | Chat message that starts the conversation. May contain `[[variable_name]]` placeholders.
| \ No newline at end of file diff --git a/docs/models/components/platformagentschedule.md b/docs/models/components/platformagentschedule.md new file mode 100644 index 000000000..13e78f2c8 --- /dev/null +++ b/docs/models/components/platformagentschedule.md @@ -0,0 +1,22 @@ +# PlatformAgentSchedule + +Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents. + +## Example Usage + +```typescript +import { PlatformAgentSchedule } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentSchedule = { + frequency: "", + timezone: "America/Montevideo", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `frequency` | *string* | :heavy_check_mark: | Five-field Unix cron expression, for example `0 9 * * 1-5`. | +| `timezone` | *string* | :heavy_check_mark: | IANA time zone name, for example `America/Los_Angeles`. | +| `startAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO 8601 timestamp with an explicit offset before which the schedule stays dormant.
| \ No newline at end of file diff --git a/docs/models/components/platformagentselectedtool.md b/docs/models/components/platformagentselectedtool.md new file mode 100644 index 000000000..502a72d6f --- /dev/null +++ b/docs/models/components/platformagentselectedtool.md @@ -0,0 +1,19 @@ +# PlatformAgentSelectedTool + +A tool selected from a tool provider. + +## Example Usage + +```typescript +import { PlatformAgentSelectedTool } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentSelectedTool = { + display_name: "Brennon.Keebler21", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `displayName` | *string* | :heavy_check_mark: | Name of the tool within its provider. | \ No newline at end of file diff --git a/docs/models/components/platformagentservicecredential.md b/docs/models/components/platformagentservicecredential.md new file mode 100644 index 000000000..ef0cc2547 --- /dev/null +++ b/docs/models/components/platformagentservicecredential.md @@ -0,0 +1,19 @@ +# PlatformAgentServiceCredential + +A service credential the agent uses. + +## Example Usage + +```typescript +import { PlatformAgentServiceCredential } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentServiceCredential = { + service_credential_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `serviceCredentialId` | *string* | :heavy_check_mark: | ID of the service credential. | \ No newline at end of file diff --git a/docs/models/components/platformagentskill.md b/docs/models/components/platformagentskill.md new file mode 100644 index 000000000..2233d8f47 --- /dev/null +++ b/docs/models/components/platformagentskill.md @@ -0,0 +1,23 @@ +# PlatformAgentSkill + +A skill defined inline in the agent. Reference a published skill through `dependencies` instead. + + +## Example Usage + +```typescript +import { PlatformAgentSkill } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentSkill = { + display_name: "Mazie.Berge35", + main_content: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `displayName` | *string* | :heavy_check_mark: | Human-readable skill name. | +| `mainContent` | *string* | :heavy_check_mark: | Main skill content, inlined from `SKILL.md`. | +| `files` | [components.PlatformSkillSourcePreviewFile](../../models/components/platformskillsourcepreviewfile.md)[] | :heavy_minus_sign: | Additional files bundled in the skill folder. | \ No newline at end of file diff --git a/docs/models/components/platformagentslackchannel.md b/docs/models/components/platformagentslackchannel.md new file mode 100644 index 000000000..948ae1bba --- /dev/null +++ b/docs/models/components/platformagentslackchannel.md @@ -0,0 +1,20 @@ +# PlatformAgentSlackChannel + +Slack deployment of the agent. + +## Example Usage + +```typescript +import { PlatformAgentSlackChannel } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentSlackChannel = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `serviceCredentialId` | *string* | :heavy_minus_sign: | ID of the service credential for the Slack app. | +| `channelMappings` | [components.PlatformAgentSlackChannelMapping](../../models/components/platformagentslackchannelmapping.md)[] | :heavy_minus_sign: | Slack channels the agent is mapped to. | +| `engagementFilterInstructions` | *string* | :heavy_minus_sign: | Instructions that decide which messages the agent engages with. | +| `allowMentionsOutsideChannelMappings` | *boolean* | :heavy_minus_sign: | Whether the agent responds to mentions in channels that are not mapped. | \ No newline at end of file diff --git a/docs/models/components/platformagentslackchannelmapping.md b/docs/models/components/platformagentslackchannelmapping.md new file mode 100644 index 000000000..226dc173c --- /dev/null +++ b/docs/models/components/platformagentslackchannelmapping.md @@ -0,0 +1,20 @@ +# PlatformAgentSlackChannelMapping + +A Slack channel the agent is mapped to. + +## Example Usage + +```typescript +import { PlatformAgentSlackChannelMapping } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentSlackChannelMapping = { + channel_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `channelId` | *string* | :heavy_check_mark: | ID of the Slack channel. | +| `autoEngage` | *boolean* | :heavy_minus_sign: | Whether the agent engages with messages without being mentioned. | \ No newline at end of file diff --git a/docs/models/components/platformagenttoolset.md b/docs/models/components/platformagenttoolset.md new file mode 100644 index 000000000..e3e64c062 --- /dev/null +++ b/docs/models/components/platformagenttoolset.md @@ -0,0 +1,21 @@ +# PlatformAgentToolset + +A tool provider and the subset of its tools available to the agent. + +## Example Usage + +```typescript +import { PlatformAgentToolset } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentToolset = { + tool_provider_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `toolProviderId` | *string* | :heavy_check_mark: | ID of the tool provider, or `native` for built-in Glean tools. | +| `selectedTools` | [components.PlatformAgentSelectedTool](../../models/components/platformagentselectedtool.md)[] | :heavy_minus_sign: | Tools from the provider that are exposed to the agent. | +| `customisationData` | [components.CustomisationData](../../models/components/customisationdata.md) | :heavy_minus_sign: | Settings applied to every tool in this provider entry. | \ No newline at end of file diff --git a/docs/models/components/platformagenttrigger.md b/docs/models/components/platformagenttrigger.md new file mode 100644 index 000000000..81e7c65b1 --- /dev/null +++ b/docs/models/components/platformagenttrigger.md @@ -0,0 +1,23 @@ +# PlatformAgentTrigger + +How the agent is invoked. Applies to top-level agents only. + +## Example Usage + +```typescript +import { PlatformAgentTrigger } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentTrigger = { + type: "CONTENT_TRIGGER", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [components.PlatformAgentTriggerType](../../models/components/platformagenttriggertype.md) | :heavy_check_mark: | Invocation mode of the agent. | +| `inputFields` | [components.PlatformAgentInputField](../../models/components/platformagentinputfield.md)[] | :heavy_minus_sign: | Typed inputs collected when the agent is invoked. Valid for INPUT_FORM and CONTENT_TRIGGER. An INPUT_FORM trigger without input fields runs with no input.
| +| `schedule` | [components.PlatformAgentSchedule](../../models/components/platformagentschedule.md) | :heavy_minus_sign: | Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents. | +| `prompts` | [components.PlatformAgentPrompt](../../models/components/platformagentprompt.md)[] | :heavy_minus_sign: | Conversation starters. Valid only for CHAT_MESSAGE. | +| `content` | [components.Content](../../models/components/content.md) | :heavy_minus_sign: | Document events that run a CONTENT_TRIGGER agent. | \ No newline at end of file diff --git a/docs/models/components/platformagenttriggertype.md b/docs/models/components/platformagenttriggertype.md new file mode 100644 index 000000000..96ec93c9d --- /dev/null +++ b/docs/models/components/platformagenttriggertype.md @@ -0,0 +1,19 @@ +# PlatformAgentTriggerType + +Invocation mode of the agent. + +## Example Usage + +```typescript +import { PlatformAgentTriggerType } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentTriggerType = "CHAT_MESSAGE"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"CHAT_MESSAGE" | "INPUT_FORM" | "CONTENT_TRIGGER" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/components/platformlistadminagentsresponse.md b/docs/models/components/platformlistadminagentsresponse.md index 111d27831..614b3da87 100644 --- a/docs/models/components/platformlistadminagentsresponse.md +++ b/docs/models/components/platformlistadminagentsresponse.md @@ -10,9 +10,14 @@ import { PlatformListAdminAgentsResponse } from "@gleanwork/api-client/models/co let value: PlatformListAdminAgentsResponse = { results: [ { - agent_id: "mho4lwzylcozgoc2", name: "HR Policy Agent", + agent_id: "ef33aecf52c142a6873adf76037b642e", capabilities: {}, + subagents: [ + { + name: "HR Policy Agent", + }, + ], }, ], has_more: true, diff --git a/docs/models/components/platformskillsourcepreviewfile.md b/docs/models/components/platformskillsourcepreviewfile.md index 7a0ec949d..350300dd2 100644 --- a/docs/models/components/platformskillsourcepreviewfile.md +++ b/docs/models/components/platformskillsourcepreviewfile.md @@ -1,5 +1,7 @@ # PlatformSkillSourcePreviewFile +A supporting file bundled with a skill. + ## Example Usage ```typescript diff --git a/docs/models/components/platformsubagent.md b/docs/models/components/platformsubagent.md new file mode 100644 index 000000000..24fc49b87 --- /dev/null +++ b/docs/models/components/platformsubagent.md @@ -0,0 +1,29 @@ +# PlatformSubagent + +An isolated execution unit that its parent agent dispatches work to. A subagent has no trigger, channels, or subagents of its own, and its dependencies may only reference published skills. + + +## Example Usage + +```typescript +import { PlatformSubagent } from "@gleanwork/api-client/models/components"; + +let value: PlatformSubagent = { + name: "HR Policy Agent", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Human-readable name. | HR Policy Agent | +| `description` | *string* | :heavy_minus_sign: | Description of the agent's purpose and behavior. | | +| `instructions` | *string* | :heavy_minus_sign: | System prompt the agent follows. | | +| `skills` | [components.PlatformAgentSkill](../../models/components/platformagentskill.md)[] | :heavy_minus_sign: | Skills defined inline. | | +| `dependencies` | [components.PlatformAgentDependency](../../models/components/platformagentdependency.md)[] | :heavy_minus_sign: | Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`.
| | +| `tools` | [components.PlatformAgentToolset](../../models/components/platformagenttoolset.md)[] | :heavy_minus_sign: | Tool providers and the subset of their tools available to the agent. | | +| `gleanSearchConfig` | [components.PlatformAgentGleanSearchConfig](../../models/components/platformagentgleansearchconfig.md) | :heavy_minus_sign: | Glean Search configuration. When omitted, Glean Search is disabled for the agent. An empty object searches all company knowledge available to the invoking user. Populated lists restrict search to the union of the listed datasource instances and URLs.
| | +| `model` | [components.PlatformAgentLlmModel](../../models/components/platformagentllmmodel.md) | :heavy_minus_sign: | Agentic model the agent runs on and its reasoning effort. | | +| `serviceCredentials` | [components.PlatformAgentServiceCredential](../../models/components/platformagentservicecredential.md)[] | :heavy_minus_sign: | Service credentials the agent uses to call tools. | | +| `subagentId` | *string* | :heavy_minus_sign: | ID of the subagent, unique within its parent agent. It is not an agent ID and cannot be used with other Agents APIs.
| | \ No newline at end of file diff --git a/examples/package-lock.json b/examples/package-lock.json index 60c663de4..04054185c 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@gleanwork/api-client", - "version": "0.20.25", + "version": "0.20.26", "dependencies": { "zod": "^3.25.0 || ^4.6.6" }, diff --git a/jsr.json b/jsr.json index d506de751..e4a5c02b2 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@gleanwork/api-client", - "version": "0.20.25", + "version": "0.20.26", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 7661a881f..194a9eb51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gleanwork/api-client", - "version": "0.20.25", + "version": "0.20.26", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gleanwork/api-client", - "version": "0.20.25", + "version": "0.20.26", "dependencies": { "zod": "^3.25.0 || ^4.6.6" }, diff --git a/package.json b/package.json index fdad49ed6..192c4ca03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gleanwork/api-client", - "version": "0.20.25", + "version": "0.20.26", "author": "Speakeasy", "tshy": { "sourceDialects": [ diff --git a/src/__tests__/messages.test.ts b/src/__tests__/messages.test.ts index f39054346..a4785e318 100644 --- a/src/__tests__/messages.test.ts +++ b/src/__tests__/messages.test.ts @@ -20,7 +20,7 @@ test("Messages Messages", async () => { idType: "CONVERSATION_ID", id: "", timestampMillis: 558834, - datasource: "FACEBOOKWORKPLACE", + datasource: "SLACK", }); expect(result).toBeDefined(); }); diff --git a/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentid.go b/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentid.go index 3e6332858..bc7488be1 100644 --- a/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentid.go +++ b/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentid.go @@ -48,9 +48,14 @@ func testPlatformAgentsGetPlatformAgentsGet0(w http.ResponseWriter, req *http.Re } var respBody *components.PlatformAgentGetResponse = &components.PlatformAgentGetResponse{ Agent: components.PlatformAgent{ - AgentID: "mho4lwzylcozgoc2", Name: "HR Policy Agent", + AgentID: "mho4lwzylcozgoc2", Capabilities: components.PlatformAgentCapabilities{}, + Subagents: []components.PlatformSubagent{ + components.PlatformSubagent{ + Name: "HR Policy Agent", + }, + }, }, RequestID: "", } diff --git a/src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchat.go b/src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchat.go index e2243868c..85c74eb18 100644 --- a/src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchat.go +++ b/src/__tests__/mockserver/internal/handler/pathpostrestapiv1getchat.go @@ -75,7 +75,7 @@ func testGetchatGetchat0(w http.ResponseWriter, req *http.Request) { components.ChatMessage{ AgentConfig: &components.AgentConfig{ Agent: components.AgentEnumDefault.ToPointer(), - Mode: components.ModeDefault.ToPointer(), + Mode: components.AgentConfigModeDefault.ToPointer(), }, Author: components.AuthorUser.ToPointer(), Citations: []components.ChatMessageCitation{ @@ -629,8 +629,8 @@ func testGetchatGetchat0(w http.ResponseWriter, req *http.Request) { Roles: []components.UserRoleSpecification{}, SourceDocumentSpec: types.Pointer(components.CreateDocumentSpecUnionDocumentSpec3( components.DocumentSpec3{ - UgcType: components.DocumentSpecUgcType1Shortcuts, - ContentID: 602763, + UgcType: components.DocumentSpecUgcType1Announcements, + ContentID: 848009, }, )), SourceType: components.AnswerSourceTypeAssistant.ToPointer(), diff --git a/src/__tests__/mockserver/internal/sdk/models/components/agentconfig.go b/src/__tests__/mockserver/internal/sdk/models/components/agentconfig.go index 49fee887c..ae655bc1a 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/agentconfig.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/agentconfig.go @@ -47,18 +47,18 @@ func (e *AgentEnum) UnmarshalJSON(data []byte) error { } } -// Mode - Top level modes to run GleanChat in. -type Mode string +// AgentConfigMode - Top level modes to run GleanChat in. +type AgentConfigMode string const ( - ModeDefault Mode = "DEFAULT" - ModeQuick Mode = "QUICK" + AgentConfigModeDefault AgentConfigMode = "DEFAULT" + AgentConfigModeQuick AgentConfigMode = "QUICK" ) -func (e Mode) ToPointer() *Mode { +func (e AgentConfigMode) ToPointer() *AgentConfigMode { return &e } -func (e *Mode) UnmarshalJSON(data []byte) error { +func (e *AgentConfigMode) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -67,10 +67,10 @@ func (e *Mode) UnmarshalJSON(data []byte) error { case "DEFAULT": fallthrough case "QUICK": - *e = Mode(v) + *e = AgentConfigMode(v) return nil default: - return fmt.Errorf("invalid value for Mode: %v", v) + return fmt.Errorf("invalid value for AgentConfigMode: %v", v) } } @@ -81,7 +81,7 @@ type AgentConfig struct { // The types of tools that the agent is allowed to use. Only works with FAST and ADVANCED `agent` values ToolSets *ToolSets `json:"toolSets,omitempty"` // Top level modes to run GleanChat in. - Mode *Mode `json:"mode,omitempty"` + Mode *AgentConfigMode `json:"mode,omitempty"` // Whether the agent should create an image. UseImageGeneration *bool `json:"useImageGeneration,omitempty"` } @@ -100,7 +100,7 @@ func (o *AgentConfig) GetToolSets() *ToolSets { return o.ToolSets } -func (o *AgentConfig) GetMode() *Mode { +func (o *AgentConfig) GetMode() *AgentConfigMode { if o == nil { return nil } diff --git a/src/__tests__/mockserver/internal/sdk/models/components/insightsoverviewresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/insightsoverviewresponse.go index c4aa4a9a6..70daa2ecb 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/insightsoverviewresponse.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/insightsoverviewresponse.go @@ -24,7 +24,7 @@ type InsightsOverviewResponse struct { UgcSummary *CurrentActiveUsers `json:"ugcSummary,omitempty"` // Unix timestamp of the last update for the insights data in the response. LastUpdatedTs *int64 `json:"lastUpdatedTs,omitempty"` - // Number of current employees in the specified departments who had signed up 7 days before the latest day of insights data. Compare with totalSignups for week-over-week signup change. + // Number of current employees in the specified departments who had signed up 7 days before the latest day of insights data. Compare with totalSignups for week-over-week signup change. Included even when zero. TotalSignupsWeekAgo *int64 `json:"totalSignupsWeekAgo,omitempty"` // Search session satisfaction rate, over the specified time period in the specified departments. // diff --git a/src/__tests__/mockserver/internal/sdk/models/components/messagesrequest.go b/src/__tests__/mockserver/internal/sdk/models/components/messagesrequest.go index 856590e1c..6c6d497ee 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/messagesrequest.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/messagesrequest.go @@ -38,18 +38,18 @@ func (e *IDType) UnmarshalJSON(data []byte) error { } } -// Direction - The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. -type Direction string +// MessagesRequestDirection - The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. +type MessagesRequestDirection string const ( - DirectionOlder Direction = "OLDER" - DirectionNewer Direction = "NEWER" + MessagesRequestDirectionOlder MessagesRequestDirection = "OLDER" + MessagesRequestDirectionNewer MessagesRequestDirection = "NEWER" ) -func (e Direction) ToPointer() *Direction { +func (e MessagesRequestDirection) ToPointer() *MessagesRequestDirection { return &e } -func (e *Direction) UnmarshalJSON(data []byte) error { +func (e *MessagesRequestDirection) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -58,10 +58,10 @@ func (e *Direction) UnmarshalJSON(data []byte) error { case "OLDER": fallthrough case "NEWER": - *e = Direction(v) + *e = MessagesRequestDirection(v) return nil default: - return fmt.Errorf("invalid value for Direction: %v", v) + return fmt.Errorf("invalid value for MessagesRequestDirection: %v", v) } } @@ -109,7 +109,7 @@ type MessagesRequest struct { // Id for the for the workspace in case of multiple workspaces. WorkspaceID *string `json:"workspaceId,omitempty"` // The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. - Direction *Direction `json:"direction,omitempty"` + Direction *MessagesRequestDirection `json:"direction,omitempty"` // Timestamp in millis of the reference message. Only applicable when using a message_id. TimestampMillis *int64 `json:"timestampMillis,omitempty"` // Whether to include root message in response. @@ -141,7 +141,7 @@ func (o *MessagesRequest) GetWorkspaceID() *string { return o.WorkspaceID } -func (o *MessagesRequest) GetDirection() *Direction { +func (o *MessagesRequest) GetDirection() *MessagesRequestDirection { if o == nil { return nil } diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagent.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagent.go index e81931eb8..ea2339fc3 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformagent.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagent.go @@ -3,23 +3,67 @@ package components +import ( + "mockserver/internal/sdk/utils" + "time" +) + +// PlatformAgent - An agent available to the authenticated user. type PlatformAgent struct { - // ID of the agent. - AgentID string `json:"agent_id"` - // Name of the agent. + // Human-readable name. Name string `json:"name"` - // Description of the agent. + // Description of the agent's purpose and behavior. Description *string `json:"description,omitempty"` + // System prompt the agent follows. + Instructions *string `json:"instructions,omitempty"` + // Skills defined inline. + Skills []PlatformAgentSkill `json:"skills,omitempty"` + // Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + // + Dependencies []PlatformAgentDependency `json:"dependencies,omitempty"` + // Tool providers and the subset of their tools available to the agent. + Tools []PlatformAgentToolset `json:"tools,omitempty"` + // Glean Search configuration. When omitted, Glean Search is disabled for the agent. An empty object searches all company knowledge available to the invoking user. Populated lists restrict search to the union of the listed datasource instances and URLs. + // + GleanSearchConfig *PlatformAgentGleanSearchConfig `json:"glean_search_config,omitempty"` + // Agentic model the agent runs on and its reasoning effort. + Model *PlatformAgentLlmModel `json:"model,omitempty"` + // Service credentials the agent uses to call tools. + ServiceCredentials []PlatformAgentServiceCredential `json:"service_credentials,omitempty"` + // ID of the agent. + AgentID string `json:"agent_id"` // Agent metadata. Metadata map[string]any `json:"metadata,omitempty"` Capabilities PlatformAgentCapabilities `json:"capabilities"` + // Whether the agent acts with its own identity instead of the invoking user's. Cannot be changed after the agent is created. + // + UseAgentIdentity *bool `json:"use_agent_identity,omitempty"` + // Messaging channels the agent is deployed to. Requires `use_agent_identity`. + Channels *PlatformAgentChannels `json:"channels,omitempty"` + // Subagents the agent dispatches work to. Subagents cannot contain subagents. + // + Subagents []PlatformSubagent `json:"subagents,omitempty"` + // How the agent is invoked. Applies to top-level agents only. + Trigger *PlatformAgentTrigger `json:"trigger,omitempty"` + // A lightweight reference to a person, used where a payload merely points at someone. + CreatedBy *PlatformPersonReference `json:"created_by,omitempty"` + // A lightweight reference to a person, used where a payload merely points at someone. + UpdatedBy *PlatformPersonReference `json:"updated_by,omitempty"` + // Time the agent was created. + CreatedAt *time.Time `json:"created_at,omitempty"` + // Time the agent was last updated. + UpdatedAt *time.Time `json:"updated_at,omitempty"` } -func (o *PlatformAgent) GetAgentID() string { - if o == nil { - return "" +func (p PlatformAgent) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformAgent) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"name", "agent_id", "capabilities"}); err != nil { + return err } - return o.AgentID + return nil } func (o *PlatformAgent) GetName() string { @@ -36,6 +80,62 @@ func (o *PlatformAgent) GetDescription() *string { return o.Description } +func (o *PlatformAgent) GetInstructions() *string { + if o == nil { + return nil + } + return o.Instructions +} + +func (o *PlatformAgent) GetSkills() []PlatformAgentSkill { + if o == nil { + return nil + } + return o.Skills +} + +func (o *PlatformAgent) GetDependencies() []PlatformAgentDependency { + if o == nil { + return nil + } + return o.Dependencies +} + +func (o *PlatformAgent) GetTools() []PlatformAgentToolset { + if o == nil { + return nil + } + return o.Tools +} + +func (o *PlatformAgent) GetGleanSearchConfig() *PlatformAgentGleanSearchConfig { + if o == nil { + return nil + } + return o.GleanSearchConfig +} + +func (o *PlatformAgent) GetModel() *PlatformAgentLlmModel { + if o == nil { + return nil + } + return o.Model +} + +func (o *PlatformAgent) GetServiceCredentials() []PlatformAgentServiceCredential { + if o == nil { + return nil + } + return o.ServiceCredentials +} + +func (o *PlatformAgent) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + func (o *PlatformAgent) GetMetadata() map[string]any { if o == nil { return nil @@ -49,3 +149,59 @@ func (o *PlatformAgent) GetCapabilities() PlatformAgentCapabilities { } return o.Capabilities } + +func (o *PlatformAgent) GetUseAgentIdentity() *bool { + if o == nil { + return nil + } + return o.UseAgentIdentity +} + +func (o *PlatformAgent) GetChannels() *PlatformAgentChannels { + if o == nil { + return nil + } + return o.Channels +} + +func (o *PlatformAgent) GetSubagents() []PlatformSubagent { + if o == nil { + return nil + } + return o.Subagents +} + +func (o *PlatformAgent) GetTrigger() *PlatformAgentTrigger { + if o == nil { + return nil + } + return o.Trigger +} + +func (o *PlatformAgent) GetCreatedBy() *PlatformPersonReference { + if o == nil { + return nil + } + return o.CreatedBy +} + +func (o *PlatformAgent) GetUpdatedBy() *PlatformPersonReference { + if o == nil { + return nil + } + return o.UpdatedBy +} + +func (o *PlatformAgent) GetCreatedAt() *time.Time { + if o == nil { + return nil + } + return o.CreatedAt +} + +func (o *PlatformAgent) GetUpdatedAt() *time.Time { + if o == nil { + return nil + } + return o.UpdatedAt +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentchannels.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentchannels.go new file mode 100644 index 000000000..5668fad91 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentchannels.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 561f6b58901b + +package components + +// PlatformAgentChannels - Messaging channels the agent is deployed to. Requires `use_agent_identity`. +type PlatformAgentChannels struct { + // Slack deployment of the agent. + Slack *PlatformAgentSlackChannel `json:"slack,omitempty"` +} + +func (o *PlatformAgentChannels) GetSlack() *PlatformAgentSlackChannel { + if o == nil { + return nil + } + return o.Slack +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttrigger.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttrigger.go new file mode 100644 index 000000000..e204cb0a5 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttrigger.go @@ -0,0 +1,55 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 0a6221a0d57c + +package components + +// PlatformAgentContentTrigger - A subscribed document event and the filters that narrow it. +type PlatformAgentContentTrigger struct { + // Event source in enum form, for example `JIRA`. + Datasource string `json:"datasource"` + // Subscribed event identifier, for example `JIRA_TICKET_CREATED`. + TemplateID string `json:"template_id"` + // Document type the entry watches. + DocumentType *string `json:"document_type,omitempty"` + // Seconds before an event time carried in the document at which the agent runs. Pre-event triggers only. + // + TimeOffsetSeconds *int `json:"time_offset_seconds,omitempty"` + // Filters on the document that fired the event. Every filter must match for the entry to fire. Without filters, every event for this entry fires. + // + Filters []PlatformAgentContentTriggerFilter `json:"filters,omitempty"` +} + +func (o *PlatformAgentContentTrigger) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *PlatformAgentContentTrigger) GetTemplateID() string { + if o == nil { + return "" + } + return o.TemplateID +} + +func (o *PlatformAgentContentTrigger) GetDocumentType() *string { + if o == nil { + return nil + } + return o.DocumentType +} + +func (o *PlatformAgentContentTrigger) GetTimeOffsetSeconds() *int { + if o == nil { + return nil + } + return o.TimeOffsetSeconds +} + +func (o *PlatformAgentContentTrigger) GetFilters() []PlatformAgentContentTriggerFilter { + if o == nil { + return nil + } + return o.Filters +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilter.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilter.go new file mode 100644 index 000000000..6bc96126c --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilter.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: b9b22350db77 + +package components + +// PlatformAgentContentTriggerFilter - A filter on the document that fired a content trigger. Values are ORed. +type PlatformAgentContentTriggerFilter struct { + // `TITLE` or `CONTENT` for the document's title or body, or a facet key. + Field string `json:"field"` + // Operator of a content trigger filter. + Operator PlatformAgentContentTriggerFilterOperator `json:"operator"` + // Match values. Required except for FIELD_CHANGED. + Values []string `json:"values,omitempty"` +} + +func (o *PlatformAgentContentTriggerFilter) GetField() string { + if o == nil { + return "" + } + return o.Field +} + +func (o *PlatformAgentContentTriggerFilter) GetOperator() PlatformAgentContentTriggerFilterOperator { + if o == nil { + return PlatformAgentContentTriggerFilterOperator("") + } + return o.Operator +} + +func (o *PlatformAgentContentTriggerFilter) GetValues() []string { + if o == nil { + return nil + } + return o.Values +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilteroperator.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilteroperator.go new file mode 100644 index 000000000..75bf076b4 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilteroperator.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: b89baf290fda + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformAgentContentTriggerFilterOperator - Operator of a content trigger filter. +type PlatformAgentContentTriggerFilterOperator string + +const ( + PlatformAgentContentTriggerFilterOperatorIsOneOf PlatformAgentContentTriggerFilterOperator = "IS_ONE_OF" + PlatformAgentContentTriggerFilterOperatorIsNotOneOf PlatformAgentContentTriggerFilterOperator = "IS_NOT_ONE_OF" + PlatformAgentContentTriggerFilterOperatorContains PlatformAgentContentTriggerFilterOperator = "CONTAINS" + PlatformAgentContentTriggerFilterOperatorFieldChanged PlatformAgentContentTriggerFilterOperator = "FIELD_CHANGED" +) + +func (e PlatformAgentContentTriggerFilterOperator) ToPointer() *PlatformAgentContentTriggerFilterOperator { + return &e +} +func (e *PlatformAgentContentTriggerFilterOperator) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "IS_ONE_OF": + fallthrough + case "IS_NOT_ONE_OF": + fallthrough + case "CONTAINS": + fallthrough + case "FIELD_CHANGED": + *e = PlatformAgentContentTriggerFilterOperator(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformAgentContentTriggerFilterOperator: %v", v) + } +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentdependency.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentdependency.go new file mode 100644 index 000000000..465bf89d5 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentdependency.go @@ -0,0 +1,59 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 0f1c0846aee2 + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformAgentDependencyType - Type of a published artifact referenced as a dependency. +type PlatformAgentDependencyType string + +const ( + PlatformAgentDependencyTypeSkill PlatformAgentDependencyType = "SKILL" + PlatformAgentDependencyTypeAgent PlatformAgentDependencyType = "AGENT" +) + +func (e PlatformAgentDependencyType) ToPointer() *PlatformAgentDependencyType { + return &e +} +func (e *PlatformAgentDependencyType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "SKILL": + fallthrough + case "AGENT": + *e = PlatformAgentDependencyType(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformAgentDependencyType: %v", v) + } +} + +// PlatformAgentDependency - A published artifact the agent references by platform ID. +type PlatformAgentDependency struct { + // ID of the referenced artifact: the `skill_id` of a published skill when `type` is SKILL, or the `agent_id` of a published agent when `type` is AGENT. + // + ID string `json:"id"` + // Type of a published artifact referenced as a dependency. + Type PlatformAgentDependencyType `json:"type"` +} + +func (o *PlatformAgentDependency) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *PlatformAgentDependency) GetType() PlatformAgentDependencyType { + if o == nil { + return PlatformAgentDependencyType("") + } + return o.Type +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentgetresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentgetresponse.go index 5b6736658..0bda6da05 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformagentgetresponse.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentgetresponse.go @@ -4,6 +4,7 @@ package components type PlatformAgentGetResponse struct { + // An agent available to the authenticated user. Agent PlatformAgent `json:"agent"` // Platform-generated request ID for support correlation. RequestID string `json:"request_id"` diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentgleansearchconfig.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentgleansearchconfig.go new file mode 100644 index 000000000..8bf2303e1 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentgleansearchconfig.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: d204c67d7f0a + +package components + +// PlatformAgentGleanSearchConfig - Glean Search configuration. When omitted, Glean Search is disabled for the agent. An empty object searches all company knowledge available to the invoking user. Populated lists restrict search to the union of the listed datasource instances and URLs. +type PlatformAgentGleanSearchConfig struct { + // ID of a knowledge profile whose permissions Glean Search uses instead of the invoking user's permissions. + // + KnowledgeProfileID *string `json:"knowledge_profile_id,omitempty"` + // Datasource instance names that search is restricted to. Each name selects one instance, not every instance of a datasource type. + // + DatasourceInstances []string `json:"datasource_instances,omitempty"` + // Document or folder URLs that search is restricted to. Folder URLs include every document contained in the folder. + // + Urls []string `json:"urls,omitempty"` +} + +func (o *PlatformAgentGleanSearchConfig) GetKnowledgeProfileID() *string { + if o == nil { + return nil + } + return o.KnowledgeProfileID +} + +func (o *PlatformAgentGleanSearchConfig) GetDatasourceInstances() []string { + if o == nil { + return nil + } + return o.DatasourceInstances +} + +func (o *PlatformAgentGleanSearchConfig) GetUrls() []string { + if o == nil { + return nil + } + return o.Urls +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentinputfield.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentinputfield.go new file mode 100644 index 000000000..f69b96163 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentinputfield.go @@ -0,0 +1,101 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 298b7ad613d0 + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformAgentInputFieldType - Type of an agent input field. +type PlatformAgentInputFieldType string + +const ( + PlatformAgentInputFieldTypeText PlatformAgentInputFieldType = "TEXT" + PlatformAgentInputFieldTypeSelect PlatformAgentInputFieldType = "SELECT" + PlatformAgentInputFieldTypeDate PlatformAgentInputFieldType = "DATE" + PlatformAgentInputFieldTypeDocument PlatformAgentInputFieldType = "DOCUMENT" +) + +func (e PlatformAgentInputFieldType) ToPointer() *PlatformAgentInputFieldType { + return &e +} +func (e *PlatformAgentInputFieldType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "TEXT": + fallthrough + case "SELECT": + fallthrough + case "DATE": + fallthrough + case "DOCUMENT": + *e = PlatformAgentInputFieldType(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformAgentInputFieldType: %v", v) + } +} + +// PlatformAgentInputField - A typed input of the agent, referenced from the instructions as `[[display_name]]`. +type PlatformAgentInputField struct { + // Label of the field and its placeholder name in the instructions. Unique within the agent. + DisplayName string `json:"display_name"` + // Type of an agent input field. + Type PlatformAgentInputFieldType `json:"type"` + // Helper text describing the field. + Description *string `json:"description,omitempty"` + // Pre-filled value. For SELECT fields, one of the option values. For DATE fields, a `YYYY-MM-DD` date. + // + DefaultValue *string `json:"default_value,omitempty"` + // Whether the field accepts empty input. Defaults to false. + IsOptional *bool `json:"is_optional,omitempty"` + // Choices of a SELECT field. + Options []PlatformAgentInputFieldOption `json:"options,omitempty"` +} + +func (o *PlatformAgentInputField) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformAgentInputField) GetType() PlatformAgentInputFieldType { + if o == nil { + return PlatformAgentInputFieldType("") + } + return o.Type +} + +func (o *PlatformAgentInputField) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PlatformAgentInputField) GetDefaultValue() *string { + if o == nil { + return nil + } + return o.DefaultValue +} + +func (o *PlatformAgentInputField) GetIsOptional() *bool { + if o == nil { + return nil + } + return o.IsOptional +} + +func (o *PlatformAgentInputField) GetOptions() []PlatformAgentInputFieldOption { + if o == nil { + return nil + } + return o.Options +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentinputfieldoption.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentinputfieldoption.go new file mode 100644 index 000000000..35696f7ea --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentinputfieldoption.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: dc755e97b0a0 + +package components + +// PlatformAgentInputFieldOption - A choice of a SELECT input field. +type PlatformAgentInputFieldOption struct { + // Value substituted into the field's placeholder. + Value string `json:"value"` +} + +func (o *PlatformAgentInputFieldOption) GetValue() string { + if o == nil { + return "" + } + return o.Value +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentllmmodel.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentllmmodel.go new file mode 100644 index 000000000..4dae99b1d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentllmmodel.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: f45719bfd8e8 + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformAgentLlmModelMode - Reasoning effort per turn. Defaults to ADVANCED. +type PlatformAgentLlmModelMode string + +const ( + PlatformAgentLlmModelModeAdvanced PlatformAgentLlmModelMode = "ADVANCED" + PlatformAgentLlmModelModeFast PlatformAgentLlmModelMode = "FAST" +) + +func (e PlatformAgentLlmModelMode) ToPointer() *PlatformAgentLlmModelMode { + return &e +} +func (e *PlatformAgentLlmModelMode) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ADVANCED": + fallthrough + case "FAST": + *e = PlatformAgentLlmModelMode(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformAgentLlmModelMode: %v", v) + } +} + +// PlatformAgentLlmModel - Agentic model the agent runs on and its reasoning effort. +type PlatformAgentLlmModel struct { + // Agentic model set ID. When omitted, the tenant default is used. + ModelSetID *string `json:"model_set_id,omitempty"` + // Reasoning effort per turn. Defaults to ADVANCED. + Mode *PlatformAgentLlmModelMode `json:"mode,omitempty"` + // Whether the agent follows model upgrades. When omitted, a model with a `model_set_id` is pinned, and a model without one follows the tenant default. + // + AutoUpgrade *bool `json:"auto_upgrade,omitempty"` +} + +func (o *PlatformAgentLlmModel) GetModelSetID() *string { + if o == nil { + return nil + } + return o.ModelSetID +} + +func (o *PlatformAgentLlmModel) GetMode() *PlatformAgentLlmModelMode { + if o == nil { + return nil + } + return o.Mode +} + +func (o *PlatformAgentLlmModel) GetAutoUpgrade() *bool { + if o == nil { + return nil + } + return o.AutoUpgrade +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentprompt.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentprompt.go new file mode 100644 index 000000000..565327bbc --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentprompt.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 8dbbaece194c + +package components + +// PlatformAgentPrompt - A conversation starter whose template is sent as the first chat message. +type PlatformAgentPrompt struct { + // Short title of the conversation starter. + DisplayName string `json:"display_name"` + // Chat message that starts the conversation. May contain `[[variable_name]]` placeholders. + // + Template string `json:"template"` +} + +func (o *PlatformAgentPrompt) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformAgentPrompt) GetTemplate() string { + if o == nil { + return "" + } + return o.Template +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentschedule.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentschedule.go new file mode 100644 index 000000000..8c1de389e --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentschedule.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: bad3e930982d + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +// PlatformAgentSchedule - Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents. +type PlatformAgentSchedule struct { + // Five-field Unix cron expression, for example `0 9 * * 1-5`. + Frequency string `json:"frequency"` + // IANA time zone name, for example `America/Los_Angeles`. + Timezone string `json:"timezone"` + // ISO 8601 timestamp with an explicit offset before which the schedule stays dormant. + // + StartAt *time.Time `json:"start_at,omitempty"` +} + +func (p PlatformAgentSchedule) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformAgentSchedule) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"frequency", "timezone"}); err != nil { + return err + } + return nil +} + +func (o *PlatformAgentSchedule) GetFrequency() string { + if o == nil { + return "" + } + return o.Frequency +} + +func (o *PlatformAgentSchedule) GetTimezone() string { + if o == nil { + return "" + } + return o.Timezone +} + +func (o *PlatformAgentSchedule) GetStartAt() *time.Time { + if o == nil { + return nil + } + return o.StartAt +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentselectedtool.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentselectedtool.go new file mode 100644 index 000000000..662a5ce28 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentselectedtool.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 79ebba8d16d2 + +package components + +// PlatformAgentSelectedTool - A tool selected from a tool provider. +type PlatformAgentSelectedTool struct { + // Name of the tool within its provider. + DisplayName string `json:"display_name"` +} + +func (o *PlatformAgentSelectedTool) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentservicecredential.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentservicecredential.go new file mode 100644 index 000000000..a5be5aca2 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentservicecredential.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: c5cce25aab58 + +package components + +// PlatformAgentServiceCredential - A service credential the agent uses. +type PlatformAgentServiceCredential struct { + // ID of the service credential. + ServiceCredentialID string `json:"service_credential_id"` +} + +func (o *PlatformAgentServiceCredential) GetServiceCredentialID() string { + if o == nil { + return "" + } + return o.ServiceCredentialID +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentskill.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentskill.go new file mode 100644 index 000000000..8aa14ce79 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentskill.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 1a227b06b9f1 + +package components + +// PlatformAgentSkill - A skill defined inline in the agent. Reference a published skill through `dependencies` instead. +type PlatformAgentSkill struct { + // Human-readable skill name. + DisplayName string `json:"display_name"` + // Main skill content, inlined from `SKILL.md`. + MainContent string `json:"main_content"` + // Additional files bundled in the skill folder. + Files []PlatformSkillSourcePreviewFile `json:"files,omitempty"` +} + +func (o *PlatformAgentSkill) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformAgentSkill) GetMainContent() string { + if o == nil { + return "" + } + return o.MainContent +} + +func (o *PlatformAgentSkill) GetFiles() []PlatformSkillSourcePreviewFile { + if o == nil { + return nil + } + return o.Files +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentslackchannel.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentslackchannel.go new file mode 100644 index 000000000..cb9491251 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentslackchannel.go @@ -0,0 +1,44 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: a1e54f251440 + +package components + +// PlatformAgentSlackChannel - Slack deployment of the agent. +type PlatformAgentSlackChannel struct { + // ID of the service credential for the Slack app. + ServiceCredentialID *string `json:"service_credential_id,omitempty"` + // Slack channels the agent is mapped to. + ChannelMappings []PlatformAgentSlackChannelMapping `json:"channel_mappings,omitempty"` + // Instructions that decide which messages the agent engages with. + EngagementFilterInstructions *string `json:"engagement_filter_instructions,omitempty"` + // Whether the agent responds to mentions in channels that are not mapped. + AllowMentionsOutsideChannelMappings *bool `json:"allow_mentions_outside_channel_mappings,omitempty"` +} + +func (o *PlatformAgentSlackChannel) GetServiceCredentialID() *string { + if o == nil { + return nil + } + return o.ServiceCredentialID +} + +func (o *PlatformAgentSlackChannel) GetChannelMappings() []PlatformAgentSlackChannelMapping { + if o == nil { + return nil + } + return o.ChannelMappings +} + +func (o *PlatformAgentSlackChannel) GetEngagementFilterInstructions() *string { + if o == nil { + return nil + } + return o.EngagementFilterInstructions +} + +func (o *PlatformAgentSlackChannel) GetAllowMentionsOutsideChannelMappings() *bool { + if o == nil { + return nil + } + return o.AllowMentionsOutsideChannelMappings +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentslackchannelmapping.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentslackchannelmapping.go new file mode 100644 index 000000000..f80575bf9 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentslackchannelmapping.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 082dfbab916e + +package components + +// PlatformAgentSlackChannelMapping - A Slack channel the agent is mapped to. +type PlatformAgentSlackChannelMapping struct { + // ID of the Slack channel. + ChannelID string `json:"channel_id"` + // Whether the agent engages with messages without being mentioned. + AutoEngage *bool `json:"auto_engage,omitempty"` +} + +func (o *PlatformAgentSlackChannelMapping) GetChannelID() string { + if o == nil { + return "" + } + return o.ChannelID +} + +func (o *PlatformAgentSlackChannelMapping) GetAutoEngage() *bool { + if o == nil { + return nil + } + return o.AutoEngage +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagenttoolset.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagenttoolset.go new file mode 100644 index 000000000..34a083e19 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagenttoolset.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 0473b35a380a + +package components + +// CustomisationData - Settings applied to every tool in this provider entry. +type CustomisationData struct { + // Whether tools in this entry run without asking the user for confirmation. Defaults to false. + // + SkipConfirmation *bool `json:"skip_confirmation,omitempty"` +} + +func (o *CustomisationData) GetSkipConfirmation() *bool { + if o == nil { + return nil + } + return o.SkipConfirmation +} + +// PlatformAgentToolset - A tool provider and the subset of its tools available to the agent. +type PlatformAgentToolset struct { + // ID of the tool provider, or `native` for built-in Glean tools. + ToolProviderID string `json:"tool_provider_id"` + // Tools from the provider that are exposed to the agent. + SelectedTools []PlatformAgentSelectedTool `json:"selected_tools,omitempty"` + // Settings applied to every tool in this provider entry. + CustomisationData *CustomisationData `json:"customisation_data,omitempty"` +} + +func (o *PlatformAgentToolset) GetToolProviderID() string { + if o == nil { + return "" + } + return o.ToolProviderID +} + +func (o *PlatformAgentToolset) GetSelectedTools() []PlatformAgentSelectedTool { + if o == nil { + return nil + } + return o.SelectedTools +} + +func (o *PlatformAgentToolset) GetCustomisationData() *CustomisationData { + if o == nil { + return nil + } + return o.CustomisationData +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagenttrigger.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagenttrigger.go new file mode 100644 index 000000000..18d9ba2e7 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagenttrigger.go @@ -0,0 +1,102 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 55cf237dce20 + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformAgentTriggerType - Invocation mode of the agent. +type PlatformAgentTriggerType string + +const ( + PlatformAgentTriggerTypeChatMessage PlatformAgentTriggerType = "CHAT_MESSAGE" + PlatformAgentTriggerTypeInputForm PlatformAgentTriggerType = "INPUT_FORM" + PlatformAgentTriggerTypeContentTrigger PlatformAgentTriggerType = "CONTENT_TRIGGER" +) + +func (e PlatformAgentTriggerType) ToPointer() *PlatformAgentTriggerType { + return &e +} +func (e *PlatformAgentTriggerType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "CHAT_MESSAGE": + fallthrough + case "INPUT_FORM": + fallthrough + case "CONTENT_TRIGGER": + *e = PlatformAgentTriggerType(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformAgentTriggerType: %v", v) + } +} + +// Content - Document events that run a CONTENT_TRIGGER agent. +type Content struct { + // Event subscriptions. The agent runs when any entry matches. + Triggers []PlatformAgentContentTrigger `json:"triggers"` +} + +func (o *Content) GetTriggers() []PlatformAgentContentTrigger { + if o == nil { + return []PlatformAgentContentTrigger{} + } + return o.Triggers +} + +// PlatformAgentTrigger - How the agent is invoked. Applies to top-level agents only. +type PlatformAgentTrigger struct { + // Invocation mode of the agent. + Type PlatformAgentTriggerType `json:"type"` + // Typed inputs collected when the agent is invoked. Valid for INPUT_FORM and CONTENT_TRIGGER. An INPUT_FORM trigger without input fields runs with no input. + // + InputFields []PlatformAgentInputField `json:"input_fields,omitempty"` + // Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents. + Schedule *PlatformAgentSchedule `json:"schedule,omitempty"` + // Conversation starters. Valid only for CHAT_MESSAGE. + Prompts []PlatformAgentPrompt `json:"prompts,omitempty"` + // Document events that run a CONTENT_TRIGGER agent. + Content *Content `json:"content,omitempty"` +} + +func (o *PlatformAgentTrigger) GetType() PlatformAgentTriggerType { + if o == nil { + return PlatformAgentTriggerType("") + } + return o.Type +} + +func (o *PlatformAgentTrigger) GetInputFields() []PlatformAgentInputField { + if o == nil { + return nil + } + return o.InputFields +} + +func (o *PlatformAgentTrigger) GetSchedule() *PlatformAgentSchedule { + if o == nil { + return nil + } + return o.Schedule +} + +func (o *PlatformAgentTrigger) GetPrompts() []PlatformAgentPrompt { + if o == nil { + return nil + } + return o.Prompts +} + +func (o *PlatformAgentTrigger) GetContent() *Content { + if o == nil { + return nil + } + return o.Content +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillsourcepreviewfile.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillsourcepreviewfile.go index 18a28adb3..6f84aeb0c 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformskillsourcepreviewfile.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillsourcepreviewfile.go @@ -7,6 +7,7 @@ import ( "mockserver/internal/sdk/utils" ) +// PlatformSkillSourcePreviewFile - A supporting file bundled with a skill. type PlatformSkillSourcePreviewFile struct { // Relative path within the skill bundle. Path string `json:"path"` diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformsubagent.go b/src/__tests__/mockserver/internal/sdk/models/components/platformsubagent.go new file mode 100644 index 000000000..f9f623b66 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformsubagent.go @@ -0,0 +1,101 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 835bb81b7d6b + +package components + +// PlatformSubagent - An isolated execution unit that its parent agent dispatches work to. A subagent has no trigger, channels, or subagents of its own, and its dependencies may only reference published skills. +type PlatformSubagent struct { + // Human-readable name. + Name string `json:"name"` + // Description of the agent's purpose and behavior. + Description *string `json:"description,omitempty"` + // System prompt the agent follows. + Instructions *string `json:"instructions,omitempty"` + // Skills defined inline. + Skills []PlatformAgentSkill `json:"skills,omitempty"` + // Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + // + Dependencies []PlatformAgentDependency `json:"dependencies,omitempty"` + // Tool providers and the subset of their tools available to the agent. + Tools []PlatformAgentToolset `json:"tools,omitempty"` + // Glean Search configuration. When omitted, Glean Search is disabled for the agent. An empty object searches all company knowledge available to the invoking user. Populated lists restrict search to the union of the listed datasource instances and URLs. + // + GleanSearchConfig *PlatformAgentGleanSearchConfig `json:"glean_search_config,omitempty"` + // Agentic model the agent runs on and its reasoning effort. + Model *PlatformAgentLlmModel `json:"model,omitempty"` + // Service credentials the agent uses to call tools. + ServiceCredentials []PlatformAgentServiceCredential `json:"service_credentials,omitempty"` + // ID of the subagent, unique within its parent agent. It is not an agent ID and cannot be used with other Agents APIs. + // + SubagentID *string `json:"subagent_id,omitempty"` +} + +func (o *PlatformSubagent) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *PlatformSubagent) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PlatformSubagent) GetInstructions() *string { + if o == nil { + return nil + } + return o.Instructions +} + +func (o *PlatformSubagent) GetSkills() []PlatformAgentSkill { + if o == nil { + return nil + } + return o.Skills +} + +func (o *PlatformSubagent) GetDependencies() []PlatformAgentDependency { + if o == nil { + return nil + } + return o.Dependencies +} + +func (o *PlatformSubagent) GetTools() []PlatformAgentToolset { + if o == nil { + return nil + } + return o.Tools +} + +func (o *PlatformSubagent) GetGleanSearchConfig() *PlatformAgentGleanSearchConfig { + if o == nil { + return nil + } + return o.GleanSearchConfig +} + +func (o *PlatformSubagent) GetModel() *PlatformAgentLlmModel { + if o == nil { + return nil + } + return o.Model +} + +func (o *PlatformSubagent) GetServiceCredentials() []PlatformAgentServiceCredential { + if o == nil { + return nil + } + return o.ServiceCredentials +} + +func (o *PlatformSubagent) GetSubagentID() *string { + if o == nil { + return nil + } + return o.SubagentID +} diff --git a/src/__tests__/summarize.test.ts b/src/__tests__/summarize.test.ts index f5f3af075..f81553d2f 100644 --- a/src/__tests__/summarize.test.ts +++ b/src/__tests__/summarize.test.ts @@ -19,11 +19,11 @@ test("Summarize Summarize", async () => { const result = await glean.client.documents.summarize({ documentSpecs: [ { - id: "", + url: "https://carefree-object.net/", }, { ugcType: "CHATS", - contentId: 668664, + contentId: 255860, }, ], }); diff --git a/src/lib/config.ts b/src/lib/config.ts index 5bd45856a..2b677cf41 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.9.0", - sdkVersion: "0.20.25", + sdkVersion: "0.20.26", genVersion: "2.961.1", userAgent: - "speakeasy-sdk/typescript 0.20.25 2.961.1 0.9.0 @gleanwork/api-client", + "speakeasy-sdk/typescript 0.20.26 2.961.1 0.9.0 @gleanwork/api-client", } as const; diff --git a/src/models/components/agentconfig.ts b/src/models/components/agentconfig.ts index 0c4f93835..86201da9f 100644 --- a/src/models/components/agentconfig.ts +++ b/src/models/components/agentconfig.ts @@ -53,7 +53,7 @@ export type AgentEnum = OpenEnum; /** * Top level modes to run GleanChat in. */ -export const Mode = { +export const AgentConfigMode = { /** * Used if no mode supplied. */ @@ -66,7 +66,7 @@ export const Mode = { /** * Top level modes to run GleanChat in. */ -export type Mode = OpenEnum; +export type AgentConfigMode = OpenEnum; /** * Describes the agent that executes the request. @@ -83,7 +83,7 @@ export type AgentConfig = { /** * Top level modes to run GleanChat in. */ - mode?: Mode | undefined; + mode?: AgentConfigMode | undefined; /** * Whether the agent should create an image. */ @@ -104,11 +104,17 @@ export const AgentEnum$outboundSchema: z.ZodType< > = openEnums.outboundSchema(AgentEnum); /** @internal */ -export const Mode$inboundSchema: z.ZodType = - openEnums.inboundSchema(Mode); +export const AgentConfigMode$inboundSchema: z.ZodType< + AgentConfigMode, + z.ZodTypeDef, + unknown +> = openEnums.inboundSchema(AgentConfigMode); /** @internal */ -export const Mode$outboundSchema: z.ZodType = - openEnums.outboundSchema(Mode); +export const AgentConfigMode$outboundSchema: z.ZodType< + string, + z.ZodTypeDef, + AgentConfigMode +> = openEnums.outboundSchema(AgentConfigMode); /** @internal */ export const AgentConfig$inboundSchema: z.ZodType< @@ -118,7 +124,7 @@ export const AgentConfig$inboundSchema: z.ZodType< > = z.object({ agent: AgentEnum$inboundSchema.optional(), toolSets: ToolSets$inboundSchema.optional(), - mode: Mode$inboundSchema.optional(), + mode: AgentConfigMode$inboundSchema.optional(), useImageGeneration: z.boolean().optional(), }); /** @internal */ @@ -137,7 +143,7 @@ export const AgentConfig$outboundSchema: z.ZodType< > = z.object({ agent: AgentEnum$outboundSchema.optional(), toolSets: ToolSets$outboundSchema.optional(), - mode: Mode$outboundSchema.optional(), + mode: AgentConfigMode$outboundSchema.optional(), useImageGeneration: z.boolean().optional(), }); diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 0d5f1769d..7b1263520 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -366,8 +366,18 @@ export * from "./platformactionsummary.js"; export * from "./platformadminagentfilter.js"; export * from "./platformagent.js"; export * from "./platformagentcapabilities.js"; +export * from "./platformagentchannels.js"; +export * from "./platformagentcontenttrigger.js"; +export * from "./platformagentcontenttriggerfilter.js"; +export * from "./platformagentcontenttriggerfilteroperator.js"; +export * from "./platformagentdependency.js"; export * from "./platformagentexecutionstatus.js"; export * from "./platformagentgetresponse.js"; +export * from "./platformagentgleansearchconfig.js"; +export * from "./platformagentinputfield.js"; +export * from "./platformagentinputfieldoption.js"; +export * from "./platformagentllmmodel.js"; +export * from "./platformagentprompt.js"; export * from "./platformagentrun.js"; export * from "./platformagentrunapprovaldecision.js"; export * from "./platformagentruncancellationrequest.js"; @@ -378,9 +388,17 @@ export * from "./platformagentrunresponsesrequest.js"; export * from "./platformagentrunstate.js"; export * from "./platformagentruntoolapproval.js"; export * from "./platformagentrunwaitresponse.js"; +export * from "./platformagentschedule.js"; export * from "./platformagentschemasresponse.js"; +export * from "./platformagentselectedtool.js"; +export * from "./platformagentservicecredential.js"; +export * from "./platformagentskill.js"; +export * from "./platformagentslackchannel.js"; +export * from "./platformagentslackchannelmapping.js"; export * from "./platformagentssearchrequest.js"; export * from "./platformagentssearchresponse.js"; +export * from "./platformagenttoolset.js"; +export * from "./platformagenttrigger.js"; export * from "./platformauthenticationsuggestion.js"; export * from "./platformchat.js"; export * from "./platformchatcitationannotation.js"; @@ -505,6 +523,7 @@ export * from "./platformskillversioncreaterequest.js"; export * from "./platformskillversioncreateresponse.js"; export * from "./platformskillversiongetresponse.js"; export * from "./platformskillversionslistresponse.js"; +export * from "./platformsubagent.js"; export * from "./platformtimerange.js"; export * from "./platformtrigger.js"; export * from "./platformtriggerauthoutput.js"; diff --git a/src/models/components/insightsoverviewresponse.ts b/src/models/components/insightsoverviewresponse.ts index 0aed293db..d95ff1428 100644 --- a/src/models/components/insightsoverviewresponse.ts +++ b/src/models/components/insightsoverviewresponse.ts @@ -62,7 +62,7 @@ export type InsightsOverviewResponse = { */ lastUpdatedTs?: number | undefined; /** - * Number of current employees in the specified departments who had signed up 7 days before the latest day of insights data. Compare with totalSignups for week-over-week signup change. + * Number of current employees in the specified departments who had signed up 7 days before the latest day of insights data. Compare with totalSignups for week-over-week signup change. Included even when zero. */ totalSignupsWeekAgo?: number | undefined; /** diff --git a/src/models/components/messagesrequest.ts b/src/models/components/messagesrequest.ts index a8f0e820f..a526df3ab 100644 --- a/src/models/components/messagesrequest.ts +++ b/src/models/components/messagesrequest.ts @@ -22,14 +22,16 @@ export type IdType = ClosedEnum; /** * The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. */ -export const Direction = { +export const MessagesRequestDirection = { Older: "OLDER", Newer: "NEWER", } as const; /** * The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. */ -export type Direction = ClosedEnum; +export type MessagesRequestDirection = ClosedEnum< + typeof MessagesRequestDirection +>; /** * The type of the data source. @@ -62,7 +64,7 @@ export type MessagesRequest = { /** * The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. */ - direction?: Direction | undefined; + direction?: MessagesRequestDirection | undefined; /** * Timestamp in millis of the reference message. Only applicable when using a message_id. */ @@ -86,8 +88,9 @@ export const IdType$outboundSchema: z.ZodNativeEnum = z .nativeEnum(IdType); /** @internal */ -export const Direction$outboundSchema: z.ZodNativeEnum = z - .nativeEnum(Direction); +export const MessagesRequestDirection$outboundSchema: z.ZodNativeEnum< + typeof MessagesRequestDirection +> = z.nativeEnum(MessagesRequestDirection); /** @internal */ export const Datasource$outboundSchema: z.ZodNativeEnum = z @@ -114,7 +117,7 @@ export const MessagesRequest$outboundSchema: z.ZodType< idType: IdType$outboundSchema, id: z.string(), workspaceId: z.string().optional(), - direction: Direction$outboundSchema.optional(), + direction: MessagesRequestDirection$outboundSchema.optional(), timestampMillis: z.number().int().optional(), includeRootMessage: z.boolean().optional(), datasource: Datasource$outboundSchema, diff --git a/src/models/components/platformagent.ts b/src/models/components/platformagent.ts index 89363931e..d32338605 100644 --- a/src/models/components/platformagent.ts +++ b/src/models/components/platformagent.ts @@ -11,25 +11,136 @@ import { PlatformAgentCapabilities, PlatformAgentCapabilities$inboundSchema, } from "./platformagentcapabilities.js"; +import { + PlatformAgentChannels, + PlatformAgentChannels$inboundSchema, +} from "./platformagentchannels.js"; +import { + PlatformAgentDependency, + PlatformAgentDependency$inboundSchema, +} from "./platformagentdependency.js"; +import { + PlatformAgentGleanSearchConfig, + PlatformAgentGleanSearchConfig$inboundSchema, +} from "./platformagentgleansearchconfig.js"; +import { + PlatformAgentLlmModel, + PlatformAgentLlmModel$inboundSchema, +} from "./platformagentllmmodel.js"; +import { + PlatformAgentServiceCredential, + PlatformAgentServiceCredential$inboundSchema, +} from "./platformagentservicecredential.js"; +import { + PlatformAgentSkill, + PlatformAgentSkill$inboundSchema, +} from "./platformagentskill.js"; +import { + PlatformAgentToolset, + PlatformAgentToolset$inboundSchema, +} from "./platformagenttoolset.js"; +import { + PlatformAgentTrigger, + PlatformAgentTrigger$inboundSchema, +} from "./platformagenttrigger.js"; +import { + PlatformPersonReference, + PlatformPersonReference$inboundSchema, +} from "./platformpersonreference.js"; +import { + PlatformSubagent, + PlatformSubagent$inboundSchema, +} from "./platformsubagent.js"; +/** + * An agent available to the authenticated user. + */ export type PlatformAgent = { /** - * ID of the agent. - */ - agent_id: string; - /** - * Name of the agent. + * Human-readable name. */ name: string; /** - * Description of the agent. + * Description of the agent's purpose and behavior. */ description?: string | undefined; + /** + * System prompt the agent follows. + */ + instructions?: string | undefined; + /** + * Skills defined inline. + */ + skills?: Array | undefined; + /** + * Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + * + * @remarks + */ + dependencies?: Array | undefined; + /** + * Tool providers and the subset of their tools available to the agent. + */ + tools?: Array | undefined; + /** + * Glean Search configuration. When omitted, Glean Search is disabled for the agent. An empty object searches all company knowledge available to the invoking user. Populated lists restrict search to the union of the listed datasource instances and URLs. + * + * @remarks + */ + glean_search_config?: PlatformAgentGleanSearchConfig | undefined; + /** + * Agentic model the agent runs on and its reasoning effort. + */ + model?: PlatformAgentLlmModel | undefined; + /** + * Service credentials the agent uses to call tools. + */ + service_credentials?: Array | undefined; + /** + * ID of the agent. + */ + agent_id: string; /** * Agent metadata. */ metadata?: { [k: string]: any } | undefined; capabilities: PlatformAgentCapabilities; + /** + * Whether the agent acts with its own identity instead of the invoking user's. Cannot be changed after the agent is created. + * + * @remarks + */ + use_agent_identity?: boolean | undefined; + /** + * Messaging channels the agent is deployed to. Requires `use_agent_identity`. + */ + channels?: PlatformAgentChannels | undefined; + /** + * Subagents the agent dispatches work to. Subagents cannot contain subagents. + * + * @remarks + */ + subagents?: Array | undefined; + /** + * How the agent is invoked. Applies to top-level agents only. + */ + trigger?: PlatformAgentTrigger | undefined; + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + created_by?: PlatformPersonReference | undefined; + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + updated_by?: PlatformPersonReference | undefined; + /** + * Time the agent was created. + */ + created_at?: Date | undefined; + /** + * Time the agent was last updated. + */ + updated_at?: Date | undefined; }; /** @internal */ @@ -38,11 +149,29 @@ export const PlatformAgent$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - agent_id: z.string(), name: z.string(), description: z.string().optional(), + instructions: z.string().optional(), + skills: z.array(PlatformAgentSkill$inboundSchema).optional(), + dependencies: z.array(PlatformAgentDependency$inboundSchema).optional(), + tools: z.array(PlatformAgentToolset$inboundSchema).optional(), + glean_search_config: PlatformAgentGleanSearchConfig$inboundSchema.optional(), + model: PlatformAgentLlmModel$inboundSchema.optional(), + service_credentials: z.array(PlatformAgentServiceCredential$inboundSchema) + .optional(), + agent_id: z.string(), metadata: z.record(z.any()).optional(), capabilities: PlatformAgentCapabilities$inboundSchema, + use_agent_identity: z.boolean().optional(), + channels: PlatformAgentChannels$inboundSchema.optional(), + subagents: z.array(PlatformSubagent$inboundSchema).optional(), + trigger: PlatformAgentTrigger$inboundSchema.optional(), + created_by: PlatformPersonReference$inboundSchema.optional(), + updated_by: PlatformPersonReference$inboundSchema.optional(), + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), }); export function platformAgentFromJSON( diff --git a/src/models/components/platformagentchannels.ts b/src/models/components/platformagentchannels.ts new file mode 100644 index 000000000..3e4c86287 --- /dev/null +++ b/src/models/components/platformagentchannels.ts @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 68d03ace1a89 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentSlackChannel, + PlatformAgentSlackChannel$inboundSchema, +} from "./platformagentslackchannel.js"; + +/** + * Messaging channels the agent is deployed to. Requires `use_agent_identity`. + */ +export type PlatformAgentChannels = { + /** + * Slack deployment of the agent. + */ + slack?: PlatformAgentSlackChannel | undefined; +}; + +/** @internal */ +export const PlatformAgentChannels$inboundSchema: z.ZodType< + PlatformAgentChannels, + z.ZodTypeDef, + unknown +> = z.object({ + slack: PlatformAgentSlackChannel$inboundSchema.optional(), +}); + +export function platformAgentChannelsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentChannels$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentChannels' from JSON`, + ); +} diff --git a/src/models/components/platformagentcontenttrigger.ts b/src/models/components/platformagentcontenttrigger.ts new file mode 100644 index 000000000..b45b6fdf2 --- /dev/null +++ b/src/models/components/platformagentcontenttrigger.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 98f85ff3afb5 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentContentTriggerFilter, + PlatformAgentContentTriggerFilter$inboundSchema, +} from "./platformagentcontenttriggerfilter.js"; + +/** + * A subscribed document event and the filters that narrow it. + */ +export type PlatformAgentContentTrigger = { + /** + * Event source in enum form, for example `JIRA`. + */ + datasource: string; + /** + * Subscribed event identifier, for example `JIRA_TICKET_CREATED`. + */ + template_id: string; + /** + * Document type the entry watches. + */ + document_type?: string | undefined; + /** + * Seconds before an event time carried in the document at which the agent runs. Pre-event triggers only. + * + * @remarks + */ + time_offset_seconds?: number | undefined; + /** + * Filters on the document that fired the event. Every filter must match for the entry to fire. Without filters, every event for this entry fires. + * + * @remarks + */ + filters?: Array | undefined; +}; + +/** @internal */ +export const PlatformAgentContentTrigger$inboundSchema: z.ZodType< + PlatformAgentContentTrigger, + z.ZodTypeDef, + unknown +> = z.object({ + datasource: z.string(), + template_id: z.string(), + document_type: z.string().optional(), + time_offset_seconds: z.number().int().optional(), + filters: z.array(PlatformAgentContentTriggerFilter$inboundSchema).optional(), +}); + +export function platformAgentContentTriggerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentContentTrigger$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentContentTrigger' from JSON`, + ); +} diff --git a/src/models/components/platformagentcontenttriggerfilter.ts b/src/models/components/platformagentcontenttriggerfilter.ts new file mode 100644 index 000000000..c7246007a --- /dev/null +++ b/src/models/components/platformagentcontenttriggerfilter.ts @@ -0,0 +1,52 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fb29f8842ec1 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentContentTriggerFilterOperator, + PlatformAgentContentTriggerFilterOperator$inboundSchema, +} from "./platformagentcontenttriggerfilteroperator.js"; + +/** + * A filter on the document that fired a content trigger. Values are ORed. + */ +export type PlatformAgentContentTriggerFilter = { + /** + * `TITLE` or `CONTENT` for the document's title or body, or a facet key. + */ + field: string; + /** + * Operator of a content trigger filter. + */ + operator: PlatformAgentContentTriggerFilterOperator; + /** + * Match values. Required except for FIELD_CHANGED. + */ + values?: Array | undefined; +}; + +/** @internal */ +export const PlatformAgentContentTriggerFilter$inboundSchema: z.ZodType< + PlatformAgentContentTriggerFilter, + z.ZodTypeDef, + unknown +> = z.object({ + field: z.string(), + operator: PlatformAgentContentTriggerFilterOperator$inboundSchema, + values: z.array(z.string()).optional(), +}); + +export function platformAgentContentTriggerFilterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentContentTriggerFilter$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentContentTriggerFilter' from JSON`, + ); +} diff --git a/src/models/components/platformagentcontenttriggerfilteroperator.ts b/src/models/components/platformagentcontenttriggerfilteroperator.ts new file mode 100644 index 000000000..4f25ef941 --- /dev/null +++ b/src/models/components/platformagentcontenttriggerfilteroperator.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 74c2dcb7d8be + */ + +import * as z from "zod/v3"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; + +/** + * Operator of a content trigger filter. + */ +export const PlatformAgentContentTriggerFilterOperator = { + /** + * The field equals one of the values. + */ + IsOneOf: "IS_ONE_OF", + /** + * The field equals none of the values. Not valid for TITLE or CONTENT. + */ + IsNotOneOf: "IS_NOT_ONE_OF", + /** + * The field contains one of the values. + */ + Contains: "CONTAINS", + /** + * The field changed in the event. Not valid for TITLE or CONTENT. + */ + FieldChanged: "FIELD_CHANGED", +} as const; +/** + * Operator of a content trigger filter. + */ +export type PlatformAgentContentTriggerFilterOperator = OpenEnum< + typeof PlatformAgentContentTriggerFilterOperator +>; + +/** @internal */ +export const PlatformAgentContentTriggerFilterOperator$inboundSchema: z.ZodType< + PlatformAgentContentTriggerFilterOperator, + z.ZodTypeDef, + unknown +> = openEnums.inboundSchema(PlatformAgentContentTriggerFilterOperator); diff --git a/src/models/components/platformagentdependency.ts b/src/models/components/platformagentdependency.ts new file mode 100644 index 000000000..d8b06a0ab --- /dev/null +++ b/src/models/components/platformagentdependency.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 189680202ecb + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Type of a published artifact referenced as a dependency. + */ +export const PlatformAgentDependencyType = { + /** + * A published skill. + */ + Skill: "SKILL", + /** + * A published agent. Not valid for subagents. + */ + Agent: "AGENT", +} as const; +/** + * Type of a published artifact referenced as a dependency. + */ +export type PlatformAgentDependencyType = OpenEnum< + typeof PlatformAgentDependencyType +>; + +/** + * A published artifact the agent references by platform ID. + */ +export type PlatformAgentDependency = { + /** + * ID of the referenced artifact: the `skill_id` of a published skill when `type` is SKILL, or the `agent_id` of a published agent when `type` is AGENT. + * + * @remarks + */ + id: string; + /** + * Type of a published artifact referenced as a dependency. + */ + type: PlatformAgentDependencyType; +}; + +/** @internal */ +export const PlatformAgentDependencyType$inboundSchema: z.ZodType< + PlatformAgentDependencyType, + z.ZodTypeDef, + unknown +> = openEnums.inboundSchema(PlatformAgentDependencyType); + +/** @internal */ +export const PlatformAgentDependency$inboundSchema: z.ZodType< + PlatformAgentDependency, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + type: PlatformAgentDependencyType$inboundSchema, +}); + +export function platformAgentDependencyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentDependency$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentDependency' from JSON`, + ); +} diff --git a/src/models/components/platformagentgetresponse.ts b/src/models/components/platformagentgetresponse.ts index 62e5470bb..1667a324e 100644 --- a/src/models/components/platformagentgetresponse.ts +++ b/src/models/components/platformagentgetresponse.ts @@ -10,6 +10,9 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { PlatformAgent, PlatformAgent$inboundSchema } from "./platformagent.js"; export type PlatformAgentGetResponse = { + /** + * An agent available to the authenticated user. + */ agent: PlatformAgent; /** * Platform-generated request ID for support correlation. diff --git a/src/models/components/platformagentgleansearchconfig.ts b/src/models/components/platformagentgleansearchconfig.ts new file mode 100644 index 000000000..7f1d98555 --- /dev/null +++ b/src/models/components/platformagentgleansearchconfig.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e283baa6b9d2 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Glean Search configuration. When omitted, Glean Search is disabled for the agent. An empty object searches all company knowledge available to the invoking user. Populated lists restrict search to the union of the listed datasource instances and URLs. + * + * @remarks + */ +export type PlatformAgentGleanSearchConfig = { + /** + * ID of a knowledge profile whose permissions Glean Search uses instead of the invoking user's permissions. + * + * @remarks + */ + knowledge_profile_id?: string | undefined; + /** + * Datasource instance names that search is restricted to. Each name selects one instance, not every instance of a datasource type. + * + * @remarks + */ + datasource_instances?: Array | undefined; + /** + * Document or folder URLs that search is restricted to. Folder URLs include every document contained in the folder. + * + * @remarks + */ + urls?: Array | undefined; +}; + +/** @internal */ +export const PlatformAgentGleanSearchConfig$inboundSchema: z.ZodType< + PlatformAgentGleanSearchConfig, + z.ZodTypeDef, + unknown +> = z.object({ + knowledge_profile_id: z.string().optional(), + datasource_instances: z.array(z.string()).optional(), + urls: z.array(z.string()).optional(), +}); + +export function platformAgentGleanSearchConfigFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentGleanSearchConfig$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentGleanSearchConfig' from JSON`, + ); +} diff --git a/src/models/components/platformagentinputfield.ts b/src/models/components/platformagentinputfield.ts new file mode 100644 index 000000000..c66359167 --- /dev/null +++ b/src/models/components/platformagentinputfield.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9d8c26c6dea6 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentInputFieldOption, + PlatformAgentInputFieldOption$inboundSchema, +} from "./platformagentinputfieldoption.js"; + +/** + * Type of an agent input field. + */ +export const PlatformAgentInputFieldType = { + /** + * Free-form text. + */ + Text: "TEXT", + /** + * One choice from the declared options. + */ + Select: "SELECT", + /** + * Calendar date in `YYYY-MM-DD` format. + */ + Date: "DATE", + /** + * Glean file ID of an uploaded file. + */ + Document: "DOCUMENT", +} as const; +/** + * Type of an agent input field. + */ +export type PlatformAgentInputFieldType = OpenEnum< + typeof PlatformAgentInputFieldType +>; + +/** + * A typed input of the agent, referenced from the instructions as `[[display_name]]`. + * + * @remarks + */ +export type PlatformAgentInputField = { + /** + * Label of the field and its placeholder name in the instructions. Unique within the agent. + */ + display_name: string; + /** + * Type of an agent input field. + */ + type: PlatformAgentInputFieldType; + /** + * Helper text describing the field. + */ + description?: string | undefined; + /** + * Pre-filled value. For SELECT fields, one of the option values. For DATE fields, a `YYYY-MM-DD` date. + * + * @remarks + */ + default_value?: string | undefined; + /** + * Whether the field accepts empty input. Defaults to false. + */ + is_optional?: boolean | undefined; + /** + * Choices of a SELECT field. + */ + options?: Array | undefined; +}; + +/** @internal */ +export const PlatformAgentInputFieldType$inboundSchema: z.ZodType< + PlatformAgentInputFieldType, + z.ZodTypeDef, + unknown +> = openEnums.inboundSchema(PlatformAgentInputFieldType); + +/** @internal */ +export const PlatformAgentInputField$inboundSchema: z.ZodType< + PlatformAgentInputField, + z.ZodTypeDef, + unknown +> = z.object({ + display_name: z.string(), + type: PlatformAgentInputFieldType$inboundSchema, + description: z.string().optional(), + default_value: z.string().optional(), + is_optional: z.boolean().optional(), + options: z.array(PlatformAgentInputFieldOption$inboundSchema).optional(), +}); + +export function platformAgentInputFieldFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentInputField$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentInputField' from JSON`, + ); +} diff --git a/src/models/components/platformagentinputfieldoption.ts b/src/models/components/platformagentinputfieldoption.ts new file mode 100644 index 000000000..d99158f65 --- /dev/null +++ b/src/models/components/platformagentinputfieldoption.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 62d5035c76c4 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * A choice of a SELECT input field. + */ +export type PlatformAgentInputFieldOption = { + /** + * Value substituted into the field's placeholder. + */ + value: string; +}; + +/** @internal */ +export const PlatformAgentInputFieldOption$inboundSchema: z.ZodType< + PlatformAgentInputFieldOption, + z.ZodTypeDef, + unknown +> = z.object({ + value: z.string(), +}); + +export function platformAgentInputFieldOptionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentInputFieldOption$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentInputFieldOption' from JSON`, + ); +} diff --git a/src/models/components/platformagentllmmodel.ts b/src/models/components/platformagentllmmodel.ts new file mode 100644 index 000000000..d42bd0d8c --- /dev/null +++ b/src/models/components/platformagentllmmodel.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 37c99e724e66 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Reasoning effort per turn. Defaults to ADVANCED. + */ +export const PlatformAgentLlmModelMode = { + /** + * High reasoning effort. + */ + Advanced: "ADVANCED", + /** + * Low reasoning effort for latency-sensitive, narrow tasks. + */ + Fast: "FAST", +} as const; +/** + * Reasoning effort per turn. Defaults to ADVANCED. + */ +export type PlatformAgentLlmModelMode = OpenEnum< + typeof PlatformAgentLlmModelMode +>; + +/** + * Agentic model the agent runs on and its reasoning effort. + */ +export type PlatformAgentLlmModel = { + /** + * Agentic model set ID. When omitted, the tenant default is used. + */ + model_set_id?: string | undefined; + /** + * Reasoning effort per turn. Defaults to ADVANCED. + */ + mode?: PlatformAgentLlmModelMode | undefined; + /** + * Whether the agent follows model upgrades. When omitted, a model with a `model_set_id` is pinned, and a model without one follows the tenant default. + * + * @remarks + */ + auto_upgrade?: boolean | undefined; +}; + +/** @internal */ +export const PlatformAgentLlmModelMode$inboundSchema: z.ZodType< + PlatformAgentLlmModelMode, + z.ZodTypeDef, + unknown +> = openEnums.inboundSchema(PlatformAgentLlmModelMode); + +/** @internal */ +export const PlatformAgentLlmModel$inboundSchema: z.ZodType< + PlatformAgentLlmModel, + z.ZodTypeDef, + unknown +> = z.object({ + model_set_id: z.string().optional(), + mode: PlatformAgentLlmModelMode$inboundSchema.optional(), + auto_upgrade: z.boolean().optional(), +}); + +export function platformAgentLlmModelFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentLlmModel$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentLlmModel' from JSON`, + ); +} diff --git a/src/models/components/platformagentprompt.ts b/src/models/components/platformagentprompt.ts new file mode 100644 index 000000000..cc398d44b --- /dev/null +++ b/src/models/components/platformagentprompt.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 93b1e7909ff9 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * A conversation starter whose template is sent as the first chat message. + */ +export type PlatformAgentPrompt = { + /** + * Short title of the conversation starter. + */ + display_name: string; + /** + * Chat message that starts the conversation. May contain `[[variable_name]]` placeholders. + * + * @remarks + */ + template: string; +}; + +/** @internal */ +export const PlatformAgentPrompt$inboundSchema: z.ZodType< + PlatformAgentPrompt, + z.ZodTypeDef, + unknown +> = z.object({ + display_name: z.string(), + template: z.string(), +}); + +export function platformAgentPromptFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentPrompt$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentPrompt' from JSON`, + ); +} diff --git a/src/models/components/platformagentschedule.ts b/src/models/components/platformagentschedule.ts new file mode 100644 index 000000000..dc8c69550 --- /dev/null +++ b/src/models/components/platformagentschedule.ts @@ -0,0 +1,51 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a020cde6af1e + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents. + */ +export type PlatformAgentSchedule = { + /** + * Five-field Unix cron expression, for example `0 9 * * 1-5`. + */ + frequency: string; + /** + * IANA time zone name, for example `America/Los_Angeles`. + */ + timezone: string; + /** + * ISO 8601 timestamp with an explicit offset before which the schedule stays dormant. + * + * @remarks + */ + start_at?: Date | undefined; +}; + +/** @internal */ +export const PlatformAgentSchedule$inboundSchema: z.ZodType< + PlatformAgentSchedule, + z.ZodTypeDef, + unknown +> = z.object({ + frequency: z.string(), + timezone: z.string(), + start_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), +}); + +export function platformAgentScheduleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentSchedule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentSchedule' from JSON`, + ); +} diff --git a/src/models/components/platformagentselectedtool.ts b/src/models/components/platformagentselectedtool.ts new file mode 100644 index 000000000..05c9b69fe --- /dev/null +++ b/src/models/components/platformagentselectedtool.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: db58dcb63436 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * A tool selected from a tool provider. + */ +export type PlatformAgentSelectedTool = { + /** + * Name of the tool within its provider. + */ + display_name: string; +}; + +/** @internal */ +export const PlatformAgentSelectedTool$inboundSchema: z.ZodType< + PlatformAgentSelectedTool, + z.ZodTypeDef, + unknown +> = z.object({ + display_name: z.string(), +}); + +export function platformAgentSelectedToolFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentSelectedTool$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentSelectedTool' from JSON`, + ); +} diff --git a/src/models/components/platformagentservicecredential.ts b/src/models/components/platformagentservicecredential.ts new file mode 100644 index 000000000..f3f8663d7 --- /dev/null +++ b/src/models/components/platformagentservicecredential.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2d71237c5696 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * A service credential the agent uses. + */ +export type PlatformAgentServiceCredential = { + /** + * ID of the service credential. + */ + service_credential_id: string; +}; + +/** @internal */ +export const PlatformAgentServiceCredential$inboundSchema: z.ZodType< + PlatformAgentServiceCredential, + z.ZodTypeDef, + unknown +> = z.object({ + service_credential_id: z.string(), +}); + +export function platformAgentServiceCredentialFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentServiceCredential$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentServiceCredential' from JSON`, + ); +} diff --git a/src/models/components/platformagentskill.ts b/src/models/components/platformagentskill.ts new file mode 100644 index 000000000..6c7ae3956 --- /dev/null +++ b/src/models/components/platformagentskill.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f7e3a84a2b87 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformSkillSourcePreviewFile, + PlatformSkillSourcePreviewFile$inboundSchema, +} from "./platformskillsourcepreviewfile.js"; + +/** + * A skill defined inline in the agent. Reference a published skill through `dependencies` instead. + * + * @remarks + */ +export type PlatformAgentSkill = { + /** + * Human-readable skill name. + */ + display_name: string; + /** + * Main skill content, inlined from `SKILL.md`. + */ + main_content: string; + /** + * Additional files bundled in the skill folder. + */ + files?: Array | undefined; +}; + +/** @internal */ +export const PlatformAgentSkill$inboundSchema: z.ZodType< + PlatformAgentSkill, + z.ZodTypeDef, + unknown +> = z.object({ + display_name: z.string(), + main_content: z.string(), + files: z.array(PlatformSkillSourcePreviewFile$inboundSchema).optional(), +}); + +export function platformAgentSkillFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentSkill$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentSkill' from JSON`, + ); +} diff --git a/src/models/components/platformagentslackchannel.ts b/src/models/components/platformagentslackchannel.ts new file mode 100644 index 000000000..74f978b75 --- /dev/null +++ b/src/models/components/platformagentslackchannel.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 84e30ed0a22c + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentSlackChannelMapping, + PlatformAgentSlackChannelMapping$inboundSchema, +} from "./platformagentslackchannelmapping.js"; + +/** + * Slack deployment of the agent. + */ +export type PlatformAgentSlackChannel = { + /** + * ID of the service credential for the Slack app. + */ + service_credential_id?: string | undefined; + /** + * Slack channels the agent is mapped to. + */ + channel_mappings?: Array | undefined; + /** + * Instructions that decide which messages the agent engages with. + */ + engagement_filter_instructions?: string | undefined; + /** + * Whether the agent responds to mentions in channels that are not mapped. + */ + allow_mentions_outside_channel_mappings?: boolean | undefined; +}; + +/** @internal */ +export const PlatformAgentSlackChannel$inboundSchema: z.ZodType< + PlatformAgentSlackChannel, + z.ZodTypeDef, + unknown +> = z.object({ + service_credential_id: z.string().optional(), + channel_mappings: z.array(PlatformAgentSlackChannelMapping$inboundSchema) + .optional(), + engagement_filter_instructions: z.string().optional(), + allow_mentions_outside_channel_mappings: z.boolean().optional(), +}); + +export function platformAgentSlackChannelFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentSlackChannel$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentSlackChannel' from JSON`, + ); +} diff --git a/src/models/components/platformagentslackchannelmapping.ts b/src/models/components/platformagentslackchannelmapping.ts new file mode 100644 index 000000000..dc1c8605a --- /dev/null +++ b/src/models/components/platformagentslackchannelmapping.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3ad3276af67f + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * A Slack channel the agent is mapped to. + */ +export type PlatformAgentSlackChannelMapping = { + /** + * ID of the Slack channel. + */ + channel_id: string; + /** + * Whether the agent engages with messages without being mentioned. + */ + auto_engage?: boolean | undefined; +}; + +/** @internal */ +export const PlatformAgentSlackChannelMapping$inboundSchema: z.ZodType< + PlatformAgentSlackChannelMapping, + z.ZodTypeDef, + unknown +> = z.object({ + channel_id: z.string(), + auto_engage: z.boolean().optional(), +}); + +export function platformAgentSlackChannelMappingFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentSlackChannelMapping$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentSlackChannelMapping' from JSON`, + ); +} diff --git a/src/models/components/platformagenttoolset.ts b/src/models/components/platformagenttoolset.ts new file mode 100644 index 000000000..25d5f6c45 --- /dev/null +++ b/src/models/components/platformagenttoolset.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 795c11ac05f1 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentSelectedTool, + PlatformAgentSelectedTool$inboundSchema, +} from "./platformagentselectedtool.js"; + +/** + * Settings applied to every tool in this provider entry. + */ +export type CustomisationData = { + /** + * Whether tools in this entry run without asking the user for confirmation. Defaults to false. + * + * @remarks + */ + skip_confirmation?: boolean | undefined; +}; + +/** + * A tool provider and the subset of its tools available to the agent. + */ +export type PlatformAgentToolset = { + /** + * ID of the tool provider, or `native` for built-in Glean tools. + */ + tool_provider_id: string; + /** + * Tools from the provider that are exposed to the agent. + */ + selected_tools?: Array | undefined; + /** + * Settings applied to every tool in this provider entry. + */ + customisation_data?: CustomisationData | undefined; +}; + +/** @internal */ +export const CustomisationData$inboundSchema: z.ZodType< + CustomisationData, + z.ZodTypeDef, + unknown +> = z.object({ + skip_confirmation: z.boolean().optional(), +}); + +export function customisationDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CustomisationData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CustomisationData' from JSON`, + ); +} + +/** @internal */ +export const PlatformAgentToolset$inboundSchema: z.ZodType< + PlatformAgentToolset, + z.ZodTypeDef, + unknown +> = z.object({ + tool_provider_id: z.string(), + selected_tools: z.array(PlatformAgentSelectedTool$inboundSchema).optional(), + customisation_data: z.lazy(() => CustomisationData$inboundSchema).optional(), +}); + +export function platformAgentToolsetFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentToolset$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentToolset' from JSON`, + ); +} diff --git a/src/models/components/platformagenttrigger.ts b/src/models/components/platformagenttrigger.ts new file mode 100644 index 000000000..14d0488a0 --- /dev/null +++ b/src/models/components/platformagenttrigger.ts @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4c96f9182580 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentContentTrigger, + PlatformAgentContentTrigger$inboundSchema, +} from "./platformagentcontenttrigger.js"; +import { + PlatformAgentInputField, + PlatformAgentInputField$inboundSchema, +} from "./platformagentinputfield.js"; +import { + PlatformAgentPrompt, + PlatformAgentPrompt$inboundSchema, +} from "./platformagentprompt.js"; +import { + PlatformAgentSchedule, + PlatformAgentSchedule$inboundSchema, +} from "./platformagentschedule.js"; + +/** + * Invocation mode of the agent. + */ +export const PlatformAgentTriggerType = { + /** + * The user converses with the agent. + */ + ChatMessage: "CHAT_MESSAGE", + /** + * The agent runs on typed input fields, or with no input when none are declared. + */ + InputForm: "INPUT_FORM", + /** + * The agent runs on a document event. + */ + ContentTrigger: "CONTENT_TRIGGER", +} as const; +/** + * Invocation mode of the agent. + */ +export type PlatformAgentTriggerType = OpenEnum< + typeof PlatformAgentTriggerType +>; + +/** + * Document events that run a CONTENT_TRIGGER agent. + */ +export type Content = { + /** + * Event subscriptions. The agent runs when any entry matches. + */ + triggers: Array; +}; + +/** + * How the agent is invoked. Applies to top-level agents only. + */ +export type PlatformAgentTrigger = { + /** + * Invocation mode of the agent. + */ + type: PlatformAgentTriggerType; + /** + * Typed inputs collected when the agent is invoked. Valid for INPUT_FORM and CONTENT_TRIGGER. An INPUT_FORM trigger without input fields runs with no input. + * + * @remarks + */ + input_fields?: Array | undefined; + /** + * Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents. + */ + schedule?: PlatformAgentSchedule | undefined; + /** + * Conversation starters. Valid only for CHAT_MESSAGE. + */ + prompts?: Array | undefined; + /** + * Document events that run a CONTENT_TRIGGER agent. + */ + content?: Content | undefined; +}; + +/** @internal */ +export const PlatformAgentTriggerType$inboundSchema: z.ZodType< + PlatformAgentTriggerType, + z.ZodTypeDef, + unknown +> = openEnums.inboundSchema(PlatformAgentTriggerType); + +/** @internal */ +export const Content$inboundSchema: z.ZodType = + z.object({ + triggers: z.array(PlatformAgentContentTrigger$inboundSchema), + }); + +export function contentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Content$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Content' from JSON`, + ); +} + +/** @internal */ +export const PlatformAgentTrigger$inboundSchema: z.ZodType< + PlatformAgentTrigger, + z.ZodTypeDef, + unknown +> = z.object({ + type: PlatformAgentTriggerType$inboundSchema, + input_fields: z.array(PlatformAgentInputField$inboundSchema).optional(), + schedule: PlatformAgentSchedule$inboundSchema.optional(), + prompts: z.array(PlatformAgentPrompt$inboundSchema).optional(), + content: z.lazy(() => Content$inboundSchema).optional(), +}); + +export function platformAgentTriggerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentTrigger$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentTrigger' from JSON`, + ); +} diff --git a/src/models/components/platformskillsourcepreviewfile.ts b/src/models/components/platformskillsourcepreviewfile.ts index 79ebcdf2b..629e64bf4 100644 --- a/src/models/components/platformskillsourcepreviewfile.ts +++ b/src/models/components/platformskillsourcepreviewfile.ts @@ -8,6 +8,9 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +/** + * A supporting file bundled with a skill. + */ export type PlatformSkillSourcePreviewFile = { /** * Relative path within the skill bundle. diff --git a/src/models/components/platformsubagent.ts b/src/models/components/platformsubagent.ts new file mode 100644 index 000000000..bb27ae00a --- /dev/null +++ b/src/models/components/platformsubagent.ts @@ -0,0 +1,116 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 36d7853f8fed + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentDependency, + PlatformAgentDependency$inboundSchema, +} from "./platformagentdependency.js"; +import { + PlatformAgentGleanSearchConfig, + PlatformAgentGleanSearchConfig$inboundSchema, +} from "./platformagentgleansearchconfig.js"; +import { + PlatformAgentLlmModel, + PlatformAgentLlmModel$inboundSchema, +} from "./platformagentllmmodel.js"; +import { + PlatformAgentServiceCredential, + PlatformAgentServiceCredential$inboundSchema, +} from "./platformagentservicecredential.js"; +import { + PlatformAgentSkill, + PlatformAgentSkill$inboundSchema, +} from "./platformagentskill.js"; +import { + PlatformAgentToolset, + PlatformAgentToolset$inboundSchema, +} from "./platformagenttoolset.js"; + +/** + * An isolated execution unit that its parent agent dispatches work to. A subagent has no trigger, channels, or subagents of its own, and its dependencies may only reference published skills. + * + * @remarks + */ +export type PlatformSubagent = { + /** + * Human-readable name. + */ + name: string; + /** + * Description of the agent's purpose and behavior. + */ + description?: string | undefined; + /** + * System prompt the agent follows. + */ + instructions?: string | undefined; + /** + * Skills defined inline. + */ + skills?: Array | undefined; + /** + * Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + * + * @remarks + */ + dependencies?: Array | undefined; + /** + * Tool providers and the subset of their tools available to the agent. + */ + tools?: Array | undefined; + /** + * Glean Search configuration. When omitted, Glean Search is disabled for the agent. An empty object searches all company knowledge available to the invoking user. Populated lists restrict search to the union of the listed datasource instances and URLs. + * + * @remarks + */ + glean_search_config?: PlatformAgentGleanSearchConfig | undefined; + /** + * Agentic model the agent runs on and its reasoning effort. + */ + model?: PlatformAgentLlmModel | undefined; + /** + * Service credentials the agent uses to call tools. + */ + service_credentials?: Array | undefined; + /** + * ID of the subagent, unique within its parent agent. It is not an agent ID and cannot be used with other Agents APIs. + * + * @remarks + */ + subagent_id?: string | undefined; +}; + +/** @internal */ +export const PlatformSubagent$inboundSchema: z.ZodType< + PlatformSubagent, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.string().optional(), + instructions: z.string().optional(), + skills: z.array(PlatformAgentSkill$inboundSchema).optional(), + dependencies: z.array(PlatformAgentDependency$inboundSchema).optional(), + tools: z.array(PlatformAgentToolset$inboundSchema).optional(), + glean_search_config: PlatformAgentGleanSearchConfig$inboundSchema.optional(), + model: PlatformAgentLlmModel$inboundSchema.optional(), + service_credentials: z.array(PlatformAgentServiceCredential$inboundSchema) + .optional(), + subagent_id: z.string().optional(), +}); + +export function platformSubagentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSubagent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSubagent' from JSON`, + ); +} From d9556e8ceab987b2fa9a389a59ebfef8d26b8810 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2026 10:43:20 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow