aimeat 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/dist/.env.example +33 -0
  2. package/dist/build-stamp.json +13 -0
  3. package/dist/locales/en.json +166 -3
  4. package/dist/locales/fi.json +166 -3
  5. package/dist/public/components/VoiceRecorder.js +116 -0
  6. package/dist/public/connection-done.html +53 -0
  7. package/dist/public/css/components/voice-recorder.css +66 -0
  8. package/dist/public/css/views/inbox.css +41 -0
  9. package/dist/public/css/views/profile.css +171 -95
  10. package/dist/public/js/services/audio-recorder.js +171 -0
  11. package/dist/public/js/services/messages.js +21 -2
  12. package/dist/public/spa.html +3 -0
  13. package/dist/public/views/profile/access-tab/connections.js +264 -0
  14. package/dist/public/views/profile/access-tab.js +2 -0
  15. package/dist/public/views/profile/inbox-tab/components.js +60 -10
  16. package/dist/public/views/profile/inbox-tab/helpers.js +33 -0
  17. package/dist/public/views/profile/inbox-tab/panels.js +6 -1
  18. package/dist/public/views/profile/inbox-tab/use-voice.js +50 -0
  19. package/dist/public/views/profile/inbox-tab/voice-parts.js +111 -0
  20. package/dist/public/views/profile/inbox-tab.js +18 -24
  21. package/dist/public/views/profile/openrouter/budget-panel.js +224 -0
  22. package/dist/public/views/profile/openrouter/model-picker.js +150 -0
  23. package/dist/public/views/profile/openrouter/pricing.js +139 -0
  24. package/dist/public/views/profile/openrouter-settings.js +425 -488
  25. package/dist/scripts/build-sdk-libs.d.ts.map +1 -1
  26. package/dist/scripts/build-sdk-libs.js +1 -0
  27. package/dist/scripts/build-sdk-libs.js.map +1 -1
  28. package/dist/scripts/check-ai-disclosure.d.ts.map +1 -1
  29. package/dist/scripts/check-ai-disclosure.js +65 -0
  30. package/dist/scripts/check-ai-disclosure.js.map +1 -1
  31. package/dist/src/cli/connect/ai-provenance-carry.d.ts +54 -3
  32. package/dist/src/cli/connect/ai-provenance-carry.d.ts.map +1 -1
  33. package/dist/src/cli/connect/ai-provenance-carry.js +84 -12
  34. package/dist/src/cli/connect/ai-provenance-carry.js.map +1 -1
  35. package/dist/src/cli/connect/api-client.d.ts +11 -0
  36. package/dist/src/cli/connect/api-client.d.ts.map +1 -1
  37. package/dist/src/cli/connect/api-client.js +2 -0
  38. package/dist/src/cli/connect/api-client.js.map +1 -1
  39. package/dist/src/cli/connect/mcp/local-server.d.ts.map +1 -1
  40. package/dist/src/cli/connect/mcp/local-server.js +11 -0
  41. package/dist/src/cli/connect/mcp/local-server.js.map +1 -1
  42. package/dist/src/cli/connect/mcp/tools/apps.d.ts +1 -0
  43. package/dist/src/cli/connect/mcp/tools/apps.d.ts.map +1 -1
  44. package/dist/src/cli/connect/mcp/tools/apps.js +3 -2
  45. package/dist/src/cli/connect/mcp/tools/apps.js.map +1 -1
  46. package/dist/src/cli/connect/mcp/tools/core.d.ts +2 -0
  47. package/dist/src/cli/connect/mcp/tools/core.d.ts.map +1 -1
  48. package/dist/src/cli/connect/mcp/tools/core.js +5 -2
  49. package/dist/src/cli/connect/mcp/tools/core.js.map +1 -1
  50. package/dist/src/cli/connect/mcp/tools/knowledge.d.ts +1 -0
  51. package/dist/src/cli/connect/mcp/tools/knowledge.d.ts.map +1 -1
  52. package/dist/src/cli/connect/mcp/tools/knowledge.js +3 -2
  53. package/dist/src/cli/connect/mcp/tools/knowledge.js.map +1 -1
  54. package/dist/src/config-types.d.ts +14 -0
  55. package/dist/src/config-types.d.ts.map +1 -1
  56. package/dist/src/config.d.ts.map +1 -1
  57. package/dist/src/config.js +10 -0
  58. package/dist/src/config.js.map +1 -1
  59. package/dist/src/generated/api-types.d.ts +969 -4
  60. package/dist/src/generated/api-types.d.ts.map +1 -1
  61. package/dist/src/mcp/ai-provenance-input.d.ts +33 -0
  62. package/dist/src/mcp/ai-provenance-input.d.ts.map +1 -1
  63. package/dist/src/mcp/ai-provenance-input.js +36 -0
  64. package/dist/src/mcp/ai-provenance-input.js.map +1 -1
  65. package/dist/src/mcp/apps.d.ts +7 -0
  66. package/dist/src/mcp/apps.d.ts.map +1 -1
  67. package/dist/src/mcp/apps.js +20 -2
  68. package/dist/src/mcp/apps.js.map +1 -1
  69. package/dist/src/models/ai-provenance-schemas.d.ts +7 -1
  70. package/dist/src/models/ai-provenance-schemas.d.ts.map +1 -1
  71. package/dist/src/models/ai-provenance-schemas.js +11 -1
  72. package/dist/src/models/ai-provenance-schemas.js.map +1 -1
  73. package/dist/src/models/connection-schemas.d.ts +203 -0
  74. package/dist/src/models/connection-schemas.d.ts.map +1 -0
  75. package/dist/src/models/connection-schemas.js +33 -0
  76. package/dist/src/models/connection-schemas.js.map +1 -0
  77. package/dist/src/models/message-schemas.d.ts +40 -0
  78. package/dist/src/models/message-schemas.d.ts.map +1 -1
  79. package/dist/src/models/message-schemas.js +23 -0
  80. package/dist/src/models/message-schemas.js.map +1 -1
  81. package/dist/src/routes/ai-provenance.d.ts +6 -0
  82. package/dist/src/routes/ai-provenance.d.ts.map +1 -1
  83. package/dist/src/routes/ai-provenance.js +34 -1
  84. package/dist/src/routes/ai-provenance.js.map +1 -1
  85. package/dist/src/routes/ai.d.ts +5 -0
  86. package/dist/src/routes/ai.d.ts.map +1 -1
  87. package/dist/src/routes/ai.js +83 -0
  88. package/dist/src/routes/ai.js.map +1 -1
  89. package/dist/src/routes/app-grants.d.ts.map +1 -1
  90. package/dist/src/routes/app-grants.js +4 -0
  91. package/dist/src/routes/app-grants.js.map +1 -1
  92. package/dist/src/routes/apps/drafts.d.ts +3 -0
  93. package/dist/src/routes/apps/drafts.d.ts.map +1 -1
  94. package/dist/src/routes/apps/drafts.js +13 -0
  95. package/dist/src/routes/apps/drafts.js.map +1 -1
  96. package/dist/src/routes/apps/publish.d.ts +5 -0
  97. package/dist/src/routes/apps/publish.d.ts.map +1 -1
  98. package/dist/src/routes/apps/publish.js +21 -5
  99. package/dist/src/routes/apps/publish.js.map +1 -1
  100. package/dist/src/routes/connections.d.ts +35 -0
  101. package/dist/src/routes/connections.d.ts.map +1 -0
  102. package/dist/src/routes/connections.js +406 -0
  103. package/dist/src/routes/connections.js.map +1 -0
  104. package/dist/src/routes/libs.js +1 -1
  105. package/dist/src/routes/libs.js.map +1 -1
  106. package/dist/src/routes/messages.d.ts +5 -0
  107. package/dist/src/routes/messages.d.ts.map +1 -1
  108. package/dist/src/routes/messages.js +92 -0
  109. package/dist/src/routes/messages.js.map +1 -1
  110. package/dist/src/routes/openrouter.d.ts +6 -1
  111. package/dist/src/routes/openrouter.d.ts.map +1 -1
  112. package/dist/src/routes/openrouter.js +37 -7
  113. package/dist/src/routes/openrouter.js.map +1 -1
  114. package/dist/src/routes/upload.d.ts +5 -0
  115. package/dist/src/routes/upload.d.ts.map +1 -1
  116. package/dist/src/routes/upload.js +32 -0
  117. package/dist/src/routes/upload.js.map +1 -1
  118. package/dist/src/server-bootstrap/routes-loader.d.ts.map +1 -1
  119. package/dist/src/server-bootstrap/routes-loader.js +2 -0
  120. package/dist/src/server-bootstrap/routes-loader.js.map +1 -1
  121. package/dist/src/services/ai-completion.d.ts +48 -0
  122. package/dist/src/services/ai-completion.d.ts.map +1 -1
  123. package/dist/src/services/ai-completion.js +112 -72
  124. package/dist/src/services/ai-completion.js.map +1 -1
  125. package/dist/src/services/ai-disclosure.d.ts +6 -0
  126. package/dist/src/services/ai-disclosure.d.ts.map +1 -1
  127. package/dist/src/services/ai-disclosure.js +20 -2
  128. package/dist/src/services/ai-disclosure.js.map +1 -1
  129. package/dist/src/services/ai-provenance-page.d.ts +59 -0
  130. package/dist/src/services/ai-provenance-page.d.ts.map +1 -0
  131. package/dist/src/services/ai-provenance-page.js +185 -0
  132. package/dist/src/services/ai-provenance-page.js.map +1 -0
  133. package/dist/src/services/ai-provenance.d.ts +6 -0
  134. package/dist/src/services/ai-provenance.d.ts.map +1 -1
  135. package/dist/src/services/ai-provenance.js +5 -0
  136. package/dist/src/services/ai-provenance.js.map +1 -1
  137. package/dist/src/services/ai-transcription.d.ts +66 -0
  138. package/dist/src/services/ai-transcription.d.ts.map +1 -0
  139. package/dist/src/services/ai-transcription.js +90 -0
  140. package/dist/src/services/ai-transcription.js.map +1 -0
  141. package/dist/src/services/app-publish.d.ts.map +1 -1
  142. package/dist/src/services/app-publish.js +16 -1
  143. package/dist/src/services/app-publish.js.map +1 -1
  144. package/dist/src/services/build-app-prompt.d.ts.map +1 -1
  145. package/dist/src/services/build-app-prompt.js +2 -1
  146. package/dist/src/services/build-app-prompt.js.map +1 -1
  147. package/dist/src/services/connections/attach.d.ts +62 -0
  148. package/dist/src/services/connections/attach.d.ts.map +1 -0
  149. package/dist/src/services/connections/attach.js +168 -0
  150. package/dist/src/services/connections/attach.js.map +1 -0
  151. package/dist/src/services/connections/credential.d.ts +39 -0
  152. package/dist/src/services/connections/credential.d.ts.map +1 -0
  153. package/dist/src/services/connections/credential.js +66 -0
  154. package/dist/src/services/connections/credential.js.map +1 -0
  155. package/dist/src/services/connections/instance.d.ts +65 -0
  156. package/dist/src/services/connections/instance.d.ts.map +1 -0
  157. package/dist/src/services/connections/instance.js +144 -0
  158. package/dist/src/services/connections/instance.js.map +1 -0
  159. package/dist/src/services/connections/oauth.d.ts +77 -0
  160. package/dist/src/services/connections/oauth.d.ts.map +1 -0
  161. package/dist/src/services/connections/oauth.js +290 -0
  162. package/dist/src/services/connections/oauth.js.map +1 -0
  163. package/dist/src/services/connections/providers.d.ts +118 -0
  164. package/dist/src/services/connections/providers.d.ts.map +1 -0
  165. package/dist/src/services/connections/providers.js +260 -0
  166. package/dist/src/services/connections/providers.js.map +1 -0
  167. package/dist/src/services/connections/publish-gate.d.ts +103 -0
  168. package/dist/src/services/connections/publish-gate.d.ts.map +1 -0
  169. package/dist/src/services/connections/publish-gate.js +0 -0
  170. package/dist/src/services/connections/publish-gate.js.map +1 -0
  171. package/dist/src/services/connections/publish.d.ts +60 -0
  172. package/dist/src/services/connections/publish.d.ts.map +1 -0
  173. package/dist/src/services/connections/publish.js +340 -0
  174. package/dist/src/services/connections/publish.js.map +1 -0
  175. package/dist/src/services/connections/refresh.d.ts +55 -0
  176. package/dist/src/services/connections/refresh.d.ts.map +1 -0
  177. package/dist/src/services/connections/refresh.js +307 -0
  178. package/dist/src/services/connections/refresh.js.map +1 -0
  179. package/dist/src/services/message-send.d.ts.map +1 -1
  180. package/dist/src/services/message-send.js +16 -2
  181. package/dist/src/services/message-send.js.map +1 -1
  182. package/dist/src/services/openrouter.d.ts +67 -1
  183. package/dist/src/services/openrouter.d.ts.map +1 -1
  184. package/dist/src/services/openrouter.js +102 -11
  185. package/dist/src/services/openrouter.js.map +1 -1
  186. package/dist/src/services/upload-token.d.ts +5 -1
  187. package/dist/src/services/upload-token.d.ts.map +1 -1
  188. package/dist/src/services/upload-token.js +13 -1
  189. package/dist/src/services/upload-token.js.map +1 -1
  190. package/dist/src/services/workflow/engine-util.d.ts +18 -0
  191. package/dist/src/services/workflow/engine-util.d.ts.map +1 -1
  192. package/dist/src/services/workflow/engine-util.js +27 -0
  193. package/dist/src/services/workflow/engine-util.js.map +1 -1
  194. package/dist/src/services/workflow/engine.d.ts.map +1 -1
  195. package/dist/src/services/workflow/engine.js +4 -2
  196. package/dist/src/services/workflow/engine.js.map +1 -1
  197. package/dist/src/storage/interface.d.ts +2 -1
  198. package/dist/src/storage/interface.d.ts.map +1 -1
  199. package/dist/src/storage/providers/postgres-kysely/db-types.d.ts +65 -0
  200. package/dist/src/storage/providers/postgres-kysely/db-types.d.ts.map +1 -1
  201. package/dist/src/storage/providers/postgres-kysely/index.d.ts.map +1 -1
  202. package/dist/src/storage/providers/postgres-kysely/index.js +2 -1
  203. package/dist/src/storage/providers/postgres-kysely/index.js.map +1 -1
  204. package/dist/src/storage/providers/postgres-kysely/methods/connections.d.ts +44 -0
  205. package/dist/src/storage/providers/postgres-kysely/methods/connections.d.ts.map +1 -0
  206. package/dist/src/storage/providers/postgres-kysely/methods/connections.js +308 -0
  207. package/dist/src/storage/providers/postgres-kysely/methods/connections.js.map +1 -0
  208. package/dist/src/storage/providers/postgres-kysely/methods/node-infra.d.ts.map +1 -1
  209. package/dist/src/storage/providers/postgres-kysely/methods/node-infra.js +4 -2
  210. package/dist/src/storage/providers/postgres-kysely/methods/node-infra.js.map +1 -1
  211. package/dist/src/storage/providers/postgres-kysely/migrations/0021_connections.sql +116 -0
  212. package/dist/src/storage/providers/postgres-kysely/migrations/0022_provider_clients.sql +36 -0
  213. package/dist/src/storage/providers/postgres-kysely/migrations/0023_nonce_payload.sql +13 -0
  214. package/dist/src/storage/providers/sqlite/index.d.ts.map +1 -1
  215. package/dist/src/storage/providers/sqlite/index.js +2 -1
  216. package/dist/src/storage/providers/sqlite/index.js.map +1 -1
  217. package/dist/src/storage/providers/sqlite/methods/community.d.ts.map +1 -1
  218. package/dist/src/storage/providers/sqlite/methods/community.js +2 -1
  219. package/dist/src/storage/providers/sqlite/methods/community.js.map +1 -1
  220. package/dist/src/storage/providers/sqlite/methods/connections.d.ts +60 -0
  221. package/dist/src/storage/providers/sqlite/methods/connections.d.ts.map +1 -0
  222. package/dist/src/storage/providers/sqlite/methods/connections.js +287 -0
  223. package/dist/src/storage/providers/sqlite/methods/connections.js.map +1 -0
  224. package/dist/src/storage/providers/sqlite/schema-tables-1.d.ts.map +1 -1
  225. package/dist/src/storage/providers/sqlite/schema-tables-1.js +4 -0
  226. package/dist/src/storage/providers/sqlite/schema-tables-1.js.map +1 -1
  227. package/dist/src/storage/providers/sqlite/schema-tables-3.d.ts.map +1 -1
  228. package/dist/src/storage/providers/sqlite/schema-tables-3.js +106 -0
  229. package/dist/src/storage/providers/sqlite/schema-tables-3.js.map +1 -1
  230. package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
  231. package/dist/src/storage/providers/sqlite/schema.js +2 -0
  232. package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
  233. package/dist/src/storage/repositories/connection.repository.d.ts +124 -0
  234. package/dist/src/storage/repositories/connection.repository.d.ts.map +1 -0
  235. package/dist/src/storage/repositories/connection.repository.js +2 -0
  236. package/dist/src/storage/repositories/connection.repository.js.map +1 -0
  237. package/dist/src/storage/types/agents-messaging.d.ts +19 -0
  238. package/dist/src/storage/types/agents-messaging.d.ts.map +1 -1
  239. package/dist/src/storage/types/agents-messaging.js.map +1 -1
  240. package/dist/src/storage/types/auth.d.ts +8 -1
  241. package/dist/src/storage/types/auth.d.ts.map +1 -1
  242. package/dist/src/utils/build-stamp.d.ts +56 -0
  243. package/dist/src/utils/build-stamp.d.ts.map +1 -0
  244. package/dist/src/utils/build-stamp.js +142 -0
  245. package/dist/src/utils/build-stamp.js.map +1 -0
  246. package/dist/src/utils/messaging.d.ts +14 -0
  247. package/dist/src/utils/messaging.d.ts.map +1 -1
  248. package/dist/src/utils/messaging.js +0 -0
  249. package/dist/src/utils/messaging.js.map +1 -1
  250. package/dist/static/sdk-libs/connect/index.js +199 -0
  251. package/dist/static/sdk-libs/connect/notes.js +47 -0
  252. package/dist/static/sdk-libs/connect/panel.js +238 -0
  253. package/dist/static/sdk-libs/data/index.js +63 -11
  254. package/dist/static/sdk-libs/dist/aimeat-connect.js +357 -0
  255. package/dist/static/sdk-libs/dist/aimeat-data.js +40 -9
  256. package/package.json +2 -2
