@tool-bridge/server 0.21.1 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/admin.js +170 -0
  2. package/dist/airtable-ML2GIGCH.js +790 -0
  3. package/dist/{alt_text_generator_ai-W7O34SNG.js → alt_text_generator_ai-FGYQAF2A.js} +12 -11
  4. package/dist/{amap-VOX4T2AW.js → amap-G7V65NGK.js} +221 -220
  5. package/dist/anthropic-6ZK24TBB.js +203 -0
  6. package/dist/apify-VDGYHP6W.js +248 -0
  7. package/dist/brave_search-TAATLZOS.js +302 -0
  8. package/dist/chunk-2IAI3XQM.js +302 -0
  9. package/dist/chunk-7ISGFRC6.js +161 -0
  10. package/dist/{chunk-E6JCVKW6.js → chunk-BNMLA2RC.js} +3 -3
  11. package/dist/chunk-HA4BGL6C.js +8429 -0
  12. package/dist/{chunk-KMTT3I6D.js → chunk-RMAWSG7E.js} +19172 -25717
  13. package/dist/{chunk-XYBU3WZH.js → chunk-RTW5VRTK.js} +3 -3
  14. package/dist/chunk-U7PTOA3U.js +7320 -0
  15. package/dist/chunk-UY6ANCOY.js +378 -0
  16. package/dist/{chunk-ATK45BXV.js → chunk-X7ZUTKHR.js} +4 -2
  17. package/dist/circleci-BQ2UWXL2.js +389 -0
  18. package/dist/clerk-2JYWQNOI.js +1019 -0
  19. package/dist/cohere-6MI7AQM4.js +185 -0
  20. package/dist/{confluence-B3EWPZVE.js → confluence-6Y6GDETF.js} +105 -104
  21. package/dist/{convertapi-EUWSQYPF.js → convertapi-HBZCSWOX.js} +32 -31
  22. package/dist/{currencyapi-KVTIK3GL.js → currencyapi-337U5TGI.js} +71 -71
  23. package/dist/deepseek-OSPASO7O.js +210 -0
  24. package/dist/docker_hub-3ATQOY5L.js +933 -0
  25. package/dist/dropbox-LSA4GM2Y.js +1305 -0
  26. package/dist/dub-VZPJSPI6.js +680 -0
  27. package/dist/e2b-6SDYQZL2.js +278 -0
  28. package/dist/exa-B6EUYDVP.js +332 -0
  29. package/dist/{fal_ai-23E7JPNT.js → fal_ai-K4Q27IME.js} +81 -80
  30. package/dist/{feishu-7QRIDUV6.js → feishu-4TKXG4SU.js} +528 -572
  31. package/dist/{feishu_custom_bot-TJ4K7QNJ.js → feishu_custom_bot-7CTEAKRB.js} +57 -53
  32. package/dist/figma-OUKSZLD5.js +777 -0
  33. package/dist/firehydrant-7MOYL7QH.js +563 -0
  34. package/dist/{fixer-BWON27UO.js → fixer-H2BV2NO4.js} +34 -33
  35. package/dist/fly-PXKY6PNH.js +469 -0
  36. package/dist/{front-QCGXYEDJ.js → front-UZYIV5DW.js} +104 -104
  37. package/dist/geocodio-NSYO7TFP.js +213 -0
  38. package/dist/ghost-QBKKQQMF.js +338 -0
  39. package/dist/github-ENLSJ4CL.js +5421 -0
  40. package/dist/gmail-KQSDEB47.js +1887 -0
  41. package/dist/googlecalendar-5YCX4SZF.js +2524 -0
  42. package/dist/{googledocs-BUHL4J2H.js → googledocs-SSWIVFKA.js} +341 -340
  43. package/dist/{grafana-GLU2DWF2.js → grafana-TF2LXDQA.js} +221 -220
  44. package/dist/graphhopper-CURBVHYK.js +325 -0
  45. package/dist/index.d.ts +1132 -332
  46. package/dist/index.js +31 -14
  47. package/dist/{ip2proxy-EZ64Y4ZH.js → ip2proxy-YNVMTZEM.js} +28 -27
  48. package/dist/ipgeolocation_io-NAU7VJ4J.js +315 -0
  49. package/dist/ipqualityscore-OT63L4TI.js +279 -0
  50. package/dist/{jina_ai-EFBHTBXL.js → jina_ai-6WBMBGWM.js} +23 -23
  51. package/dist/{jira-HQSHAA5K.js → jira-DVDVTHNO.js} +118 -117
  52. package/dist/langsmith-IM5N4YAU.js +593 -0
  53. package/dist/lemlist-277SHUQF.js +289 -0
  54. package/dist/{linear-K7RYFYAD.js → linear-AEPH7B5V.js} +327 -326
  55. package/dist/logsnag-VEWRAGBG.js +150 -0
  56. package/dist/main.js +57 -280
  57. package/dist/{mattermost-S2BRCWLQ.js → mattermost-Q3A2BIZA.js} +59 -58
  58. package/dist/mem0-AXS7GZGI.js +544 -0
  59. package/dist/memos-7TXG4ZTU.js +744 -0
  60. package/dist/{metabase-MMSEPCOF.js → metabase-NSVACWQM.js} +90 -89
  61. package/dist/mistral_ai-YZ52RGD4.js +1196 -0
  62. package/dist/{mother_duck-H7PCQNZ2.js → mother_duck-XLLL6FVL.js} +94 -93
  63. package/dist/ngrok-4O4W3WZW.js +356 -0
  64. package/dist/{notes-PFMKRO33.js → notes-YTB3TJOO.js} +11 -9
  65. package/dist/notion-4W4O7J7V.js +940 -0
  66. package/dist/open_exchange_rates-23QJXVO5.js +215 -0
  67. package/dist/openai-ZS7GLSLH.js +800 -0
  68. package/dist/opengraph_io-PMVH7OYI.js +362 -0
  69. package/dist/openrouter-ONRGFNB6.js +441 -0
  70. package/dist/outline-UCUYZZ7J.js +599 -0
  71. package/dist/paddle-35HTKTUL.js +454 -0
  72. package/dist/perplexity-NVOBYN24.js +220 -0
  73. package/dist/pinecone-55CJY73C.js +571 -0
  74. package/dist/{pipedrive-Y2O7QGFF.js → pipedrive-WMCAKS72.js} +99 -98
  75. package/dist/polar-SM4ZM53B.js +395 -0
  76. package/dist/posthog-NWCXVXNJ.js +3464 -0
  77. package/dist/postmark-QJV5PHUQ.js +427 -0
  78. package/dist/{prerender-MENYM2TY.js → prerender-2W7UT4SC.js} +31 -30
  79. package/dist/{pubmed-GOXUVVH5.js → pubmed-VVV7XYLU.js} +239 -238
  80. package/dist/{railway-V2SID4WV.js → railway-KGI57S3O.js} +118 -117
  81. package/dist/readwise-AGHTQB42.js +470 -0
  82. package/dist/render-O4HBROCK.js +461 -0
  83. package/dist/{replicate-756MXPYX.js → replicate-KWBOMX7D.js} +81 -80
  84. package/dist/{resend-ZKH3BTBI.js → resend-DRH6Y6I4.js} +20 -16
  85. package/dist/rootly-XGCUDW6X.js +336 -0
  86. package/dist/{scrapfly-NSRHFDIQ.js → scrapfly-OIQ3OY6L.js} +62 -61
  87. package/dist/{scrapingbee-OQHLAVEY.js → scrapingbee-OCZO4FHX.js} +56 -56
  88. package/dist/{screenshot_fyi-DVWG3AXC.js → screenshot_fyi-CUNGFZOC.js} +16 -16
  89. package/dist/semantic_scholar-3UJRLKES.js +611 -0
  90. package/dist/{sentry-546MNDJG.js → sentry-5BWVZFJV.js} +208 -207
  91. package/dist/{shodan-C3OON3Z3.js → shodan-HI37CTEW.js} +62 -61
  92. package/dist/shopify-LJ2EV2HH.js +610 -0
  93. package/dist/stripe-3LHMV55K.js +585 -0
  94. package/dist/{supabase-U2SL4D63.js → supabase-H2KPX3Q2.js} +245 -244
  95. package/dist/tavily-FBEWGH3Z.js +326 -0
  96. package/dist/telegram-MYYO3JND.js +1767 -0
  97. package/dist/{telnyx-CXQ4EZUX.js → telnyx-H4ALEGAX.js} +57 -56
  98. package/dist/todoist-OBWICA5Q.js +664 -0
  99. package/dist/trello-GUFUJRWO.js +1080 -0
  100. package/dist/turso-NIAK4UMS.js +416 -0
  101. package/dist/{twilio-4PDBJKWX.js → twilio-K6SLK2CX.js} +70 -69
  102. package/dist/umami-42RS2EPS.js +389 -0
  103. package/dist/unsplash-V7TOTETT.js +351 -0
  104. package/dist/{upstash_redis-G4LQBYHA.js → upstash_redis-AWQMB6Y3.js} +51 -50
  105. package/dist/uptimerobot-AZC2DHOT.js +483 -0
  106. package/dist/v2ex-4TVRNMLS.js +667 -0
  107. package/dist/vercel-DPHTJ3XR.js +1076 -0
  108. package/dist/{wolfram_alpha_api-3G4PUJWB.js → wolfram_alpha_api-XAG7IXBW.js} +36 -35
  109. package/dist/wordpress-KMPKVGUX.js +812 -0
  110. package/dist/workos-PKB2YR7S.js +664 -0
  111. package/dist/zhihu-Y4H4XYPB.js +254 -0
  112. package/package.json +18 -9
  113. package/dist/airtable-LLZDFN7M.js +0 -789
  114. package/dist/anthropic-G23NN3X5.js +0 -202
  115. package/dist/apify-Y3SS734K.js +0 -247
  116. package/dist/brave_search-ZC7OAPSZ.js +0 -301
  117. package/dist/chunk-R6P4XAE5.js +0 -248
  118. package/dist/chunk-U7B6DS2O.js +0 -977
  119. package/dist/chunk-UZM2RXZH.js +0 -23436
  120. package/dist/circleci-3BAX5FCG.js +0 -388
  121. package/dist/clerk-6LEM6TNU.js +0 -1019
  122. package/dist/cloudflare_dns-KINYTJUD.js +0 -588
  123. package/dist/cohere-XCJ5AJ6B.js +0 -185
  124. package/dist/deepseek-PC5YGNC5.js +0 -209
  125. package/dist/docker_hub-C3MA5FU6.js +0 -932
  126. package/dist/dropbox-XBV7Z2IR.js +0 -1304
  127. package/dist/dub-LDOFG3HC.js +0 -679
  128. package/dist/e2b-JMCPSVBW.js +0 -277
  129. package/dist/exa-RAK7O7RD.js +0 -331
  130. package/dist/figma-E6IX5DTH.js +0 -773
  131. package/dist/firehydrant-ZBLPQREE.js +0 -562
  132. package/dist/fly-ZH3HFCZJ.js +0 -468
  133. package/dist/geocodio-YGNI7DA4.js +0 -212
  134. package/dist/ghost-EVSGKH2Q.js +0 -337
  135. package/dist/github-MA2BGRCJ.js +0 -5420
  136. package/dist/gmail-E5E6AADE.js +0 -1886
  137. package/dist/googlecalendar-BTLFPXTD.js +0 -2523
  138. package/dist/graphhopper-WSMB3TCD.js +0 -324
  139. package/dist/ipgeolocation_io-AA7HAS22.js +0 -315
  140. package/dist/ipqualityscore-BHJXVTJT.js +0 -277
  141. package/dist/langsmith-5W6SCT6F.js +0 -592
  142. package/dist/lemlist-HJWH6UMK.js +0 -288
  143. package/dist/logsnag-4KFOHL37.js +0 -150
  144. package/dist/mem0-CAW43CIC.js +0 -543
  145. package/dist/memos-TWEGPKFM.js +0 -740
  146. package/dist/mistral_ai-64BGZQHP.js +0 -1195
  147. package/dist/ngrok-GQCUGZKJ.js +0 -356
  148. package/dist/notion-DQWZWP4N.js +0 -936
  149. package/dist/open_exchange_rates-QMMD735E.js +0 -214
  150. package/dist/openai-W6PX32NZ.js +0 -799
  151. package/dist/opengraph_io-HNDBXYNW.js +0 -361
  152. package/dist/openrouter-JJYMEAUL.js +0 -437
  153. package/dist/outline-MCBNQZYY.js +0 -595
  154. package/dist/paddle-D2SKLUDN.js +0 -453
  155. package/dist/perplexity-XIFMKUAE.js +0 -219
  156. package/dist/pinecone-HUFTALV2.js +0 -570
  157. package/dist/polar-TYTOMOSR.js +0 -394
  158. package/dist/posthog-43JAR3VW.js +0 -3463
  159. package/dist/postmark-KL2QJYSG.js +0 -426
  160. package/dist/readwise-CI4GIMMJ.js +0 -469
  161. package/dist/render-SUBJ6YRZ.js +0 -460
  162. package/dist/rootly-CD2LJHPI.js +0 -336
  163. package/dist/semantic_scholar-T4A252KW.js +0 -610
  164. package/dist/shopify-Y2HN2MCQ.js +0 -609
  165. package/dist/stripe-VE3CD3AY.js +0 -584
  166. package/dist/tavily-KCZHK6HE.js +0 -326
  167. package/dist/telegram-3URFBCMY.js +0 -1766
  168. package/dist/todoist-HNPWNYTD.js +0 -663
  169. package/dist/trello-3W2MIXRP.js +0 -1079
  170. package/dist/turso-2EQF7C2Z.js +0 -415
  171. package/dist/umami-5REN7TGP.js +0 -388
  172. package/dist/unsplash-EIXL424F.js +0 -350
  173. package/dist/uptimerobot-KNJ3EYLY.js +0 -482
  174. package/dist/v2ex-RHJ234PZ.js +0 -666
  175. package/dist/vercel-AS6NCIC7.js +0 -1075
  176. package/dist/wordpress-KNDAAUV7.js +0 -811
  177. package/dist/workos-R6UITSJ7.js +0 -663
  178. package/dist/zhihu-AGK4HILK.js +0 -253
