@tai42/api-client 25.0.1 → 27.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/agents.d.ts +1 -0
  2. package/dist/agents.d.ts.map +1 -1
  3. package/dist/agents.js.map +1 -1
  4. package/dist/client/auth-client.d.ts +1 -0
  5. package/dist/client/auth-client.d.ts.map +1 -1
  6. package/dist/client/backup-client.d.ts +1 -0
  7. package/dist/client/backup-client.d.ts.map +1 -1
  8. package/dist/client/capabilities-client.d.ts +1 -0
  9. package/dist/client/capabilities-client.d.ts.map +1 -1
  10. package/dist/client/channels-client.d.ts +4 -1
  11. package/dist/client/channels-client.d.ts.map +1 -1
  12. package/dist/client/config-client.d.ts +1 -0
  13. package/dist/client/config-client.d.ts.map +1 -1
  14. package/dist/client/connectors-client.d.ts +7 -0
  15. package/dist/client/connectors-client.d.ts.map +1 -1
  16. package/dist/client/conversations-client.d.ts +9 -9
  17. package/dist/client/hooks-client.d.ts +1 -1
  18. package/dist/client/index.d.ts +528 -199
  19. package/dist/client/index.d.ts.map +1 -1
  20. package/dist/client/index.js +9 -1
  21. package/dist/client/index.js.map +1 -1
  22. package/dist/client/interactions-client.d.ts +1 -1
  23. package/dist/client/manifest-client.d.ts +161 -30
  24. package/dist/client/manifest-client.d.ts.map +1 -1
  25. package/dist/client/manifest-client.js +16 -5
  26. package/dist/client/manifest-client.js.map +1 -1
  27. package/dist/client/marketplace-client.d.ts +132 -83
  28. package/dist/client/marketplace-client.d.ts.map +1 -1
  29. package/dist/client/observability-client.d.ts +2 -2
  30. package/dist/client/presets-client.d.ts +113 -11
  31. package/dist/client/presets-client.d.ts.map +1 -1
  32. package/dist/client/presets-client.js +4 -3
  33. package/dist/client/presets-client.js.map +1 -1
  34. package/dist/client/profiles-client.d.ts +1 -0
  35. package/dist/client/profiles-client.d.ts.map +1 -1
  36. package/dist/client/states-client.d.ts +30 -21
  37. package/dist/client/states-client.d.ts.map +1 -1
  38. package/dist/client/states-client.js +5 -0
  39. package/dist/client/states-client.js.map +1 -1
  40. package/dist/client/storage-client.d.ts +19 -0
  41. package/dist/client/storage-client.d.ts.map +1 -1
  42. package/dist/client/storage-client.js +14 -17
  43. package/dist/client/storage-client.js.map +1 -1
  44. package/dist/client/templates-client.d.ts +20 -2
  45. package/dist/client/templates-client.d.ts.map +1 -1
  46. package/dist/client/templates-client.js +1 -1
  47. package/dist/client/templates-client.js.map +1 -1
  48. package/dist/client/tool-extensions-client.d.ts +3 -0
  49. package/dist/client/tool-extensions-client.d.ts.map +1 -1
  50. package/dist/client/transport.d.ts +2 -1
  51. package/dist/client/transport.d.ts.map +1 -1
  52. package/dist/client/transport.js.map +1 -1
  53. package/dist/errors.d.ts +13 -0
  54. package/dist/errors.d.ts.map +1 -1
  55. package/dist/errors.js +31 -0
  56. package/dist/errors.js.map +1 -1
  57. package/dist/fleet-report.d.ts +14 -2
  58. package/dist/fleet-report.d.ts.map +1 -1
  59. package/dist/fleet-report.js +41 -10
  60. package/dist/fleet-report.js.map +1 -1
  61. package/dist/generated/api-routes.d.ts +17 -1
  62. package/dist/generated/api-routes.d.ts.map +1 -1
  63. package/dist/generated/api-routes.js +7 -2
  64. package/dist/generated/api-routes.js.map +1 -1
  65. package/dist/generated/openapi-schemas.d.ts +737 -160
  66. package/dist/generated/openapi-schemas.d.ts.map +1 -1
  67. package/dist/generated/openapi-schemas.js +46 -27
  68. package/dist/generated/openapi-schemas.js.map +1 -1
  69. package/dist/generated/served-schemas.d.ts +80 -16
  70. package/dist/generated/served-schemas.d.ts.map +1 -1
  71. package/dist/generated/served-schemas.js +64 -4
  72. package/dist/generated/served-schemas.js.map +1 -1
  73. package/dist/http.d.ts +6 -0
  74. package/dist/http.d.ts.map +1 -1
  75. package/dist/http.js +11 -0
  76. package/dist/http.js.map +1 -1
  77. package/dist/index.d.ts +3 -3
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js.map +1 -1
  80. package/dist/schemas/auth-routes.d.ts +34 -8
  81. package/dist/schemas/auth-routes.d.ts.map +1 -1
  82. package/dist/schemas/auth-routes.js +16 -8
  83. package/dist/schemas/auth-routes.js.map +1 -1
  84. package/dist/schemas/backup.d.ts +13 -0
  85. package/dist/schemas/backup.d.ts.map +1 -1
  86. package/dist/schemas/backup.js +5 -0
  87. package/dist/schemas/backup.js.map +1 -1
  88. package/dist/schemas/capabilities.d.ts +11 -6
  89. package/dist/schemas/capabilities.d.ts.map +1 -1
  90. package/dist/schemas/capabilities.js +10 -6
  91. package/dist/schemas/capabilities.js.map +1 -1
  92. package/dist/schemas/channels.d.ts +6 -1
  93. package/dist/schemas/channels.d.ts.map +1 -1
  94. package/dist/schemas/connectors.d.ts +6 -0
  95. package/dist/schemas/connectors.d.ts.map +1 -1
  96. package/dist/schemas/conversations.d.ts +11 -11
  97. package/dist/schemas/extensions.d.ts +8 -4
  98. package/dist/schemas/extensions.d.ts.map +1 -1
  99. package/dist/schemas/extensions.js +5 -4
  100. package/dist/schemas/extensions.js.map +1 -1
  101. package/dist/schemas/hooks.d.ts +1 -1
  102. package/dist/schemas/interactions.d.ts +3 -3
  103. package/dist/schemas/manifest-mcp.d.ts +78 -0
  104. package/dist/schemas/manifest-mcp.d.ts.map +1 -1
  105. package/dist/schemas/manifest-mcp.js +19 -0
  106. package/dist/schemas/manifest-mcp.js.map +1 -1
  107. package/dist/schemas/marketplace.d.ts +155 -84
  108. package/dist/schemas/marketplace.d.ts.map +1 -1
  109. package/dist/schemas/marketplace.js +7 -2
  110. package/dist/schemas/marketplace.js.map +1 -1
  111. package/dist/schemas/observability.d.ts +3 -3
  112. package/dist/schemas/presets.d.ts +107 -14
  113. package/dist/schemas/presets.d.ts.map +1 -1
  114. package/dist/schemas/presets.js +7 -5
  115. package/dist/schemas/presets.js.map +1 -1
  116. package/dist/schemas/profiles.d.ts +1 -0
  117. package/dist/schemas/profiles.d.ts.map +1 -1
  118. package/dist/schemas/served.d.ts +67 -13
  119. package/dist/schemas/served.d.ts.map +1 -1
  120. package/dist/schemas/states.d.ts +22 -22
  121. package/dist/schemas/storage.d.ts +30 -1
  122. package/dist/schemas/storage.d.ts.map +1 -1
  123. package/dist/schemas/storage.js +8 -1
  124. package/dist/schemas/storage.js.map +1 -1
  125. package/dist/schemas/system-kinds.d.ts +1 -0
  126. package/dist/schemas/system-kinds.d.ts.map +1 -1
  127. package/dist/schemas/system-kinds.js +6 -5
  128. package/dist/schemas/system-kinds.js.map +1 -1
  129. package/dist/schemas/templates.d.ts +110 -83
  130. package/dist/schemas/templates.d.ts.map +1 -1
  131. package/dist/schemas/templates.js +14 -2
  132. package/dist/schemas/templates.js.map +1 -1
  133. package/dist/schemas/tools.d.ts +1 -1
  134. package/package.json +1 -1
  135. package/src/agents.ts +1 -0
  136. package/src/client/index.ts +9 -2
  137. package/src/client/manifest-client.ts +39 -12
  138. package/src/client/presets-client.ts +20 -6
  139. package/src/client/states-client.ts +10 -0
  140. package/src/client/storage-client.ts +21 -17
  141. package/src/client/templates-client.ts +1 -1
  142. package/src/client/transport.ts +3 -1
  143. package/src/errors.ts +34 -0
  144. package/src/fleet-report.ts +46 -7
  145. package/src/generated/api-routes.ts +7 -2
  146. package/src/generated/openapi-schemas.ts +80 -31
  147. package/src/generated/served-schemas.ts +64 -4
  148. package/src/http.ts +12 -0
  149. package/src/index.ts +19 -2
  150. package/src/schemas/auth-routes.ts +18 -8
  151. package/src/schemas/backup.ts +7 -0
  152. package/src/schemas/capabilities.ts +10 -6
  153. package/src/schemas/channels.ts +2 -0
  154. package/src/schemas/extensions.ts +5 -4
  155. package/src/schemas/manifest-mcp.ts +25 -0
  156. package/src/schemas/marketplace.ts +7 -2
  157. package/src/schemas/presets.ts +13 -6
  158. package/src/schemas/storage.ts +10 -1
  159. package/src/schemas/system-kinds.ts +6 -5
  160. package/src/schemas/templates.ts +17 -1
