@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.
- package/dist/admin.js +170 -0
- package/dist/airtable-ML2GIGCH.js +790 -0
- package/dist/{alt_text_generator_ai-W7O34SNG.js → alt_text_generator_ai-FGYQAF2A.js} +12 -11
- package/dist/{amap-VOX4T2AW.js → amap-G7V65NGK.js} +221 -220
- package/dist/anthropic-6ZK24TBB.js +203 -0
- package/dist/apify-VDGYHP6W.js +248 -0
- package/dist/brave_search-TAATLZOS.js +302 -0
- package/dist/chunk-2IAI3XQM.js +302 -0
- package/dist/chunk-7ISGFRC6.js +161 -0
- package/dist/{chunk-E6JCVKW6.js → chunk-BNMLA2RC.js} +3 -3
- package/dist/chunk-HA4BGL6C.js +8429 -0
- package/dist/{chunk-KMTT3I6D.js → chunk-RMAWSG7E.js} +19172 -25717
- package/dist/{chunk-XYBU3WZH.js → chunk-RTW5VRTK.js} +3 -3
- package/dist/chunk-U7PTOA3U.js +7320 -0
- package/dist/chunk-UY6ANCOY.js +378 -0
- package/dist/{chunk-ATK45BXV.js → chunk-X7ZUTKHR.js} +4 -2
- package/dist/circleci-BQ2UWXL2.js +389 -0
- package/dist/clerk-2JYWQNOI.js +1019 -0
- package/dist/cohere-6MI7AQM4.js +185 -0
- package/dist/{confluence-B3EWPZVE.js → confluence-6Y6GDETF.js} +105 -104
- package/dist/{convertapi-EUWSQYPF.js → convertapi-HBZCSWOX.js} +32 -31
- package/dist/{currencyapi-KVTIK3GL.js → currencyapi-337U5TGI.js} +71 -71
- package/dist/deepseek-OSPASO7O.js +210 -0
- package/dist/docker_hub-3ATQOY5L.js +933 -0
- package/dist/dropbox-LSA4GM2Y.js +1305 -0
- package/dist/dub-VZPJSPI6.js +680 -0
- package/dist/e2b-6SDYQZL2.js +278 -0
- package/dist/exa-B6EUYDVP.js +332 -0
- package/dist/{fal_ai-23E7JPNT.js → fal_ai-K4Q27IME.js} +81 -80
- package/dist/{feishu-7QRIDUV6.js → feishu-4TKXG4SU.js} +528 -572
- package/dist/{feishu_custom_bot-TJ4K7QNJ.js → feishu_custom_bot-7CTEAKRB.js} +57 -53
- package/dist/figma-OUKSZLD5.js +777 -0
- package/dist/firehydrant-7MOYL7QH.js +563 -0
- package/dist/{fixer-BWON27UO.js → fixer-H2BV2NO4.js} +34 -33
- package/dist/fly-PXKY6PNH.js +469 -0
- package/dist/{front-QCGXYEDJ.js → front-UZYIV5DW.js} +104 -104
- package/dist/geocodio-NSYO7TFP.js +213 -0
- package/dist/ghost-QBKKQQMF.js +338 -0
- package/dist/github-ENLSJ4CL.js +5421 -0
- package/dist/gmail-KQSDEB47.js +1887 -0
- package/dist/googlecalendar-5YCX4SZF.js +2524 -0
- package/dist/{googledocs-BUHL4J2H.js → googledocs-SSWIVFKA.js} +341 -340
- package/dist/{grafana-GLU2DWF2.js → grafana-TF2LXDQA.js} +221 -220
- package/dist/graphhopper-CURBVHYK.js +325 -0
- package/dist/index.d.ts +1132 -332
- package/dist/index.js +31 -14
- package/dist/{ip2proxy-EZ64Y4ZH.js → ip2proxy-YNVMTZEM.js} +28 -27
- package/dist/ipgeolocation_io-NAU7VJ4J.js +315 -0
- package/dist/ipqualityscore-OT63L4TI.js +279 -0
- package/dist/{jina_ai-EFBHTBXL.js → jina_ai-6WBMBGWM.js} +23 -23
- package/dist/{jira-HQSHAA5K.js → jira-DVDVTHNO.js} +118 -117
- package/dist/langsmith-IM5N4YAU.js +593 -0
- package/dist/lemlist-277SHUQF.js +289 -0
- package/dist/{linear-K7RYFYAD.js → linear-AEPH7B5V.js} +327 -326
- package/dist/logsnag-VEWRAGBG.js +150 -0
- package/dist/main.js +57 -280
- package/dist/{mattermost-S2BRCWLQ.js → mattermost-Q3A2BIZA.js} +59 -58
- package/dist/mem0-AXS7GZGI.js +544 -0
- package/dist/memos-7TXG4ZTU.js +744 -0
- package/dist/{metabase-MMSEPCOF.js → metabase-NSVACWQM.js} +90 -89
- package/dist/mistral_ai-YZ52RGD4.js +1196 -0
- package/dist/{mother_duck-H7PCQNZ2.js → mother_duck-XLLL6FVL.js} +94 -93
- package/dist/ngrok-4O4W3WZW.js +356 -0
- package/dist/{notes-PFMKRO33.js → notes-YTB3TJOO.js} +11 -9
- package/dist/notion-4W4O7J7V.js +940 -0
- package/dist/open_exchange_rates-23QJXVO5.js +215 -0
- package/dist/openai-ZS7GLSLH.js +800 -0
- package/dist/opengraph_io-PMVH7OYI.js +362 -0
- package/dist/openrouter-ONRGFNB6.js +441 -0
- package/dist/outline-UCUYZZ7J.js +599 -0
- package/dist/paddle-35HTKTUL.js +454 -0
- package/dist/perplexity-NVOBYN24.js +220 -0
- package/dist/pinecone-55CJY73C.js +571 -0
- package/dist/{pipedrive-Y2O7QGFF.js → pipedrive-WMCAKS72.js} +99 -98
- package/dist/polar-SM4ZM53B.js +395 -0
- package/dist/posthog-NWCXVXNJ.js +3464 -0
- package/dist/postmark-QJV5PHUQ.js +427 -0
- package/dist/{prerender-MENYM2TY.js → prerender-2W7UT4SC.js} +31 -30
- package/dist/{pubmed-GOXUVVH5.js → pubmed-VVV7XYLU.js} +239 -238
- package/dist/{railway-V2SID4WV.js → railway-KGI57S3O.js} +118 -117
- package/dist/readwise-AGHTQB42.js +470 -0
- package/dist/render-O4HBROCK.js +461 -0
- package/dist/{replicate-756MXPYX.js → replicate-KWBOMX7D.js} +81 -80
- package/dist/{resend-ZKH3BTBI.js → resend-DRH6Y6I4.js} +20 -16
- package/dist/rootly-XGCUDW6X.js +336 -0
- package/dist/{scrapfly-NSRHFDIQ.js → scrapfly-OIQ3OY6L.js} +62 -61
- package/dist/{scrapingbee-OQHLAVEY.js → scrapingbee-OCZO4FHX.js} +56 -56
- package/dist/{screenshot_fyi-DVWG3AXC.js → screenshot_fyi-CUNGFZOC.js} +16 -16
- package/dist/semantic_scholar-3UJRLKES.js +611 -0
- package/dist/{sentry-546MNDJG.js → sentry-5BWVZFJV.js} +208 -207
- package/dist/{shodan-C3OON3Z3.js → shodan-HI37CTEW.js} +62 -61
- package/dist/shopify-LJ2EV2HH.js +610 -0
- package/dist/stripe-3LHMV55K.js +585 -0
- package/dist/{supabase-U2SL4D63.js → supabase-H2KPX3Q2.js} +245 -244
- package/dist/tavily-FBEWGH3Z.js +326 -0
- package/dist/telegram-MYYO3JND.js +1767 -0
- package/dist/{telnyx-CXQ4EZUX.js → telnyx-H4ALEGAX.js} +57 -56
- package/dist/todoist-OBWICA5Q.js +664 -0
- package/dist/trello-GUFUJRWO.js +1080 -0
- package/dist/turso-NIAK4UMS.js +416 -0
- package/dist/{twilio-4PDBJKWX.js → twilio-K6SLK2CX.js} +70 -69
- package/dist/umami-42RS2EPS.js +389 -0
- package/dist/unsplash-V7TOTETT.js +351 -0
- package/dist/{upstash_redis-G4LQBYHA.js → upstash_redis-AWQMB6Y3.js} +51 -50
- package/dist/uptimerobot-AZC2DHOT.js +483 -0
- package/dist/v2ex-4TVRNMLS.js +667 -0
- package/dist/vercel-DPHTJ3XR.js +1076 -0
- package/dist/{wolfram_alpha_api-3G4PUJWB.js → wolfram_alpha_api-XAG7IXBW.js} +36 -35
- package/dist/wordpress-KMPKVGUX.js +812 -0
- package/dist/workos-PKB2YR7S.js +664 -0
- package/dist/zhihu-Y4H4XYPB.js +254 -0
- package/package.json +18 -9
- package/dist/airtable-LLZDFN7M.js +0 -789
- package/dist/anthropic-G23NN3X5.js +0 -202
- package/dist/apify-Y3SS734K.js +0 -247
- package/dist/brave_search-ZC7OAPSZ.js +0 -301
- package/dist/chunk-R6P4XAE5.js +0 -248
- package/dist/chunk-U7B6DS2O.js +0 -977
- package/dist/chunk-UZM2RXZH.js +0 -23436
- package/dist/circleci-3BAX5FCG.js +0 -388
- package/dist/clerk-6LEM6TNU.js +0 -1019
- package/dist/cloudflare_dns-KINYTJUD.js +0 -588
- package/dist/cohere-XCJ5AJ6B.js +0 -185
- package/dist/deepseek-PC5YGNC5.js +0 -209
- package/dist/docker_hub-C3MA5FU6.js +0 -932
- package/dist/dropbox-XBV7Z2IR.js +0 -1304
- package/dist/dub-LDOFG3HC.js +0 -679
- package/dist/e2b-JMCPSVBW.js +0 -277
- package/dist/exa-RAK7O7RD.js +0 -331
- package/dist/figma-E6IX5DTH.js +0 -773
- package/dist/firehydrant-ZBLPQREE.js +0 -562
- package/dist/fly-ZH3HFCZJ.js +0 -468
- package/dist/geocodio-YGNI7DA4.js +0 -212
- package/dist/ghost-EVSGKH2Q.js +0 -337
- package/dist/github-MA2BGRCJ.js +0 -5420
- package/dist/gmail-E5E6AADE.js +0 -1886
- package/dist/googlecalendar-BTLFPXTD.js +0 -2523
- package/dist/graphhopper-WSMB3TCD.js +0 -324
- package/dist/ipgeolocation_io-AA7HAS22.js +0 -315
- package/dist/ipqualityscore-BHJXVTJT.js +0 -277
- package/dist/langsmith-5W6SCT6F.js +0 -592
- package/dist/lemlist-HJWH6UMK.js +0 -288
- package/dist/logsnag-4KFOHL37.js +0 -150
- package/dist/mem0-CAW43CIC.js +0 -543
- package/dist/memos-TWEGPKFM.js +0 -740
- package/dist/mistral_ai-64BGZQHP.js +0 -1195
- package/dist/ngrok-GQCUGZKJ.js +0 -356
- package/dist/notion-DQWZWP4N.js +0 -936
- package/dist/open_exchange_rates-QMMD735E.js +0 -214
- package/dist/openai-W6PX32NZ.js +0 -799
- package/dist/opengraph_io-HNDBXYNW.js +0 -361
- package/dist/openrouter-JJYMEAUL.js +0 -437
- package/dist/outline-MCBNQZYY.js +0 -595
- package/dist/paddle-D2SKLUDN.js +0 -453
- package/dist/perplexity-XIFMKUAE.js +0 -219
- package/dist/pinecone-HUFTALV2.js +0 -570
- package/dist/polar-TYTOMOSR.js +0 -394
- package/dist/posthog-43JAR3VW.js +0 -3463
- package/dist/postmark-KL2QJYSG.js +0 -426
- package/dist/readwise-CI4GIMMJ.js +0 -469
- package/dist/render-SUBJ6YRZ.js +0 -460
- package/dist/rootly-CD2LJHPI.js +0 -336
- package/dist/semantic_scholar-T4A252KW.js +0 -610
- package/dist/shopify-Y2HN2MCQ.js +0 -609
- package/dist/stripe-VE3CD3AY.js +0 -584
- package/dist/tavily-KCZHK6HE.js +0 -326
- package/dist/telegram-3URFBCMY.js +0 -1766
- package/dist/todoist-HNPWNYTD.js +0 -663
- package/dist/trello-3W2MIXRP.js +0 -1079
- package/dist/turso-2EQF7C2Z.js +0 -415
- package/dist/umami-5REN7TGP.js +0 -388
- package/dist/unsplash-EIXL424F.js +0 -350
- package/dist/uptimerobot-KNJ3EYLY.js +0 -482
- package/dist/v2ex-RHJ234PZ.js +0 -666
- package/dist/vercel-AS6NCIC7.js +0 -1075
- package/dist/wordpress-KNDAAUV7.js +0 -811
- package/dist/workos-R6UITSJ7.js +0 -663
- 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-
|
|
4
|
-
import "./chunk-
|
|
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-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-X7ZUTKHR.js";
|
|
17
|
+
import "./chunk-7ISGFRC6.js";
|
|
18
|
+
import "./chunk-UY6ANCOY.js";
|
|
18
19
|
import {
|
|
19
|
-
TBError
|
|
20
|
-
|
|
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
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
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 =
|
|
226
|
-
results:
|
|
227
|
-
id:
|
|
228
|
-
type:
|
|
229
|
-
title:
|
|
230
|
-
url:
|
|
231
|
-
excerpt:
|
|
232
|
-
containerTitle:
|
|
233
|
-
raw:
|
|
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:
|
|
236
|
-
nextCursor:
|
|
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 =
|
|
240
|
-
limit:
|
|
241
|
-
cursor:
|
|
242
|
-
type:
|
|
243
|
-
status:
|
|
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 =
|
|
246
|
-
spaces:
|
|
247
|
-
id:
|
|
248
|
-
key:
|
|
249
|
-
name:
|
|
250
|
-
type:
|
|
251
|
-
status:
|
|
252
|
-
homepageId:
|
|
253
|
-
raw:
|
|
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:
|
|
256
|
-
nextCursor:
|
|
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 =
|
|
260
|
-
pageId:
|
|
261
|
-
bodyFormat:
|
|
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 =
|
|
264
|
-
page:
|
|
265
|
-
id:
|
|
266
|
-
status:
|
|
267
|
-
title:
|
|
268
|
-
spaceId:
|
|
269
|
-
parentId:
|
|
270
|
-
createdAt:
|
|
271
|
-
version:
|
|
272
|
-
number:
|
|
273
|
-
message:
|
|
274
|
-
minorEdit:
|
|
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:
|
|
277
|
-
raw:
|
|
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 =
|
|
281
|
-
spaceId:
|
|
282
|
-
title:
|
|
283
|
-
body:
|
|
284
|
-
bodyRepresentation:
|
|
285
|
-
parentId:
|
|
286
|
-
status:
|
|
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 =
|
|
289
|
-
page:
|
|
290
|
-
id:
|
|
291
|
-
status:
|
|
292
|
-
title:
|
|
293
|
-
spaceId:
|
|
294
|
-
parentId:
|
|
295
|
-
createdAt:
|
|
296
|
-
version:
|
|
297
|
-
number:
|
|
298
|
-
message:
|
|
299
|
-
minorEdit:
|
|
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:
|
|
302
|
-
raw:
|
|
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 =
|
|
306
|
-
pageId:
|
|
307
|
-
title:
|
|
308
|
-
versionNumber:
|
|
309
|
-
body:
|
|
310
|
-
bodyRepresentation:
|
|
311
|
-
status:
|
|
312
|
-
versionMessage:
|
|
313
|
-
minorEdit:
|
|
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 =
|
|
316
|
-
page:
|
|
317
|
-
id:
|
|
318
|
-
status:
|
|
319
|
-
title:
|
|
320
|
-
spaceId:
|
|
321
|
-
parentId:
|
|
322
|
-
createdAt:
|
|
323
|
-
version:
|
|
324
|
-
number:
|
|
325
|
-
message:
|
|
326
|
-
minorEdit:
|
|
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:
|
|
329
|
-
raw:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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-
|
|
9
|
+
} from "./chunk-X7ZUTKHR.js";
|
|
10
10
|
import {
|
|
11
11
|
assertPublicHttpUrl,
|
|
12
12
|
guardedFetch
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7ISGFRC6.js";
|
|
14
|
+
import "./chunk-UY6ANCOY.js";
|
|
14
15
|
import {
|
|
15
|
-
TBError
|
|
16
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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 =
|
|
34
|
-
conversionCost:
|
|
35
|
-
files:
|
|
36
|
-
fileName:
|
|
37
|
-
fileExt:
|
|
38
|
-
fileSize:
|
|
39
|
-
fileId:
|
|
40
|
-
url:
|
|
41
|
-
transitFile:
|
|
42
|
-
fileId:
|
|
43
|
-
downloadUrl:
|
|
44
|
-
sizeBytes:
|
|
45
|
-
name:
|
|
46
|
-
mimeType:
|
|
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:
|
|
56
|
+
outputSchema: z.toJSONSchema(convertPdfToDocxOutput, { io: "output", unrepresentable: "any" })
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
59
|
|