@tai42/api-client 25.0.1 → 26.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 (157) 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 +529 -198
  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 +7 -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 +79 -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/templates.d.ts +110 -83
  128. package/dist/schemas/templates.d.ts.map +1 -1
  129. package/dist/schemas/templates.js +14 -2
  130. package/dist/schemas/templates.js.map +1 -1
  131. package/dist/schemas/tools.d.ts +1 -1
  132. package/package.json +1 -1
  133. package/src/agents.ts +1 -0
  134. package/src/client/index.ts +9 -2
  135. package/src/client/manifest-client.ts +39 -12
  136. package/src/client/presets-client.ts +20 -6
  137. package/src/client/states-client.ts +10 -0
  138. package/src/client/storage-client.ts +21 -17
  139. package/src/client/templates-client.ts +1 -1
  140. package/src/client/transport.ts +3 -1
  141. package/src/errors.ts +34 -0
  142. package/src/fleet-report.ts +46 -7
  143. package/src/generated/api-routes.ts +7 -2
  144. package/src/generated/openapi-schemas.ts +80 -31
  145. package/src/generated/served-schemas.ts +64 -4
  146. package/src/http.ts +12 -0
  147. package/src/index.ts +19 -2
  148. package/src/schemas/auth-routes.ts +18 -8
  149. package/src/schemas/backup.ts +7 -0
  150. package/src/schemas/capabilities.ts +10 -6
  151. package/src/schemas/channels.ts +2 -0
  152. package/src/schemas/extensions.ts +5 -4
  153. package/src/schemas/manifest-mcp.ts +25 -0
  154. package/src/schemas/marketplace.ts +7 -2
  155. package/src/schemas/presets.ts +13 -6
  156. package/src/schemas/storage.ts +10 -1
  157. package/src/schemas/templates.ts +17 -1
@@ -190,7 +190,7 @@ export type RecycleStop = z.infer<typeof recycleStop>;
190
190
  export const recycleRoll = z.object({ "fresh": z.array(freshLife), "recycle": z.array(recycleEntry), "recycle_stopped": recycleStop.nullable().default(null) });
191
191
  export type RecycleRoll = z.infer<typeof recycleRoll>;
192
192
 
193
- export const applyResponse = z.object({ "awaiting_respawn": z.array(awaitingWorker).default([]), "env_keys": z.number().int(), "fanout": fanoutSummary, "recycle": recycleRoll.nullable().default(null), "status": z.string() });
193
+ export const applyResponse = z.object({ "awaiting_respawn": z.array(awaitingWorker).default([]), "env_keys": z.number().int(), "fanout": fanoutSummary, "recycle": recycleRoll.nullable().default(null), "span_release_error": z.string().nullable().default(null), "status": z.string() });
194
194
  export type ApplyResponse = z.infer<typeof applyResponse>;
195
195
 
196
196
  export const applyResult = z.object({ "applied": z.boolean(), "data": z.record(z.string(), z.unknown()).nullable().default(null), "seq": z.number().nullable().default(null), "skipped": z.array(z.record(z.string(), z.unknown())).default([]) }).strict();
@@ -238,7 +238,7 @@ export type BackupExportDocument = z.infer<typeof backupExportDocument>;
238
238
  export const backupImport = z.object({ "document": z.record(z.string(), z.unknown()), "mode": z.enum(["skip","overwrite"]).default("skip"), "sections": z.array(z.string()) });
239
239
  export type BackupImport = z.infer<typeof backupImport>;
240
240
 
241
- export const backupSectionReport = z.object({ "awaiting_respawn": z.array(awaitingWorker).default([]), "created": z.number().int().default(0), "details": z.record(z.string(), z.unknown()).default({}), "errors": z.array(z.string()).default([]), "fanout": fanoutSummary.nullable().default(null), "recycle": recycleRoll.nullable().default(null), "skipped": z.number().int().default(0), "updated": z.number().int().default(0) }).strict();
241
+ export const backupSectionReport = z.object({ "awaiting_respawn": z.array(awaitingWorker).default([]), "created": z.number().int().default(0), "details": z.record(z.string(), z.unknown()).default({}), "errors": z.array(z.string()).default([]), "fanout": fanoutSummary.nullable().default(null), "recycle": recycleRoll.nullable().default(null), "skipped": z.number().int().default(0), "span_release_error": z.string().nullable().default(null), "updated": z.number().int().default(0) }).strict();
242
242
  export type BackupSectionReport = z.infer<typeof backupSectionReport>;
243
243
 
244
244
  export const backupImportResult = z.object({ "ok": z.boolean(), "sections": z.record(z.string(), backupSectionReport) });
@@ -262,7 +262,10 @@ export type ChannelConversationRouteCreate = z.infer<typeof channelConversationR
262
262
  export const channelConversationRouteView = z.object({ "callback_url": z.null().default(null), "cancel_expr": templatedText.nullable().default(null), "channel": z.string().regex(new RegExp("^[^:]*[^:\\s][^:]*$")), "door": z.literal("channel"), "execution_key": z.string().min(1), "execution_key_fingerprint": z.string(), "extras_expr": templatedText.nullable().default(null), "initial_mode": z.enum(["agent","manual"]).default("agent"), "locale": z.string().nullable().default(null), "our_identity": z.string().regex(new RegExp("\\S")), "overlap": overlapPolicy.default({"deliver":"one","running":"continue","settle_seconds":0}), "reply_expr": templatedText.nullable().default(null), "reply_texts": replyTexts.nullable().default(null), "resume_expr": templatedText.nullable().default(null), "route_name": z.string().regex(new RegExp("^[a-z0-9-]+$")), "start_expr": templatedText.nullable().default(null), "target_kind": z.enum(["agent","tool"]), "target_name": z.string().min(1), "turns_per_hour_override": z.number().int().gt(0).nullable().default(null) });
263
263
  export type ChannelConversationRouteView = z.infer<typeof channelConversationRouteView>;
264
264
 
265
- export const channelListing = z.object({ "channels": z.array(z.string()) });
265
+ export const channelEntry = z.object({ "identity_hint": z.string().nullable(), "name": z.string() });
266
+ export type ChannelEntry = z.infer<typeof channelEntry>;
267
+
268
+ export const channelListing = z.object({ "channels": z.array(channelEntry) });
266
269
  export type ChannelListing = z.infer<typeof channelListing>;
267
270
 
268
271
  export const checkpointSweepResult = z.object({ "finished_minutes": z.number().int(), "finished_swept": z.array(z.string()), "provider": z.string(), "skipped": z.string().nullable().default(null), "spared": z.array(z.string()), "swept_count": z.number().int(), "waiting_minutes": z.number().int(), "waiting_swept": z.array(z.string()) });
@@ -376,7 +379,7 @@ export type DetachAck = z.infer<typeof detachAck>;
376
379
  export const dirDeleted = z.object({ "deleted": z.boolean(), "dir": z.string() });
377
380
  export type DirDeleted = z.infer<typeof dirDeleted>;
378
381
 