@@ -1,11 +1,10 @@
1
- /** Composition root: assembles the per-resource sub-clients into the client. */
2
1
  import type { ApiConfig } from '../http';
3
2
  export type { AddUrlToScopeBody, ApiKeyBody, ClaimLinkBody, PinRoutePublicBody, RoleCreateBody, RoleUpdateBody, } from './auth-client';
4
3
  export type { AddServerArgs, DiscoverServerTarget, SetProviderClientArgs, StartConnectArgs, } from './connectors-client';
5
4
  export type { ConversationMessageSearchQuery, ConversationThreadFilters, ConversationThreadMessageBody, ConversationTranscriptQuery, } from './conversations-client';
6
5
  export type { TopicVerifierBody } from './hooks-client';
7
6
  export { isSafeApiPath } from './login-client';
8
- export type { ApiToolsListsBody } from './manifest-client';
7
+ export type { ApiToolsListsBody, McpToolFilter } from './manifest-client';
9
8
  export type { MarketplaceInstallBody, MarketplaceInstallPreviewBody, MarketplaceSearchQuery, MarketplaceUninstallBody, } from './marketplace-client';
10
9
  export type { MetricsQuery, RunsQuery } from './observability-client';
11
10
  export type { ValidateConditionBody } from './policy-client';
@@ -88,7 +87,7 @@ export declare function createApiClient(config: ApiConfig): {
88
87
  base: string;
89
88
  paths: {
90
89
  path: string;
91
- methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
90
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
92
91
  public: boolean;
93
92
  }[];
94
93
  } | null | undefined;
@@ -136,7 +135,7 @@ export declare function createApiClient(config: ApiConfig): {
136
135
  conflict_path: string;
137
136
  full_path: string;
138
137
  item: string;
139
- methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
138
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
140
139
  }[];
141
140
  delivery: "package" | "descriptor";
