@composio/core 0.18.0 → 0.18.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/{CustomTool-C4tv-GL1.mjs → CustomTool-Bz0f52QR.mjs} +16 -6
- package/dist/{CustomTool-BKhHv2hJ.d.mts → CustomTool-VRfWzMix.d.mts} +1 -1
- package/dist/{FileModifierErrors-B8V8_3VE.mjs → FileModifierErrors-CwB-Inm9.mjs} +1 -1
- package/dist/{SsrfErrors-DNJt57GL.mjs → SsrfErrors-xhdVE4yw.mjs} +123 -3
- package/dist/{Telemetry-CBtSnWrm.mjs → Telemetry-Dw9W5RSp.mjs} +2 -34
- package/dist/{cancellation-jUVItfHw.mjs → cancellation-P5YUlcfz.mjs} +2 -2
- package/dist/{composio-CldtZUyC.d.mts → composio-Cb3d1jFe.d.mts} +7 -7
- package/dist/{customTool.types-DC5fPOOi.d.mts → customTool.types-B6ej_8XZ.d.mts} +36 -34
- package/dist/docs/reference/sdk-reference/typescript/session.mdx +4 -3
- package/dist/{errors-DyZt79fi.mjs → errors-Ue9wMrPK.mjs} +2 -2
- package/dist/experimental/index.d.mts +2 -2
- package/dist/experimental/index.mjs +1 -1
- package/dist/{fileUtils.node-BwpUOF0s.mjs → fileUtils.node-KE5Fa-af.mjs} +7 -7
- package/dist/index.d.mts +7 -6
- package/dist/index.mjs +54 -34
- package/dist/models/Files.node.mjs +2 -2
- package/dist/{sensitiveFileUploadPaths-B0w8dqpv.mjs → sensitiveFileUploadPaths-QN7w4n8v.mjs} +1 -1
- package/dist/{ssrfGuard.node-DlxO8uzr.mjs → ssrfGuard.node-BLX6b-Rf.mjs} +96 -19
- package/dist/{types-BgsRW-XH.d.mts → types-CGdgK442.d.mts} +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -1
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -1
- package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -1
- package/dist/utils/modifiers/FileToolModifier.node.mjs +5 -5
- package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
- package/dist/utils/ssrfGuard.node.mjs +1 -1
- package/dist/utils/ssrfGuard.workerd.d.mts +1 -1
- package/dist/utils/ssrfGuard.workerd.mjs +2 -2
- package/package.json +20 -2
- package/src/models/CustomTool.ts +41 -6
- package/src/models/RemoteFile.ts +54 -36
- package/src/models/ToolRouterSession.ts +9 -4
- package/src/models/Triggers.ts +15 -0
- package/src/telemetry/redact.ts +133 -6
- package/src/utils/fileUtils.node.ts +10 -2
- package/src/utils/logger.ts +6 -6
- package/src/utils/pinnedDispatcher.node.ts +109 -13
- package/src/utils/sdk.ts +1 -1
- package/src/utils/ssrfGuard.node.ts +29 -17
- package/src/utils/ssrfGuard.workerd.ts +5 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as ValidationError } from "./errors-
|
|
1
|
+
import { _ as ValidationError } from "./errors-Ue9wMrPK.mjs";
|
|
2
2
|
import { z as z$1 } from "zod/v3";
|
|
3
3
|
import * as z4 from "zod/v4";
|
|
4
4
|
import * as zodToJsonSchema from "zod-to-json-schema";
|
|
@@ -375,26 +375,32 @@ function buildCustomToolsMapFromResponse(tools, toolkits, experimental) {
|
|
|
375
375
|
};
|
|
376
376
|
for (const handle of tools) registerHandle(handle, handle.extendsToolkit);
|
|
377
377
|
if (toolkits) for (const tk of toolkits) for (const handle of tk.tools) registerHandle(handle, tk.slug);
|
|
378
|
-
const findHandle = (originalSlug, toolkit) => {
|
|
378
|
+
const findHandle = (finalSlug, originalSlug, toolkit) => {
|
|
379
379
|
const originalSlugKey = originalSlug.toUpperCase();
|
|
380
380
|
const qualifiedMatch = handlesByQualifiedOriginalSlug.get(qualifiedOriginalSlugKey(toolkit, originalSlugKey));
|
|
381
381
|
if (qualifiedMatch) return qualifiedMatch;
|
|
382
382
|
const bareMatches = handlesByOriginalSlug.get(originalSlugKey) ?? [];
|
|
383
|
-
|
|
383
|
+
if (bareMatches.length === 0) return void 0;
|
|
384
|
+
if (toolkit === void 0 && bareMatches.length === 1) return bareMatches[0];
|
|
385
|
+
const registered = [...new Set(bareMatches.map((m) => (m.toolkit ?? "custom").toUpperCase()))].sort();
|
|
386
|
+
throw new ValidationError(`Cannot map custom tool "${finalSlug}": original slug "${originalSlug}" for toolkit "${toolkit ?? "custom"}" has no exact local match. Registered for toolkits: ${registered.join(", ")}.`);
|
|
384
387
|
};
|
|
385
388
|
const addEntry = (finalSlug, originalSlug, toolkit) => {
|
|
386
389
|
const resolvedToolkit = toolkit ?? void 0;
|
|
387
|
-
const match = findHandle(originalSlug, resolvedToolkit);
|
|
390
|
+
const match = findHandle(finalSlug, originalSlug, resolvedToolkit);
|
|
388
391
|
if (!match) return;
|
|
389
392
|
const finalSlugKey = finalSlug.toUpperCase();
|
|
390
393
|
if (byFinalSlug.has(finalSlugKey)) throw new ValidationError(`Custom tool slug collision: "${finalSlug}" is already registered.`);
|
|
394
|
+
const entryToolkit = resolvedToolkit ?? match.toolkit;
|
|
395
|
+
const qualifiedKey = qualifiedOriginalSlugKey(entryToolkit, originalSlug);
|
|
396
|
+
if (byToolkitAndOriginalSlug.has(qualifiedKey)) throw new ValidationError(`Custom tool slug collision: original slug "${match.handle.slug}" is already registered for toolkit "${entryToolkit ?? "custom"}".`);
|
|
391
397
|
const entry = {
|
|
392
398
|
handle: match.handle,
|
|
393
399
|
finalSlug,
|
|
394
|
-
toolkit:
|
|
400
|
+
toolkit: entryToolkit
|
|
395
401
|
};
|
|
396
402
|
byFinalSlug.set(finalSlugKey, entry);
|
|
397
|
-
byToolkitAndOriginalSlug.set(
|
|
403
|
+
byToolkitAndOriginalSlug.set(qualifiedKey, entry);
|
|
398
404
|
addOriginalSlugAlias({
|
|
399
405
|
byOriginalSlug,
|
|
400
406
|
ambiguousOriginalSlugs,
|
|
@@ -404,6 +410,10 @@ function buildCustomToolsMapFromResponse(tools, toolkits, experimental) {
|
|
|
404
410
|
};
|
|
405
411
|
if (experimental?.custom_tools) for (const ct of experimental.custom_tools) addEntry(ct.slug, ct.original_slug, ct.extends_toolkit);
|
|
406
412
|
if (experimental?.custom_toolkits) for (const ctk of experimental.custom_toolkits) for (const ct of ctk.tools) addEntry(ct.slug, ct.original_slug, ctk.slug);
|
|
413
|
+
for (const [originalSlugKey, matches] of handlesByOriginalSlug) if (matches.length > 1) {
|
|
414
|
+
byOriginalSlug.delete(originalSlugKey);
|
|
415
|
+
ambiguousOriginalSlugs.add(originalSlugKey);
|
|
416
|
+
}
|
|
407
417
|
return {
|
|
408
418
|
byFinalSlug,
|
|
409
419
|
byOriginalSlug,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CreateCustomToolkitParams, f as CustomToolkit, o as CustomTool, r as CreateCustomToolParams, t as AnyZodSchema } from "./customTool.types-
|
|
1
|
+
import { a as CreateCustomToolkitParams, f as CustomToolkit, o as CustomTool, r as CreateCustomToolParams, t as AnyZodSchema } from "./customTool.types-B6ej_8XZ.mjs";
|
|
2
2
|
import { SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";
|
|
3
3
|
//#region src/models/CustomTool.d.ts
|
|
4
4
|
/**
|
|
@@ -55,6 +55,125 @@ const COMPOSIO_LOG_LEVEL = getEnvVariable("COMPOSIO_LOG_LEVEL");
|
|
|
55
55
|
const IS_DEVELOPMENT_OR_CI = getEnvVariable("DEVELOPMENT") || getEnvVariable("CI") || false;
|
|
56
56
|
const DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID = "files";
|
|
57
57
|
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/telemetry/redact.ts
|
|
60
|
+
/**
|
|
61
|
+
* Best-effort redaction of secrets from free-form error text before it is sent
|
|
62
|
+
* to the telemetry endpoint.
|
|
63
|
+
*
|
|
64
|
+
* Error `message` and `stack` fields routinely interpolate URLs (with
|
|
65
|
+
* query-string tokens / presigned signatures), `Authorization` headers, API
|
|
66
|
+
* keys, and connected-account identifiers. None of that should leave the
|
|
67
|
+
* process. Structured telemetry fields never carry raw secrets, so only the two
|
|
68
|
+
* free-form strings are passed through here.
|
|
69
|
+
*
|
|
70
|
+
* This is defence-in-depth, not a proof: it targets the shapes we have seen
|
|
71
|
+
* leak. When in doubt it over-redacts rather than under-redacts.
|
|
72
|
+
*/
|
|
73
|
+
const REDACTED = "[REDACTED]";
|
|
74
|
+
const SECRET_KEY_PATTERN = String.raw`authorization|auth|api[-_]?key|apikey|x-api-key|access[-_]?token|refresh[-_]?token|client[-_]?secret|secret|password|passwd|pwd`;
|
|
75
|
+
const SECRET_KEY_WITH_PREFIX_PATTERN = String.raw`(?:[A-Za-z0-9]+_)*(?:${SECRET_KEY_PATTERN})`;
|
|
76
|
+
const QUOTED_SECRET_KEY_PREFIX = String.raw`(["'])(${SECRET_KEY_WITH_PREFIX_PATTERN})\1(\s*[:=]+\s*)`;
|
|
77
|
+
const BARE_SECRET_KEY_PREFIX = String.raw`(?<![A-Za-z0-9"'])(${SECRET_KEY_PATTERN})\b(\s*[:=]+\s*)`;
|
|
78
|
+
const ESCAPED_SECRET_KEY_PREFIX = String.raw`(?<![A-Za-z0-9])(${SECRET_KEY_PATTERN})\b((?:\\["'])?\s*[:=]+\s*)`;
|
|
79
|
+
const SECRET_PAIR_PREFIX = String.raw`(?<![A-Za-z0-9])(${SECRET_KEY_PATTERN})\b(["']?\s*[:=]+\s*)`;
|
|
80
|
+
const BARE_KEY_DOUBLE_QUOTED_VALUE = new RegExp(String.raw`${BARE_SECRET_KEY_PREFIX}"((?:\\.|[^"\\\r\n])*)"`, "gi");
|
|
81
|
+
const BARE_KEY_SINGLE_QUOTED_VALUE = new RegExp(String.raw`${BARE_SECRET_KEY_PREFIX}'((?:\\.|[^'\\\r\n])*)'`, "gi");
|
|
82
|
+
const BARE_KEY_ESCAPED_DOUBLE_QUOTED_VALUE = new RegExp(String.raw`${ESCAPED_SECRET_KEY_PREFIX}\\"((?:\\.|[^"\\\r\n])*)\\"`, "gi");
|
|
83
|
+
const BARE_KEY_ESCAPED_SINGLE_QUOTED_VALUE = new RegExp(String.raw`${ESCAPED_SECRET_KEY_PREFIX}\\'((?:\\.|[^'\\\r\n])*)\\'`, "gi");
|
|
84
|
+
const SECRET_PAIR_UNQUOTED = new RegExp(String.raw`${SECRET_PAIR_PREFIX}(?!\\["'])([^\s"',}&]+)`, "gi");
|
|
85
|
+
const CONTAINS_QUOTED_FIELD = /(?:^|[,{\s])(["'])[^"'\\\r\n]+\1\s*[:=]\s*$/;
|
|
86
|
+
const REDACTION_RULES = [
|
|
87
|
+
[/(\bhttps?:\/\/[^\s?#'"]+)\?[^\s'"]*/gi, `$1?${REDACTED}`],
|
|
88
|
+
[/\b(bearer|basic)\s+[A-Za-z0-9._~+/=-]+/gi, `$1 ${REDACTED}`],
|
|
89
|
+
[new RegExp(String.raw`${QUOTED_SECRET_KEY_PREFIX}"(?:\\.|[^"\\\r\n])*"`, "gi"), `$1$2$1$3"${REDACTED}"`],
|
|
90
|
+
[new RegExp(String.raw`${QUOTED_SECRET_KEY_PREFIX}'(?:\\.|[^'\\\r\n])*'`, "gi"), `$1$2$1$3'${REDACTED}'`]
|
|
91
|
+
];
|
|
92
|
+
const isWordCharacter = (character) => /[\p{L}\p{N}_]/u.test(character);
|
|
93
|
+
const activeQuotesAt = (input, offsets) => {
|
|
94
|
+
const activeQuotes = /* @__PURE__ */ new Map();
|
|
95
|
+
let quote;
|
|
96
|
+
let escaped = false;
|
|
97
|
+
let lastOffset = -1;
|
|
98
|
+
for (const offset of offsets) lastOffset = Math.max(lastOffset, offset);
|
|
99
|
+
for (let position = 0; position < input.length; position += 1) {
|
|
100
|
+
const character = input[position];
|
|
101
|
+
if (offsets.has(position)) {
|
|
102
|
+
activeQuotes.set(position, quote);
|
|
103
|
+
if (position === lastOffset) break;
|
|
104
|
+
}
|
|
105
|
+
if (character === "\n" || character === "\r") {
|
|
106
|
+
quote = void 0;
|
|
107
|
+
escaped = false;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const previous = position > 0 && !["\n", "\r"].includes(input[position - 1]) ? input[position - 1] : "";
|
|
111
|
+
const following = input[position + 1] ?? "";
|
|
112
|
+
if (!quote) {
|
|
113
|
+
if (character === "\"" || character === "'" && !isWordCharacter(previous)) quote = character;
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (escaped) escaped = false;
|
|
117
|
+
else if (character === "\\") escaped = true;
|
|
118
|
+
else if (character === quote) {
|
|
119
|
+
if (quote === "'" && isWordCharacter(previous) && isWordCharacter(following)) continue;
|
|
120
|
+
quote = void 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return activeQuotes;
|
|
124
|
+
};
|
|
125
|
+
const completesQuotedFieldAt = (input, index, quote) => {
|
|
126
|
+
let escaped = false;
|
|
127
|
+
for (let position = index; position < input.length; position += 1) {
|
|
128
|
+
const character = input[position];
|
|
129
|
+
if (character === "\n" || character === "\r") return false;
|
|
130
|
+
if (escaped) {
|
|
131
|
+
escaped = false;
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (character === "\\") {
|
|
135
|
+
escaped = true;
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
if (character !== quote) continue;
|
|
139
|
+
let separator = position + 1;
|
|
140
|
+
while (separator < input.length && /\s/.test(input[separator])) separator += 1;
|
|
141
|
+
return input[separator] === ":" || input[separator] === "=";
|
|
142
|
+
}
|
|
143
|
+
return false;
|
|
144
|
+
};
|
|
145
|
+
const redactBareQuotedValue = (input, pattern, quote) => {
|
|
146
|
+
pattern.lastIndex = 0;
|
|
147
|
+
const matches = Array.from(input.matchAll(pattern));
|
|
148
|
+
if (matches.length === 0) return input;
|
|
149
|
+
const activeQuotes = activeQuotesAt(input, new Set(matches.map((match) => match.index)));
|
|
150
|
+
const parts = [];
|
|
151
|
+
let cursor = 0;
|
|
152
|
+
for (const match of matches) {
|
|
153
|
+
const offset = match.index;
|
|
154
|
+
parts.push(input.slice(cursor, offset));
|
|
155
|
+
if (activeQuotes.get(offset) === quote && (completesQuotedFieldAt(input, offset + match[0].length, quote) || CONTAINS_QUOTED_FIELD.test(match[3]))) parts.push(match[0]);
|
|
156
|
+
else parts.push(`${match[1]}${match[2]}${quote}${REDACTED}${quote}`);
|
|
157
|
+
cursor = offset + match[0].length;
|
|
158
|
+
}
|
|
159
|
+
parts.push(input.slice(cursor));
|
|
160
|
+
return parts.join("");
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Redact common secret shapes from a free-form string. Returns the input
|
|
164
|
+
* unchanged when it is empty or `undefined`.
|
|
165
|
+
*/
|
|
166
|
+
const redactSensitiveText = (input) => {
|
|
167
|
+
if (!input) return input;
|
|
168
|
+
let output = input;
|
|
169
|
+
for (const [pattern, replacement] of REDACTION_RULES) output = output.replace(pattern, replacement);
|
|
170
|
+
output = output.replace(BARE_KEY_ESCAPED_DOUBLE_QUOTED_VALUE, `$1$2\\"${REDACTED}\\"`);
|
|
171
|
+
output = output.replace(BARE_KEY_ESCAPED_SINGLE_QUOTED_VALUE, `$1$2\\'${REDACTED}\\'`);
|
|
172
|
+
output = redactBareQuotedValue(output, BARE_KEY_DOUBLE_QUOTED_VALUE, "\"");
|
|
173
|
+
output = redactBareQuotedValue(output, BARE_KEY_SINGLE_QUOTED_VALUE, "'");
|
|
174
|
+
return output.replace(SECRET_PAIR_UNQUOTED, `$1$2${REDACTED}`);
|
|
175
|
+
};
|
|
176
|
+
|
|
58
177
|
//#endregion
|
|
59
178
|
//#region src/utils/logger.ts
|
|
60
179
|
const LOG_LEVELS = {
|
|
@@ -91,9 +210,10 @@ var Logger = class {
|
|
|
91
210
|
return String(arg);
|
|
92
211
|
}
|
|
93
212
|
}).join("\n");
|
|
94
|
-
|
|
213
|
+
const redactedArgs = redactSensitiveText(formattedArgs) ?? formattedArgs;
|
|
214
|
+
if (!this.includeTimestamp) return redactedArgs;
|
|
95
215
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
96
|
-
return `${pc.gray(timestamp)} - ${
|
|
216
|
+
return `${pc.gray(timestamp)} - ${redactedArgs}`;
|
|
97
217
|
}
|
|
98
218
|
shouldLog(level) {
|
|
99
219
|
return LOG_LEVELS[level] <= LOG_LEVELS[this.level];
|
|
@@ -381,4 +501,4 @@ var ComposioBlockedInternalUrlError = class extends ComposioError$1 {
|
|
|
381
501
|
};
|
|
382
502
|
|
|
383
503
|
//#endregion
|
|
384
|
-
export {
|
|
504
|
+
export { redactSensitiveText as a, DEFAULT_BASE_URL as c, TEMP_FILES_DIRECTORY_NAME as d, USER_DATA_FILE_NAME as f, getEnvsWithPrefix as h, logger as i, DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID as l, getEnvVariable as m, SsrfErrorCodes as n, COMPOSIO_DIR as o, constants_exports as p, ComposioError$1 as r, COMPOSIO_LOG_LEVEL as s, ComposioBlockedInternalUrlError as t, IS_DEVELOPMENT_OR_CI as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as logger,
|
|
2
|
-
import { l as getRandomUUID } from "./sensitiveFileUploadPaths-
|
|
1
|
+
import { a as redactSensitiveText, i as logger, m as getEnvVariable, r as ComposioError$1 } from "./SsrfErrors-xhdVE4yw.mjs";
|
|
2
|
+
import { l as getRandomUUID } from "./sensitiveFileUploadPaths-QN7w4n8v.mjs";
|
|
3
3
|
import { ComposioError } from "@composio/client";
|
|
4
4
|
|
|
5
5
|
//#region src/types/telemetry.types.ts
|
|
@@ -115,38 +115,6 @@ var TelemetryService = class {
|
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
-
//#endregion
|
|
119
|
-
//#region src/telemetry/redact.ts
|
|
120
|
-
/**
|
|
121
|
-
* Best-effort redaction of secrets from free-form error text before it is sent
|
|
122
|
-
* to the telemetry endpoint.
|
|
123
|
-
*
|
|
124
|
-
* Error `message` and `stack` fields routinely interpolate URLs (with
|
|
125
|
-
* query-string tokens / presigned signatures), `Authorization` headers, API
|
|
126
|
-
* keys, and connected-account identifiers. None of that should leave the
|
|
127
|
-
* process. Structured telemetry fields never carry raw secrets, so only the two
|
|
128
|
-
* free-form strings are passed through here.
|
|
129
|
-
*
|
|
130
|
-
* This is defence-in-depth, not a proof: it targets the shapes we have seen
|
|
131
|
-
* leak. When in doubt it over-redacts rather than under-redacts.
|
|
132
|
-
*/
|
|
133
|
-
const REDACTED = "[REDACTED]";
|
|
134
|
-
const REDACTION_RULES = [
|
|
135
|
-
[/(\bhttps?:\/\/[^\s?#'"]+)\?[^\s'"]*/gi, `$1?${REDACTED}`],
|
|
136
|
-
[/\b(bearer|basic)\s+[A-Za-z0-9._~+/=-]+/gi, `$1 ${REDACTED}`],
|
|
137
|
-
[/(?<![A-Za-z0-9])(authorization|api[-_]?key|apikey|x-api-key|access[-_]?token|refresh[-_]?token|client[-_]?secret|secret|password|passwd|pwd)\b(["']?\s*[:=]+\s*)(["']?)([^\s"',}&]+)\3/gi, `$1$2$3${REDACTED}$3`]
|
|
138
|
-
];
|
|
139
|
-
/**
|
|
140
|
-
* Redact common secret shapes from a free-form string. Returns the input
|
|
141
|
-
* unchanged when it is empty or `undefined`.
|
|
142
|
-
*/
|
|
143
|
-
const redactSensitiveText = (input) => {
|
|
144
|
-
if (!input) return input;
|
|
145
|
-
let output = input;
|
|
146
|
-
for (const [pattern, replacement] of REDACTION_RULES) output = output.replace(pattern, replacement);
|
|
147
|
-
return output;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
118
|
//#endregion
|
|
151
119
|
//#region src/telemetry/Telemetry.ts
|
|
152
120
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as logger } from "./SsrfErrors-
|
|
2
|
-
import { f as ComposioRequestCancelledError, g as JsonSchemaToZodError, h as JsonSchemaRefResolutionError, m as isRequestAbortError } from "./errors-
|
|
1
|
+
import { i as logger } from "./SsrfErrors-xhdVE4yw.mjs";
|
|
2
|
+
import { f as ComposioRequestCancelledError, g as JsonSchemaToZodError, h as JsonSchemaRefResolutionError, m as isRequestAbortError } from "./errors-Ue9wMrPK.mjs";
|
|
3
3
|
import { o as isPlainObject } from "./FileToolModifier.utils.neutral-D_YkHwZP.mjs";
|
|
4
4
|
import { jsonSchemaToZod } from "@composio/json-schema-to-zod";
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $i as ToolExecuteResponse, D as Session, Dn as UpdateConnectedAccountAclParams, Er as McpServerGetResponse, Fr as ExecuteToolFnOptions, Ht as ConnectionRequest, Ji as Tool, M as SessionWithoutMcp, Mn as BaseComposioProvider, Ni as ProviderOptions, Nn as BaseNonAgenticProvider, Pi as SessionExecuteMetaModifiers, Vt as ComposioRequestOptions, Yi as ToolExecuteMetaParams, Zi as ToolExecuteParams, an as ConnectedAccountRefreshOptions, bn as CreateConnectedAccountOptions, ca as ToolRetrievalOptions, en as ConnectedAccountListParams, f as CustomToolkit, gn as CreateConnectedAccountLinkOptions, ha as ToolkitVersionParam, ji as ExecuteToolModifiers, jr as McpUrlResponse, kn as UpdateConnectedAccountParams, na as ToolListParams, nn as ConnectedAccountListResponse, o as CustomTool, oa as ToolProxyParams, q as ToolRouterSessionDeleteResponse, qi as SchemaModifierOptions, sn as ConnectedAccountRetrieveResponse, ta as ToolList, z as ToolRouterCreateSessionConfig, zr as ToolCallSession } from "./customTool.types-
|
|
1
|
+
import { $i as ToolExecuteResponse, D as Session, Dn as UpdateConnectedAccountAclParams, Er as McpServerGetResponse, Fr as ExecuteToolFnOptions, Ht as ConnectionRequest, Ji as Tool, M as SessionWithoutMcp, Mn as BaseComposioProvider, Ni as ProviderOptions, Nn as BaseNonAgenticProvider, Pi as SessionExecuteMetaModifiers, Vt as ComposioRequestOptions, Yi as ToolExecuteMetaParams, Zi as ToolExecuteParams, an as ConnectedAccountRefreshOptions, bn as CreateConnectedAccountOptions, ca as ToolRetrievalOptions, en as ConnectedAccountListParams, f as CustomToolkit, gn as CreateConnectedAccountLinkOptions, ha as ToolkitVersionParam, ji as ExecuteToolModifiers, jr as McpUrlResponse, kn as UpdateConnectedAccountParams, na as ToolListParams, nn as ConnectedAccountListResponse, o as CustomTool, oa as ToolProxyParams, q as ToolRouterSessionDeleteResponse, qi as SchemaModifierOptions, sn as ConnectedAccountRetrieveResponse, ta as ToolList, z as ToolRouterCreateSessionConfig, zr as ToolCallSession } from "./customTool.types-B6ej_8XZ.mjs";
|
|
2
2
|
import ComposioClient, { Composio } from "@composio/client";
|
|
3
3
|
import z, { z as z$1 } from "zod/v3";
|
|
4
4
|
import { OpenAI } from "openai";
|
|
@@ -2035,13 +2035,13 @@ declare const AuthConfigRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
2035
2035
|
noOfConnections: number;
|
|
2036
2036
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2037
2037
|
createdAt?: string | undefined;
|
|
2038
|
+
isComposioManaged?: boolean | undefined;
|
|
2038
2039
|
credentials?: Record<string, unknown> | undefined;
|
|
2039
2040
|
toolAccessConfig?: {
|
|
2040
2041
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2041
2042
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2042
2043
|
} | undefined;
|
|
2043
2044
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2044
|
-
isComposioManaged?: boolean | undefined;
|
|
2045
2045
|
expectedInputFields?: unknown[] | undefined;
|
|
2046
2046
|
restrictToFollowingTools?: string[] | undefined;
|
|
2047
2047
|
createdBy?: string | undefined;
|
|
@@ -2057,13 +2057,13 @@ declare const AuthConfigRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
2057
2057
|
noOfConnections: number;
|
|
2058
2058
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2059
2059
|
createdAt?: string | undefined;
|
|
2060
|
+
isComposioManaged?: boolean | undefined;
|
|
2060
2061
|
credentials?: Record<string, unknown> | undefined;
|
|
2061
2062
|
toolAccessConfig?: {
|
|
2062
2063
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2063
2064
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2064
2065
|
} | undefined;
|
|
2065
2066
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2066
|
-
isComposioManaged?: boolean | undefined;
|
|
2067
2067
|
expectedInputFields?: unknown[] | undefined;
|
|
2068
2068
|
restrictToFollowingTools?: string[] | undefined;
|
|
2069
2069
|
createdBy?: string | undefined;
|
|
@@ -2142,13 +2142,13 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2142
2142
|
noOfConnections: number;
|
|
2143
2143
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2144
2144
|
createdAt?: string | undefined;
|
|
2145
|
+
isComposioManaged?: boolean | undefined;
|
|
2145
2146
|
credentials?: Record<string, unknown> | undefined;
|
|
2146
2147
|
toolAccessConfig?: {
|
|
2147
2148
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2148
2149
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2149
2150
|
} | undefined;
|
|
2150
2151
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2151
|
-
isComposioManaged?: boolean | undefined;
|
|
2152
2152
|
expectedInputFields?: unknown[] | undefined;
|
|
2153
2153
|
restrictToFollowingTools?: string[] | undefined;
|
|
2154
2154
|
createdBy?: string | undefined;
|
|
@@ -2164,13 +2164,13 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2164
2164
|
noOfConnections: number;
|
|
2165
2165
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2166
2166
|
createdAt?: string | undefined;
|
|
2167
|
+
isComposioManaged?: boolean | undefined;
|
|
2167
2168
|
credentials?: Record<string, unknown> | undefined;
|
|
2168
2169
|
toolAccessConfig?: {
|
|
2169
2170
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2170
2171
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2171
2172
|
} | undefined;
|
|
2172
2173
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2173
|
-
isComposioManaged?: boolean | undefined;
|
|
2174
2174
|
expectedInputFields?: unknown[] | undefined;
|
|
2175
2175
|
restrictToFollowingTools?: string[] | undefined;
|
|
2176
2176
|
createdBy?: string | undefined;
|
|
@@ -2190,13 +2190,13 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2190
2190
|
noOfConnections: number;
|
|
2191
2191
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2192
2192
|
createdAt?: string | undefined;
|
|
2193
|
+
isComposioManaged?: boolean | undefined;
|
|
2193
2194
|
credentials?: Record<string, unknown> | undefined;
|
|
2194
2195
|
toolAccessConfig?: {
|
|
2195
2196
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2196
2197
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2197
2198
|
} | undefined;
|
|
2198
2199
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2199
|
-
isComposioManaged?: boolean | undefined;
|
|
2200
2200
|
expectedInputFields?: unknown[] | undefined;
|
|
2201
2201
|
restrictToFollowingTools?: string[] | undefined;
|
|
2202
2202
|
createdBy?: string | undefined;
|
|
@@ -2216,13 +2216,13 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2216
2216
|
noOfConnections: number;
|
|
2217
2217
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2218
2218
|
createdAt?: string | undefined;
|
|
2219
|
+
isComposioManaged?: boolean | undefined;
|
|
2219
2220
|
credentials?: Record<string, unknown> | undefined;
|
|
2220
2221
|
toolAccessConfig?: {
|
|
2221
2222
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2222
2223
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2223
2224
|
} | undefined;
|
|
2224
2225
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2225
|
-
isComposioManaged?: boolean | undefined;
|
|
2226
2226
|
expectedInputFields?: unknown[] | undefined;
|
|
2227
2227
|
restrictToFollowingTools?: string[] | undefined;
|
|
2228
2228
|
createdBy?: string | undefined;
|
|
@@ -30267,6 +30267,8 @@ declare class RemoteFile {
|
|
|
30267
30267
|
static parse(data: unknown): RemoteFile;
|
|
30268
30268
|
/** Filename extracted from the mount path (e.g. "report.pdf" from "output/report.pdf") */
|
|
30269
30269
|
get filename(): string;
|
|
30270
|
+
private downloadError;
|
|
30271
|
+
private downloadBytes;
|
|
30270
30272
|
/**
|
|
30271
30273
|
* Fetches the file content as a buffer.
|
|
30272
30274
|
* @returns The file content as a Uint8Array
|
|
@@ -30788,9 +30790,12 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
30788
30790
|
} | {
|
|
30789
30791
|
enable: string[];
|
|
30790
30792
|
} | undefined;
|
|
30791
|
-
|
|
30793
|
+
preload?: {
|
|
30794
|
+
tools?: string[] | "all" | undefined;
|
|
30795
|
+
} | undefined;
|
|
30792
30796
|
sessionPreset?: "direct_tools" | undefined;
|
|
30793
30797
|
mcp?: boolean | undefined;
|
|
30798
|
+
authConfigs?: Record<string, string> | undefined;
|
|
30794
30799
|
connectedAccounts?: Record<string, string | string[]> | undefined;
|
|
30795
30800
|
manageConnections?: boolean | {
|
|
30796
30801
|
enable?: boolean | undefined;
|
|
@@ -30814,9 +30819,6 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
30814
30819
|
maxAccountsPerToolkit?: number | undefined;
|
|
30815
30820
|
requireExplicitSelection?: boolean | undefined;
|
|
30816
30821
|
} | undefined;
|
|
30817
|
-
preload?: {
|
|
30818
|
-
tools?: string[] | "all" | undefined;
|
|
30819
|
-
} | undefined;
|
|
30820
30822
|
experimental?: {
|
|
30821
30823
|
assistivePrompt?: {
|
|
30822
30824
|
userTimezone?: string | undefined;
|
|
@@ -30844,9 +30846,12 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
30844
30846
|
} | {
|
|
30845
30847
|
enable: string[];
|
|
30846
30848
|
} | undefined;
|
|
30847
|
-
|
|
30849
|
+
preload?: {
|
|
30850
|
+
tools?: string[] | "all" | undefined;
|
|
30851
|
+
} | undefined;
|
|
30848
30852
|
sessionPreset?: "direct_tools" | undefined;
|
|
30849
30853
|
mcp?: boolean | undefined;
|
|
30854
|
+
authConfigs?: Record<string, string> | undefined;
|
|
30850
30855
|
connectedAccounts?: Record<string, string | string[]> | undefined;
|
|
30851
30856
|
manageConnections?: boolean | {
|
|
30852
30857
|
enable?: boolean | undefined;
|
|
@@ -30870,9 +30875,6 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
30870
30875
|
maxAccountsPerToolkit?: number | undefined;
|
|
30871
30876
|
requireExplicitSelection?: boolean | undefined;
|
|
30872
30877
|
} | undefined;
|
|
30873
|
-
preload?: {
|
|
30874
|
-
tools?: string[] | "all" | undefined;
|
|
30875
|
-
} | undefined;
|
|
30876
30878
|
experimental?: {
|
|
30877
30879
|
assistivePrompt?: {
|
|
30878
30880
|
userTimezone?: string | undefined;
|
|
@@ -30900,9 +30902,12 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
30900
30902
|
} | {
|
|
30901
30903
|
enable: string[];
|
|
30902
30904
|
} | undefined;
|
|
30903
|
-
|
|
30905
|
+
preload?: {
|
|
30906
|
+
tools?: string[] | "all" | undefined;
|
|
30907
|
+
} | undefined;
|
|
30904
30908
|
sessionPreset?: "direct_tools" | undefined;
|
|
30905
30909
|
mcp?: boolean | undefined;
|
|
30910
|
+
authConfigs?: Record<string, string> | undefined;
|
|
30906
30911
|
connectedAccounts?: Record<string, string | string[]> | undefined;
|
|
30907
30912
|
manageConnections?: boolean | {
|
|
30908
30913
|
enable?: boolean | undefined;
|
|
@@ -30926,9 +30931,6 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
30926
30931
|
maxAccountsPerToolkit?: number | undefined;
|
|
30927
30932
|
requireExplicitSelection?: boolean | undefined;
|
|
30928
30933
|
} | undefined;
|
|
30929
|
-
preload?: {
|
|
30930
|
-
tools?: string[] | "all" | undefined;
|
|
30931
|
-
} | undefined;
|
|
30932
30934
|
experimental?: {
|
|
30933
30935
|
assistivePrompt?: {
|
|
30934
30936
|
userTimezone?: string | undefined;
|
|
@@ -30956,9 +30958,12 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
30956
30958
|
} | {
|
|
30957
30959
|
enable: string[];
|
|
30958
30960
|
} | undefined;
|
|
30959
|
-
|
|
30961
|
+
preload?: {
|
|
30962
|
+
tools?: string[] | "all" | undefined;
|
|
30963
|
+
} | undefined;
|
|
30960
30964
|
sessionPreset?: "direct_tools" | undefined;
|
|
30961
30965
|
mcp?: boolean | undefined;
|
|
30966
|
+
authConfigs?: Record<string, string> | undefined;
|
|
30962
30967
|
connectedAccounts?: Record<string, string | string[]> | undefined;
|
|
30963
30968
|
manageConnections?: boolean | {
|
|
30964
30969
|
enable?: boolean | undefined;
|
|
@@ -30982,9 +30987,6 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
30982
30987
|
maxAccountsPerToolkit?: number | undefined;
|
|
30983
30988
|
requireExplicitSelection?: boolean | undefined;
|
|
30984
30989
|
} | undefined;
|
|
30985
|
-
preload?: {
|
|
30986
|
-
tools?: string[] | "all" | undefined;
|
|
30987
|
-
} | undefined;
|
|
30988
30990
|
experimental?: {
|
|
30989
30991
|
assistivePrompt?: {
|
|
30990
30992
|
userTimezone?: string | undefined;
|
|
@@ -31012,9 +31014,12 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
31012
31014
|
} | {
|
|
31013
31015
|
enable: string[];
|
|
31014
31016
|
} | undefined;
|
|
31015
|
-
|
|
31017
|
+
preload?: {
|
|
31018
|
+
tools?: string[] | "all" | undefined;
|
|
31019
|
+
} | undefined;
|
|
31016
31020
|
sessionPreset?: "direct_tools" | undefined;
|
|
31017
31021
|
mcp?: boolean | undefined;
|
|
31022
|
+
authConfigs?: Record<string, string> | undefined;
|
|
31018
31023
|
connectedAccounts?: Record<string, string | string[]> | undefined;
|
|
31019
31024
|
manageConnections?: boolean | {
|
|
31020
31025
|
enable?: boolean | undefined;
|
|
@@ -31038,9 +31043,6 @@ declare const ToolRouterCreateSessionConfigSchema: z.ZodEffects<z.ZodEffects<z.Z
|
|
|
31038
31043
|
maxAccountsPerToolkit?: number | undefined;
|
|
31039
31044
|
requireExplicitSelection?: boolean | undefined;
|
|
31040
31045
|
} | undefined;
|
|
31041
|
-
preload?: {
|
|
31042
|
-
tools?: string[] | "all" | undefined;
|
|
31043
|
-
} | undefined;
|
|
31044
31046
|
experimental?: {
|
|
31045
31047
|
assistivePrompt?: {
|
|
31046
31048
|
userTimezone?: string | undefined;
|
|
@@ -31898,6 +31900,9 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
31898
31900
|
} | {
|
|
31899
31901
|
enable: string[];
|
|
31900
31902
|
} | undefined;
|
|
31903
|
+
preload?: {
|
|
31904
|
+
tools?: string[] | "all" | undefined;
|
|
31905
|
+
} | undefined;
|
|
31901
31906
|
authConfigs?: Record<string, string> | undefined;
|
|
31902
31907
|
connectedAccounts?: Record<string, string[]> | undefined;
|
|
31903
31908
|
manageConnections?: boolean | {
|
|
@@ -31922,9 +31927,6 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
31922
31927
|
maxAccountsPerToolkit?: number | undefined;
|
|
31923
31928
|
requireExplicitSelection?: boolean | undefined;
|
|
31924
31929
|
} | null | undefined;
|
|
31925
|
-
preload?: {
|
|
31926
|
-
tools?: string[] | "all" | undefined;
|
|
31927
|
-
} | undefined;
|
|
31928
31930
|
}, {
|
|
31929
31931
|
tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
|
|
31930
31932
|
disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
|
|
@@ -31945,6 +31947,9 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
31945
31947
|
} | {
|
|
31946
31948
|
enable: string[];
|
|
31947
31949
|
} | undefined;
|
|
31950
|
+
preload?: {
|
|
31951
|
+
tools?: string[] | "all" | undefined;
|
|
31952
|
+
} | undefined;
|
|
31948
31953
|
authConfigs?: Record<string, string> | undefined;
|
|
31949
31954
|
connectedAccounts?: Record<string, string | string[]> | undefined;
|
|
31950
31955
|
manageConnections?: boolean | {
|
|
@@ -31969,9 +31974,6 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
31969
31974
|
maxAccountsPerToolkit?: number | undefined;
|
|
31970
31975
|
requireExplicitSelection?: boolean | undefined;
|
|
31971
31976
|
} | null | undefined;
|
|
31972
|
-
preload?: {
|
|
31973
|
-
tools?: string[] | "all" | undefined;
|
|
31974
|
-
} | undefined;
|
|
31975
31977
|
}>, {
|
|
31976
31978
|
tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
|
|
31977
31979
|
disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
|
|
@@ -31992,6 +31994,9 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
31992
31994
|
} | {
|
|
31993
31995
|
enable: string[];
|
|
31994
31996
|
} | undefined;
|
|
31997
|
+
preload?: {
|
|
31998
|
+
tools?: string[] | "all" | undefined;
|
|
31999
|
+
} | undefined;
|
|
31995
32000
|
authConfigs?: Record<string, string> | undefined;
|
|
31996
32001
|
connectedAccounts?: Record<string, string[]> | undefined;
|
|
31997
32002
|
manageConnections?: boolean | {
|
|
@@ -32016,9 +32021,6 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
32016
32021
|
maxAccountsPerToolkit?: number | undefined;
|
|
32017
32022
|
requireExplicitSelection?: boolean | undefined;
|
|
32018
32023
|
} | null | undefined;
|
|
32019
|
-
preload?: {
|
|
32020
|
-
tools?: string[] | "all" | undefined;
|
|
32021
|
-
} | undefined;
|
|
32022
32024
|
}, {
|
|
32023
32025
|
tags?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | {
|
|
32024
32026
|
disable?: ("readOnlyHint" | "destructiveHint" | "idempotentHint" | "openWorldHint")[] | undefined;
|
|
@@ -32039,6 +32041,9 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
32039
32041
|
} | {
|
|
32040
32042
|
enable: string[];
|
|
32041
32043
|
} | undefined;
|
|
32044
|
+
preload?: {
|
|
32045
|
+
tools?: string[] | "all" | undefined;
|
|
32046
|
+
} | undefined;
|
|
32042
32047
|
authConfigs?: Record<string, string> | undefined;
|
|
32043
32048
|
connectedAccounts?: Record<string, string | string[]> | undefined;
|
|
32044
32049
|
manageConnections?: boolean | {
|
|
@@ -32063,9 +32068,6 @@ declare const ToolRouterUpdateSessionConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
32063
32068
|
maxAccountsPerToolkit?: number | undefined;
|
|
32064
32069
|
requireExplicitSelection?: boolean | undefined;
|
|
32065
32070
|
} | null | undefined;
|
|
32066
|
-
preload?: {
|
|
32067
|
-
tools?: string[] | "all" | undefined;
|
|
32068
|
-
} | undefined;
|
|
32069
32071
|
}>;
|
|
32070
32072
|
type ToolRouterUpdateSessionConfig = z.infer<typeof ToolRouterUpdateSessionConfigSchema>;
|
|
32071
32073
|
type ToolRouterSessionUpdateFn = (config: ToolRouterUpdateSessionConfig) => Promise<void>;
|
|
@@ -32193,13 +32195,13 @@ declare const CreateCustomToolBaseSchema: z$1.ZodObject<{
|
|
|
32193
32195
|
}, "strip", z$1.ZodTypeAny, {
|
|
32194
32196
|
name: string;
|
|
32195
32197
|
description: string;
|
|
32196
|
-
preload?: boolean | undefined;
|
|
32197
32198
|
extendsToolkit?: string | undefined;
|
|
32199
|
+
preload?: boolean | undefined;
|
|
32198
32200
|
}, {
|
|
32199
32201
|
name: string;
|
|
32200
32202
|
description: string;
|
|
32201
|
-
preload?: boolean | undefined;
|
|
32202
32203
|
extendsToolkit?: string | undefined;
|
|
32204
|
+
preload?: boolean | undefined;
|
|
32203
32205
|
}>;
|
|
32204
32206
|
/** Options for creating a custom tool via `createCustomTool()`. */
|
|
32205
32207
|
type CreateCustomToolParams<T extends AnyZodSchema> = z$1.infer<typeof CreateCustomToolBaseSchema> & {
|
|
@@ -114,9 +114,10 @@ async delete(requestOptions?: ComposioRequestOptions): Promise<ToolRouterSession
|
|
|
114
114
|
|
|
115
115
|
Execute a tool within the session.
|
|
116
116
|
|
|
117
|
-
For custom tools, accepts the
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
For custom tools, accepts the full slug (e.g. "LOCAL_GREP") or the
|
|
118
|
+
original slug (e.g. "GREP") when that original slug is unique across
|
|
119
|
+
the session's custom tools and toolkits. Custom tools are executed
|
|
120
|
+
in-process; remote tools are sent to the Composio backend.
|
|
120
121
|
|
|
121
122
|
```typescript
|
|
122
123
|
async execute(toolSlug: string, arguments_?: Record<string, unknown>, options?: ToolRouterSessionExecuteOptions, requestOptions?: ComposioRequestOptions): Promise<ToolRouterSessionExecuteResponse>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as ComposioError$1 } from "./SsrfErrors-
|
|
2
|
-
import "./FileModifierErrors-
|
|
1
|
+
import { r as ComposioError$1 } from "./SsrfErrors-xhdVE4yw.mjs";
|
|
2
|
+
import "./FileModifierErrors-CwB-Inm9.mjs";
|
|
3
3
|
import { APIError, APIUserAbortError } from "@composio/client";
|
|
4
4
|
import { ZodError } from "zod/v3";
|
|
5
5
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { S as SessionContext, a as CreateCustomToolkitParams, c as CustomToolExecuteFn, f as CustomToolkit, o as CustomTool, r as CreateCustomToolParams } from "../customTool.types-
|
|
2
|
-
import { n as createCustomToolkit, t as createCustomTool } from "../CustomTool-
|
|
1
|
+
import { S as SessionContext, a as CreateCustomToolkitParams, c as CustomToolExecuteFn, f as CustomToolkit, o as CustomTool, r as CreateCustomToolParams } from "../customTool.types-B6ej_8XZ.mjs";
|
|
2
|
+
import { n as createCustomToolkit, t as createCustomTool } from "../CustomTool-VRfWzMix.mjs";
|
|
3
3
|
export { type CreateCustomToolParams, type CreateCustomToolkitParams, type CustomTool, type CustomToolExecuteFn, type CustomToolkit, type SessionContext, createCustomTool as experimental_createTool, createCustomToolkit as experimental_createToolkit };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as createCustomToolkit, i as createCustomTool } from "../CustomTool-
|
|
1
|
+
import { a as createCustomToolkit, i as createCustomTool } from "../CustomTool-Bz0f52QR.mjs";
|
|
2
2
|
|
|
3
3
|
export { createCustomTool as experimental_createTool, createCustomToolkit as experimental_createToolkit };
|