379
- export const disconnectResponse = z.object({ "connection_id": z.string(), "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "removed_manifest_entries": z.array(z.string()), "upstream_revoke_outcome": z.enum(["success","failed","skipped"]), "upstream_revoke_status": z.number().int().nullable().default(null) });
382
+ export const disconnectResponse = z.object({ "connection_id": z.string(), "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "removed_manifest_entries": z.array(z.string()), "span_release_error": z.string().nullable().default(null), "upstream_revoke_outcome": z.enum(["success","failed","skipped"]), "upstream_revoke_status": z.number().int().nullable().default(null) });
380
383
  export type DisconnectResponse = z.infer<typeof disconnectResponse>;
381
384
 
382
385
  export const discoverServerRequest = z.object({ "provider_id": z.string().nullable().default(null), "url": z.string().nullable().default(null) });
@@ -403,7 +406,7 @@ export type EraseAck = z.infer<typeof eraseAck>;
403
406
  export const error = z.object({ "code": z.string().optional(), "error": z.string() });
404
407
  export type Error = z.infer<typeof error>;
405
408
 
406
- export const extensionView = z.object({ "kind": z.string(), "multiple": z.boolean(), "name": z.string() });
409
+ export const extensionView = z.object({ "config_schema": z.record(z.string(), z.unknown()).nullable(), "kind": z.string(), "multiple": z.boolean(), "name": z.string() });
407
410
  export type ExtensionView = z.infer<typeof extensionView>;
408
411
 
409
412
  export const extensionListing = z.array(extensionView);
@@ -451,6 +454,12 @@ export type FormField = z.infer<typeof formField>;
451
454
  export const formMethod = z.object({ "fields": z.array(formField).min(1), "id": z.string().min(1), "purpose": z.enum(["login","invite"]).default("login"), "shape": z.literal("form").default("form"), "submit_path": z.string(), "title": z.string().min(1) }).strict();
452
455
  export type FormMethod = z.infer<typeof formMethod>;
453
456
 
457
+ export const referenceHolder = z.object({ "kind": z.string().min(1), "locator": z.record(z.string(), z.union([z.string(), z.number().int()])).default({}), "name": z.string().min(1), "summary": z.string().min(1) }).strict();
458
+ export type ReferenceHolder = z.infer<typeof referenceHolder>;
459
+
460
+ export const holdersPreview = z.object({ "action": z.enum(["rename","delete","detach"]), "holders": z.array(referenceHolder) });
461
+ export type HoldersPreview = z.infer<typeof holdersPreview>;
462
+
454
463
  export const hookListView = z.object({ "items": z.array(hookParams), "topic_verifiers": z.record(z.string(), jsonValue), "total": z.number().int(), "trigger_auth": z.record(z.string(), z.enum(["public","verifier","token","token+api_key","out-of-service"])) });
455
464
  export type HookListView = z.infer<typeof hookListView>;
456
465
 
@@ -562,6 +571,12 @@ export type LogoutResult = z.infer<typeof logoutResult>;
562
571
  export const mCPConfig = z.object({ "args": z.array(z.string()).default([]), "command": z.string().nullable().default(null), "env": z.record(z.string(), z.string()).default({}), "headers": z.record(z.string(), z.string()).default({}), "type": z.string().nullable().default(null), "uds": z.string().nullable().default(null), "url": z.string().nullable().default(null) }).strict();
563
572
  export type MCPConfig = z.infer<typeof mCPConfig>;
564
573
 
574
+ export const manifestExtensionMap = z.object({ "extensions": z.record(z.string(), z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())])))), "title": z.string() });
575
+ export type ManifestExtensionMap = z.infer<typeof manifestExtensionMap>;
576
+
577
+ export const manifestExtensionSettings = z.object({ "api_tools": z.record(z.string(), z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())])))), "backend_module": z.string().nullable(), "extensions_modules": z.array(z.string()), "mcp": z.array(manifestExtensionMap), "tools": z.array(manifestExtensionMap) });
578
+ export type ManifestExtensionSettings = z.infer<typeof manifestExtensionSettings>;
579
+
565
580
  export const manifestReplace = z.object({ "manifest_text": z.string() });
566
581
  export type ManifestReplace = z.infer<typeof manifestReplace>;
567
582
 
@@ -577,6 +592,12 @@ export type MarketplaceUninstall = z.infer<typeof marketplaceUninstall>;
577
592
  export const marketplaceUpdate = z.object({ "accept_public_routes": z.boolean().default(false), "env": z.record(z.string(), z.string()).nullable().default(null), "ref": z.string(), "route_mounts": z.record(z.string(), z.string()).nullable().default(null), "secret_keys": z.array(z.string()).nullable().default(null), "version": z.string().nullable().default(null) });
578
593
  export type MarketplaceUpdate = z.infer<typeof marketplaceUpdate>;
579
594
 
595
+ export const mcpAdvertisedTool = z.object({ "bound": z.boolean(), "description": z.string().nullable(), "name": z.string(), "selected": z.boolean(), "title": z.string().nullable(), "unbound_reason": z.enum(["server_failed","not_loaded","preset_conflict","unusable_schema","not_listed_at_bind"]).nullable() });
596
+ export type McpAdvertisedTool = z.infer<typeof mcpAdvertisedTool>;
597
+
598
+ export const mcpAdvertisedTools = z.object({ "exclude": z.array(z.string()), "include": z.array(z.string()), "title": z.string(), "tools": z.array(mcpAdvertisedTool), "unadvertised": z.array(z.string()) });
599
+ export type McpAdvertisedTools = z.infer<typeof mcpAdvertisedTools>;
600
+
580
601
  export const taiMCPConfig = z.object({ "config": mCPConfig, "exclude": z.array(z.string()).default([]), "extensions": z.record(z.string(), z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())])))).default({}), "include": z.array(z.string()).default([]), "managed": connectorRef.nullable().default(null), "title": z.string() }).strict();
581
602
  export type TaiMCPConfig = z.infer<typeof taiMCPConfig>;
582
603
 
@@ -601,6 +622,9 @@ export type McpStatusSnapshot = z.infer<typeof mcpStatusSnapshot>;
601
622
  export const mcpTargets = z.object({ "targets": z.array(z.string()).nullable().default(null) });
602
623
  export type McpTargets = z.infer<typeof mcpTargets>;
603
624
 
625
+ export const mcpToolFilterUpdate = z.object({ "exclude": z.array(z.string()).default([]), "include": z.array(z.string()).default([]) });
626
+ export type McpToolFilterUpdate = z.infer<typeof mcpToolFilterUpdate>;
627
+
604
628
  export const memberActionDescriptor = z.object({ "destructive": z.boolean(), "input_schema": z.record(z.string(), z.unknown()), "key": z.string().min(1), "label": z.string(), "result_schema": z.record(z.string(), z.unknown()), "scope": z.enum(["page","member_row","invite_row"]) }).strict();
605
629
  export type MemberActionDescriptor = z.infer<typeof memberActionDescriptor>;
606
630
 
@@ -661,7 +685,7 @@ export type OAuthFailed = z.infer<typeof oAuthFailed>;
661
685
  export const oAuthNotConfigured = z.object({ "kind": z.literal("not_configured") });
662
686
  export type OAuthNotConfigured = z.infer<typeof oAuthNotConfigured>;
663
687
 
664
- export const oAuthSuccess = z.object({ "connection_id": z.string(), "fanout": fanoutSummary, "kind": z.literal("success"), "return_url": z.string() });
688
+ export const oAuthSuccess = z.object({ "connection_id": z.string(), "fanout": fanoutSummary, "kind": z.literal("success"), "return_url": z.string(), "span_release_error": z.string().nullable().default(null) });
665
689
  export type OAuthSuccess = z.infer<typeof oAuthSuccess>;