142
141
  items: {
@@ -146,7 +145,7 @@ export declare function createApiClient(config: ApiConfig): {
146
145
  kind: string;
147
146
  routes: {
148
147
  full_path: string;
149
- methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
148
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
150
149
  path: string;
151
150
  public: boolean;
152
151
  }[];
@@ -155,12 +154,12 @@ export declare function createApiClient(config: ApiConfig): {
155
154
  new_public_routes: {
156
155
  full_path: string;
157
156
  item: string;
158
- methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
157
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
159
158
  }[];
160
159
  public_routes: {
161
160
  full_path: string;
162
161
  item: string;
163
- methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
162
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
164
163
  }[];
165
164
  ref: string;
166
165
  required_env: {
@@ -175,27 +174,28 @@ export declare function createApiClient(config: ApiConfig): {
175
174
  package: string | null;
176
175
  pip_output: string | null;
177
176
  ref: string;
177
+ routes: {
178
+ full_path: string;
179
+ item: string;
180
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
181
+ public: boolean;
182
+ }[];
183
+ version: string;
184
+ advisories: {
185
+ id: number;
186
+ listing: string;
187
+ affected_versions: string;
188
+ severity: string;
189
+ summary: string;
190
+ created_at: string;
191
+ withdrawn_at: string | null;
192
+ }[];
178
193
  reload: {
179
194
  awaiting_respawn: {
180
195
  keys: string[];
181
196
  name: string;
182
197
  }[];
183
198
  env_keys: number;
184
- fanout: {
185
- error: string | null;
186
- local_only: boolean | null;
187
- mode: string;
188
- note: string | null;
189
- op: string | null;
190
- reachable: boolean | null;
191
- results: {
192
- detail: string | null;
193
- error: string | null;
194
- name: string;
195
- outcome: string;
196
- payload: unknown;
197
- }[] | null;
198
- };
199
199
  recycle: {
200
200
  fresh: {
201
201
  generation: number;
@@ -215,49 +215,50 @@ export declare function createApiClient(config: ApiConfig): {
215
215
  name: string | null;
216
216
  } | null;
217
217
  } | null;
218
+ span_release_error: string | null;
218
219
  status: string;
220
+ fanout: {
221
+ mode: "local-only";
222
+ note: string;
223
+ } | {
224
+ error: string | null;
225
+ local_only: boolean;
226
+ op: string;
227
+ reachable: boolean;
228
+ results: {
229
+ detail: string | null;
230
+ error: string | null;
231
+ name: string;
232
+ outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
233
+ payload: unknown;
234
+ }[];
235
+ mode: "fleet";
236
+ } | {
237
+ error: string | null;
238
+ local_only: boolean;
239
+ op: string;
240
+ reachable: boolean;
241
+ results: {
242
+ detail: string | null;
243
+ error: string | null;
244
+ name: string;
245
+ outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
246
+ payload: unknown;
247
+ }[];
248
+ mode: "unreachable";
249
+ };
219
250
  };
220
- routes: {
221
- full_path: string;
222
- item: string;
223
- methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
224
- public: boolean;
225
- }[];
226
- version: string;
227
- advisories: {
228
- id: number;
229
- listing: string;
230
- affected_versions: string;
231
- severity: string;
232
- summary: string;
233
- created_at: string;
234
- withdrawn_at: string | null;
235
- }[];
236
251
  }>;
237
252
  readonly uninstallMarketplacePlugin: (body: import("./marketplace-client").MarketplaceUninstallBody) => Promise<{
238
253
  notes: string[];
239
254
  ref: string;
255
+ uninstalled: boolean;
240
256
  reload: {
241
257
  awaiting_respawn: {
242
258
  keys: string[];
243
259
  name: string;
244
260
  }[];
245
261
  env_keys: number;
246
- fanout: {
247
- error: string | null;
248
- local_only: boolean | null;
249
- mode: string;
250
- note: string | null;
251
- op: string | null;
252
- reachable: boolean | null;
253
- results: {
254
- detail: string | null;
255
- error: string | null;
256
- name: string;
257
- outcome: string;
258
- payload: unknown;
259
- }[] | null;
260
- };
261
262
  recycle: {
262
263
  fresh: {
263
264
  generation: number;
@@ -277,36 +278,67 @@ export declare function createApiClient(config: ApiConfig): {
277
278
  name: string | null;
278
279
  } | null;
279
280
  } | null;
281
+ span_release_error: string | null;
280
282
  status: string;
283
+ fanout: {
284
+ mode: "local-only";
285
+ note: string;
286
+ } | {
287
+ error: string | null;
288
+ local_only: boolean;
289
+ op: string;
290
+ reachable: boolean;
291
+ results: {
292
+ detail: string | null;
293
+ error: string | null;
294
+ name: string;
295
+ outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
296
+ payload: unknown;
297
+ }[];
298
+ mode: "fleet";
299
+ } | {
300
+ error: string | null;
301
+ local_only: boolean;
302
+ op: string;
303
+ reachable: boolean;
304
+ results: {
305
+ detail: string | null;
306
+ error: string | null;
307
+ name: string;
308
+ outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
309
+ payload: unknown;
310
+ }[];
311
+ mode: "unreachable";
312
+ };
281
313
  } | null;
282
- uninstalled: boolean;
283
314
  }>;
284
315
  readonly updateMarketplacePlugin: (body: import("./marketplace-client").MarketplaceInstallBody) => Promise<{
285
316
  notes: string[];
286
317
  package: string | null;
287
318
  pip_output: string | null;
288
319
  ref: string;
320
+ routes: {
321
+ full_path: string;
322
+ item: string;
323
+ methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
324
+ public: boolean;
325
+ }[];
326
+ version: string;
327
+ advisories: {
328
+ id: number;
329
+ listing: string;
330
+ affected_versions: string;
331
+ severity: string;
332
+ summary: string;
333
+ created_at: string;
334
+ withdrawn_at: string | null;
335
+ }[];
289
336
  reload: {
290
337
  awaiting_respawn: {
291
338
  keys: string[];
292
339
  name: string;
293
340
  }[];
294
341
  env_keys: number;
295
- fanout: {
296
- error: string | null;
297
- local_only: boolean | null;
298
- mode: string;
299
- note: string | null;
300
- op: string | null;
301
- reachable: boolean | null;
302
- results: {
303
- detail: string | null;
304
- error: string | null;
305
- name: string;
306
- outcome: string;
307
- payload: unknown;
308
- }[] | null;
309
- };
310
342
  recycle: {
311
343
  fresh: {
312
344
  generation: number;
@@ -326,30 +358,46 @@ export declare function createApiClient(config: ApiConfig): {
326
358
  name: string | null;
327
359
  } | null;
328
360
  } | null;
361
+ span_release_error: string | null;
329
362
  status: string;
363
+ fanout: {
364
+ mode: "local-only";
365
+ note: string;
366
+ } | {
367
+ error: string | null;
368
+ local_only: boolean;
369
+ op: string;
370
+ reachable: boolean;
371
+ results: {
372
+ detail: string | null;
373
+ error: string | null;
374
+ name: string;
375
+ outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
376
+ payload: unknown;
377
+ }[];
378
+ mode: "fleet";
379
+ } | {
380
+ error: string | null;
381
+ local_only: boolean;
382
+ op: string;
383
+ reachable: boolean;
384
+ results: {
385
+ detail: string | null;
386
+ error: string | null;
387
+ name: string;
388
+ outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
389
+ payload: unknown;
390
+ }[];
391
+ mode: "unreachable";
392
+ };
330
393
  };
331
- routes: {
332
- full_path: string;
333
- item: string;
334
- methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
335
- public: boolean;
336
- }[];
337
- version: string;
338
- advisories: {
339
- id: number;
340
- listing: string;
341
- affected_versions: string;
342
- severity: string;
343
- summary: string;
344
- created_at: string;
345
- withdrawn_at: string | null;
346
- }[];
347
394
  }>;
348
395
  readonly upgradeAllMarketplacePlugins: () => Promise<{
349
396
  results: {
350
397
  detail: string;
351
398
  outcome: "failed" | "upgraded" | "up-to-date" | "no-compatible-version";
352
399
  ref: string;
400
+ span_release_error: string | null;
353
401
  }[];
354
402
  }>;
355
403
  readonly getMarketplaceAdvisories: (signal?: AbortSignal) => Promise<{
@@ -399,7 +447,7 @@ export declare function createApiClient(config: ApiConfig): {
399
447
  inputPreview: unknown;
400
448
  latencyMs: number | null;
401
449
  outputPreview: unknown;
402
- status: "error" | "success";
450
+ status: "success" | "error";
403
451
  tags: string[];
404
452
  totalTokens: number | null;
405
453
  traceId: string;
@@ -465,7 +513,7 @@ export declare function createApiClient(config: ApiConfig): {
465
513
  readonly getResolvedSpanValue: (traceId: string, spanId: string, field: "input" | "output", options?: {
466
514
  readonly pointer?: string;
467
515
  }, signal?: AbortSignal) => Promise<{
468
- field: "output" | "input";
516
+ field: "input" | "output";
469
517
  pointer: string;
470
518
  spanId: string;
471
519
  traceId: string;
@@ -545,6 +593,7 @@ export declare function createApiClient(config: ApiConfig): {
545
593
  } | null;
546
594
  } | null;
547
595
  skipped: number;
596
+ span_release_error: string | null;
548
597
  updated: number;
549
598
  fanout: {
550
599
  mode: "local-only";
@@ -671,6 +720,7 @@ export declare function createApiClient(config: ApiConfig): {
671
720
  owner_user_id: string;
672
721
  }>;
673
722
  readonly getMe: (signal?: AbortSignal) => Promise<{
723
+ access_control_enabled: boolean;
674
724
  admin: boolean;
675
725
  agents: string[];
676
726
  mintable: boolean;
@@ -915,6 +965,7 @@ export declare function createApiClient(config: ApiConfig): {
915
965
  mapped: string | null;
916
966
  methods: string[];
917
967
  path: string;
968
+ role_reach: "public" | "level" | "self_service" | "admin_only" | null;
918
969
  summary: string;
919
970
  tags: string[];
920
971
  }[]>;
@@ -1052,7 +1103,7 @@ export declare function createApiClient(config: ApiConfig): {
1052
1103
  kwargs?: Record<string, unknown> | undefined;
1053
1104
  };
1054
1105
  kind: string;
1055
- target_kind: "tool" | "agent";
1106
+ target_kind: "agent" | "tool";
1056
1107
  target_name: string;
1057
1108
  } | null;
1058
1109
  tool: string;
@@ -1213,7 +1264,7 @@ export declare function createApiClient(config: ApiConfig): {
1213
1264
  id?: string | undefined;
1214
1265
  kwargs?: Record<string, unknown> | undefined;
1215
1266
  } | null;
1216
- target_kind: "tool" | "agent";
1267
+ target_kind: "agent" | "tool";
1217
1268
  target_name: string;
1218
1269
  turns_per_hour_override: number | null;
1219
1270
  } | {
@@ -1270,7 +1321,7 @@ export declare function createApiClient(config: ApiConfig): {
1270
1321
  id?: string | undefined;
1271
1322
  kwargs?: Record<string, unknown> | undefined;
1272
1323
  } | null;
1273
- target_kind: "tool" | "agent";
1324
+ target_kind: "agent" | "tool";
1274
1325
  target_name: string;
1275
1326
  turns_per_hour_override: number | null;
1276
1327
  })[];
@@ -1334,7 +1385,7 @@ export declare function createApiClient(config: ApiConfig): {
1334
1385
  id?: string | undefined;
1335
1386
  kwargs?: Record<string, unknown> | undefined;
1336
1387
  } | null;
1337
- target_kind: "tool" | "agent";
1388
+ target_kind: "agent" | "tool";
1338
1389
  target_name: string;
1339
1390
  turns_per_hour_override: number | null;
1340
1391
  } | {
@@ -1391,7 +1442,7 @@ export declare function createApiClient(config: ApiConfig): {
1391
1442
  id?: string | undefined;
1392
1443
  kwargs?: Record<string, unknown> | undefined;
1393
1444
  } | null;
1394
- target_kind: "tool" | "agent";
1445
+ target_kind: "agent" | "tool";
1395
1446
  target_name: string;
1396
1447
  turns_per_hour_override: number | null;
1397
1448
  };
@@ -1945,7 +1996,7 @@ export declare function createApiClient(config: ApiConfig): {
1945
1996
  }[];
1946
1997
  }[];
1947
1998
  } | null;
1948
- target_kind: "tool" | "agent";
1999
+ target_kind: "agent" | "tool";
1949
2000
  target_name: string;
1950
2001
  }[];
1951
2002
  total: number;
@@ -1997,7 +2048,7 @@ export declare function createApiClient(config: ApiConfig): {
1997
2048
  }[];
1998
2049
  }[];
1999
2050
  } | null;
2000
- target_kind: "tool" | "agent";
2051
+ target_kind: "agent" | "tool";
2001
2052
  target_name: string;
2002
2053
  }>;
2003
2054
  readonly setConversationConfig: (config: import("..").TargetConversationConfig) => Promise<{
@@ -2047,16 +2098,16 @@ export declare function createApiClient(config: ApiConfig): {
2047
2098
  }[];
2048
2099
  }[];
2049
2100
  } | null;
2050
- target_kind: "tool" | "agent";
2101
+ target_kind: "agent" | "tool";
2051
2102
  target_name: string;
2052
2103
  };