@@ -2184,6 +2184,30 @@ export interface paths {
2184
2184
  patch?: never;
2185
2185
  trace?: never;
2186
2186
  };
2187
+ "/v1/ai/transcribe": {
2188
+ parameters: {
2189
+ query?: never;
2190
+ header?: never;
2191
+ path?: never;
2192
+ cookie?: never;
2193
+ };
2194
+ get?: never;
2195
+ put?: never;
2196
+ /**
2197
+ * Transcribe audio with the owner's own speech-to-text model
2198
+ * @description Speech-to-text on the owner's own provider key, behind the same gate as /v1/ai/complete (an owner session, or any token carrying `ai:use`). Spends the SAME daily AI budget as text completions and lands in the same usage ledger, so a budget eaten by voice messages is visible in the same place as everything else.
2199
+ *
2200
+ * Audio comes from `storage_key` — resolved against the CALLER's own namespace, never an owner supplied in the body, so the endpoint cannot be pointed at another account's files (a key belonging to someone else answers 404, not 403: whether it exists is not information this route gives away). `audio_base64` is a bounded fallback for a browser recording that has not been stored yet; anything of real size goes through storage.
2201
+ *
2202
+ * Requires `sttModel` in the owner's settings. There is deliberately no fallback to the default model — it is a text model, and handing it audio produces an opaque provider error instead of an instruction the owner can act on.
2203
+ */
2204
+ post: operations["aiTranscribe"];
2205
+ delete?: never;
2206
+ options?: never;
2207
+ head?: never;
2208
+ patch?: never;
2209
+ trace?: never;
2210
+ };
2187
2211
  "/v1/ai/available": {
2188
2212
  parameters: {
2189
2213
  query?: never;
@@ -13153,7 +13177,9 @@ export interface paths {
13153
13177
  };
13154
13178
  /**
13155
13179
  * List available OpenRouter models
13156
- * @description Fetches the list of available models from OpenRouter using the configured API key. Owner-only.
13180
+ * @description Fetches available models from the configured provider using the stored API key. Owner-only.
13181
+ *
13182
+ * `modality` selects which catalogue. This is not a client-side filter behind a parameter: OpenRouter's default `/models` listing contains NO transcription or speech models (measured 2026-08-01 — 336 models, zero whisper), so `chat` and `transcription` are genuinely different listings and an STT model cannot be discovered without asking for its modality. Non-OpenRouter OpenAI-compatible providers ignore the parameter and return their whole catalogue.
13157
13183
  */
13158
13184
  get: operations["listOpenRouterModels"];
13159
13185
  put?: never;
@@ -14342,6 +14368,30 @@ export interface paths {
14342
14368
  patch: operations["markMessageRead"];
14343
14369
  trace?: never;
14344
14370
  };
14371
+ "/v1/messages/{id}/attachments/{attId}/transcribe": {
14372
+ parameters: {
14373
+ query?: never;
14374
+ header?: never;
14375
+ path?: never;
14376
+ cookie?: never;
14377
+ };
14378
+ get?: never;
14379
+ put?: never;
14380
+ /**
14381
+ * Turn a voice attachment into text
14382
+ * @description Transcribes one audio attachment with the caller's own speech-to-text model and writes the result onto the CALLER's copy of the message. Mailbox copies are per-owner, so a recipient's transcript stays with the recipient and never travels back to the sender.
14383
+ *
14384
+ * Idempotent by default: an attachment that already has a transcript returns it without calling the provider, because a second click on a button is not a request to be charged twice. Pass `force` to re-run (a different model, or a bad first result).
14385
+ *
14386
+ * Never automatic anywhere in the product — transcription spends the owner's AI budget, so it is always an explicit action.
14387
+ */
14388
+ post: operations["transcribeMessageAttachment"];
14389
+ delete?: never;
14390
+ options?: never;
14391
+ head?: never;
14392
+ patch?: never;
14393
+ trace?: never;
14394
+ };
14345
14395
  "/v1/messages/{id}": {
14346
14396
  parameters: {
14347
14397
  query?: never;
@@ -14878,6 +14928,187 @@ export interface paths {
14878
14928
  patch?: never;
14879
14929
  trace?: never;
14880
14930
  };
14931
+ "/v1/connections/providers": {
14932
+ parameters: {
14933
+ query?: never;
14934
+ header?: never;
14935
+ path?: never;
14936
+ cookie?: never;
14937
+ };
14938
+ /**
14939
+ * External services an account can be connected at
14940
+ * @description Enabled outbound providers only. A provider is enabled when the node has what it needs to talk to it; an unconfigured one is absent rather than half-working. capabilities are the questions an app may ask about a connection at that provider - an app never reads the provider's own scope vocabulary, because it cannot know what those names mean.
14941
+ */
14942
+ get: operations["listConnectionProviders"];
14943
+ put?: never;
14944
+ post?: never;
14945
+ delete?: never;
14946
+ options?: never;
14947
+ head?: never;
14948
+ patch?: never;
14949
+ trace?: never;
14950
+ };
14951
+ "/v1/connections": {
14952
+ parameters: {
14953
+ query?: never;
14954
+ header?: never;
14955
+ path?: never;
14956
+ cookie?: never;
14957
+ };
14958
+ /**
14959
+ * Accounts the caller has connected
14960
+ * @description The caller's own connections and no one else's. The credential is never part of any response; what comes back is enough to name the account in a picker and to see that it needs attention.
14961
+ */
14962
+ get: operations["listConnections"];
14963
+ put?: never;
14964
+ post?: never;
14965
+ delete?: never;
14966
+ options?: never;
14967
+ head?: never;
14968
+ patch?: never;
14969
+ trace?: never;
14970
+ };
14971
+ "/v1/connections/start": {
14972
+ parameters: {
14973
+ query?: never;
14974
+ header?: never;
14975
+ path?: never;
14976
+ cookie?: never;
14977
+ };
14978
+ get?: never;
14979
+ put?: never;
14980
+ /**
14981
+ * Begin connecting an account
14982
+ * @description Returns the URL to send the user's browser to. Consent happens at the PROVIDER, never here. The state is single-use and bound to the calling principal; the PKCE verifier stays on the node and never travels.
14983
+ */
14984
+ post: operations["startConnection"];
14985
+ delete?: never;
14986
+ options?: never;
14987
+ head?: never;
14988
+ patch?: never;
14989
+ trace?: never;
14990
+ };
14991
+ "/v1/connections/attach": {
14992
+ parameters: {
14993
+ query?: never;
14994
+ header?: never;
14995
+ path?: never;
14996
+ cookie?: never;
14997
+ };
14998
+ get?: never;
14999
+ put?: never;
15000
+ /**
15001
+ * Connect an account by supplying a credential
15002
+ * @description For a provider that has no authorization round. The fields to send are declared by the provider itself (attachFields in discovery), so a client renders the form without knowing about any particular provider. The two paths never overlap: attaching a provider that HAS a consent screen is refused, because it would be a way to skip that screen. The supplied secret is never echoed back, in a response or in an error.
15003
+ */
15004
+ post: operations["attachConnection"];
15005
+ delete?: never;
15006
+ options?: never;
15007
+ head?: never;
15008
+ patch?: never;
15009
+ trace?: never;
15010
+ };
15011
+ "/v1/connections/callback": {
15012
+ parameters: {
15013
+ query?: never;
15014
+ header?: never;
15015
+ path?: never;
15016
+ cookie?: never;
15017
+ };
15018
+ /**
15019
+ * Provider redirect target
15020
+ * @description Unauthenticated by necessity - the provider redirects a browser here and that browser may carry no session. Its gate is the single-use state, which is bound to the principal who started the round and consumed BEFORE the code is exchanged, so a replayed callback finds nothing rather than racing the original.
15021
+ */
15022
+ get: operations["connectionCallback"];
15023
+ put?: never;
15024
+ post?: never;
15025
+ delete?: never;
15026
+ options?: never;
15027
+ head?: never;
15028
+ patch?: never;
15029
+ trace?: never;
15030
+ };
15031
+ "/v1/connections/{id}": {
15032
+ parameters: {
15033
+ query?: never;
15034
+ header?: never;
15035
+ path?: never;
15036
+ cookie?: never;
15037
+ };
15038
+ get?: never;
15039
+ put?: never;
15040
+ post?: never;
15041
+ /**
15042
+ * Disconnect an account
15043
+ * @description Tells the provider first where it offers a way to be told, then removes the credential locally regardless. An owner who asked to disconnect must end up disconnected even when the provider is unreachable; told_provider reports which happened.
15044
+ */
15045
+ delete: operations["revokeConnection"];
15046
+ options?: never;
15047
+ head?: never;
15048
+ patch?: never;
15049
+ trace?: never;
15050
+ };
15051
+ "/v1/connections/{id}/delegations": {
15052
+ parameters: {
15053
+ query?: never;
15054
+ header?: never;
15055
+ path?: never;
15056
+ cookie?: never;
15057
+ };
15058
+ /** What has been delegated over a channel */
15059
+ get: operations["listConnectionDelegations"];
15060
+ put?: never;
15061
+ /**
15062
+ * Let an app perform one named action over a shared channel
15063
+ * @description Grants an app ONE action with the parameters it may not choose already decided. The app calls the delegation, never the connection, so it cannot retarget the channel, the visibility or the playlist. Shared-mode connections only.
15064
+ */
15065
+ post: operations["createConnectionDelegation"];
15066
+ delete?: never;
15067
+ options?: never;
15068
+ head?: never;
15069
+ patch?: never;
15070
+ trace?: never;
15071
+ };
15072
+ "/v1/connections/delegations/{did}": {
15073
+ parameters: {
15074
+ query?: never;
15075
+ header?: never;
15076
+ path?: never;
15077
+ cookie?: never;
15078
+ };
15079
+ get?: never;
15080
+ put?: never;
15081
+ post?: never;
15082
+ delete?: never;
15083
+ options?: never;
15084
+ head?: never;
15085
+ /**
15086
+ * Stop or resume a delegation
15087
+ * @description The one-gesture stop. Disabling halts every publisher at once; at the moment of abuse there is no time to work through them one at a time.
15088
+ */
15089
+ patch: operations["setConnectionDelegationEnabled"];
15090
+ trace?: never;
15091
+ };
15092
+ "/v1/connections/delegations/{did}/quota": {
15093
+ parameters: {
15094
+ query?: never;
15095
+ header?: never;
15096
+ path?: never;
15097
+ cookie?: never;
15098
+ };
15099
+ /**
15100
+ * How much of a shared allowance is left
15101
+ * @description Readable BEFORE anything is refused. A ceiling a person only meets by hitting it is indistinguishable from a broken feature. limit is null when the provider's shared ceiling has not been measured - the counter still runs, so the number can later be filled in with evidence rather than a guess.
15102
+ */
15103
+ get: operations["getConnectionDelegationQuota"];
15104
+ put?: never;
15105
+ post?: never;
15106
+ delete?: never;
15107
+ options?: never;
15108
+ head?: never;
15109
+ patch?: never;
15110
+ trace?: never;
15111
+ };
14881
15112
  "/v1/groups": {
14882
15113
  parameters: {
14883
15114
  query?: never;
@@ -18516,6 +18747,51 @@ export interface components {
18516
18747
  record: components["schemas"]["AiProvenanceRecord"];
18517
18748
  };
18518
18749
  };
18750
+ /**
18751
+ * @description What a caller SAYS about how the content in this request was made — the input block, not the stored record. It is the same shape the MCP write tools take as `ai_provenance`, so a statement means one thing whichever surface it arrives on.
18752
+ *
18753
+ * What is deliberately absent is identity. There is no principal, no node and no attestation here: the node fills in who you are, which node, when, and the hash of the exact bytes, and it never takes any of those from the caller. A declaration is believed about the HOW and never about the WHO.
18754
+ *
18755
+ * Omitting the block is not an error. For an AGENT or ECOSYSTEM principal the node then stamps a record itself (`stampedBy: node`) — silence from a non-human writer must not read as "a human wrote it" — while an OWNER principal is never stamped.
18756
+ */
18757
+ AiProvenanceDeclaration: {
18758
+ /**
18759
+ * @description How much of this a model made. `original` = a person wrote it, no model involved. `assisted` = a person wrote it and a model edited or refined it. `synthesized` = a model combined real sources into new content at someone's direction. `ai-generated` = a model produced it.
18760
+ * @enum {string}
18761
+ */
18762
+ level: "original" | "assisted" | "synthesized" | "ai-generated";
18763
+ /**
18764
+ * @description Optional detail under `level`.
18765
+ * @enum {string}
18766
+ */
18767
+ method?: "human" | "rewritten" | "summarized" | "translated" | "synthesized" | "fully-generated" | "multi-agent";
18768
+ /**
18769
+ * @description Whether a person examined what the model produced. Only a step where someone reads the SUBSTANCE and can reject it counts — a skim, a spell-check or clicking publish is `light-review` at most. Omitted means `none`.
18770
+ * @enum {string}
18771
+ */
18772
+ human_involvement?: "none" | "light-review" | "editorial-control" | "full-human";
18773
+ /**
18774
+ * @description The model that produced it, as the provider names it.
18775
+ * @example anthropic/claude-opus-5
18776
+ */
18777
+ model?: string;
18778
+ /**
18779
+ * @description Who SERVED the model, when that is not obvious from its name. Worth stating whenever the declarer routes through an intermediary: "which model" and "who ran it" are different questions, and a router alias answers neither on its own.
18780
+ * @example openrouter
18781
+ */
18782
+ provider?: string;
18783
+ /** @description For synthesized content, where the material came from. */
18784
+ sources?: {
18785
+ url: string;
18786
+ title?: string;
18787
+ /** Format: date-time */
18788
+ retrieved_at?: string;
18789
+ /** @description How it was used, e.g. 'primary' or 'background'. */
18790
+ role?: string;
18791
+ }[];
18792
+ /** @description Anything a reader needs to interpret the above. Never prompt text or anything private — the record is publishable alongside the content. */
18793
+ notes?: string;
18794
+ };
18519
18795
  /**
18520
18796
  * @description The provenance of ONE ITEM in a list, carried on the item itself.
18521
18797
  *
@@ -20328,6 +20604,20 @@ export interface components {
20328
20604
  alert_threshold?: number;
20329
20605
  };
20330
20606
  };
20607
+ /** @description Everything an app may see about a connection. Deliberately without the provider's scope list and without an expiry: an app cannot know what a provider's scope names mean, so capability questions are asked and answered instead. The credential appears in no projection anywhere. */
20608
+ PublicConnection: {
20609
+ id?: string;
20610
+ provider?: string;
20611
+ /** @enum {string} */
20612
+ mode?: "personal" | "shared";
20613
+ /** @description Fetched from the provider at connect time, never supplied by a caller. */
20614
+ accountLabel?: string;
20615
+ /**
20616
+ * @description needs_reauth is a user-visible state rather than an error; scheduled work parks on it instead of retrying.
20617
+ * @enum {string}
20618
+ */
20619
+ status?: "active" | "needs_reauth" | "revoked";
20620
+ };
20331
20621
  SharingGroup: {
20332
20622
  /** Format: uuid */
20333
20623
  id: string;
@@ -20453,6 +20743,22 @@ export interface components {
20453
20743
  name?: string;
20454
20744
  /** @enum {string} */
20455
20745
  kind?: "image" | "audio" | "video" | "file";
20746
+ /** @description Playing length of audio/video, measured when it was recorded. Lets a thread show "0:14" before any bytes are fetched. */
20747
+ durationSeconds?: number;
20748
+ /** @description Text of a spoken attachment. `by: sender` arrived WITH the message and is identical in both mailbox copies (so the recipient reads it without paying). `by: recipient` was produced locally with the reader's own key and exists ONLY in their copy — updateMessageAttachments is owner-keyed, so there is no path back to the sender. */
20749
+ transcript?: {
20750
+ text?: string;
20751
+ /**
20752
+ * @description Server-set on send; a client claim of `recipient` is overwritten with `sender`.
20753
+ * @enum {string}
20754
+ */
20755
+ by?: "sender" | "recipient";
20756
+ model?: string;
20757
+ lang?: string;
20758
+ seconds?: number;
20759
+ /** Format: date-time */
20760
+ at?: string;
20761
+ };
20456
20762
  };
20457
20763
  /** @description One mailbox copy of a human↔human direct message. */
20458
20764
  DirectMessageRecord: {
@@ -25053,6 +25359,110 @@ export interface operations {
25053
25359
  403: components["responses"]["AimeatError"];
25054
25360
  };
25055
25361
  };
25362
+ aiTranscribe: {
25363
+ parameters: {
25364
+ query?: never;
25365
+ header?: never;
25366
+ path?: never;
25367
+ cookie?: never;
25368
+ };
25369
+ requestBody: {
25370
+ content: {
25371
+ "application/json": {
25372
+ /** @description Key of an audio file in the CALLER's own storage. Preferred. */
25373
+ storage_key?: string;
25374
+ /** @description Raw base64 audio (no data: prefix). Capped well below the JSON body limit. */
25375
+ audio_base64?: string;
25376
+ /** @description Content type of the audio (e.g. audio/webm). Defaults to the stored file's. */
25377
+ mime?: string;
25378
+ filename?: string;
25379
+ /** @description Override the owner's configured sttModel for this call. */
25380
+ model?: string;
25381
+ /** @description ISO-639-1 hint. Omitted = the owner's sttLanguage, then auto-detect. */
25382
+ language?: string;
25383
+ /** @description Ask for segment timestamps (verbose_json). */
25384
+ verbose?: boolean;
25385
+ /** @description Attribution for the per-app quota and the spend breakdown. */
25386
+ app_id?: string;
25387
+ };
25388
+ };
25389
+ };
25390
+ responses: {
25391
+ /** @description Transcription */
25392
+ 200: {
25393
+ headers: {
25394
+ [name: string]: unknown;
25395
+ };
25396
+ content: {
25397
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
25398
+ data?: {
25399
+ text?: string;
25400
+ model?: string;
25401
+ language?: string | null;
25402
+ /** @description Audio duration as the provider measured it; 0 if unreported. */
25403
+ seconds?: number;
25404
+ usage?: {
25405
+ total_tokens?: number;
25406
+ /** @description The provider's reported charge. 0 with cost_exact false when the provider reports none — no estimate is derived from duration, because audio pricing units differ between providers. */
25407
+ cost_usd?: number;
25408
+ cost_exact?: boolean;
25409
+ };
25410
+ budget?: {
25411
+ daily_budget_usd?: number;
25412
+ spent_today_usd?: number;
25413
+ remaining_usd?: number;
25414
+ };
25415
+ };
25416
+ };
25417
+ };
25418
+ };
25419
+ /** @description Bad request (no audio, oversized audio, or NO_STT_MODEL / NO_API_KEY) */
25420
+ 400: {
25421
+ headers: {
25422
+ [name: string]: unknown;
25423
+ };
25424
+ content: {
25425
+ "application/json": components["schemas"]["AimeatEnvelope"];
25426
+ };
25427
+ };
25428
+ /** @description Daily AI budget or per-app quota exhausted */
25429
+ 402: {
25430
+ headers: {
25431
+ [name: string]: unknown;
25432
+ };
25433
+ content: {
25434
+ "application/json": components["schemas"]["AimeatEnvelope"];
25435
+ };
25436
+ };
25437
+ /** @description Missing ai:use scope, app not allowlisted, or provider host not allowlisted */
25438
+ 403: {
25439
+ headers: {
25440
+ [name: string]: unknown;
25441
+ };
25442
+ content: {
25443
+ "application/json": components["schemas"]["AimeatEnvelope"];
25444
+ };
25445
+ };
25446
+ /** @description No such file in the caller's storage */
25447
+ 404: {
25448
+ headers: {
25449
+ [name: string]: unknown;
25450
+ };
25451
+ content: {
25452
+ "application/json": components["schemas"]["AimeatEnvelope"];
25453
+ };
25454
+ };
25455
+ /** @description Provider error */
25456
+ 502: {
25457
+ headers: {
25458
+ [name: string]: unknown;
25459
+ };
25460
+ content: {
25461
+ "application/json": components["schemas"]["AimeatEnvelope"];
25462
+ };
25463
+ };
25464
+ };
25465
+ };
25056
25466
  aiAvailable: {
25057
25467
  parameters: {
25058
25468
  query?: never;
@@ -31646,6 +32056,10 @@ export interface operations {
31646
32056
  cortex?: {
31647
32057
  agents?: components["schemas"]["CrewDef"][];
31648
32058
  };
32059
+ /** @description How the app bundle in this request was made. Honoured in BOTH modes: sent with `mode: presigned` it rides in the signed upload token, so the declaration made at the handshake is the one recorded when the bytes arrive. A malformed block is a 400 rather than a silently dropped field. */
32060
+ ai_provenance?: components["schemas"]["AiProvenanceDeclaration"];
32061
+ /** @description Attach an ALREADY-MINTED record instead of declaring a new one. Must belong to the caller's own account. Also carried through the presigned token. */
32062
+ ai_provenance_id?: string;
31649
32063
  };
31650
32064
  };
31651
32065
  };
@@ -32569,7 +32983,17 @@ export interface operations {
32569
32983
  };
32570
32984
  cookie?: never;
32571
32985
  };
32572
- requestBody?: never;
32986
+ /** @description Optional. The declaration belongs to the PROMOTION rather than to the draft save: this is the call that puts the bytes in front of readers, and so the moment the publisher answers for how they were made. */
32987
+ requestBody?: {
32988
+ content: {
32989
+ "application/json": {
32990
+ /** @description How the promoted bundle was made. A malformed block is a 400. */
32991
+ ai_provenance?: components["schemas"]["AiProvenanceDeclaration"];
32992
+ /** @description Attach an already-minted record of the caller's own instead. */
32993
+ ai_provenance_id?: string;
32994
+ };
32995
+ };
32996
+ };
32573
32997
  responses: {
32574
32998
  /** @description Draft published as a new live version */
32575
32999
  201: {
@@ -42802,6 +43226,14 @@ export interface operations {
42802
43226
  hasApiKey?: boolean;
42803
43227
  /** @description Currently configured default model */
42804
43228
  model?: string | null;
43229
+ reasoningModel?: string | null;
43230
+ executionModel?: string | null;
43231
+ /** @description Vision-capable model for image inputs */
43232
+ visionModel?: string | null;
43233
+ /** @description Transcription model; null = transcription is off */
43234
+ sttModel?: string | null;
43235
+ /** @description ISO-639-1 transcription hint; null = auto-detect */
43236
+ sttLanguage?: string | null;
42805
43237
  /** @description Whether auto-retry is enabled */
42806
43238
  autoRetry?: boolean;
42807
43239
  /** @description Maximum retry count */
@@ -42817,6 +43249,18 @@ export interface operations {
42817
43249
  * @description Custom API base URL
42818
43250
  */
42819
43251
  baseUrl?: string;
43252
+ temperature?: number | null;
43253
+ top_p?: number | null;
43254
+ max_tokens?: number | null;
43255
+ /** @description Node-level ceilings served alongside the settings that live under them, so a browser recorder stops at THIS node's number instead of one compiled into the page. */
43256
+ limits?: {
43257
+ /** @description Hard cap on one browser voice recording */
43258
+ voice_msg_max_seconds?: number;
43259
+ /** @description Largest audio file accepted for transcription */
43260
+ stt_max_mb?: number;
43261
+ /** @description Duration guideline (warned about after the fact, never withheld) */
43262
+ stt_max_seconds?: number;
43263
+ };
42820
43264
  };
42821
43265
  };
42822
43266
  };
@@ -42849,6 +43293,20 @@ export interface operations {
42849
43293
  model?: string;
42850
43294
  /** @description Vision-capable model (e.g. qwen-2.5-VL) used for requests carrying image inputs (the Secretary's doc/image intake). null/'' clears it. When unset, image requests fall back to the default model (which may be text-only). */
42851
43295
  visionModel?: string | null;
43296
+ /** @description Transcription model (e.g. openai/whisper-large-v3) used by POST /v1/ai/transcribe and voice messages. null/'' turns transcription OFF — there is deliberately no fallback to the default model, which is a text model and would only produce an opaque provider error. Discover candidates via GET /v1/openrouter/models?modality=transcription. */
43297
+ sttModel?: string | null;
43298
+ /** @description ISO-639-1 hint for transcription (e.g. "fi"). null/'' = auto-detect, which is the right choice for mixed-language speech. */
43299
+ sttLanguage?: string | null;
43300
+ /** @description Model used when a caller asks for the `reasoning` role. */
43301
+ reasoningModel?: string | null;
43302
+ /** @description Model used when a caller asks for the `execution` role. */
43303
+ executionModel?: string | null;
43304
+ /** @description Default sampling temperature (0-2). null clears it. */
43305
+ temperature?: number | null;
43306
+ /** @description Default nucleus sampling (0-1). null clears it. */
43307
+ top_p?: number | null;
43308
+ /** @description Default output ceiling. null clears it. */
43309
+ max_tokens?: number | null;
42852
43310
  /** @description Whether to automatically retry failed completions */
42853
43311
  autoRetry?: boolean;
42854
43312
  /** @description Maximum number of retry attempts */
@@ -42919,7 +43377,10 @@ export interface operations {
42919
43377
  };
42920
43378
  listOpenRouterModels: {
42921
43379
  parameters: {
42922
- query?: never;
43380
+ query?: {
43381
+ /** @description Which slice of the provider's catalogue to list. */
43382
+ modality?: "chat" | "transcription" | "speech";
43383
+ };
42923
43384
  header?: never;
42924
43385
  path?: never;
42925
43386
  cookie?: never;
@@ -42943,13 +43404,23 @@ export interface operations {
42943
43404
  description?: string;
42944
43405
  /** @description Maximum context window in tokens */
42945
43406
  context_length?: number;
43407
+ /** @description What the model ACCEPTS (text, image, audio, file), straight from the provider. A picker filters on this rather than guessing from the name — 180 of 336 catalogue models read images and no naming convention identifies them. */
43408
+ input_modalities?: string[];
43409
+ /** @description What the model PRODUCES (text, transcription, speech, image). */
43410
+ output_modalities?: string[];
43411
+ /** @description Provider-reported pricing. For CHAT models `prompt`/`completion` are consistently per token. For AUDIO models the unit is NOT self-describing and varies by upstream provider — the same openai/whisper-large-v3 reports 0.0015 on Together and 0.111 on Groq (per minute vs per hour) — so a derived "$/min" label would be wrong for whole providers. The trustworthy price for a transcription is `usage.cost_usd` on the actual response. */
42946
43412
  pricing?: {
42947
- /** @description Cost per prompt token */
43413
+ /** @description Cost per prompt token (chat) / provider-native unit (audio) */
42948
43414
  prompt?: string;
42949
43415
  /** @description Cost per completion token */
42950
43416
  completion?: string;
42951
43417
  };
42952
43418
  }[];
43419
+ /**
43420
+ * @description Which catalogue these models came from (echoes the request).
43421
+ * @enum {string}
43422
+ */
43423
+ modality?: "chat" | "transcription" | "speech";
42953
43424
  };
42954
43425
  };
42955
43426
  };
@@ -45488,6 +45959,94 @@ export interface operations {
45488
45959
  404: components["responses"]["NotFound"];
45489
45960
  };
45490
45961
  };
45962
+ transcribeMessageAttachment: {
45963
+ parameters: {
45964
+ query?: never;
45965
+ header?: never;
45966
+ path: {
45967
+ id: string;
45968
+ attId: string;
45969
+ };
45970
+ cookie?: never;
45971
+ };
45972
+ requestBody?: {
45973
+ content: {
45974
+ "application/json": {
45975
+ /** @description Re-transcribe even when a transcript already exists (costs again). */
45976
+ force?: boolean;
45977
+ /** @description Override the configured sttModel. */
45978
+ model?: string;
45979
+ /** @description ISO-639-1 hint. */
45980
+ language?: string;
45981
+ };
45982
+ };
45983
+ };
45984
+ responses: {
45985
+ /** @description Transcript (fresh or reused) */
45986
+ 200: {
45987
+ headers: {
45988
+ [name: string]: unknown;
45989
+ };
45990
+ content: {
45991
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
45992
+ data?: {
45993
+ attachment_id?: string;
45994
+ /** @description Same shape as DirectMessageAttachment.transcript. */
45995
+ transcript?: Record<string, never>;
45996
+ /** @description true = returned from storage, no provider call, no charge. */
45997
+ reused?: boolean;
45998
+ usage?: {
45999
+ cost_usd?: number;
46000
+ cost_exact?: boolean;
46001
+ seconds?: number;
46002
+ };
46003
+ budget?: {
46004
+ daily_budget_usd?: number;
46005
+ spent_today_usd?: number;
46006
+ remaining_usd?: number;
46007
+ };
46008
+ };
46009
+ };
46010
+ };
46011
+ };
46012
+ /** @description Not an audio attachment, or no transcription model configured */
46013
+ 400: {
46014
+ headers: {
46015
+ [name: string]: unknown;
46016
+ };
46017
+ content: {
46018
+ "application/json": components["schemas"]["AimeatEnvelope"];
46019
+ };
46020
+ };
46021
+ /** @description Daily AI budget exhausted */
46022
+ 402: {
46023
+ headers: {
46024
+ [name: string]: unknown;
46025
+ };
46026
+ content: {
46027
+ "application/json": components["schemas"]["AimeatEnvelope"];
46028
+ };
46029
+ };
46030
+ /** @description Message or attachment not found in the caller's mailbox */
46031
+ 404: {
46032
+ headers: {
46033
+ [name: string]: unknown;
46034
+ };
46035
+ content: {
46036
+ "application/json": components["schemas"]["AimeatEnvelope"];
46037
+ };
46038
+ };
46039
+ /** @description ATTACHMENT_NOT_READY — the bytes have not been duplicated locally yet (or the attachment expired before they could be). */
46040
+ 409: {
46041
+ headers: {
46042
+ [name: string]: unknown;
46043
+ };
46044
+ content: {
46045
+ "application/json": components["schemas"]["AimeatEnvelope"];
46046
+ };
46047
+ };
46048
+ };
46049
+ };
45491
46050
  deleteDirectMessage: {
45492
46051
  parameters: {
45493
46052
  query?: never;
@@ -46670,6 +47229,412 @@ export interface operations {
46670
47229
  401: components["responses"]["Unauthorized"];
46671
47230
  };
46672
47231
  };
47232
+ listConnectionProviders: {
47233
+ parameters: {
47234
+ query?: never;
47235
+ header?: never;
47236
+ path?: never;
47237
+ cookie?: never;
47238
+ };
47239
+ requestBody?: never;
47240
+ responses: {
47241
+ /** @description Enabled providers */
47242
+ 200: {
47243
+ headers: {
47244
+ [name: string]: unknown;
47245
+ };
47246
+ content: {
47247
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
47248
+ data?: {
47249
+ providers?: {
47250
+ /** @example mastodon */
47251
+ id?: string;
47252
+ label?: string;
47253
+ /** @description True when client credentials are per instance and acquired at runtime. */
47254
+ instanceScoped?: boolean;
47255
+ /** @enum {string} */
47256
+ credentialShape?: "oauth2" | "static" | "session";
47257
+ capabilities?: string[];
47258
+ }[];
47259
+ };
47260
+ };
47261
+ };
47262
+ };
47263
+ 401: components["responses"]["Unauthorized"];
47264
+ };
47265
+ };
47266
+ listConnections: {
47267
+ parameters: {
47268
+ query?: never;
47269
+ header?: never;
47270
+ path?: never;
47271
+ cookie?: never;
47272
+ };
47273
+ requestBody?: never;
47274
+ responses: {
47275
+ /** @description The caller's connections */
47276
+ 200: {
47277
+ headers: {
47278
+ [name: string]: unknown;
47279
+ };
47280
+ content: {
47281
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
47282
+ data?: {
47283
+ connections?: components["schemas"]["PublicConnection"][];
47284
+ };
47285
+ };
47286
+ };
47287
+ };
47288
+ 401: components["responses"]["Unauthorized"];
47289
+ /** @description Connections are not enabled on this node, or it has no encryption key. */
47290
+ 503: {
47291
+ headers: {
47292
+ [name: string]: unknown;
47293
+ };
47294
+ content?: never;
47295
+ };
47296
+ };
47297
+ };
47298
+ startConnection: {
47299
+ parameters: {
47300
+ query?: never;
47301
+ header?: never;
47302
+ path?: never;
47303
+ cookie?: never;
47304
+ };
47305
+ requestBody: {
47306
+ content: {
47307
+ "application/json": {
47308
+ /** @example mastodon */
47309
+ provider: string;
47310
+ /**
47311
+ * @description Required for an instance-scoped provider. Comes from the user, so it is normalised and validated, and every request to it goes through safeFetch.
47312
+ * @example mastodon.social
47313
+ */
47314
+ instance?: string;
47315
+ /**
47316
+ * @description personal is the caller's own account. shared is a channel the caller owns and intends to delegate to an app's users.
47317
+ * @default personal
47318
+ * @enum {string}
47319
+ */
47320
+ mode?: "personal" | "shared";
47321
+ /** @description Same-origin path to return to. An absolute URL is ignored. */
47322
+ return_url?: string;
47323
+ };
47324
+ };
47325
+ };
47326
+ responses: {
47327
+ /** @description Authorization started */
47328
+ 200: {
47329
+ headers: {
47330
+ [name: string]: unknown;
47331
+ };
47332
+ content: {
47333
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
47334
+ data?: {
47335
+ authorize_url?: string;
47336
+ state?: string;
47337
+ };
47338
+ };
47339
+ };
47340
+ };
47341
+ 400: components["responses"]["BadRequest"];
47342
+ 401: components["responses"]["Unauthorized"];
47343
+ /** @description No such provider. */
47344
+ 404: {
47345
+ headers: {
47346
+ [name: string]: unknown;
47347
+ };
47348
+ content?: never;
47349
+ };
47350
+ };
47351
+ };
47352
+ attachConnection: {
47353
+ parameters: {
47354
+ query?: never;
47355
+ header?: never;
47356
+ path?: never;
47357
+ cookie?: never;
47358
+ };
47359
+ requestBody: {
47360
+ content: {
47361
+ "application/json": {
47362
+ /** @example bluesky */
47363
+ provider: string;
47364
+ /**
47365
+ * @default personal
47366
+ * @enum {string}
47367
+ */
47368
+ mode?: "personal" | "shared";
47369
+ /** @description Keyed by the names the provider declared in attachFields. */
47370
+ fields: {
47371
+ [key: string]: string;
47372
+ };
47373
+ };
47374
+ };
47375
+ };
47376
+ responses: {
47377
+ /** @description An account already connected was repaired with a new credential. */
47378
+ 200: {
47379
+ headers: {
47380
+ [name: string]: unknown;
47381
+ };
47382
+ content?: never;
47383
+ };
47384
+ /** @description Connected */
47385
+ 201: {
47386
+ headers: {
47387
+ [name: string]: unknown;
47388
+ };
47389
+ content: {
47390
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
47391
+ data?: {
47392
+ connection?: components["schemas"]["PublicConnection"];
47393
+ created?: boolean;
47394
+ };
47395
+ };
47396
+ };
47397
+ };
47398
+ /** @description The credential was refused, a declared field was missing, or the provider uses an authorization round instead (NEEDS_AUTHORIZATION). */
47399
+ 400: {
47400
+ headers: {
47401
+ [name: string]: unknown;
47402
+ };
47403
+ content?: never;
47404
+ };
47405
+ 401: components["responses"]["Unauthorized"];
47406
+ /** @description No such provider. */
47407
+ 404: {
47408
+ headers: {
47409
+ [name: string]: unknown;
47410
+ };
47411
+ content?: never;
47412
+ };
47413
+ };
47414
+ };
47415
+ connectionCallback: {
47416
+ parameters: {
47417
+ query?: {
47418
+ state?: string;
47419
+ code?: string;
47420
+ /** @description Present when the user cancelled or the provider refused. */
47421
+ error?: string;
47422
+ };
47423
+ header?: never;
47424
+ path?: never;
47425
+ cookie?: never;
47426
+ };
47427
+ requestBody?: never;
47428
+ responses: {
47429
+ /** @description Connected; redirected back to where the flow started. */
47430
+ 302: {
47431
+ headers: {
47432
+ [name: string]: unknown;
47433
+ };
47434
+ content?: never;
47435
+ };
47436
+ /** @description The authorization could not be completed, with the reason. */
47437
+ 400: {
47438
+ headers: {
47439
+ [name: string]: unknown;
47440
+ };
47441
+ content?: never;
47442
+ };
47443
+ };
47444
+ };
47445
+ revokeConnection: {
47446
+ parameters: {
47447
+ query?: never;
47448
+ header?: never;
47449
+ path: {
47450
+ id: string;
47451
+ };
47452
+ cookie?: never;
47453
+ };
47454
+ requestBody?: never;
47455
+ responses: {
47456
+ /** @description Revoked */
47457
+ 200: {
47458
+ headers: {
47459
+ [name: string]: unknown;
47460
+ };
47461
+ content: {
47462
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
47463
+ data?: {
47464
+ revoked?: boolean;
47465
+ /** @description Whether the provider was reachable to be told. */
47466
+ told_provider?: boolean;
47467
+ };
47468
+ };
47469
+ };
47470
+ };
47471
+ 401: components["responses"]["Unauthorized"];
47472
+ /** @description No such connection. Identical for a connection that does not exist and one belonging to someone else - the difference between those answers would enumerate other people's accounts. */
47473
+ 404: {
47474
+ headers: {
47475
+ [name: string]: unknown;
47476
+ };
47477
+ content?: never;
47478
+ };
47479
+ };
47480
+ };
47481
+ listConnectionDelegations: {
47482
+ parameters: {
47483
+ query?: never;
47484
+ header?: never;
47485
+ path: {
47486
+ id: string;
47487
+ };
47488
+ cookie?: never;
47489
+ };
47490
+ requestBody?: never;
47491
+ responses: {
47492
+ /** @description Delegations over this connection */
47493
+ 200: {
47494
+ headers: {
47495
+ [name: string]: unknown;
47496
+ };
47497
+ content?: never;
47498
+ };
47499
+ 401: components["responses"]["Unauthorized"];
47500
+ /** @description No such connection. */
47501
+ 404: {
47502
+ headers: {
47503
+ [name: string]: unknown;
47504
+ };
47505
+ content?: never;
47506
+ };
47507
+ };
47508
+ };
47509
+ createConnectionDelegation: {
47510
+ parameters: {
47511
+ query?: never;
47512
+ header?: never;
47513
+ path: {
47514
+ id: string;
47515
+ };
47516
+ cookie?: never;
47517
+ };
47518
+ requestBody: {
47519
+ content: {
47520
+ "application/json": {
47521
+ app_id: string;
47522
+ /** @example publish-video */
47523
+ action: string;
47524
+ /** @description Parameters the app may not override. Merged OVER whatever it sends. */
47525
+ fixed?: {
47526
+ [key: string]: unknown;
47527
+ };
47528
+ /** @description Ceiling per PUBLISHER, which is only possible because a shared publish is never anonymous. Without it one publisher drains an allowance everyone shares. */
47529
+ per_user_limit?: {
47530
+ count?: number;
47531
+ /** @default 24 */
47532
+ window_hours?: number;
47533
+ } | null;
47534
+ /**
47535
+ * @default hold
47536
+ * @enum {string}
47537
+ */
47538
+ moderation?: "hold" | "auto";
47539
+ /** @default true */
47540
+ enabled?: boolean;
47541
+ };
47542
+ };
47543
+ };
47544
+ responses: {
47545
+ /** @description Delegation created or replaced */
47546
+ 201: {
47547
+ headers: {
47548
+ [name: string]: unknown;
47549
+ };
47550
+ content?: never;
47551
+ };
47552
+ 400: components["responses"]["BadRequest"];
47553
+ 401: components["responses"]["Unauthorized"];
47554
+ /** @description No such connection. */
47555
+ 404: {
47556
+ headers: {
47557
+ [name: string]: unknown;
47558
+ };
47559
+ content?: never;
47560
+ };
47561
+ };
47562
+ };
47563
+ setConnectionDelegationEnabled: {
47564
+ parameters: {
47565
+ query?: never;
47566
+ header?: never;
47567
+ path: {
47568
+ did: string;
47569
+ };
47570
+ cookie?: never;
47571
+ };
47572
+ requestBody: {
47573
+ content: {
47574
+ "application/json": {
47575
+ enabled: boolean;
47576
+ };
47577
+ };
47578
+ };
47579
+ responses: {
47580
+ /** @description Updated */
47581
+ 200: {
47582
+ headers: {
47583
+ [name: string]: unknown;
47584
+ };
47585
+ content?: never;
47586
+ };
47587
+ 400: components["responses"]["BadRequest"];
47588
+ 401: components["responses"]["Unauthorized"];
47589
+ /** @description No such delegation. */
47590
+ 404: {
47591
+ headers: {
47592
+ [name: string]: unknown;
47593
+ };
47594
+ content?: never;
47595
+ };
47596
+ };
47597
+ };
47598
+ getConnectionDelegationQuota: {
47599
+ parameters: {
47600
+ query?: never;
47601
+ header?: never;
47602
+ path: {
47603
+ did: string;
47604
+ };
47605
+ cookie?: never;
47606
+ };
47607
+ requestBody?: never;
47608
+ responses: {
47609
+ /** @description Allowance */
47610
+ 200: {
47611
+ headers: {
47612
+ [name: string]: unknown;
47613
+ };
47614
+ content: {
47615
+ "application/json": components["schemas"]["AimeatEnvelope"] & {
47616
+ data?: {
47617
+ quota?: {
47618
+ limit?: number | null;
47619
+ usedInWindow?: number;
47620
+ remaining?: number | null;
47621
+ windowHours?: number;
47622
+ };
47623
+ per_user_limit?: Record<string, never> | null;
47624
+ };
47625
+ };
47626
+ };
47627
+ };
47628
+ 401: components["responses"]["Unauthorized"];
47629
+ /** @description No such delegation. */
47630
+ 404: {
47631
+ headers: {
47632
+ [name: string]: unknown;
47633
+ };
47634
+ content?: never;
47635
+ };
47636
+ };
47637
+ };
46673
47638
  listSharingGroups: {
46674
47639
  parameters: {
46675
47640
  query?: never;