666
690
 
667
691
  export const oAuthCompletionResult = z.discriminatedUnion("kind", [oAuthNotConfigured, oAuthCancelled, oAuthFailed, oAuthSuccess]);
@@ -694,7 +718,7 @@ export type PasswordCredential = z.infer<typeof passwordCredential>;
694
718
  export const patchSubServicesRequest = z.object({ "enabled_sub_services": z.array(z.string()).min(1).max(64), "return_url": z.string().nullable().default(null) });
695
719
  export type PatchSubServicesRequest = z.infer<typeof patchSubServicesRequest>;
696
720
 
697
- export const patchSubServicesResponse = z.object({ "added_manifest_entries": z.array(z.string()).default([]), "authorize_url": z.string().nullable().default(null), "connection_id": z.string(), "consent_required": z.boolean(), "enabled_sub_services": z.array(z.string()), "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "flow_id": z.string().nullable().default(null), "removed_manifest_entries": z.array(z.string()).default([]) });
721
+ export const patchSubServicesResponse = z.object({ "added_manifest_entries": z.array(z.string()).default([]), "authorize_url": z.string().nullable().default(null), "connection_id": z.string(), "consent_required": z.boolean(), "enabled_sub_services": z.array(z.string()), "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "flow_id": z.string().nullable().default(null), "removed_manifest_entries": z.array(z.string()).default([]), "span_release_error": z.string().nullable().default(null) });
698
722
  export type PatchSubServicesResponse = z.infer<typeof patchSubServicesResponse>;
699
723
 
700
724
  export const patternEntry = z.object({ "open_prefix": z.string().nullable(), "pattern": z.string(), "scope_id": z.string() });
@@ -721,30 +745,27 @@ export type PolicyRollback = z.infer<typeof policyRollback>;
721
745
  export const policyRollbackResult = z.object({ "active_version": z.number().int(), "user_id": z.string() });
722
746
  export type PolicyRollbackResult = z.infer<typeof policyRollbackResult>;
723
747
 
724
- export const preservedManifestView = z.object({ "mcp": z.array(z.record(z.string(), z.unknown())), "user_tools": z.array(z.string()) });
748
+ export const preservedManifestView = z.object({ "extension_settings": manifestExtensionSettings, "mcp": z.array(z.record(z.string(), z.unknown())), "user_tools": z.array(z.string()) });
725
749
  export type PreservedManifestView = z.infer<typeof preservedManifestView>;
726
750
 
727
- export const presetCreate = z.object({ "base_tool": z.string(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).default([]), "fixed_kwargs": z.record(z.string(), z.unknown()).default({}), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "name": z.string(), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null) });
751
+ export const presetCreate = z.object({ "base_tool": z.string(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).default([]), "fixed_kwargs": z.record(z.string(), z.unknown()).default({}), "input_map": z.union([templatedText, z.string(), z.null()]).default(null), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "name": z.string(), "output_map": z.union([templatedText, z.string(), z.null()]).default(null), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null) });
728
752
  export type PresetCreate = z.infer<typeof presetCreate>;
729
753
 
730
- export const presetCreateResult = z.object({ "active_version": z.number().int(), "base_tool": z.string(), "conflicted": z.boolean(), "conflicted_reason": z.string().nullable(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))), "fanout": fanoutSummary, "input_schema": z.record(z.string(), z.unknown()).nullable(), "name": z.string(), "output_schema": z.record(z.string(), z.unknown()).nullable(), "used_by": z.array(z.string()), "uses": z.array(z.string()) });
754
+ export const presetCreateResult = z.object({ "active_version": z.number().int(), "base_tool": z.string(), "conflicted": z.boolean(), "conflicted_reason": z.string().nullable(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))), "fanout": fanoutSummary, "input_map": z.union([templatedText, z.string(), z.null()]), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]), "name": z.string(), "output_map": z.union([templatedText, z.string(), z.null()]), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]), "used_by": z.array(z.string()), "uses": z.array(z.string()) });
731
755
  export type PresetCreateResult = z.infer<typeof presetCreateResult>;
732
756
 
733
757
  export const presetDeleteResult = z.object({ "deleted": z.boolean(), "fanout": fanoutSummary, "name": z.string() });
734
758
  export type PresetDeleteResult = z.infer<typeof presetDeleteResult>;
735
759
 
736
- export const presetDetailView = z.object({ "active_version": z.number().int(), "base_tool": z.string(), "conflicted": z.boolean(), "conflicted_reason": z.string().nullable(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))), "fixed_kwargs": z.record(z.string(), z.unknown()), "input_schema": z.record(z.string(), z.unknown()).nullable(), "name": z.string(), "output_schema": z.record(z.string(), z.unknown()).nullable(), "used_by": z.array(z.string()), "uses": z.array(z.string()) });
760
+ export const presetDetailView = z.object({ "active_version": z.number().int(), "base_tool": z.string(), "conflicted": z.boolean(), "conflicted_reason": z.string().nullable(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))), "fixed_kwargs": z.record(z.string(), z.unknown()), "input_map": z.union([templatedText, z.string(), z.null()]), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]), "name": z.string(), "output_map": z.union([templatedText, z.string(), z.null()]), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]), "used_by": z.array(z.string()), "uses": z.array(z.string()) });
737
761
  export type PresetDetailView = z.infer<typeof presetDetailView>;
738
762
 
739
- export const presetRecordView = z.object({ "active_version": z.number().int(), "base_tool": z.string(), "conflicted": z.boolean(), "conflicted_reason": z.string().nullable(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))), "input_schema": z.record(z.string(), z.unknown()).nullable(), "name": z.string(), "output_schema": z.record(z.string(), z.unknown()).nullable(), "used_by": z.array(z.string()), "uses": z.array(z.string()) });
763
+ export const presetRecordView = z.object({ "active_version": z.number().int(), "base_tool": z.string(), "conflicted": z.boolean(), "conflicted_reason": z.string().nullable(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))), "input_map": z.union([templatedText, z.string(), z.null()]), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]), "name": z.string(), "output_map": z.union([templatedText, z.string(), z.null()]), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]), "used_by": z.array(z.string()), "uses": z.array(z.string()) });
740
764
  export type PresetRecordView = z.infer<typeof presetRecordView>;
741
765
 
742
766
  export const presetRecordList = z.array(presetRecordView);
743
767
  export type PresetRecordList = z.infer<typeof presetRecordList>;
744
768
 
745
- export const presetRefereesResult = z.object({ "name": z.string(), "referees": z.array(z.string()) });
746
- export type PresetRefereesResult = z.infer<typeof presetRefereesResult>;
747
-
748
769
  export const presetRename = z.object({ "new_name": z.string() });
749
770
  export type PresetRename = z.infer<typeof presetRename>;
750
771
 
@@ -757,13 +778,13 @@ export type PresetRollback = z.infer<typeof presetRollback>;
757
778
  export const presetRollbackResult = z.object({ "active_version": z.number().int(), "fanout": fanoutSummary, "name": z.string() });
758
779
  export type PresetRollbackResult = z.infer<typeof presetRollbackResult>;
759
780
 