@@ -0,0 +1,185 @@
1
+ import {
2
+ createAuthedClient
3
+ } from "./chunk-RTW5VRTK.js";
4
+ import "./chunk-BNMLA2RC.js";
5
+ import {
6
+ asJsonObject,
7
+ trimmedText
8
+ } from "./chunk-JXHMDBAY.js";
9
+ import {
10
+ createProviderPlugin,
11
+ upstreamError
12
+ } from "./chunk-X7ZUTKHR.js";
13
+ import "./chunk-7ISGFRC6.js";
14
+ import "./chunk-UY6ANCOY.js";
15
+ import "./chunk-HA4BGL6C.js";
16
+ import "./chunk-U67V476Y.js";
17
+
18
+ // ../plugins/src/cohere/api.ts
19
+ var SERVICE = "cohere";
20
+ function errorMessage(payload, status) {
21
+ const fallback = trimmedText(payload) ?? `cohere request failed with ${status}`;
22
+ const root = asJsonObject(payload);
23
+ return trimmedText(asJsonObject(root?.error)?.message) ?? trimmedText(root?.message) ?? fallback;
24
+ }
25
+ var http = createAuthedClient({
26
+ baseUrl: "https://api.cohere.com/",
27
+ service: SERVICE,
28
+ auth: { kind: "bearer" },
29
+ headers: { accept: "application/json" },
30
+ // 498 是 Cohere 表达"token 无效"的私有码,改判 401 让它落 permission_denied。
31
+ mapError: ({ data: payload, status }) => upstreamError(
32
+ status === 498 ? 401 : status,
33
+ errorMessage(payload, status)
34
+ )
35
+ });
36
+ async function post(ctx, path, body) {
37
+ const { data } = await http.request(ctx, {
38
+ path,
39
+ method: "POST",
40
+ json: body,
41
+ invalidJsonMessage: "cohere returned an invalid JSON response"
42
+ });
43
+ const result = asJsonObject(data);
44
+ if (result === void 0) throw upstreamError(502, "cohere returned an invalid JSON response");
45
+ return result;
46
+ }
47
+ function chat(input, ctx) {
48
+ return post(ctx, "v2/chat", input);
49
+ }
50
+ function embedTexts(input, ctx) {
51
+ return post(ctx, "v2/embed", input);
52
+ }
53
+ function rerankDocuments(input, ctx) {
54
+ return post(ctx, "v2/rerank", input);
55
+ }
56
+
57
+ // ../plugins/src/cohere/schema.ts
58
+ import { z } from "zod/v4";
59
+ var chatInput = z.strictObject({
60
+ model: z.string().min(1).describe("The name of a compatible Cohere chat model."),
61
+ messages: z.array(z.strictObject({
62
+ role: z.enum(["system", "user", "assistant", "tool"]).describe("The author role for the message."),
63
+ content: z.union([z.string().describe("Plain text message content."), z.array(z.looseObject({
64
+ type: z.string().describe("The content block type, such as text or image_url.")
65
+ }).describe("A Cohere chat message content block.")).min(1).describe("Structured content blocks for the message.")]).describe("The content of a Cohere chat message.").optional(),
66
+ tool_calls: z.array(z.looseObject({}).describe("A JSON object accepted or returned by the Cohere API.")).describe("Tool calls made by the assistant message.").optional(),
67
+ tool_call_id: z.string().describe("The identifier of the tool call this tool message responds to.").optional()
68
+ }).describe("A message in the conversation sent to the Cohere Chat API.")).min(1).describe("The ordered conversation messages to send to Cohere."),
69
+ tools: z.array(z.looseObject({}).describe("A JSON object accepted or returned by the Cohere API.")).describe("Function tools available to the model.").optional(),
70
+ strict_tools: z.boolean().describe("Whether tool calls must strictly follow the tool definition.").optional(),
71
+ documents: z.array(z.union([z.string().describe("Document text."), z.looseObject({}).describe("A JSON object accepted or returned by the Cohere API.")]).describe("A document supplied to the model.")).describe("Documents that the model can cite while generating the response.").optional(),
72
+ citation_options: z.looseObject({}).describe("A JSON object accepted or returned by the Cohere API.").optional(),
73
+ response_format: z.looseObject({}).describe("A JSON object accepted or returned by the Cohere API.").optional(),
74
+ safety_mode: z.string().describe("The Cohere safety mode to use for the request.").optional(),
75
+ max_tokens: z.int().describe("The maximum number of output tokens the model will generate.").optional(),
76
+ stop_sequences: z.array(z.string().describe("A stop sequence.")).max(5).describe("Stop sequences that halt generation.").optional(),
77
+ temperature: z.number().describe("Randomness used for generation.").optional(),
78
+ seed: z.int().describe("A best-effort deterministic sampling seed.").optional(),
79
+ frequency_penalty: z.number().describe("Penalty used to reduce repeated tokens.").optional(),
80
+ presence_penalty: z.number().describe("Penalty used to reduce reused token content.").optional(),
81
+ k: z.int().describe("Top-k sampling value. Use 0 to disable k-sampling.").optional(),
82
+ p: z.number().describe("Top-p sampling value.").optional(),
83
+ logprobs: z.boolean().describe("Whether to include generated-token log probabilities.").optional(),
84
+ tool_choice: z.union([z.string().describe("A predefined tool choice value."), z.looseObject({}).describe("A JSON object accepted or returned by the Cohere API.")]).describe("Tool selection behavior for the model.").optional(),
85
+ thinking: z.looseObject({}).describe("A JSON object accepted or returned by the Cohere API.").optional(),
86
+ priority: z.int().describe("Lower values are handled earlier by Cohere.").optional()
87
+ }).describe("Input for generating a synchronous response with the Cohere Chat API.");
88
+ var chatOutput = z.looseObject({
89
+ id: z.string().describe("The unique Cohere response identifier."),
90
+ finish_reason: z.string().describe("Why generation finished."),
91
+ message: z.looseObject({
92
+ role: z.string().describe("The role of the returned message.").optional(),
93
+ content: z.array(z.looseObject({}).describe("A JSON object accepted or returned by the Cohere API.")).describe("Content blocks returned by the assistant message.").optional(),
94
+ tool_calls: z.array(z.looseObject({}).describe("A JSON object accepted or returned by the Cohere API.")).describe("Tool calls returned by Cohere.").optional()
95
+ }).describe("The assistant message returned by Cohere."),
96
+ usage: z.looseObject({}).describe("Usage statistics returned by Cohere.")
97
+ }).describe("The response returned by the Cohere Chat API.");
98
+ var embedTextsInput = z.strictObject({
99
+ model: z.string().min(1).describe("The Cohere embedding model identifier."),
100
+ input_type: z.enum(["search_document", "search_query", "classification", "clustering"]).describe("The type of input passed to the embedding model."),
101
+ texts: z.array(z.string().describe("A text value to embed.")).min(1).max(96).describe("Text strings for the model to embed."),
102
+ max_tokens: z.int().describe("The maximum number of tokens to embed per input.").optional(),
103
+ output_dimension: z.int().describe("The number of dimensions for embed-v4 and newer models.").optional(),
104
+ embedding_types: z.array(z.enum(["float", "int8", "uint8", "binary", "ubinary", "base64"]).describe("The embedding representation to return.")).min(1).describe("Embedding representations to return.").optional(),
105
+ truncate: z.enum(["NONE", "START", "END"]).describe("How Cohere handles inputs longer than the model limit.").optional(),
106
+ priority: z.int().describe("Lower values are handled earlier by Cohere.").optional()
107
+ }).describe("Input for generating text embeddings with the Cohere Embed API.");
108
+ var embedTextsOutput = z.looseObject({
109
+ id: z.string().describe("The unique Cohere response identifier."),
110
+ embeddings: z.looseObject({}).describe("Embeddings grouped by requested representation type."),
111
+ texts: z.array(z.string().describe("A text input.")).describe("Text inputs echoed by Cohere."),
112
+ meta: z.looseObject({
113
+ api_version: z.looseObject({
114
+ version: z.string().describe("The API version used for the response.").optional(),
115
+ is_deprecated: z.boolean().describe("Whether this API version is deprecated.").optional(),
116
+ is_experimental: z.boolean().describe("Whether this API version is experimental.").optional()
117
+ }).describe("The Cohere API version metadata.").optional(),
118
+ billed_units: z.looseObject({}).describe("Billing unit counts reported by Cohere.").optional(),
119
+ tokens: z.looseObject({}).describe("Token usage counts reported by Cohere.").optional(),
120
+ warnings: z.array(z.string().describe("A warning message.")).describe("Warnings returned by Cohere.").optional()
121
+ }).describe("Cohere API metadata including usage and billing details.")
122
+ }).describe("The response returned by the Cohere Embed API.");
123
+ var rerankDocumentsInput = z.strictObject({
124
+ model: z.string().min(1).describe("The Cohere rerank model identifier."),
125
+ query: z.string().min(1).describe("The search query used to rank documents."),
126
+ documents: z.array(z.string().describe("A text document to rank.")).min(1).describe("Texts that will be compared to the query."),
127
+ top_n: z.int().describe("Maximum number of rerank results to return.").optional(),
128
+ max_tokens_per_doc: z.int().describe("Maximum tokens to keep per document before ranking.").optional(),
129
+ priority: z.int().describe("Lower values are handled earlier by Cohere.").optional()
130
+ }).describe("Input for ranking documents by relevance with the Cohere Rerank API.");
131
+ var rerankDocumentsOutput = z.looseObject({
132
+ id: z.string().describe("The unique Cohere response identifier."),
133
+ results: z.array(z.strictObject({
134
+ index: z.int().describe("The original zero-based index of the ranked document.").optional(),
135
+ relevance_score: z.number().describe("Normalized relevance score between 0 and 1.").optional()
136
+ }).describe("A ranked document result returned by Cohere.")).describe("Ranked document results."),
137
+ meta: z.looseObject({
138
+ api_version: z.looseObject({
139
+ version: z.string().describe("The API version used for the response.").optional(),
140
+ is_deprecated: z.boolean().describe("Whether this API version is deprecated.").optional(),
141
+ is_experimental: z.boolean().describe("Whether this API version is experimental.").optional()
142
+ }).describe("The Cohere API version metadata.").optional(),
143
+ billed_units: z.looseObject({}).describe("Billing unit counts reported by Cohere.").optional(),
144
+ tokens: z.looseObject({}).describe("Token usage counts reported by Cohere.").optional(),
145
+ warnings: z.array(z.string().describe("A warning message.")).describe("Warnings returned by Cohere.").optional()
146
+ }).describe("Cohere API metadata including usage and billing details.")
147
+ }).describe("The response returned by the Cohere Rerank API.");
148
+ var cohereActions = {
149
+ chat: {
150
+ description: "Generate a synchronous text response using the Cohere Chat API.",
151
+ effect: "write",
152
+ inputSchema: chatInput,
153
+ outputSchema: z.toJSONSchema(chatOutput, { io: "output", unrepresentable: "any" })
154
+ },
155
+ embed_texts: {
156
+ description: "Generate embeddings for text inputs using the Cohere Embed API.",
157
+ effect: "write",
158
+ inputSchema: embedTextsInput,
159
+ outputSchema: z.toJSONSchema(embedTextsOutput, { io: "output", unrepresentable: "any" })
160
+ },
161
+ rerank_documents: {
162
+ description: "Rank text documents by relevance to a query using the Cohere Rerank API.",
163
+ effect: "write",
164
+ inputSchema: rerankDocumentsInput,
165
+ outputSchema: z.toJSONSchema(rerankDocumentsOutput, { io: "output", unrepresentable: "any" })
166
+ }
167
+ };
168
+
169
+ // ../plugins/src/cohere/index.ts
170
+ function createCoherePlugin() {
171
+ return createProviderPlugin({
172
+ description: "Cohere",
173
+ actions: cohereActions,
174
+ handlers: {
175
+ chat,
176
+ embed_texts: embedTexts,
177
+ rerank_documents: rerankDocuments
178
+ }
179
+ });
180
+ }
181
+ var cohere_default = createCoherePlugin();
182
+ export {
183
+ createCoherePlugin,
184
+ cohere_default as default
185
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createAuthedClient
3
- } from "./chunk-XYBU3WZH.js";
4
- import "./chunk-E6JCVKW6.js";
3
+ } from "./chunk-RTW5VRTK.js";
4
+ import "./chunk-BNMLA2RC.js";
5
5
  import {
6
6
  asJsonObject,
7
7
  booleanValue,
@@ -13,12 +13,12 @@ import {
13
13
  createProviderPlugin,
14
14
  requireCredential,
15
15
  upstreamError
16
- } from "./chunk-ATK45BXV.js";
17
- import "./chunk-U7B6DS2O.js";
16
+ } from "./chunk-X7ZUTKHR.js";
17
+ import "./chunk-7ISGFRC6.js";
18
+ import "./chunk-UY6ANCOY.js";
18
19
  import {
19
- TBError,
20
- external_exports
21
- } from "./chunk-UZM2RXZH.js";
20
+ TBError
21
+ } from "./chunk-HA4BGL6C.js";
22
22
  import "./chunk-U67V476Y.js";
