@tai42/studio-sdk 16.0.0 → 16.0.1

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 (317) hide show
  1. package/dist/components/explorer-body.d.ts +49 -0
  2. package/dist/components/explorer-body.d.ts.map +1 -0
  3. package/dist/components/explorer-body.js +67 -0
  4. package/dist/components/explorer-body.js.map +1 -0
  5. package/dist/components/explorer-page-size.d.ts +4 -0
  6. package/dist/components/explorer-page-size.d.ts.map +1 -0
  7. package/dist/components/explorer-page-size.js +36 -0
  8. package/dist/components/explorer-page-size.js.map +1 -0
  9. package/dist/components/explorer-tag-filter.d.ts +17 -0
  10. package/dist/components/explorer-tag-filter.d.ts.map +1 -0
  11. package/dist/components/explorer-tag-filter.js +29 -0
  12. package/dist/components/explorer-tag-filter.js.map +1 -0
  13. package/dist/components/explorer-tags.d.ts +22 -0
  14. package/dist/components/explorer-tags.d.ts.map +1 -0
  15. package/dist/components/explorer-tags.js +51 -0
  16. package/dist/components/explorer-tags.js.map +1 -0
  17. package/dist/components/explorer-view.d.ts +3 -17
  18. package/dist/components/explorer-view.d.ts.map +1 -1
  19. package/dist/components/explorer-view.js +53 -170
  20. package/dist/components/explorer-view.js.map +1 -1
  21. package/dist/components/extension-combo-builder.d.ts +0 -5
  22. package/dist/components/extension-combo-builder.d.ts.map +1 -1
  23. package/dist/components/extension-combo-builder.js +4 -42
  24. package/dist/components/extension-combo-builder.js.map +1 -1
  25. package/dist/components/extension-combo-parts.d.ts +44 -0
  26. package/dist/components/extension-combo-parts.d.ts.map +1 -0
  27. package/dist/components/extension-combo-parts.js +57 -0
  28. package/dist/components/extension-combo-parts.js.map +1 -0
  29. package/dist/components/fleet-report.d.ts.map +1 -1
  30. package/dist/components/fleet-report.js +51 -37
  31. package/dist/components/fleet-report.js.map +1 -1
  32. package/dist/components/icons/chrome-marks.d.ts +50 -0
  33. package/dist/components/icons/chrome-marks.d.ts.map +1 -0
  34. package/dist/components/icons/chrome-marks.js +51 -0
  35. package/dist/components/icons/chrome-marks.js.map +1 -0
  36. package/dist/components/icons/icon-frame.d.ts +29 -0
  37. package/dist/components/icons/icon-frame.d.ts.map +1 -0
  38. package/dist/components/icons/icon-frame.js +19 -0
  39. package/dist/components/icons/icon-frame.js.map +1 -0
  40. package/dist/components/icons/index.d.ts +40 -0
  41. package/dist/components/icons/index.d.ts.map +1 -0
  42. package/dist/components/icons/index.js +6 -0
  43. package/dist/components/icons/index.js.map +1 -0
  44. package/dist/components/icons/nav-map.d.ts +14 -0
  45. package/dist/components/icons/nav-map.d.ts.map +1 -0
  46. package/dist/components/icons/nav-map.js +28 -0
  47. package/dist/components/icons/nav-map.js.map +1 -0
  48. package/dist/components/icons/nav-marks.d.ts +44 -0
  49. package/dist/components/icons/nav-marks.d.ts.map +1 -0
  50. package/dist/components/icons/nav-marks.js +45 -0
  51. package/dist/components/icons/nav-marks.js.map +1 -0
  52. package/dist/components/icons/status-marks.d.ts +21 -0
  53. package/dist/components/icons/status-marks.d.ts.map +1 -0
  54. package/dist/components/icons/status-marks.js +22 -0
  55. package/dist/components/icons/status-marks.js.map +1 -0
  56. package/dist/components/icons/theme-marks.d.ts +9 -0
  57. package/dist/components/icons/theme-marks.d.ts.map +1 -0
  58. package/dist/components/icons/theme-marks.js +10 -0
  59. package/dist/components/icons/theme-marks.js.map +1 -0
  60. package/dist/components/json-diff.d.ts.map +1 -1
  61. package/dist/components/json-diff.js +1 -3
  62. package/dist/components/json-diff.js.map +1 -1
  63. package/dist/components/json-tree-context.d.ts +13 -0
  64. package/dist/components/json-tree-context.d.ts.map +1 -0
  65. package/dist/components/json-tree-context.js +15 -0
  66. package/dist/components/json-tree-context.js.map +1 -0
  67. package/dist/components/json-tree-model.d.ts +56 -0
  68. package/dist/components/json-tree-model.d.ts.map +1 -0
  69. package/dist/components/json-tree-model.js +125 -0
  70. package/dist/components/json-tree-model.js.map +1 -0
  71. package/dist/components/json-tree-nodes.d.ts +30 -0
  72. package/dist/components/json-tree-nodes.d.ts.map +1 -0
  73. package/dist/components/json-tree-nodes.js +118 -0
  74. package/dist/components/json-tree-nodes.js.map +1 -0
  75. package/dist/components/json-tree.d.ts.map +1 -1
  76. package/dist/components/json-tree.js +7 -295
  77. package/dist/components/json-tree.js.map +1 -1
  78. package/dist/components/json-value-format.d.ts +20 -0
  79. package/dist/components/json-value-format.d.ts.map +1 -0
  80. package/dist/components/json-value-format.js +63 -0
  81. package/dist/components/json-value-format.js.map +1 -0
  82. package/dist/components/markdown-blocks.d.ts +38 -0
  83. package/dist/components/markdown-blocks.d.ts.map +1 -0
  84. package/dist/components/markdown-blocks.js +168 -0
  85. package/dist/components/markdown-blocks.js.map +1 -0
  86. package/dist/components/markdown-inline.d.ts +24 -0
  87. package/dist/components/markdown-inline.d.ts.map +1 -0
  88. package/dist/components/markdown-inline.js +257 -0
  89. package/dist/components/markdown-inline.js.map +1 -0
  90. package/dist/components/markdown.d.ts +3 -52
  91. package/dist/components/markdown.d.ts.map +1 -1
  92. package/dist/components/markdown.js +4 -376
  93. package/dist/components/markdown.js.map +1 -1
  94. package/dist/components/observer-registry.d.ts +38 -0
  95. package/dist/components/observer-registry.d.ts.map +1 -0
  96. package/dist/components/observer-registry.js +131 -0
  97. package/dist/components/observer-registry.js.map +1 -0
  98. package/dist/components/overflow-measure.d.ts +38 -0
  99. package/dist/components/overflow-measure.d.ts.map +1 -0
  100. package/dist/components/overflow-measure.js +54 -0
  101. package/dist/components/overflow-measure.js.map +1 -0
  102. package/dist/components/prose-regions.d.ts +81 -0
  103. package/dist/components/prose-regions.d.ts.map +1 -0
  104. package/dist/components/prose-regions.js +128 -0
  105. package/dist/components/prose-regions.js.map +1 -0
  106. package/dist/components/scroll-region.d.ts.map +1 -1
  107. package/dist/components/scroll-region.js +3 -298
  108. package/dist/components/scroll-region.js.map +1 -1
  109. package/dist/components/tab-stop-parse.d.ts +53 -0
  110. package/dist/components/tab-stop-parse.d.ts.map +1 -0
  111. package/dist/components/tab-stop-parse.js +202 -0
  112. package/dist/components/tab-stop-parse.js.map +1 -0
  113. package/dist/components/templated-text-field.d.ts.map +1 -1
  114. package/dist/components/templated-text-field.js +10 -148
  115. package/dist/components/templated-text-field.js.map +1 -1
  116. package/dist/components/templated-text-kwargs-editor.d.ts +24 -0
  117. package/dist/components/templated-text-kwargs-editor.d.ts.map +1 -0
  118. package/dist/components/templated-text-kwargs-editor.js +48 -0
  119. package/dist/components/templated-text-kwargs-editor.js.map +1 -0
  120. package/dist/components/templated-text-kwargs.d.ts +37 -0
  121. package/dist/components/templated-text-kwargs.d.ts.map +1 -0
  122. package/dist/components/templated-text-kwargs.js +66 -0
  123. package/dist/components/templated-text-kwargs.js.map +1 -0
  124. package/dist/components/templated-text-source.d.ts +33 -0
  125. package/dist/components/templated-text-source.d.ts.map +1 -0
  126. package/dist/components/templated-text-source.js +53 -0
  127. package/dist/components/templated-text-source.js.map +1 -0
  128. package/dist/components/tool-picker-parts.d.ts +39 -0
  129. package/dist/components/tool-picker-parts.d.ts.map +1 -0
  130. package/dist/components/tool-picker-parts.js +87 -0
  131. package/dist/components/tool-picker-parts.js.map +1 -0
  132. package/dist/components/tool-picker.d.ts +1 -2
  133. package/dist/components/tool-picker.d.ts.map +1 -1
  134. package/dist/components/tool-picker.js +4 -66
  135. package/dist/components/tool-picker.js.map +1 -1
  136. package/dist/components/version-history-panel.d.ts.map +1 -1
  137. package/dist/components/version-history-panel.js +7 -34
  138. package/dist/components/version-history-panel.js.map +1 -1
  139. package/dist/components/version-history-rows.d.ts +48 -0
  140. package/dist/components/version-history-rows.d.ts.map +1 -0
  141. package/dist/components/version-history-rows.js +51 -0
  142. package/dist/components/version-history-rows.js.map +1 -0
  143. package/dist/guards.d.ts +6 -0
  144. package/dist/guards.d.ts.map +1 -0
  145. package/dist/guards.js +8 -0
  146. package/dist/guards.js.map +1 -0
  147. package/dist/hooks/interactions-connection.d.ts +43 -0
  148. package/dist/hooks/interactions-connection.d.ts.map +1 -0
  149. package/dist/hooks/interactions-connection.js +171 -0
  150. package/dist/hooks/interactions-connection.js.map +1 -0
  151. package/dist/hooks/interactions-stream.d.ts +80 -0
  152. package/dist/hooks/interactions-stream.d.ts.map +1 -0
  153. package/dist/hooks/interactions-stream.js +233 -0
  154. package/dist/hooks/interactions-stream.js.map +1 -0
  155. package/dist/hooks/useApi.d.ts +2192 -2192
  156. package/dist/hooks/useApi.d.ts.map +1 -1
  157. package/dist/hooks/useSse.d.ts +3 -6
  158. package/dist/hooks/useSse.d.ts.map +1 -1
  159. package/dist/hooks/useSse.js +38 -451
  160. package/dist/hooks/useSse.js.map +1 -1
  161. package/dist/navigation/app-link.d.ts +25 -0
  162. package/dist/navigation/app-link.d.ts.map +1 -0
  163. package/dist/navigation/app-link.js +33 -0
  164. package/dist/navigation/app-link.js.map +1 -0
  165. package/dist/navigation/context.d.ts +3 -20
  166. package/dist/navigation/context.d.ts.map +1 -1
  167. package/dist/navigation/context.js +7 -267
  168. package/dist/navigation/context.js.map +1 -1
  169. package/dist/navigation/entry-state.d.ts +23 -0
  170. package/dist/navigation/entry-state.d.ts.map +1 -0
  171. package/dist/navigation/entry-state.js +39 -0
  172. package/dist/navigation/entry-state.js.map +1 -0
  173. package/dist/navigation/guard-registry.d.ts +30 -0
  174. package/dist/navigation/guard-registry.d.ts.map +1 -0
  175. package/dist/navigation/guard-registry.js +46 -0
  176. package/dist/navigation/guard-registry.js.map +1 -0
  177. package/dist/navigation/guarded-navigation.d.ts +24 -0
  178. package/dist/navigation/guarded-navigation.d.ts.map +1 -0
  179. package/dist/navigation/guarded-navigation.js +102 -0
  180. package/dist/navigation/guarded-navigation.js.map +1 -0
  181. package/dist/navigation/index.d.ts +3 -2
  182. package/dist/navigation/index.d.ts.map +1 -1
  183. package/dist/navigation/index.js +2 -1
  184. package/dist/navigation/index.js.map +1 -1
  185. package/dist/navigation/types.d.ts +8 -11
  186. package/dist/navigation/types.d.ts.map +1 -1
  187. package/dist/navigation/use-back-forward-guard.d.ts +5 -0
  188. package/dist/navigation/use-back-forward-guard.d.ts.map +1 -0
  189. package/dist/navigation/use-back-forward-guard.js +82 -0
  190. package/dist/navigation/use-back-forward-guard.js.map +1 -0
  191. package/dist/plugin/registry.d.ts +6 -15
  192. package/dist/plugin/registry.d.ts.map +1 -1
  193. package/dist/plugin/registry.js +83 -75
  194. package/dist/plugin/registry.js.map +1 -1
  195. package/dist/schema-form/SecretRefField.d.ts +2 -3
  196. package/dist/schema-form/SecretRefField.d.ts.map +1 -1
  197. package/dist/schema-form/SecretRefField.js +23 -12
  198. package/dist/schema-form/SecretRefField.js.map +1 -1
  199. package/dist/schema-form/classify.d.ts +1 -122
  200. package/dist/schema-form/classify.d.ts.map +1 -1
  201. package/dist/schema-form/classify.js +174 -237
  202. package/dist/schema-form/classify.js.map +1 -1
  203. package/dist/schema-form/default-value.d.ts.map +1 -1
  204. package/dist/schema-form/default-value.js +42 -19
  205. package/dist/schema-form/default-value.js.map +1 -1
  206. package/dist/schema-form/enum-field.d.ts +1 -1
  207. package/dist/schema-form/enum-field.d.ts.map +1 -1
  208. package/dist/schema-form/field-model.d.ts +121 -0
  209. package/dist/schema-form/field-model.d.ts.map +1 -0
  210. package/dist/schema-form/field-model.js +2 -0
  211. package/dist/schema-form/field-model.js.map +1 -0
  212. package/dist/schema-form/field-node.d.ts.map +1 -1
  213. package/dist/schema-form/field-node.js +25 -14
  214. package/dist/schema-form/field-node.js.map +1 -1
  215. package/dist/schema-form/media-field.d.ts +1 -1
  216. package/dist/schema-form/media-field.d.ts.map +1 -1
  217. package/dist/schema-form/media-field.js +47 -28
  218. package/dist/schema-form/media-field.js.map +1 -1
  219. package/dist/schema-form/string-annotations.d.ts +20 -0
  220. package/dist/schema-form/string-annotations.d.ts.map +1 -0
  221. package/dist/schema-form/string-annotations.js +105 -0
  222. package/dist/schema-form/string-annotations.js.map +1 -0
  223. package/dist/schema-form/string-field.d.ts +1 -1
  224. package/dist/schema-form/string-field.d.ts.map +1 -1
  225. package/dist/schema-form/union-field.d.ts +1 -1
  226. package/dist/schema-form/union-field.d.ts.map +1 -1
  227. package/dist/schema-form/union-field.js.map +1 -1
  228. package/dist/schema-form/union.d.ts +1 -1
  229. package/dist/schema-form/union.d.ts.map +1 -1
  230. package/dist/schema-form/validate.d.ts.map +1 -1
  231. package/dist/schema-form/validate.js +126 -105
  232. package/dist/schema-form/validate.js.map +1 -1
  233. package/dist/state-binding/AdapterMapping.d.ts.map +1 -1
  234. package/dist/state-binding/AdapterMapping.js +0 -0
  235. package/dist/state-binding/AdapterMapping.js.map +1 -1
  236. package/dist/state-binding/StateAttachRow.d.ts.map +1 -1
  237. package/dist/state-binding/StateAttachRow.js +52 -36
  238. package/dist/state-binding/StateAttachRow.js.map +1 -1
  239. package/dist/state-binding/adapter-mapping-row.d.ts +17 -0
  240. package/dist/state-binding/adapter-mapping-row.d.ts.map +1 -0
  241. package/dist/state-binding/adapter-mapping-row.js +87 -0
  242. package/dist/state-binding/adapter-mapping-row.js.map +1 -0
  243. package/dist/structured-output/StructuredOutput.d.ts.map +1 -1
  244. package/dist/structured-output/StructuredOutput.js +1 -3
  245. package/dist/structured-output/StructuredOutput.js.map +1 -1
  246. package/package.json +2 -2
  247. package/src/components/explorer-body.tsx +239 -0
  248. package/src/components/explorer-page-size.ts +39 -0
  249. package/src/components/explorer-tag-filter.tsx +80 -0
  250. package/src/components/explorer-tags.ts +64 -0
  251. package/src/components/explorer-view.tsx +114 -366
  252. package/src/components/extension-combo-builder.tsx +35 -152
  253. package/src/components/extension-combo-parts.tsx +237 -0
  254. package/src/components/fleet-report.tsx +97 -54
  255. package/src/components/icons/chrome-marks.tsx +195 -0
  256. package/src/components/icons/icon-frame.tsx +50 -0
  257. package/src/components/icons/index.ts +84 -0
  258. package/src/components/icons/nav-map.ts +55 -0
  259. package/src/components/icons/nav-marks.tsx +205 -0
  260. package/src/components/icons/status-marks.tsx +46 -0
  261. package/src/components/icons/theme-marks.tsx +33 -0
  262. package/src/components/json-diff.tsx +1 -4
  263. package/src/components/json-tree-context.ts +26 -0
  264. package/src/components/json-tree-model.ts +139 -0
  265. package/src/components/json-tree-nodes.tsx +224 -0
  266. package/src/components/json-tree.tsx +15 -434
  267. package/src/components/json-value-format.ts +64 -0
  268. package/src/components/markdown-blocks.ts +198 -0
  269. package/src/components/markdown-inline.tsx +365 -0
  270. package/src/components/markdown.tsx +5 -471
  271. package/src/components/observer-registry.ts +139 -0
  272. package/src/components/overflow-measure.ts +69 -0
  273. package/src/components/prose-regions.ts +153 -0
  274. package/src/components/scroll-region.tsx +20 -360
  275. package/src/components/tab-stop-parse.ts +217 -0
  276. package/src/components/templated-text-field.tsx +38 -330
  277. package/src/components/templated-text-kwargs-editor.tsx +147 -0
  278. package/src/components/templated-text-kwargs.ts +92 -0
  279. package/src/components/templated-text-source.tsx +226 -0
  280. package/src/components/tool-picker-parts.tsx +184 -0
  281. package/src/components/tool-picker.tsx +22 -114
  282. package/src/components/version-history-panel.tsx +38 -142
  283. package/src/components/version-history-rows.tsx +220 -0
  284. package/src/guards.ts +7 -0
  285. package/src/hooks/interactions-connection.ts +227 -0
  286. package/src/hooks/interactions-stream.ts +274 -0
  287. package/src/hooks/useSse.ts +50 -477
  288. package/src/navigation/app-link.tsx +70 -0
  289. package/src/navigation/context.tsx +11 -330
  290. package/src/navigation/entry-state.ts +42 -0
  291. package/src/navigation/guard-registry.ts +65 -0
  292. package/src/navigation/guarded-navigation.ts +147 -0
  293. package/src/navigation/index.ts +2 -2
  294. package/src/navigation/types.ts +8 -11
  295. package/src/navigation/use-back-forward-guard.ts +90 -0
  296. package/src/plugin/registry.ts +111 -90
  297. package/src/schema-form/SecretRefField.tsx +121 -71
  298. package/src/schema-form/classify.ts +244 -395
  299. package/src/schema-form/default-value.ts +48 -17
  300. package/src/schema-form/enum-field.tsx +1 -1
  301. package/src/schema-form/field-model.ts +133 -0
  302. package/src/schema-form/field-node.tsx +94 -38
  303. package/src/schema-form/media-field.tsx +134 -65
  304. package/src/schema-form/string-annotations.ts +111 -0
  305. package/src/schema-form/string-field.tsx +1 -1
  306. package/src/schema-form/union-field.tsx +2 -1
  307. package/src/schema-form/union.ts +1 -1
  308. package/src/schema-form/validate.ts +184 -103
  309. package/src/state-binding/AdapterMapping.tsx +0 -0
  310. package/src/state-binding/StateAttachRow.tsx +222 -147
  311. package/src/state-binding/adapter-mapping-row.tsx +232 -0
  312. package/src/structured-output/StructuredOutput.tsx +1 -4
  313. package/dist/components/icons.d.ts +0 -160
  314. package/dist/components/icons.d.ts.map +0 -1
  315. package/dist/components/icons.js +0 -160
  316. package/dist/components/icons.js.map +0 -1
  317. package/src/components/icons.tsx +0 -586
@@ -1,1034 +1,1269 @@
1
1
  import type { ApiClient } from '@tai42/api-client';