760
- export const presetValidate = z.object({ "base_tool": z.string().nullable().default(null), "description": z.string().nullable().default(null), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).nullable().default(null), "fixed_kwargs": z.record(z.string(), z.unknown()).nullable().default(null), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "name": z.string(), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null) });
781
+ export const presetValidate = z.object({ "base_tool": z.string().nullable().default(null), "description": z.string().nullable().default(null), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).nullable().default(null), "fixed_kwargs": z.record(z.string(), z.unknown()).nullable().default(null), "input_map": z.union([templatedText, z.string(), z.null()]).default(null), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "name": z.string(), "output_map": z.union([templatedText, z.string(), z.null()]).default(null), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null) });
761
782
  export type PresetValidate = z.infer<typeof presetValidate>;
762
783
 
763
784
  export const presetValidateVerdict = z.object({ "error": z.string().nullable(), "valid": z.boolean() });
764
785
  export type PresetValidateVerdict = z.infer<typeof presetValidateVerdict>;
765
786
 
766
- export const presetVersionSave = z.object({ "description": z.string().nullable().default(null), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).nullable().default(null), "fixed_kwargs": z.record(z.string(), z.unknown()).nullable().default(null), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null) });
787
+ export const presetVersionSave = z.object({ "description": z.string().nullable().default(null), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).nullable().default(null), "fixed_kwargs": z.record(z.string(), z.unknown()).nullable().default(null), "input_map": z.union([templatedText, z.string(), z.null()]).default(null), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "output_map": z.union([templatedText, z.string(), z.null()]).default(null), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null) });
767
788
  export type PresetVersionSave = z.infer<typeof presetVersionSave>;
768
789
 
769
790
  export const presetVersionSaveResult = z.object({ "body": z.record(z.string(), z.unknown()), "created_at": z.string(), "fanout": fanoutSummary, "is_current": z.boolean().default(false), "tags": z.array(z.string()).default([]), "version": z.number().int() });
@@ -793,7 +814,7 @@ export type PrincipalRef = z.infer<typeof principalRef>;
793
814
  export const principalUpdate = z.object({ "disabled": z.boolean().nullable().default(null), "display_name": z.string().min(1).nullable().default(null) });
794
815
  export type PrincipalUpdate = z.infer<typeof principalUpdate>;
795
816
 
796
- export const profileApplyResponse = z.object({ "awaiting_respawn": z.array(awaitingWorker).default([]), "fanout": fanoutSummary, "fresh": z.array(freshLife), "hot": z.array(z.string()), "recycle": z.array(recycleEntry), "recycle_stopped": recycleStop.nullable().default(null), "refused": z.array(z.string()) });
817
+ export const profileApplyResponse = z.object({ "awaiting_respawn": z.array(awaitingWorker).default([]), "fanout": fanoutSummary, "fresh": z.array(freshLife), "hot": z.array(z.string()), "recycle": z.array(recycleEntry), "recycle_stopped": recycleStop.nullable().default(null), "refused": z.array(z.string()), "span_release_error": z.string().nullable().default(null) });
797
818
  export type ProfileApplyResponse = z.infer<typeof profileApplyResponse>;
798
819
 
799
820
  export const profileDiffChange = z.object({ "key": z.string(), "new": z.string(), "old": z.string() });
@@ -832,7 +853,7 @@ export type RouteEntry = z.infer<typeof routeEntry>;
832
853
  export const subMcpEntry = z.object({ "access_pattern": z.string(), "mount_url": z.string(), "slug": z.string(), "tools": z.array(z.string()), "transport": z.string() });
833
854
  export type SubMcpEntry = z.infer<typeof subMcpEntry>;
834
855
 
835
- export const projectionResult = z.object({ "admin": z.boolean(), "agents": z.array(z.string()), "mintable": z.boolean(), "owner_user_id": z.string().nullable(), "principal": principalRef.nullable(), "public_resource_id": z.string(), "route_patterns": z.array(patternEntry), "routes": z.array(routeEntry), "scopes": z.array(z.string()), "sub_mcp": z.array(subMcpEntry), "tools": z.array(z.string()), "user_id": z.string() });
856
+ export const projectionResult = z.object({ "access_control_enabled": z.boolean(), "admin": z.boolean(), "agents": z.array(z.string()), "mintable": z.boolean(), "owner_user_id": z.string().nullable(), "principal": principalRef.nullable(), "public_resource_id": z.string(), "route_patterns": z.array(patternEntry), "routes": z.array(routeEntry), "scopes": z.array(z.string()), "sub_mcp": z.array(subMcpEntry), "tools": z.array(z.string()), "user_id": z.string() });
836
857
  export type ProjectionResult = z.infer<typeof projectionResult>;
837
858
 
838
859
  export const subServiceView = z.object({ "description": z.string().default(""), "display_name": z.string(), "id": z.string(), "scopes": z.array(z.string()).default([]) });
@@ -844,7 +865,7 @@ export type ProviderCatalogEntry = z.infer<typeof providerCatalogEntry>;
844
865
  export const providerCatalogResponse = z.object({ "categories": z.array(connectorCategoryView), "providers": z.array(providerCatalogEntry) });
845
866
  export type ProviderCatalogResponse = z.infer<typeof providerCatalogResponse>;
846
867
 