2053
2104
  created: boolean;
2054
- target_kind: "tool" | "agent";
2105
+ target_kind: "agent" | "tool";
2055
2106
  target_name: string;
2056
2107
  }>;
2057
2108
  readonly deleteConversationConfig: (targetKind: import("..").ConversationTargetKind, targetName: string) => Promise<{
2058
2109
  removed: boolean;
2059
- target_kind: "tool" | "agent";
2110
+ target_kind: "agent" | "tool";
2060
2111
  target_name: string;
2061
2112
  }>;
2062
2113
  readonly listFailedConversationMessages: (signal?: AbortSignal) => Promise<{
@@ -2303,7 +2354,10 @@ export declare function createApiClient(config: ApiConfig): {
2303
2354
  states_erased: number;
2304
2355
  }>;
2305
2356
  readonly listChannels: (signal?: AbortSignal) => Promise<{
2306
- channels: string[];
2357
+ channels: {
2358
+ identity_hint: string | null;
2359
+ name: string;
2360
+ }[];
2307
2361
  }>;
2308
2362
  readonly listInteractions: (page: number, pageSize: number, signal?: AbortSignal) => Promise<{
2309
2363
  next_page: number | null;
@@ -2312,7 +2366,7 @@ export declare function createApiClient(config: ApiConfig): {
2312
2366
  total: number;
2313
2367
  truncated: boolean;
2314
2368
  items: {
2315
- answer_format: "text" | "free" | "confirm" | "form" | "select" | "external";
2369
+ answer_format: "free" | "confirm" | "form" | "text" | "select" | "external";
2316
2370
  audience: string | null;
2317
2371
  channel: string | null;
2318
2372
  created_at: string;
@@ -2405,6 +2459,7 @@ export declare function createApiClient(config: ApiConfig): {
2405
2459
  scopes: string[];
2406
2460
  }[];
2407
2461
  };
2462
+ span_release_error: string | null;
2408
2463
  fanout: {
2409
2464
  mode: "local-only";
2410
2465
  note: string;
@@ -2439,6 +2494,7 @@ export declare function createApiClient(config: ApiConfig): {
2439
2494
  readonly removeProvider: (id: string) => Promise<{
2440
2495
  provider_id: string;
2441
2496
  removed_clients: number;
2497
+ span_release_error: string | null;
2442
2498
  fanout: {
2443
2499
  mode: "local-only";
2444
2500
  note: string;
@@ -2495,6 +2551,7 @@ export declare function createApiClient(config: ApiConfig): {
2495
2551
  scopes: string[];
2496
2552
  }[];
2497
2553
  };
2554
+ span_release_error: string | null;
2498
2555
  fanout: {
2499
2556
  mode: "local-only";
2500
2557
  note: string;
@@ -2593,6 +2650,7 @@ export declare function createApiClient(config: ApiConfig): {
2593
2650
  } | {
2594
2651
  added_manifest_entries: string[];
2595
2652
  connection_id: string;
2653
+ span_release_error: string | null;
2596
2654
  fanout: {
2597
2655
  mode: "local-only";
2598
2656
  note: string;
@@ -2627,6 +2685,7 @@ export declare function createApiClient(config: ApiConfig): {
2627
2685
  readonly disconnect: (id: string) => Promise<{
2628
2686
  connection_id: string;
2629
2687
  removed_manifest_entries: string[];
2688
+ span_release_error: string | null;
2630
2689
  upstream_revoke_outcome: "success" | "failed" | "skipped";
2631
2690
  upstream_revoke_status: number | null;
2632
2691
  fanout: {
@@ -2672,6 +2731,7 @@ export declare function createApiClient(config: ApiConfig): {
2672
2731
  enabled_sub_services: string[];
2673
2732
  flow_id: string | null;
2674
2733
  removed_manifest_entries: string[];
2734
+ span_release_error: string | null;
2675
2735
  fanout: {
2676
2736
  mode: "local-only";
2677
2737
  note: string;
@@ -2715,6 +2775,7 @@ export declare function createApiClient(config: ApiConfig): {
2715
2775
  connection_id: string;
2716
2776
  kind: "success";
2717
2777
  return_url: string;
2778
+ span_release_error: string | null;
2718
2779
  fanout: {
2719
2780
  mode: "local-only";
2720
2781
  note: string;
@@ -2771,6 +2832,7 @@ export declare function createApiClient(config: ApiConfig): {
2771
2832
  name: string | null;
2772
2833
  } | null;
2773
2834
  } | null;
2835
+ span_release_error: string | null;
2774
2836
  status: string;
2775
2837
  fanout: {
2776
2838
  mode: "local-only";
@@ -2813,6 +2875,28 @@ export declare function createApiClient(config: ApiConfig): {
2813
2875
  sub_service: string;
2814
2876
  } | null | undefined;
2815
2877
  }[];
2878
+ extension_settings: {
2879
+ backend_module: string | null;
2880
+ extensions_modules: string[];
2881
+ tools: {
2882
+ title: string;
2883
+ extensions: Record<string, (string | {
2884
+ name: string;
2885
+ config: Record<string, unknown>;
2886
+ })[][]>;
2887
+ }[];
2888
+ mcp: {
2889
+ title: string;
2890
+ extensions: Record<string, (string | {
2891
+ name: string;
2892
+ config: Record<string, unknown>;
2893
+ })[][]>;
2894
+ }[];
2895
+ api_tools: Record<string, (string | {
2896
+ name: string;
2897
+ config: Record<string, unknown>;
2898
+ })[][]>;
2899
+ };
2816
2900
  }>;
2817
2901
  readonly getMcpEnvRefs: (signal?: AbortSignal) => Promise<{
2818
2902
  has_default: boolean;
@@ -2871,6 +2955,7 @@ export declare function createApiClient(config: ApiConfig): {
2871
2955
  name: string | null;
2872
2956
  } | null;
2873
2957
  refused: string[];
2958
+ span_release_error: string | null;
2874
2959
  fanout: {
2875
2960
  mode: "local-only";
2876
2961
  note: string;
@@ -2955,6 +3040,7 @@ export declare function createApiClient(config: ApiConfig): {
2955
3040
  name: string | null;
2956
3041
  } | null;
2957
3042
  } | null;
3043
+ span_release_error: string | null;
2958
3044
  status: string;
2959
3045
  fanout: {
2960
3046
  mode: "local-only";
@@ -3020,18 +3106,37 @@ export declare function createApiClient(config: ApiConfig): {
3020
3106
  removed: boolean;
3021
3107
  slug: string;
3022
3108
  }>;
3023
- readonly getManifest: (signal?: AbortSignal) => Promise<{
3024
- user_tools: string[];
3025
- mcp: {
3026
- [x: string]: unknown;
3027
- managed?: {
3028
- connection_id: string;
3029
- provider_id: string;
3030
- sub_service: string;
3031
- } | null | undefined;
3109
+ readonly getMcpStatus: (signal?: AbortSignal) => Promise<{
3110
+ bound: Record<string, string[]>;
3111
+ failed: {
3112
+ category: string;
3113
+ http_status: number | null;
3114
+ message: string;
3115
+ status: string;
3116
+ title: string;
3032
3117
  }[];
3118
+ health: Record<string, {
3119
+ consecutive_failures: number;
3120
+ failing_since: string | null;
3121
+ last_error: Record<string, string> | null;
3122
+ last_success: string | null;
3123
+ }>;
3033
3124
  }>;
3034
- readonly setMcpConfig: (mcp: unknown[]) => Promise<{
3125
+ readonly listMcpAdvertisedTools: (title: string, signal?: AbortSignal) => Promise<{
3126
+ exclude: string[];
3127
+ include: string[];
3128
+ title: string;
3129
+ tools: {
3130
+ bound: boolean;
3131
+ description: string | null;
3132
+ name: string;
3133
+ selected: boolean;
3134
+ title: string | null;
3135
+ unbound_reason: "server_failed" | "not_loaded" | "preset_conflict" | "unusable_schema" | "not_listed_at_bind" | null;
3136
+ }[];
3137
+ unadvertised: string[];
3138
+ }>;
3139
+ readonly setMcpToolFilter: (title: string, filter: import("./manifest-client").McpToolFilter) => Promise<{
3035
3140
  awaiting_respawn: {
3036
3141
  keys: string[];
3037
3142
  name: string;
@@ -3056,6 +3161,7 @@ export declare function createApiClient(config: ApiConfig): {
3056
3161
  name: string | null;
3057
3162
  } | null;
3058
3163
  } | null;
3164
+ span_release_error: string | null;
3059
3165
  status: string;
3060
3166
  fanout: {
3061
3167
  mode: "local-only";
@@ -3088,23 +3194,21 @@ export declare function createApiClient(config: ApiConfig): {
3088
3194
  mode: "unreachable";
3089
3195
  };
3090
3196
  }>;
3091
- readonly getMcpStatus: (signal?: AbortSignal) => Promise<{
3092
- bound: Record<string, string[]>;
3093
- failed: {
3094
- category: string;
3095
- http_status: number | null;
3096
- message: string;
3097
- status: string;
3098
- title: string;
3197
+ readonly reloadMcp: (title: string) => Promise<{
3198
+ error: string | null;
3199
+ local_only: boolean;
3200
+ ok: boolean;
3201
+ op: string;
3202
+ reachable: boolean;
3203
+ results: {
3204
+ detail: string | null;
3205
+ error: string | null;
3206
+ name: string;
3207
+ outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
3208
+ payload: unknown;
3099
3209
  }[];
3100
- health: Record<string, {
3101
- consecutive_failures: number;
3102
- failing_since: string | null;
3103
- last_error: Record<string, string> | null;
3104
- last_success: string | null;
3105
- }>;
3106
3210
  }>;
3107
- readonly reloadMcp: (title: string) => Promise<{
3211
+ readonly listFailedMcps: (signal?: AbortSignal) => Promise<{
3108
3212
  error: string | null;
3109
3213
  local_only: boolean;
3110
3214
  ok: boolean;
@@ -3118,7 +3222,68 @@ export declare function createApiClient(config: ApiConfig): {
3118
3222
  payload: unknown;
3119
3223
  }[];
3120
3224
  }>;
3121
- readonly addToolsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{
3225
+ readonly reloadFailedMcps: () => Promise<{
3226
+ error: string | null;
3227
+ local_only: boolean;
3228
+ ok: boolean;
3229
+ op: string;
3230
+ reachable: boolean;
3231
+ results: {
3232
+ detail: string | null;
3233
+ error: string | null;
3234
+ name: string;
3235
+ outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
3236
+ payload: unknown;
3237
+ }[];
3238
+ }>;
3239
+ readonly deregisterMcp: (title: string) => Promise<{
3240
+ error: string | null;
3241
+ local_only: boolean;
3242
+ ok: boolean;
3243
+ op: string;
3244
+ reachable: boolean;
3245
+ results: {
3246
+ detail: string | null;
3247
+ error: string | null;
3248
+ name: string;
3249
+ outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
3250
+ payload: unknown;
3251
+ }[];
3252
+ }>;
3253
+ readonly getManifest: (signal?: AbortSignal) => Promise<{
3254
+ user_tools: string[];
3255
+ mcp: {
3256
+ [x: string]: unknown;
3257
+ managed?: {
3258
+ connection_id: string;
3259
+ provider_id: string;
3260
+ sub_service: string;
3261
+ } | null | undefined;
3262
+ }[];
3263
+ extension_settings: {
3264
+ backend_module: string | null;
3265
+ extensions_modules: string[];
3266
+ tools: {
3267
+ title: string;
3268
+ extensions: Record<string, (string | {
3269
+ name: string;
3270
+ config: Record<string, unknown>;
3271
+ })[][]>;
3272
+ }[];
3273
+ mcp: {
3274
+ title: string;
3275
+ extensions: Record<string, (string | {
3276
+ name: string;
3277
+ config: Record<string, unknown>;
3278
+ })[][]>;
3279
+ }[];
3280
+ api_tools: Record<string, (string | {
3281
+ name: string;
3282
+ config: Record<string, unknown>;
3283
+ })[][]>;
3284
+ };
3285
+ }>;
3286
+ readonly setMcpConfig: (mcp: unknown[]) => Promise<{
3122
3287
  awaiting_respawn: {
3123
3288
  keys: string[];
3124
3289
  name: string;
@@ -3143,6 +3308,7 @@ export declare function createApiClient(config: ApiConfig): {
3143
3308
  name: string | null;
3144
3309
  } | null;
3145
3310
  } | null;
3311
+ span_release_error: string | null;
3146
3312
  status: string;
3147
3313
  fanout: {
3148
3314
  mode: "local-only";
@@ -3175,7 +3341,7 @@ export declare function createApiClient(config: ApiConfig): {
3175
3341
  mode: "unreachable";
3176
3342
  };
3177
3343
  }>;
3178
- readonly removeToolsEntry: (title: string) => Promise<{
3344
+ readonly addToolsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{
3179
3345
  awaiting_respawn: {
3180
3346
  keys: string[];
3181
3347
  name: string;
@@ -3200,6 +3366,7 @@ export declare function createApiClient(config: ApiConfig): {
3200
3366
  name: string | null;
3201
3367
  } | null;
3202
3368
  } | null;
3369
+ span_release_error: string | null;
3203
3370
  status: string;
3204
3371
  fanout: {
3205
3372
  mode: "local-only";
@@ -3232,7 +3399,7 @@ export declare function createApiClient(config: ApiConfig): {
3232
3399
  mode: "unreachable";
3233
3400
  };
3234
3401
  }>;
3235
- readonly addAgentsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{
3402
+ readonly removeToolsEntry: (title: string) => Promise<{
3236
3403
  awaiting_respawn: {
3237
3404
  keys: string[];
3238
3405
  name: string;
@@ -3257,6 +3424,7 @@ export declare function createApiClient(config: ApiConfig): {
3257
3424
  name: string | null;
3258
3425
  } | null;
3259
3426
  } | null;
3427
+ span_release_error: string | null;
3260
3428
  status: string;
3261
3429
  fanout: {
3262
3430
  mode: "local-only";
@@ -3289,7 +3457,7 @@ export declare function createApiClient(config: ApiConfig): {
3289
3457
  mode: "unreachable";
3290
3458
  };
3291
3459
  }>;
3292
- readonly removeAgentsEntry: (title: string) => Promise<{
3460
+ readonly addAgentsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{
3293
3461
  awaiting_respawn: {
3294
3462
  keys: string[];
3295
3463
  name: string;
@@ -3314,6 +3482,7 @@ export declare function createApiClient(config: ApiConfig): {
3314
3482
  name: string | null;
3315
3483
  } | null;
3316
3484
  } | null;
3485
+ span_release_error: string | null;
3317
3486
  status: string;
3318
3487
  fanout: {
3319
3488
  mode: "local-only";
@@ -3346,7 +3515,7 @@ export declare function createApiClient(config: ApiConfig): {
3346
3515
  mode: "unreachable";
3347
3516
  };
3348
3517
  }>;
3349
- readonly updateApiTools: (body: import("./manifest-client").ApiToolsListsBody) => Promise<{
3518
+ readonly removeAgentsEntry: (title: string) => Promise<{
3350
3519
  awaiting_respawn: {
3351
3520
  keys: string[];
3352
3521
  name: string;
@@ -3371,6 +3540,7 @@ export declare function createApiClient(config: ApiConfig): {
3371
3540
  name: string | null;
3372
3541
  } | null;
3373
3542
  } | null;
3543
+ span_release_error: string | null;
3374
3544
  status: string;
3375
3545
  fanout: {
3376
3546
  mode: "local-only";
@@ -3403,52 +3573,86 @@ export declare function createApiClient(config: ApiConfig): {
3403
3573
  mode: "unreachable";
3404
3574
  };
3405
3575
  }>;
3406
- readonly listFailedMcps: (signal?: AbortSignal) => Promise<{
3407
- error: string | null;
3408
- local_only: boolean;
3409
- ok: boolean;
3410
- op: string;
3411
- reachable: boolean;
3412
- results: {
3413
- detail: string | null;
3414
- error: string | null;
3576
+ readonly updateApiTools: (body: import("./manifest-client").ApiToolsListsBody) => Promise<{
3577
+ awaiting_respawn: {
3578
+ keys: string[];
3415
3579
  name: string;
3416
- outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
3417
- payload: unknown;
3418
3580
  }[];
3419
- }>;
3420
- readonly reloadFailedMcps: () => Promise<{
3421
- error: string | null;
3422
- local_only: boolean;
3423
- ok: boolean;
3424
- op: string;
3425
- reachable: boolean;
3426
- results: {
3427
- detail: string | null;
3581
+ env_keys: number;
3582
+ recycle: {
3583
+ fresh: {
3584
+ generation: number;
3585
+ kind: string;
3586
+ name: string;
3587
+ }[];
3588
+ recycle: {
3589
+ detail: string | null;
3590
+ generation_before: number;
3591
+ kind: string;
3592
+ name: string;
3593
+ status: string;
3594
+ }[];
3595
+ recycle_stopped: {
3596
+ detail: string;
3597
+ kind: string;
3598
+ name: string | null;
3599
+ } | null;
3600
+ } | null;
3601
+ span_release_error: string | null;
3602
+ status: string;
3603
+ fanout: {
3604
+ mode: "local-only";
3605
+ note: string;
3606
+ } | {
3428
3607
  error: string | null;
3429
- name: string;
3430
- outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
3431
- payload: unknown;
3432
- }[];
3433
- }>;
3434
- readonly deregisterMcp: (title: string) => Promise<{
3435
- error: string | null;
3436
- local_only: boolean;
3437
- ok: boolean;
3438
- op: string;
3439
- reachable: boolean;
3440
- results: {
3441
- detail: string | null;
3608
+ local_only: boolean;
3609
+ op: string;
3610
+ reachable: boolean;
3611
+ results: {
3612
+ detail: string | null;
3613
+ error: string | null;
3614
+ name: string;
3615
+ outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
3616
+ payload: unknown;
3617
+ }[];
3618
+ mode: "fleet";
3619
+ } | {
3442
3620
  error: string | null;
3443
- name: string;
3444
- outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
3445
- payload: unknown;
3446
- }[];
3621
+ local_only: boolean;
3622
+ op: string;
3623
+ reachable: boolean;
3624
+ results: {
3625
+ detail: string | null;
3626
+ error: string | null;
3627
+ name: string;
3628
+ outcome: "failed" | "applied" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
3629
+ payload: unknown;
3630
+ }[];
3631
+ mode: "unreachable";
3632
+ };
3447
3633
  }>;
3448
3634
  readonly listTemplates: (signal?: AbortSignal) => Promise<string[]>;
3449
3635
  readonly getTemplate: (templateId: string) => Promise<{
3450
- schema: Record<string, unknown>;
3451
- template: string;
3636
+ content_type: string | null;
3637
+ id: string;
3638
+ kind: "binary";
3639
+ schema: null;
3640
+ size: number;
3641
+ } | {
3642
+ content: string;
3643
+ content_type: string | null;
3644
+ id: string;
3645
+ kind: "document";
3646
+ schema: null;
3647
+ size: number;
3648
+ } | {
3649
+ content: string;
3650
+ content_type: string | null;
3651
+ id: string;
3652
+ kind: "text";
3653
+ schema: Record<string, unknown> | null;
3654
+ schema_error: string | null;
3655
+ size: number;
3452
3656
  }>;
3453
3657
  readonly uploadTemplate: (path: string, content: string) => Promise<{
3454
3658
  fanout: {
@@ -3529,12 +3733,14 @@ export declare function createApiClient(config: ApiConfig): {
3529
3733
  };
3530
3734
  }>;
3531
3735
  readonly listExtensions: (signal?: AbortSignal) => Promise<{
3736
+ config_schema: Record<string, unknown> | null;
3532
3737
  kind: string;
3533
3738
  multiple: boolean;
3534
3739
  name: string;
3535
3740
  }[]>;
3536
3741
  readonly getToolExtensions: (name: string, signal?: AbortSignal) => Promise<{
3537
3742
  available: {
3743
+ config_schema: Record<string, unknown> | null;
3538
3744
  kind: string;
3539
3745
  multiple: boolean;
3540
3746
  name: string;
@@ -3569,6 +3775,7 @@ export declare function createApiClient(config: ApiConfig): {
3569
3775
  name: string | null;
3570
3776
  } | null;
3571
3777
  } | null;
3778
+ span_release_error: string | null;
3572
3779
  status: string;
3573
3780
  fanout: {
3574
3781
  mode: "local-only";
@@ -3641,10 +3848,29 @@ export declare function createApiClient(config: ApiConfig): {
3641
3848
  module: string | null;
3642
3849
  present: boolean;
3643
3850
  provider: string | null;
3851
+ surfaces: ("templates" | "storage")[];
3644
3852
  }>;
3645
3853
  readonly listStorageResources: (signal?: AbortSignal) => Promise<{
3646
3854
  resources: string[];
3647
3855
  }>;
3856
+ readonly readStorageResource: (id: string, signal?: AbortSignal) => Promise<{
3857
+ content_type: string | null;
3858
+ id: string;
3859
+ kind: "binary";
3860
+ size: number;
3861
+ } | {
3862
+ content: string;
3863
+ content_type: string | null;
3864
+ id: string;
3865
+ kind: "document";
3866
+ size: number;
3867
+ } | {
3868
+ content: string;
3869
+ content_type: string | null;
3870
+ id: string;
3871
+ kind: "text";
3872
+ size: number;
3873
+ }>;
3648
3874
  readonly statStorageResource: (id: string, signal?: AbortSignal) => Promise<{
3649
3875
  content_type: string | null;
3650
3876
  id: string;
@@ -3768,7 +3994,7 @@ export declare function createApiClient(config: ApiConfig): {
3768
3994
  subjects: {
3769
3995
  key: string;
3770
3996
  kind: string;
3771
- target_kind: "tool" | "agent";
3997
+ target_kind: "agent" | "tool";
3772
3998
  target_name: string;
3773
3999
  }[];
3774
4000
  }[] | undefined;
@@ -3793,7 +4019,7 @@ export declare function createApiClient(config: ApiConfig): {
3793
4019
  subjects: {
3794
4020
  key: string;
3795
4021
  kind: string;
3796
- target_kind: "tool" | "agent";
4022
+ target_kind: "agent" | "tool";
3797
4023
  target_name: string;
3798
4024
  }[];
3799
4025
  }[] | undefined;
@@ -3821,7 +4047,7 @@ export declare function createApiClient(config: ApiConfig): {
3821
4047
  subjects: {
3822
4048
  key: string;
3823
4049
  kind: string;
3824
- target_kind: "tool" | "agent";
4050
+ target_kind: "agent" | "tool";
3825
4051
  target_name: string;
3826
4052
  }[];
3827
4053
  }[] | undefined;
@@ -3831,6 +4057,15 @@ export declare function createApiClient(config: ApiConfig): {
3831
4057
  template: string;
3832
4058
  updated: boolean;
3833
4059
  }>;
4060
+ readonly getStateTemplateReferees: (name: string, template: string, signal?: AbortSignal) => Promise<{
4061
+ action: "rename" | "delete" | "detach";
4062
+ holders: {
4063
+ kind: string;
4064
+ locator: Record<string, string | number>;
4065
+ name: string;
4066
+ summary: string;
4067
+ }[];
4068
+ }>;
3834
4069
  readonly detachStateTemplate: (name: string, template: string) => Promise<{
3835
4070
  detached: boolean;
3836
4071
  state: string;
@@ -3844,7 +4079,7 @@ export declare function createApiClient(config: ApiConfig): {
3844
4079
  subject: {
3845
4080
  key: string;
3846
4081
  kind: string;
3847
- target_kind: "tool" | "agent";
4082
+ target_kind: "agent" | "tool";
3848
4083
  target_name: string;
3849
4084
  };
3850
4085
  updated_at: number;
@@ -3855,7 +4090,7 @@ export declare function createApiClient(config: ApiConfig): {
3855
4090
  subjects: {
3856
4091
  key: string;
3857
4092
  kind: string;
3858
- target_kind: "tool" | "agent";
4093
+ target_kind: "agent" | "tool";
3859
4094
  target_name: string;
3860
4095
  }[];
3861
4096
  }[] | undefined;
@@ -3867,7 +4102,7 @@ export declare function createApiClient(config: ApiConfig): {
3867
4102
  subject: {
3868
4103
  key: string;
3869
4104
  kind: string;
3870
- target_kind: "tool" | "agent";
4105
+ target_kind: "agent" | "tool";
3871
4106
  target_name: string;
3872
4107
  };
3873
4108
  updated_at: number;
@@ -3879,7 +4114,7 @@ export declare function createApiClient(config: ApiConfig): {
3879
4114
  subjects: {
3880
4115
  key: string;
3881
4116
  kind: string;
3882
- target_kind: "tool" | "agent";
4117
+ target_kind: "agent" | "tool";
3883
4118
  target_name: string;
3884
4119
  }[];
3885
4120
  }[] | undefined;
@@ -3901,7 +4136,7 @@ export declare function createApiClient(config: ApiConfig): {
3901
4136
  subjects: {
3902
4137
  key: string;
3903
4138
  kind: string;
3904
- target_kind: "tool" | "agent";
4139
+ target_kind: "agent" | "tool";
3905
4140
  target_name: string;
3906
4141
  }[];
3907
4142
  }[];
@@ -3913,7 +4148,7 @@ export declare function createApiClient(config: ApiConfig): {
3913
4148
  subject: {
3914
4149
  key: string;
3915
4150
  kind: string;
3916
- target_kind: "tool" | "agent";
4151
+ target_kind: "agent" | "tool";
3917
4152
  target_name: string;
3918
4153
  };
3919
4154
  updated_at: number;
@@ -3924,14 +4159,14 @@ export declare function createApiClient(config: ApiConfig): {
3924
4159
  canonical_subject: {
3925
4160
  key: string;
3926
4161
  kind: string;
3927
- target_kind: "tool" | "agent";
4162
+ target_kind: "agent" | "tool";
3928
4163
  target_name: string;
3929
4164
  };
3930
4165
  data: Record<string, unknown>;
3931
4166
  folded_from: {
3932
4167
  key: string;
3933
4168
  kind: string;
3934
- target_kind: "tool" | "agent";
4169
+ target_kind: "agent" | "tool";
3935
4170
  target_name: string;
3936
4171
  }[];
3937
4172
  seq: number;
@@ -3939,7 +4174,7 @@ export declare function createApiClient(config: ApiConfig): {
3939
4174
  subject: {
3940
4175
  key: string;
3941
4176
  kind: string;
3942
- target_kind: "tool" | "agent";
4177
+ target_kind: "agent" | "tool";
3943
4178
  target_name: string;
3944
4179
  };
3945
4180
  } | null>;
@@ -3947,14 +4182,14 @@ export declare function createApiClient(config: ApiConfig): {
3947
4182
  canonical_subject: {
3948
4183
  key: string;
3949
4184
  kind: string;
3950
- target_kind: "tool" | "agent";
4185
+ target_kind: "agent" | "tool";
3951
4186
  target_name: string;
3952
4187
  };
3953
4188
  data: Record<string, unknown>;
3954
4189
  folded_from: {
3955
4190
  key: string;
3956
4191
  kind: string;
3957
- target_kind: "tool" | "agent";
4192
+ target_kind: "agent" | "tool";
3958
4193
  target_name: string;
3959
4194
  }[];
3960
4195
  seq: number;
@@ -3962,7 +4197,7 @@ export declare function createApiClient(config: ApiConfig): {
3962
4197
  subject: {
3963
4198
  key: string;
3964
4199
  kind: string;
3965
- target_kind: "tool" | "agent";
4200
+ target_kind: "agent" | "tool";
3966
4201
  target_name: string;
3967
4202
  };
3968
4203
  }>;
@@ -3970,14 +4205,14 @@ export declare function createApiClient(config: ApiConfig): {
3970
4205
  canonical_subject: {
3971
4206
  key: string;
3972
4207
  kind: string;
3973
- target_kind: "tool" | "agent";
4208
+ target_kind: "agent" | "tool";
3974
4209
  target_name: string;
3975
4210
  };
3976
4211
  data: Record<string, unknown>;
3977
4212
  folded_from: {
3978
4213
  key: string;
3979
4214
  kind: string;
3980
- target_kind: "tool" | "agent";
4215
+ target_kind: "agent" | "tool";
3981
4216
  target_name: string;
3982
4217
  }[];
3983
4218
  seq: number;
@@ -3985,7 +4220,7 @@ export declare function createApiClient(config: ApiConfig): {
3985
4220
  subject: {
3986
4221
  key: string;
3987
4222
  kind: string;
3988
- target_kind: "tool" | "agent";
4223
+ target_kind: "agent" | "tool";
3989
4224
  target_name: string;
3990
4225
  };
3991
4226
  }>;
@@ -4033,7 +4268,7 @@ export declare function createApiClient(config: ApiConfig): {
4033
4268
  origin: {
4034
4269
  actor: string | null;
4035
4270
  consumer: string | null;
4036
- door: "tool" | "api" | "conversation" | "hook" | "schedule" | "operator";
4271
+ door: "api" | "tool" | "conversation" | "hook" | "schedule" | "operator";
4037
4272
  inbound_id: string | null;
4038
4273
  meta: Record<string, unknown> | null;
4039
4274
  op_id: string | null;
@@ -4244,7 +4479,7 @@ export declare function createApiClient(config: ApiConfig): {
4244
4479
  subjects: {
4245
4480
  key: string;
4246
4481
  kind: string;
4247
- target_kind: "tool" | "agent";
4482
+ target_kind: "agent" | "tool";
4248
4483
  target_name: string;
4249
4484
  }[];
4250
4485
  }[] | undefined;
@@ -4272,7 +4507,7 @@ export declare function createApiClient(config: ApiConfig): {
4272
4507
  subject: {
4273
4508
  key: string;
4274
4509
  kind: string;
4275
- target_kind: "tool" | "agent";
4510
+ target_kind: "agent" | "tool";
4276
4511
  target_name: string;
4277
4512
  };
4278
4513
  }[];
@@ -4294,9 +4529,27 @@ export declare function createApiClient(config: ApiConfig): {
4294
4529
  conflicted: boolean;
4295
4530
  conflicted_reason: string | null;
4296
4531
  description: string;
4297
- input_schema: Record<string, unknown> | null;
4532
+ input_map: string | {
4533
+ content?: string | undefined;
4534
+ id?: string | undefined;
4535
+ kwargs?: Record<string, unknown> | undefined;
4536
+ } | null;
4537
+ input_schema: Record<string, unknown> | {
4538
+ content?: string | undefined;
4539
+ id?: string | undefined;
4540
+ kwargs?: Record<string, unknown> | undefined;
4541
+ } | null;
4298
4542
  name: string;
4299
- output_schema: Record<string, unknown> | null;
4543
+ output_map: string | {
4544
+ content?: string | undefined;
4545
+ id?: string | undefined;
4546
+ kwargs?: Record<string, unknown> | undefined;
4547
+ } | null;
4548
+ output_schema: Record<string, unknown> | {
4549
+ content?: string | undefined;
4550
+ id?: string | undefined;
4551
+ kwargs?: Record<string, unknown> | undefined;
4552
+ } | null;
4300
4553
  used_by: string[];
4301
4554
  uses: string[];
4302
4555
  extensions: (string | {
@@ -4310,9 +4563,27 @@ export declare function createApiClient(config: ApiConfig): {
4310
4563
  conflicted: boolean;
4311
4564
  conflicted_reason: string | null;
4312
4565
  description: string;
4313
- input_schema: Record<string, unknown> | null;
4566
+ input_map: string | {
4567
+ content?: string | undefined;
4568
+ id?: string | undefined;
4569
+ kwargs?: Record<string, unknown> | undefined;
4570
+ } | null;
4571
+ input_schema: Record<string, unknown> | {
4572
+ content?: string | undefined;
4573
+ id?: string | undefined;
4574
+ kwargs?: Record<string, unknown> | undefined;
4575
+ } | null;
4314
4576
  name: string;
4315
- output_schema: Record<string, unknown> | null;
4577
+ output_map: string | {
4578
+ content?: string | undefined;
4579
+ id?: string | undefined;
4580
+ kwargs?: Record<string, unknown> | undefined;
4581
+ } | null;
4582
+ output_schema: Record<string, unknown> | {
4583
+ content?: string | undefined;
4584
+ id?: string | undefined;
4585
+ kwargs?: Record<string, unknown> | undefined;
4586
+ } | null;
4316
4587
  used_by: string[];
4317
4588
  uses: string[];
4318
4589
  extensions: (string | {
@@ -4327,9 +4598,27 @@ export declare function createApiClient(config: ApiConfig): {
4327
4598
  conflicted_reason: string | null;
4328
4599
  description: string;
4329
4600
  fixed_kwargs: Record<string, unknown>;
4330
- input_schema: Record<string, unknown> | null;
4601
+ input_map: string | {
4602
+ content?: string | undefined;
4603
+ id?: string | undefined;
4604
+ kwargs?: Record<string, unknown> | undefined;
4605
+ } | null;
4606
+ input_schema: Record<string, unknown> | {
4607
+ content?: string | undefined;
4608
+ id?: string | undefined;
4609
+ kwargs?: Record<string, unknown> | undefined;
4610
+ } | null;
4331
4611
  name: string;
4332
- output_schema: Record<string, unknown> | null;
4612
+ output_map: string | {
4613
+ content?: string | undefined;
4614
+ id?: string | undefined;
4615
+ kwargs?: Record<string, unknown> | undefined;
4616
+ } | null;
4617
+ output_schema: Record<string, unknown> | {
4618
+ content?: string | undefined;
4619
+ id?: string | undefined;
4620
+ kwargs?: Record<string, unknown> | undefined;
4621
+ } | null;
4333
4622
  used_by: string[];
4334
4623
  uses: string[];
4335
4624
  extensions: (string | {
@@ -4347,11 +4636,21 @@ export declare function createApiClient(config: ApiConfig): {
4347
4636
  description: string;
4348
4637
  extensions: (string | Record<string, unknown>)[][];
4349
4638
  fixed_kwargs: Record<string, unknown>;
4639
+ input_map: string | {
4640
+ content?: string | undefined;
4641
+ id?: string | undefined;
4642
+ kwargs?: Record<string, unknown> | undefined;
4643
+ } | null;
4350
4644
  input_schema: Record<string, unknown> | {
4351
4645
  content?: string | undefined;
4352
4646
  id?: string | undefined;
4353
4647
  kwargs?: Record<string, unknown> | undefined;
4354
4648
  } | null;
4649
+ output_map: string | {
4650
+ content?: string | undefined;
4651
+ id?: string | undefined;
4652
+ kwargs?: Record<string, unknown> | undefined;
4653
+ } | null;
4355
4654
  output_schema: Record<string, unknown> | {
4356
4655
  content?: string | undefined;
4357
4656
  id?: string | undefined;
@@ -4412,11 +4711,21 @@ export declare function createApiClient(config: ApiConfig): {
4412
4711
  description: string;
4413
4712
  extensions: (string | Record<string, unknown>)[][];
4414
4713
  fixed_kwargs: Record<string, unknown>;
4714
+ input_map: string | {
4715
+ content?: string | undefined;
4716
+ id?: string | undefined;
4717
+ kwargs?: Record<string, unknown> | undefined;
4718
+ } | null;
4415
4719
  input_schema: Record<string, unknown> | {
4416
4720
  content?: string | undefined;
4417
4721
  id?: string | undefined;
4418
4722
  kwargs?: Record<string, unknown> | undefined;
4419
4723
  } | null;
4724
+ output_map: string | {
4725
+ content?: string | undefined;
4726
+ id?: string | undefined;
4727
+ kwargs?: Record<string, unknown> | undefined;
4728
+ } | null;
4420
4729
  output_schema: Record<string, unknown> | {
4421
4730
  content?: string | undefined;
4422
4731
  id?: string | undefined;
@@ -4477,11 +4786,21 @@ export declare function createApiClient(config: ApiConfig): {
4477
4786
  description: string;
4478
4787
  extensions: (string | Record<string, unknown>)[][];
4479
4788
  fixed_kwargs: Record<string, unknown>;
4789
+ input_map: string | {
4790
+ content?: string | undefined;
4791
+ id?: string | undefined;
4792
+ kwargs?: Record<string, unknown> | undefined;
4793
+ } | null;
4480
4794
  input_schema: Record<string, unknown> | {
4481
4795
  content?: string | undefined;
4482
4796
  id?: string | undefined;
4483
4797
  kwargs?: Record<string, unknown> | undefined;
4484
4798
  } | null;
4799
+ output_map: string | {
4800
+ content?: string | undefined;
4801
+ id?: string | undefined;
4802
+ kwargs?: Record<string, unknown> | undefined;
4803
+ } | null;
4485
4804
  output_schema: Record<string, unknown> | {
4486
4805
  content?: string | undefined;
4487
4806
  id?: string | undefined;
@@ -4590,9 +4909,14 @@ export declare function createApiClient(config: ApiConfig): {
4590
4909
  name: string;
4591
4910
  renamed_from: string;
4592
4911
  }>;
4593
- readonly getPresetReferees: (name: string, signal?: AbortSignal) => Promise<{
4594
- name: string;
4595
- referees: string[];
4912
+ readonly getPresetReferees: (name: string, action: import("..").PresetHolderAction, signal?: AbortSignal) => Promise<{
4913
+ action: "rename" | "delete" | "detach";
4914
+ holders: {
4915
+ kind: string;
4916
+ locator: Record<string, string | number>;
4917
+ name: string;
4918
+ summary: string;
4919
+ }[];
4596
4920
  }>;
4597
4921
  readonly validatePreset: (body: import("./presets-client").ValidatePresetBody) => Promise<{
4598
4922
  error: string | null;
@@ -4807,7 +5131,12 @@ export declare function createApiClient(config: ApiConfig): {
4807
5131
  /** The host's authenticated request for a plugin's own routes: the same auth header,
4808
5132
  * 401 handling, error classes and `{ data }` unwrap as every core call. Core routes
4809
5133
  * use the named methods. */
4810
- readonly request: <S extends Parameters<typeof import("..").apiRequest>[2]>(path: string, schema: S, options?: Parameters<typeof import("..").apiRequest>[3]) => Promise<import("zod").infer<S>>;
5134
+ readonly request: <S extends Parameters<typeof import("..").apiRequest>[2]>(path: string, schema: S, options?: Parameters<typeof import("..").apiRequest>[3]) => Promise<import("zod").output<S>>;
5135
+ /** Readers of this client's refusals. They recognise the `ApiError` this client throws, so a
5136
+ * caller that holds no copy of the error classes (a plugin bundle) reads a refusal through
5137
+ * the client that raised it. */
5138
+ readonly holdersFromError: (error: unknown) => import("..").ReferenceHolder[] | null;
5139
+ readonly storedPresetFaultFromError: (error: unknown) => string | null;
4811
5140
  };
4812
5141
  export type ApiClient = ReturnType<typeof createApiClient>;
4813
5142
  //# sourceMappingURL=index.d.ts.map