23
23
 
24
24
  // ../plugins/src/confluence/api.ts
@@ -217,116 +217,117 @@ async function updatePage(input, ctx) {
217
217
  }
218
218
 
219
219
  // ../plugins/src/confluence/schema.ts
220
- var searchContentInput = external_exports.strictObject({
221
- cql: external_exports.string().min(1).describe("The Confluence Query Language string to execute."),
222
- limit: external_exports.int().min(1).max(100).describe("Maximum number of items to return.").optional(),
223
- cursor: external_exports.string().min(1).describe("Opaque pagination cursor returned by Confluence.").optional()
220
+ import { z } from "zod/v4";
221
+ var searchContentInput = z.strictObject({
222
+ cql: z.string().min(1).describe("The Confluence Query Language string to execute."),
223
+ limit: z.int().min(1).max(100).describe("Maximum number of items to return.").optional(),
224
+ cursor: z.string().min(1).describe("Opaque pagination cursor returned by Confluence.").optional()
224
225
  }).describe("Input parameters for searching Confluence content.");
225
- var searchContentOutput = external_exports.strictObject({
226
- results: external_exports.array(external_exports.looseObject({
227
- id: external_exports.string().describe("The Confluence content ID when returned.").optional(),
228
- type: external_exports.string().describe("The Confluence content type when returned.").optional(),
229
- title: external_exports.string().describe("The Confluence content title when returned.").optional(),
230
- url: external_exports.string().describe("The Confluence web URL when returned.").optional(),
231
- excerpt: external_exports.string().describe("The Confluence search excerpt when returned.").optional(),
232
- containerTitle: external_exports.string().describe("The Confluence container title when returned.").optional(),
233
- raw: external_exports.looseObject({}).describe("Provider-specific Confluence payload fields.").optional()
226
+ var searchContentOutput = z.strictObject({
227
+ results: z.array(z.looseObject({
228
+ id: z.string().describe("The Confluence content ID when returned.").optional(),
229
+ type: z.string().describe("The Confluence content type when returned.").optional(),
230
+ title: z.string().describe("The Confluence content title when returned.").optional(),
231
+ url: z.string().describe("The Confluence web URL when returned.").optional(),
232
+ excerpt: z.string().describe("The Confluence search excerpt when returned.").optional(),
233
+ containerTitle: z.string().describe("The Confluence container title when returned.").optional(),
234
+ raw: z.looseObject({}).describe("Provider-specific Confluence payload fields.").optional()
234
235
  }).describe("A Confluence search result.")).describe("The matching Confluence search results.").optional(),
235
- pagination: external_exports.strictObject({
236
- nextCursor: external_exports.string().describe("Cursor for the next Confluence page, or null when no next page is available.").nullable().optional()
236
+ pagination: z.strictObject({
237
+ nextCursor: z.string().describe("Cursor for the next Confluence page, or null when no next page is available.").nullable().optional()
237
238
  }).describe("Confluence pagination metadata.").optional()
238
239
  }).describe("The normalized Confluence search response.");
239
- var listSpacesInput = external_exports.strictObject({
240
- limit: external_exports.int().min(1).max(100).describe("Maximum number of items to return.").optional(),
241
- cursor: external_exports.string().min(1).describe("Opaque pagination cursor returned by Confluence.").optional(),
242
- type: external_exports.enum(["global", "personal"]).describe("Filter spaces by Confluence space type.").optional(),
243
- status: external_exports.enum(["current", "archived"]).describe("Filter spaces by Confluence space status.").optional()
240
+ var listSpacesInput = z.strictObject({
241
+ limit: z.int().min(1).max(100).describe("Maximum number of items to return.").optional(),
242
+ cursor: z.string().min(1).describe("Opaque pagination cursor returned by Confluence.").optional(),
243
+ type: z.enum(["global", "personal"]).describe("Filter spaces by Confluence space type.").optional(),
244
+ status: z.enum(["current", "archived"]).describe("Filter spaces by Confluence space status.").optional()
244
245
  }).describe("Input parameters for listing Confluence spaces.");
245
- var listSpacesOutput = external_exports.strictObject({
246
- spaces: external_exports.array(external_exports.looseObject({
247
- id: external_exports.string().describe("The Confluence space ID.").optional(),
248
- key: external_exports.string().describe("The Confluence space key.").optional(),
249
- name: external_exports.string().describe("The Confluence space name.").optional(),
250
- type: external_exports.string().describe("The Confluence space type.").optional(),
251
- status: external_exports.string().describe("The Confluence space status.").optional(),
252
- homepageId: external_exports.string().describe("The ID of the space homepage, or null when unavailable.").nullable().optional(),
253
- raw: external_exports.looseObject({}).describe("Provider-specific Confluence payload fields.").optional()
246
+ var listSpacesOutput = z.strictObject({
247
+ spaces: z.array(z.looseObject({
248
+ id: z.string().describe("The Confluence space ID.").optional(),
249
+ key: z.string().describe("The Confluence space key.").optional(),
250
+ name: z.string().describe("The Confluence space name.").optional(),
251
+ type: z.string().describe("The Confluence space type.").optional(),
252
+ status: z.string().describe("The Confluence space status.").optional(),
253
+ homepageId: z.string().describe("The ID of the space homepage, or null when unavailable.").nullable().optional(),
254
+ raw: z.looseObject({}).describe("Provider-specific Confluence payload fields.").optional()
254
255
  }).describe("A Confluence space.")).describe("The Confluence spaces returned by the request.").optional(),
255
- pagination: external_exports.strictObject({
256
- nextCursor: external_exports.string().describe("Cursor for the next Confluence page, or null when no next page is available.").nullable().optional()
256
+ pagination: z.strictObject({
257
+ nextCursor: z.string().describe("Cursor for the next Confluence page, or null when no next page is available.").nullable().optional()
257
258
  }).describe("Confluence pagination metadata.").optional()
258
259
  }).describe("The normalized Confluence spaces response.");
259
- var getPageInput = external_exports.strictObject({
260
- pageId: external_exports.string().min(1).describe("The Confluence page ID."),
261
- bodyFormat: external_exports.enum(["storage", "atlas_doc_format", "view", "export_view", "styled_view"]).describe("The body representation to include.").optional()
260
+ var getPageInput = z.strictObject({
261
+ pageId: z.string().min(1).describe("The Confluence page ID."),
262
+ bodyFormat: z.enum(["storage", "atlas_doc_format", "view", "export_view", "styled_view"]).describe("The body representation to include.").optional()
262
263
  }).describe("Input parameters for retrieving a Confluence page.");
263
- var getPageOutput = external_exports.strictObject({
264
- page: external_exports.looseObject({
265
- id: external_exports.string().describe("The Confluence page ID.").optional(),
266
- status: external_exports.string().describe("The Confluence page status.").optional(),
267
- title: external_exports.string().describe("The Confluence page title.").optional(),
268
- spaceId: external_exports.string().describe("The Confluence space ID containing the page.").optional(),
269
- parentId: external_exports.string().describe("The parent page ID, or null when unavailable.").nullable().optional(),
270
- createdAt: external_exports.string().describe("The Confluence page creation timestamp.").optional(),
271
- version: external_exports.looseObject({
272
- number: external_exports.int().describe("The Confluence page version number.").optional(),
273
- message: external_exports.string().describe("The Confluence page version message.").optional(),
274
- minorEdit: external_exports.boolean().describe("Whether this version is marked as a minor edit.").optional()
264
+ var getPageOutput = z.strictObject({
265
+ page: z.looseObject({
266
+ id: z.string().describe("The Confluence page ID.").optional(),
267
+ status: z.string().describe("The Confluence page status.").optional(),
268
+ title: z.string().describe("The Confluence page title.").optional(),
269
+ spaceId: z.string().describe("The Confluence space ID containing the page.").optional(),
270
+ parentId: z.string().describe("The parent page ID, or null when unavailable.").nullable().optional(),
271
+ createdAt: z.string().describe("The Confluence page creation timestamp.").optional(),
272
+ version: z.looseObject({
273
+ number: z.int().describe("The Confluence page version number.").optional(),
274
+ message: z.string().describe("The Confluence page version message.").optional(),
275
+ minorEdit: z.boolean().describe("Whether this version is marked as a minor edit.").optional()
275
276
  }).describe("A Confluence page version.").nullable().optional(),
276
- body: external_exports.looseObject({}).describe("Provider-specific Confluence payload fields.").nullable().optional(),
277
- raw: external_exports.looseObject({}).describe("Provider-specific Confluence payload fields.").optional()
277
+ body: z.looseObject({}).describe("Provider-specific Confluence payload fields.").nullable().optional(),
278
+ raw: z.looseObject({}).describe("Provider-specific Confluence payload fields.").optional()
278
279
  }).describe("A Confluence page.").optional()
279
280
  }).describe("The normalized Confluence page response.");
280
- var createPageInput = external_exports.strictObject({
281
- spaceId: external_exports.string().min(1).describe("The Confluence space ID where the page will be created."),
282
- title: external_exports.string().min(1).describe("The title for the new Confluence page."),
283
- body: external_exports.string().min(1).describe("The page body value for the selected representation."),
284
- bodyRepresentation: external_exports.enum(["storage", "atlas_doc_format"]).describe("The representation used for the page body.").optional(),
285
- parentId: external_exports.string().min(1).describe("The parent Confluence page ID.").optional(),
286
- status: external_exports.enum(["current", "draft"]).describe("The Confluence page status to create.").optional()
281
+ var createPageInput = z.strictObject({
282
+ spaceId: z.string().min(1).describe("The Confluence space ID where the page will be created."),
283
+ title: z.string().min(1).describe("The title for the new Confluence page."),
284
+ body: z.string().min(1).describe("The page body value for the selected representation."),
285
+ bodyRepresentation: z.enum(["storage", "atlas_doc_format"]).describe("The representation used for the page body.").optional(),
286
+ parentId: z.string().min(1).describe("The parent Confluence page ID.").optional(),
287
+ status: z.enum(["current", "draft"]).describe("The Confluence page status to create.").optional()
287
288
  }).describe("Input parameters for creating a Confluence page.");
288
- var createPageOutput = external_exports.strictObject({
289
- page: external_exports.looseObject({
290
- id: external_exports.string().describe("The Confluence page ID.").optional(),
291
- status: external_exports.string().describe("The Confluence page status.").optional(),
292
- title: external_exports.string().describe("The Confluence page title.").optional(),
293
- spaceId: external_exports.string().describe("The Confluence space ID containing the page.").optional(),
294
- parentId: external_exports.string().describe("The parent page ID, or null when unavailable.").nullable().optional(),
295
- createdAt: external_exports.string().describe("The Confluence page creation timestamp.").optional(),
296
- version: external_exports.looseObject({
297
- number: external_exports.int().describe("The Confluence page version number.").optional(),
298
- message: external_exports.string().describe("The Confluence page version message.").optional(),
299
- minorEdit: external_exports.boolean().describe("Whether this version is marked as a minor edit.").optional()
289
+ var createPageOutput = z.strictObject({
290
+ page: z.looseObject({
291
+ id: z.string().describe("The Confluence page ID.").optional(),
292
+ status: z.string().describe("The Confluence page status.").optional(),
293
+ title: z.string().describe("The Confluence page title.").optional(),
294
+ spaceId: z.string().describe("The Confluence space ID containing the page.").optional(),
295
+ parentId: z.string().describe("The parent page ID, or null when unavailable.").nullable().optional(),
296
+ createdAt: z.string().describe("The Confluence page creation timestamp.").optional(),
297
+ version: z.looseObject({
298
+ number: z.int().describe("The Confluence page version number.").optional(),
299
+ message: z.string().describe("The Confluence page version message.").optional(),
300
+ minorEdit: z.boolean().describe("Whether this version is marked as a minor edit.").optional()
300
301
  }).describe("A Confluence page version.").nullable().optional(),
301
- body: external_exports.looseObject({}).describe("Provider-specific Confluence payload fields.").nullable().optional(),
302
- raw: external_exports.looseObject({}).describe("Provider-specific Confluence payload fields.").optional()
302
+ body: z.looseObject({}).describe("Provider-specific Confluence payload fields.").nullable().optional(),
303
+ raw: z.looseObject({}).describe("Provider-specific Confluence payload fields.").optional()
303
304
  }).describe("A Confluence page.").optional()
304
305
  }).describe("The normalized Confluence create page response.");
305
- var updatePageInput = external_exports.strictObject({
306
- pageId: external_exports.string().min(1).describe("The Confluence page ID."),
307
- title: external_exports.string().min(1).describe("The updated Confluence page title."),
308
- versionNumber: external_exports.int().min(1).describe("The next Confluence page version number."),
309
- body: external_exports.string().min(1).describe("The updated page body value for the selected representation.").optional(),
310
- bodyRepresentation: external_exports.enum(["storage", "atlas_doc_format"]).describe("The representation used for the page body.").optional(),
311
- status: external_exports.enum(["current", "draft"]).describe("The updated Confluence page status.").optional(),
312
- versionMessage: external_exports.string().min(1).describe("A message stored with the new Confluence page version.").optional(),
313
- minorEdit: external_exports.boolean().describe("Whether the update should be marked as a minor edit.").optional()
306
+ var updatePageInput = z.strictObject({
307
+ pageId: z.string().min(1).describe("The Confluence page ID."),
308
+ title: z.string().min(1).describe("The updated Confluence page title."),
309
+ versionNumber: z.int().min(1).describe("The next Confluence page version number."),
310
+ body: z.string().min(1).describe("The updated page body value for the selected representation.").optional(),
311
+ bodyRepresentation: z.enum(["storage", "atlas_doc_format"]).describe("The representation used for the page body.").optional(),
312
+ status: z.enum(["current", "draft"]).describe("The updated Confluence page status.").optional(),
313
+ versionMessage: z.string().min(1).describe("A message stored with the new Confluence page version.").optional(),
314
+ minorEdit: z.boolean().describe("Whether the update should be marked as a minor edit.").optional()
314
315
  }).describe("Input parameters for updating a Confluence page.");
315
- var updatePageOutput = external_exports.strictObject({
316
- page: external_exports.looseObject({
317
- id: external_exports.string().describe("The Confluence page ID.").optional(),
318
- status: external_exports.string().describe("The Confluence page status.").optional(),
319
- title: external_exports.string().describe("The Confluence page title.").optional(),
320
- spaceId: external_exports.string().describe("The Confluence space ID containing the page.").optional(),
321
- parentId: external_exports.string().describe("The parent page ID, or null when unavailable.").nullable().optional(),
322
- createdAt: external_exports.string().describe("The Confluence page creation timestamp.").optional(),
323
- version: external_exports.looseObject({
324
- number: external_exports.int().describe("The Confluence page version number.").optional(),
325
- message: external_exports.string().describe("The Confluence page version message.").optional(),
326
- minorEdit: external_exports.boolean().describe("Whether this version is marked as a minor edit.").optional()
316
+ var updatePageOutput = z.strictObject({
317
+ page: z.looseObject({
318
+ id: z.string().describe("The Confluence page ID.").optional(),
319
+ status: z.string().describe("The Confluence page status.").optional(),
320
+ title: z.string().describe("The Confluence page title.").optional(),
321
+ spaceId: z.string().describe("The Confluence space ID containing the page.").optional(),
322
+ parentId: z.string().describe("The parent page ID, or null when unavailable.").nullable().optional(),
323
+ createdAt: z.string().describe("The Confluence page creation timestamp.").optional(),
324
+ version: z.looseObject({
325
+ number: z.int().describe("The Confluence page version number.").optional(),
326
+ message: z.string().describe("The Confluence page version message.").optional(),
327
+ minorEdit: z.boolean().describe("Whether this version is marked as a minor edit.").optional()
327
328
  }).describe("A Confluence page version.").nullable().optional(),
328
- body: external_exports.looseObject({}).describe("Provider-specific Confluence payload fields.").nullable().optional(),
329
- raw: external_exports.looseObject({}).describe("Provider-specific Confluence payload fields.").optional()
329
+ body: z.looseObject({}).describe("Provider-specific Confluence payload fields.").nullable().optional(),
330
+ raw: z.looseObject({}).describe("Provider-specific Confluence payload fields.").optional()
330
331
  }).describe("A Confluence page.").optional()
331
332
  }).describe("The normalized Confluence update page response.");
332
333
  var confluenceActions = {
@@ -334,31 +335,31 @@ var confluenceActions = {
334
335
  description: "Search Confluence content with CQL and return normalized result metadata plus pagination.",
335
336
  effect: "read",
336
337
  inputSchema: searchContentInput,
337
- outputSchema: external_exports.toJSONSchema(searchContentOutput, { io: "output", unrepresentable: "any" })
338
+ outputSchema: z.toJSONSchema(searchContentOutput, { io: "output", unrepresentable: "any" })
338
339
  },
339
340
  list_spaces: {
340
341
  description: "List Confluence spaces and return normalized space metadata plus pagination.",
341
342
  effect: "read",
342
343
  inputSchema: listSpacesInput,
343
- outputSchema: external_exports.toJSONSchema(listSpacesOutput, { io: "output", unrepresentable: "any" })
344
+ outputSchema: z.toJSONSchema(listSpacesOutput, { io: "output", unrepresentable: "any" })
344
345
  },
345
346
  get_page: {
346
347
  description: "Get a Confluence page by ID and optionally include its body representation.",
347
348
  effect: "read",
348
349
  inputSchema: getPageInput,
349
- outputSchema: external_exports.toJSONSchema(getPageOutput, { io: "output", unrepresentable: "any" })
350
+ outputSchema: z.toJSONSchema(getPageOutput, { io: "output", unrepresentable: "any" })
350
351
  },
351
352
  create_page: {
352
353
  description: "Create a Confluence page using a JSON-friendly body value and return the created page.",
353
354
  effect: "write",
354
355
  inputSchema: createPageInput,
355
- outputSchema: external_exports.toJSONSchema(createPageOutput, { io: "output", unrepresentable: "any" })
356
+ outputSchema: z.toJSONSchema(createPageOutput, { io: "output", unrepresentable: "any" })
356
357
  },
357
358
  update_page: {
358
359
  description: "Update a Confluence page title, body, or status using an explicit next version number.",
359
360
  effect: "write",
360
361
  inputSchema: updatePageInput,
361
- outputSchema: external_exports.toJSONSchema(updatePageOutput, { io: "output", unrepresentable: "any" })
362
+ outputSchema: z.toJSONSchema(updatePageOutput, { io: "output", unrepresentable: "any" })
362
363
  }
363
364
  };
364
365
 
@@ -6,44 +6,45 @@ import {
6
6
  createProviderPlugin,
7
7
  requireApiKey,
8
8
  upstreamError
9
- } from "./chunk-ATK45BXV.js";
9
+ } from "./chunk-X7ZUTKHR.js";
10
10
  import {
11
11
  assertPublicHttpUrl,
12
12
  guardedFetch
13
- } from "./chunk-U7B6DS2O.js";
13
+ } from "./chunk-7ISGFRC6.js";
14
+ import "./chunk-UY6ANCOY.js";
14
15
  import {
15
- TBError,
16
- external_exports
17
- } from "./chunk-UZM2RXZH.js";
16
+ TBError
17
+ } from "./chunk-HA4BGL6C.js";
18
18
  import "./chunk-U67V476Y.js";
19
19
 
20
20
  // ../plugins/src/convertapi/schema.ts
21
- var convertPdfToDocxInput = external_exports.strictObject({
22
- fileUrl: external_exports.url().describe("The publicly accessible PDF URL to convert."),
23
- fileName: external_exports.string().max(200).describe("The optional output file name to request from ConvertAPI. ConvertAPI appends the correct extension when needed.").optional(),
24
- timeout: external_exports.int().min(10).max(1200).describe("The conversion timeout in seconds.").optional(),
25
- password: external_exports.string().describe("The password used to open a protected PDF document.").optional(),
26
- pageRange: external_exports.string().describe("The PDF page range to convert, for example 1-10 or 1,3,5.").optional(),
27
- layout: external_exports.enum(["flowing", "continuous", "exact"]).describe("How ConvertAPI should reconstruct the PDF page layout in the DOCX output.").optional(),
28
- ocrMode: external_exports.enum(["auto", "force", "never"]).describe("How ConvertAPI should apply OCR during conversion.").optional(),
29
- ocrLanguage: external_exports.enum(["auto", "ar", "ca", "zh", "da", "nl", "en", "fi", "fr", "de", "el", "ko", "it", "ja", "no", "pl", "pt", "ro", "ru", "sl", "es", "sv", "tr", "ua", "th"]).describe("The OCR language code to use for text recognition, or auto for automatic detection.").optional(),
30
- ocrEngine: external_exports.enum(["native", "tesseract"]).describe("The OCR engine ConvertAPI should use for text recognition.").optional(),
31
- annotations: external_exports.enum(["textBox", "comment", "none"]).describe("How ConvertAPI should handle PDF annotations in the DOCX output.").optional()
21
+ import { z } from "zod/v4";
22
+ var convertPdfToDocxInput = z.strictObject({
23
+ fileUrl: z.url().describe("The publicly accessible PDF URL to convert."),
24
+ fileName: z.string().max(200).describe("The optional output file name to request from ConvertAPI. ConvertAPI appends the correct extension when needed.").optional(),
25
+ timeout: z.int().min(10).max(1200).describe("The conversion timeout in seconds.").optional(),
26
+ password: z.string().describe("The password used to open a protected PDF document.").optional(),
27
+ pageRange: z.string().describe("The PDF page range to convert, for example 1-10 or 1,3,5.").optional(),
28
+ layout: z.enum(["flowing", "continuous", "exact"]).describe("How ConvertAPI should reconstruct the PDF page layout in the DOCX output.").optional(),
29
+ ocrMode: z.enum(["auto", "force", "never"]).describe("How ConvertAPI should apply OCR during conversion.").optional(),
30
+ ocrLanguage: z.enum(["auto", "ar", "ca", "zh", "da", "nl", "en", "fi", "fr", "de", "el", "ko", "it", "ja", "no", "pl", "pt", "ro", "ru", "sl", "es", "sv", "tr", "ua", "th"]).describe("The OCR language code to use for text recognition, or auto for automatic detection.").optional(),
31
+ ocrEngine: z.enum(["native", "tesseract"]).describe("The OCR engine ConvertAPI should use for text recognition.").optional(),
32
+ annotations: z.enum(["textBox", "comment", "none"]).describe("How ConvertAPI should handle PDF annotations in the DOCX output.").optional()
32
33
  }).describe("The input payload for converting a public PDF URL to a DOCX file with ConvertAPI.");
33
- var convertPdfToDocxOutput = external_exports.strictObject({
34
- conversionCost: external_exports.int().describe("The amount deducted from the ConvertAPI balance.").optional(),
35
- files: external_exports.array(external_exports.strictObject({
36
- fileName: external_exports.string().describe("The converted file name.").optional(),
37
- fileExt: external_exports.string().describe("The converted file extension.").optional(),
38
- fileSize: external_exports.int().describe("The converted file size in bytes.").optional(),
39
- fileId: external_exports.string().describe("The ConvertAPI temporary file ID.").optional(),
40
- url: external_exports.url().describe("The ConvertAPI temporary download URL for the converted file.").optional(),
41
- transitFile: external_exports.strictObject({
42
- fileId: external_exports.string().min(1).describe("The local transit file identifier.").optional(),
43
- downloadUrl: external_exports.url().describe("The local URL for downloading the transit file.").optional(),
44
- sizeBytes: external_exports.number().describe("The transit file size in bytes.").optional(),
45
- name: external_exports.string().min(1).describe("The transit file name.").optional(),
46
- mimeType: external_exports.string().min(1).describe("The transit file MIME type.").optional()
34
+ var convertPdfToDocxOutput = z.strictObject({
35
+ conversionCost: z.int().describe("The amount deducted from the ConvertAPI balance.").optional(),
36
+ files: z.array(z.strictObject({
37
+ fileName: z.string().describe("The converted file name.").optional(),
38
+ fileExt: z.string().describe("The converted file extension.").optional(),
39
+ fileSize: z.int().describe("The converted file size in bytes.").optional(),
40
+ fileId: z.string().describe("The ConvertAPI temporary file ID.").optional(),
41
+ url: z.url().describe("The ConvertAPI temporary download URL for the converted file.").optional(),
42
+ transitFile: z.strictObject({
43
+ fileId: z.string().min(1).describe("The local transit file identifier.").optional(),
44
+ downloadUrl: z.url().describe("The local URL for downloading the transit file.").optional(),
45
+ sizeBytes: z.number().describe("The transit file size in bytes.").optional(),
46
+ name: z.string().min(1).describe("The transit file name.").optional(),
47
+ mimeType: z.string().min(1).describe("The transit file MIME type.").optional()
47
48
  }).describe("A copy of a converted file stored in local transit storage.").nullable().optional()
48
49
  }).describe("A converted file returned by ConvertAPI.")).min(1).describe("The converted DOCX files returned by ConvertAPI.")
49
50
  }).describe("The output payload for a ConvertAPI PDF to DOCX conversion.");
@@ -52,7 +53,7 @@ var convertapiActions = {
52
53
  description: "Convert a publicly accessible PDF URL to DOCX with ConvertAPI and return temporary file download URLs.",
53
54
  effect: "write",
54
55
  inputSchema: convertPdfToDocxInput,
55
- outputSchema: external_exports.toJSONSchema(convertPdfToDocxOutput, { io: "output", unrepresentable: "any" })
56
+ outputSchema: z.toJSONSchema(convertPdfToDocxOutput, { io: "output", unrepresentable: "any" })
56
57
  }
57
58
  };
58
59