diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 854bfb03..b3192331 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 3e3290ca-0ee8-4981-b1bc-14536048fa63 management: - docChecksum: b5e6aaf09569e076c7321d15cf12c515 + docChecksum: 4bb1c752f9e3a56aa7b9a22b1afd798a docVersion: 0.9.0 speakeasyVersion: 1.810.0 generationVersion: 2.961.1 - releaseVersion: 0.17.24 - configChecksum: 116488d5830105475c1bd67473354480 + releaseVersion: 0.17.25 + configChecksum: ea48c076b4cb48a66f247c529bb586a6 repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true persistentEdits: - generation_id: 08a78376-586f-40be-bb90-2695174f008a - pristine_commit_hash: 1438fc36fbbcda477e755c0b0bd4ea9917fdf1bd - pristine_tree_hash: 588c5bbd1132019cf7d1de13996833012c76153b + generation_id: 9339c34e-5626-47b1-b913-6fea34acb934 + pristine_commit_hash: 9aea9e560f9c5856c009cfb7e4f5887fa945c048 + pristine_tree_hash: 3b5b0df9a9ebb0dd41ada14da6e7fb5d9d05f1cc features: python: acceptHeaders: 3.0.0 @@ -198,8 +198,12 @@ trackedFiles: pristine_git_object: 47426715d21177cf3607ad4bf73b2b4857d7526f docs/models/agentconfig.md: id: 133ae1c7f243 - last_write_checksum: sha1:03f01204b02a6ea2212efd6d952047210295f0e9 - pristine_git_object: a1664d98b1a9d02c1b2aa5fc8ec85a9bcdfc89e8 + last_write_checksum: sha1:a234d5ee59bbfc577f594dc1e8f3b23e3223ba88 + pristine_git_object: 11358928cc352af52274c9b863294c3b9216036d + docs/models/agentconfigmode.md: + id: 36a318f3f265 + last_write_checksum: sha1:d3d9a3b35d617378a56ab9e29c90d5f9073bac29 + pristine_git_object: 799334e9def7a9286c4d3ffa0299e814b039c5c7 docs/models/agentenum.md: id: 1209c0033b50 last_write_checksum: sha1:ded3d81b230238d759bc5f0a1a9de8b8cfb399d2 @@ -728,6 +732,10 @@ trackedFiles: id: e6f4d8f19cd5 last_write_checksum: sha1:8fe938ab7879871ccd5d3d7d278b3188040d3f50 pristine_git_object: 39fa8c6ec94d29683f81089dc954f03e0851265c + docs/models/content.md: + id: bfd859c99f86 + last_write_checksum: sha1:a57f1a712a7f7f640ff30805c142ccd8c36576d9 + pristine_git_object: 22097a02f5f72952874875153909ca62afc42346 docs/models/contentdefinition.md: id: 938260420b2c last_write_checksum: sha1:a2b0d83bf5bba8acdcf91da6af61471fe96a46b0 @@ -860,6 +868,10 @@ trackedFiles: id: 10e27bf957cf last_write_checksum: sha1:d7e46925c8afddb55373a1eaf4fd242615f98dae pristine_git_object: a4b0b181977a85fe59b01ecdaa91574a651d91da + docs/models/customisationdata.md: + id: 1a25c73dd607 + last_write_checksum: sha1:119d9eede46cb97ac90bd486ddaa931df64db478 + pristine_git_object: cd5a47182b8220b74bf2fbe937c9d7f06610d46c docs/models/custommetadatapropertydefinition.md: id: 7504ef58165c last_write_checksum: sha1:0499d47e78ef18fb559af34ad28f7c4cf3f5b7f3 @@ -1120,10 +1132,6 @@ trackedFiles: id: 94c9d4380888 last_write_checksum: sha1:1decf8f4b91558ad74ce8fb98df98f72f1487c4c pristine_git_object: ee7bb74980dd5f42d03ec3bb84804e2c13965e14 - docs/models/direction.md: - id: 5c2dbb7995cb - last_write_checksum: sha1:a827dab6128d52fba4cbda0f543017e9fc64df0f - pristine_git_object: efe05ba95a985a7f8ec655a3d86b8c18191dd0cb docs/models/disambiguation.md: id: 7f98ff32a361 last_write_checksum: sha1:2c394e73d2a8dd69f57b523639bf166b4021c3e7 @@ -1922,8 +1930,8 @@ trackedFiles: pristine_git_object: b6fc7e69c80120509d9f691f3ba92d586b09f61d docs/models/insightsoverviewresponse.md: id: c980a8e3a69e - last_write_checksum: sha1:49d1977273ff59a0c1a24a45fb2ebb3a18b6bb67 - pristine_git_object: d14c740785f04995c49ea44a5312c07da72ffa55 + last_write_checksum: sha1:6801aee93eaa52ef2891b8e4c99fd1fb79715051 + pristine_git_object: 07df004e3513ed682a52dfa6bc2c016bec69d5e8 docs/models/insightsrequest.md: id: 13eaa34edff4 last_write_checksum: sha1:43421d855599f8045baf28ab774eb06de08c2acb @@ -2150,8 +2158,12 @@ trackedFiles: pristine_git_object: 887fd9253094a6f3a967f086a271c5f272a53840 docs/models/messagesrequest.md: id: 43ebf5c6fe35 - last_write_checksum: sha1:beecc147e019b999a49250a0379489cd5d9ac8a5 - pristine_git_object: 4e064fddb83831285473b6c1d39b815d3ca2d173 + last_write_checksum: sha1:1099522d3ed390ce632f4c04eaffa87b05a576af + pristine_git_object: b0b9fa334d10008f813665db4d4c18b8c0010a36 + docs/models/messagesrequestdirection.md: + id: "498127433124" + last_write_checksum: sha1:cdd2362a4e191502d651909736839ba38e3c435a + pristine_git_object: 4b6255d10d0a20343068b20bcea59785096eb5c0 docs/models/messagesrequestrequest.md: id: 2fa50c40c725 last_write_checksum: sha1:b2f45e2474960413282369d0130b901cca91b302 @@ -2172,10 +2184,6 @@ trackedFiles: id: 7c0a714c5440 last_write_checksum: sha1:0e6889365b4cb2e70786a18e10c26003d7f55426 pristine_git_object: 8f91442a60a35b61cb10ca0e9509bf5eba723e60 - docs/models/mode.md: - id: 568581cb28bc - last_write_checksum: sha1:263515c9f97885b91b6cd5844222320658442b07 - pristine_git_object: b1cd1e56279e4db030fc140598c10231ff311137 docs/models/objectdefinition.md: id: 11daa0bec25f last_write_checksum: sha1:6990618d91fdb10bba60313d1b94e1f1be0dcc24 @@ -2330,20 +2338,72 @@ trackedFiles: pristine_git_object: 1ff91d25d4ae8bf84a9cb7f956dcef2eca7c8e9a docs/models/platformagent.md: id: 6d684a308415 - last_write_checksum: sha1:0f0c8b393957aebe795e3a7a142dffa1c65354a0 - pristine_git_object: dd4be2232ea15ab2219ea0d704e126a810e679ca + last_write_checksum: sha1:5f7b65a1ac3dffd8a2bbd5e43da66971666dd552 + pristine_git_object: 510c0f419a7aaf40a52a29297bde9d5dde29a23c docs/models/platformagentcapabilities.md: id: 7d0c164cb136 last_write_checksum: sha1:70a0ba43c0c1fce847913b5e6c801b8ff9b17e77 pristine_git_object: 052dd7bb60b1553c4135a36c018c2dd39d7751dc + docs/models/platformagentchannels.md: + id: 42c2fca83f04 + last_write_checksum: sha1:8dc28e851c546236bcdb1eb56e35d97f08c762d3 + pristine_git_object: 5a542b875dadefc68e8bb51adcd56662b5bd4822 + docs/models/platformagentcontenttrigger.md: + id: 48f9bceb39e3 + last_write_checksum: sha1:e32d5537a97480f548d4de7f0388a8e38d74b17e + pristine_git_object: bc1979a0239e40822202212061fe01e53c0dfa15 + docs/models/platformagentcontenttriggerfilter.md: + id: d6a6ec3dc314 + last_write_checksum: sha1:4aecb62194d582a50de17915567aba23ee39d666 + pristine_git_object: f667874a1345455343c72d786576529abff8268c + docs/models/platformagentcontenttriggerfilteroperator.md: + id: 5aea808cca7d + last_write_checksum: sha1:6bc4dada2648daa4a66ced11bab41cd6673ecdca + pristine_git_object: 63c0b9ab023a9add52bc919391df647d469dda9e + docs/models/platformagentdependency.md: + id: 86d93df28310 + last_write_checksum: sha1:7dad6c87c4eac38ec0a892548125f569f77771ca + pristine_git_object: cab85e6de3fd2f08d2f28e6cf901dc25eb9d49d4 + docs/models/platformagentdependencytype.md: + id: fd2e13241cc1 + last_write_checksum: sha1:cb4df99e66192b2223359bdc48d9bb328a17bbc3 + pristine_git_object: e12d5d9861a4d0183df843cef8d3d153872fcd4e docs/models/platformagentexecutionstatus.md: id: 71cf171473c1 last_write_checksum: sha1:1be45f91909f2a787a52fd947b2d1992a0634ed1 pristine_git_object: c5b5164ab922f175f5216bb0b33a3d8fc5dbd79f docs/models/platformagentgetresponse.md: id: 18c7f4c9c735 - last_write_checksum: sha1:44a241668a240ee78a4c7bb6a85daf8cb4624121 - pristine_git_object: be79ecee30d70d591903bd9a89e3708a670b5e20 + last_write_checksum: sha1:b74329c318a6e22064b36c4781d0ab1aeebb5f19 + pristine_git_object: d3430a266ac7f8bf82d7afba914177c8cbe1c02d + docs/models/platformagentgleansearchconfig.md: + id: 25a806e59ce5 + last_write_checksum: sha1:ac8ab511e5603e756ad96a6fac5d4ca4d957e7be + pristine_git_object: 87c0d0b27c831cd0f8e316b3d40830b068907804 + docs/models/platformagentinputfield.md: + id: 32d942cdb3e4 + last_write_checksum: sha1:c7a8811d934e971cb4f55e6ac1cb27bb11e17cb0 + pristine_git_object: 21416f8c642ccdeaa01166f0a39370e5d25af69c + docs/models/platformagentinputfieldoption.md: + id: abf687984baa + last_write_checksum: sha1:60a9058a3816ae9f3981cecd014331003e3fb179 + pristine_git_object: 21a6f117f2167d3ef5d5b116aba97b9d4d3614da + docs/models/platformagentinputfieldtype.md: + id: fa043a5499a9 + last_write_checksum: sha1:3680fa9816123bf8f5782a0e6297a8add731d78d + pristine_git_object: 6555939949be1442364c0ce470018e11ab857810 + docs/models/platformagentllmmodel.md: + id: 2a9ae4a401a6 + last_write_checksum: sha1:766db08058af88bc84c5e0bf6ac0f1db66295d77 + pristine_git_object: e2e59e97cea8d347a1d5028c499222943020c67f + docs/models/platformagentllmmodelmode.md: + id: 980f7d749462 + last_write_checksum: sha1:fa52aea302a3328df0f585d9d310a0ba82faf838 + pristine_git_object: 90ac02aeec506afb7ea11c1d89ba0373b8cbb2f1 + docs/models/platformagentprompt.md: + id: 3dbb11d174cc + last_write_checksum: sha1:879ca87244650e8c5b688982223e9d3b162e9b2f + pristine_git_object: 529aab07159beca76223d4c2f5f1ad310f47b1a1 docs/models/platformagentrun.md: id: 2b8087b0fcda last_write_checksum: sha1:a34783d31877e4a81505588767aa6e5eccf96fda @@ -2392,6 +2452,10 @@ trackedFiles: id: fce231cbf21a last_write_checksum: sha1:804b3ef186a7225865bbc4dfe3279ec0f2f2d54c pristine_git_object: 6d39d4a8f955045bed8c9f0622442b4b2830ea6a + docs/models/platformagentschedule.md: + id: ef8e09bcb758 + last_write_checksum: sha1:bf16745e0f78a35b83175c12e265894eed4b0610 + pristine_git_object: 8239f619fd99b03327064f89466442a7b256284b docs/models/platformagentschemasresponse.md: id: a9f2476c738d last_write_checksum: sha1:91bc217f67657540aba343504479320ef577cf64 @@ -2408,6 +2472,14 @@ trackedFiles: id: cff1e95bf989 last_write_checksum: sha1:e3eb108ed7d79fdc27b481e93a75d70c3c0cd63f pristine_git_object: 6b5d687057142bd9f47309da63403d3e702ad498 + docs/models/platformagentselectedtool.md: + id: d60384c35a41 + last_write_checksum: sha1:331c7ee92e313f19fc0ff28c2d2b417750ee477d + pristine_git_object: 501c4d83118052bc1a21056d8cabb7f892e8460f + docs/models/platformagentservicecredential.md: + id: 2f8c748a0076 + last_write_checksum: sha1:29ee514f20c6065526df0ff0fa197b25ccb17f78 + pristine_git_object: fc20203e2084ef6319d1925a4afe59a02f413539 docs/models/platformagentsgetrequest.md: id: a51f3665418a last_write_checksum: sha1:34c8865c924c12194975f0a8cf1f98addb134b9d @@ -2420,6 +2492,18 @@ trackedFiles: id: 3591800143f3 last_write_checksum: sha1:27a8e74a3fc50f378ed596e5c1a8bd3adb6fe0ea pristine_git_object: 6d512b5719eac34760fff50cac1eb50cfac0df3a + docs/models/platformagentskill.md: + id: f1560dbdd520 + last_write_checksum: sha1:5fdf266f744147a3af5c781ed0c31c638f3d5474 + pristine_git_object: b10ca7f43b369b29c08bbf560cb16d9799764f8b + docs/models/platformagentslackchannel.md: + id: e9081adf71b7 + last_write_checksum: sha1:17214395f178509f8406aedf31bc747727f8d39a + pristine_git_object: 9b757db9df054ed233bcd5f10166b07bd8a6b04c + docs/models/platformagentslackchannelmapping.md: + id: e4e0b896feff + last_write_checksum: sha1:f715cc966b3376672b3d8226dcdfe7be1a18db03 + pristine_git_object: 48860ed958a81235bae53b4163d7bfae5eba57ad docs/models/platformagentssearchrequest.md: id: 863c7f027d45 last_write_checksum: sha1:7e2501648e5c73a9615222c88d00f5d83ac42a61 @@ -2428,6 +2512,18 @@ trackedFiles: id: e2656d1b178b last_write_checksum: sha1:11cfb0f78ed223bdc13cb93b7ec8fded52db7f99 pristine_git_object: 1c961815688a6cbd9b0e3a298ea0641fcff045fe + docs/models/platformagenttoolset.md: + id: c3c9bfef2760 + last_write_checksum: sha1:f86bd971307257bbc7e3b07b96e022ae579c3283 + pristine_git_object: e02e83e9b986324d54215d3cf30e4688fdc2a25b + docs/models/platformagenttrigger.md: + id: e1085936eca4 + last_write_checksum: sha1:fddfe492c480f8b52846d546e487d66bd7d4d779 + pristine_git_object: dec66160f317b47a7bdb0a0eaf9fbd4688eecd65 + docs/models/platformagenttriggertype.md: + id: 099c4e056d73 + last_write_checksum: sha1:4de711d8058dcc8b28df4b5a9813439acd1692e6 + pristine_git_object: 3d9be092703b124f4ca943f7157224e99d6eaae6 docs/models/platformauthenticationsuggestion.md: id: d3263acb33dc last_write_checksum: sha1:0cf4d355db967c070866a43cc7cf8bfb00dabf8b @@ -3002,8 +3098,8 @@ trackedFiles: pristine_git_object: d0449869cd0e07e5714d428c24bdab5c4ebf09c0 docs/models/platformskillsourcepreviewfile.md: id: 80920192692e - last_write_checksum: sha1:ab96df0544d94fda5d111d61cc9b4579a3039df0 - pristine_git_object: 6f4626cb6098e3e52101516801035c098c0cdbe5 + last_write_checksum: sha1:aee0b52fe28e819e4f070e13fd1caf315bf00f2f + pristine_git_object: 062d4863fe3d8743f0269b3b97a71d60dfa602e4 docs/models/platformskillsourcepreviewresponse.md: id: 9f9048fa09fe last_write_checksum: sha1:7b55521b8f0031aeacb1bce804bf0975ba7ae809 @@ -3160,6 +3256,10 @@ trackedFiles: id: 04f03f45e509 last_write_checksum: sha1:666195fb5bd138dceed17accc7fc25c72e11f066 pristine_git_object: 082388b1d3aa6d33d3413f71d92207e50b4307a7 + docs/models/platformsubagent.md: + id: a790a6819a1c + last_write_checksum: sha1:32fdb67650860d84b653ddb62f5e658b516f72ac + pristine_git_object: 3da5869b98dfd333deb7b089dde86a7fe0a0da36 docs/models/platformtimerange.md: id: c37b2e815a8d last_write_checksum: sha1:31db2f83dba4ccb6d0a5e7b80edbeff356529101 @@ -4262,8 +4362,8 @@ trackedFiles: pristine_git_object: 95b9ecab942c61399cd0367446aac1fd16a463ba docs/sdks/messages/README.md: id: 3f1f6d38fc33 - last_write_checksum: sha1:f70725881be7b69999dde7c46273d096cd7c0793 - pristine_git_object: 754dd6635e2b25d55f530806b0ec5cd664ec9b95 + last_write_checksum: sha1:d14580f5bfd78abd3779b6e2c4283719505b4d8c + pristine_git_object: 356f899f3fc27cb76f686ef3707666c3b46b45b2 docs/sdks/people/README.md: id: ff7b3ee21c2b last_write_checksum: sha1:1faa5ccac6519e60655fa5eeeb641f4579ec0da2 @@ -4318,8 +4418,8 @@ trackedFiles: pristine_git_object: 79e388be87446ab6a4064b372bad0e8376d0cb5e pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:ba2f72d754318d9e0a40a5eb1e52c19e05c489e6 - pristine_git_object: c1aeb95aa4528b02ec9990cd7080c5bce5587472 + last_write_checksum: sha1:33e0614761950d0be00e5b20a190510d6062632c + pristine_git_object: 680d9d68666eb82c8ebcc2a4cc31844e06c927dc scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:c2c83f71dea61eb50c9e05da83b16d18b4da8794 @@ -4346,8 +4446,8 @@ trackedFiles: pristine_git_object: 55f23c1feabfedeb7e8cd5bea8b910f0ae0b77d9 src/glean/api_client/_version.py: id: 0ce22b26136b - last_write_checksum: sha1:69b02cb1fefad4a4bfe632daba7a35cfbb1e00f3 - pristine_git_object: 75f528b2b79af3c579327ab727be3c0967494eb9 + last_write_checksum: sha1:377c1cff304cd9bc091ff32a89ef44079934c907 + pristine_git_object: e72a33bafe83a27a9eb6ea6b2557d42182999643 src/glean/api_client/admin.py: id: 583cfae82adf last_write_checksum: sha1:3c462f418d2b32a90c92f88121867a73295b0c6c @@ -4550,12 +4650,12 @@ trackedFiles: pristine_git_object: e178944fb4b06aab8e7a5edcaefaf6996fa4c2ad src/glean/api_client/messages.py: id: 3751db64257b - last_write_checksum: sha1:63c0b0fd9b273d38d2d0a695a5b244b5347b0908 - pristine_git_object: b140b656b788bb0deb8a974420783b338f0521e2 + last_write_checksum: sha1:a305660bd59ba5ac2034f82a768eb78cf646686f + pristine_git_object: f47d1c8ad754952615f431badd81414760d3980b src/glean/api_client/models/__init__.py: id: d5f6ea5efcbe - last_write_checksum: sha1:f3721e5c48040f1f8d253b4bfb7d8515798511a0 - pristine_git_object: 1f55fb2312489bb9d7a6d2bf7144e872d2b4635b + last_write_checksum: sha1:e25276541fac61ecba908fcb37dcc0d8777cf6a1 + pristine_git_object: 6b294a3b587c7c0099c816757ae1e4c8a67e407a src/glean/api_client/models/accessrequestpermissiondeniedresponse_error.py: id: 22a2fa0d5899 last_write_checksum: sha1:f7dd6f906a4dd7433992f77395f9fb491fa5ac5c @@ -4626,8 +4726,8 @@ trackedFiles: pristine_git_object: 30b6f6b082e25ba04e760e132351a4891356f37e src/glean/api_client/models/agentconfig.py: id: 6bc960f78847 - last_write_checksum: sha1:1e4620a074b8d4929873ada7e0a2226384dd9b19 - pristine_git_object: ed02f12a82ce7f2e851e6f63546bd36f15c0df17 + last_write_checksum: sha1:49824eb9a73c7021a9a12b6eb8a00d3ef6fdd58e + pristine_git_object: 0f1c6946bb1d49d307ff822d5ff38047d8e02c72 src/glean/api_client/models/agentexecutionstatus.py: id: ab4f2c2f8eed last_write_checksum: sha1:d3bb768f118d7474a4fae0a7685922c6405d0f90 @@ -6010,8 +6110,8 @@ trackedFiles: pristine_git_object: 8335f24b795d10724eb509ed9e6de213b4bcb302 src/glean/api_client/models/insightsoverviewresponse.py: id: 9f278319d18c - last_write_checksum: sha1:ab97e290cf666de4b23f238164e7ea679dbda286 - pristine_git_object: 0e20674503b53c359349ea3d3dc57a8d832a6fed + last_write_checksum: sha1:c2581a31442f06c33852d347f143381bb94362f4 + pristine_git_object: 702734e35dff5a6a0f63d43e040f0adbe02f8f25 src/glean/api_client/models/insightsrequest.py: id: 72fbc9d1c47b last_write_checksum: sha1:2c8a18aeb6a66d39d9a06c76075b9aa413587ab0 @@ -6182,8 +6282,8 @@ trackedFiles: pristine_git_object: f4911ad69df436b8c1c68d5b950767ab04feac45 src/glean/api_client/models/messagesrequest.py: id: 5664726a791d - last_write_checksum: sha1:c248e0d58eac241759b48140ecd1cc783e63994b - pristine_git_object: 6ab12fa78af1ee13b84121d642a6a19f9750aa25 + last_write_checksum: sha1:d729dc54d996e1c08ef875de241216ba81d63928 + pristine_git_object: 9486ad010316fc698c03c0a912ebcc163bbade6c src/glean/api_client/models/messagesresponse.py: id: 1c7a6e4dd845 last_write_checksum: sha1:2132edf210c308d03775532ca7c8b6c9e46a9f31 @@ -6458,20 +6558,60 @@ trackedFiles: pristine_git_object: 1ed0e9ff4127b08409b9ae5e7ea251add7eaadbc src/glean/api_client/models/platformagent.py: id: edd82e5a258f - last_write_checksum: sha1:356c50bb8b33bf8ed6ac13e86f21545dcda28232 - pristine_git_object: 78757283b276788d660946a6dea52dae2d3bcacb + last_write_checksum: sha1:a9c3f9d463a2667cdda4625c573afd3df6bdb15a + pristine_git_object: 6c0f569d7b7cfa44c165aeae05a8cb15bcc9b6b9 src/glean/api_client/models/platformagentcapabilities.py: id: 16d4984052e6 last_write_checksum: sha1:ab9d88c2f7c0371e2035833802260b40d0bdb9cd pristine_git_object: 00d8c7fd9118f1d0635a8d033f4bbd5746551705 + src/glean/api_client/models/platformagentchannels.py: + id: 2ffff9e1a2fe + last_write_checksum: sha1:b56cf56d48e15c1e8aeb9cbfd856999af45bfbd9 + pristine_git_object: 80bb1e517c8014d481482e37e47df8ec1783e335 + src/glean/api_client/models/platformagentcontenttrigger.py: + id: f5b48c2a027e + last_write_checksum: sha1:b1d74e81c3f9c35b2e8617a87ebac227082354b4 + pristine_git_object: 2ef0ecd884d8e12a4fad8ce4a9ffdcc28c357881 + src/glean/api_client/models/platformagentcontenttriggerfilter.py: + id: 9820d0bb2066 + last_write_checksum: sha1:faa59d4aa9e0fabdf03dc4c1ba8d7730ede6a43a + pristine_git_object: 09299fcb26528b1ed6ded8265ad623f842681d68 + src/glean/api_client/models/platformagentcontenttriggerfilteroperator.py: + id: 193cc6e5b286 + last_write_checksum: sha1:9f1fc15a8eb494e7a645bc84dd366883b59ff7af + pristine_git_object: f39b5a05163392ca385dac8eb6c4debc7f3d00dc + src/glean/api_client/models/platformagentdependency.py: + id: c31be34811a7 + last_write_checksum: sha1:701d38a4d38b0b97904b4739c72b4defb867456f + pristine_git_object: e50b2e89afbc5802dff171e0b7639d2b3098e6a6 src/glean/api_client/models/platformagentexecutionstatus.py: id: 2c3e0bdc97dd last_write_checksum: sha1:26f14b0b81c18b0aaca73f4ac27c6fcc657d90a6 pristine_git_object: cab8cafce2525a2626220db78c8f023a36c98df5 src/glean/api_client/models/platformagentgetresponse.py: id: de08c9cd1f7e - last_write_checksum: sha1:4b5e5e9fd0a8016e12954e78c56db177af5ab002 - pristine_git_object: dff409304169026967f63b216afa4cad4e72d215 + last_write_checksum: sha1:92767485dd80c09c4bf9e8d1a0dbadf3321bf1b7 + pristine_git_object: 172c8ba7dbcd3887c98e87415c1787f851e96ca0 + src/glean/api_client/models/platformagentgleansearchconfig.py: + id: c19682dc249e + last_write_checksum: sha1:72bbed38f3c7f000566e78eceda4923d9d0994c5 + pristine_git_object: c5307903ec193e64c630ee1c0047fef35893909c + src/glean/api_client/models/platformagentinputfield.py: + id: f81a1df8249d + last_write_checksum: sha1:267d0f93a9cad381e8bc6a0d5061e7fcb181f0e1 + pristine_git_object: c046e5a7883eb1debf76edede7440e8d0c03254a + src/glean/api_client/models/platformagentinputfieldoption.py: + id: fda8fb627442 + last_write_checksum: sha1:1434d7831d05b6b22748d87eb64cf86eda2a578a + pristine_git_object: f3d4845c5e9d721822a41050d5271f5aedda6898 + src/glean/api_client/models/platformagentllmmodel.py: + id: 967a301e496e + last_write_checksum: sha1:0978293710e8cb8bff5677848a8c67e16d06cfa4 + pristine_git_object: 680f06e5ad9f9e739bbd756961f030e51949ea17 + src/glean/api_client/models/platformagentprompt.py: + id: 5cbd8aed767f + last_write_checksum: sha1:353a60f3990c251a2c4f69c78d4b48ec65c0055a + pristine_git_object: 0251d7d27b9f6fd4b49473ad3813a3352c962161 src/glean/api_client/models/platformagentrun.py: id: 6a27f28ec4bf last_write_checksum: sha1:bfd93d9331f596ab2089acd9bd6e36d6ee4a7892 @@ -6512,10 +6652,34 @@ trackedFiles: id: 3498df9c1961 last_write_checksum: sha1:2e8e4dae7e2f503ff9af5f0f3a6e037222ceb95b pristine_git_object: 9cb25b5f9cadb61d0e5eca5e5a14240a0a1fa0d3 + src/glean/api_client/models/platformagentschedule.py: + id: 822e84f4d3c7 + last_write_checksum: sha1:961ee64cf6300912a8ec377c82b7a4d7924eaa55 + pristine_git_object: 993dccd11b3aaa194efefe32d7c890ae8d84b919 src/glean/api_client/models/platformagentschemasresponse.py: id: bc725034e9b9 last_write_checksum: sha1:0d55df18121ce5702dd0f40cfa0f578e3630e60b pristine_git_object: 6c9d17bfb905ae97c4677da709243511cd173f97 + src/glean/api_client/models/platformagentselectedtool.py: + id: f79906302cf7 + last_write_checksum: sha1:5ae5233d16f9c156f9c452c438f15dc2776e35af + pristine_git_object: 48a1814ee1991debb787fe874ee1ae6a8caba5ae + src/glean/api_client/models/platformagentservicecredential.py: + id: e50563da7b2e + last_write_checksum: sha1:a1c6358ada839c8c02574d3da56ba0219fc638b2 + pristine_git_object: c117cb6aa128f34911febbc21840657a2dc8276e + src/glean/api_client/models/platformagentskill.py: + id: b5d98c80a7d6 + last_write_checksum: sha1:498a721929fc032260d6228365df72978fe496f4 + pristine_git_object: a6866cb20ea0f97b7179ad27c0a4320fd26b59ae + src/glean/api_client/models/platformagentslackchannel.py: + id: 9d64d1dcc3c7 + last_write_checksum: sha1:5e4d34ca852c316c666b3697255cafdf40631820 + pristine_git_object: 0e464e83dc8ccc94065d5e26da49f6df9d517e1e + src/glean/api_client/models/platformagentslackchannelmapping.py: + id: 0cdb09ef09da + last_write_checksum: sha1:b85906c304dd3f43eb18d669bfc87f545409ecaa + pristine_git_object: 57d4adbe099f7f3f1be1544ba04d78c8326b27a9 src/glean/api_client/models/platformagentssearchrequest.py: id: eb40369d333e last_write_checksum: sha1:4b1367ec361cd5c1c8a280db02fbe4751889b6e3 @@ -6524,6 +6688,14 @@ trackedFiles: id: 2c3bddef7679 last_write_checksum: sha1:23dd758cffab6db76a051eb029776a64613a38f6 pristine_git_object: c9f820b8a8edc25853156cf3f9a6c0b43feb1865 + src/glean/api_client/models/platformagenttoolset.py: + id: 51779994a2ff + last_write_checksum: sha1:e9a4125193e59f06c600a01c7b4dcf90c3574748 + pristine_git_object: 9f29bba106d2b83ff0555fba92e7d5c629030583 + src/glean/api_client/models/platformagenttrigger.py: + id: b26ac277b415 + last_write_checksum: sha1:1221ddbfc4eb551a85f5da83901ccd2f926f8792 + pristine_git_object: a5f2b83883328f8b1752ecf9a494317694b9aeea src/glean/api_client/models/platformauthenticationsuggestion.py: id: e99ec01300d2 last_write_checksum: sha1:f1299dd4c2bb75df4cbcc560194962167ef68429 @@ -6906,8 +7078,8 @@ trackedFiles: pristine_git_object: 627495d306bdf1a7cbcd446551c37a894bdd9a4e src/glean/api_client/models/platformskillsourcepreviewfile.py: id: d7594e3706a8 - last_write_checksum: sha1:8111240b45e77e5605be4d2993df8cbb0d1fe89b - pristine_git_object: 71aee5339cc6d9c46394bd7c34b50cd51cde5a40 + last_write_checksum: sha1:9239bbc77f3588a8b2c962e26568534549b49c9b + pristine_git_object: 260d4d9a2fe6a2e12db1b5a4c48a1068a8603966 src/glean/api_client/models/platformskillsourcepreviewresponse.py: id: 41861007f222 last_write_checksum: sha1:9eb2f08cf3b4ed7924286cc6c0233868ca1168c2 @@ -7020,6 +7192,10 @@ trackedFiles: id: 6ffeabf770b5 last_write_checksum: sha1:aa6d1a9a2c910a44ea83d9f477c8cbf8f106ddff pristine_git_object: f01bfe6b8e8879f4d76857a1c34b955872da31fc + src/glean/api_client/models/platformsubagent.py: + id: df4e8a636a79 + last_write_checksum: sha1:eace048f3fb75cd381084be8b79895e4a2d2ab6c + pristine_git_object: f2c097a1277b1d9a1c0c9aa993a9df2094648d4a src/glean/api_client/models/platformtimerange.py: id: bf2b03e84949 last_write_checksum: sha1:091f5f687f06f051232a0daaf617e61ee50b0fa4 @@ -7998,8 +8174,8 @@ trackedFiles: pristine_git_object: f4abe7f8e30699dd520c5f5ac111989052415690 tests/mockserver/internal/handler/pathgetapiagentsagentid.go: id: 118e0c46ba00 - last_write_checksum: sha1:8ad0cc0ad413e34c3d950ee07ccd13ce861a261b - pristine_git_object: 821cdaf9e7e105e44baf2fb6c2352df5c5bd20f7 + last_write_checksum: sha1:de9f558e34a79db449299740e59744c4242245c7 + pristine_git_object: a14e1b6f99d50e88bccaaf92ddf3de2325b57b20 tests/mockserver/internal/handler/pathgetapiagentsagentidrunsrunid.go: id: 475b833c9801 last_write_checksum: sha1:2d7a9ed6338061ad7eb2f9e2e309024d30adbbeb @@ -8462,8 +8638,8 @@ trackedFiles: pristine_git_object: abb763ddc8504b28c0cb6fdf8d25237d46e21bab tests/mockserver/internal/handler/pathpostrestapiv1getchat.go: id: a0ec7bafa599 - last_write_checksum: sha1:2267292ba8173cf8df70ddbc6ac02ff3439cb879 - pristine_git_object: 8740195860b6c08e036caae19aab8e7374350960 + last_write_checksum: sha1:1fbb81644c855aacea5ae5681220cad0b47a6b7c + pristine_git_object: de8776a41326aedccbc7ae7ad27498edba127efb tests/mockserver/internal/handler/pathpostrestapiv1getchatapplication.go: id: 7d101c69d4bc last_write_checksum: sha1:7b81898137fdb3a89b4dcfa318b9b5b92e8860c0 @@ -8682,8 +8858,8 @@ trackedFiles: pristine_git_object: f7b3b13119f56eb58b399290ea4fa65e83b3e490 tests/mockserver/internal/sdk/models/components/agentconfig.go: id: fa742da941da - last_write_checksum: sha1:cd839d5368cb6f41495a5fc8ef333ab5d4f102cb - pristine_git_object: 679f7f3270226aee52d4ade229b20b723d13c29a + last_write_checksum: sha1:aadf9220c6fa026d794a2bf724d6d031f6249e61 + pristine_git_object: 0fcf307eb02029365458bfe3c2bac605f992c058 tests/mockserver/internal/sdk/models/components/agentexecutionstatus.go: id: eb0b8cff2bf6 last_write_checksum: sha1:ef904e3fd25fd902d355e88115d0721dfecab4f8 @@ -9842,8 +10018,8 @@ trackedFiles: pristine_git_object: 5e903919f103f212820d2d4717e0e1e95d78846b tests/mockserver/internal/sdk/models/components/insightsoverviewresponse.go: id: 5643c3cf2f72 - last_write_checksum: sha1:38ab70635b4b9fc592ef3e863272410f1db855f4 - pristine_git_object: a4872a274ca370eae187a079685b7b919c776a56 + last_write_checksum: sha1:9c0066315647c55ecd97fbb7ad45ede0fe090290 + pristine_git_object: 200d888d000dd568ff67faee10cf530f4698acba tests/mockserver/internal/sdk/models/components/insightsrequest.go: id: ce15dfb99343 last_write_checksum: sha1:b9f1c9680014aa2b60161886dc0d5932ef0cab20 @@ -9978,8 +10154,8 @@ trackedFiles: pristine_git_object: 958e2d359d3a312b33fffbf3345e40e21b4ca5d5 tests/mockserver/internal/sdk/models/components/messagesrequest.go: id: ad26cc127163 - last_write_checksum: sha1:91ec52d57dfd2e53150a39841b6eebf3bf8d1568 - pristine_git_object: a778dc51fec681f83e9e9b0b5f0801792fc00fa6 + last_write_checksum: sha1:b6ceb2dded7b291f1d6486a89582317247f323c0 + pristine_git_object: 36c077ba4811f4deeaea6d4a64ddd4ed38339f4a tests/mockserver/internal/sdk/models/components/messagesresponse.go: id: b2129871b3f8 last_write_checksum: sha1:cd2a29d8a46d95037a32717f4cc91612a3a29cac @@ -10074,20 +10250,60 @@ trackedFiles: pristine_git_object: 1bdc67b394900c4c3bd31500b76088982ddea656 tests/mockserver/internal/sdk/models/components/platformagent.go: id: dcdd9a7bc9de - last_write_checksum: sha1:b55d4b147d41e3732e54372b8f1fc4c69a6a2426 - pristine_git_object: 79049da4483e06ef116e58df66ecff3551a849ab + last_write_checksum: sha1:62ef57f9332bb2347c05fe312661ebd6256f5a2d + pristine_git_object: d7adfa4868a7728737822028c2cc2630b85a9679 tests/mockserver/internal/sdk/models/components/platformagentcapabilities.go: id: 2807a52a8b1a last_write_checksum: sha1:eed1084087dd93ae61c145598628546d819fe45b pristine_git_object: 562c8682df3bb923ffa1cc3fdc86b8a9048b6e1f + tests/mockserver/internal/sdk/models/components/platformagentchannels.go: + id: d6c197cbb8d0 + last_write_checksum: sha1:c0e8e320646c3dd17cfe7e4720ca5ec9334307c2 + pristine_git_object: 07f1318f5545917dbf9123365b31d2d7ef899088 + tests/mockserver/internal/sdk/models/components/platformagentcontenttrigger.go: + id: 8980fe85fad1 + last_write_checksum: sha1:14dffca6d42d120efa7111977ebe14de42cf629c + pristine_git_object: 24495c404bd0229d0ddb92b0c1c6ccde9262d6c7 + tests/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilter.go: + id: fbf7dd647dc3 + last_write_checksum: sha1:e2271fda62cdd1d273c7e4c7ac3fdd454f6dbfae + pristine_git_object: d8fee0fe1e4cef573013271fe15530116b20617c + tests/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilteroperator.go: + id: 37e57ed1b4dd + last_write_checksum: sha1:a547345dbda194132e9e1f9ace8af01859572ddc + pristine_git_object: 105364b9333be057f2c350c425f7c05443cf6921 + tests/mockserver/internal/sdk/models/components/platformagentdependency.go: + id: 3f7712d41e8a + last_write_checksum: sha1:92dd111f7e48dc8401e58d945a1604433c554bac + pristine_git_object: 44ab8c8dba24179cda56693e75c66b435e8dc432 tests/mockserver/internal/sdk/models/components/platformagentexecutionstatus.go: id: c9db767e876c last_write_checksum: sha1:c8f646aff8df619e61b6f55a22b8ca836e40ce9d pristine_git_object: c8c2bfb9613140654f527aed41518769e10ff152 tests/mockserver/internal/sdk/models/components/platformagentgetresponse.go: id: 531e55c09141 - last_write_checksum: sha1:b36aba6678be9f8a1b18e6e901f1671dcdebd0a3 - pristine_git_object: 3df4f65db7b472cc1bb0fec6603e80830ddd938d + last_write_checksum: sha1:1f15f4f0b961d650eab49436612a93e0ca22fb98 + pristine_git_object: e62c09fb6925579c45c53a71f7e0795dbee22e13 + tests/mockserver/internal/sdk/models/components/platformagentgleansearchconfig.go: + id: e5039ee2198e + last_write_checksum: sha1:7feccfb6820ffb922f6105e2dba2a6acfbafcc9c + pristine_git_object: 9a0847b2e3fdcd64d6b8c3eb2047ace1f538bafb + tests/mockserver/internal/sdk/models/components/platformagentinputfield.go: + id: 1ea0c845657a + last_write_checksum: sha1:e31010f42c40ab4abf32c46b37ef5cad565f5b7b + pristine_git_object: 1680d71f5de7b277cbfcaf573a5dc91eb7a211fc + tests/mockserver/internal/sdk/models/components/platformagentinputfieldoption.go: + id: 5e5bb2618df5 + last_write_checksum: sha1:960257d7ecf1d7c0f2ab2c0b9e0f59ba7fc40084 + pristine_git_object: d21329bc529760fa27d3f0dc0fc5d7c7128d2642 + tests/mockserver/internal/sdk/models/components/platformagentllmmodel.go: + id: 416f0738626e + last_write_checksum: sha1:b3c8305cf7dd6d498003c67bbee76262d6dff15d + pristine_git_object: 4a10ae80e3af32ca6d00e060c977a0902bfdcb39 + tests/mockserver/internal/sdk/models/components/platformagentprompt.go: + id: 24886e030b8b + last_write_checksum: sha1:0ed711825759b5c38362643e3dcbbe220312b0d0 + pristine_git_object: 51f0920db30abda24d19db8d77a4cdea198f3e75 tests/mockserver/internal/sdk/models/components/platformagentrun.go: id: d12a92c365e5 last_write_checksum: sha1:c39a6b74fe9c30850bf5bedd6827577bf4b56566 @@ -10128,10 +10344,34 @@ trackedFiles: id: 368b82c238d0 last_write_checksum: sha1:77ffebf146f2f6f671f10a8ad893f672ee8c67a5 pristine_git_object: b157f036a87b980e584e542010411e4ac69a36f2 + tests/mockserver/internal/sdk/models/components/platformagentschedule.go: + id: 42e797baff90 + last_write_checksum: sha1:4b65aed0698aa7d78eef5864a4880d3fcff91ef6 + pristine_git_object: 9a9c01ae6cbe7393dd01d7cdd920963e0f561e40 tests/mockserver/internal/sdk/models/components/platformagentschemasresponse.go: id: 68274dd0a3df last_write_checksum: sha1:a7e32651fe39006126fc80176910047ac84c9893 pristine_git_object: 6f9aa5d088b6d5d8b6e3490b15ee4c0ad45749b1 + tests/mockserver/internal/sdk/models/components/platformagentselectedtool.go: + id: 6a2cb9e5272b + last_write_checksum: sha1:e2b0793ddfd02c060b016a4669f58a376f5045eb + pristine_git_object: 28fd4df785f56c83bbb8a6545d58cb938b8a197e + tests/mockserver/internal/sdk/models/components/platformagentservicecredential.go: + id: 8584b8ed6465 + last_write_checksum: sha1:2278b5f058180aadc16f9565925084289956d9e5 + pristine_git_object: 2942af95b057d40bbc0617b83a85ee68288ede83 + tests/mockserver/internal/sdk/models/components/platformagentskill.go: + id: 24683fa936e9 + last_write_checksum: sha1:722d51ec5618b74ac593208a565e1fb42ba14181 + pristine_git_object: 09511ec65dbefcf2474e9b1f129081ff507e12b4 + tests/mockserver/internal/sdk/models/components/platformagentslackchannel.go: + id: 447070965a1f + last_write_checksum: sha1:a44ae5aa4273328e5474d4acbb969a44cd6c4ac3 + pristine_git_object: f0a217c905ad2aa31fb2695b6a696d89152a2d7a + tests/mockserver/internal/sdk/models/components/platformagentslackchannelmapping.go: + id: 702a560ab560 + last_write_checksum: sha1:b9efa0e671d28df1f75fce9f4cac1768dd488514 + pristine_git_object: 5d24cf6e7eb3e0b36c62b5820110e6daa1e5c27c tests/mockserver/internal/sdk/models/components/platformagentssearchrequest.go: id: 7eaeaea3b941 last_write_checksum: sha1:7c1f9eb5a6433e664b9ce9e5dd111d3408ff910e @@ -10140,6 +10380,14 @@ trackedFiles: id: f299b36c97da last_write_checksum: sha1:2e0f29320158b7f1b204af2adbc462bdefa34c1f pristine_git_object: ba08e943e4a74ac111304125d6085f642a522085 + tests/mockserver/internal/sdk/models/components/platformagenttoolset.go: + id: 4decc9d14146 + last_write_checksum: sha1:15662761d1f8c67393f5f7f9bea5beb0eb6ce356 + pristine_git_object: e663f381fa9a420048421f7e82e7253fd3cae586 + tests/mockserver/internal/sdk/models/components/platformagenttrigger.go: + id: 3a7aabe2d320 + last_write_checksum: sha1:ef71c8e257a7ae529d9b1dab1f3d9a5067b1548f + pristine_git_object: 43f143e8676d2441d25cb395f70f2ea8339c5d9c tests/mockserver/internal/sdk/models/components/platformauthenticationsuggestion.go: id: 48f115d1756f last_write_checksum: sha1:6d1eae6baac1ea0a8d42a87a076548005e48e016 @@ -10522,8 +10770,8 @@ trackedFiles: pristine_git_object: 0096a29687b3f1e393cb76f6a8f794a20e860eb2 tests/mockserver/internal/sdk/models/components/platformskillsourcepreviewfile.go: id: 7b0601c7fda7 - last_write_checksum: sha1:9aa7df164105692a1c8c94c58bdc905b0292f2d2 - pristine_git_object: 7622555e6e310e61fe97c2018874a2617652b8e0 + last_write_checksum: sha1:5c7102b83c033eb6ca51bb63ef3316da83c00fbe + pristine_git_object: 458c40544a47df80fc88e534fd1a798ec6d4c676 tests/mockserver/internal/sdk/models/components/platformskillsourcepreviewresponse.go: id: d14b15a2dcc9 last_write_checksum: sha1:d441199f3e22acac926b5a9efe954bc9a6ccaf59 @@ -10636,6 +10884,10 @@ trackedFiles: id: 35adfb5fbba2 last_write_checksum: sha1:42f6693dcea22369b550da6b9c2a6fc9a950e389 pristine_git_object: cc6af7a34c50da96df3629b65aa69dc50a8452de + tests/mockserver/internal/sdk/models/components/platformsubagent.go: + id: ae226a4dd1f5 + last_write_checksum: sha1:ab4c78ba8af0c2ba14d0727488e7ac41b8926283 + pristine_git_object: a1114e5d97098b2f84b2dceeff7601dd9fd65798 tests/mockserver/internal/sdk/models/components/platformtimerange.go: id: cf2540151ce1 last_write_checksum: sha1:3a0ec2ca473681b89ff97606f648fc15fcdae38e @@ -12290,8 +12542,8 @@ trackedFiles: pristine_git_object: 6cc8aeec3c52329d389081db0a27f10f53f214b9 tests/test_messages.py: id: be23089b1f8b - last_write_checksum: sha1:5db8087e85104ab50b362638150fa1f6686a3c30 - pristine_git_object: c0fd29dab7d365ef9d78c0c291b925e6b9fd7298 + last_write_checksum: sha1:bef200db8e7fff0aa33ef17846f5054a2d035a88 + pristine_git_object: 36643db35a2d2a3cf9d327379ee7a6cb30da51d0 tests/test_people.py: id: 37c243940039 last_write_checksum: sha1:2b78b1c5ea17f267895188b1b48ff9fe2bc19f17 @@ -12318,8 +12570,8 @@ trackedFiles: pristine_git_object: 1c854370da050c261cb2cbcf9cc16829f5d8e78c tests/test_summarize.py: id: a255d8a6f627 - last_write_checksum: sha1:dc8fc131020d3c55cda6a5a506cd62032c44171e - pristine_git_object: 28d18f609bba559e061ac9a444c5826794e52f7d + last_write_checksum: sha1:38068c7aaf32c87eb77dff99cd5c08f0b8dce7ce + pristine_git_object: 81026c98bd6b39f53b192acd7429af0968a541ae tests/test_tools.py: id: 70889bdf7321 last_write_checksum: sha1:e9e37efd6a65d805c02d70d548df9c87dd062b0e @@ -13292,7 +13544,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": @@ -14195,7 +14447,9 @@ generatedTests: platform-search-enumeration: "2026-11-16T11:51:20Z" releaseNotes: | ## Python 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 353ae39e..a3f05b69 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -35,7 +35,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.17.24 + version: 0.17.25 additionalDependencies: dev: {} main: diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index ad10f296..c09a31ca 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 a60a5d53..3f225266 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -158751,7 +158751,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 22dadb7b..9c5f6ce8 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: @@ -16,10 +16,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-python-code-samples - codeSamplesRevisionDigest: sha256:491648483ef0c88e55908bf76ebf15e746ebf4656f736ba3b0dc1c5403611c88 + codeSamplesRevisionDigest: sha256:60d7f745d1b81e54398a898e4b851857e5c6c7ca0da853781824f42ad2dc632a workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index cb00306e..995cb0a8 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1098,4 +1098,14 @@ Based on: ### Generated - [python v0.17.24] . ### Releases -- [PyPI v0.17.24] https://pypi.org/project/glean-api-client/0.17.24 - . \ No newline at end of file +- [PyPI v0.17.24] https://pypi.org/project/glean-api-client/0.17.24 - . + +## 2026-11-19 10:34:45 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.810.0 (2.961.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.17.25] . +### Releases +- [PyPI v0.17.25] https://pypi.org/project/glean-api-client/0.17.25 - . \ No newline at end of file diff --git a/docs/models/agentconfig.md b/docs/models/agentconfig.md index a1664d98..11358928 100644 --- a/docs/models/agentconfig.md +++ b/docs/models/agentconfig.md @@ -9,5 +9,5 @@ Describes the agent that executes the request. | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | `agent` | [Optional[models.AgentEnum]](../models/agentenum.md) | :heavy_minus_sign: | Name of the agent. | | `tool_sets` | [Optional[models.ToolSets]](../models/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` | [Optional[models.Mode]](../models/mode.md) | :heavy_minus_sign: | Top level modes to run GleanChat in. | +| `mode` | [Optional[models.AgentConfigMode]](../models/agentconfigmode.md) | :heavy_minus_sign: | Top level modes to run GleanChat in. | | `use_image_generation` | *Optional[bool]* | :heavy_minus_sign: | Whether the agent should create an image. | \ No newline at end of file diff --git a/docs/models/mode.md b/docs/models/agentconfigmode.md similarity index 71% rename from docs/models/mode.md rename to docs/models/agentconfigmode.md index b1cd1e56..799334e9 100644 --- a/docs/models/mode.md +++ b/docs/models/agentconfigmode.md @@ -1,13 +1,13 @@ -# Mode +# AgentConfigMode Top level modes to run GleanChat in. ## Example Usage ```python -from glean.api_client.models import Mode +from glean.api_client.models import AgentConfigMode -value = Mode.DEFAULT +value = AgentConfigMode.DEFAULT # Open enum: unrecognized values are captured as UnrecognizedStr ``` diff --git a/docs/models/content.md b/docs/models/content.md new file mode 100644 index 00000000..22097a02 --- /dev/null +++ b/docs/models/content.md @@ -0,0 +1,10 @@ +# Content + +Document events that run a CONTENT_TRIGGER agent. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `triggers` | List[[models.PlatformAgentContentTrigger](../models/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/customisationdata.md b/docs/models/customisationdata.md new file mode 100644 index 00000000..cd5a4718 --- /dev/null +++ b/docs/models/customisationdata.md @@ -0,0 +1,10 @@ +# CustomisationData + +Settings applied to every tool in this provider entry. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `skip_confirmation` | *Optional[bool]* | :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/insightsoverviewresponse.md b/docs/models/insightsoverviewresponse.md index d14c7407..07df004e 100644 --- a/docs/models/insightsoverviewresponse.md +++ b/docs/models/insightsoverviewresponse.md @@ -19,7 +19,7 @@ | `extension_summary` | [Optional[models.CurrentActiveUsers]](../models/currentactiveusers.md) | :heavy_minus_sign: | N/A | | `ugc_summary` | [Optional[models.CurrentActiveUsers]](../models/currentactiveusers.md) | :heavy_minus_sign: | N/A | | `last_updated_ts` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp of the last update for the insights data in the response. | -| `total_signups_week_ago` | *Optional[int]* | :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. | +| `total_signups_week_ago` | *Optional[int]* | :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. | | ~~`search_session_satisfaction`~~ | *Optional[float]* | :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. | | `monthly_active_user_timeseries` | [Optional[models.LabeledCountInfo]](../models/labeledcountinfo.md) | :heavy_minus_sign: | N/A | | `weekly_active_user_timeseries` | [Optional[models.LabeledCountInfo]](../models/labeledcountinfo.md) | :heavy_minus_sign: | N/A | diff --git a/docs/models/messagesrequest.md b/docs/models/messagesrequest.md index 4e064fdd..b0b9fa33 100644 --- a/docs/models/messagesrequest.md +++ b/docs/models/messagesrequest.md @@ -8,7 +8,7 @@ | `id_type` | [models.IDType](../models/idtype.md) | :heavy_check_mark: | Type of the id in the incoming request. | | `id` | *str* | :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. | | `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Id for the for the workspace in case of multiple workspaces. | -| `direction` | [Optional[models.Direction]](../models/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` | [Optional[models.MessagesRequestDirection]](../models/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. | | `timestamp_millis` | *Optional[int]* | :heavy_minus_sign: | Timestamp in millis of the reference message. Only applicable when using a message_id. | | `include_root_message` | *Optional[bool]* | :heavy_minus_sign: | Whether to include root message in response. | | `datasource` | [models.Datasource](../models/datasource.md) | :heavy_check_mark: | The type of the data source. | diff --git a/docs/models/direction.md b/docs/models/messagesrequestdirection.md similarity index 69% rename from docs/models/direction.md rename to docs/models/messagesrequestdirection.md index efe05ba9..4b6255d1 100644 --- a/docs/models/direction.md +++ b/docs/models/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 ```python -from glean.api_client.models import Direction +from glean.api_client.models import MessagesRequestDirection -value = Direction.OLDER +value = MessagesRequestDirection.OLDER ``` diff --git a/docs/models/platformagent.md b/docs/models/platformagent.md index dd4be223..510c0f41 100644 --- a/docs/models/platformagent.md +++ b/docs/models/platformagent.md @@ -1,12 +1,29 @@ # PlatformAgent +An agent available to the authenticated user. + ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `agent_id` | *str* | :heavy_check_mark: | ID of the agent. | mho4lwzylcozgoc2 | -| `name` | *str* | :heavy_check_mark: | Name of the agent. | HR Policy Agent | -| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the agent. | | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Agent metadata. | | -| `capabilities` | [models.PlatformAgentCapabilities](../models/platformagentcapabilities.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Human-readable name. | HR Policy Agent | +| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the agent's purpose and behavior. | | +| `instructions` | *Optional[str]* | :heavy_minus_sign: | System prompt the agent follows. | | +| `skills` | List[[models.PlatformAgentSkill](../models/platformagentskill.md)] | :heavy_minus_sign: | Skills defined inline. | | +| `dependencies` | List[[models.PlatformAgentDependency](../models/platformagentdependency.md)] | :heavy_minus_sign: | Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`.
| | +| `tools` | List[[models.PlatformAgentToolset](../models/platformagenttoolset.md)] | :heavy_minus_sign: | Tool providers and the subset of their tools available to the agent. | | +| `glean_search_config` | [Optional[models.PlatformAgentGleanSearchConfig]](../models/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` | [Optional[models.PlatformAgentLlmModel]](../models/platformagentllmmodel.md) | :heavy_minus_sign: | Agentic model the agent runs on and its reasoning effort. | | +| `service_credentials` | List[[models.PlatformAgentServiceCredential](../models/platformagentservicecredential.md)] | :heavy_minus_sign: | Service credentials the agent uses to call tools. | | +| `agent_id` | *str* | :heavy_check_mark: | ID of the agent. | ef33aecf52c142a6873adf76037b642e | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Agent metadata. | | +| `capabilities` | [models.PlatformAgentCapabilities](../models/platformagentcapabilities.md) | :heavy_check_mark: | N/A | | +| `use_agent_identity` | *Optional[bool]* | :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` | [Optional[models.PlatformAgentChannels]](../models/platformagentchannels.md) | :heavy_minus_sign: | Messaging channels the agent is deployed to. Requires `use_agent_identity`. | | +| `subagents` | List[[models.PlatformSubagent](../models/platformsubagent.md)] | :heavy_minus_sign: | Subagents the agent dispatches work to. Subagents cannot contain subagents.
| | +| `trigger` | [Optional[models.PlatformAgentTrigger]](../models/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | | +| `created_by` | [Optional[models.PlatformPersonReference]](../models/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | +| `updated_by` | [Optional[models.PlatformPersonReference]](../models/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time the agent was created. | | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time the agent was last updated. | | \ No newline at end of file diff --git a/docs/models/platformagentchannels.md b/docs/models/platformagentchannels.md new file mode 100644 index 00000000..5a542b87 --- /dev/null +++ b/docs/models/platformagentchannels.md @@ -0,0 +1,10 @@ +# PlatformAgentChannels + +Messaging channels the agent is deployed to. Requires `use_agent_identity`. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `slack` | [Optional[models.PlatformAgentSlackChannel]](../models/platformagentslackchannel.md) | :heavy_minus_sign: | Slack deployment of the agent. | \ No newline at end of file diff --git a/docs/models/platformagentcontenttrigger.md b/docs/models/platformagentcontenttrigger.md new file mode 100644 index 00000000..bc1979a0 --- /dev/null +++ b/docs/models/platformagentcontenttrigger.md @@ -0,0 +1,14 @@ +# PlatformAgentContentTrigger + +A subscribed document event and the filters that narrow it. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `datasource` | *str* | :heavy_check_mark: | Event source in enum form, for example `JIRA`. | +| `template_id` | *str* | :heavy_check_mark: | Subscribed event identifier, for example `JIRA_TICKET_CREATED`. | +| `document_type` | *Optional[str]* | :heavy_minus_sign: | Document type the entry watches. | +| `time_offset_seconds` | *Optional[int]* | :heavy_minus_sign: | Seconds before an event time carried in the document at which the agent runs. Pre-event triggers only.
| +| `filters` | List[[models.PlatformAgentContentTriggerFilter](../models/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/platformagentcontenttriggerfilter.md b/docs/models/platformagentcontenttriggerfilter.md new file mode 100644 index 00000000..f667874a --- /dev/null +++ b/docs/models/platformagentcontenttriggerfilter.md @@ -0,0 +1,12 @@ +# PlatformAgentContentTriggerFilter + +A filter on the document that fired a content trigger. Values are ORed. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `field` | *str* | :heavy_check_mark: | `TITLE` or `CONTENT` for the document's title or body, or a facet key. | +| `operator` | [models.PlatformAgentContentTriggerFilterOperator](../models/platformagentcontenttriggerfilteroperator.md) | :heavy_check_mark: | Operator of a content trigger filter. | +| `values` | List[*str*] | :heavy_minus_sign: | Match values. Required except for FIELD_CHANGED. | \ No newline at end of file diff --git a/docs/models/platformagentcontenttriggerfilteroperator.md b/docs/models/platformagentcontenttriggerfilteroperator.md new file mode 100644 index 00000000..63c0b9ab --- /dev/null +++ b/docs/models/platformagentcontenttriggerfilteroperator.md @@ -0,0 +1,23 @@ +# PlatformAgentContentTriggerFilterOperator + +Operator of a content trigger filter. + +## Example Usage + +```python +from glean.api_client.models import PlatformAgentContentTriggerFilterOperator + +value = PlatformAgentContentTriggerFilterOperator.IS_ONE_OF + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `IS_ONE_OF` | IS_ONE_OF | +| `IS_NOT_ONE_OF` | IS_NOT_ONE_OF | +| `CONTAINS` | CONTAINS | +| `FIELD_CHANGED` | FIELD_CHANGED | \ No newline at end of file diff --git a/docs/models/platformagentdependency.md b/docs/models/platformagentdependency.md new file mode 100644 index 00000000..cab85e6d --- /dev/null +++ b/docs/models/platformagentdependency.md @@ -0,0 +1,11 @@ +# PlatformAgentDependency + +A published artifact the agent references by platform ID. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *str* | :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` | [models.PlatformAgentDependencyType](../models/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/platformagentdependencytype.md b/docs/models/platformagentdependencytype.md new file mode 100644 index 00000000..e12d5d98 --- /dev/null +++ b/docs/models/platformagentdependencytype.md @@ -0,0 +1,21 @@ +# PlatformAgentDependencyType + +Type of a published artifact referenced as a dependency. + +## Example Usage + +```python +from glean.api_client.models import PlatformAgentDependencyType + +value = PlatformAgentDependencyType.SKILL + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ------- | ------- | +| `SKILL` | SKILL | +| `AGENT` | AGENT | \ No newline at end of file diff --git a/docs/models/platformagentgetresponse.md b/docs/models/platformagentgetresponse.md index be79ecee..d3430a26 100644 --- a/docs/models/platformagentgetresponse.md +++ b/docs/models/platformagentgetresponse.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `agent` | [models.PlatformAgent](../models/platformagent.md) | :heavy_check_mark: | N/A | +| `agent` | [models.PlatformAgent](../models/platformagent.md) | :heavy_check_mark: | An agent available to the authenticated user. | | `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformagentgleansearchconfig.md b/docs/models/platformagentgleansearchconfig.md new file mode 100644 index 00000000..87c0d0b2 --- /dev/null +++ b/docs/models/platformagentgleansearchconfig.md @@ -0,0 +1,13 @@ +# 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. + + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `knowledge_profile_id` | *Optional[str]* | :heavy_minus_sign: | ID of a knowledge profile whose permissions Glean Search uses instead of the invoking user's permissions.
| +| `datasource_instances` | List[*str*] | :heavy_minus_sign: | Datasource instance names that search is restricted to. Each name selects one instance, not every instance of a datasource type.
| +| `urls` | List[*str*] | :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/platformagentinputfield.md b/docs/models/platformagentinputfield.md new file mode 100644 index 00000000..21416f8c --- /dev/null +++ b/docs/models/platformagentinputfield.md @@ -0,0 +1,16 @@ +# PlatformAgentInputField + +A typed input of the agent, referenced from the instructions as `[[display_name]]`. + + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `display_name` | *str* | :heavy_check_mark: | Label of the field and its placeholder name in the instructions. Unique within the agent. | +| `type` | [models.PlatformAgentInputFieldType](../models/platformagentinputfieldtype.md) | :heavy_check_mark: | Type of an agent input field. | +| `description` | *Optional[str]* | :heavy_minus_sign: | Helper text describing the field. | +| `default_value` | *Optional[str]* | :heavy_minus_sign: | Pre-filled value. For SELECT fields, one of the option values. For DATE fields, a `YYYY-MM-DD` date.
| +| `is_optional` | *Optional[bool]* | :heavy_minus_sign: | Whether the field accepts empty input. Defaults to false. | +| `options` | List[[models.PlatformAgentInputFieldOption](../models/platformagentinputfieldoption.md)] | :heavy_minus_sign: | Choices of a SELECT field. | \ No newline at end of file diff --git a/docs/models/platformagentinputfieldoption.md b/docs/models/platformagentinputfieldoption.md new file mode 100644 index 00000000..21a6f117 --- /dev/null +++ b/docs/models/platformagentinputfieldoption.md @@ -0,0 +1,10 @@ +# PlatformAgentInputFieldOption + +A choice of a SELECT input field. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `value` | *str* | :heavy_check_mark: | Value substituted into the field's placeholder. | \ No newline at end of file diff --git a/docs/models/platformagentinputfieldtype.md b/docs/models/platformagentinputfieldtype.md new file mode 100644 index 00000000..65559399 --- /dev/null +++ b/docs/models/platformagentinputfieldtype.md @@ -0,0 +1,23 @@ +# PlatformAgentInputFieldType + +Type of an agent input field. + +## Example Usage + +```python +from glean.api_client.models import PlatformAgentInputFieldType + +value = PlatformAgentInputFieldType.TEXT + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `TEXT` | TEXT | +| `SELECT` | SELECT | +| `DATE` | DATE | +| `DOCUMENT` | DOCUMENT | \ No newline at end of file diff --git a/docs/models/platformagentllmmodel.md b/docs/models/platformagentllmmodel.md new file mode 100644 index 00000000..e2e59e97 --- /dev/null +++ b/docs/models/platformagentllmmodel.md @@ -0,0 +1,12 @@ +# PlatformAgentLlmModel + +Agentic model the agent runs on and its reasoning effort. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `model_set_id` | *Optional[str]* | :heavy_minus_sign: | Agentic model set ID. When omitted, the tenant default is used. | +| `mode` | [Optional[models.PlatformAgentLlmModelMode]](../models/platformagentllmmodelmode.md) | :heavy_minus_sign: | Reasoning effort per turn. Defaults to ADVANCED. | +| `auto_upgrade` | *Optional[bool]* | :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/platformagentllmmodelmode.md b/docs/models/platformagentllmmodelmode.md new file mode 100644 index 00000000..90ac02ae --- /dev/null +++ b/docs/models/platformagentllmmodelmode.md @@ -0,0 +1,21 @@ +# PlatformAgentLlmModelMode + +Reasoning effort per turn. Defaults to ADVANCED. + +## Example Usage + +```python +from glean.api_client.models import PlatformAgentLlmModelMode + +value = PlatformAgentLlmModelMode.ADVANCED + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `ADVANCED` | ADVANCED | +| `FAST` | FAST | \ No newline at end of file diff --git a/docs/models/platformagentprompt.md b/docs/models/platformagentprompt.md new file mode 100644 index 00000000..529aab07 --- /dev/null +++ b/docs/models/platformagentprompt.md @@ -0,0 +1,11 @@ +# PlatformAgentPrompt + +A conversation starter whose template is sent as the first chat message. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `display_name` | *str* | :heavy_check_mark: | Short title of the conversation starter. | +| `template` | *str* | :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/platformagentschedule.md b/docs/models/platformagentschedule.md new file mode 100644 index 00000000..8239f619 --- /dev/null +++ b/docs/models/platformagentschedule.md @@ -0,0 +1,12 @@ +# PlatformAgentSchedule + +Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `frequency` | *str* | :heavy_check_mark: | Five-field Unix cron expression, for example `0 9 * * 1-5`. | +| `timezone` | *str* | :heavy_check_mark: | IANA time zone name, for example `America/Los_Angeles`. | +| `start_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :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/platformagentselectedtool.md b/docs/models/platformagentselectedtool.md new file mode 100644 index 00000000..501c4d83 --- /dev/null +++ b/docs/models/platformagentselectedtool.md @@ -0,0 +1,10 @@ +# PlatformAgentSelectedTool + +A tool selected from a tool provider. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `display_name` | *str* | :heavy_check_mark: | Name of the tool within its provider. | \ No newline at end of file diff --git a/docs/models/platformagentservicecredential.md b/docs/models/platformagentservicecredential.md new file mode 100644 index 00000000..fc20203e --- /dev/null +++ b/docs/models/platformagentservicecredential.md @@ -0,0 +1,10 @@ +# PlatformAgentServiceCredential + +A service credential the agent uses. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `service_credential_id` | *str* | :heavy_check_mark: | ID of the service credential. | \ No newline at end of file diff --git a/docs/models/platformagentskill.md b/docs/models/platformagentskill.md new file mode 100644 index 00000000..b10ca7f4 --- /dev/null +++ b/docs/models/platformagentskill.md @@ -0,0 +1,13 @@ +# PlatformAgentSkill + +A skill defined inline in the agent. Reference a published skill through `dependencies` instead. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `display_name` | *str* | :heavy_check_mark: | Human-readable skill name. | +| `main_content` | *str* | :heavy_check_mark: | Main skill content, inlined from `SKILL.md`. | +| `files` | List[[models.PlatformSkillSourcePreviewFile](../models/platformskillsourcepreviewfile.md)] | :heavy_minus_sign: | Additional files bundled in the skill folder. | \ No newline at end of file diff --git a/docs/models/platformagentslackchannel.md b/docs/models/platformagentslackchannel.md new file mode 100644 index 00000000..9b757db9 --- /dev/null +++ b/docs/models/platformagentslackchannel.md @@ -0,0 +1,13 @@ +# PlatformAgentSlackChannel + +Slack deployment of the agent. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `service_credential_id` | *Optional[str]* | :heavy_minus_sign: | ID of the service credential for the Slack app. | +| `channel_mappings` | List[[models.PlatformAgentSlackChannelMapping](../models/platformagentslackchannelmapping.md)] | :heavy_minus_sign: | Slack channels the agent is mapped to. | +| `engagement_filter_instructions` | *Optional[str]* | :heavy_minus_sign: | Instructions that decide which messages the agent engages with. | +| `allow_mentions_outside_channel_mappings` | *Optional[bool]* | :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/platformagentslackchannelmapping.md b/docs/models/platformagentslackchannelmapping.md new file mode 100644 index 00000000..48860ed9 --- /dev/null +++ b/docs/models/platformagentslackchannelmapping.md @@ -0,0 +1,11 @@ +# PlatformAgentSlackChannelMapping + +A Slack channel the agent is mapped to. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `channel_id` | *str* | :heavy_check_mark: | ID of the Slack channel. | +| `auto_engage` | *Optional[bool]* | :heavy_minus_sign: | Whether the agent engages with messages without being mentioned. | \ No newline at end of file diff --git a/docs/models/platformagenttoolset.md b/docs/models/platformagenttoolset.md new file mode 100644 index 00000000..e02e83e9 --- /dev/null +++ b/docs/models/platformagenttoolset.md @@ -0,0 +1,12 @@ +# PlatformAgentToolset + +A tool provider and the subset of its tools available to the agent. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `tool_provider_id` | *str* | :heavy_check_mark: | ID of the tool provider, or `native` for built-in Glean tools. | +| `selected_tools` | List[[models.PlatformAgentSelectedTool](../models/platformagentselectedtool.md)] | :heavy_minus_sign: | Tools from the provider that are exposed to the agent. | +| `customisation_data` | [Optional[models.CustomisationData]](../models/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/platformagenttrigger.md b/docs/models/platformagenttrigger.md new file mode 100644 index 00000000..dec66160 --- /dev/null +++ b/docs/models/platformagenttrigger.md @@ -0,0 +1,14 @@ +# PlatformAgentTrigger + +How the agent is invoked. Applies to top-level agents only. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [models.PlatformAgentTriggerType](../models/platformagenttriggertype.md) | :heavy_check_mark: | Invocation mode of the agent. | +| `input_fields` | List[[models.PlatformAgentInputField](../models/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` | [Optional[models.PlatformAgentSchedule]](../models/platformagentschedule.md) | :heavy_minus_sign: | Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents. | +| `prompts` | List[[models.PlatformAgentPrompt](../models/platformagentprompt.md)] | :heavy_minus_sign: | Conversation starters. Valid only for CHAT_MESSAGE. | +| `content` | [Optional[models.Content]](../models/content.md) | :heavy_minus_sign: | Document events that run a CONTENT_TRIGGER agent. | \ No newline at end of file diff --git a/docs/models/platformagenttriggertype.md b/docs/models/platformagenttriggertype.md new file mode 100644 index 00000000..3d9be092 --- /dev/null +++ b/docs/models/platformagenttriggertype.md @@ -0,0 +1,22 @@ +# PlatformAgentTriggerType + +Invocation mode of the agent. + +## Example Usage + +```python +from glean.api_client.models import PlatformAgentTriggerType + +value = PlatformAgentTriggerType.CHAT_MESSAGE + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ----------------- | ----------------- | +| `CHAT_MESSAGE` | CHAT_MESSAGE | +| `INPUT_FORM` | INPUT_FORM | +| `CONTENT_TRIGGER` | CONTENT_TRIGGER | \ No newline at end of file diff --git a/docs/models/platformskillsourcepreviewfile.md b/docs/models/platformskillsourcepreviewfile.md index 6f4626cb..062d4863 100644 --- a/docs/models/platformskillsourcepreviewfile.md +++ b/docs/models/platformskillsourcepreviewfile.md @@ -1,5 +1,7 @@ # PlatformSkillSourcePreviewFile +A supporting file bundled with a skill. + ## Fields diff --git a/docs/models/platformsubagent.md b/docs/models/platformsubagent.md new file mode 100644 index 00000000..3da5869b --- /dev/null +++ b/docs/models/platformsubagent.md @@ -0,0 +1,20 @@ +# 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. + + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Human-readable name. | HR Policy Agent | +| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the agent's purpose and behavior. | | +| `instructions` | *Optional[str]* | :heavy_minus_sign: | System prompt the agent follows. | | +| `skills` | List[[models.PlatformAgentSkill](../models/platformagentskill.md)] | :heavy_minus_sign: | Skills defined inline. | | +| `dependencies` | List[[models.PlatformAgentDependency](../models/platformagentdependency.md)] | :heavy_minus_sign: | Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`.
| | +| `tools` | List[[models.PlatformAgentToolset](../models/platformagenttoolset.md)] | :heavy_minus_sign: | Tool providers and the subset of their tools available to the agent. | | +| `glean_search_config` | [Optional[models.PlatformAgentGleanSearchConfig]](../models/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` | [Optional[models.PlatformAgentLlmModel]](../models/platformagentllmmodel.md) | :heavy_minus_sign: | Agentic model the agent runs on and its reasoning effort. | | +| `service_credentials` | List[[models.PlatformAgentServiceCredential](../models/platformagentservicecredential.md)] | :heavy_minus_sign: | Service credentials the agent uses to call tools. | | +| `subagent_id` | *Optional[str]* | :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/docs/sdks/messages/README.md b/docs/sdks/messages/README.md index 754dd663..356f899f 100644 --- a/docs/sdks/messages/README.md +++ b/docs/sdks/messages/README.md @@ -38,7 +38,7 @@ with Glean( | `datasource` | [models.Datasource](../../models/datasource.md) | :heavy_check_mark: | The type of the data source. | | `locale` | *Optional[str]* | :heavy_minus_sign: | The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. | | `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Id for the for the workspace in case of multiple workspaces. | -| `direction` | [Optional[models.Direction]](../../models/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` | [Optional[models.MessagesRequestDirection]](../../models/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. | | `timestamp_millis` | *Optional[int]* | :heavy_minus_sign: | Timestamp in millis of the reference message. Only applicable when using a message_id. | | `include_root_message` | *Optional[bool]* | :heavy_minus_sign: | Whether to include root message in response. | | `datasource_instance_display_name` | *Optional[str]* | :heavy_minus_sign: | The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. | diff --git a/pyproject.toml b/pyproject.toml index c1aeb95a..680d9d68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.17.24" +version = "0.17.25" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Glean Technologies, Inc." },] readme = "README-PYPI.md" diff --git a/src/glean/api_client/_version.py b/src/glean/api_client/_version.py index 75f528b2..e72a33ba 100644 --- a/src/glean/api_client/_version.py +++ b/src/glean/api_client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "glean-api-client" -__version__: str = "0.17.24" +__version__: str = "0.17.25" __openapi_doc_version__: str = "0.9.0" __gen_version__: str = "2.961.1" -__user_agent__: str = "speakeasy-sdk/python 0.17.24 2.961.1 0.9.0 glean-api-client" +__user_agent__: str = "speakeasy-sdk/python 0.17.25 2.961.1 0.9.0 glean-api-client" try: if __package__ is not None: diff --git a/src/glean/api_client/messages.py b/src/glean/api_client/messages.py index b140b656..f47d1c8a 100644 --- a/src/glean/api_client/messages.py +++ b/src/glean/api_client/messages.py @@ -18,7 +18,7 @@ def retrieve( datasource: models.Datasource, locale: Optional[str] = None, workspace_id: Optional[str] = None, - direction: Optional[models.Direction] = None, + direction: Optional[models.MessagesRequestDirection] = None, timestamp_millis: Optional[int] = None, include_root_message: Optional[bool] = None, datasource_instance_display_name: Optional[str] = None, @@ -136,7 +136,7 @@ async def retrieve_async( datasource: models.Datasource, locale: Optional[str] = None, workspace_id: Optional[str] = None, - direction: Optional[models.Direction] = None, + direction: Optional[models.MessagesRequestDirection] = None, timestamp_millis: Optional[int] = None, include_root_message: Optional[bool] = None, datasource_instance_display_name: Optional[str] = None, diff --git a/src/glean/api_client/models/__init__.py b/src/glean/api_client/models/__init__.py index 1f55fb23..6b294a3b 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -128,7 +128,12 @@ AgentMetadataTypedDict, AgentTypedDict, ) - from .agentconfig import AgentConfig, AgentConfigTypedDict, AgentEnum, Mode + from .agentconfig import ( + AgentConfig, + AgentConfigMode, + AgentConfigTypedDict, + AgentEnum, + ) from .agentexecutionstatus import AgentExecutionStatus from .agentrun import AgentRun, AgentRunTypedDict from .agentruncreate import AgentRunCreate, AgentRunCreateTypedDict @@ -1242,9 +1247,9 @@ from .messagesop import MessagesRequestRequest, MessagesRequestRequestTypedDict from .messagesrequest import ( Datasource, - Direction, IDType, MessagesRequest, + MessagesRequestDirection, MessagesRequestTypedDict, ) from .messagesresponse import MessagesResponse, MessagesResponseTypedDict @@ -1483,11 +1488,50 @@ PlatformAgentCapabilities, PlatformAgentCapabilitiesTypedDict, ) + from .platformagentchannels import ( + PlatformAgentChannels, + PlatformAgentChannelsTypedDict, + ) + from .platformagentcontenttrigger import ( + PlatformAgentContentTrigger, + PlatformAgentContentTriggerTypedDict, + ) + from .platformagentcontenttriggerfilter import ( + PlatformAgentContentTriggerFilter, + PlatformAgentContentTriggerFilterTypedDict, + ) + from .platformagentcontenttriggerfilteroperator import ( + PlatformAgentContentTriggerFilterOperator, + ) + from .platformagentdependency import ( + PlatformAgentDependency, + PlatformAgentDependencyType, + PlatformAgentDependencyTypedDict, + ) from .platformagentexecutionstatus import PlatformAgentExecutionStatus from .platformagentgetresponse import ( PlatformAgentGetResponse, PlatformAgentGetResponseTypedDict, ) + from .platformagentgleansearchconfig import ( + PlatformAgentGleanSearchConfig, + PlatformAgentGleanSearchConfigTypedDict, + ) + from .platformagentinputfield import ( + PlatformAgentInputField, + PlatformAgentInputFieldType, + PlatformAgentInputFieldTypedDict, + ) + from .platformagentinputfieldoption import ( + PlatformAgentInputFieldOption, + PlatformAgentInputFieldOptionTypedDict, + ) + from .platformagentllmmodel import ( + PlatformAgentLlmModel, + PlatformAgentLlmModelMode, + PlatformAgentLlmModelTypedDict, + ) + from .platformagentprompt import PlatformAgentPrompt, PlatformAgentPromptTypedDict from .platformagentrun import PlatformAgentRun, PlatformAgentRunTypedDict from .platformagentrunapprovaldecision import ( Decision, @@ -1525,10 +1569,31 @@ PlatformAgentRunWaitResponse, PlatformAgentRunWaitResponseTypedDict, ) + from .platformagentschedule import ( + PlatformAgentSchedule, + PlatformAgentScheduleTypedDict, + ) from .platformagentschemasresponse import ( PlatformAgentSchemasResponse, PlatformAgentSchemasResponseTypedDict, ) + from .platformagentselectedtool import ( + PlatformAgentSelectedTool, + PlatformAgentSelectedToolTypedDict, + ) + from .platformagentservicecredential import ( + PlatformAgentServiceCredential, + PlatformAgentServiceCredentialTypedDict, + ) + from .platformagentskill import PlatformAgentSkill, PlatformAgentSkillTypedDict + from .platformagentslackchannel import ( + PlatformAgentSlackChannel, + PlatformAgentSlackChannelTypedDict, + ) + from .platformagentslackchannelmapping import ( + PlatformAgentSlackChannelMapping, + PlatformAgentSlackChannelMappingTypedDict, + ) from .platformagentssearchrequest import ( PlatformAgentsSearchRequest, PlatformAgentsSearchRequestTypedDict, @@ -1537,6 +1602,19 @@ PlatformAgentsSearchResponse, PlatformAgentsSearchResponseTypedDict, ) + from .platformagenttoolset import ( + CustomisationData, + CustomisationDataTypedDict, + PlatformAgentToolset, + PlatformAgentToolsetTypedDict, + ) + from .platformagenttrigger import ( + Content, + ContentTypedDict, + PlatformAgentTrigger, + PlatformAgentTriggerType, + PlatformAgentTriggerTypedDict, + ) from .platformauthenticationsuggestion import ( PlatformAuthenticationSuggestion, PlatformAuthenticationSuggestionTypedDict, @@ -2005,6 +2083,7 @@ PlatformSkillVersionsListResponse, PlatformSkillVersionsListResponseTypedDict, ) + from .platformsubagent import PlatformSubagent, PlatformSubagentTypedDict from .platformtimerange import PlatformTimeRange, PlatformTimeRangeTypedDict from .platformtrigger import PlatformTrigger, PlatformTriggerTypedDict from .platformtriggerauth_output import ( @@ -2566,6 +2645,7 @@ "AgentCapabilities", "AgentCapabilitiesTypedDict", "AgentConfig", + "AgentConfigMode", "AgentConfigTypedDict", "AgentEnum", "AgentExecutionStatus", @@ -2795,9 +2875,11 @@ "ConfigurationValue", "ConfigurationValueTypedDict", "ConnectorType", + "Content", "ContentDefinition", "ContentDefinitionTypedDict", "ContentType", + "ContentTypedDict", "CountInfo", "CountInfoTypedDict", "CreateAgentRequest", @@ -2872,6 +2954,8 @@ "CustomerMetadata", "CustomerMetadataTypedDict", "CustomerTypedDict", + "CustomisationData", + "CustomisationDataTypedDict", "DELETE_REST_API_INDEX_CUSTOM_METADATA_SCHEMA_GROUP_NAME_OP_SERVERS", "DELETE_REST_API_INDEX_DOCUMENT_DOC_ID_CUSTOM_METADATA_GROUP_NAME_OP_SERVERS", "Datasource", @@ -2980,7 +3064,6 @@ "DigestTypedDict", "DigestUpdate", "DigestUpdateTypedDict", - "Direction", "Disambiguation", "DisambiguationTypedDict", "DisplayableListItemUIConfig", @@ -3446,12 +3529,12 @@ "MessageType", "MessageTypedDict", "MessagesRequest", + "MessagesRequestDirection", "MessagesRequestRequest", "MessagesRequestRequestTypedDict", "MessagesRequestTypedDict", "MessagesResponse", "MessagesResponseTypedDict", - "Mode", "ObjectDefinition", "ObjectDefinitionTypedDict", "ObjectPermissions", @@ -3526,9 +3609,31 @@ "PlatformAgent", "PlatformAgentCapabilities", "PlatformAgentCapabilitiesTypedDict", + "PlatformAgentChannels", + "PlatformAgentChannelsTypedDict", + "PlatformAgentContentTrigger", + "PlatformAgentContentTriggerFilter", + "PlatformAgentContentTriggerFilterOperator", + "PlatformAgentContentTriggerFilterTypedDict", + "PlatformAgentContentTriggerTypedDict", + "PlatformAgentDependency", + "PlatformAgentDependencyType", + "PlatformAgentDependencyTypedDict", "PlatformAgentExecutionStatus", "PlatformAgentGetResponse", "PlatformAgentGetResponseTypedDict", + "PlatformAgentGleanSearchConfig", + "PlatformAgentGleanSearchConfigTypedDict", + "PlatformAgentInputField", + "PlatformAgentInputFieldOption", + "PlatformAgentInputFieldOptionTypedDict", + "PlatformAgentInputFieldType", + "PlatformAgentInputFieldTypedDict", + "PlatformAgentLlmModel", + "PlatformAgentLlmModelMode", + "PlatformAgentLlmModelTypedDict", + "PlatformAgentPrompt", + "PlatformAgentPromptTypedDict", "PlatformAgentRun", "PlatformAgentRunApprovalDecision", "PlatformAgentRunApprovalDecisionTypedDict", @@ -3549,8 +3654,25 @@ "PlatformAgentRunTypedDict", "PlatformAgentRunWaitResponse", "PlatformAgentRunWaitResponseTypedDict", + "PlatformAgentSchedule", + "PlatformAgentScheduleTypedDict", "PlatformAgentSchemasResponse", "PlatformAgentSchemasResponseTypedDict", + "PlatformAgentSelectedTool", + "PlatformAgentSelectedToolTypedDict", + "PlatformAgentServiceCredential", + "PlatformAgentServiceCredentialTypedDict", + "PlatformAgentSkill", + "PlatformAgentSkillTypedDict", + "PlatformAgentSlackChannel", + "PlatformAgentSlackChannelMapping", + "PlatformAgentSlackChannelMappingTypedDict", + "PlatformAgentSlackChannelTypedDict", + "PlatformAgentToolset", + "PlatformAgentToolsetTypedDict", + "PlatformAgentTrigger", + "PlatformAgentTriggerType", + "PlatformAgentTriggerTypedDict", "PlatformAgentTypedDict", "PlatformAgentsCancelRunRequest", "PlatformAgentsCancelRunRequestTypedDict", @@ -3892,6 +4014,8 @@ "PlatformSkillsSyncRequestTypedDict", "PlatformSkillsUpdateRequest", "PlatformSkillsUpdateRequestTypedDict", + "PlatformSubagent", + "PlatformSubagentTypedDict", "PlatformTimeRange", "PlatformTimeRangeTypedDict", "PlatformTrigger", @@ -4377,9 +4501,9 @@ "AgentMetadataTypedDict": ".agent", "AgentTypedDict": ".agent", "AgentConfig": ".agentconfig", + "AgentConfigMode": ".agentconfig", "AgentConfigTypedDict": ".agentconfig", "AgentEnum": ".agentconfig", - "Mode": ".agentconfig", "AgentExecutionStatus": ".agentexecutionstatus", "AgentRun": ".agentrun", "AgentRunTypedDict": ".agentrun", @@ -5210,9 +5334,9 @@ "MessagesRequestRequest": ".messagesop", "MessagesRequestRequestTypedDict": ".messagesop", "Datasource": ".messagesrequest", - "Direction": ".messagesrequest", "IDType": ".messagesrequest", "MessagesRequest": ".messagesrequest", + "MessagesRequestDirection": ".messagesrequest", "MessagesRequestTypedDict": ".messagesrequest", "MessagesResponse": ".messagesresponse", "MessagesResponseTypedDict": ".messagesresponse", @@ -5364,9 +5488,31 @@ "PlatformAgentTypedDict": ".platformagent", "PlatformAgentCapabilities": ".platformagentcapabilities", "PlatformAgentCapabilitiesTypedDict": ".platformagentcapabilities", + "PlatformAgentChannels": ".platformagentchannels", + "PlatformAgentChannelsTypedDict": ".platformagentchannels", + "PlatformAgentContentTrigger": ".platformagentcontenttrigger", + "PlatformAgentContentTriggerTypedDict": ".platformagentcontenttrigger", + "PlatformAgentContentTriggerFilter": ".platformagentcontenttriggerfilter", + "PlatformAgentContentTriggerFilterTypedDict": ".platformagentcontenttriggerfilter", + "PlatformAgentContentTriggerFilterOperator": ".platformagentcontenttriggerfilteroperator", + "PlatformAgentDependency": ".platformagentdependency", + "PlatformAgentDependencyType": ".platformagentdependency", + "PlatformAgentDependencyTypedDict": ".platformagentdependency", "PlatformAgentExecutionStatus": ".platformagentexecutionstatus", "PlatformAgentGetResponse": ".platformagentgetresponse", "PlatformAgentGetResponseTypedDict": ".platformagentgetresponse", + "PlatformAgentGleanSearchConfig": ".platformagentgleansearchconfig", + "PlatformAgentGleanSearchConfigTypedDict": ".platformagentgleansearchconfig", + "PlatformAgentInputField": ".platformagentinputfield", + "PlatformAgentInputFieldType": ".platformagentinputfield", + "PlatformAgentInputFieldTypedDict": ".platformagentinputfield", + "PlatformAgentInputFieldOption": ".platformagentinputfieldoption", + "PlatformAgentInputFieldOptionTypedDict": ".platformagentinputfieldoption", + "PlatformAgentLlmModel": ".platformagentllmmodel", + "PlatformAgentLlmModelMode": ".platformagentllmmodel", + "PlatformAgentLlmModelTypedDict": ".platformagentllmmodel", + "PlatformAgentPrompt": ".platformagentprompt", + "PlatformAgentPromptTypedDict": ".platformagentprompt", "PlatformAgentRun": ".platformagentrun", "PlatformAgentRunTypedDict": ".platformagentrun", "Decision": ".platformagentrunapprovaldecision", @@ -5389,12 +5535,33 @@ "PlatformAgentRunToolApprovalTypedDict": ".platformagentruntoolapproval", "PlatformAgentRunWaitResponse": ".platformagentrunwaitresponse", "PlatformAgentRunWaitResponseTypedDict": ".platformagentrunwaitresponse", + "PlatformAgentSchedule": ".platformagentschedule", + "PlatformAgentScheduleTypedDict": ".platformagentschedule", "PlatformAgentSchemasResponse": ".platformagentschemasresponse", "PlatformAgentSchemasResponseTypedDict": ".platformagentschemasresponse", + "PlatformAgentSelectedTool": ".platformagentselectedtool", + "PlatformAgentSelectedToolTypedDict": ".platformagentselectedtool", + "PlatformAgentServiceCredential": ".platformagentservicecredential", + "PlatformAgentServiceCredentialTypedDict": ".platformagentservicecredential", + "PlatformAgentSkill": ".platformagentskill", + "PlatformAgentSkillTypedDict": ".platformagentskill", + "PlatformAgentSlackChannel": ".platformagentslackchannel", + "PlatformAgentSlackChannelTypedDict": ".platformagentslackchannel", + "PlatformAgentSlackChannelMapping": ".platformagentslackchannelmapping", + "PlatformAgentSlackChannelMappingTypedDict": ".platformagentslackchannelmapping", "PlatformAgentsSearchRequest": ".platformagentssearchrequest", "PlatformAgentsSearchRequestTypedDict": ".platformagentssearchrequest", "PlatformAgentsSearchResponse": ".platformagentssearchresponse", "PlatformAgentsSearchResponseTypedDict": ".platformagentssearchresponse", + "CustomisationData": ".platformagenttoolset", + "CustomisationDataTypedDict": ".platformagenttoolset", + "PlatformAgentToolset": ".platformagenttoolset", + "PlatformAgentToolsetTypedDict": ".platformagenttoolset", + "Content": ".platformagenttrigger", + "ContentTypedDict": ".platformagenttrigger", + "PlatformAgentTrigger": ".platformagenttrigger", + "PlatformAgentTriggerType": ".platformagenttrigger", + "PlatformAgentTriggerTypedDict": ".platformagenttrigger", "PlatformAuthenticationSuggestion": ".platformauthenticationsuggestion", "PlatformAuthenticationSuggestionTypedDict": ".platformauthenticationsuggestion", "PlatformChat": ".platformchat", @@ -5667,6 +5834,8 @@ "PlatformSkillVersionGetResponseTypedDict": ".platformskillversiongetresponse", "PlatformSkillVersionsListResponse": ".platformskillversionslistresponse", "PlatformSkillVersionsListResponseTypedDict": ".platformskillversionslistresponse", + "PlatformSubagent": ".platformsubagent", + "PlatformSubagentTypedDict": ".platformsubagent", "PlatformTimeRange": ".platformtimerange", "PlatformTimeRangeTypedDict": ".platformtimerange", "PlatformTrigger": ".platformtrigger", diff --git a/src/glean/api_client/models/agentconfig.py b/src/glean/api_client/models/agentconfig.py index ed02f12a..0f1c6946 100644 --- a/src/glean/api_client/models/agentconfig.py +++ b/src/glean/api_client/models/agentconfig.py @@ -34,7 +34,7 @@ class AgentEnum(str, Enum, metaclass=utils.OpenEnumMeta): AUTO = "AUTO" -class Mode(str, Enum, metaclass=utils.OpenEnumMeta): +class AgentConfigMode(str, Enum, metaclass=utils.OpenEnumMeta): r"""Top level modes to run GleanChat in.""" # Used if no mode supplied. @@ -50,7 +50,7 @@ class AgentConfigTypedDict(TypedDict): r"""Name of the agent.""" tool_sets: NotRequired[ToolSetsTypedDict] r"""The types of tools that the agent is allowed to use. Only works with FAST and ADVANCED `agent` values""" - mode: NotRequired[Mode] + mode: NotRequired[AgentConfigMode] r"""Top level modes to run GleanChat in.""" use_image_generation: NotRequired[bool] r"""Whether the agent should create an image.""" @@ -65,7 +65,7 @@ class AgentConfig(BaseModel): tool_sets: Annotated[Optional[ToolSets], pydantic.Field(alias="toolSets")] = None r"""The types of tools that the agent is allowed to use. Only works with FAST and ADVANCED `agent` values""" - mode: Optional[Mode] = None + mode: Optional[AgentConfigMode] = None r"""Top level modes to run GleanChat in.""" use_image_generation: Annotated[ @@ -86,7 +86,7 @@ def serialize_agent(self, value): def serialize_mode(self, value): if isinstance(value, str): try: - return models.Mode(value) + return models.AgentConfigMode(value) except ValueError: return value return value diff --git a/src/glean/api_client/models/insightsoverviewresponse.py b/src/glean/api_client/models/insightsoverviewresponse.py index 0e206745..702734e3 100644 --- a/src/glean/api_client/models/insightsoverviewresponse.py +++ b/src/glean/api_client/models/insightsoverviewresponse.py @@ -41,7 +41,7 @@ class InsightsOverviewResponseTypedDict(TypedDict): last_updated_ts: NotRequired[int] r"""Unix timestamp of the last update for the insights data in the response.""" total_signups_week_ago: NotRequired[int] - r"""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.""" + r"""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.""" search_session_satisfaction: NotRequired[float] r"""Search session satisfaction rate, over the specified time period in the specified departments.""" monthly_active_user_timeseries: NotRequired[LabeledCountInfoTypedDict] @@ -133,7 +133,7 @@ class InsightsOverviewResponse(BaseModel): total_signups_week_ago: Annotated[ Optional[int], pydantic.Field(alias="totalSignupsWeekAgo") ] = None - r"""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.""" + r"""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.""" search_session_satisfaction: Annotated[ Optional[float], diff --git a/src/glean/api_client/models/messagesrequest.py b/src/glean/api_client/models/messagesrequest.py index 6ab12fa7..9486ad01 100644 --- a/src/glean/api_client/models/messagesrequest.py +++ b/src/glean/api_client/models/messagesrequest.py @@ -23,7 +23,7 @@ class IDType(str, Enum): CONVERSATION_ID = "CONVERSATION_ID" -class Direction(str, Enum): +class MessagesRequestDirection(str, Enum): r"""The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id.""" OLDER = "OLDER" @@ -49,7 +49,7 @@ class MessagesRequestTypedDict(TypedDict): r"""The type of the data source.""" workspace_id: NotRequired[str] r"""Id for the for the workspace in case of multiple workspaces.""" - direction: NotRequired[Direction] + direction: NotRequired[MessagesRequestDirection] r"""The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id.""" timestamp_millis: NotRequired[int] r"""Timestamp in millis of the reference message. Only applicable when using a message_id.""" @@ -72,7 +72,7 @@ class MessagesRequest(BaseModel): workspace_id: Annotated[Optional[str], pydantic.Field(alias="workspaceId")] = None r"""Id for the for the workspace in case of multiple workspaces.""" - direction: Optional[Direction] = None + direction: Optional[MessagesRequestDirection] = None r"""The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id.""" timestamp_millis: Annotated[ diff --git a/src/glean/api_client/models/platformagent.py b/src/glean/api_client/models/platformagent.py index 78757283..6c0f569d 100644 --- a/src/glean/api_client/models/platformagent.py +++ b/src/glean/api_client/models/platformagent.py @@ -5,6 +5,29 @@ PlatformAgentCapabilities, PlatformAgentCapabilitiesTypedDict, ) +from .platformagentchannels import PlatformAgentChannels, PlatformAgentChannelsTypedDict +from .platformagentdependency import ( + PlatformAgentDependency, + PlatformAgentDependencyTypedDict, +) +from .platformagentgleansearchconfig import ( + PlatformAgentGleanSearchConfig, + PlatformAgentGleanSearchConfigTypedDict, +) +from .platformagentllmmodel import PlatformAgentLlmModel, PlatformAgentLlmModelTypedDict +from .platformagentservicecredential import ( + PlatformAgentServiceCredential, + PlatformAgentServiceCredentialTypedDict, +) +from .platformagentskill import PlatformAgentSkill, PlatformAgentSkillTypedDict +from .platformagenttoolset import PlatformAgentToolset, PlatformAgentToolsetTypedDict +from .platformagenttrigger import PlatformAgentTrigger, PlatformAgentTriggerTypedDict +from .platformpersonreference import ( + PlatformPersonReference, + PlatformPersonReferenceTypedDict, +) +from .platformsubagent import PlatformSubagent, PlatformSubagentTypedDict +from datetime import datetime from glean.api_client.types import ( BaseModel, UNSET_SENTINEL, @@ -13,43 +36,158 @@ ) from glean.api_client.types.basemodel import current_filtered_dump from pydantic import model_serializer -from typing import Any, Dict, Optional +from typing import Any, Dict, List, Optional from typing_extensions import NotRequired, TypedDict class PlatformAgentTypedDict(TypedDict): + r"""An agent available to the authenticated user.""" + + name: str + r"""Human-readable name.""" agent_id: str r"""ID of the agent.""" - name: str - r"""Name of the agent.""" capabilities: PlatformAgentCapabilitiesTypedDict description: NotRequired[str] - r"""Description of the agent.""" + r"""Description of the agent's purpose and behavior.""" + instructions: NotRequired[str] + r"""System prompt the agent follows.""" + skills: NotRequired[List[PlatformAgentSkillTypedDict]] + r"""Skills defined inline.""" + dependencies: NotRequired[List[PlatformAgentDependencyTypedDict]] + r"""Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + + """ + tools: NotRequired[List[PlatformAgentToolsetTypedDict]] + r"""Tool providers and the subset of their tools available to the agent.""" + glean_search_config: NotRequired[PlatformAgentGleanSearchConfigTypedDict] + r"""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: NotRequired[PlatformAgentLlmModelTypedDict] + r"""Agentic model the agent runs on and its reasoning effort.""" + service_credentials: NotRequired[List[PlatformAgentServiceCredentialTypedDict]] + r"""Service credentials the agent uses to call tools.""" metadata: NotRequired[Dict[str, Any]] r"""Agent metadata.""" + use_agent_identity: NotRequired[bool] + r"""Whether the agent acts with its own identity instead of the invoking user's. Cannot be changed after the agent is created. + + """ + channels: NotRequired[PlatformAgentChannelsTypedDict] + r"""Messaging channels the agent is deployed to. Requires `use_agent_identity`.""" + subagents: NotRequired[List[PlatformSubagentTypedDict]] + r"""Subagents the agent dispatches work to. Subagents cannot contain subagents. + + """ + trigger: NotRequired[PlatformAgentTriggerTypedDict] + r"""How the agent is invoked. Applies to top-level agents only.""" + created_by: NotRequired[PlatformPersonReferenceTypedDict] + r"""A lightweight reference to a person, used where a payload merely points at someone.""" + updated_by: NotRequired[PlatformPersonReferenceTypedDict] + r"""A lightweight reference to a person, used where a payload merely points at someone.""" + created_at: NotRequired[datetime] + r"""Time the agent was created.""" + updated_at: NotRequired[datetime] + r"""Time the agent was last updated.""" class PlatformAgent(BaseModel): - agent_id: str - r"""ID of the agent.""" + r"""An agent available to the authenticated user.""" name: str - r"""Name of the agent.""" + r"""Human-readable name.""" + + agent_id: str + r"""ID of the agent.""" capabilities: PlatformAgentCapabilities description: Optional[str] = None - r"""Description of the agent.""" + r"""Description of the agent's purpose and behavior.""" + + instructions: Optional[str] = None + r"""System prompt the agent follows.""" + + skills: Optional[List[PlatformAgentSkill]] = None + r"""Skills defined inline.""" + + dependencies: Optional[List[PlatformAgentDependency]] = None + r"""Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + + """ + + tools: Optional[List[PlatformAgentToolset]] = None + r"""Tool providers and the subset of their tools available to the agent.""" + + glean_search_config: Optional[PlatformAgentGleanSearchConfig] = None + r"""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: Optional[PlatformAgentLlmModel] = None + r"""Agentic model the agent runs on and its reasoning effort.""" + + service_credentials: Optional[List[PlatformAgentServiceCredential]] = None + r"""Service credentials the agent uses to call tools.""" metadata: Optional[Dict[str, Any]] = None r"""Agent metadata.""" + use_agent_identity: Optional[bool] = None + r"""Whether the agent acts with its own identity instead of the invoking user's. Cannot be changed after the agent is created. + + """ + + channels: Optional[PlatformAgentChannels] = None + r"""Messaging channels the agent is deployed to. Requires `use_agent_identity`.""" + + subagents: Optional[List[PlatformSubagent]] = None + r"""Subagents the agent dispatches work to. Subagents cannot contain subagents. + + """ + + trigger: Optional[PlatformAgentTrigger] = None + r"""How the agent is invoked. Applies to top-level agents only.""" + + created_by: Optional[PlatformPersonReference] = None + r"""A lightweight reference to a person, used where a payload merely points at someone.""" + + updated_by: Optional[PlatformPersonReference] = None + r"""A lightweight reference to a person, used where a payload merely points at someone.""" + + created_at: Optional[datetime] = None + r"""Time the agent was created.""" + + updated_at: Optional[datetime] = None + r"""Time the agent was last updated.""" + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["description", "metadata"]) + optional_fields = set( + [ + "description", + "instructions", + "skills", + "dependencies", + "tools", + "glean_search_config", + "model", + "service_credentials", + "metadata", + "use_agent_identity", + "channels", + "subagents", + "trigger", + "created_by", + "updated_by", + "created_at", + "updated_at", + ] + ) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/glean/api_client/models/platformagentchannels.py b/src/glean/api_client/models/platformagentchannels.py new file mode 100644 index 00000000..80bb1e51 --- /dev/null +++ b/src/glean/api_client/models/platformagentchannels.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformagentslackchannel import ( + PlatformAgentSlackChannel, + PlatformAgentSlackChannelTypedDict, +) +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformAgentChannelsTypedDict(TypedDict): + r"""Messaging channels the agent is deployed to. Requires `use_agent_identity`.""" + + slack: NotRequired[PlatformAgentSlackChannelTypedDict] + r"""Slack deployment of the agent.""" + + +class PlatformAgentChannels(BaseModel): + r"""Messaging channels the agent is deployed to. Requires `use_agent_identity`.""" + + slack: Optional[PlatformAgentSlackChannel] = None + r"""Slack deployment of the agent.""" + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["slack"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformagentcontenttrigger.py b/src/glean/api_client/models/platformagentcontenttrigger.py new file mode 100644 index 00000000..2ef0ecd8 --- /dev/null +++ b/src/glean/api_client/models/platformagentcontenttrigger.py @@ -0,0 +1,82 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformagentcontenttriggerfilter import ( + PlatformAgentContentTriggerFilter, + PlatformAgentContentTriggerFilterTypedDict, +) +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformAgentContentTriggerTypedDict(TypedDict): + r"""A subscribed document event and the filters that narrow it.""" + + datasource: str + r"""Event source in enum form, for example `JIRA`.""" + template_id: str + r"""Subscribed event identifier, for example `JIRA_TICKET_CREATED`.""" + document_type: NotRequired[str] + r"""Document type the entry watches.""" + time_offset_seconds: NotRequired[int] + r"""Seconds before an event time carried in the document at which the agent runs. Pre-event triggers only. + + """ + filters: NotRequired[List[PlatformAgentContentTriggerFilterTypedDict]] + r"""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. + + """ + + +class PlatformAgentContentTrigger(BaseModel): + r"""A subscribed document event and the filters that narrow it.""" + + datasource: str + r"""Event source in enum form, for example `JIRA`.""" + + template_id: str + r"""Subscribed event identifier, for example `JIRA_TICKET_CREATED`.""" + + document_type: Optional[str] = None + r"""Document type the entry watches.""" + + time_offset_seconds: Optional[int] = None + r"""Seconds before an event time carried in the document at which the agent runs. Pre-event triggers only. + + """ + + filters: Optional[List[PlatformAgentContentTriggerFilter]] = None + r"""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. + + """ + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["document_type", "time_offset_seconds", "filters"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformagentcontenttriggerfilter.py b/src/glean/api_client/models/platformagentcontenttriggerfilter.py new file mode 100644 index 00000000..09299fcb --- /dev/null +++ b/src/glean/api_client/models/platformagentcontenttriggerfilter.py @@ -0,0 +1,73 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformagentcontenttriggerfilteroperator import ( + PlatformAgentContentTriggerFilterOperator, +) +from glean.api_client import models +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import field_serializer, model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformAgentContentTriggerFilterTypedDict(TypedDict): + r"""A filter on the document that fired a content trigger. Values are ORed.""" + + field: str + r"""`TITLE` or `CONTENT` for the document's title or body, or a facet key.""" + operator: PlatformAgentContentTriggerFilterOperator + r"""Operator of a content trigger filter.""" + values: NotRequired[List[str]] + r"""Match values. Required except for FIELD_CHANGED.""" + + +class PlatformAgentContentTriggerFilter(BaseModel): + r"""A filter on the document that fired a content trigger. Values are ORed.""" + + field: str + r"""`TITLE` or `CONTENT` for the document's title or body, or a facet key.""" + + operator: PlatformAgentContentTriggerFilterOperator + r"""Operator of a content trigger filter.""" + + values: Optional[List[str]] = None + r"""Match values. Required except for FIELD_CHANGED.""" + + @field_serializer("operator") + def serialize_operator(self, value): + if isinstance(value, str): + try: + return models.PlatformAgentContentTriggerFilterOperator(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["values"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformagentcontenttriggerfilteroperator.py b/src/glean/api_client/models/platformagentcontenttriggerfilteroperator.py new file mode 100644 index 00000000..f39b5a05 --- /dev/null +++ b/src/glean/api_client/models/platformagentcontenttriggerfilteroperator.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from glean.api_client import utils + + +class PlatformAgentContentTriggerFilterOperator( + str, Enum, metaclass=utils.OpenEnumMeta +): + r"""Operator of a content trigger filter.""" + + # The field equals one of the values. + IS_ONE_OF = "IS_ONE_OF" + # The field equals none of the values. Not valid for TITLE or CONTENT. + IS_NOT_ONE_OF = "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. + FIELD_CHANGED = "FIELD_CHANGED" diff --git a/src/glean/api_client/models/platformagentdependency.py b/src/glean/api_client/models/platformagentdependency.py new file mode 100644 index 00000000..e50b2e89 --- /dev/null +++ b/src/glean/api_client/models/platformagentdependency.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from glean.api_client import models, utils +from glean.api_client.types import BaseModel +from pydantic import field_serializer +from typing_extensions import TypedDict + + +class PlatformAgentDependencyType(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Type of a published artifact referenced as a dependency.""" + + # A published skill. + SKILL = "SKILL" + # A published agent. Not valid for subagents. + AGENT = "AGENT" + + +class PlatformAgentDependencyTypedDict(TypedDict): + r"""A published artifact the agent references by platform ID.""" + + id: str + r"""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: PlatformAgentDependencyType + r"""Type of a published artifact referenced as a dependency.""" + + +class PlatformAgentDependency(BaseModel): + r"""A published artifact the agent references by platform ID.""" + + id: str + r"""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: PlatformAgentDependencyType + r"""Type of a published artifact referenced as a dependency.""" + + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.PlatformAgentDependencyType(value) + except ValueError: + return value + return value diff --git a/src/glean/api_client/models/platformagentgetresponse.py b/src/glean/api_client/models/platformagentgetresponse.py index dff40930..172c8ba7 100644 --- a/src/glean/api_client/models/platformagentgetresponse.py +++ b/src/glean/api_client/models/platformagentgetresponse.py @@ -8,12 +8,14 @@ class PlatformAgentGetResponseTypedDict(TypedDict): agent: PlatformAgentTypedDict + r"""An agent available to the authenticated user.""" request_id: str r"""Platform-generated request ID for support correlation.""" class PlatformAgentGetResponse(BaseModel): agent: PlatformAgent + r"""An agent available to the authenticated user.""" request_id: str r"""Platform-generated request ID for support correlation.""" diff --git a/src/glean/api_client/models/platformagentgleansearchconfig.py b/src/glean/api_client/models/platformagentgleansearchconfig.py new file mode 100644 index 00000000..c5307903 --- /dev/null +++ b/src/glean/api_client/models/platformagentgleansearchconfig.py @@ -0,0 +1,72 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformAgentGleanSearchConfigTypedDict(TypedDict): + r"""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.""" + + knowledge_profile_id: NotRequired[str] + r"""ID of a knowledge profile whose permissions Glean Search uses instead of the invoking user's permissions. + + """ + datasource_instances: NotRequired[List[str]] + r"""Datasource instance names that search is restricted to. Each name selects one instance, not every instance of a datasource type. + + """ + urls: NotRequired[List[str]] + r"""Document or folder URLs that search is restricted to. Folder URLs include every document contained in the folder. + + """ + + +class PlatformAgentGleanSearchConfig(BaseModel): + r"""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.""" + + knowledge_profile_id: Optional[str] = None + r"""ID of a knowledge profile whose permissions Glean Search uses instead of the invoking user's permissions. + + """ + + datasource_instances: Optional[List[str]] = None + r"""Datasource instance names that search is restricted to. Each name selects one instance, not every instance of a datasource type. + + """ + + urls: Optional[List[str]] = None + r"""Document or folder URLs that search is restricted to. Folder URLs include every document contained in the folder. + + """ + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["knowledge_profile_id", "datasource_instances", "urls"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformagentinputfield.py b/src/glean/api_client/models/platformagentinputfield.py new file mode 100644 index 00000000..c046e5a7 --- /dev/null +++ b/src/glean/api_client/models/platformagentinputfield.py @@ -0,0 +1,109 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformagentinputfieldoption import ( + PlatformAgentInputFieldOption, + PlatformAgentInputFieldOptionTypedDict, +) +from enum import Enum +from glean.api_client import models, utils +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import field_serializer, model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformAgentInputFieldType(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Type of an agent input field.""" + + # 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" + + +class PlatformAgentInputFieldTypedDict(TypedDict): + r"""A typed input of the agent, referenced from the instructions as `[[display_name]]`.""" + + display_name: str + r"""Label of the field and its placeholder name in the instructions. Unique within the agent.""" + type: PlatformAgentInputFieldType + r"""Type of an agent input field.""" + description: NotRequired[str] + r"""Helper text describing the field.""" + default_value: NotRequired[str] + r"""Pre-filled value. For SELECT fields, one of the option values. For DATE fields, a `YYYY-MM-DD` date. + + """ + is_optional: NotRequired[bool] + r"""Whether the field accepts empty input. Defaults to false.""" + options: NotRequired[List[PlatformAgentInputFieldOptionTypedDict]] + r"""Choices of a SELECT field.""" + + +class PlatformAgentInputField(BaseModel): + r"""A typed input of the agent, referenced from the instructions as `[[display_name]]`.""" + + display_name: str + r"""Label of the field and its placeholder name in the instructions. Unique within the agent.""" + + type: PlatformAgentInputFieldType + r"""Type of an agent input field.""" + + description: Optional[str] = None + r"""Helper text describing the field.""" + + default_value: Optional[str] = None + r"""Pre-filled value. For SELECT fields, one of the option values. For DATE fields, a `YYYY-MM-DD` date. + + """ + + is_optional: Optional[bool] = None + r"""Whether the field accepts empty input. Defaults to false.""" + + options: Optional[List[PlatformAgentInputFieldOption]] = None + r"""Choices of a SELECT field.""" + + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.PlatformAgentInputFieldType(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set( + ["description", "default_value", "is_optional", "options"] + ) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformagentinputfieldoption.py b/src/glean/api_client/models/platformagentinputfieldoption.py new file mode 100644 index 00000000..f3d4845c --- /dev/null +++ b/src/glean/api_client/models/platformagentinputfieldoption.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformAgentInputFieldOptionTypedDict(TypedDict): + r"""A choice of a SELECT input field.""" + + value: str + r"""Value substituted into the field's placeholder.""" + + +class PlatformAgentInputFieldOption(BaseModel): + r"""A choice of a SELECT input field.""" + + value: str + r"""Value substituted into the field's placeholder.""" diff --git a/src/glean/api_client/models/platformagentllmmodel.py b/src/glean/api_client/models/platformagentllmmodel.py new file mode 100644 index 00000000..680f06e5 --- /dev/null +++ b/src/glean/api_client/models/platformagentllmmodel.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from glean.api_client import models, utils +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import field_serializer, model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformAgentLlmModelMode(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Reasoning effort per turn. Defaults to ADVANCED.""" + + # High reasoning effort. + ADVANCED = "ADVANCED" + # Low reasoning effort for latency-sensitive, narrow tasks. + FAST = "FAST" + + +class PlatformAgentLlmModelTypedDict(TypedDict): + r"""Agentic model the agent runs on and its reasoning effort.""" + + model_set_id: NotRequired[str] + r"""Agentic model set ID. When omitted, the tenant default is used.""" + mode: NotRequired[PlatformAgentLlmModelMode] + r"""Reasoning effort per turn. Defaults to ADVANCED.""" + auto_upgrade: NotRequired[bool] + r"""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. + + """ + + +class PlatformAgentLlmModel(BaseModel): + r"""Agentic model the agent runs on and its reasoning effort.""" + + model_set_id: Optional[str] = None + r"""Agentic model set ID. When omitted, the tenant default is used.""" + + mode: Optional[PlatformAgentLlmModelMode] = None + r"""Reasoning effort per turn. Defaults to ADVANCED.""" + + auto_upgrade: Optional[bool] = None + r"""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. + + """ + + @field_serializer("mode") + def serialize_mode(self, value): + if isinstance(value, str): + try: + return models.PlatformAgentLlmModelMode(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["model_set_id", "mode", "auto_upgrade"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformagentprompt.py b/src/glean/api_client/models/platformagentprompt.py new file mode 100644 index 00000000..0251d7d2 --- /dev/null +++ b/src/glean/api_client/models/platformagentprompt.py @@ -0,0 +1,28 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformAgentPromptTypedDict(TypedDict): + r"""A conversation starter whose template is sent as the first chat message.""" + + display_name: str + r"""Short title of the conversation starter.""" + template: str + r"""Chat message that starts the conversation. May contain `[[variable_name]]` placeholders. + + """ + + +class PlatformAgentPrompt(BaseModel): + r"""A conversation starter whose template is sent as the first chat message.""" + + display_name: str + r"""Short title of the conversation starter.""" + + template: str + r"""Chat message that starts the conversation. May contain `[[variable_name]]` placeholders. + + """ diff --git a/src/glean/api_client/models/platformagentschedule.py b/src/glean/api_client/models/platformagentschedule.py new file mode 100644 index 00000000..993dccd1 --- /dev/null +++ b/src/glean/api_client/models/platformagentschedule.py @@ -0,0 +1,65 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformAgentScheduleTypedDict(TypedDict): + r"""Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents.""" + + frequency: str + r"""Five-field Unix cron expression, for example `0 9 * * 1-5`.""" + timezone: str + r"""IANA time zone name, for example `America/Los_Angeles`.""" + start_at: NotRequired[datetime] + r"""ISO 8601 timestamp with an explicit offset before which the schedule stays dormant. + + """ + + +class PlatformAgentSchedule(BaseModel): + r"""Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents.""" + + frequency: str + r"""Five-field Unix cron expression, for example `0 9 * * 1-5`.""" + + timezone: str + r"""IANA time zone name, for example `America/Los_Angeles`.""" + + start_at: Optional[datetime] = None + r"""ISO 8601 timestamp with an explicit offset before which the schedule stays dormant. + + """ + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["start_at"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformagentselectedtool.py b/src/glean/api_client/models/platformagentselectedtool.py new file mode 100644 index 00000000..48a1814e --- /dev/null +++ b/src/glean/api_client/models/platformagentselectedtool.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformAgentSelectedToolTypedDict(TypedDict): + r"""A tool selected from a tool provider.""" + + display_name: str + r"""Name of the tool within its provider.""" + + +class PlatformAgentSelectedTool(BaseModel): + r"""A tool selected from a tool provider.""" + + display_name: str + r"""Name of the tool within its provider.""" diff --git a/src/glean/api_client/models/platformagentservicecredential.py b/src/glean/api_client/models/platformagentservicecredential.py new file mode 100644 index 00000000..c117cb6a --- /dev/null +++ b/src/glean/api_client/models/platformagentservicecredential.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformAgentServiceCredentialTypedDict(TypedDict): + r"""A service credential the agent uses.""" + + service_credential_id: str + r"""ID of the service credential.""" + + +class PlatformAgentServiceCredential(BaseModel): + r"""A service credential the agent uses.""" + + service_credential_id: str + r"""ID of the service credential.""" diff --git a/src/glean/api_client/models/platformagentskill.py b/src/glean/api_client/models/platformagentskill.py new file mode 100644 index 00000000..a6866cb2 --- /dev/null +++ b/src/glean/api_client/models/platformagentskill.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformskillsourcepreviewfile import ( + PlatformSkillSourcePreviewFile, + PlatformSkillSourcePreviewFileTypedDict, +) +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformAgentSkillTypedDict(TypedDict): + r"""A skill defined inline in the agent. Reference a published skill through `dependencies` instead.""" + + display_name: str + r"""Human-readable skill name.""" + main_content: str + r"""Main skill content, inlined from `SKILL.md`.""" + files: NotRequired[List[PlatformSkillSourcePreviewFileTypedDict]] + r"""Additional files bundled in the skill folder.""" + + +class PlatformAgentSkill(BaseModel): + r"""A skill defined inline in the agent. Reference a published skill through `dependencies` instead.""" + + display_name: str + r"""Human-readable skill name.""" + + main_content: str + r"""Main skill content, inlined from `SKILL.md`.""" + + files: Optional[List[PlatformSkillSourcePreviewFile]] = None + r"""Additional files bundled in the skill folder.""" + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["files"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformagentslackchannel.py b/src/glean/api_client/models/platformagentslackchannel.py new file mode 100644 index 00000000..0e464e83 --- /dev/null +++ b/src/glean/api_client/models/platformagentslackchannel.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformagentslackchannelmapping import ( + PlatformAgentSlackChannelMapping, + PlatformAgentSlackChannelMappingTypedDict, +) +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformAgentSlackChannelTypedDict(TypedDict): + r"""Slack deployment of the agent.""" + + service_credential_id: NotRequired[str] + r"""ID of the service credential for the Slack app.""" + channel_mappings: NotRequired[List[PlatformAgentSlackChannelMappingTypedDict]] + r"""Slack channels the agent is mapped to.""" + engagement_filter_instructions: NotRequired[str] + r"""Instructions that decide which messages the agent engages with.""" + allow_mentions_outside_channel_mappings: NotRequired[bool] + r"""Whether the agent responds to mentions in channels that are not mapped.""" + + +class PlatformAgentSlackChannel(BaseModel): + r"""Slack deployment of the agent.""" + + service_credential_id: Optional[str] = None + r"""ID of the service credential for the Slack app.""" + + channel_mappings: Optional[List[PlatformAgentSlackChannelMapping]] = None + r"""Slack channels the agent is mapped to.""" + + engagement_filter_instructions: Optional[str] = None + r"""Instructions that decide which messages the agent engages with.""" + + allow_mentions_outside_channel_mappings: Optional[bool] = None + r"""Whether the agent responds to mentions in channels that are not mapped.""" + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set( + [ + "service_credential_id", + "channel_mappings", + "engagement_filter_instructions", + "allow_mentions_outside_channel_mappings", + ] + ) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformagentslackchannelmapping.py b/src/glean/api_client/models/platformagentslackchannelmapping.py new file mode 100644 index 00000000..57d4adbe --- /dev/null +++ b/src/glean/api_client/models/platformagentslackchannelmapping.py @@ -0,0 +1,55 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformAgentSlackChannelMappingTypedDict(TypedDict): + r"""A Slack channel the agent is mapped to.""" + + channel_id: str + r"""ID of the Slack channel.""" + auto_engage: NotRequired[bool] + r"""Whether the agent engages with messages without being mentioned.""" + + +class PlatformAgentSlackChannelMapping(BaseModel): + r"""A Slack channel the agent is mapped to.""" + + channel_id: str + r"""ID of the Slack channel.""" + + auto_engage: Optional[bool] = None + r"""Whether the agent engages with messages without being mentioned.""" + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["auto_engage"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformagenttoolset.py b/src/glean/api_client/models/platformagenttoolset.py new file mode 100644 index 00000000..9f29bba1 --- /dev/null +++ b/src/glean/api_client/models/platformagenttoolset.py @@ -0,0 +1,105 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformagentselectedtool import ( + PlatformAgentSelectedTool, + PlatformAgentSelectedToolTypedDict, +) +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class CustomisationDataTypedDict(TypedDict): + r"""Settings applied to every tool in this provider entry.""" + + skip_confirmation: NotRequired[bool] + r"""Whether tools in this entry run without asking the user for confirmation. Defaults to false. + + """ + + +class CustomisationData(BaseModel): + r"""Settings applied to every tool in this provider entry.""" + + skip_confirmation: Optional[bool] = None + r"""Whether tools in this entry run without asking the user for confirmation. Defaults to false. + + """ + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["skip_confirmation"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class PlatformAgentToolsetTypedDict(TypedDict): + r"""A tool provider and the subset of its tools available to the agent.""" + + tool_provider_id: str + r"""ID of the tool provider, or `native` for built-in Glean tools.""" + selected_tools: NotRequired[List[PlatformAgentSelectedToolTypedDict]] + r"""Tools from the provider that are exposed to the agent.""" + customisation_data: NotRequired[CustomisationDataTypedDict] + r"""Settings applied to every tool in this provider entry.""" + + +class PlatformAgentToolset(BaseModel): + r"""A tool provider and the subset of its tools available to the agent.""" + + tool_provider_id: str + r"""ID of the tool provider, or `native` for built-in Glean tools.""" + + selected_tools: Optional[List[PlatformAgentSelectedTool]] = None + r"""Tools from the provider that are exposed to the agent.""" + + customisation_data: Optional[CustomisationData] = None + r"""Settings applied to every tool in this provider entry.""" + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["selected_tools", "customisation_data"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformagenttrigger.py b/src/glean/api_client/models/platformagenttrigger.py new file mode 100644 index 00000000..a5f2b838 --- /dev/null +++ b/src/glean/api_client/models/platformagenttrigger.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformagentcontenttrigger import ( + PlatformAgentContentTrigger, + PlatformAgentContentTriggerTypedDict, +) +from .platformagentinputfield import ( + PlatformAgentInputField, + PlatformAgentInputFieldTypedDict, +) +from .platformagentprompt import PlatformAgentPrompt, PlatformAgentPromptTypedDict +from .platformagentschedule import PlatformAgentSchedule, PlatformAgentScheduleTypedDict +from enum import Enum +from glean.api_client import models, utils +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import field_serializer, model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformAgentTriggerType(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Invocation mode of the agent.""" + + # The user converses with the agent. + CHAT_MESSAGE = "CHAT_MESSAGE" + # The agent runs on typed input fields, or with no input when none are declared. + INPUT_FORM = "INPUT_FORM" + # The agent runs on a document event. + CONTENT_TRIGGER = "CONTENT_TRIGGER" + + +class ContentTypedDict(TypedDict): + r"""Document events that run a CONTENT_TRIGGER agent.""" + + triggers: List[PlatformAgentContentTriggerTypedDict] + r"""Event subscriptions. The agent runs when any entry matches.""" + + +class Content(BaseModel): + r"""Document events that run a CONTENT_TRIGGER agent.""" + + triggers: List[PlatformAgentContentTrigger] + r"""Event subscriptions. The agent runs when any entry matches.""" + + +class PlatformAgentTriggerTypedDict(TypedDict): + r"""How the agent is invoked. Applies to top-level agents only.""" + + type: PlatformAgentTriggerType + r"""Invocation mode of the agent.""" + input_fields: NotRequired[List[PlatformAgentInputFieldTypedDict]] + r"""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: NotRequired[PlatformAgentScheduleTypedDict] + r"""Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents.""" + prompts: NotRequired[List[PlatformAgentPromptTypedDict]] + r"""Conversation starters. Valid only for CHAT_MESSAGE.""" + content: NotRequired[ContentTypedDict] + r"""Document events that run a CONTENT_TRIGGER agent.""" + + +class PlatformAgentTrigger(BaseModel): + r"""How the agent is invoked. Applies to top-level agents only.""" + + type: PlatformAgentTriggerType + r"""Invocation mode of the agent.""" + + input_fields: Optional[List[PlatformAgentInputField]] = None + r"""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: Optional[PlatformAgentSchedule] = None + r"""Wall-clock schedule for INPUT_FORM and CHAT_MESSAGE agents.""" + + prompts: Optional[List[PlatformAgentPrompt]] = None + r"""Conversation starters. Valid only for CHAT_MESSAGE.""" + + content: Optional[Content] = None + r"""Document events that run a CONTENT_TRIGGER agent.""" + + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.PlatformAgentTriggerType(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["input_fields", "schedule", "prompts", "content"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformskillsourcepreviewfile.py b/src/glean/api_client/models/platformskillsourcepreviewfile.py index 71aee533..260d4d9a 100644 --- a/src/glean/api_client/models/platformskillsourcepreviewfile.py +++ b/src/glean/api_client/models/platformskillsourcepreviewfile.py @@ -6,6 +6,8 @@ class PlatformSkillSourcePreviewFileTypedDict(TypedDict): + r"""A supporting file bundled with a skill.""" + path: str r"""Relative path within the skill bundle.""" content: str @@ -13,6 +15,8 @@ class PlatformSkillSourcePreviewFileTypedDict(TypedDict): class PlatformSkillSourcePreviewFile(BaseModel): + r"""A supporting file bundled with a skill.""" + path: str r"""Relative path within the skill bundle.""" diff --git a/src/glean/api_client/models/platformsubagent.py b/src/glean/api_client/models/platformsubagent.py new file mode 100644 index 00000000..f2c097a1 --- /dev/null +++ b/src/glean/api_client/models/platformsubagent.py @@ -0,0 +1,134 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformagentdependency import ( + PlatformAgentDependency, + PlatformAgentDependencyTypedDict, +) +from .platformagentgleansearchconfig import ( + PlatformAgentGleanSearchConfig, + PlatformAgentGleanSearchConfigTypedDict, +) +from .platformagentllmmodel import PlatformAgentLlmModel, PlatformAgentLlmModelTypedDict +from .platformagentservicecredential import ( + PlatformAgentServiceCredential, + PlatformAgentServiceCredentialTypedDict, +) +from .platformagentskill import PlatformAgentSkill, PlatformAgentSkillTypedDict +from .platformagenttoolset import PlatformAgentToolset, PlatformAgentToolsetTypedDict +from glean.api_client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from glean.api_client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformSubagentTypedDict(TypedDict): + r"""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.""" + + name: str + r"""Human-readable name.""" + description: NotRequired[str] + r"""Description of the agent's purpose and behavior.""" + instructions: NotRequired[str] + r"""System prompt the agent follows.""" + skills: NotRequired[List[PlatformAgentSkillTypedDict]] + r"""Skills defined inline.""" + dependencies: NotRequired[List[PlatformAgentDependencyTypedDict]] + r"""Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + + """ + tools: NotRequired[List[PlatformAgentToolsetTypedDict]] + r"""Tool providers and the subset of their tools available to the agent.""" + glean_search_config: NotRequired[PlatformAgentGleanSearchConfigTypedDict] + r"""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: NotRequired[PlatformAgentLlmModelTypedDict] + r"""Agentic model the agent runs on and its reasoning effort.""" + service_credentials: NotRequired[List[PlatformAgentServiceCredentialTypedDict]] + r"""Service credentials the agent uses to call tools.""" + subagent_id: NotRequired[str] + r"""ID of the subagent, unique within its parent agent. It is not an agent ID and cannot be used with other Agents APIs. + + """ + + +class PlatformSubagent(BaseModel): + r"""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.""" + + name: str + r"""Human-readable name.""" + + description: Optional[str] = None + r"""Description of the agent's purpose and behavior.""" + + instructions: Optional[str] = None + r"""System prompt the agent follows.""" + + skills: Optional[List[PlatformAgentSkill]] = None + r"""Skills defined inline.""" + + dependencies: Optional[List[PlatformAgentDependency]] = None + r"""Published artifacts referenced by platform ID. Their content is not inlined in `skills` or `subagents`. + + """ + + tools: Optional[List[PlatformAgentToolset]] = None + r"""Tool providers and the subset of their tools available to the agent.""" + + glean_search_config: Optional[PlatformAgentGleanSearchConfig] = None + r"""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: Optional[PlatformAgentLlmModel] = None + r"""Agentic model the agent runs on and its reasoning effort.""" + + service_credentials: Optional[List[PlatformAgentServiceCredential]] = None + r"""Service credentials the agent uses to call tools.""" + + subagent_id: Optional[str] = None + r"""ID of the subagent, unique within its parent agent. It is not an agent ID and cannot be used with other Agents APIs. + + """ + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set( + [ + "description", + "instructions", + "skills", + "dependencies", + "tools", + "glean_search_config", + "model", + "service_credentials", + "subagent_id", + ] + ) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/tests/mockserver/internal/handler/pathgetapiagentsagentid.go b/tests/mockserver/internal/handler/pathgetapiagentsagentid.go index 821cdaf9..a14e1b6f 100644 --- a/tests/mockserver/internal/handler/pathgetapiagentsagentid.go +++ b/tests/mockserver/internal/handler/pathgetapiagentsagentid.go @@ -47,9 +47,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/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go index 87401958..de8776a4 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go @@ -74,7 +74,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{ diff --git a/tests/mockserver/internal/sdk/models/components/agentconfig.go b/tests/mockserver/internal/sdk/models/components/agentconfig.go index 679f7f32..0fcf307e 100644 --- a/tests/mockserver/internal/sdk/models/components/agentconfig.go +++ b/tests/mockserver/internal/sdk/models/components/agentconfig.go @@ -46,18 +46,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 @@ -66,10 +66,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) } } @@ -80,7 +80,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"` } @@ -99,7 +99,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/tests/mockserver/internal/sdk/models/components/insightsoverviewresponse.go b/tests/mockserver/internal/sdk/models/components/insightsoverviewresponse.go index a4872a27..200d888d 100644 --- a/tests/mockserver/internal/sdk/models/components/insightsoverviewresponse.go +++ b/tests/mockserver/internal/sdk/models/components/insightsoverviewresponse.go @@ -23,7 +23,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/tests/mockserver/internal/sdk/models/components/messagesrequest.go b/tests/mockserver/internal/sdk/models/components/messagesrequest.go index a778dc51..36c077ba 100644 --- a/tests/mockserver/internal/sdk/models/components/messagesrequest.go +++ b/tests/mockserver/internal/sdk/models/components/messagesrequest.go @@ -37,18 +37,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 @@ -57,10 +57,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) } } @@ -108,7 +108,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. @@ -140,7 +140,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/tests/mockserver/internal/sdk/models/components/platformagent.go b/tests/mockserver/internal/sdk/models/components/platformagent.go index 79049da4..d7adfa48 100644 --- a/tests/mockserver/internal/sdk/models/components/platformagent.go +++ b/tests/mockserver/internal/sdk/models/components/platformagent.go @@ -2,23 +2,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 { @@ -35,6 +79,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 @@ -48,3 +148,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/tests/mockserver/internal/sdk/models/components/platformagentchannels.go b/tests/mockserver/internal/sdk/models/components/platformagentchannels.go new file mode 100644 index 00000000..07f1318f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentchannels.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentcontenttrigger.go b/tests/mockserver/internal/sdk/models/components/platformagentcontenttrigger.go new file mode 100644 index 00000000..24495c40 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentcontenttrigger.go @@ -0,0 +1,54 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilter.go b/tests/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilter.go new file mode 100644 index 00000000..d8fee0fe --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilter.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilteroperator.go b/tests/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilteroperator.go new file mode 100644 index 00000000..105364b9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentcontenttriggerfilteroperator.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentdependency.go b/tests/mockserver/internal/sdk/models/components/platformagentdependency.go new file mode 100644 index 00000000..44ab8c8d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentdependency.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentgetresponse.go b/tests/mockserver/internal/sdk/models/components/platformagentgetresponse.go index 3df4f65d..e62c09fb 100644 --- a/tests/mockserver/internal/sdk/models/components/platformagentgetresponse.go +++ b/tests/mockserver/internal/sdk/models/components/platformagentgetresponse.go @@ -3,6 +3,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/tests/mockserver/internal/sdk/models/components/platformagentgleansearchconfig.go b/tests/mockserver/internal/sdk/models/components/platformagentgleansearchconfig.go new file mode 100644 index 00000000..9a0847b2 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentgleansearchconfig.go @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentinputfield.go b/tests/mockserver/internal/sdk/models/components/platformagentinputfield.go new file mode 100644 index 00000000..1680d71f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentinputfield.go @@ -0,0 +1,100 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentinputfieldoption.go b/tests/mockserver/internal/sdk/models/components/platformagentinputfieldoption.go new file mode 100644 index 00000000..d21329bc --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentinputfieldoption.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentllmmodel.go b/tests/mockserver/internal/sdk/models/components/platformagentllmmodel.go new file mode 100644 index 00000000..4a10ae80 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentllmmodel.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentprompt.go b/tests/mockserver/internal/sdk/models/components/platformagentprompt.go new file mode 100644 index 00000000..51f0920d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentprompt.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentschedule.go b/tests/mockserver/internal/sdk/models/components/platformagentschedule.go new file mode 100644 index 00000000..9a9c01ae --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentschedule.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentselectedtool.go b/tests/mockserver/internal/sdk/models/components/platformagentselectedtool.go new file mode 100644 index 00000000..28fd4df7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentselectedtool.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentservicecredential.go b/tests/mockserver/internal/sdk/models/components/platformagentservicecredential.go new file mode 100644 index 00000000..2942af95 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentservicecredential.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentskill.go b/tests/mockserver/internal/sdk/models/components/platformagentskill.go new file mode 100644 index 00000000..09511ec6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentskill.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentslackchannel.go b/tests/mockserver/internal/sdk/models/components/platformagentslackchannel.go new file mode 100644 index 00000000..f0a217c9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentslackchannel.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagentslackchannelmapping.go b/tests/mockserver/internal/sdk/models/components/platformagentslackchannelmapping.go new file mode 100644 index 00000000..5d24cf6e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagentslackchannelmapping.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagenttoolset.go b/tests/mockserver/internal/sdk/models/components/platformagenttoolset.go new file mode 100644 index 00000000..e663f381 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagenttoolset.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformagenttrigger.go b/tests/mockserver/internal/sdk/models/components/platformagenttrigger.go new file mode 100644 index 00000000..43f143e8 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformagenttrigger.go @@ -0,0 +1,101 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/mockserver/internal/sdk/models/components/platformskillsourcepreviewfile.go b/tests/mockserver/internal/sdk/models/components/platformskillsourcepreviewfile.go index 7622555e..458c4054 100644 --- a/tests/mockserver/internal/sdk/models/components/platformskillsourcepreviewfile.go +++ b/tests/mockserver/internal/sdk/models/components/platformskillsourcepreviewfile.go @@ -6,6 +6,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/tests/mockserver/internal/sdk/models/components/platformsubagent.go b/tests/mockserver/internal/sdk/models/components/platformsubagent.go new file mode 100644 index 00000000..a1114e5d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformsubagent.go @@ -0,0 +1,100 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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/tests/test_messages.py b/tests/test_messages.py index c0fd29da..36643db3 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -18,7 +18,7 @@ def test_messages_messages(): res = glean.client.messages.retrieve( id_type=models.IDType.CONVERSATION_ID, id="", - datasource=models.Datasource.SLACK, + datasource=models.Datasource.MICROSOFTTEAMS, timestamp_millis=558834, ) assert res is not None diff --git a/tests/test_summarize.py b/tests/test_summarize.py index 28d18f60..81026c98 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -18,12 +18,11 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "ugc_type": models.DocumentSpecUgcType1.CHATS, - "content_id": 735985, + "url": "https://huge-gym.net/", }, { - "ugc_type": models.DocumentSpecUgcType1.CHATS, - "content_id": 735985, + "ugc_type": models.DocumentSpecUgcType2.COLLECTIONS, + "ugc_id": "", }, ] )