847
- export const providerMutationResponse = z.object({ "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "provider": providerCatalogEntry });
868
+ export const providerMutationResponse = z.object({ "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "provider": providerCatalogEntry, "span_release_error": z.string().nullable().default(null) });
848
869
  export type ProviderMutationResponse = z.infer<typeof providerMutationResponse>;
849
870
 
850
871
  export const pruneResult = z.object({ "held": heldPendingSaveList.optional(), "pruned": z.record(z.string(), z.number().int()) });
@@ -877,7 +898,7 @@ export type ReloadConfigRequest = z.infer<typeof reloadConfigRequest>;
877
898
  export const reloadingError = z.object({ "error": z.literal("reloading — the server is applying a config reload; retry shortly"), "reloading": z.literal(true) });
878
899
  export type ReloadingError = z.infer<typeof reloadingError>;
879
900
 
880
- export const removeProviderResponse = z.object({ "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "provider_id": z.string(), "removed_clients": z.number().int() });
901
+ export const removeProviderResponse = z.object({ "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "provider_id": z.string(), "removed_clients": z.number().int(), "span_release_error": z.string().nullable().default(null) });
881
902
  export type RemoveProviderResponse = z.infer<typeof removeProviderResponse>;
882
903
 
883
904
  export const removedByName = z.object({ "name": z.string(), "removed": z.boolean() });
@@ -934,7 +955,7 @@ export type RoleUpdate = z.infer<typeof roleUpdate>;
934
955
  export const roleVersionsView = z.object({ "audit": z.array(z.record(z.string(), jsonValue)), "versions": z.array(documentVersion) });
935
956
  export type RoleVersionsView = z.infer<typeof roleVersionsView>;
936
957
 
937
- export const routeMappingRow = z.object({ "action": z.enum(["read","write","fenced","secret"]).nullable(), "declared_public": z.boolean(), "mapped": z.string().nullable(), "methods": z.array(z.string()), "path": z.string(), "summary": z.string(), "tags": z.array(z.string()) });
958
+ export const routeMappingRow = z.object({ "action": z.enum(["read","write","fenced","secret"]).nullable(), "declared_public": z.boolean(), "mapped": z.string().nullable(), "methods": z.array(z.string()), "path": z.string(), "role_reach": z.enum(["level","self_service","admin_only","public"]).nullable(), "summary": z.string(), "tags": z.array(z.string()) });
938
959
  export type RouteMappingRow = z.infer<typeof routeMappingRow>;
939
960
 
940
961
  export const routeMappingList = z.array(routeMappingRow);
@@ -1042,7 +1063,7 @@ export type SetupRequest = z.infer<typeof setupRequest>;
1042
1063
  export const setupResult = z.object({ "api_key": z.string(), "invite_token": z.string().nullable().default(null), "key_fingerprint": z.string(), "key_user_id": z.string(), "login_attached": z.boolean(), "login_path": z.string().nullable().default(null), "owner_user_id": z.string() }).strict();
1043
1064
  export type SetupResult = z.infer<typeof setupResult>;
1044
1065
 
1045
- export const startConnectNoAuthResponse = z.object({ "added_manifest_entries": z.array(z.string()).default([]), "connection_id": z.string(), "fanout": z.record(z.string(), z.unknown()).nullable().default(null) });
1066
+ export const startConnectNoAuthResponse = z.object({ "added_manifest_entries": z.array(z.string()).default([]), "connection_id": z.string(), "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "span_release_error": z.string().nullable().default(null) });
1046
1067
  export type StartConnectNoAuthResponse = z.infer<typeof startConnectNoAuthResponse>;
1047
1068
 
1048
1069
  export const startConnectResponse = z.object({ "authorize_url": z.string(), "flow_id": z.string() });
@@ -1135,12 +1156,24 @@ export type StateTemplateCatalogEntry = z.infer<typeof stateTemplateCatalogEntry
1135
1156
  export const stateTemplateCatalog = z.array(stateTemplateCatalogEntry);
1136
1157
  export type StateTemplateCatalog = z.infer<typeof stateTemplateCatalog>;
1137
1158
 
1138
- export const storageInfo = z.object({ "module": z.string().nullable(), "present": z.boolean(), "provider": z.string().nullable() });
1159
+ export const storageInfo = z.object({ "module": z.string().nullable(), "present": z.boolean(), "provider": z.string().nullable(), "surfaces": z.array(z.enum(["storage","templates"])) });
1139
1160
  export type StorageInfo = z.infer<typeof storageInfo>;
1140
1161
 
1141
1162
  export const storageUpload = z.object({ "content_base64": z.string().nullable().default(null), "content_text": z.string().nullable().default(null), "id": z.string() });
1142
1163
  export type StorageUpload = z.infer<typeof storageUpload>;
1143
1164
 
1165
+ export const storedBinaryEntry = z.object({ "content_type": z.string().nullable(), "id": z.string(), "kind": z.literal("binary"), "size": z.number().int() });
1166
+ export type StoredBinaryEntry = z.infer<typeof storedBinaryEntry>;
1167
+
1168
+ export const storedDocumentEntry = z.object({ "content": z.string(), "content_type": z.string().nullable(), "id": z.string(), "kind": z.literal("document"), "size": z.number().int() });
1169
+ export type StoredDocumentEntry = z.infer<typeof storedDocumentEntry>;
1170
+
1171
+ export const storedTextEntry = z.object({ "content": z.string(), "content_type": z.string().nullable(), "id": z.string(), "kind": z.literal("text"), "size": z.number().int() });
1172
+ export type StoredTextEntry = z.infer<typeof storedTextEntry>;
1173
+
1174
+ export const storedEntry = z.discriminatedUnion("kind", [storedTextEntry, storedDocumentEntry, storedBinaryEntry]);
1175
+ export type StoredEntry = z.infer<typeof storedEntry>;
1176
+
1144
1177
  export const stringList = z.array(z.string());
1145
1178
  export type StringList = z.infer<typeof stringList>;
1146
1179
 
@@ -1171,6 +1204,9 @@ export type SubMcpRemovalResult = z.infer<typeof subMcpRemovalResult>;
1171
1204
  export const systemKindsListing = z.array(kindStatus);
1172
1205
  export type SystemKindsListing = z.infer<typeof systemKindsListing>;
1173
1206
 
1207
+ export const templateBinaryEntry = z.object({ "content_type": z.string().nullable(), "id": z.string(), "kind": z.literal("binary"), "schema": z.null().default(null), "size": z.number().int() });
1208
+ export type TemplateBinaryEntry = z.infer<typeof templateBinaryEntry>;
1209
+
1174
1210
  export const templateDelete = z.object({ "path": z.string() });
1175
1211
  export type TemplateDelete = z.infer<typeof templateDelete>;
1176
1212
 
@@ -1180,12 +1216,18 @@ export type TemplateDeleteResult = z.infer<typeof templateDeleteResult>;
1180
1216
  export const templateDirDelete = z.object({ "path": z.string() });
1181
1217
  export type TemplateDirDelete = z.infer<typeof templateDirDelete>;
1182
1218
 
1219
+ export const templateDocumentEntry = z.object({ "content": z.string(), "content_type": z.string().nullable(), "id": z.string(), "kind": z.literal("document"), "schema": z.null().default(null), "size": z.number().int() });
1220
+ export type TemplateDocumentEntry = z.infer<typeof templateDocumentEntry>;
1221
+
1222
+ export const templateTextEntry = z.object({ "content": z.string(), "content_type": z.string().nullable(), "id": z.string(), "kind": z.literal("text"), "schema": z.record(z.string(), jsonValue).nullable(), "schema_error": z.string().nullable(), "size": z.number().int() });
1223
+ export type TemplateTextEntry = z.infer<typeof templateTextEntry>;
1224
+
1225
+ export const templateEntry = z.discriminatedUnion("kind", [templateTextEntry, templateDocumentEntry, templateBinaryEntry]);
1226
+ export type TemplateEntry = z.infer<typeof templateEntry>;
1227
+
1183
1228
  export const templateFetch = z.object({ "template_id": z.string() });
1184
1229
  export type TemplateFetch = z.infer<typeof templateFetch>;
1185
1230
 
1186
- export const templateFetchView = z.object({ "schema": z.record(z.string(), jsonValue), "template": z.string() });
1187
- export type TemplateFetchView = z.infer<typeof templateFetchView>;
1188
-
1189
1231
  export const templateJqApplyResult = z.object({ "applied": z.boolean(), "data": z.record(z.string(), z.unknown()).nullable().default(null), "name": z.string(), "seq": z.number().nullable().default(null), "skipped": z.array(z.record(z.string(), z.unknown())).default([]) }).strict();
1190
1232
  export type TemplateJqApplyResult = z.infer<typeof templateJqApplyResult>;
1191
1233
 
@@ -1231,6 +1273,9 @@ export type TokenPayloadRow = z.infer<typeof tokenPayloadRow>;
1231
1273
  export const tokenPayloadList = z.array(tokenPayloadRow);
1232
1274
  export type TokenPayloadList = z.infer<typeof tokenPayloadList>;
1233
1275
 
1276
+ export const toolExtensionCombosModified = z.object({ "available": z.array(extensionView), "combos": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))), "span_release_error": z.string().nullable() });
1277
+ export type ToolExtensionCombosModified = z.infer<typeof toolExtensionCombosModified>;
1278
+
1234
1279
  export const toolExtensionCombosModify = z.object({ "add": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).default([]), "remove": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).default([]) });
1235
1280
  export type ToolExtensionCombosModify = z.infer<typeof toolExtensionCombosModify>;
1236
1281
 
@@ -1309,7 +1354,7 @@ export type TriggerLinkListView = z.infer<typeof triggerLinkListView>;
1309
1354
  export const uninstallResult = z.object({ "notes": z.array(z.string()), "ref": z.string(), "reload": applyResponse.nullable(), "uninstalled": z.boolean() });
1310
1355
  export type UninstallResult = z.infer<typeof uninstallResult>;
1311
1356
 
1312
- export const upgradeRow = z.object({ "detail": z.string(), "outcome": z.enum(["upgraded","up-to-date","no-compatible-version","failed"]), "ref": z.string() });
1357
+ export const upgradeRow = z.object({ "detail": z.string(), "outcome": z.enum(["upgraded","up-to-date","no-compatible-version","failed"]), "ref": z.string(), "span_release_error": z.string().nullable() });
1313
1358
  export type UpgradeRow = z.infer<typeof upgradeRow>;
1314
1359
 
1315
1360
  export const upgradeAllResult = z.object({ "results": z.array(upgradeRow) });
@@ -1442,7 +1487,7 @@ export const responseSchemas = {
1442
1487
  get_api_plugins: studioPluginListing,
1443
1488
  get_api_presets: presetRecordList,
1444
1489
  get_api_presets_name: presetDetailView,
1445
- get_api_presets_name_referees: presetRefereesResult,
1490
+ get_api_presets_name_referees: holdersPreview,
1446
1491
  get_api_presets_name_versions: documentVersionList,
1447
1492
  get_api_presets_name_versions_version: documentVersion,
1448
1493
  get_api_resources_get: resourceContent,
@@ -1457,6 +1502,7 @@ export const responseSchemas = {
1457
1502
  get_api_states_name: servedStateView,
1458
1503
  get_api_states_name_attachments: stateAttachmentList,
1459
1504
  get_api_states_name_attachments_template: stateAttachmentRow,
1505
+ get_api_states_name_attachments_template_referees: holdersPreview,
1460
1506
  get_api_states_name_consumers: stateConsumerList,
1461
1507
  get_api_states_name_records_check: recordCheckPage,
1462
1508
  get_api_states_name_records_target_kind_target_name_kind_key: stateRecordOrNull,
@@ -1465,6 +1511,7 @@ export const responseSchemas = {
1465
1511
  get_api_states_name_stats: stateStats,
1466
1512
  get_api_states_name_subjects: stateSubjectsPage,
1467
1513
  get_api_storage: storageInfo,
1514
+ get_api_storage_entries_resource_id: storedEntry,
1468
1515
  get_api_storage_resources: resourceList,
1469
1516
  get_api_storage_resources_resource_id_stat: resourceStat,
1470
1517
  get_api_sub_mcp: subMcpMapListing,
@@ -1537,6 +1584,7 @@ export const responseSchemas = {
1537
1584
  post_api_mcp_config_entries: applyResponse,
1538
1585
  post_api_mcp_config_secret_env: applyResponse,
1539
1586
  post_api_mcp_status_reload_failed: fleetResult,
1587
+ post_api_mcp_status_title_advertised_tools: mcpAdvertisedTools,
1540
1588
  post_api_mcp_status_title_deregister: fleetResult,
1541
1589
  post_api_mcp_status_title_reload: fleetResult,
1542
1590
  post_api_notifications: notifyResult,
@@ -1560,14 +1608,14 @@ export const responseSchemas = {
1560
1608
  post_api_states_name_records_validate: recordValidation,
1561
1609
  post_api_storage_resources: resourceStored,
1562
1610
  post_api_sub_mcp: subMcpRegistrationResult,
1563
- post_api_template: templateFetchView,
1611
+ post_api_template: templateEntry,
1564
1612
  post_api_tool_meta_folders: folderRecord,
1565
1613
  post_api_tool_meta_folders_folder_id_move: folderRecord,
1566
1614
  post_api_tool_meta_folders_folder_id_rename: folderRecord,
1567
1615
  post_api_tool_runs: runSubmitted,
1568
1616
  post_api_tools_config_entries: applyResponse,
1569
1617
  post_api_tools_name_extensions: applyResponse,
1570
- post_api_tools_name_extensions_combos: toolExtensionsView,
1618
+ post_api_tools_name_extensions_combos: toolExtensionCombosModified,
1571
1619
  post_api_tools_reload: fleetResult,
1572
1620
  post_api_tools_remove: fleetResult,
1573
1621
  post_api_upload_template: templateUploadResult,
@@ -1580,6 +1628,7 @@ export const responseSchemas = {
1580
1628
  put_api_conversations_persons_person_id_locale: person,
1581
1629
  put_api_conversations_route_name_thread_mode: threadModeSetResult,
1582
1630
  put_api_hooks_topics_topic_verifier: topicVerifierView,
1631
+ put_api_mcp_config_entries_title_tool_filter: applyResponse,
1583
1632
  put_api_presets_name_versions_version_tags: presetVersionTagsResult,
1584
1633
  put_api_state_templates_name: stateTemplateDocument,
1585
1634
  put_api_states_name: stateDeclarationPutResponse,
@@ -81,13 +81,13 @@ export type HookRegister = z.infer<typeof hookRegister>;
81
81
  export const intervalCadence = z.object({ "every": z.number().gt(0), "kind": z.literal("interval").default("interval"), "relative": z.boolean().default(false) }).strict();
82
82
  export type IntervalCadence = z.infer<typeof intervalCadence>;
83
83
 
84
- export const presetBody = z.object({ "base_tool": z.string(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).default([]), "fixed_kwargs": z.record(z.string(), z.unknown()).default({}), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null) });
84
+ export const presetBody = z.object({ "base_tool": z.string(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).default([]), "fixed_kwargs": z.record(z.string(), z.unknown()).default({}), "input_map": z.union([templatedText, z.string(), z.null()]).default(null), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "output_map": z.union([templatedText, z.string(), z.null()]).default(null), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null) });
85
85
  export type PresetBody = z.infer<typeof presetBody>;
86
86
 
87
87
  export const presetSeedToolMeta = z.object({ "display_name": z.string().nullable().default(null), "folder_path": z.string().nullable().default(null), "tags": z.array(z.string()).nullable().default(null) });
88
88
  export type PresetSeedToolMeta = z.infer<typeof presetSeedToolMeta>;
89
89
 
90
- export const presetSeed = z.object({ "base_tool": z.string(), "description": z.string(), "fixed_kwargs": z.record(z.string(), z.unknown()).default({}), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "name": z.string(), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null), "tool_meta": presetSeedToolMeta.nullable().default(null) });
90
+ export const presetSeed = z.object({ "base_tool": z.string(), "description": z.string(), "fixed_kwargs": z.record(z.string(), z.unknown()).default({}), "input_map": z.union([templatedText, z.string(), z.null()]).default(null), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "name": z.string(), "output_map": z.union([templatedText, z.string(), z.null()]).default(null), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null), "tool_meta": presetSeedToolMeta.nullable().default(null) });
91
91
  export type PresetSeed = z.infer<typeof presetSeed>;
92
92
 
93
93
  export const previousProfileName = z.literal("@previous");
@@ -4294,7 +4294,7 @@ export const servedDocumentsJson = {
4294
4294
  }
4295
4295
  }
4296
4296
  },
4297
- "description": "The persisted body of a versioned preset.\n\n``base_tool`` is the tool the preset binds; ``description`` is the preset's\nhuman description; ``fixed_kwargs`` are the baked kwargs (each becomes a\nhidden, fixed constant on the bound tool). ``extensions`` is a list of\nextension COMBOS — the SAME shape as a manifest ``extensions`` map value,\neach combo element an extension name or a ``{\"name\", \"config\"}`` mapping\nbinding author config (e.g. an ``ask_external`` verifier) — fed unconverted\nto the structured runtime-attach API at register (an empty outer list means\nno extensions; an empty INNER combo is rejected by the validating view).\n``output_schema`` is an optional author-set OUTPUT JSON Schema (an object\nschema): on an AGENT base it is baked into the run tool's ``response_format``\nso the agent FORCES a structured output matching it; on a plain tool it is\nadvertised as the bound tool's output schema and every result is validated\nagainst it at run time — a park is a suspend signal, not a result, and passes.\n``input_schema`` is an optional author-set INPUT JSON\nSchema: it becomes the exposed named tool's input contract, and the caller's\nvalidated object is routed into the base tool's declared payload argument (see\n:class:`PresetInputSchemaSupport`). Only a base tool that DECLARES input-schema\nsupport accepts one; otherwise a set ``input_schema`` is a loud authoring error.\n\nEach schema is the ``TemplatedText | dict`` union: an inline ``dict`` is the JSON\nSchema document itself; a :class:`~tai42_contract.template.TemplatedText` names a stored\nschema by ``id`` (or carries it inline as ``content``), rendered and parsed as JSON to the\nsame schema at the point of use and save.\n\nEvery field must survive carry-forward on a version save: dropping\n``extensions`` would make the branch tools vanish on reload, dropping\n``base_tool`` would break the bind, dropping ``description`` would strip the\ntool's description, dropping ``output_schema`` would silently un-enforce the\nstructured output, and dropping ``input_schema`` would silently un-enforce the\nstructured input.\n\nA ``fixed_kwargs`` scalar-string value written ``!ENV ${VAR}`` is a SECRET\nREFERENCE, not a credential: the server resolves it from the environment at bind\nand the store keeps only the reference — never the resolved value.",
4297
+ "description": "The persisted body of a versioned preset.\n\n``base_tool`` is the tool the preset binds; ``description`` is the preset's\nhuman description; ``fixed_kwargs`` are the baked kwargs (each becomes a\nhidden, fixed constant on the bound tool). ``extensions`` is a list of\nextension COMBOS — the SAME shape as a manifest ``extensions`` map value,\neach combo element an extension name or a ``{\"name\", \"config\"}`` mapping\nbinding author config (e.g. an ``ask_external`` verifier) — fed unconverted\nto the structured runtime-attach API at register (an empty outer list means\nno extensions; an empty INNER combo is rejected by the validating view).\n``output_schema`` is an optional author-set OUTPUT JSON Schema (an object\nschema): on an AGENT base it is baked into the run tool's ``response_format``\nso the agent FORCES a structured output matching it; on a plain tool it is\nadvertised as the bound tool's output schema and every result is validated\nagainst it at run time — a park is a suspend signal, not a result, and passes.\n``input_schema`` is an optional author-set INPUT JSON\nSchema: it becomes the exposed named tool's input contract, and the caller's\nvalidated object is routed into the base tool's declared payload argument (see\n:class:`PresetInputSchemaSupport`). Only a base tool that DECLARES input-schema\nsupport accepts one; otherwise a set ``input_schema`` is a loud authoring error.\n\n``input_map`` and ``output_map`` are optional jq programs. With an ``input_map`` the\ncaller's object (validated against ``input_schema``, which the map requires) is mapped\nto the base tool's arguments, with the stored ``fixed_kwargs`` readable as ``$fixed``;\nthe mapped object is merged with ``fixed_kwargs`` and a key both set is refused, so a\nfixed value is never overridden. The base tool's result then passes the output stage:\n``output_map`` maps it, and ``output_schema`` validates what the map produced (or the\nraw result when there is no map). An output map never runs over a result that carries\na secret. A ``str`` map is the jq program itself; a\n:class:`~tai42_contract.template.TemplatedText` is rendered to the program.\n\nEach schema is the ``TemplatedText | dict`` union: an inline ``dict`` is the JSON\nSchema document itself; a :class:`~tai42_contract.template.TemplatedText` names a stored\nschema by ``id`` (or carries it inline as ``content``), rendered and parsed as JSON to the\nsame schema at the point of use and save.\n\nEvery field must survive carry-forward on a version save: dropping\n``extensions`` would make the branch tools vanish on reload, dropping\n``base_tool`` would break the bind, dropping ``description`` would strip the\ntool's description, dropping ``output_schema`` would silently un-enforce the\nstructured output, dropping ``input_schema`` would silently un-enforce the\nstructured input, and dropping ``input_map`` or ``output_map`` would silently\nchange what the base tool receives or what the caller gets back.\n\nA ``fixed_kwargs`` scalar-string value written ``!ENV ${VAR}`` is a SECRET\nREFERENCE, not a credential: the server resolves it from the environment at bind\nand the store keeps only the reference — never the resolved value.",
4298
4298
  "properties": {
4299
4299
  "base_tool": {
4300
4300
  "title": "Base Tool",
@@ -4330,6 +4330,21 @@ export const servedDocumentsJson = {
4330
4330
  "title": "Fixed Kwargs",
4331
4331
  "type": "object"
4332
4332
  },
4333
+ "input_map": {
4334
+ "anyOf": [
4335
+ {
4336
+ "$ref": "#/$defs/TemplatedText"
4337
+ },
4338
+ {
4339
+ "type": "string"
4340
+ },
4341
+ {
4342
+ "type": "null"
4343
+ }
4344
+ ],
4345
+ "default": null,
4346
+ "title": "Input Map"
4347
+ },
4333
4348
  "input_schema": {
4334
4349
  "anyOf": [
4335
4350
  {
@@ -4346,6 +4361,21 @@ export const servedDocumentsJson = {
4346
4361
  "default": null,
4347
4362
  "title": "Input Schema"
4348
4363
  },
4364
+ "output_map": {
4365
+ "anyOf": [
4366
+ {
4367
+ "$ref": "#/$defs/TemplatedText"
4368
+ },
4369
+ {
4370
+ "type": "string"
4371
+ },
4372
+ {
4373
+ "type": "null"
4374
+ }
4375
+ ],
4376
+ "default": null,
4377
+ "title": "Output Map"
4378
+ },
4349
4379
  "output_schema": {
4350
4380
  "anyOf": [
4351
4381
  {
@@ -4732,7 +4762,7 @@ export const servedDocumentsJson = {
4732
4762
  }
4733
4763
  }
4734
4764
  },
4735
- "description": "A declared default preset a plugin ships for import-time seeding.\n\nA seed names the preset (``name``), its human ``description``, the\n``base_tool`` it binds, and the ``fixed_kwargs`` baked in — the same body a\n:class:`PresetBody` carries — plus the optional author ``input_schema`` /\n``output_schema`` and optional ``tool_meta`` display seed. The applier creates\nor upgrades the preset from this shape; the contract holds only the SHAPE,\nnever the applier logic.\n\nA ``fixed_kwargs`` scalar-string value written ``!ENV ${VAR}`` is a SECRET\nREFERENCE, not a credential: the server resolves it from the environment at bind\nand the store keeps only the reference — never the resolved value.",
4765
+ "description": "A declared default preset a plugin ships for import-time seeding.\n\nA seed names the preset (``name``), its human ``description``, the\n``base_tool`` it binds, and the ``fixed_kwargs`` baked in — the same body a\n:class:`PresetBody` carries — plus the optional author ``input_schema`` /\n``output_schema``, ``input_map`` / ``output_map`` and optional ``tool_meta`` display seed. The applier creates\nor upgrades the preset from this shape; the contract holds only the SHAPE,\nnever the applier logic.\n\nA ``fixed_kwargs`` scalar-string value written ``!ENV ${VAR}`` is a SECRET\nREFERENCE, not a credential: the server resolves it from the environment at bind\nand the store keeps only the reference — never the resolved value.",
4736
4766
  "properties": {
4737
4767
  "base_tool": {
4738
4768
  "title": "Base Tool",
@@ -4749,6 +4779,21 @@ export const servedDocumentsJson = {
4749
4779
  "title": "Fixed Kwargs",
4750
4780
  "type": "object"
4751
4781
  },
4782
+ "input_map": {
4783
+ "anyOf": [
4784
+ {
4785
+ "$ref": "#/$defs/TemplatedText"
4786
+ },
4787
+ {
4788
+ "type": "string"
4789
+ },
4790
+ {
4791
+ "type": "null"
4792
+ }
4793
+ ],
4794
+ "default": null,
4795
+ "title": "Input Map"
4796
+ },
4752
4797
  "input_schema": {
4753
4798
  "anyOf": [
4754
4799
  {
@@ -4769,6 +4814,21 @@ export const servedDocumentsJson = {
4769
4814
  "title": "Name",
4770
4815
  "type": "string"
4771
4816
  },
4817
+ "output_map": {
4818
+ "anyOf": [
4819
+ {
4820
+ "$ref": "#/$defs/TemplatedText"
4821
+ },
4822
+ {
4823
+ "type": "string"
4824
+ },
4825
+ {
4826
+ "type": "null"
4827
+ }
4828
+ ],
4829
+ "default": null,
4830
+ "title": "Output Map"
4831
+ },
4772
4832
  "output_schema": {
4773
4833
  "anyOf": [
4774
4834
  {
package/src/http.ts CHANGED
@@ -64,6 +64,18 @@ export function encodeSegment(value: string | number): string {
64
64
  return encodeURIComponent(segment);
65
65
  }
66
66
 
67
+ /**
68
+ * Encode one part of a multi-segment (`{name:path}`) path parameter. An empty part is
69
+ * kept as it is (the browser sends empty segments as typed); a `.` or `..` part is
70
+ * REJECTED, because the WHATWG URL parser removes it from the path, percent-encoded or not.
71
+ */
72
+ export function encodePathPart(part: string): string {
73
+ if (part === '.' || part === '..') {
74
+ throw new Error(`URL path part must not be '.' or '..'; received ${JSON.stringify(part)}`);
75
+ }
76
+ return encodeURIComponent(part);
77
+ }
78
+
67
79
  function buildUrl(base: string, path: string, query?: RequestOptions['query']): string {
68
80
  const url = `${base}${path}`;
69
81
  if (!query) return url;
package/src/index.ts CHANGED
@@ -5,7 +5,13 @@
5
5
  * validated and every failure throws. No caching of its own — server state
6
6
  * lives in TanStack Query in the feature packages.
7
7
  */
8
- export type { AgentEvent, AgentSummary, ParsedAgentEvent, UnknownAgentEvent } from './agents';
8
+ export type {
9
+ AgentEvent,
10
+ AgentListing,
11
+ AgentSummary,
12
+ ParsedAgentEvent,
13
+ UnknownAgentEvent,
14
+ } from './agents';
9
15
  export { agentEventSchema, parseAgentFrame, parseAgentTranscript } from './agents';
10
16
  export type {
11
17
  AddServerArgs,
@@ -24,6 +30,7 @@ export type {
24
30
  MarketplaceInstallPreviewBody,
25
31
  MarketplaceSearchQuery,
26
32
  MarketplaceUninstallBody,
33
+ McpToolFilter,
27
34
  MetricsQuery,
28
35
  PinRoutePublicBody,
29
36
  RoleCreateBody,
@@ -86,10 +93,12 @@ export type {
86
93
  AuthRoute,
87
94
  BackendInfo,
88
95
  BackupDocument,
96
+ BackupExportDocument,
89
97
  BackupImportReport,
90
98
  BackupNewApiKeys,
91
99
  BackupSectionReport,
92
100
  ChannelConversationRouteCreate,
101
+ ChannelEntry,
93
102
  Channels,
94
103
  ChannelTemplate,
95
104
  ChoiceWording,
@@ -152,6 +161,7 @@ export type {
152
161
  FreshLife,
153
162
  GrantLevel,
154
163
  HeldPendingSave,
164
+ HoldersPreview,
155
165
  HookList,
156
166
  HookParams,
157
167
  HookRegister,
@@ -171,6 +181,7 @@ export type {
171
181
  LoginMethods,
172
182
  LoginResult,
173
183
  LogoutResult,
184
+ ManifestExtensionSettings,
174
185
  ManifestMcpEntry,
175
186
  MarketplaceAdvisory,
176
187
  MarketplaceDelivery,
@@ -199,6 +210,8 @@ export type {
199
210
  MarketplaceUpgradeAllResult,
200
211
  MarketplaceUpgradeAllRow,
201
212
  MarketplaceVersion,
213
+ McpAdvertisedTool,
214
+ McpAdvertisedTools,
202
215
  McpEnvRef,
203
216
  McpEnvRefs,
204
217
  McpReloadResult,
@@ -227,8 +240,8 @@ export type {
227
240
  PresetBody,
228
241
  PresetDetail,
229
242
  PresetExtensionElement,
243
+ PresetHolderAction,
230
244
  PresetRecord,
231
- PresetReferees,
232
245
  PresetRenamed,
233
246
  PresetValidation,
234
247
  PresetVersion,
@@ -249,6 +262,7 @@ export type {
249
262
  RecycleEntry,
250
263
  RecycleRoll,
251
264
  RecycleStop,
265
+ ReferenceHolder,
252
266
  ReloadConfigResult,
253
267
  RemoveProviderResult,
254
268
  ResolvedSpanValue,
@@ -259,6 +273,7 @@ export type {
259
273
  RoleVersions,
260
274
  RouteAction,
261
275
  RouteEntry,
276
+ RouteRoleReach,
262
277
  Run,
263
278
  RunAnswer,
264
279
  RunSpan,
@@ -300,6 +315,7 @@ export type {
300
315
  StatusWording,
301
316
  StorageInfo,
302
317
  StorageResourceStat,
318
+ StoredEntry,
303
319
  StudioPluginListingEntry,
304
320
  SubjectPage,
305
321
  SubjectRow,
@@ -308,6 +324,7 @@ export type {
308
324
  TargetConversationConfig,
309
325
  TemplateDeclarations,
310
326
  TemplatedText,
327
+ TemplateEntry,
311
328
  TemplateJq,
312
329
  TemplateJqApplyResult,
313
330
  TemplateJqResult,