2
2
  export declare const ApiProvider: import("react").Provider<{
3
- readonly baseUrl: string;
4
- readonly listTools: (signal?: AbortSignal) => Promise<string[]>;
5
- readonly getToolSchema: (name: string, signal?: AbortSignal) => Promise<{
6
- input: Record<string, unknown>;
7
- output: Record<string, unknown> | null;
8
- description: string | null;
9
- }>;
10
- readonly getAllToolSchemas: (signal?: AbortSignal) => Promise<Record<string, {
11
- input: Record<string, unknown>;
12
- output: Record<string, unknown> | null;
13
- description: string | null;
14
- }>>;
15
- readonly runTool: (args: import("@tai42/api-client").RunToolArgs, signal?: AbortSignal) => Promise<unknown>;
16
- readonly reloadTool: (args: import("@tai42/api-client").ToolAdminArgs) => Promise<{
17
- op: string;
18
- reachable: boolean;
19
- local_only: boolean;
20
- results: {
21
- name: string;
22
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
23
- payload: unknown;
24
- error: string | null;
25
- detail: string | null;
26
- }[];
27
- error: string | null;
28
- }>;
29
- readonly removeTool: (args: import("@tai42/api-client").ToolAdminArgs) => Promise<{
30
- op: string;
31
- reachable: boolean;
32
- local_only: boolean;
33
- results: {
3
+ readonly streamInteractions: (signal?: AbortSignal, lastEventId?: string) => Promise<AsyncGenerator<import("@tai42/api-client").SseFrame, any, any>>;
4
+ readonly getHealth: (signal?: AbortSignal) => Promise<string>;
5
+ readonly getSystemKinds: (signal?: AbortSignal) => Promise<{
6
+ kind: string;
7
+ state: "default" | "active" | "off";
8
+ plugin: string | null;
9
+ detail: string;
10
+ }[]>;
11
+ readonly searchMarketplace: (query?: import("@tai42/api-client").MarketplaceSearchQuery, signal?: AbortSignal) => Promise<{
12
+ listings: {
13
+ ref: string;
14
+ namespace: string;
34
15
  name: string;
35
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
36
- payload: unknown;
37
- error: string | null;
38
- detail: string | null;
16
+ display_name: string | null;
17
+ icon_url: string | null;
18
+ package: string | null;
19
+ description: string;
20
+ categories: string[];
21
+ tags: string[];
22
+ trust_tier: string;
23
+ pricing: string;
24
+ latest_version: string | null;
25
+ downloads: number;
26
+ updated_at: string;
27
+ kinds: {
28
+ kind: string;
29
+ count: number;
30
+ names: string[];
31
+ }[];
32
+ groups: {
33
+ name: string;
34
+ count: number;
35
+ }[];
36
+ premium?: boolean | null | undefined;
39
37
  }[];
40
- error: string | null;
41
- }>;
42
- readonly submitToolRun: (args: import("@tai42/api-client").SubmitToolRunArgs, signal?: AbortSignal) => Promise<{
43
- run_id: string;
44
- }>;
45
- readonly getToolRun: (runId: string, signal?: AbortSignal) => Promise<{
46
- run_id: string;
47
- tool_name: string;
48
- status: "running" | "succeeded" | "failed" | "lost";
49
- started_at: string;
50
- finished_at?: string | undefined;
51
- result?: unknown;
52
- error?: string | undefined;
38
+ total: number;
39
+ page: number;
40
+ page_size: number;
53
41
  }>;
54
- readonly listToolRuns: (toolName: string, signal?: AbortSignal) => Promise<{
55
- run_id: string;
56
- tool_name: string;
57
- status: "running" | "succeeded" | "failed" | "lost";
58
- started_at: string;
59
- finished_at?: string | undefined;
60
- }[]>;
61
- readonly listToolTags: (signal?: AbortSignal) => Promise<{
62
- name: string;
63
- tags: string[];
64
- badges: string[];
65
- hidden: boolean;
66
- }[]>;
67
- readonly listPresets: (signal?: AbortSignal) => Promise<{
68
- name: string;
69
- base_tool: string;
70
- description: string;
71
- active_version: number;
72
- extensions: (string | {
73
- name: string;
74
- config: Record<string, unknown>;
75
- })[][];
76
- output_schema: Record<string, unknown> | null;
77
- input_schema: Record<string, unknown> | null;
78
- conflicted: boolean;
79
- conflicted_reason: string | null;
80
- uses: string[];
81
- used_by: string[];
82
- }[]>;
83
- readonly createPreset: (body: import("@tai42/api-client").CreatePresetBody) => Promise<{
42
+ readonly getMarketplacePlugin: (namespace: string, name: string, signal?: AbortSignal) => Promise<{
43
+ namespace: string;
84
44
  name: string;
85
- base_tool: string;
45
+ display_name: string | null;
46
+ icon_url: string | null;
47
+ package: string | null;
86
48
  description: string;
87
- active_version: number;
88
- extensions: (string | {
49
+ readme_md: string | null;
50
+ license: string | null;
51
+ homepage_url: string | null;
52
+ repository_url: string | null;
53
+ categories: string[];
54
+ tags: string[];
55
+ trust_tier: string;
56
+ pricing: string;
57
+ downloads: number;
58
+ latest: {
59
+ version: string;
60
+ contract_range: string | null;
61
+ status: string;
62
+ published_at: string | null;
63
+ items: {
64
+ kind: string;
65
+ name: string;
66
+ description: string;
67
+ tags: string[];
68
+ group: string | null;
69
+ routes?: {
70
+ base: string;
71
+ paths: {
72
+ path: string;
73
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
74
+ public: boolean;
75
+ }[];
76
+ } | null | undefined;
77
+ required_env?: {
78
+ name: string;
79
+ secret: boolean;
80
+ }[] | undefined;
81
+ }[];
82
+ } | null;
83
+ versions: {
84
+ version: string;
85
+ contract_range: string | null;
86
+ status: string;
87
+ published_at: string | null;
88
+ }[];
89
+ source?: "pypi" | "github" | "spec" | null | undefined;
90
+ docs_url?: string | null | undefined;
91
+ premium?: boolean | null | undefined;
92
+ }>;
93
+ readonly listMarketplaceCategories: (signal?: AbortSignal) => Promise<string[]>;
94
+ readonly listMarketplaceKinds: (signal?: AbortSignal) => Promise<string[]>;
95
+ readonly listInstalledMarketplacePlugins: (signal?: AbortSignal) => Promise<{
96
+ installed: {
97
+ ref: string;
98
+ version: string;
99
+ source: string;
100
+ delivery: "package" | "descriptor";
101
+ installed_at: string;
102
+ latest: string | null;
103
+ update_available: boolean;
104
+ incompatible_newer: string | null;
105
+ missing_upstream: boolean;
106
+ compat: {
107
+ status: "unknown" | "compatible" | "incompatible";
108
+ reason: string | null;
109
+ };
110
+ items: {
111
+ name: string;
112
+ kind: string;
113
+ }[];
114
+ route_mounts: Record<string, string>;
115
+ }[];
116
+ quarantined: {
89
117
  name: string;
90
- config: Record<string, unknown>;
91
- })[][];
92
- output_schema: Record<string, unknown> | null;
93
- input_schema: Record<string, unknown> | null;
94
- conflicted: boolean;
95
- conflicted_reason: string | null;
96
- uses: string[];
97
- used_by: string[];
118
+ reason: string;
119
+ }[];
98
120
  }>;
99
- readonly getPreset: (name: string, signal?: AbortSignal) => Promise<{
100
- name: string;
101
- base_tool: string;
102
- description: string;
103
- active_version: number;
104
- extensions: (string | {
121
+ readonly previewMarketplaceInstall: (body: import("@tai42/api-client").MarketplaceInstallPreviewBody, signal?: AbortSignal) => Promise<{
122
+ ref: string;
123
+ version: string;
124
+ items: {
125
+ item: string;
126
+ kind: string;
127
+ base: string;
128
+ default_base: string;
129
+ routes: {
130
+ path: string;
131
+ full_path: string;
132
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
133
+ public: boolean;
134
+ }[];
135
+ }[];
136
+ collisions: {
137
+ item: string;
138
+ full_path: string;
139
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
140
+ conflict_owner: string;
141
+ conflict_path: string;
142
+ }[];
143
+ public_routes: {
144
+ item: string;
145
+ full_path: string;
146
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
147
+ }[];
148
+ new_public_routes: {
149
+ item: string;
150
+ full_path: string;
151
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
152
+ }[];
153
+ requires_public_acceptance: boolean;
154
+ required_env: {
105
155
  name: string;
106
- config: Record<string, unknown>;
107
- })[][];
108
- output_schema: Record<string, unknown> | null;
109
- input_schema: Record<string, unknown> | null;
110
- conflicted: boolean;
111
- conflicted_reason: string | null;
112
- uses: string[];
113
- used_by: string[];
114
- fixed_kwargs: Record<string, unknown>;
156
+ secret: boolean;
157
+ }[];
158
+ missing_env: string[];
159
+ delivery: "package" | "descriptor";
115
160
  }>;
116
- readonly listPresetVersions: (name: string, signal?: AbortSignal) => Promise<{
117
- version: number;
118
- body: {
119
- base_tool: string;
120
- description: string;
121
- extensions: (string | Record<string, unknown>)[][];
122
- fixed_kwargs: Record<string, unknown>;
123
- input_schema: Record<string, unknown> | {
124
- content?: string | undefined;
125
- id?: string | undefined;
126
- kwargs?: Record<string, unknown> | undefined;
127
- } | null;
128
- output_schema: Record<string, unknown> | {
129
- content?: string | undefined;
130
- id?: string | undefined;
131
- kwargs?: Record<string, unknown> | undefined;
132
- } | null;
133
- state_binding: {
134
- states: {
135
- input_injections: {
136
- into: string;
137
- jq: {
138
- content?: string | undefined;
139
- id?: string | undefined;
140
- kwargs?: Record<string, unknown> | undefined;
141
- } | null;
142
- template_jq: string | null;
143
- }[];
144
- scope_expr: {
145
- content?: string | undefined;
146
- id?: string | undefined;
147
- kwargs?: Record<string, unknown> | undefined;
148
- } | null;
149
- state: string;
150
- subject_expr: {
151
- content?: string | undefined;
152
- id?: string | undefined;
153
- kwargs?: Record<string, unknown> | undefined;
154
- };
155
- templates: string[];
156
- updates: {
157
- adapter: {
158
- content?: string | undefined;
159
- id?: string | undefined;
160
- kwargs?: Record<string, unknown> | undefined;
161
- } | null;
162
- jq: {
163
- content?: string | undefined;
164
- id?: string | undefined;
165
- kwargs?: Record<string, unknown> | undefined;
166
- } | null;
167
- op_id: {
168
- content?: string | undefined;
169
- id?: string | undefined;
170
- kwargs?: Record<string, unknown> | undefined;
171
- } | null;
172
- template_jq: string | null;
173
- }[];
174
- }[];
175
- } | null;
161
+ readonly installMarketplacePlugin: (body: import("@tai42/api-client").MarketplaceInstallBody) => Promise<{
162
+ ref: string;
163
+ version: string;
164
+ notes: string[];
165
+ advisories: {
166
+ id: number;
167
+ listing: string;
168
+ affected_versions: string;
169
+ severity: string;
170
+ summary: string;
171
+ created_at: string;
172
+ withdrawn_at: string | null;
173
+ }[];
174
+ routes: {
175
+ item: string;
176
+ full_path: string;
177
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
178
+ public: boolean;
179
+ }[];
180
+ }>;
181
+ readonly uninstallMarketplacePlugin: (body: import("@tai42/api-client").MarketplaceUninstallBody) => Promise<{
182
+ ref: string;
183
+ uninstalled: true;
184
+ notes: string[];
185
+ }>;
186
+ readonly updateMarketplacePlugin: (body: import("@tai42/api-client").MarketplaceInstallBody) => Promise<{
187
+ ref: string;
188
+ version: string;
189
+ notes: string[];
190
+ advisories: {
191
+ id: number;
192
+ listing: string;
193
+ affected_versions: string;
194
+ severity: string;
195
+ summary: string;
196
+ created_at: string;
197
+ withdrawn_at: string | null;
198
+ }[];
199
+ routes: {
200
+ item: string;
201
+ full_path: string;
202
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
203
+ public: boolean;
204
+ }[];
205
+ }>;
206
+ readonly upgradeAllMarketplacePlugins: () => Promise<{
207
+ results: {
208
+ ref: string;
209
+ outcome: "failed" | "upgraded" | "up-to-date" | "no-compatible-version";
210
+ detail: string;
211
+ }[];
212
+ }>;
213
+ readonly getMarketplaceAdvisories: (signal?: AbortSignal) => Promise<{
214
+ advisories: {
215
+ id: number;
216
+ listing: string;
217
+ affected_versions: string;
218
+ severity: string;
219
+ summary: string;
220
+ created_at: string;
221
+ withdrawn_at: string | null;
222
+ }[];
223
+ fetched_at: string;
224
+ }>;
225
+ readonly getObservabilityMetrics: (params?: import("@tai42/api-client").MetricsQuery, signal?: AbortSignal) => Promise<{
226
+ summary: {
227
+ totalRuns: number;
228
+ totalCost: number;
229
+ totalTokens: number;
230
+ averageLatencyMs: number;
231
+ avgCostPerRun: number;
232
+ avgTokensPerRun: number;
233
+ timeToFirstTokenMs: number | null;
176
234
  };
235
+ timeSeries: {
236
+ bucket: string | null;
237
+ runs: number;
238
+ cost: number;
239
+ avgLatencyMs: number;
240
+ totalTokens: number;
241
+ }[];
242
+ byModel: {
243
+ model: string;
244
+ calls: number;
245
+ cost: number;
246
+ totalTokens: number;
247
+ avgLatencyMs: number;
248
+ }[];
249
+ granularity: "hour" | "day" | "week";
250
+ }>;
251
+ readonly listRuns: (params?: import("@tai42/api-client").RunsQuery, signal?: AbortSignal) => Promise<{
252
+ items: {
253
+ id: string;
254
+ traceId: string;
255
+ createdAt: string | null;
256
+ tags: string[];
257
+ status: "error" | "success";
258
+ cost: number | null;
259
+ latencyMs: number | null;
260
+ totalTokens: number | null;
261
+ inputPreview: unknown;
262
+ outputPreview: unknown;
263
+ }[];
264
+ page: number;
265
+ nextPage: number | null;
266
+ }>;
267
+ readonly getRunTrace: (traceId: string, signal?: AbortSignal) => Promise<{
268
+ traceId: string;
269
+ timestamp: string | null;
177
270
  tags: string[];
178
- created_at: string;
179
- is_current: boolean;
271
+ totalCost: number | null;
272
+ input: unknown;
273
+ output: unknown;
274
+ metadata: unknown;
275
+ spans: {
276
+ id: string;
277
+ parentId: string | null;
278
+ traceId: string | null;
279
+ name: string | null;
280
+ type: string | null;
281
+ level: string | null;
282
+ statusMessage: string | null;
283
+ start: string | null;
284
+ end: string | null;
285
+ model: string | null;
286
+ usage: unknown;
287
+ metadata: unknown;
288
+ input: unknown;
289
+ output: unknown;
290
+ nodeId: string | null;
291
+ }[];
292
+ }>;
293
+ readonly exportTrace: (traceId: string, signal?: AbortSignal) => Promise<Blob>;
294
+ readonly exportRuns: (params: import("@tai42/api-client").RunsQuery & {
295
+ format: "csv" | "json";
296
+ }, signal?: AbortSignal) => Promise<Blob>;
297
+ readonly listSchedules: (signal?: AbortSignal) => Promise<{
298
+ [x: string]: unknown;
299
+ name: string;
300
+ enabled?: boolean | undefined;
301
+ schedule?: unknown;
302
+ target?: unknown;
303
+ args?: unknown[] | undefined;
304
+ kwargs?: Record<string, unknown> | undefined;
180
305
  }[]>;
181
- readonly getPresetVersion: (name: string, version: number, signal?: AbortSignal) => Promise<{
182
- version: number;
183
- body: {
184
- base_tool: string;
185
- description: string;
186
- extensions: (string | Record<string, unknown>)[][];
187
- fixed_kwargs: Record<string, unknown>;
188
- input_schema: Record<string, unknown> | {
189
- content?: string | undefined;
190
- id?: string | undefined;
191
- kwargs?: Record<string, unknown> | undefined;
192
- } | null;
193
- output_schema: Record<string, unknown> | {
194
- content?: string | undefined;
195
- id?: string | undefined;
196
- kwargs?: Record<string, unknown> | undefined;
197
- } | null;
198
- state_binding: {
199
- states: {
200
- input_injections: {
201
- into: string;
202
- jq: {
203
- content?: string | undefined;
204
- id?: string | undefined;
205
- kwargs?: Record<string, unknown> | undefined;
206
- } | null;
207
- template_jq: string | null;
208
- }[];
209
- scope_expr: {
210
- content?: string | undefined;
211
- id?: string | undefined;
212
- kwargs?: Record<string, unknown> | undefined;
213
- } | null;
214
- state: string;
215
- subject_expr: {
216
- content?: string | undefined;
217
- id?: string | undefined;
218
- kwargs?: Record<string, unknown> | undefined;
219
- };
220
- templates: string[];
221
- updates: {
222
- adapter: {
223
- content?: string | undefined;
224
- id?: string | undefined;
225
- kwargs?: Record<string, unknown> | undefined;
226
- } | null;
227
- jq: {
228
- content?: string | undefined;
229
- id?: string | undefined;
230
- kwargs?: Record<string, unknown> | undefined;
231
- } | null;
232
- op_id: {
233
- content?: string | undefined;
234
- id?: string | undefined;
235
- kwargs?: Record<string, unknown> | undefined;
236
- } | null;
237
- template_jq: string | null;
238
- }[];
306
+ readonly getServerDateTime: (signal?: AbortSignal) => Promise<{
307
+ [x: string]: unknown;
308
+ utc: unknown;
309
+ local?: unknown;
310
+ system?: unknown;
311
+ }>;
312
+ readonly addSchedule: (body: {
313
+ tool_name: string;
314
+ tool_kwargs: Record<string, unknown>;
315
+ schedule_kwargs: Record<string, unknown>;
316
+ state_binding?: import("@tai42/api-client").StateBinding | null;
317
+ }) => Promise<unknown>;
318
+ readonly deleteSchedule: (name: string) => Promise<unknown>;
319
+ readonly listBackupSections: (signal?: AbortSignal) => Promise<{
320
+ name: string;
321
+ secret: boolean;
322
+ }[]>;
323
+ readonly exportBackup: (sections: string[], signal?: AbortSignal) => Promise<Blob>;
324
+ readonly importBackup: (body: {
325
+ document: unknown;
326
+ sections: string[];
327
+ }) => Promise<{
328
+ ok: boolean;
329
+ sections: Record<string, {
330
+ created: number;
331
+ updated: number;
332
+ skipped: number;
333
+ errors: string[];
334
+ new_api_keys?: {
335
+ user_id: string;
336
+ description: string;
337
+ api_key: string;
338
+ }[] | undefined;
339
+ fanout?: {
340
+ mode: "local-only";
341
+ note: string;
342
+ } | {
343
+ op: string;
344
+ reachable: boolean;
345
+ local_only: boolean;
346
+ results: {
347
+ name: string;
348
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
349
+ payload: unknown;
350
+ error: string | null;
351
+ detail: string | null;
239
352
  }[];
240
- } | null;
241
- };
242
- tags: string[];
243
- created_at: string;
244
- is_current: boolean;
353
+ error: string | null;
354
+ mode: "fleet";
355
+ } | {
356
+ op: string;
357
+ reachable: boolean;
358
+ local_only: boolean;
359
+ results: {
360
+ name: string;
361
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
362
+ payload: unknown;
363
+ error: string | null;
364
+ detail: string | null;
365
+ }[];
366
+ error: string | null;
367
+ mode: "unreachable";
368
+ } | undefined;
369
+ }>;
245
370
  }>;
246
- readonly savePresetVersion: (name: string, body: import("@tai42/api-client").SavePresetVersionBody) => Promise<{
371
+ readonly validateCondition: (body: import("@tai42/api-client").ValidateConditionBody) => Promise<{
372
+ ok: boolean;
373
+ result: boolean | null;
374
+ }>;
375
+ readonly listPolicyVersions: (userId: string, signal?: AbortSignal) => Promise<{
247
376
  version: number;
248
377
  body: {
249
- base_tool: string;
250
- description: string;
251
- extensions: (string | Record<string, unknown>)[][];
252
- fixed_kwargs: Record<string, unknown>;
253
- input_schema: Record<string, unknown> | {
254
- content?: string | undefined;
255
- id?: string | undefined;
256
- kwargs?: Record<string, unknown> | undefined;
257
- } | null;
258
- output_schema: Record<string, unknown> | {
378
+ condition: {
259
379
  content?: string | undefined;
260
380
  id?: string | undefined;
261
381
  kwargs?: Record<string, unknown> | undefined;
262
382
  } | null;
263
- state_binding: {
264
- states: {
265
- input_injections: {
266
- into: string;
267
- jq: {
268
- content?: string | undefined;
269
- id?: string | undefined;
270
- kwargs?: Record<string, unknown> | undefined;
271
- } | null;
272
- template_jq: string | null;
273
- }[];
274
- scope_expr: {
275
- content?: string | undefined;
276
- id?: string | undefined;
277
- kwargs?: Record<string, unknown> | undefined;
278
- } | null;
279
- state: string;
280
- subject_expr: {
281
- content?: string | undefined;
282
- id?: string | undefined;
283
- kwargs?: Record<string, unknown> | undefined;
284
- };
285
- templates: string[];
286
- updates: {
287
- adapter: {
288
- content?: string | undefined;
289
- id?: string | undefined;
290
- kwargs?: Record<string, unknown> | undefined;
291
- } | null;
292
- jq: {
293
- content?: string | undefined;
294
- id?: string | undefined;
295
- kwargs?: Record<string, unknown> | undefined;
296
- } | null;
297
- op_id: {
298
- content?: string | undefined;
299
- id?: string | undefined;
300
- kwargs?: Record<string, unknown> | undefined;
301
- } | null;
302
- template_jq: string | null;
303
- }[];
304
- }[];
305
- } | null;
383
+ policy_data: Record<string, unknown>;
384
+ scopes: string[];
306
385
  };
307
386
  tags: string[];
308
387
  created_at: string;
309
388
  is_current: boolean;
310
- }>;
311
- readonly rollbackPreset: (name: string, version: number) => Promise<{
312
- name: string;
389
+ }[]>;
390
+ readonly rollbackPolicy: (userId: string, version: number) => Promise<{
391
+ user_id: string;
313
392
  active_version: number;
314
393
  }>;
315
- readonly deletePreset: (name: string) => Promise<{
316
- name: string;
317
- deleted: true;
394
+ readonly logout: () => Promise<{
395
+ revoked: boolean;
318
396
  }>;
319
- readonly renamePreset: (name: string, newName: string) => Promise<{
320
- name: string;
321
- renamed_from: string;
322
- active_version: number;
397
+ readonly getAuthCapabilities: (signal?: AbortSignal) => Promise<{
398
+ mintable: boolean;
399
+ providers: {
400
+ name: string;
401
+ mintable: boolean;
402
+ }[];
323
403
  }>;
324
- readonly getPresetReferees: (name: string, signal?: AbortSignal) => Promise<{
325
- name: string;
326
- referees: string[];
404
+ readonly getLoginMethods: (options?: {
405
+ signal?: AbortSignal;
406
+ }) => Promise<{
407
+ methods: ({
408
+ shape: "form";
409
+ id: string;
410
+ title: string;
411
+ purpose: "login" | "bootstrap" | "invite";
412
+ fields: {
413
+ name: string;
414
+ label: string;
415
+ secret: boolean;
416
+ autocomplete?: string | undefined;
417
+ }[];
418
+ submit_path: string;
419
+ } | {
420
+ shape: "button";
421
+ id: string;
422
+ label: string;
423
+ href: string;
424
+ icon?: string | undefined;
425
+ })[];
426
+ bootstrap: boolean;
327
427
  }>;
328
- readonly validatePreset: (body: import("@tai42/api-client").ValidatePresetBody) => Promise<{
329
- valid: boolean;
330
- error: string | null;
428
+ readonly submitLoginForm: (path: string, values: Record<string, string>) => Promise<{
429
+ token: string;
430
+ user_id: string;
331
431
  }>;
332
- readonly setPresetVersionTags: (name: string, version: number, tags: readonly string[]) => Promise<{
333
- name: string;
334
- version: number;
432
+ readonly exchangeSsoCode: (code: string) => Promise<{
433
+ token: string;
434
+ user_id: string;
435
+ }>;
436
+ readonly claimLogin: (body: {
437
+ token: string;
438
+ }) => Promise<{
439
+ token: string;
440
+ user_id: string;
441
+ }>;
442
+ readonly getMe: (signal?: AbortSignal) => Promise<{
443
+ user_id: string;
444
+ owner_user_id: string | null;
445
+ admin: boolean;
446
+ scopes: string[];
447
+ routes: {
448
+ path: string;
449
+ methods: string[];
450
+ }[];
451
+ route_patterns: {
452
+ pattern: string;
453
+ scope_id: string;
454
+ }[];
455
+ sub_mcp: {
456
+ tools: string[];
457
+ transport: string;
458
+ slug: string;
459
+ }[];
460
+ tools: string[];
461
+ agents: string[];
462
+ mintable: boolean;
463
+ }>;
464
+ readonly listScopes: (signal?: AbortSignal) => Promise<Record<string, string>>;
465
+ readonly addUrlToScope: (body: import("@tai42/api-client").AddUrlToScopeBody) => Promise<{
466
+ scope_id: string;
467
+ url: string;
468
+ }>;
469
+ readonly removeUrlFromScope: (body: {
470
+ url: string;
471
+ }) => Promise<{
472
+ url: string;
473
+ }>;
474
+ readonly removeScope: (scopeId: string) => Promise<{
475
+ scope_id: string;
476
+ deleted_keys: number;
477
+ }>;
478
+ readonly listAuthRoutes: (signal?: AbortSignal) => Promise<{
479
+ path: string;
480
+ methods: string[];
481
+ mapped: string | null;
335
482
  tags: string[];
483
+ summary: string;
484
+ action: "read" | "write" | "secret" | "fenced" | null;
485
+ }[]>;
486
+ readonly listPublicRoutes: (signal?: AbortSignal) => Promise<string[]>;
487
+ readonly pinRoutePublic: (body: import("@tai42/api-client").PinRoutePublicBody) => Promise<{
488
+ url: string;
336
489
  }>;
337
- readonly listStates: (signal?: AbortSignal) => Promise<{
338
- default_subject_kind: string;
339
- description: string;
340
- effective_schema: Record<string, unknown> | null;
341
- name: string;
342
- regimes: Record<string, unknown>[] | null;
343
- retention_days: number | null;
344
- subject_kinds: string[];
345
- updated_at: string | null;
346
- schema?: Record<string, unknown> | {
490
+ readonly unpinPublicRoute: (url: string) => Promise<{
491
+ url: string;
492
+ }>;
493
+ readonly listRoles: (signal?: AbortSignal) => Promise<{
494
+ allow_all: boolean;
495
+ base_tier: string | null;
496
+ condition: {
347
497
  content?: string | undefined;
348
498
  id?: string | undefined;
349
499
  kwargs?: Record<string, unknown> | undefined;
350
- } | undefined;
351
- }[]>;
352
- readonly getState: (name: string, signal?: AbortSignal) => Promise<{
353
- default_subject_kind: string;
500
+ } | null;
354
501
  description: string;
355
- effective_schema: Record<string, unknown> | null;
502
+ grants: Record<string, "none" | "read" | "write">;
356
503
  name: string;
357
- regimes: Record<string, unknown>[] | null;
358
- retention_days: number | null;
359
- subject_kinds: string[];
360
- updated_at: string | null;
361
- attachments: {
362
- template: string;
363
- path: string[];
364
- parameters: Record<string, unknown>;
365
- declarations: Record<string, unknown>;
366
- }[];
367
- schema?: Record<string, unknown> | {
504
+ scopes: string[];
505
+ }[]>;
506
+ readonly createRole: (body: import("@tai42/api-client").RoleCreateBody) => Promise<{
507
+ allow_all: boolean;
508
+ base_tier: string | null;
509
+ condition: {
368
510
  content?: string | undefined;
369
511
  id?: string | undefined;
370
512
  kwargs?: Record<string, unknown> | undefined;
371
- } | undefined;
372
- }>;
373
- readonly putState: (name: string, body: import("@tai42/api-client").StateDeclarationBody) => Promise<{
374
- default_subject_kind: string;
513
+ } | null;
375
514
  description: string;
376
- effective_schema: Record<string, unknown> | null;
515
+ grants: Record<string, "none" | "read" | "write">;
377
516
  name: string;
378
- regimes: Record<string, unknown>[] | null;
379
- retention_days: number | null;
380
- subject_kinds: string[];
381
- updated_at: string | null;
382
- attachments: {
383
- template: string;
384
- path: string[];
385
- parameters: Record<string, unknown>;
386
- declarations: Record<string, unknown>;
387
- }[];
388
- schema?: Record<string, unknown> | {
517
+ scopes: string[];
518
+ }>;
519
+ readonly updateRole: (name: string, body: import("@tai42/api-client").RoleUpdateBody) => Promise<{
520
+ allow_all: boolean;
521
+ base_tier: string | null;
522
+ condition: {
389
523
  content?: string | undefined;
390
524
  id?: string | undefined;
391
525
  kwargs?: Record<string, unknown> | undefined;
392
- } | undefined;
393
- }>;
394
- readonly deleteState: (name: string) => Promise<{
526
+ } | null;
527
+ description: string;
528
+ grants: Record<string, "none" | "read" | "write">;
395
529
  name: string;
396
- deleted: true;
397
- }>;
398
- readonly getStateStats: (name: string, signal?: AbortSignal) => Promise<{
399
- records: number;
400
- per_field: Record<string, number>;
401
- per_kind: Record<string, number>;
402
- consumers: number;
403
- }>;
404
- readonly listStateAttachments: (name: string, signal?: AbortSignal) => Promise<{
405
- template: string;
406
- path: string[];
407
- parameters: Record<string, unknown>;
408
- declarations: Record<string, unknown>;
409
- }[]>;
410
- readonly getStateAttachment: (name: string, template: string, signal?: AbortSignal) => Promise<{
411
- template: string;
412
- path: string[];
413
- parameters: Record<string, unknown>;
414
- declarations: Record<string, unknown>;
415
- }>;
416
- readonly attachStateTemplate: (name: string, template: string, body: import("@tai42/api-client").StateAttachmentBody) => Promise<{
417
- attached: true;
418
- state: string;
419
- template: string;
420
- }>;
421
- readonly patchStateAttachment: (name: string, template: string, body: import("@tai42/api-client").StateAttachmentBody) => Promise<{
422
- updated: true;
423
- state: string;
424
- template: string;
530
+ scopes: string[];
425
531
  }>;
426
- readonly detachStateTemplate: (name: string, template: string) => Promise<{
427
- detached: true;
428
- state: string;
429
- template: string;
532
+ readonly deleteRole: (name: string) => Promise<{
533
+ name: string;
534
+ deleted: boolean;
430
535
  }>;
431
- readonly listStateSubjects: (name: string, params: {
432
- kind?: string;
433
- } & import("@tai42/api-client").StatePageQuery, signal?: AbortSignal) => Promise<{
434
- subjects: {
435
- subject: {
436
- target_kind: "tool" | "agent";
437
- target_name: string;
438
- kind: string;
439
- key: string;
536
+ readonly listRoleVersions: (name: string, signal?: AbortSignal) => Promise<{
537
+ versions: {
538
+ version: number;
539
+ body: {
540
+ allow_all: boolean;
541
+ base_tier: string | null;
542
+ condition: {
543
+ content?: string | undefined;
544
+ id?: string | undefined;
545
+ kwargs?: Record<string, unknown> | undefined;
546
+ } | null;
547
+ description: string;
548
+ grants: Record<string, "none" | "read" | "write">;
549
+ name: string;
550
+ scopes: string[];
440
551
  };
441
- updated_at: number;
552
+ tags: string[];
553
+ created_at: string;
554
+ is_current: boolean;
442
555
  }[];
443
- next_cursor: string | null;
444
- }>;
445
- readonly searchStateRecords: (name: string, body: {
446
- filters: Record<string, unknown>;
447
- } & import("@tai42/api-client").StatePageQuery, signal?: AbortSignal) => Promise<{
448
- matches: {
449
- subject: {
450
- target_kind: "tool" | "agent";
451
- target_name: string;
452
- kind: string;
453
- key: string;
556
+ audit: {
557
+ version: number;
558
+ body: {
559
+ action: string;
560
+ actor: string | null;
561
+ before: unknown;
562
+ after: unknown;
454
563
  };
455
- updated_at: number;
456
- }[];
457
- next_cursor: string | null;
458
- }>;
459
- readonly getStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, signal?: AbortSignal) => Promise<{
460
- state: string;
461
- subject: {
462
- target_kind: "tool" | "agent";
463
- target_name: string;
464
- kind: string;
465
- key: string;
466
- };
467
- data: Record<string, unknown>;
468
- seq: number;
469
- canonical_subject: {
470
- target_kind: "tool" | "agent";
471
- target_name: string;
472
- kind: string;
473
- key: string;
474
- };
475
- folded_from: {
476
- target_kind: "tool" | "agent";
477
- target_name: string;
478
- kind: string;
479
- key: string;
480
- }[];
481
- } | null>;
482
- readonly putStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, data: Record<string, unknown>) => Promise<{
483
- state: string;
484
- subject: {
485
- target_kind: "tool" | "agent";
486
- target_name: string;
487
- kind: string;
488
- key: string;
489
- };
490
- data: Record<string, unknown>;
491
- seq: number;
492
- canonical_subject: {
493
- target_kind: "tool" | "agent";
494
- target_name: string;
495
- kind: string;
496
- key: string;
497
- };
498
- folded_from: {
499
- target_kind: "tool" | "agent";
500
- target_name: string;
501
- kind: string;
502
- key: string;
564
+ tags: string[];
565
+ created_at: string;
566
+ is_current: boolean;
503
567
  }[];
504
568
  }>;
505
- readonly patchStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, data: Record<string, unknown>) => Promise<{
506
- state: string;
507
- subject: {
508
- target_kind: "tool" | "agent";
509
- target_name: string;
510
- kind: string;
511
- key: string;
512
- };
513
- data: Record<string, unknown>;
514
- seq: number;
515
- canonical_subject: {
516
- target_kind: "tool" | "agent";
517
- target_name: string;
518
- kind: string;
519
- key: string;
520
- };
521
- folded_from: {
522
- target_kind: "tool" | "agent";
523
- target_name: string;
524
- kind: string;
525
- key: string;
526
- }[];
569
+ readonly rollbackRole: (name: string, version: number) => Promise<{
570
+ allow_all: boolean;
571
+ base_tier: string | null;
572
+ condition: {
573
+ content?: string | undefined;
574
+ id?: string | undefined;
575
+ kwargs?: Record<string, unknown> | undefined;
576
+ } | null;
577
+ description: string;
578
+ grants: Record<string, "none" | "read" | "write">;
579
+ name: string;
580
+ scopes: string[];
527
581
  }>;
528
- readonly applyStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, ops: readonly Record<string, unknown>[]) => Promise<{
529
- applied: boolean;
530
- data: Record<string, unknown> | null;
531
- seq: number | null;
532
- skipped: Record<string, unknown>[];
582
+ readonly listTokensPayload: (signal?: AbortSignal) => Promise<{
583
+ user_id: string;
584
+ description: string;
585
+ scopes: string[];
586
+ policy_data: unknown;
587
+ condition?: {
588
+ content?: string | undefined;
589
+ id?: string | undefined;
590
+ kwargs?: Record<string, unknown> | undefined;
591
+ } | null | undefined;
592
+ }[]>;
593
+ readonly createApiKey: (body: import("@tai42/api-client").ApiKeyBody) => Promise<string>;
594
+ readonly editApiKey: (userId: string, body: Omit<import("@tai42/api-client").ApiKeyBody, "user_id">) => Promise<{
595
+ user_id: string;
596
+ updated: boolean;
533
597
  }>;
534
- readonly evalTemplateJq: (name: string, subject: import("@tai42/api-client").StateSubjectRef, jqName: string, params?: Record<string, unknown>, signal?: AbortSignal) => Promise<{
535
- name: string;
536
- purpose: "input";
537
- value: unknown;
598
+ readonly revokeApiKey: (userId: string) => Promise<{
599
+ user_id: string;
600
+ revoked: boolean;
538
601
  }>;
539
- readonly applyTemplateJq: (name: string, subject: import("@tai42/api-client").StateSubjectRef, jqName: string, body?: {
540
- input?: unknown;
541
- op_id?: string;
542
- }) => Promise<{
543
- name: string;
544
- applied: boolean;
545
- data: Record<string, unknown> | null;
546
- seq: number | null;
547
- skipped: Record<string, unknown>[];
602
+ readonly createClaimLink: (body: import("@tai42/api-client").ClaimLinkBody) => Promise<{
603
+ claim_path: string;
604
+ token: string;
605
+ expires_at: string;
548
606
  }>;
549
- readonly deleteStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef) => Promise<{
550
- erased: true;
607
+ readonly getSettingsSchema: (signal?: AbortSignal) => Promise<{
608
+ groups: {
609
+ name: string;
610
+ module: string;
611
+ qualname: string;
612
+ fields: {
613
+ name: string;
614
+ env_var: string;
615
+ type: string;
616
+ default: unknown;
617
+ required: boolean;
618
+ secret: boolean;
619
+ description: string | null;
620
+ nested_group: string | null;
621
+ default_namespace_var: string | null;
622
+ value: unknown;
623
+ }[];
624
+ }[];
551
625
  }>;
552
- readonly foldStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, into: import("@tai42/api-client").StateSubjectRef, mode: "switch" | "merge") => Promise<{
553
- mode: "switch" | "merge";
554
- from: {
555
- kind: string;
556
- key: string;
557
- };
558
- into: {
559
- kind: string;
560
- key: string;
561
- };
562
- already: boolean;
563
- flattened: number;
626
+ readonly getMcpConfigSchema: (signal?: AbortSignal) => Promise<Record<string, unknown>>;
627
+ readonly createTriggerLink: (body: import("@tai42/api-client").TriggerLinkCreateBody) => Promise<{
628
+ name: string;
629
+ trigger_path: string;
630
+ token: string;
631
+ topic: string;
632
+ expires_at: string | null;
564
633
  }>;
565
- readonly listStateWrites: (name: string, subject: import("@tai42/api-client").StateSubjectRef, params?: import("@tai42/api-client").StatePageQuery, signal?: AbortSignal) => Promise<{
634
+ readonly listTriggerLinks: (signal?: AbortSignal) => Promise<{
566
635
  items: {
567
- seq: number;
568
- at: string;
569
- origin: {
570
- consumer: string | null;
571
- meta: Record<string, unknown> | null;
572
- run_id: string | null;
573
- op_id: string | null;
574
- door: string;
575
- actor: string | null;
576
- turn_id: string | null;
577
- inbound_id: string | null;
578
- };
579
- paths: (string | number)[][];
636
+ name: string;
637
+ topic: string;
638
+ execution_key: string;
639
+ trigger_auth: "public" | "verifier" | "token" | "token+api_key" | "out-of-service";
640
+ tool_kwargs: Record<string, unknown> | null;
641
+ created_by: string | null;
642
+ created_at: string;
643
+ expires_at: string | null;
644
+ token_hash_prefix: string;
580
645
  }[];
581
- next_cursor: string | null;
646
+ total: number;
582
647
  }>;
583
- readonly stateConsumers: (name: string, signal?: AbortSignal) => Promise<{
584
- kind: string;
585
- name: string | null;
586
- detail: string | null;
587
- link: {
588
- token: string | null;
589
- plugin_path: string | null;
590
- search: Record<string, unknown> | null;
591
- } | null;
592
- unavailable: string | null;
593
- }[]>;
594
- readonly listStateTemplates: (signal?: AbortSignal) => Promise<{
595
- declarations: {
596
- check: {
597
- content?: string | undefined;
598
- id?: string | undefined;
599
- kwargs?: Record<string, unknown> | undefined;
600
- } | null;
601
- schema: Record<string, unknown>;
602
- } | null;
603
- description: string;
604
- kind: "state-template";
648
+ readonly deleteTriggerLink: (name: string) => Promise<{
649
+ removed: boolean;
605
650
  name: string;
606
- parameters: Record<string, unknown>;
607
- reconcile: {
608
- close: {
609
- content?: string | undefined;
610
- id?: string | undefined;
611
- kwargs?: Record<string, unknown> | undefined;
612
- };
613
- orphans: {
651
+ }>;
652
+ readonly listHooks: (topic?: string, signal?: AbortSignal) => Promise<{
653
+ items: {
654
+ condition: {
614
655
  content?: string | undefined;
615
656
  id?: string | undefined;
616
657
  kwargs?: Record<string, unknown> | undefined;
617
- };
618
- resolutions: {
658
+ } | null;
659
+ execution_key: string;
660
+ execution_key_fingerprint: string;
661
+ expr: {
619
662
  content?: string | undefined;
620
663
  id?: string | undefined;
621
664
  kwargs?: Record<string, unknown> | undefined;
622
- };
623
- } | null;
624
- regimes: Record<string, unknown>[];
625
- template_jq: Record<string, {
665
+ } | null;
666
+ name: string;
667
+ state_binding: {
668
+ states: {
669
+ input_injections: {
670
+ into: string;
671
+ jq: {
672
+ content?: string | undefined;
673
+ id?: string | undefined;
674
+ kwargs?: Record<string, unknown> | undefined;
675
+ } | null;
676
+ template_jq: string | null;
677
+ }[];
678
+ scope_expr: {
679
+ content?: string | undefined;
680
+ id?: string | undefined;
681
+ kwargs?: Record<string, unknown> | undefined;
682
+ } | null;
683
+ state: string;
684
+ subject_expr: {
685
+ content?: string | undefined;
686
+ id?: string | undefined;
687
+ kwargs?: Record<string, unknown> | undefined;
688
+ };
689
+ templates: string[];
690
+ updates: {
691
+ adapter: {
692
+ content?: string | undefined;
693
+ id?: string | undefined;
694
+ kwargs?: Record<string, unknown> | undefined;
695
+ } | null;
696
+ jq: {
697
+ content?: string | undefined;
698
+ id?: string | undefined;
699
+ kwargs?: Record<string, unknown> | undefined;
700
+ } | null;
701
+ op_id: {
702
+ content?: string | undefined;
703
+ id?: string | undefined;
704
+ kwargs?: Record<string, unknown> | undefined;
705
+ } | null;
706
+ template_jq: string | null;
707
+ }[];
708
+ }[];
709
+ } | null;
710
+ subject: {
711
+ key_expr: {
712
+ content?: string | undefined;
713
+ id?: string | undefined;
714
+ kwargs?: Record<string, unknown> | undefined;
715
+ };
716
+ kind: string;
717
+ target_kind: "tool" | "agent";
718
+ target_name: string;
719
+ } | null;
720
+ tool: string;
721
+ tool_kwargs: Record<string, unknown>;
722
+ topic: string;
723
+ }[];
724
+ total: number;
725
+ topic_verifiers: Record<string, {
726
+ verifier: string;
727
+ config: Record<string, unknown>;
728
+ }>;
729
+ trigger_auth: Record<string, "public" | "verifier" | "token" | "token+api_key" | "out-of-service">;
730
+ }>;
731
+ readonly registerHook: (params: import("@tai42/api-client").HookRegister) => Promise<{
732
+ registered: boolean;
733
+ name: string;
734
+ }>;
735
+ readonly unregisterHook: (name: string) => Promise<{
736
+ removed: boolean;
737
+ name: string;
738
+ }>;
739
+ readonly listHookVerifiers: (signal?: AbortSignal) => Promise<string[]>;
740
+ readonly setTopicVerifier: (topic: string, body: import("@tai42/api-client").TopicVerifierBody) => Promise<{
741
+ topic: string;
742
+ verifier: string;
743
+ }>;
744
+ readonly deleteTopicVerifier: (topic: string) => Promise<{
745
+ removed: boolean;
746
+ topic: string;
747
+ }>;
748
+ readonly listAgents: (signal?: AbortSignal) => Promise<{
749
+ items: {
750
+ name: string;
626
751
  description: string;
627
- jq: {
628
- content?: string | undefined;
629
- id?: string | undefined;
630
- kwargs?: Record<string, unknown> | undefined;
631
- };
632
- params: string[];
633
- purpose: "input" | "update";
634
- reads: string[][];
635
- writes: string[][];
636
- }> | null;
637
- trace: Record<string, unknown>;
638
- attached_to: number;
639
- shipped_default: boolean;
640
- schema?: Record<string, unknown> | {
641
- content?: string | undefined;
642
- id?: string | undefined;
643
- kwargs?: Record<string, unknown> | undefined;
644
- } | undefined;
645
- }[]>;
646
- readonly getStateTemplate: (name: string, signal?: AbortSignal) => Promise<{
647
- declarations: {
648
- check: {
752
+ tool_name: string;
753
+ input_schema: Record<string, unknown>;
754
+ spec_runnable: boolean;
755
+ }[];
756
+ total: number;
757
+ }>;
758
+ readonly listSpecRunnableAgents: (signal?: AbortSignal) => Promise<{
759
+ items: {
760
+ name: string;
761
+ description: string;
762
+ tool_name: string;
763
+ input_schema: Record<string, unknown>;
764
+ spec_runnable: boolean;
765
+ }[];
766
+ total: number;
767
+ }>;
768
+ readonly streamAgentRun: (name: string, input: unknown, signal?: AbortSignal) => Promise<AsyncGenerator<import("@tai42/api-client").ParsedAgentEvent, any, any>>;
769
+ readonly streamAuthoredAgentRun: (name: string, input: unknown, signal?: AbortSignal) => Promise<AsyncGenerator<import("@tai42/api-client").ParsedAgentEvent, any, any>>;
770
+ readonly listNotifications: (signal?: AbortSignal) => Promise<{
771
+ notifications: {
772
+ id: string;
773
+ message: string;
774
+ recipient: string | null;
775
+ created_at: string;
776
+ audience?: string | null | undefined;
777
+ media?: unknown[] | null | undefined;
778
+ template?: {
779
+ body_parameters: string[];
780
+ buttons: unknown[];
781
+ header_media: {
782
+ caption: string | null;
783
+ filename: string | null;
784
+ kind: "image" | "link" | "document" | "video" | "audio";
785
+ url: string;
786
+ } | null;
787
+ language: string;
788
+ name: string;
789
+ } | null | undefined;
790
+ options?: string[] | null | undefined;
791
+ }[];
792
+ }>;
793
+ readonly getWebEntryGate: (identity: string, signal?: AbortSignal) => Promise<{
794
+ enabled: boolean;
795
+ codes: {
796
+ code_id: string;
797
+ label: string | null;
798
+ created_at: string;
799
+ expires_at: string | null;
800
+ }[];
801
+ }>;
802
+ readonly setWebEntryGate: (identity: string, enabled: boolean) => Promise<{
803
+ enabled: boolean;
804
+ }>;
805
+ readonly mintWebEntryCode: (identity: string, body: import("@tai42/api-client").WebEntryCodeMintBody) => Promise<{
806
+ code: string;
807
+ code_id: string;
808
+ expires_at: string | null;
809
+ }>;
810
+ readonly revokeWebEntryCode: (identity: string, codeId: string) => Promise<{
811
+ status: "revoked";
812
+ }>;
813
+ readonly listConversationRoutes: (signal?: AbortSignal) => Promise<{
814
+ items: {
815
+ callback_secret: string | null;
816
+ callback_url: string | null;
817
+ channel: string | null;
818
+ door: "channel" | "api";
819
+ error_reply_text: string | null;
820
+ execution_key: string;
821
+ execution_key_fingerprint: string;
822
+ initial_mode: "agent" | "manual";
823
+ locale: string | null;
824
+ our_identity: string | null;
825
+ payload_expr: {
649
826
  content?: string | undefined;
650
827
  id?: string | undefined;
651
828
  kwargs?: Record<string, unknown> | undefined;
652
829
  } | null;
653
- schema: Record<string, unknown>;
654
- } | null;
655
- description: string;
656
- kind: "state-template";
657
- name: string;
658
- parameters: Record<string, unknown>;
659
- reconcile: {
660
- close: {
661
- content?: string | undefined;
662
- id?: string | undefined;
663
- kwargs?: Record<string, unknown> | undefined;
664
- };
665
- orphans: {
666
- content?: string | undefined;
667
- id?: string | undefined;
668
- kwargs?: Record<string, unknown> | undefined;
669
- };
670
- resolutions: {
671
- content?: string | undefined;
672
- id?: string | undefined;
673
- kwargs?: Record<string, unknown> | undefined;
674
- };
675
- } | null;
676
- regimes: Record<string, unknown>[];
677
- template_jq: Record<string, {
678
- description: string;
679
- jq: {
830
+ reply_expr: {
680
831
  content?: string | undefined;
681
832
  id?: string | undefined;
682
833
  kwargs?: Record<string, unknown> | undefined;
683
- };
684
- params: string[];
685
- purpose: "input" | "update";
686
- reads: string[][];
687
- writes: string[][];
688
- }> | null;
689
- trace: Record<string, unknown>;
690
- schema?: Record<string, unknown> | {
691
- content?: string | undefined;
692
- id?: string | undefined;
693
- kwargs?: Record<string, unknown> | undefined;
694
- } | undefined;
834
+ } | null;
835
+ route_name: string;
836
+ target_kind: "tool" | "agent";
837
+ target_name: string;
838
+ turns_per_hour_override: number | null;
839
+ }[];
840
+ total: number;
695
841
  }>;
696
- readonly putStateTemplate: (name: string, body: import("@tai42/api-client").StateTemplateBody, replace?: boolean) => Promise<{
697
- declarations: {
698
- check: {
842
+ readonly createOrReplaceConversationRoute: (route: import("@tai42/api-client").ConversationRouteCreate) => Promise<{
843
+ created: boolean;
844
+ route_name: string;
845
+ route: {
846
+ callback_secret: string | null;
847
+ callback_url: string | null;
848
+ channel: string | null;
849
+ door: "channel" | "api";
850
+ error_reply_text: string | null;
851
+ execution_key: string;
852
+ execution_key_fingerprint: string;
853
+ initial_mode: "agent" | "manual";
854
+ locale: string | null;
855
+ our_identity: string | null;
856
+ payload_expr: {
699
857
  content?: string | undefined;
700
858
  id?: string | undefined;
701
859
  kwargs?: Record<string, unknown> | undefined;
702
860
  } | null;
703
- schema: Record<string, unknown>;
704
- } | null;
705
- description: string;
706
- kind: "state-template";
707
- name: string;
708
- parameters: Record<string, unknown>;
709
- reconcile: {
710
- close: {
711
- content?: string | undefined;
712
- id?: string | undefined;
713
- kwargs?: Record<string, unknown> | undefined;
714
- };
715
- orphans: {
716
- content?: string | undefined;
717
- id?: string | undefined;
718
- kwargs?: Record<string, unknown> | undefined;
719
- };
720
- resolutions: {
721
- content?: string | undefined;
722
- id?: string | undefined;
723
- kwargs?: Record<string, unknown> | undefined;
724
- };
725
- } | null;
726
- regimes: Record<string, unknown>[];
727
- template_jq: Record<string, {
728
- description: string;
729
- jq: {
861
+ reply_expr: {
730
862
  content?: string | undefined;
731
863
  id?: string | undefined;
732
864
  kwargs?: Record<string, unknown> | undefined;
733
- };
734
- params: string[];
735
- purpose: "input" | "update";
736
- reads: string[][];
737
- writes: string[][];
738
- }> | null;
739
- trace: Record<string, unknown>;
740
- schema?: Record<string, unknown> | {
741
- content?: string | undefined;
742
- id?: string | undefined;
743
- kwargs?: Record<string, unknown> | undefined;
744
- } | undefined;
745
- }>;
746
- readonly deleteStateTemplate: (name: string) => Promise<{
747
- name: string;
748
- deleted: true;
865
+ } | null;
866
+ route_name: string;
867
+ target_kind: "tool" | "agent";
868
+ target_name: string;
869
+ turns_per_hour_override: number | null;
870
+ };
871
+ callback_secret: string | null;
749
872
  }>;
750
- readonly pruneStateRetention: () => Promise<{
751
- pruned: Record<string, number>;
873
+ readonly deleteConversationRoute: (routeName: string) => Promise<{
874
+ removed: boolean;
875
+ route_name: string;
752
876
  }>;
753
- readonly listToolMeta: (signal?: AbortSignal) => Promise<{
754
- folders: {
755
- id: string;
756
- name: string;
757
- parent_id: string | null;
758
- }[];
759
- meta: {
760
- tool_name: string;
761
- display_name: string | null;
762
- folder_id: string | null;
763
- tags: string[];
764
- badges: string[];
765
- hidden: boolean | null;
877
+ readonly listConversationThreads: (routeName: string, page: number, pageSize: number, filters?: import("@tai42/api-client").ConversationThreadFilters, signal?: AbortSignal) => Promise<{
878
+ total: number;
879
+ page: number;
880
+ page_size: number;
881
+ next_page: number | null;
882
+ truncated: boolean;
883
+ items: {
884
+ thread_id: string;
885
+ client_address: string;
886
+ last_activity_at: number;
887
+ message_count: number;
888
+ last_delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent";
766
889
  }[];
767
890
  }>;
768
- readonly upsertToolMeta: (toolName: string, patch: import("@tai42/api-client").ToolMetaPatch) => Promise<{
769
- tool_name: string;
770
- display_name: string | null;
771
- folder_id: string | null;
772
- tags: string[];
773
- badges: string[];
774
- hidden: boolean | null;
775
- }>;
776
- readonly deleteToolMeta: (toolName: string) => Promise<{
777
- tool_name: string;
778
- deleted: true;
779
- }>;
780
- readonly createFolder: (name: string, parentId?: string | null) => Promise<{
781
- id: string;
782
- name: string;
783
- parent_id: string | null;
784
- }>;
785
- readonly renameFolder: (folderId: string, name: string) => Promise<{
786
- id: string;
787
- name: string;
788
- parent_id: string | null;
789
- }>;
790
- readonly moveFolder: (folderId: string, parentId: string | null) => Promise<{
791
- id: string;
792
- name: string;
793
- parent_id: string | null;
794
- }>;
795
- readonly deleteFolder: (folderId: string) => Promise<{
796
- folder_id: string;
797
- deleted: true;
798
- }>;
799
- readonly getStorageInfo: (signal?: AbortSignal) => Promise<{
800
- present: boolean;
801
- provider: string | null;
802
- module: string | null;
803
- }>;
804
- readonly listStorageResources: (signal?: AbortSignal) => Promise<{
805
- resources: string[];
806
- }>;
807
- readonly statStorageResource: (id: string, signal?: AbortSignal) => Promise<{
808
- id: string;
809
- content_type: string | null;
891
+ readonly readConversationTranscript: (query: import("@tai42/api-client").ConversationTranscriptQuery, signal?: AbortSignal) => Promise<{
892
+ order: "asc" | "desc";
893
+ total: number;
894
+ page: number;
895
+ page_size: number;
896
+ next_page: number | null;
897
+ truncated: boolean;
898
+ items: {
899
+ message_id: string;
900
+ route_name: string;
901
+ door: "channel" | "api";
902
+ thread_id: string;
903
+ client_address: string;
904
+ caller_principal: string | null;
905
+ inbound_text: string;
906
+ answer_status: "error" | "silent" | "answered" | null;
907
+ answer: string | null;
908
+ origin: "client" | "operator";
909
+ delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent";
910
+ created_at: number;
911
+ updated_at: number;
912
+ channel?: string | null | undefined;
913
+ our_identity?: string | null | undefined;
914
+ provider_message_id?: string | null | undefined;
915
+ callback_url?: string | null | undefined;
916
+ error?: string | null | undefined;
917
+ outbound_message_ids?: string[] | undefined;
918
+ attempts?: number | undefined;
919
+ }[];
810
920
  }>;
811
- readonly downloadStorageResource: (id: string, signal?: AbortSignal) => Promise<Blob>;
812
- readonly uploadStorageResource: (body: import("@tai42/api-client").StorageUploadBody) => Promise<{
813
- id: string;
814
- stored: true;
921
+ readonly searchConversationMessages: (query: import("@tai42/api-client").ConversationMessageSearchQuery, signal?: AbortSignal) => Promise<{
922
+ total: number;
923
+ page: number;
924
+ page_size: number;
925
+ next_page: number | null;
926
+ truncated: boolean;
927
+ items: {
928
+ message_id: string;
929
+ route_name: string;
930
+ door: "channel" | "api";
931
+ thread_id: string;
932
+ client_address: string;
933
+ caller_principal: string | null;
934
+ inbound_text: string;
935
+ answer_status: "error" | "silent" | "answered" | null;
936
+ answer: string | null;
937
+ origin: "client" | "operator";
938
+ delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent";
939
+ created_at: number;
940
+ updated_at: number;
941
+ channel?: string | null | undefined;
942
+ our_identity?: string | null | undefined;
943
+ provider_message_id?: string | null | undefined;
944
+ callback_url?: string | null | undefined;
945
+ error?: string | null | undefined;
946
+ outbound_message_ids?: string[] | undefined;
947
+ attempts?: number | undefined;
948
+ }[];
815
949
  }>;
816
- readonly deleteStorageResource: (id: string) => Promise<{
817
- id: string;
818
- deleted: true;
950
+ readonly sendConversationThreadMessage: (routeName: string, body: import("@tai42/api-client").ConversationThreadMessageBody) => Promise<{
951
+ message_id: string;
952
+ thread_id: string;
819
953
  }>;
820
- readonly deleteStorageDir: (path: string) => Promise<{
821
- dir: string;
822
- deleted: true;
954
+ readonly getConversationThreadMode: (routeName: string, threadId: string, signal?: AbortSignal) => Promise<{
955
+ mode: "agent" | "manual";
956
+ source: "route" | "thread";
823
957
  }>;
824
- readonly getBackendInfo: (signal?: AbortSignal) => Promise<{
825
- present: boolean;
826
- backend: string | null;
827
- module: string | null;
958
+ readonly setConversationThreadMode: (routeName: string, threadId: string, mode: import("@tai42/api-client").ConversationThreadMode) => Promise<{
959
+ mode: "agent" | "manual";
960
+ source: "route" | "thread";
828
961
  }>;
829
- readonly listFleetWorkers: (signal?: AbortSignal) => Promise<{
830
- workers: {
831
- name: string;
832
- kind: "backend" | "serve";
833
- pid: number;
834
- generation: number;
835
- joined_at: string;
836
- beat_at: string;
837
- state: "ready" | "resyncing" | "recycling";
838
- stale: boolean;
839
- last_op: {
840
- op: string;
841
- outcome: string;
842
- at: string;
962
+ readonly listConversationConfigs: (signal?: AbortSignal) => Promise<{
963
+ items: {
964
+ greeting_template: string | null;
965
+ multichannel: boolean;
966
+ state_binding: {
967
+ states: {
968
+ input_injections: {
969
+ into: string;
970
+ jq: {
971
+ content?: string | undefined;
972
+ id?: string | undefined;
973
+ kwargs?: Record<string, unknown> | undefined;
974
+ } | null;
975
+ template_jq: string | null;
976
+ }[];
977
+ scope_expr: {
978
+ content?: string | undefined;
979
+ id?: string | undefined;
980
+ kwargs?: Record<string, unknown> | undefined;
981
+ } | null;
982
+ state: string;
983
+ subject_expr: {
984
+ content?: string | undefined;
985
+ id?: string | undefined;
986
+ kwargs?: Record<string, unknown> | undefined;
987
+ };
988
+ templates: string[];
989
+ updates: {
990
+ adapter: {
991
+ content?: string | undefined;
992
+ id?: string | undefined;
993
+ kwargs?: Record<string, unknown> | undefined;
994
+ } | null;
995
+ jq: {
996
+ content?: string | undefined;
997
+ id?: string | undefined;
998
+ kwargs?: Record<string, unknown> | undefined;
999
+ } | null;
1000
+ op_id: {
1001
+ content?: string | undefined;
1002
+ id?: string | undefined;
1003
+ kwargs?: Record<string, unknown> | undefined;
1004
+ } | null;
1005
+ template_jq: string | null;
1006
+ }[];
1007
+ }[];
843
1008
  } | null;
1009
+ target_kind: "tool" | "agent";
1010
+ target_name: string;
844
1011
  }[];
1012
+ total: number;
845
1013
  }>;
846
- readonly reloadFleetConfig: (targets: string[] | null) => Promise<{
847
- op: string;
848
- reachable: boolean;
849
- local_only: boolean;
850
- results: {
851
- name: string;
852
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
853
- payload: unknown;
854
- error: string | null;
855
- detail: string | null;
856
- }[];
857
- error: string | null;
858
- }>;
859
- readonly listExtensions: (signal?: AbortSignal) => Promise<{
860
- name: string;
861
- kind: string;
862
- }[]>;
863
- readonly getToolExtensions: (name: string, signal?: AbortSignal) => Promise<{
864
- combos: (string | {
865
- name: string;
866
- config: Record<string, unknown>;
867
- })[][];
868
- available: {
869
- name: string;
870
- kind: string;
871
- }[];
872
- }>;
873
- readonly setToolExtensions: (name: string, combos: readonly import("@tai42/api-client").PresetExtensionElement[][]) => Promise<{
874
- status: string;
875
- env_keys: number;
876
- fanout: {
877
- mode: "local-only";
878
- note: string;
879
- } | {
880
- op: string;
881
- reachable: boolean;
882
- local_only: boolean;
883
- results: {
884
- name: string;
885
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
886
- payload: unknown;
887
- error: string | null;
888
- detail: string | null;
889
- }[];
890
- error: string | null;
891
- mode: "fleet";
892
- } | {
893
- op: string;
894
- reachable: boolean;
895
- local_only: boolean;
896
- results: {
897
- name: string;
898
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
899
- payload: unknown;
900
- error: string | null;
901
- detail: string | null;
1014
+ readonly getConversationConfig: (targetKind: import("@tai42/api-client").ConversationTargetKind, targetName: string, signal?: AbortSignal) => Promise<{
1015
+ greeting_template: string | null;
1016
+ multichannel: boolean;
1017
+ state_binding: {
1018
+ states: {
1019
+ input_injections: {
1020
+ into: string;
1021
+ jq: {
1022
+ content?: string | undefined;
1023
+ id?: string | undefined;
1024
+ kwargs?: Record<string, unknown> | undefined;
1025
+ } | null;
1026
+ template_jq: string | null;
1027
+ }[];
1028
+ scope_expr: {
1029
+ content?: string | undefined;
1030
+ id?: string | undefined;
1031
+ kwargs?: Record<string, unknown> | undefined;
1032
+ } | null;
1033
+ state: string;
1034
+ subject_expr: {
1035
+ content?: string | undefined;
1036
+ id?: string | undefined;
1037
+ kwargs?: Record<string, unknown> | undefined;
1038
+ };
1039
+ templates: string[];
1040
+ updates: {
1041
+ adapter: {
1042
+ content?: string | undefined;
1043
+ id?: string | undefined;
1044
+ kwargs?: Record<string, unknown> | undefined;
1045
+ } | null;
1046
+ jq: {
1047
+ content?: string | undefined;
1048
+ id?: string | undefined;
1049
+ kwargs?: Record<string, unknown> | undefined;
1050
+ } | null;
1051
+ op_id: {
1052
+ content?: string | undefined;
1053
+ id?: string | undefined;
1054
+ kwargs?: Record<string, unknown> | undefined;
1055
+ } | null;
1056
+ template_jq: string | null;
1057
+ }[];
902
1058
  }[];
903
- error: string | null;
904
- mode: "unreachable";
905
- };
1059
+ } | null;
1060
+ target_kind: "tool" | "agent";
1061
+ target_name: string;
906
1062
  }>;
907
- readonly listTemplates: (signal?: AbortSignal) => Promise<string[]>;
908
- readonly getTemplate: (templateId: string) => Promise<{
909
- template: string;
910
- schema: Record<string, unknown>;
1063
+ readonly setConversationConfig: (config: import("@tai42/api-client").TargetConversationConfig) => Promise<{
1064
+ created: boolean;
1065
+ target_kind: "tool" | "agent";
1066
+ target_name: string;
1067
+ config: {
1068
+ greeting_template: string | null;
1069
+ multichannel: boolean;
1070
+ state_binding: {
1071
+ states: {
1072
+ input_injections: {
1073
+ into: string;
1074
+ jq: {
1075
+ content?: string | undefined;
1076
+ id?: string | undefined;
1077
+ kwargs?: Record<string, unknown> | undefined;
1078
+ } | null;
1079
+ template_jq: string | null;
1080
+ }[];
1081
+ scope_expr: {
1082
+ content?: string | undefined;
1083
+ id?: string | undefined;
1084
+ kwargs?: Record<string, unknown> | undefined;
1085
+ } | null;
1086
+ state: string;
1087
+ subject_expr: {
1088
+ content?: string | undefined;
1089
+ id?: string | undefined;
1090
+ kwargs?: Record<string, unknown> | undefined;
1091
+ };
1092
+ templates: string[];
1093
+ updates: {
1094
+ adapter: {
1095
+ content?: string | undefined;
1096
+ id?: string | undefined;
1097
+ kwargs?: Record<string, unknown> | undefined;
1098
+ } | null;
1099
+ jq: {
1100
+ content?: string | undefined;
1101
+ id?: string | undefined;
1102
+ kwargs?: Record<string, unknown> | undefined;
1103
+ } | null;
1104
+ op_id: {
1105
+ content?: string | undefined;
1106
+ id?: string | undefined;
1107
+ kwargs?: Record<string, unknown> | undefined;
1108
+ } | null;
1109
+ template_jq: string | null;
1110
+ }[];
1111
+ }[];
1112
+ } | null;
1113
+ target_kind: "tool" | "agent";
1114
+ target_name: string;
1115
+ };
911
1116
  }>;
912
- readonly uploadTemplate: (path: string, content: string) => Promise<{
913
- path: string;
914
- uploaded: true;
1117
+ readonly deleteConversationConfig: (targetKind: import("@tai42/api-client").ConversationTargetKind, targetName: string) => Promise<{
1118
+ removed: boolean;
1119
+ target_kind: "tool" | "agent";
1120
+ target_name: string;
915
1121
  }>;
916
- readonly deleteTemplate: (path: string) => Promise<{
917
- path: string;
918
- deleted: true;
1122
+ readonly listFailedConversationMessages: (signal?: AbortSignal) => Promise<{
1123
+ items: {
1124
+ message_id: string;
1125
+ route_name: string;
1126
+ door: "channel" | "api";
1127
+ thread_id: string;
1128
+ client_address: string;
1129
+ caller_principal: string | null;
1130
+ inbound_text: string;
1131
+ answer_status: "error" | "silent" | "answered" | null;
1132
+ answer: string | null;
1133
+ origin: "client" | "operator";
1134
+ delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent";
1135
+ created_at: number;
1136
+ updated_at: number;
1137
+ channel?: string | null | undefined;
1138
+ our_identity?: string | null | undefined;
1139
+ provider_message_id?: string | null | undefined;
1140
+ callback_url?: string | null | undefined;
1141
+ error?: string | null | undefined;
1142
+ outbound_message_ids?: string[] | undefined;
1143
+ attempts?: number | undefined;
1144
+ }[];
1145
+ total: number;
919
1146
  }>;
920
- readonly deleteTemplateDir: (path: string) => Promise<{
921
- path: string;
922
- deleted: true;
1147
+ readonly deleteConversationThread: (routeName: string, threadId: string) => Promise<{
1148
+ removed: number;
1149
+ route_name: string;
1150
+ thread_id: string;
923
1151
  }>;
924
- readonly renderTemplate: (text: import("@tai42/api-client").TemplatedText) => Promise<{
925
- rendered: string;
1152
+ readonly deleteConversationPerson: (personId: string) => Promise<{
1153
+ person_id: string;
1154
+ removed: number;
1155
+ erased: boolean;
926
1156
  }>;
927
- readonly clearTemplatesCache: () => Promise<{
928
- cleared: true;
1157
+ readonly listChannels: (signal?: AbortSignal) => Promise<{
1158
+ channels: string[];
929
1159
  }>;
930
- readonly getManifest: (signal?: AbortSignal) => Promise<{
931
- mcp: {
932
- [x: string]: unknown;
933
- managed?: {
934
- connection_id: string;
935
- provider_id: string;
936
- sub_service: string;
937
- } | null | undefined;
1160
+ readonly listInteractions: (page: number, pageSize: number, signal?: AbortSignal) => Promise<{
1161
+ total: number;
1162
+ page: number;
1163
+ page_size: number;
1164
+ next_page: number | null;
1165
+ truncated: boolean;
1166
+ items: {
1167
+ interaction_id: string;
1168
+ group_id: string;
1169
+ question: string;
1170
+ answer_format: "text" | "external" | "confirm" | "select" | "form";
1171
+ format_payload: Record<string, unknown>;
1172
+ created_at: string;
1173
+ timeout_at: string;
1174
+ sensitive: boolean;
1175
+ server_verified?: boolean | undefined;
1176
+ channel?: string | undefined;
1177
+ recipient?: string | undefined;
1178
+ origin?: string | undefined;
1179
+ audience?: string | undefined;
1180
+ media?: unknown[] | undefined;
938
1181
  }[];
939
- user_tools: string[];
940
1182
  }>;
941
- readonly setMcpConfig: (mcp: unknown[]) => Promise<{
1183
+ readonly answerInteraction: (interactionId: string, answer: unknown) => Promise<{
1184
+ interaction_id: string;
942
1185
  status: string;
943
- env_keys: number;
944
- fanout: {
945
- mode: "local-only";
946
- note: string;
947
- } | {
948
- op: string;
949
- reachable: boolean;
950
- local_only: boolean;
951
- results: {
952
- name: string;
953
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
954
- payload: unknown;
955
- error: string | null;
956
- detail: string | null;
1186
+ }>;
1187
+ readonly cancelInteraction: (interactionId: string) => Promise<{
1188
+ interaction_id: string;
1189
+ status: string;
1190
+ }>;
1191
+ readonly listStudioPlugins: (signal?: AbortSignal) => Promise<{
1192
+ name: string;
1193
+ version: string;
1194
+ api_version: number;
1195
+ entry: string;
1196
+ integrity: Record<string, string>;
1197
+ contributions: {
1198
+ tool_panels: Record<string, string>;
1199
+ pages: string[];
1200
+ settings_tabs: string[];
1201
+ nav_entries: string[];
1202
+ };
1203
+ }[]>;
1204
+ readonly listProviders: (signal?: AbortSignal) => Promise<{
1205
+ providers: {
1206
+ id: string;
1207
+ display_name: string;
1208
+ description: string;
1209
+ icon_url: string;
1210
+ kind: "none" | "oauth";
1211
+ origin: "system" | "community";
1212
+ category: string;
1213
+ sub_services: {
1214
+ id: string;
1215
+ display_name: string;
1216
+ description: string;
1217
+ scopes: string[];
957
1218
  }[];
958
- error: string | null;
959
- mode: "fleet";
960
- } | {
961
- op: string;
962
- reachable: boolean;
963
- local_only: boolean;
964
- results: {
965
- name: string;
966
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
967
- payload: unknown;
968
- error: string | null;
969
- detail: string | null;
1219
+ config_fields: {
1220
+ key: string;
1221
+ label: string;
1222
+ target: "env" | "header";
1223
+ required: boolean;
1224
+ secret: boolean;
970
1225
  }[];
971
- error: string | null;
972
- mode: "unreachable";
973
- };
974
- }>;
975
- readonly getMcpStatus: (signal?: AbortSignal) => Promise<{
976
- bound: Record<string, string[]>;
977
- failed: {
978
- title: string;
979
- status: string;
1226
+ }[];
1227
+ categories: {
1228
+ id: string;
1229
+ display_name: string;
1230
+ sort_order: number;
980
1231
  }[];
981
1232
  }>;
982
- readonly reloadMcp: (title: string) => Promise<{
983
- op: string;
984
- reachable: boolean;
985
- local_only: boolean;
986
- results: {
987
- name: string;
988
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
989
- payload: unknown;
990
- error: string | null;
991
- detail: string | null;
1233
+ readonly listConnections: (signal?: AbortSignal) => Promise<{
1234
+ items: {
1235
+ connection_id: string;
1236
+ provider_id: string;
1237
+ alias: string;
1238
+ kind: "none" | "oauth";
1239
+ account_identity: string | null;
1240
+ enabled_sub_services: string[];
1241
+ granted_scopes: string[];
1242
+ unreachable_sub_services: string[];
1243
+ auth_health_state: "healthy" | "reconnect_required" | "refresh_failing";
1244
+ created_at: string;
992
1245
  }[];
993
- error: string | null;
1246
+ total: number;
1247
+ unhealthy?: number | undefined;
994
1248
  }>;
995
- readonly addToolsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{
996
- status: string;
997
- env_keys: number;
998
- fanout: {
999
- mode: "local-only";
1000
- note: string;
1001
- } | {
1002
- op: string;
1003
- reachable: boolean;
1004
- local_only: boolean;
1005
- results: {
1006
- name: string;
1007
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1008
- payload: unknown;
1009
- error: string | null;
1010
- detail: string | null;
1011
- }[];
1012
- error: string | null;
1013
- mode: "fleet";
1014
- } | {
1015
- op: string;
1016
- reachable: boolean;
1017
- local_only: boolean;
1018
- results: {
1019
- name: string;
1020
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1021
- payload: unknown;
1022
- error: string | null;
1023
- detail: string | null;
1024
- }[];
1025
- error: string | null;
1026
- mode: "unreachable";
1027
- };
1249
+ readonly getConnection: (id: string, signal?: AbortSignal) => Promise<{
1250
+ connection_id: string;
1251
+ provider_id: string;
1252
+ alias: string;
1253
+ kind: "none" | "oauth";
1254
+ account_identity: string | null;
1255
+ enabled_sub_services: string[];
1256
+ granted_scopes: string[];
1257
+ unreachable_sub_services: string[];
1258
+ auth_health_state: "healthy" | "reconnect_required" | "refresh_failing";
1259
+ created_at: string;
1028
1260
  }>;
1029
- readonly removeToolsEntry: (title: string) => Promise<{
1030
- status: string;
1031
- env_keys: number;
1261
+ readonly startConnect: (args: import("@tai42/api-client").StartConnectArgs) => Promise<{
1262
+ flow_id: string;
1263
+ authorize_url: string;
1264
+ } | {
1265
+ connection_id: string;
1266
+ added_manifest_entries: string[];
1032
1267
  fanout: {
1033
1268
  mode: "local-only";
1034
1269
  note: string;
@@ -1058,11 +1293,13 @@ export declare const ApiProvider: import("react").Provider<{
1058
1293
  }[];
1059
1294
  error: string | null;
1060
1295
  mode: "unreachable";
1061
- };
1296
+ } | null;
1062
1297
  }>;
1063
- readonly addAgentsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{
1064
- status: string;
1065
- env_keys: number;
1298
+ readonly disconnect: (id: string) => Promise<{
1299
+ connection_id: string;
1300
+ upstream_revoke_outcome: "success" | "failed" | "skipped";
1301
+ upstream_revoke_status: number | null;
1302
+ removed_manifest_entries: string[];
1066
1303
  fanout: {
1067
1304
  mode: "local-only";
1068
1305
  note: string;
@@ -1092,11 +1329,20 @@ export declare const ApiProvider: import("react").Provider<{
1092
1329
  }[];
1093
1330
  error: string | null;
1094
1331
  mode: "unreachable";
1095
- };
1332
+ } | null;
1333
+ }>;
1334
+ readonly reconnect: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{
1335
+ flow_id: string;
1336
+ authorize_url: string;
1096
1337
  }>;
1097
- readonly removeAgentsEntry: (title: string) => Promise<{
1098
- status: string;
1099
- env_keys: number;
1338
+ readonly patchSubServices: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{
1339
+ connection_id: string;
1340
+ enabled_sub_services: string[];
1341
+ consent_required: boolean;
1342
+ flow_id: string | null;
1343
+ authorize_url: string | null;
1344
+ added_manifest_entries: string[];
1345
+ removed_manifest_entries: string[];
1100
1346
  fanout: {
1101
1347
  mode: "local-only";
1102
1348
  note: string;
@@ -1126,11 +1372,12 @@ export declare const ApiProvider: import("react").Provider<{
1126
1372
  }[];
1127
1373
  error: string | null;
1128
1374
  mode: "unreachable";
1129
- };
1375
+ } | null;
1130
1376
  }>;
1131
- readonly updateApiTools: (body: import("@tai42/api-client").ApiToolsListsBody) => Promise<{
1132
- status: string;
1133
- env_keys: number;
1377
+ readonly completeOAuth: (state: string, code: string, error?: string) => Promise<{
1378
+ kind: "success";
1379
+ connection_id: string;
1380
+ return_url: string;
1134
1381
  fanout: {
1135
1382
  mode: "local-only";
1136
1383
  note: string;
@@ -1160,65 +1407,15 @@ export declare const ApiProvider: import("react").Provider<{
1160
1407
  }[];
1161
1408
  error: string | null;
1162
1409
  mode: "unreachable";
1163
- };
1164
- }>;
1165
- readonly listFailedMcps: (signal?: AbortSignal) => Promise<{
1166
- op: string;
1167
- reachable: boolean;
1168
- local_only: boolean;
1169
- results: {
1170
- name: string;
1171
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1172
- payload: unknown;
1173
- error: string | null;
1174
- detail: string | null;
1175
- }[];
1176
- error: string | null;
1177
- }>;
1178
- readonly reloadFailedMcps: () => Promise<{
1179
- op: string;
1180
- reachable: boolean;
1181
- local_only: boolean;
1182
- results: {
1183
- name: string;
1184
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1185
- payload: unknown;
1186
- error: string | null;
1187
- detail: string | null;
1188
- }[];
1189
- error: string | null;
1190
- }>;
1191
- readonly deregisterMcp: (title: string) => Promise<{
1192
- op: string;
1193
- reachable: boolean;
1194
- local_only: boolean;
1195
- results: {
1196
- name: string;
1197
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1198
- payload: unknown;
1199
- error: string | null;
1200
- detail: string | null;
1201
- }[];
1202
- error: string | null;
1203
- }>;
1204
- readonly listSubMcp: (signal?: AbortSignal) => Promise<Record<string, {
1205
- tools: string[];
1206
- transport: string;
1207
- }>>;
1208
- readonly createSubMcp: (slug: string, tools: string[], transport?: string) => Promise<{
1209
- slug: string;
1210
- tools: string[];
1211
- transport: string;
1212
- }>;
1213
- readonly deleteSubMcp: (slug: string) => Promise<{
1214
- slug: string;
1215
- removed: true;
1216
- }>;
1217
- readonly getEnvConfig: (signal?: AbortSignal) => Promise<{
1218
- env: Record<string, string>;
1219
- secret_keys: string[];
1410
+ } | null;
1411
+ } | {
1412
+ kind: "failed";
1413
+ reason: string;
1414
+ } | {
1415
+ kind: "cancelled";
1416
+ message: string;
1220
1417
  }>;
1221
- readonly setEnvConfig: (env: Record<string, string>) => Promise<{
1418
+ readonly setMcpSecretEnv: (body: import("../../../api-client/dist/client/manifest-client").SetMcpSecretEnvBody) => Promise<{
1222
1419
  status: string;
1223
1420
  env_keys: number;
1224
1421
  fanout: {
@@ -1252,23 +1449,23 @@ export declare const ApiProvider: import("react").Provider<{
1252
1449
  mode: "unreachable";
1253
1450
  };
1254
1451
  }>;
1255
- readonly getConfigMode: (signal?: AbortSignal) => Promise<{
1256
- config_mode: string;
1257
- read_only: boolean;
1258
- }>;
1259
- readonly reloadConfig: (targets?: string[] | null) => Promise<{
1260
- op: string;
1261
- reachable: boolean;
1262
- local_only: boolean;
1263
- results: {
1264
- name: string;
1265
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1266
- payload: unknown;
1267
- error: string | null;
1268
- detail: string | null;
1452
+ readonly getManifestPreserved: (signal?: AbortSignal) => Promise<{
1453
+ mcp: {
1454
+ [x: string]: unknown;
1455
+ managed?: {
1456
+ connection_id: string;
1457
+ provider_id: string;
1458
+ sub_service: string;
1459
+ } | null | undefined;
1269
1460
  }[];
1270
- error: string | null;
1461
+ user_tools: string[];
1271
1462
  }>;
1463
+ readonly getMcpEnvRefs: (signal?: AbortSignal) => Promise<{
1464
+ var: string;
1465
+ pointer: string;
1466
+ has_default: boolean;
1467
+ set: boolean;
1468
+ }[]>;
1272
1469
  readonly listSettingsProfiles: (signal?: AbortSignal) => Promise<{
1273
1470
  name: string;
1274
1471
  description: string;
@@ -1365,7 +1562,11 @@ export declare const ApiProvider: import("react").Provider<{
1365
1562
  ok: true;
1366
1563
  version: number;
1367
1564
  }>;
1368
- readonly setMcpSecretEnv: (body: import("../../../api-client/dist/client").SetMcpSecretEnvBody) => Promise<{
1565
+ readonly getEnvConfig: (signal?: AbortSignal) => Promise<{
1566
+ env: Record<string, string>;
1567
+ secret_keys: string[];
1568
+ }>;
1569
+ readonly setEnvConfig: (env: Record<string, string>) => Promise<{
1369
1570
  status: string;
1370
1571
  env_keys: number;
1371
1572
  fanout: {
@@ -1399,7 +1600,37 @@ export declare const ApiProvider: import("react").Provider<{
1399
1600
  mode: "unreachable";
1400
1601
  };
1401
1602
  }>;
1402
- readonly getManifestPreserved: (signal?: AbortSignal) => Promise<{
1603
+ readonly getConfigMode: (signal?: AbortSignal) => Promise<{
1604
+ config_mode: string;
1605
+ read_only: boolean;
1606
+ }>;
1607
+ readonly reloadConfig: (targets?: string[] | null) => Promise<{
1608
+ op: string;
1609
+ reachable: boolean;
1610
+ local_only: boolean;
1611
+ results: {
1612
+ name: string;
1613
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1614
+ payload: unknown;
1615
+ error: string | null;
1616
+ detail: string | null;
1617
+ }[];
1618
+ error: string | null;
1619
+ }>;
1620
+ readonly listSubMcp: (signal?: AbortSignal) => Promise<Record<string, {
1621
+ tools: string[];
1622
+ transport: string;
1623
+ }>>;
1624
+ readonly createSubMcp: (slug: string, tools: string[], transport?: string) => Promise<{
1625
+ slug: string;
1626
+ tools: string[];
1627
+ transport: string;
1628
+ }>;
1629
+ readonly deleteSubMcp: (slug: string) => Promise<{
1630
+ slug: string;
1631
+ removed: true;
1632
+ }>;
1633
+ readonly getManifest: (signal?: AbortSignal) => Promise<{
1403
1634
  mcp: {
1404
1635
  [x: string]: unknown;
1405
1636
  managed?: {
@@ -1410,75 +1641,63 @@ export declare const ApiProvider: import("react").Provider<{
1410
1641
  }[];
1411
1642
  user_tools: string[];
1412
1643
  }>;
1413
- readonly getMcpEnvRefs: (signal?: AbortSignal) => Promise<{
1414
- var: string;
1415
- pointer: string;
1416
- has_default: boolean;
1417
- set: boolean;
1418
- }[]>;
1419
- readonly listProviders: (signal?: AbortSignal) => Promise<{
1420
- providers: {
1421
- id: string;
1422
- display_name: string;
1423
- description: string;
1424
- icon_url: string;
1425
- kind: "none" | "oauth";
1426
- origin: "system" | "community";
1427
- category: string;
1428
- sub_services: {
1429
- id: string;
1430
- display_name: string;
1431
- description: string;
1432
- scopes: string[];
1644
+ readonly setMcpConfig: (mcp: unknown[]) => Promise<{
1645
+ status: string;
1646
+ env_keys: number;
1647
+ fanout: {
1648
+ mode: "local-only";
1649
+ note: string;
1650
+ } | {
1651
+ op: string;
1652
+ reachable: boolean;
1653
+ local_only: boolean;
1654
+ results: {
1655
+ name: string;
1656
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1657
+ payload: unknown;
1658
+ error: string | null;
1659
+ detail: string | null;
1433
1660
  }[];
1434
- config_fields: {
1435
- key: string;
1436
- label: string;
1437
- target: "env" | "header";
1438
- required: boolean;
1439
- secret: boolean;
1661
+ error: string | null;
1662
+ mode: "fleet";
1663
+ } | {
1664
+ op: string;
1665
+ reachable: boolean;
1666
+ local_only: boolean;
1667
+ results: {
1668
+ name: string;
1669
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1670
+ payload: unknown;
1671
+ error: string | null;
1672
+ detail: string | null;
1440
1673
  }[];
1441
- }[];
1442
- categories: {
1443
- id: string;
1444
- display_name: string;
1445
- sort_order: number;
1446
- }[];
1674
+ error: string | null;
1675
+ mode: "unreachable";
1676
+ };
1447
1677
  }>;
1448
- readonly listConnections: (signal?: AbortSignal) => Promise<{
1449
- items: {
1450
- connection_id: string;
1451
- provider_id: string;
1452
- alias: string;
1453
- kind: "none" | "oauth";
1454
- account_identity: string | null;
1455
- enabled_sub_services: string[];
1456
- granted_scopes: string[];
1457
- unreachable_sub_services: string[];
1458
- auth_health_state: "healthy" | "reconnect_required" | "refresh_failing";
1459
- created_at: string;
1678
+ readonly getMcpStatus: (signal?: AbortSignal) => Promise<{
1679
+ bound: Record<string, string[]>;
1680
+ failed: {
1681
+ title: string;
1682
+ status: string;
1460
1683
  }[];
1461
- total: number;
1462
- unhealthy?: number | undefined;
1463
1684
  }>;
1464
- readonly getConnection: (id: string, signal?: AbortSignal) => Promise<{
1465
- connection_id: string;
1466
- provider_id: string;
1467
- alias: string;
1468
- kind: "none" | "oauth";
1469
- account_identity: string | null;
1470
- enabled_sub_services: string[];
1471
- granted_scopes: string[];
1472
- unreachable_sub_services: string[];
1473
- auth_health_state: "healthy" | "reconnect_required" | "refresh_failing";
1474
- created_at: string;
1685
+ readonly reloadMcp: (title: string) => Promise<{
1686
+ op: string;
1687
+ reachable: boolean;
1688
+ local_only: boolean;
1689
+ results: {
1690
+ name: string;
1691
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1692
+ payload: unknown;
1693
+ error: string | null;
1694
+ detail: string | null;
1695
+ }[];
1696
+ error: string | null;
1475
1697
  }>;
1476
- readonly startConnect: (args: import("@tai42/api-client").StartConnectArgs) => Promise<{
1477
- flow_id: string;
1478
- authorize_url: string;
1479
- } | {
1480
- connection_id: string;
1481
- added_manifest_entries: string[];
1698
+ readonly addToolsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{
1699
+ status: string;
1700
+ env_keys: number;
1482
1701
  fanout: {
1483
1702
  mode: "local-only";
1484
1703
  note: string;
@@ -1508,13 +1727,11 @@ export declare const ApiProvider: import("react").Provider<{
1508
1727
  }[];
1509
1728
  error: string | null;
1510
1729
  mode: "unreachable";
1511
- } | null;
1730
+ };
1512
1731
  }>;
1513
- readonly disconnect: (id: string) => Promise<{
1514
- connection_id: string;
1515
- upstream_revoke_outcome: "success" | "failed" | "skipped";
1516
- upstream_revoke_status: number | null;
1517
- removed_manifest_entries: string[];
1732
+ readonly removeToolsEntry: (title: string) => Promise<{
1733
+ status: string;
1734
+ env_keys: number;
1518
1735
  fanout: {
1519
1736
  mode: "local-only";
1520
1737
  note: string;
@@ -1544,20 +1761,11 @@ export declare const ApiProvider: import("react").Provider<{
1544
1761
  }[];
1545
1762
  error: string | null;
1546
1763
  mode: "unreachable";
1547
- } | null;
1548
- }>;
1549
- readonly reconnect: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{
1550
- flow_id: string;
1551
- authorize_url: string;
1764
+ };
1552
1765
  }>;
1553
- readonly patchSubServices: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{
1554
- connection_id: string;
1555
- enabled_sub_services: string[];
1556
- consent_required: boolean;
1557
- flow_id: string | null;
1558
- authorize_url: string | null;
1559
- added_manifest_entries: string[];
1560
- removed_manifest_entries: string[];
1766
+ readonly addAgentsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{
1767
+ status: string;
1768
+ env_keys: number;
1561
1769
  fanout: {
1562
1770
  mode: "local-only";
1563
1771
  note: string;
@@ -1587,12 +1795,11 @@ export declare const ApiProvider: import("react").Provider<{
1587
1795
  }[];
1588
1796
  error: string | null;
1589
1797
  mode: "unreachable";
1590
- } | null;
1798
+ };
1591
1799
  }>;
1592
- readonly completeOAuth: (state: string, code: string, error?: string) => Promise<{
1593
- kind: "success";
1594
- connection_id: string;
1595
- return_url: string;
1800
+ readonly removeAgentsEntry: (title: string) => Promise<{
1801
+ status: string;
1802
+ env_keys: number;
1596
1803
  fanout: {
1597
1804
  mode: "local-only";
1598
1805
  note: string;
@@ -1622,1215 +1829,1008 @@ export declare const ApiProvider: import("react").Provider<{
1622
1829
  }[];
1623
1830
  error: string | null;
1624
1831
  mode: "unreachable";
1625
- } | null;
1626
- } | {
1627
- kind: "failed";
1628
- reason: string;
1629
- } | {
1630
- kind: "cancelled";
1631
- message: string;
1632
- }>;
1633
- readonly listStudioPlugins: (signal?: AbortSignal) => Promise<{
1634
- name: string;
1635
- version: string;
1636
- api_version: number;
1637
- entry: string;
1638
- integrity: Record<string, string>;
1639
- contributions: {
1640
- tool_panels: Record<string, string>;
1641
- pages: string[];
1642
- settings_tabs: string[];
1643
- nav_entries: string[];
1644
1832
  };
1645
- }[]>;
1646
- readonly listInteractions: (page: number, pageSize: number, signal?: AbortSignal) => Promise<{
1647
- total: number;
1648
- page: number;
1649
- page_size: number;
1650
- next_page: number | null;
1651
- truncated: boolean;
1652
- items: {
1653
- interaction_id: string;
1654
- group_id: string;
1655
- question: string;
1656
- answer_format: "text" | "external" | "confirm" | "select" | "form";
1657
- format_payload: Record<string, unknown>;
1658
- created_at: string;
1659
- timeout_at: string;
1660
- sensitive: boolean;
1661
- server_verified?: boolean | undefined;
1662
- channel?: string | undefined;
1663
- recipient?: string | undefined;
1664
- origin?: string | undefined;
1665
- audience?: string | undefined;
1666
- media?: unknown[] | undefined;
1667
- }[];
1668
- }>;
1669
- readonly answerInteraction: (interactionId: string, answer: unknown) => Promise<{
1670
- interaction_id: string;
1671
- status: string;
1672
1833
  }>;
1673
- readonly cancelInteraction: (interactionId: string) => Promise<{
1674
- interaction_id: string;
1834
+ readonly updateApiTools: (body: import("@tai42/api-client").ApiToolsListsBody) => Promise<{
1675
1835
  status: string;
1676
- }>;
1677
- readonly listChannels: (signal?: AbortSignal) => Promise<{
1678
- channels: string[];
1679
- }>;
1680
- readonly listConversationRoutes: (signal?: AbortSignal) => Promise<{
1681
- items: {
1682
- callback_secret: string | null;
1683
- callback_url: string | null;
1684
- channel: string | null;
1685
- door: "channel" | "api";
1686
- error_reply_text: string | null;
1687
- execution_key: string;
1688
- execution_key_fingerprint: string;
1689
- initial_mode: "agent" | "manual";
1690
- locale: string | null;
1691
- our_identity: string | null;
1692
- payload_expr: {
1693
- content?: string | undefined;
1694
- id?: string | undefined;
1695
- kwargs?: Record<string, unknown> | undefined;
1696
- } | null;
1697
- reply_expr: {
1698
- content?: string | undefined;
1699
- id?: string | undefined;
1700
- kwargs?: Record<string, unknown> | undefined;
1701
- } | null;
1702
- route_name: string;
1703
- target_kind: "tool" | "agent";
1704
- target_name: string;
1705
- turns_per_hour_override: number | null;
1706
- }[];
1707
- total: number;
1708
- }>;
1709
- readonly createOrReplaceConversationRoute: (route: import("@tai42/api-client").ConversationRouteCreate) => Promise<{
1710
- created: boolean;
1711
- route_name: string;
1712
- route: {
1713
- callback_secret: string | null;
1714
- callback_url: string | null;
1715
- channel: string | null;
1716
- door: "channel" | "api";
1717
- error_reply_text: string | null;
1718
- execution_key: string;
1719
- execution_key_fingerprint: string;
1720
- initial_mode: "agent" | "manual";
1721
- locale: string | null;
1722
- our_identity: string | null;
1723
- payload_expr: {
1724
- content?: string | undefined;
1725
- id?: string | undefined;
1726
- kwargs?: Record<string, unknown> | undefined;
1727
- } | null;
1728
- reply_expr: {
1729
- content?: string | undefined;
1730
- id?: string | undefined;
1731
- kwargs?: Record<string, unknown> | undefined;
1732
- } | null;
1733
- route_name: string;
1734
- target_kind: "tool" | "agent";
1735
- target_name: string;
1736
- turns_per_hour_override: number | null;
1836
+ env_keys: number;
1837
+ fanout: {
1838
+ mode: "local-only";
1839
+ note: string;
1840
+ } | {
1841
+ op: string;
1842
+ reachable: boolean;
1843
+ local_only: boolean;
1844
+ results: {
1845
+ name: string;
1846
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1847
+ payload: unknown;
1848
+ error: string | null;
1849
+ detail: string | null;
1850
+ }[];
1851
+ error: string | null;
1852
+ mode: "fleet";
1853
+ } | {
1854
+ op: string;
1855
+ reachable: boolean;
1856
+ local_only: boolean;
1857
+ results: {
1858
+ name: string;
1859
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1860
+ payload: unknown;
1861
+ error: string | null;
1862
+ detail: string | null;
1863
+ }[];
1864
+ error: string | null;
1865
+ mode: "unreachable";
1737
1866
  };
1738
- callback_secret: string | null;
1739
- }>;
1740
- readonly deleteConversationRoute: (routeName: string) => Promise<{
1741
- removed: boolean;
1742
- route_name: string;
1743
1867
  }>;
1744
- readonly listConversationThreads: (routeName: string, page: number, pageSize: number, filters?: import("@tai42/api-client").ConversationThreadFilters, signal?: AbortSignal) => Promise<{
1745
- total: number;
1746
- page: number;
1747
- page_size: number;
1748
- next_page: number | null;
1749
- truncated: boolean;
1750
- items: {
1751
- thread_id: string;
1752
- client_address: string;
1753
- last_activity_at: number;
1754
- message_count: number;
1755
- last_delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent";
1868
+ readonly listFailedMcps: (signal?: AbortSignal) => Promise<{
1869
+ op: string;
1870
+ reachable: boolean;
1871
+ local_only: boolean;
1872
+ results: {
1873
+ name: string;
1874
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1875
+ payload: unknown;
1876
+ error: string | null;
1877
+ detail: string | null;
1756
1878
  }[];
1879
+ error: string | null;
1757
1880
  }>;
1758
- readonly readConversationTranscript: (query: import("@tai42/api-client").ConversationTranscriptQuery, signal?: AbortSignal) => Promise<{
1759
- order: "asc" | "desc";
1760
- total: number;
1761
- page: number;
1762
- page_size: number;
1763
- next_page: number | null;
1764
- truncated: boolean;
1765
- items: {
1766
- message_id: string;
1767
- route_name: string;
1768
- door: "channel" | "api";
1769
- thread_id: string;
1770
- client_address: string;
1771
- caller_principal: string | null;
1772
- inbound_text: string;
1773
- answer_status: "error" | "silent" | "answered" | null;
1774
- answer: string | null;
1775
- origin: "client" | "operator";
1776
- delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent";
1777
- created_at: number;
1778
- updated_at: number;
1779
- channel?: string | null | undefined;
1780
- our_identity?: string | null | undefined;
1781
- provider_message_id?: string | null | undefined;
1782
- callback_url?: string | null | undefined;
1783
- error?: string | null | undefined;
1784
- outbound_message_ids?: string[] | undefined;
1785
- attempts?: number | undefined;
1881
+ readonly reloadFailedMcps: () => Promise<{
1882
+ op: string;
1883
+ reachable: boolean;
1884
+ local_only: boolean;
1885
+ results: {
1886
+ name: string;
1887
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1888
+ payload: unknown;
1889
+ error: string | null;
1890
+ detail: string | null;
1786
1891
  }[];
1892
+ error: string | null;
1787
1893
  }>;
1788
- readonly searchConversationMessages: (query: import("@tai42/api-client").ConversationMessageSearchQuery, signal?: AbortSignal) => Promise<{
1789
- total: number;
1790
- page: number;
1791
- page_size: number;
1792
- next_page: number | null;
1793
- truncated: boolean;
1794
- items: {
1795
- message_id: string;
1796
- route_name: string;
1797
- door: "channel" | "api";
1798
- thread_id: string;
1799
- client_address: string;
1800
- caller_principal: string | null;
1801
- inbound_text: string;
1802
- answer_status: "error" | "silent" | "answered" | null;
1803
- answer: string | null;
1804
- origin: "client" | "operator";
1805
- delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent";
1806
- created_at: number;
1807
- updated_at: number;
1808
- channel?: string | null | undefined;
1809
- our_identity?: string | null | undefined;
1810
- provider_message_id?: string | null | undefined;
1811
- callback_url?: string | null | undefined;
1812
- error?: string | null | undefined;
1813
- outbound_message_ids?: string[] | undefined;
1814
- attempts?: number | undefined;
1894
+ readonly deregisterMcp: (title: string) => Promise<{
1895
+ op: string;
1896
+ reachable: boolean;
1897
+ local_only: boolean;
1898
+ results: {
1899
+ name: string;
1900
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1901
+ payload: unknown;
1902
+ error: string | null;
1903
+ detail: string | null;
1815
1904
  }[];
1905
+ error: string | null;
1816
1906
  }>;
1817
- readonly sendConversationThreadMessage: (routeName: string, body: import("@tai42/api-client").ConversationThreadMessageBody) => Promise<{
1818
- message_id: string;
1819
- thread_id: string;
1907
+ readonly listTemplates: (signal?: AbortSignal) => Promise<string[]>;
1908
+ readonly getTemplate: (templateId: string) => Promise<{
1909
+ template: string;
1910
+ schema: Record<string, unknown>;
1820
1911
  }>;
1821
- readonly getConversationThreadMode: (routeName: string, threadId: string, signal?: AbortSignal) => Promise<{
1822
- mode: "agent" | "manual";
1823
- source: "route" | "thread";
1912
+ readonly uploadTemplate: (path: string, content: string) => Promise<{
1913
+ path: string;
1914
+ uploaded: true;
1824
1915
  }>;
1825
- readonly setConversationThreadMode: (routeName: string, threadId: string, mode: import("@tai42/api-client").ConversationThreadMode) => Promise<{
1826
- mode: "agent" | "manual";
1827
- source: "route" | "thread";
1916
+ readonly deleteTemplate: (path: string) => Promise<{
1917
+ path: string;
1918
+ deleted: true;
1828
1919
  }>;
1829
- readonly listConversationConfigs: (signal?: AbortSignal) => Promise<{
1830
- items: {
1831
- greeting_template: string | null;
1832
- multichannel: boolean;
1833
- state_binding: {
1834
- states: {
1835
- input_injections: {
1836
- into: string;
1837
- jq: {
1838
- content?: string | undefined;
1839
- id?: string | undefined;
1840
- kwargs?: Record<string, unknown> | undefined;
1841
- } | null;
1842
- template_jq: string | null;
1843
- }[];
1844
- scope_expr: {
1845
- content?: string | undefined;
1846
- id?: string | undefined;
1847
- kwargs?: Record<string, unknown> | undefined;
1848
- } | null;
1849
- state: string;
1850
- subject_expr: {
1851
- content?: string | undefined;
1852
- id?: string | undefined;
1853
- kwargs?: Record<string, unknown> | undefined;
1854
- };
1855
- templates: string[];
1856
- updates: {
1857
- adapter: {
1858
- content?: string | undefined;
1859
- id?: string | undefined;
1860
- kwargs?: Record<string, unknown> | undefined;
1861
- } | null;
1862
- jq: {
1863
- content?: string | undefined;
1864
- id?: string | undefined;
1865
- kwargs?: Record<string, unknown> | undefined;
1866
- } | null;
1867
- op_id: {
1868
- content?: string | undefined;
1869
- id?: string | undefined;
1870
- kwargs?: Record<string, unknown> | undefined;
1871
- } | null;
1872
- template_jq: string | null;
1873
- }[];
1874
- }[];
1875
- } | null;
1876
- target_kind: "tool" | "agent";
1877
- target_name: string;
1920
+ readonly deleteTemplateDir: (path: string) => Promise<{
1921
+ path: string;
1922
+ deleted: true;
1923
+ }>;
1924
+ readonly renderTemplate: (text: import("@tai42/api-client").TemplatedText) => Promise<{
1925
+ rendered: string;
1926
+ }>;
1927
+ readonly clearTemplatesCache: () => Promise<{
1928
+ cleared: true;
1929
+ }>;
1930
+ readonly listExtensions: (signal?: AbortSignal) => Promise<{
1931
+ name: string;
1932
+ kind: string;
1933
+ }[]>;
1934
+ readonly getToolExtensions: (name: string, signal?: AbortSignal) => Promise<{
1935
+ combos: (string | {
1936
+ name: string;
1937
+ config: Record<string, unknown>;
1938
+ })[][];
1939
+ available: {
1940
+ name: string;
1941
+ kind: string;
1878
1942
  }[];
1879
- total: number;
1880
1943
  }>;
1881
- readonly getConversationConfig: (targetKind: import("@tai42/api-client").ConversationTargetKind, targetName: string, signal?: AbortSignal) => Promise<{
1882
- greeting_template: string | null;
1883
- multichannel: boolean;
1884
- state_binding: {
1885
- states: {
1886
- input_injections: {
1887
- into: string;
1888
- jq: {
1889
- content?: string | undefined;
1890
- id?: string | undefined;
1891
- kwargs?: Record<string, unknown> | undefined;
1892
- } | null;
1893
- template_jq: string | null;
1894
- }[];
1895
- scope_expr: {
1896
- content?: string | undefined;
1897
- id?: string | undefined;
1898
- kwargs?: Record<string, unknown> | undefined;
1899
- } | null;
1900
- state: string;
1901
- subject_expr: {
1902
- content?: string | undefined;
1903
- id?: string | undefined;
1904
- kwargs?: Record<string, unknown> | undefined;
1905
- };
1906
- templates: string[];
1907
- updates: {
1908
- adapter: {
1909
- content?: string | undefined;
1910
- id?: string | undefined;
1911
- kwargs?: Record<string, unknown> | undefined;
1912
- } | null;
1913
- jq: {
1914
- content?: string | undefined;
1915
- id?: string | undefined;
1916
- kwargs?: Record<string, unknown> | undefined;
1917
- } | null;
1918
- op_id: {
1919
- content?: string | undefined;
1920
- id?: string | undefined;
1921
- kwargs?: Record<string, unknown> | undefined;
1922
- } | null;
1923
- template_jq: string | null;
1924
- }[];
1944
+ readonly setToolExtensions: (name: string, combos: readonly import("@tai42/api-client").PresetExtensionElement[][]) => Promise<{
1945
+ status: string;
1946
+ env_keys: number;
1947
+ fanout: {
1948
+ mode: "local-only";
1949
+ note: string;
1950
+ } | {
1951
+ op: string;
1952
+ reachable: boolean;
1953
+ local_only: boolean;
1954
+ results: {
1955
+ name: string;
1956
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1957
+ payload: unknown;
1958
+ error: string | null;
1959
+ detail: string | null;
1925
1960
  }[];
1926
- } | null;
1927
- target_kind: "tool" | "agent";
1928
- target_name: string;
1929
- }>;
1930
- readonly setConversationConfig: (config: import("@tai42/api-client").TargetConversationConfig) => Promise<{
1931
- created: boolean;
1932
- target_kind: "tool" | "agent";
1933
- target_name: string;
1934
- config: {
1935
- greeting_template: string | null;
1936
- multichannel: boolean;
1937
- state_binding: {
1938
- states: {
1939
- input_injections: {
1940
- into: string;
1941
- jq: {
1942
- content?: string | undefined;
1943
- id?: string | undefined;
1944
- kwargs?: Record<string, unknown> | undefined;
1945
- } | null;
1946
- template_jq: string | null;
1947
- }[];
1948
- scope_expr: {
1949
- content?: string | undefined;
1950
- id?: string | undefined;
1951
- kwargs?: Record<string, unknown> | undefined;
1952
- } | null;
1953
- state: string;
1954
- subject_expr: {
1955
- content?: string | undefined;
1956
- id?: string | undefined;
1957
- kwargs?: Record<string, unknown> | undefined;
1958
- };
1959
- templates: string[];
1960
- updates: {
1961
- adapter: {
1962
- content?: string | undefined;
1963
- id?: string | undefined;
1964
- kwargs?: Record<string, unknown> | undefined;
1965
- } | null;
1966
- jq: {
1967
- content?: string | undefined;
1968
- id?: string | undefined;
1969
- kwargs?: Record<string, unknown> | undefined;
1970
- } | null;
1971
- op_id: {
1972
- content?: string | undefined;
1973
- id?: string | undefined;
1974
- kwargs?: Record<string, unknown> | undefined;
1975
- } | null;
1976
- template_jq: string | null;
1977
- }[];
1978
- }[];
1979
- } | null;
1980
- target_kind: "tool" | "agent";
1981
- target_name: string;
1961
+ error: string | null;
1962
+ mode: "fleet";
1963
+ } | {
1964
+ op: string;
1965
+ reachable: boolean;
1966
+ local_only: boolean;
1967
+ results: {
1968
+ name: string;
1969
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
1970
+ payload: unknown;
1971
+ error: string | null;
1972
+ detail: string | null;
1973
+ }[];
1974
+ error: string | null;
1975
+ mode: "unreachable";
1982
1976
  };
1983
1977
  }>;
1984
- readonly deleteConversationConfig: (targetKind: import("@tai42/api-client").ConversationTargetKind, targetName: string) => Promise<{
1985
- removed: boolean;
1986
- target_kind: "tool" | "agent";
1987
- target_name: string;
1978
+ readonly getBackendInfo: (signal?: AbortSignal) => Promise<{
1979
+ present: boolean;
1980
+ backend: string | null;
1981
+ module: string | null;
1988
1982
  }>;
1989
- readonly listFailedConversationMessages: (signal?: AbortSignal) => Promise<{
1990
- items: {
1991
- message_id: string;
1992
- route_name: string;
1993
- door: "channel" | "api";
1994
- thread_id: string;
1995
- client_address: string;
1996
- caller_principal: string | null;
1997
- inbound_text: string;
1998
- answer_status: "error" | "silent" | "answered" | null;
1999
- answer: string | null;
2000
- origin: "client" | "operator";
2001
- delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent";
2002
- created_at: number;
2003
- updated_at: number;
2004
- channel?: string | null | undefined;
2005
- our_identity?: string | null | undefined;
2006
- provider_message_id?: string | null | undefined;
2007
- callback_url?: string | null | undefined;
2008
- error?: string | null | undefined;
2009
- outbound_message_ids?: string[] | undefined;
2010
- attempts?: number | undefined;
1983
+ readonly listFleetWorkers: (signal?: AbortSignal) => Promise<{
1984
+ workers: {
1985
+ name: string;
1986
+ kind: "backend" | "serve";
1987
+ pid: number;
1988
+ generation: number;
1989
+ joined_at: string;
1990
+ beat_at: string;
1991
+ state: "ready" | "resyncing" | "recycling";
1992
+ stale: boolean;
1993
+ last_op: {
1994
+ op: string;
1995
+ outcome: string;
1996
+ at: string;
1997
+ } | null;
2011
1998
  }[];
2012
- total: number;
2013
1999
  }>;
2014
- readonly deleteConversationThread: (routeName: string, threadId: string) => Promise<{
2015
- removed: number;
2016
- route_name: string;
2017
- thread_id: string;
2000
+ readonly reloadFleetConfig: (targets: string[] | null) => Promise<{
2001
+ op: string;
2002
+ reachable: boolean;
2003
+ local_only: boolean;
2004
+ results: {
2005
+ name: string;
2006
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
2007
+ payload: unknown;
2008
+ error: string | null;
2009
+ detail: string | null;
2010
+ }[];
2011
+ error: string | null;
2018
2012
  }>;
2019
- readonly deleteConversationPerson: (personId: string) => Promise<{
2020
- person_id: string;
2021
- removed: number;
2022
- erased: boolean;
2013
+ readonly getStorageInfo: (signal?: AbortSignal) => Promise<{
2014
+ present: boolean;
2015
+ provider: string | null;
2016
+ module: string | null;
2023
2017
  }>;
2024
- readonly getWebEntryGate: (identity: string, signal?: AbortSignal) => Promise<{
2025
- enabled: boolean;
2026
- codes: {
2027
- code_id: string;
2028
- label: string | null;
2029
- created_at: string;
2030
- expires_at: string | null;
2031
- }[];
2018
+ readonly listStorageResources: (signal?: AbortSignal) => Promise<{
2019
+ resources: string[];
2032
2020
  }>;
2033
- readonly setWebEntryGate: (identity: string, enabled: boolean) => Promise<{
2034
- enabled: boolean;
2021
+ readonly statStorageResource: (id: string, signal?: AbortSignal) => Promise<{
2022
+ id: string;
2023
+ content_type: string | null;
2035
2024
  }>;
2036
- readonly mintWebEntryCode: (identity: string, body: import("@tai42/api-client").WebEntryCodeMintBody) => Promise<{
2037
- code: string;
2038
- code_id: string;
2039
- expires_at: string | null;
2025
+ readonly downloadStorageResource: (id: string, signal?: AbortSignal) => Promise<Blob>;
2026
+ readonly uploadStorageResource: (body: import("@tai42/api-client").StorageUploadBody) => Promise<{
2027
+ id: string;
2028
+ stored: true;
2040
2029
  }>;
2041
- readonly revokeWebEntryCode: (identity: string, codeId: string) => Promise<{
2042
- status: "revoked";
2030
+ readonly deleteStorageResource: (id: string) => Promise<{
2031
+ id: string;
2032
+ deleted: true;
2043
2033
  }>;
2044
- readonly listNotifications: (signal?: AbortSignal) => Promise<{
2045
- notifications: {
2046
- id: string;
2047
- message: string;
2048
- recipient: string | null;
2049
- created_at: string;
2050
- audience?: string | null | undefined;
2051
- media?: unknown[] | null | undefined;
2052
- template?: {
2053
- body_parameters: string[];
2054
- buttons: unknown[];
2055
- header_media: {
2056
- caption: string | null;
2057
- filename: string | null;
2058
- kind: "image" | "link" | "document" | "video" | "audio";
2059
- url: string;
2060
- } | null;
2061
- language: string;
2062
- name: string;
2063
- } | null | undefined;
2064
- options?: string[] | null | undefined;
2065
- }[];
2034
+ readonly deleteStorageDir: (path: string) => Promise<{
2035
+ dir: string;
2036
+ deleted: true;
2066
2037
  }>;
2067
- readonly listAgents: (signal?: AbortSignal) => Promise<{
2068
- items: {
2038
+ readonly listToolMeta: (signal?: AbortSignal) => Promise<{
2039
+ folders: {
2040
+ id: string;
2069
2041
  name: string;
2070
- description: string;
2071
- tool_name: string;
2072
- input_schema: Record<string, unknown>;
2073
- spec_runnable: boolean;
2042
+ parent_id: string | null;
2074
2043
  }[];
2075
- total: number;
2076
- }>;
2077
- readonly listSpecRunnableAgents: (signal?: AbortSignal) => Promise<{
2078
- items: {
2079
- name: string;
2080
- description: string;
2044
+ meta: {
2081
2045
  tool_name: string;
2082
- input_schema: Record<string, unknown>;
2083
- spec_runnable: boolean;
2046
+ display_name: string | null;
2047
+ folder_id: string | null;
2048
+ tags: string[];
2049
+ badges: string[];
2050
+ hidden: boolean | null;
2084
2051
  }[];
2085
- total: number;
2086
2052
  }>;
2087
- readonly streamAgentRun: (name: string, input: unknown, signal?: AbortSignal) => Promise<AsyncGenerator<import("@tai42/api-client").ParsedAgentEvent, any, any>>;
2088
- readonly streamAuthoredAgentRun: (name: string, input: unknown, signal?: AbortSignal) => Promise<AsyncGenerator<import("@tai42/api-client").ParsedAgentEvent, any, any>>;
2089
- readonly listHooks: (topic?: string, signal?: AbortSignal) => Promise<{
2090
- items: {
2091
- condition: {
2092
- content?: string | undefined;
2093
- id?: string | undefined;
2094
- kwargs?: Record<string, unknown> | undefined;
2095
- } | null;
2096
- execution_key: string;
2097
- execution_key_fingerprint: string;
2098
- expr: {
2099
- content?: string | undefined;
2100
- id?: string | undefined;
2101
- kwargs?: Record<string, unknown> | undefined;
2102
- } | null;
2103
- name: string;
2104
- state_binding: {
2105
- states: {
2106
- input_injections: {
2107
- into: string;
2108
- jq: {
2109
- content?: string | undefined;
2110
- id?: string | undefined;
2111
- kwargs?: Record<string, unknown> | undefined;
2112
- } | null;
2113
- template_jq: string | null;
2114
- }[];
2115
- scope_expr: {
2116
- content?: string | undefined;
2117
- id?: string | undefined;
2118
- kwargs?: Record<string, unknown> | undefined;
2119
- } | null;
2120
- state: string;
2121
- subject_expr: {
2122
- content?: string | undefined;
2123
- id?: string | undefined;
2124
- kwargs?: Record<string, unknown> | undefined;
2125
- };
2126
- templates: string[];
2127
- updates: {
2128
- adapter: {
2129
- content?: string | undefined;
2130
- id?: string | undefined;
2131
- kwargs?: Record<string, unknown> | undefined;
2132
- } | null;
2133
- jq: {
2134
- content?: string | undefined;
2135
- id?: string | undefined;
2136
- kwargs?: Record<string, unknown> | undefined;
2137
- } | null;
2138
- op_id: {
2139
- content?: string | undefined;
2140
- id?: string | undefined;
2141
- kwargs?: Record<string, unknown> | undefined;
2142
- } | null;
2143
- template_jq: string | null;
2144
- }[];
2145
- }[];
2146
- } | null;
2147
- subject: {
2148
- key_expr: {
2149
- content?: string | undefined;
2150
- id?: string | undefined;
2151
- kwargs?: Record<string, unknown> | undefined;
2152
- };
2153
- kind: string;
2154
- target_kind: "tool" | "agent";
2155
- target_name: string;
2156
- } | null;
2157
- tool: string;
2158
- tool_kwargs: Record<string, unknown>;
2159
- topic: string;
2053
+ readonly upsertToolMeta: (toolName: string, patch: import("@tai42/api-client").ToolMetaPatch) => Promise<{
2054
+ tool_name: string;
2055
+ display_name: string | null;
2056
+ folder_id: string | null;
2057
+ tags: string[];
2058
+ badges: string[];
2059
+ hidden: boolean | null;
2060
+ }>;
2061
+ readonly deleteToolMeta: (toolName: string) => Promise<{
2062
+ tool_name: string;
2063
+ deleted: true;
2064
+ }>;
2065
+ readonly createFolder: (name: string, parentId?: string | null) => Promise<{
2066
+ id: string;
2067
+ name: string;
2068
+ parent_id: string | null;
2069
+ }>;
2070
+ readonly renameFolder: (folderId: string, name: string) => Promise<{
2071
+ id: string;
2072
+ name: string;
2073
+ parent_id: string | null;
2074
+ }>;
2075
+ readonly moveFolder: (folderId: string, parentId: string | null) => Promise<{
2076
+ id: string;
2077
+ name: string;
2078
+ parent_id: string | null;
2079
+ }>;
2080
+ readonly deleteFolder: (folderId: string) => Promise<{
2081
+ folder_id: string;
2082
+ deleted: true;
2083
+ }>;
2084
+ readonly listStates: (signal?: AbortSignal) => Promise<{
2085
+ default_subject_kind: string;
2086
+ description: string;
2087
+ effective_schema: Record<string, unknown> | null;
2088
+ name: string;
2089
+ regimes: Record<string, unknown>[] | null;
2090
+ retention_days: number | null;
2091
+ subject_kinds: string[];
2092
+ updated_at: string | null;
2093
+ schema?: Record<string, unknown> | {
2094
+ content?: string | undefined;
2095
+ id?: string | undefined;
2096
+ kwargs?: Record<string, unknown> | undefined;
2097
+ } | undefined;
2098
+ }[]>;
2099
+ readonly getState: (name: string, signal?: AbortSignal) => Promise<{
2100
+ default_subject_kind: string;
2101
+ description: string;
2102
+ effective_schema: Record<string, unknown> | null;
2103
+ name: string;
2104
+ regimes: Record<string, unknown>[] | null;
2105
+ retention_days: number | null;
2106
+ subject_kinds: string[];
2107
+ updated_at: string | null;
2108
+ attachments: {
2109
+ template: string;
2110
+ path: string[];
2111
+ parameters: Record<string, unknown>;
2112
+ declarations: Record<string, unknown>;
2160
2113
  }[];
2161
- total: number;
2162
- topic_verifiers: Record<string, {
2163
- verifier: string;
2164
- config: Record<string, unknown>;
2165
- }>;
2166
- trigger_auth: Record<string, "public" | "verifier" | "token" | "token+api_key" | "out-of-service">;
2114
+ schema?: Record<string, unknown> | {
2115
+ content?: string | undefined;
2116
+ id?: string | undefined;
2117
+ kwargs?: Record<string, unknown> | undefined;
2118
+ } | undefined;
2167
2119
  }>;
2168
- readonly registerHook: (params: import("@tai42/api-client").HookRegister) => Promise<{
2169
- registered: boolean;
2120
+ readonly putState: (name: string, body: import("@tai42/api-client").StateDeclarationBody) => Promise<{
2121
+ default_subject_kind: string;
2122
+ description: string;
2123
+ effective_schema: Record<string, unknown> | null;
2170
2124
  name: string;
2125
+ regimes: Record<string, unknown>[] | null;
2126
+ retention_days: number | null;
2127
+ subject_kinds: string[];
2128
+ updated_at: string | null;
2129
+ attachments: {
2130
+ template: string;
2131
+ path: string[];
2132
+ parameters: Record<string, unknown>;
2133
+ declarations: Record<string, unknown>;
2134
+ }[];
2135
+ schema?: Record<string, unknown> | {
2136
+ content?: string | undefined;
2137
+ id?: string | undefined;
2138
+ kwargs?: Record<string, unknown> | undefined;
2139
+ } | undefined;
2171
2140
  }>;
2172
- readonly unregisterHook: (name: string) => Promise<{
2173
- removed: boolean;
2141
+ readonly deleteState: (name: string) => Promise<{
2174
2142
  name: string;
2143
+ deleted: true;
2175
2144
  }>;
2176
- readonly listHookVerifiers: (signal?: AbortSignal) => Promise<string[]>;
2177
- readonly setTopicVerifier: (topic: string, body: import("@tai42/api-client").TopicVerifierBody) => Promise<{
2178
- topic: string;
2179
- verifier: string;
2145
+ readonly getStateStats: (name: string, signal?: AbortSignal) => Promise<{
2146
+ records: number;
2147
+ per_field: Record<string, number>;
2148
+ per_kind: Record<string, number>;
2149
+ consumers: number;
2180
2150
  }>;
2181
- readonly deleteTopicVerifier: (topic: string) => Promise<{
2182
- removed: boolean;
2183
- topic: string;
2151
+ readonly listStateAttachments: (name: string, signal?: AbortSignal) => Promise<{
2152
+ template: string;
2153
+ path: string[];
2154
+ parameters: Record<string, unknown>;
2155
+ declarations: Record<string, unknown>;
2156
+ }[]>;
2157
+ readonly getStateAttachment: (name: string, template: string, signal?: AbortSignal) => Promise<{
2158
+ template: string;
2159
+ path: string[];
2160
+ parameters: Record<string, unknown>;
2161
+ declarations: Record<string, unknown>;
2184
2162
  }>;
2185
- readonly createTriggerLink: (body: import("@tai42/api-client").TriggerLinkCreateBody) => Promise<{
2186
- name: string;
2187
- trigger_path: string;
2188
- token: string;
2189
- topic: string;
2190
- expires_at: string | null;
2163
+ readonly attachStateTemplate: (name: string, template: string, body: import("@tai42/api-client").StateAttachmentBody) => Promise<{
2164
+ attached: true;
2165
+ state: string;
2166
+ template: string;
2191
2167
  }>;
2192
- readonly listTriggerLinks: (signal?: AbortSignal) => Promise<{
2193
- items: {
2194
- name: string;
2195
- topic: string;
2196
- execution_key: string;
2197
- trigger_auth: "public" | "verifier" | "token" | "token+api_key" | "out-of-service";
2198
- tool_kwargs: Record<string, unknown> | null;
2199
- created_by: string | null;
2200
- created_at: string;
2201
- expires_at: string | null;
2202
- token_hash_prefix: string;
2168
+ readonly patchStateAttachment: (name: string, template: string, body: import("@tai42/api-client").StateAttachmentBody) => Promise<{
2169
+ updated: true;
2170
+ state: string;
2171
+ template: string;
2172
+ }>;
2173
+ readonly detachStateTemplate: (name: string, template: string) => Promise<{
2174
+ detached: true;
2175
+ state: string;
2176
+ template: string;
2177
+ }>;
2178
+ readonly listStateSubjects: (name: string, params: {
2179
+ kind?: string;
2180
+ } & import("@tai42/api-client").StatePageQuery, signal?: AbortSignal) => Promise<{
2181
+ subjects: {
2182
+ subject: {
2183
+ target_kind: "tool" | "agent";
2184
+ target_name: string;
2185
+ kind: string;
2186
+ key: string;
2187
+ };
2188
+ updated_at: number;
2203
2189
  }[];
2204
- total: number;
2190
+ next_cursor: string | null;
2205
2191
  }>;
2206
- readonly deleteTriggerLink: (name: string) => Promise<{
2207
- removed: boolean;
2208
- name: string;
2192
+ readonly searchStateRecords: (name: string, body: {
2193
+ filters: Record<string, unknown>;
2194
+ } & import("@tai42/api-client").StatePageQuery, signal?: AbortSignal) => Promise<{
2195
+ matches: {
2196
+ subject: {
2197
+ target_kind: "tool" | "agent";
2198
+ target_name: string;
2199
+ kind: string;
2200
+ key: string;
2201
+ };
2202
+ updated_at: number;
2203
+ }[];
2204
+ next_cursor: string | null;
2209
2205
  }>;
2210
- readonly getMcpConfigSchema: (signal?: AbortSignal) => Promise<Record<string, unknown>>;
2211
- readonly getSettingsSchema: (signal?: AbortSignal) => Promise<{
2212
- groups: {
2213
- name: string;
2214
- module: string;
2215
- qualname: string;
2216
- fields: {
2217
- name: string;
2218
- env_var: string;
2219
- type: string;
2220
- default: unknown;
2221
- required: boolean;
2222
- secret: boolean;
2223
- description: string | null;
2224
- nested_group: string | null;
2225
- default_namespace_var: string | null;
2226
- value: unknown;
2227
- }[];
2206
+ readonly getStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, signal?: AbortSignal) => Promise<{
2207
+ state: string;
2208
+ subject: {
2209
+ target_kind: "tool" | "agent";
2210
+ target_name: string;
2211
+ kind: string;
2212
+ key: string;
2213
+ };
2214
+ data: Record<string, unknown>;
2215
+ seq: number;
2216
+ canonical_subject: {
2217
+ target_kind: "tool" | "agent";
2218
+ target_name: string;
2219
+ kind: string;
2220
+ key: string;
2221
+ };
2222
+ folded_from: {
2223
+ target_kind: "tool" | "agent";
2224
+ target_name: string;
2225
+ kind: string;
2226
+ key: string;
2227
+ }[];
2228
+ } | null>;
2229
+ readonly putStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, data: Record<string, unknown>) => Promise<{
2230
+ state: string;
2231
+ subject: {
2232
+ target_kind: "tool" | "agent";
2233
+ target_name: string;
2234
+ kind: string;
2235
+ key: string;
2236
+ };
2237
+ data: Record<string, unknown>;
2238
+ seq: number;
2239
+ canonical_subject: {
2240
+ target_kind: "tool" | "agent";
2241
+ target_name: string;
2242
+ kind: string;
2243
+ key: string;
2244
+ };
2245
+ folded_from: {
2246
+ target_kind: "tool" | "agent";
2247
+ target_name: string;
2248
+ kind: string;
2249
+ key: string;
2228
2250
  }[];
2229
2251
  }>;
2230
- readonly listScopes: (signal?: AbortSignal) => Promise<Record<string, string>>;
2231
- readonly addUrlToScope: (body: import("@tai42/api-client").AddUrlToScopeBody) => Promise<{
2232
- scope_id: string;
2233
- url: string;
2252
+ readonly patchStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, data: Record<string, unknown>) => Promise<{
2253
+ state: string;
2254
+ subject: {
2255
+ target_kind: "tool" | "agent";
2256
+ target_name: string;
2257
+ kind: string;
2258
+ key: string;
2259
+ };
2260
+ data: Record<string, unknown>;
2261
+ seq: number;
2262
+ canonical_subject: {
2263
+ target_kind: "tool" | "agent";
2264
+ target_name: string;
2265
+ kind: string;
2266
+ key: string;
2267
+ };
2268
+ folded_from: {
2269
+ target_kind: "tool" | "agent";
2270
+ target_name: string;
2271
+ kind: string;
2272
+ key: string;
2273
+ }[];
2234
2274
  }>;
2235
- readonly removeUrlFromScope: (body: {
2236
- url: string;
2275
+ readonly applyStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, ops: readonly Record<string, unknown>[]) => Promise<{
2276
+ applied: boolean;
2277
+ data: Record<string, unknown> | null;
2278
+ seq: number | null;
2279
+ skipped: Record<string, unknown>[];
2280
+ }>;
2281
+ readonly evalTemplateJq: (name: string, subject: import("@tai42/api-client").StateSubjectRef, jqName: string, params?: Record<string, unknown>, signal?: AbortSignal) => Promise<{
2282
+ name: string;
2283
+ purpose: "input";
2284
+ value: unknown;
2285
+ }>;
2286
+ readonly applyTemplateJq: (name: string, subject: import("@tai42/api-client").StateSubjectRef, jqName: string, body?: {
2287
+ input?: unknown;
2288
+ op_id?: string;
2237
2289
  }) => Promise<{
2238
- url: string;
2290
+ name: string;
2291
+ applied: boolean;
2292
+ data: Record<string, unknown> | null;
2293
+ seq: number | null;
2294
+ skipped: Record<string, unknown>[];
2239
2295
  }>;
2240
- readonly removeScope: (scopeId: string) => Promise<{
2241
- scope_id: string;
2242
- deleted_keys: number;
2296
+ readonly deleteStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef) => Promise<{
2297
+ erased: true;
2243
2298
  }>;
2244
- readonly listAuthRoutes: (signal?: AbortSignal) => Promise<{
2245
- path: string;
2246
- methods: string[];
2247
- mapped: string | null;
2248
- tags: string[];
2249
- summary: string;
2250
- action: "read" | "write" | "secret" | "fenced" | null;
2251
- }[]>;
2252
- readonly listPublicRoutes: (signal?: AbortSignal) => Promise<string[]>;
2253
- readonly pinRoutePublic: (body: import("@tai42/api-client").PinRoutePublicBody) => Promise<{
2254
- url: string;
2299
+ readonly foldStateRecord: (name: string, subject: import("@tai42/api-client").StateSubjectRef, into: import("@tai42/api-client").StateSubjectRef, mode: "switch" | "merge") => Promise<{
2300
+ mode: "switch" | "merge";
2301
+ from: {
2302
+ kind: string;
2303
+ key: string;
2304
+ };
2305
+ into: {
2306
+ kind: string;
2307
+ key: string;
2308
+ };
2309
+ already: boolean;
2310
+ flattened: number;
2255
2311
  }>;
2256
- readonly unpinPublicRoute: (url: string) => Promise<{
2257
- url: string;
2312
+ readonly listStateWrites: (name: string, subject: import("@tai42/api-client").StateSubjectRef, params?: import("@tai42/api-client").StatePageQuery, signal?: AbortSignal) => Promise<{
2313
+ items: {
2314
+ seq: number;
2315
+ at: string;
2316
+ origin: {
2317
+ consumer: string | null;
2318
+ meta: Record<string, unknown> | null;
2319
+ run_id: string | null;
2320
+ op_id: string | null;
2321
+ door: string;
2322
+ actor: string | null;
2323
+ turn_id: string | null;
2324
+ inbound_id: string | null;
2325
+ };
2326
+ paths: (string | number)[][];
2327
+ }[];
2328
+ next_cursor: string | null;
2258
2329
  }>;
2259
- readonly listRoles: (signal?: AbortSignal) => Promise<{
2260
- allow_all: boolean;
2261
- base_tier: string | null;
2262
- condition: {
2263
- content?: string | undefined;
2264
- id?: string | undefined;
2265
- kwargs?: Record<string, unknown> | undefined;
2330
+ readonly stateConsumers: (name: string, signal?: AbortSignal) => Promise<{
2331
+ kind: string;
2332
+ name: string | null;
2333
+ detail: string | null;
2334
+ link: {
2335
+ token: string | null;
2336
+ plugin_path: string | null;
2337
+ search: Record<string, unknown> | null;
2266
2338
  } | null;
2267
- description: string;
2268
- grants: Record<string, "none" | "read" | "write">;
2269
- name: string;
2270
- scopes: string[];
2339
+ unavailable: string | null;
2271
2340
  }[]>;
2272
- readonly createRole: (body: import("@tai42/api-client").RoleCreateBody) => Promise<{
2273
- allow_all: boolean;
2274
- base_tier: string | null;
2275
- condition: {
2276
- content?: string | undefined;
2277
- id?: string | undefined;
2278
- kwargs?: Record<string, unknown> | undefined;
2341
+ readonly listStateTemplates: (signal?: AbortSignal) => Promise<{
2342
+ declarations: {
2343
+ check: {
2344
+ content?: string | undefined;
2345
+ id?: string | undefined;
2346
+ kwargs?: Record<string, unknown> | undefined;
2347
+ } | null;
2348
+ schema: Record<string, unknown>;
2279
2349
  } | null;
2280
2350
  description: string;
2281
- grants: Record<string, "none" | "read" | "write">;
2351
+ kind: "state-template";
2282
2352
  name: string;
2283
- scopes: string[];
2284
- }>;
2285
- readonly updateRole: (name: string, body: import("@tai42/api-client").RoleUpdateBody) => Promise<{
2286
- allow_all: boolean;
2287
- base_tier: string | null;
2288
- condition: {
2353
+ parameters: Record<string, unknown>;
2354
+ reconcile: {
2355
+ close: {
2356
+ content?: string | undefined;
2357
+ id?: string | undefined;
2358
+ kwargs?: Record<string, unknown> | undefined;
2359
+ };
2360
+ orphans: {
2361
+ content?: string | undefined;
2362
+ id?: string | undefined;
2363
+ kwargs?: Record<string, unknown> | undefined;
2364
+ };
2365
+ resolutions: {
2366
+ content?: string | undefined;
2367
+ id?: string | undefined;
2368
+ kwargs?: Record<string, unknown> | undefined;
2369
+ };
2370
+ } | null;
2371
+ regimes: Record<string, unknown>[];
2372
+ template_jq: Record<string, {
2373
+ description: string;
2374
+ jq: {
2375
+ content?: string | undefined;
2376
+ id?: string | undefined;
2377
+ kwargs?: Record<string, unknown> | undefined;
2378
+ };
2379
+ params: string[];
2380
+ purpose: "input" | "update";
2381
+ reads: string[][];
2382
+ writes: string[][];
2383
+ }> | null;
2384
+ trace: Record<string, unknown>;
2385
+ attached_to: number;
2386
+ shipped_default: boolean;
2387
+ schema?: Record<string, unknown> | {
2289
2388
  content?: string | undefined;
2290
2389
  id?: string | undefined;
2291
2390
  kwargs?: Record<string, unknown> | undefined;
2391
+ } | undefined;
2392
+ }[]>;
2393
+ readonly getStateTemplate: (name: string, signal?: AbortSignal) => Promise<{
2394
+ declarations: {
2395
+ check: {
2396
+ content?: string | undefined;
2397
+ id?: string | undefined;
2398
+ kwargs?: Record<string, unknown> | undefined;
2399
+ } | null;
2400
+ schema: Record<string, unknown>;
2292
2401
  } | null;
2293
2402
  description: string;
2294
- grants: Record<string, "none" | "read" | "write">;
2295
- name: string;
2296
- scopes: string[];
2297
- }>;
2298
- readonly deleteRole: (name: string) => Promise<{
2403
+ kind: "state-template";
2299
2404
  name: string;
2300
- deleted: boolean;
2301
- }>;
2302
- readonly listRoleVersions: (name: string, signal?: AbortSignal) => Promise<{
2303
- versions: {
2304
- version: number;
2305
- body: {
2306
- allow_all: boolean;
2307
- base_tier: string | null;
2308
- condition: {
2309
- content?: string | undefined;
2310
- id?: string | undefined;
2311
- kwargs?: Record<string, unknown> | undefined;
2312
- } | null;
2313
- description: string;
2314
- grants: Record<string, "none" | "read" | "write">;
2315
- name: string;
2316
- scopes: string[];
2405
+ parameters: Record<string, unknown>;
2406
+ reconcile: {
2407
+ close: {
2408
+ content?: string | undefined;
2409
+ id?: string | undefined;
2410
+ kwargs?: Record<string, unknown> | undefined;
2317
2411
  };
2318
- tags: string[];
2319
- created_at: string;
2320
- is_current: boolean;
2321
- }[];
2322
- audit: {
2323
- version: number;
2324
- body: {
2325
- action: string;
2326
- actor: string | null;
2327
- before: unknown;
2328
- after: unknown;
2412
+ orphans: {
2413
+ content?: string | undefined;
2414
+ id?: string | undefined;
2415
+ kwargs?: Record<string, unknown> | undefined;
2329
2416
  };
2330
- tags: string[];
2331
- created_at: string;
2332
- is_current: boolean;
2333
- }[];
2334
- }>;
2335
- readonly rollbackRole: (name: string, version: number) => Promise<{
2336
- allow_all: boolean;
2337
- base_tier: string | null;
2338
- condition: {
2417
+ resolutions: {
2418
+ content?: string | undefined;
2419
+ id?: string | undefined;
2420
+ kwargs?: Record<string, unknown> | undefined;
2421
+ };
2422
+ } | null;
2423
+ regimes: Record<string, unknown>[];
2424
+ template_jq: Record<string, {
2425
+ description: string;
2426
+ jq: {
2427
+ content?: string | undefined;
2428
+ id?: string | undefined;
2429
+ kwargs?: Record<string, unknown> | undefined;
2430
+ };
2431
+ params: string[];
2432
+ purpose: "input" | "update";
2433
+ reads: string[][];
2434
+ writes: string[][];
2435
+ }> | null;
2436
+ trace: Record<string, unknown>;
2437
+ schema?: Record<string, unknown> | {
2339
2438
  content?: string | undefined;
2340
2439
  id?: string | undefined;
2341
2440
  kwargs?: Record<string, unknown> | undefined;
2441
+ } | undefined;
2442
+ }>;
2443
+ readonly putStateTemplate: (name: string, body: import("@tai42/api-client").StateTemplateBody, replace?: boolean) => Promise<{
2444
+ declarations: {
2445
+ check: {
2446
+ content?: string | undefined;
2447
+ id?: string | undefined;
2448
+ kwargs?: Record<string, unknown> | undefined;
2449
+ } | null;
2450
+ schema: Record<string, unknown>;
2342
2451
  } | null;
2343
2452
  description: string;
2344
- grants: Record<string, "none" | "read" | "write">;
2453
+ kind: "state-template";
2345
2454
  name: string;
2346
- scopes: string[];
2347
- }>;
2348
- readonly listTokensPayload: (signal?: AbortSignal) => Promise<{
2349
- user_id: string;
2350
- description: string;
2351
- scopes: string[];
2352
- policy_data: unknown;
2353
- condition?: {
2455
+ parameters: Record<string, unknown>;
2456
+ reconcile: {
2457
+ close: {
2458
+ content?: string | undefined;
2459
+ id?: string | undefined;
2460
+ kwargs?: Record<string, unknown> | undefined;
2461
+ };
2462
+ orphans: {
2463
+ content?: string | undefined;
2464
+ id?: string | undefined;
2465
+ kwargs?: Record<string, unknown> | undefined;
2466
+ };
2467
+ resolutions: {
2468
+ content?: string | undefined;
2469
+ id?: string | undefined;
2470
+ kwargs?: Record<string, unknown> | undefined;
2471
+ };
2472
+ } | null;
2473
+ regimes: Record<string, unknown>[];
2474
+ template_jq: Record<string, {
2475
+ description: string;
2476
+ jq: {
2477
+ content?: string | undefined;
2478
+ id?: string | undefined;
2479
+ kwargs?: Record<string, unknown> | undefined;
2480
+ };
2481
+ params: string[];
2482
+ purpose: "input" | "update";
2483
+ reads: string[][];
2484
+ writes: string[][];
2485
+ }> | null;
2486
+ trace: Record<string, unknown>;
2487
+ schema?: Record<string, unknown> | {
2354
2488
  content?: string | undefined;
2355
2489
  id?: string | undefined;
2356
2490
  kwargs?: Record<string, unknown> | undefined;
2357
- } | null | undefined;
2358
- }[]>;
2359
- readonly createApiKey: (body: import("@tai42/api-client").ApiKeyBody) => Promise<string>;
2360
- readonly editApiKey: (userId: string, body: Omit<import("@tai42/api-client").ApiKeyBody, "user_id">) => Promise<{
2361
- user_id: string;
2362
- updated: boolean;
2363
- }>;
2364
- readonly revokeApiKey: (userId: string) => Promise<{
2365
- user_id: string;
2366
- revoked: boolean;
2367
- }>;
2368
- readonly createClaimLink: (body: import("@tai42/api-client").ClaimLinkBody) => Promise<{
2369
- claim_path: string;
2370
- token: string;
2371
- expires_at: string;
2372
- }>;
2373
- readonly getMe: (signal?: AbortSignal) => Promise<{
2374
- user_id: string;
2375
- owner_user_id: string | null;
2376
- admin: boolean;
2377
- scopes: string[];
2378
- routes: {
2379
- path: string;
2380
- methods: string[];
2381
- }[];
2382
- route_patterns: {
2383
- pattern: string;
2384
- scope_id: string;
2385
- }[];
2386
- sub_mcp: {
2387
- tools: string[];
2388
- transport: string;
2389
- slug: string;
2390
- }[];
2391
- tools: string[];
2392
- agents: string[];
2393
- mintable: boolean;
2394
- }>;
2395
- readonly getLoginMethods: (options?: {
2396
- signal?: AbortSignal;
2397
- }) => Promise<{
2398
- methods: ({
2399
- shape: "form";
2400
- id: string;
2401
- title: string;
2402
- purpose: "login" | "bootstrap" | "invite";
2403
- fields: {
2404
- name: string;
2405
- label: string;
2406
- secret: boolean;
2407
- autocomplete?: string | undefined;
2408
- }[];
2409
- submit_path: string;
2410
- } | {
2411
- shape: "button";
2412
- id: string;
2413
- label: string;
2414
- href: string;
2415
- icon?: string | undefined;
2416
- })[];
2417
- bootstrap: boolean;
2418
- }>;
2419
- readonly submitLoginForm: (path: string, values: Record<string, string>) => Promise<{
2420
- token: string;
2421
- user_id: string;
2491
+ } | undefined;
2422
2492
  }>;
2423
- readonly exchangeSsoCode: (code: string) => Promise<{
2424
- token: string;
2425
- user_id: string;
2493
+ readonly deleteStateTemplate: (name: string) => Promise<{
2494
+ name: string;
2495
+ deleted: true;
2426
2496
  }>;
2427
- readonly claimLogin: (body: {
2428
- token: string;
2429
- }) => Promise<{
2430
- token: string;
2431
- user_id: string;
2497
+ readonly pruneStateRetention: () => Promise<{
2498
+ pruned: Record<string, number>;
2432
2499
  }>;
2433
- readonly getAuthCapabilities: (signal?: AbortSignal) => Promise<{
2434
- mintable: boolean;
2435
- providers: {
2500
+ readonly listPresets: (signal?: AbortSignal) => Promise<{
2501
+ name: string;
2502
+ base_tool: string;
2503
+ description: string;
2504
+ active_version: number;
2505
+ extensions: (string | {
2436
2506
  name: string;
2437
- mintable: boolean;
2438
- }[];
2507
+ config: Record<string, unknown>;
2508
+ })[][];
2509
+ output_schema: Record<string, unknown> | null;
2510
+ input_schema: Record<string, unknown> | null;
2511
+ conflicted: boolean;
2512
+ conflicted_reason: string | null;
2513
+ uses: string[];
2514
+ used_by: string[];
2515
+ }[]>;
2516
+ readonly createPreset: (body: import("@tai42/api-client").CreatePresetBody) => Promise<{
2517
+ name: string;
2518
+ base_tool: string;
2519
+ description: string;
2520
+ active_version: number;
2521
+ extensions: (string | {
2522
+ name: string;
2523
+ config: Record<string, unknown>;
2524
+ })[][];
2525
+ output_schema: Record<string, unknown> | null;
2526
+ input_schema: Record<string, unknown> | null;
2527
+ conflicted: boolean;
2528
+ conflicted_reason: string | null;
2529
+ uses: string[];
2530
+ used_by: string[];
2439
2531
  }>;
2440
- readonly logout: () => Promise<{
2441
- revoked: boolean;
2532
+ readonly getPreset: (name: string, signal?: AbortSignal) => Promise<{
2533
+ name: string;
2534
+ base_tool: string;
2535
+ description: string;
2536
+ active_version: number;
2537
+ extensions: (string | {
2538
+ name: string;
2539
+ config: Record<string, unknown>;
2540
+ })[][];
2541
+ output_schema: Record<string, unknown> | null;
2542
+ input_schema: Record<string, unknown> | null;
2543
+ conflicted: boolean;
2544
+ conflicted_reason: string | null;
2545
+ uses: string[];
2546
+ used_by: string[];
2547
+ fixed_kwargs: Record<string, unknown>;
2442
2548
  }>;
2443
- readonly validateCondition: (body: import("@tai42/api-client").ValidateConditionBody) => Promise<{
2444
- ok: boolean;
2445
- result: boolean | null;
2549
+ readonly listPresetVersions: (name: string, signal?: AbortSignal) => Promise<{
2550
+ version: number;
2551
+ body: {
2552
+ base_tool: string;
2553
+ description: string;
2554
+ extensions: (string | Record<string, unknown>)[][];
2555
+ fixed_kwargs: Record<string, unknown>;
2556
+ input_schema: Record<string, unknown> | {
2557
+ content?: string | undefined;
2558
+ id?: string | undefined;
2559
+ kwargs?: Record<string, unknown> | undefined;
2560
+ } | null;
2561
+ output_schema: Record<string, unknown> | {
2562
+ content?: string | undefined;
2563
+ id?: string | undefined;
2564
+ kwargs?: Record<string, unknown> | undefined;
2565
+ } | null;
2566
+ state_binding: {
2567
+ states: {
2568
+ input_injections: {
2569
+ into: string;
2570
+ jq: {
2571
+ content?: string | undefined;
2572
+ id?: string | undefined;
2573
+ kwargs?: Record<string, unknown> | undefined;
2574
+ } | null;
2575
+ template_jq: string | null;
2576
+ }[];
2577
+ scope_expr: {
2578
+ content?: string | undefined;
2579
+ id?: string | undefined;
2580
+ kwargs?: Record<string, unknown> | undefined;
2581
+ } | null;
2582
+ state: string;
2583
+ subject_expr: {
2584
+ content?: string | undefined;
2585
+ id?: string | undefined;
2586
+ kwargs?: Record<string, unknown> | undefined;
2587
+ };
2588
+ templates: string[];
2589
+ updates: {
2590
+ adapter: {
2591
+ content?: string | undefined;
2592
+ id?: string | undefined;
2593
+ kwargs?: Record<string, unknown> | undefined;
2594
+ } | null;
2595
+ jq: {
2596
+ content?: string | undefined;
2597
+ id?: string | undefined;
2598
+ kwargs?: Record<string, unknown> | undefined;
2599
+ } | null;
2600
+ op_id: {
2601
+ content?: string | undefined;
2602
+ id?: string | undefined;
2603
+ kwargs?: Record<string, unknown> | undefined;
2604
+ } | null;
2605
+ template_jq: string | null;
2606
+ }[];
2607
+ }[];
2608
+ } | null;
2609
+ };
2610
+ tags: string[];
2611
+ created_at: string;
2612
+ is_current: boolean;
2613
+ }[]>;
2614
+ readonly getPresetVersion: (name: string, version: number, signal?: AbortSignal) => Promise<{
2615
+ version: number;
2616
+ body: {
2617
+ base_tool: string;
2618
+ description: string;
2619
+ extensions: (string | Record<string, unknown>)[][];
2620
+ fixed_kwargs: Record<string, unknown>;
2621
+ input_schema: Record<string, unknown> | {
2622
+ content?: string | undefined;
2623
+ id?: string | undefined;
2624
+ kwargs?: Record<string, unknown> | undefined;
2625
+ } | null;
2626
+ output_schema: Record<string, unknown> | {
2627
+ content?: string | undefined;
2628
+ id?: string | undefined;
2629
+ kwargs?: Record<string, unknown> | undefined;
2630
+ } | null;
2631
+ state_binding: {
2632
+ states: {
2633
+ input_injections: {
2634
+ into: string;
2635
+ jq: {
2636
+ content?: string | undefined;
2637
+ id?: string | undefined;
2638
+ kwargs?: Record<string, unknown> | undefined;
2639
+ } | null;
2640
+ template_jq: string | null;
2641
+ }[];
2642
+ scope_expr: {
2643
+ content?: string | undefined;
2644
+ id?: string | undefined;
2645
+ kwargs?: Record<string, unknown> | undefined;
2646
+ } | null;
2647
+ state: string;
2648
+ subject_expr: {
2649
+ content?: string | undefined;
2650
+ id?: string | undefined;
2651
+ kwargs?: Record<string, unknown> | undefined;
2652
+ };
2653
+ templates: string[];
2654
+ updates: {
2655
+ adapter: {
2656
+ content?: string | undefined;
2657
+ id?: string | undefined;
2658
+ kwargs?: Record<string, unknown> | undefined;
2659
+ } | null;
2660
+ jq: {
2661
+ content?: string | undefined;
2662
+ id?: string | undefined;
2663
+ kwargs?: Record<string, unknown> | undefined;
2664
+ } | null;
2665
+ op_id: {
2666
+ content?: string | undefined;
2667
+ id?: string | undefined;
2668
+ kwargs?: Record<string, unknown> | undefined;
2669
+ } | null;
2670
+ template_jq: string | null;
2671
+ }[];
2672
+ }[];
2673
+ } | null;
2674
+ };
2675
+ tags: string[];
2676
+ created_at: string;
2677
+ is_current: boolean;
2446
2678
  }>;
2447
- readonly listPolicyVersions: (userId: string, signal?: AbortSignal) => Promise<{
2679
+ readonly savePresetVersion: (name: string, body: import("@tai42/api-client").SavePresetVersionBody) => Promise<{
2448
2680
  version: number;
2449
2681
  body: {
2450
- condition: {
2682
+ base_tool: string;
2683
+ description: string;
2684
+ extensions: (string | Record<string, unknown>)[][];
2685
+ fixed_kwargs: Record<string, unknown>;
2686
+ input_schema: Record<string, unknown> | {
2451
2687
  content?: string | undefined;
2452
2688
  id?: string | undefined;
2453
2689
  kwargs?: Record<string, unknown> | undefined;
2454
2690
  } | null;
2455
- policy_data: Record<string, unknown>;
2456
- scopes: string[];
2457
- };
2458
- tags: string[];
2459
- created_at: string;
2460
- is_current: boolean;
2461
- }[]>;
2462
- readonly rollbackPolicy: (userId: string, version: number) => Promise<{
2463
- user_id: string;
2464
- active_version: number;
2465
- }>;
2466
- readonly listBackupSections: (signal?: AbortSignal) => Promise<{
2467
- name: string;
2468
- secret: boolean;
2469
- }[]>;
2470
- readonly exportBackup: (sections: string[], signal?: AbortSignal) => Promise<Blob>;
2471
- readonly importBackup: (body: {
2472
- document: unknown;
2473
- sections: string[];
2474
- }) => Promise<{
2475
- ok: boolean;
2476
- sections: Record<string, {
2477
- created: number;
2478
- updated: number;
2479
- skipped: number;
2480
- errors: string[];
2481
- new_api_keys?: {
2482
- user_id: string;
2483
- description: string;
2484
- api_key: string;
2485
- }[] | undefined;
2486
- fanout?: {
2487
- mode: "local-only";
2488
- note: string;
2489
- } | {
2490
- op: string;
2491
- reachable: boolean;
2492
- local_only: boolean;
2493
- results: {
2494
- name: string;
2495
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
2496
- payload: unknown;
2497
- error: string | null;
2498
- detail: string | null;
2499
- }[];
2500
- error: string | null;
2501
- mode: "fleet";
2502
- } | {
2503
- op: string;
2504
- reachable: boolean;
2505
- local_only: boolean;
2506
- results: {
2507
- name: string;
2508
- outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
2509
- payload: unknown;
2510
- error: string | null;
2511
- detail: string | null;
2691
+ output_schema: Record<string, unknown> | {
2692
+ content?: string | undefined;
2693
+ id?: string | undefined;
2694
+ kwargs?: Record<string, unknown> | undefined;
2695
+ } | null;
2696
+ state_binding: {
2697
+ states: {
2698
+ input_injections: {
2699
+ into: string;
2700
+ jq: {
2701
+ content?: string | undefined;
2702
+ id?: string | undefined;
2703
+ kwargs?: Record<string, unknown> | undefined;
2704
+ } | null;
2705
+ template_jq: string | null;
2706
+ }[];
2707
+ scope_expr: {
2708
+ content?: string | undefined;
2709
+ id?: string | undefined;
2710
+ kwargs?: Record<string, unknown> | undefined;
2711
+ } | null;
2712
+ state: string;
2713
+ subject_expr: {
2714
+ content?: string | undefined;
2715
+ id?: string | undefined;
2716
+ kwargs?: Record<string, unknown> | undefined;
2717
+ };
2718
+ templates: string[];
2719
+ updates: {
2720
+ adapter: {
2721
+ content?: string | undefined;
2722
+ id?: string | undefined;
2723
+ kwargs?: Record<string, unknown> | undefined;
2724
+ } | null;
2725
+ jq: {
2726
+ content?: string | undefined;
2727
+ id?: string | undefined;
2728
+ kwargs?: Record<string, unknown> | undefined;
2729
+ } | null;
2730
+ op_id: {
2731
+ content?: string | undefined;
2732
+ id?: string | undefined;
2733
+ kwargs?: Record<string, unknown> | undefined;
2734
+ } | null;
2735
+ template_jq: string | null;
2736
+ }[];
2512
2737
  }[];
2513
- error: string | null;
2514
- mode: "unreachable";
2515
- } | undefined;
2516
- }>;
2517
- }>;
2518
- readonly listSchedules: (signal?: AbortSignal) => Promise<{
2519
- [x: string]: unknown;
2520
- name: string;
2521
- enabled?: boolean | undefined;
2522
- schedule?: unknown;
2523
- target?: unknown;
2524
- args?: unknown[] | undefined;
2525
- kwargs?: Record<string, unknown> | undefined;
2526
- }[]>;
2527
- readonly getServerDateTime: (signal?: AbortSignal) => Promise<{
2528
- [x: string]: unknown;
2529
- utc: unknown;
2530
- local?: unknown;
2531
- system?: unknown;
2532
- }>;
2533
- readonly addSchedule: (body: {
2534
- tool_name: string;
2535
- tool_kwargs: Record<string, unknown>;
2536
- schedule_kwargs: Record<string, unknown>;
2537
- state_binding?: import("@tai42/api-client").StateBinding | null;
2538
- }) => Promise<unknown>;
2539
- readonly deleteSchedule: (name: string) => Promise<unknown>;
2540
- readonly getObservabilityMetrics: (params?: import("@tai42/api-client").MetricsQuery, signal?: AbortSignal) => Promise<{
2541
- summary: {
2542
- totalRuns: number;
2543
- totalCost: number;
2544
- totalTokens: number;
2545
- averageLatencyMs: number;
2546
- avgCostPerRun: number;
2547
- avgTokensPerRun: number;
2548
- timeToFirstTokenMs: number | null;
2738
+ } | null;
2549
2739
  };
2550
- timeSeries: {
2551
- bucket: string | null;
2552
- runs: number;
2553
- cost: number;
2554
- avgLatencyMs: number;
2555
- totalTokens: number;
2556
- }[];
2557
- byModel: {
2558
- model: string;
2559
- calls: number;
2560
- cost: number;
2561
- totalTokens: number;
2562
- avgLatencyMs: number;
2563
- }[];
2564
- granularity: "hour" | "day" | "week";
2565
- }>;
2566
- readonly listRuns: (params?: import("@tai42/api-client").RunsQuery, signal?: AbortSignal) => Promise<{
2567
- items: {
2568
- id: string;
2569
- traceId: string;
2570
- createdAt: string | null;
2571
- tags: string[];
2572
- status: "error" | "success";
2573
- cost: number | null;
2574
- latencyMs: number | null;
2575
- totalTokens: number | null;
2576
- inputPreview: unknown;
2577
- outputPreview: unknown;
2578
- }[];
2579
- page: number;
2580
- nextPage: number | null;
2581
- }>;
2582
- readonly getRunTrace: (traceId: string, signal?: AbortSignal) => Promise<{
2583
- traceId: string;
2584
- timestamp: string | null;
2585
- tags: string[];
2586
- totalCost: number | null;
2587
- input: unknown;
2588
- output: unknown;
2589
- metadata: unknown;
2590
- spans: {
2591
- id: string;
2592
- parentId: string | null;
2593
- traceId: string | null;
2594
- name: string | null;
2595
- type: string | null;
2596
- level: string | null;
2597
- statusMessage: string | null;
2598
- start: string | null;
2599
- end: string | null;
2600
- model: string | null;
2601
- usage: unknown;
2602
- metadata: unknown;
2603
- input: unknown;
2604
- output: unknown;
2605
- nodeId: string | null;
2606
- }[];
2607
- }>;
2608
- readonly exportTrace: (traceId: string, signal?: AbortSignal) => Promise<Blob>;
2609
- readonly exportRuns: (params: import("@tai42/api-client").RunsQuery & {
2610
- format: "csv" | "json";
2611
- }, signal?: AbortSignal) => Promise<Blob>;
2612
- readonly searchMarketplace: (query?: import("@tai42/api-client").MarketplaceSearchQuery, signal?: AbortSignal) => Promise<{
2613
- listings: {
2614
- ref: string;
2615
- namespace: string;
2616
- name: string;
2617
- display_name: string | null;
2618
- icon_url: string | null;
2619
- package: string | null;
2620
- description: string;
2621
- categories: string[];
2622
- tags: string[];
2623
- trust_tier: string;
2624
- pricing: string;
2625
- latest_version: string | null;
2626
- downloads: number;
2627
- updated_at: string;
2628
- kinds: {
2629
- kind: string;
2630
- count: number;
2631
- names: string[];
2632
- }[];
2633
- groups: {
2634
- name: string;
2635
- count: number;
2636
- }[];
2637
- premium?: boolean | null | undefined;
2638
- }[];
2639
- total: number;
2640
- page: number;
2641
- page_size: number;
2740
+ tags: string[];
2741
+ created_at: string;
2742
+ is_current: boolean;
2642
2743
  }>;
2643
- readonly getMarketplacePlugin: (namespace: string, name: string, signal?: AbortSignal) => Promise<{
2644
- namespace: string;
2744
+ readonly rollbackPreset: (name: string, version: number) => Promise<{
2645
2745
  name: string;
2646
- display_name: string | null;
2647
- icon_url: string | null;
2648
- package: string | null;
2649
- description: string;
2650
- readme_md: string | null;
2651
- license: string | null;
2652
- homepage_url: string | null;
2653
- repository_url: string | null;
2654
- categories: string[];
2655
- tags: string[];
2656
- trust_tier: string;
2657
- pricing: string;
2658
- downloads: number;
2659
- latest: {
2660
- version: string;
2661
- contract_range: string | null;
2662
- status: string;
2663
- published_at: string | null;
2664
- items: {
2665
- kind: string;
2666
- name: string;
2667
- description: string;
2668
- tags: string[];
2669
- group: string | null;
2670
- routes?: {
2671
- base: string;
2672
- paths: {
2673
- path: string;
2674
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
2675
- public: boolean;
2676
- }[];
2677
- } | null | undefined;
2678
- required_env?: {
2679
- name: string;
2680
- secret: boolean;
2681
- }[] | undefined;
2682
- }[];
2683
- } | null;
2684
- versions: {
2685
- version: string;
2686
- contract_range: string | null;
2687
- status: string;
2688
- published_at: string | null;
2689
- }[];
2690
- source?: "pypi" | "github" | "spec" | null | undefined;
2691
- docs_url?: string | null | undefined;
2692
- premium?: boolean | null | undefined;
2746
+ active_version: number;
2693
2747
  }>;
2694
- readonly listMarketplaceCategories: (signal?: AbortSignal) => Promise<string[]>;
2695
- readonly listMarketplaceKinds: (signal?: AbortSignal) => Promise<string[]>;
2696
- readonly listInstalledMarketplacePlugins: (signal?: AbortSignal) => Promise<{
2697
- installed: {
2698
- ref: string;
2699
- version: string;
2700
- source: string;
2701
- delivery: "package" | "descriptor";
2702
- installed_at: string;
2703
- latest: string | null;
2704
- update_available: boolean;
2705
- incompatible_newer: string | null;
2706
- missing_upstream: boolean;
2707
- compat: {
2708
- status: "unknown" | "compatible" | "incompatible";
2709
- reason: string | null;
2710
- };
2711
- items: {
2712
- name: string;
2713
- kind: string;
2714
- }[];
2715
- route_mounts: Record<string, string>;
2716
- }[];
2717
- quarantined: {
2718
- name: string;
2719
- reason: string;
2720
- }[];
2748
+ readonly deletePreset: (name: string) => Promise<{
2749
+ name: string;
2750
+ deleted: true;
2721
2751
  }>;
2722
- readonly previewMarketplaceInstall: (body: import("@tai42/api-client").MarketplaceInstallPreviewBody, signal?: AbortSignal) => Promise<{
2723
- ref: string;
2724
- version: string;
2725
- items: {
2726
- item: string;
2727
- kind: string;
2728
- base: string;
2729
- default_base: string;
2730
- routes: {
2731
- path: string;
2732
- full_path: string;
2733
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
2734
- public: boolean;
2735
- }[];
2736
- }[];
2737
- collisions: {
2738
- item: string;
2739
- full_path: string;
2740
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
2741
- conflict_owner: string;
2742
- conflict_path: string;
2743
- }[];
2744
- public_routes: {
2745
- item: string;
2746
- full_path: string;
2747
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
2748
- }[];
2749
- new_public_routes: {
2750
- item: string;
2751
- full_path: string;
2752
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
2753
- }[];
2754
- requires_public_acceptance: boolean;
2755
- required_env: {
2756
- name: string;
2757
- secret: boolean;
2758
- }[];
2759
- missing_env: string[];
2760
- delivery: "package" | "descriptor";
2752
+ readonly renamePreset: (name: string, newName: string) => Promise<{
2753
+ name: string;
2754
+ renamed_from: string;
2755
+ active_version: number;
2761
2756
  }>;
2762
- readonly installMarketplacePlugin: (body: import("@tai42/api-client").MarketplaceInstallBody) => Promise<{
2763
- ref: string;
2764
- version: string;
2765
- notes: string[];
2766
- advisories: {
2767
- id: number;
2768
- listing: string;
2769
- affected_versions: string;
2770
- severity: string;
2771
- summary: string;
2772
- created_at: string;
2773
- withdrawn_at: string | null;
2774
- }[];
2775
- routes: {
2776
- item: string;
2777
- full_path: string;
2778
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
2779
- public: boolean;
2780
- }[];
2757
+ readonly getPresetReferees: (name: string, signal?: AbortSignal) => Promise<{
2758
+ name: string;
2759
+ referees: string[];
2781
2760
  }>;
2782
- readonly uninstallMarketplacePlugin: (body: import("@tai42/api-client").MarketplaceUninstallBody) => Promise<{
2783
- ref: string;
2784
- uninstalled: true;
2785
- notes: string[];
2761
+ readonly validatePreset: (body: import("@tai42/api-client").ValidatePresetBody) => Promise<{
2762
+ valid: boolean;
2763
+ error: string | null;
2786
2764
  }>;
2787
- readonly updateMarketplacePlugin: (body: import("@tai42/api-client").MarketplaceInstallBody) => Promise<{
2788
- ref: string;
2789
- version: string;
2790
- notes: string[];
2791
- advisories: {
2792
- id: number;
2793
- listing: string;
2794
- affected_versions: string;
2795
- severity: string;
2796
- summary: string;
2797
- created_at: string;
2798
- withdrawn_at: string | null;
2799
- }[];
2800
- routes: {
2801
- item: string;
2802
- full_path: string;
2803
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
2804
- public: boolean;
2805
- }[];
2765
+ readonly setPresetVersionTags: (name: string, version: number, tags: readonly string[]) => Promise<{
2766
+ name: string;
2767
+ version: number;
2768
+ tags: string[];
2806
2769
  }>;
2807
- readonly upgradeAllMarketplacePlugins: () => Promise<{
2770
+ readonly listTools: (signal?: AbortSignal) => Promise<string[]>;
2771
+ readonly getToolSchema: (name: string, signal?: AbortSignal) => Promise<{
2772
+ input: Record<string, unknown>;
2773
+ output: Record<string, unknown> | null;
2774
+ description: string | null;
2775
+ }>;
2776
+ readonly getAllToolSchemas: (signal?: AbortSignal) => Promise<Record<string, {
2777
+ input: Record<string, unknown>;
2778
+ output: Record<string, unknown> | null;
2779
+ description: string | null;
2780
+ }>>;
2781
+ readonly runTool: (args: import("@tai42/api-client").RunToolArgs, signal?: AbortSignal) => Promise<unknown>;
2782
+ readonly reloadTool: (args: import("@tai42/api-client").ToolAdminArgs) => Promise<{
2783
+ op: string;
2784
+ reachable: boolean;
2785
+ local_only: boolean;
2808
2786
  results: {
2809
- ref: string;
2810
- outcome: "failed" | "upgraded" | "up-to-date" | "no-compatible-version";
2811
- detail: string;
2787
+ name: string;
2788
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
2789
+ payload: unknown;
2790
+ error: string | null;
2791
+ detail: string | null;
2812
2792
  }[];
2793
+ error: string | null;
2813
2794
  }>;
2814
- readonly getMarketplaceAdvisories: (signal?: AbortSignal) => Promise<{
2815
- advisories: {
2816
- id: number;
2817
- listing: string;
2818
- affected_versions: string;
2819
- severity: string;
2820
- summary: string;
2821
- created_at: string;
2822
- withdrawn_at: string | null;
2795
+ readonly removeTool: (args: import("@tai42/api-client").ToolAdminArgs) => Promise<{
2796
+ op: string;
2797
+ reachable: boolean;
2798
+ local_only: boolean;
2799
+ results: {
2800
+ name: string;
2801
+ outcome: "failed" | "resyncing" | "recycling" | "stale" | "applied" | "missing" | "departed" | "timed_out";
2802
+ payload: unknown;
2803
+ error: string | null;
2804
+ detail: string | null;
2823
2805
  }[];
2824
- fetched_at: string;
2806
+ error: string | null;
2825
2807
  }>;
2826
- readonly getHealth: (signal?: AbortSignal) => Promise<string>;
2827
- readonly getSystemKinds: (signal?: AbortSignal) => Promise<{
2828
- kind: string;
2829
- state: "default" | "active" | "off";
2830
- plugin: string | null;
2831
- detail: string;
2808
+ readonly submitToolRun: (args: import("@tai42/api-client").SubmitToolRunArgs, signal?: AbortSignal) => Promise<{
2809
+ run_id: string;
2810
+ }>;
2811
+ readonly getToolRun: (runId: string, signal?: AbortSignal) => Promise<{
2812
+ run_id: string;
2813
+ tool_name: string;
2814
+ status: "failed" | "running" | "succeeded" | "lost";
2815
+ started_at: string;
2816
+ finished_at?: string | undefined;
2817
+ result?: unknown;
2818
+ error?: string | undefined;
2819
+ }>;
2820
+ readonly listToolRuns: (toolName: string, signal?: AbortSignal) => Promise<{
2821
+ run_id: string;
2822
+ tool_name: string;
2823
+ status: "failed" | "running" | "succeeded" | "lost";
2824
+ started_at: string;
2825
+ finished_at?: string | undefined;
2832
2826
  }[]>;
2833
- readonly streamInteractions: (signal?: AbortSignal, lastEventId?: string) => Promise<AsyncGenerator<import("@tai42/api-client").SseFrame, any, any>>;
2827
+ readonly listToolTags: (signal?: AbortSignal) => Promise<{
2828
+ name: string;
2829
+ tags: string[];
2830
+ badges: string[];
2831
+ hidden: boolean;
2832
+ }[]>;
2833
+ readonly baseUrl: string;
2834
2834
  } | null>;
2835
2835
  export declare function useApi(): ApiClient;
2836
2836
  export type { ApiClient };