nodal-agents 0.5.0 → 0.5.2
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/README.md +9 -1
- package/cli.js +8 -7
- package/migrations/0037_agent_jobs_total_cost_usd.sql +11 -11
- package/migrations/0038_agent_jobs_served_provider.sql +7 -7
- package/migrations/0039_agent_skills_learning_loop.sql +20 -20
- package/migrations/0040_entities_last_curator_run.sql +7 -7
- package/migrations/0041_reflection_enabled.sql +1 -1
- package/migrations/0042_drop_agent_runs.sql +1 -1
- package/migrations/0043_skill_assignment.sql +2 -2
- package/migrations/0044_entities_lan_command_yolo.sql +1 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/runner.js +1257 -1087
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +11 -11
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +3 -3
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js +2 -2
- package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/page.js +2 -2
- package/web/.next/server/app/(dashboard)/agents/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/approvals/page.js +2 -2
- package/web/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/automations/page.js +2 -2
- package/web/.next/server/app/(dashboard)/automations/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/billing/page.js +2 -2
- package/web/.next/server/app/(dashboard)/billing/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/billing/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page.js +2 -2
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page.js +2 -2
- package/web/.next/server/app/(dashboard)/connectors/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/credentials/page.js +2 -2
- package/web/.next/server/app/(dashboard)/credentials/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/credentials/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/jobs/[id]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/jobs/[id]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/jobs/page.js +2 -2
- package/web/.next/server/app/(dashboard)/jobs/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/learned-skills/page.js +2 -2
- package/web/.next/server/app/(dashboard)/learned-skills/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/learned-skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/llm-providers/page.js +2 -2
- package/web/.next/server/app/(dashboard)/llm-providers/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/logs/page.js +2 -2
- package/web/.next/server/app/(dashboard)/logs/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/logs/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/mcp/page.js +2 -2
- package/web/.next/server/app/(dashboard)/mcp/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/mcp/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/memories/page.js +2 -2
- package/web/.next/server/app/(dashboard)/memories/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/memories/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page.js +3 -3
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/settings/page.js +2 -2
- package/web/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +2 -2
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/new/page.js +2 -2
- package/web/.next/server/app/(dashboard)/skills/new/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/new/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/page.js +2 -2
- package/web/.next/server/app/(dashboard)/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page.js +1 -1
- package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +1 -1
- package/web/.next/server/app/_global-error.rsc +2 -2
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +2 -2
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page.js +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/server/app/_not-found.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/login/page.js +1 -1
- package/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/onboarding/page.js +1 -1
- package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/onboarding.html +1 -1
- package/web/.next/server/app/onboarding.rsc +3 -3
- package/web/.next/server/app/onboarding.segments/_full.segment.rsc +3 -3
- package/web/.next/server/app/onboarding.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/onboarding.segments/_index.segment.rsc +3 -3
- package/web/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/onboarding.segments/onboarding.segment.rsc +1 -1
- package/web/.next/server/app-paths-manifest.json +11 -11
- package/web/.next/server/chunks/2556.js +1 -0
- package/web/.next/server/chunks/4574.js +1 -1
- package/web/.next/server/chunks/5869.js +1 -0
- package/web/.next/server/chunks/6606.js +1 -0
- package/web/.next/server/chunks/{1567.js → 9267.js} +1 -1
- package/web/.next/server/chunks/9656.js +1 -0
- package/web/.next/server/chunks/{7741.js → 9942.js} +3 -3
- package/web/.next/server/middleware-build-manifest.js +1 -1
- package/web/.next/server/pages/404.html +1 -1
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/static/chunks/9711-628acc64d23620d2.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-9d2c7d640411e42d.js +2 -0
- package/web/.next/static/chunks/app/(dashboard)/approvals/page-8556dfa45a425603.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/layout-a34502d1a8386a62.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/settings/{page-5862a4767233ec26.js → page-cc13aebbb8d33d19.js} +1 -1
- package/web/.next/static/chunks/app/error-f106e9e65e16edb3.js +1 -0
- package/web/.next/static/css/de0fc0bc138be3b3.css +3 -0
- package/web/.next/server/chunks/4108.js +0 -1
- package/web/.next/server/chunks/511.js +0 -1
- package/web/.next/server/chunks/8978.js +0 -1
- package/web/.next/server/chunks/9798.js +0 -1
- package/web/.next/static/chunks/6347-6d9d5ab25cbd59b9.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-651673d70c193f79.js +0 -2
- package/web/.next/static/chunks/app/(dashboard)/approvals/page-6d8c74fd86d2d3c3.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/layout-509579b7d75ffd9d.js +0 -1
- package/web/.next/static/chunks/app/error-61e58aa304e1b34e.js +0 -1
- package/web/.next/static/css/46db738e95b440c0.css +0 -3
- /package/web/.next/static/{PbmIekL33DORo2X47l_Ar → FgBmSI8AhGeFcxmEUF1VS}/_buildManifest.js +0 -0
- /package/web/.next/static/{PbmIekL33DORo2X47l_Ar → FgBmSI8AhGeFcxmEUF1VS}/_ssgManifest.js +0 -0
package/runner.js
CHANGED
|
@@ -1420,7 +1420,12 @@ var init_entities = __esm({
|
|
|
1420
1420
|
reflectionEnabled: boolean2("reflection_enabled").notNull().default(false),
|
|
1421
1421
|
// Controls whether agent-authored skills are auto-assigned to the authoring
|
|
1422
1422
|
// agent ('auto') or queued for the entity owner to approve ('approval').
|
|
1423
|
-
skillAssignmentMode: text2("skill_assignment_mode").notNull().default("approval").$type()
|
|
1423
|
+
skillAssignmentMode: text2("skill_assignment_mode").notNull().default("approval").$type(),
|
|
1424
|
+
// Allows the workspace OWNER to opt into Yolo (auto-approve run_command)
|
|
1425
|
+
// even in non-local-trust (LAN/local-auth) mode. Off by default: in
|
|
1426
|
+
// local-auth mode, commands always require approval unless the owner
|
|
1427
|
+
// explicitly opts in here.
|
|
1428
|
+
lanCommandYolo: boolean2("lan_command_yolo").notNull().default(false)
|
|
1424
1429
|
},
|
|
1425
1430
|
(table) => [
|
|
1426
1431
|
uniqueIndex("entities_mcp_token_idx").on(table.mcpToken),
|
|
@@ -10022,7 +10027,7 @@ var require_cross_spawn = __commonJS({
|
|
|
10022
10027
|
var cp2 = __require("child_process");
|
|
10023
10028
|
var parse = require_parse();
|
|
10024
10029
|
var enoent = require_enoent();
|
|
10025
|
-
function
|
|
10030
|
+
function spawn3(command, args, options) {
|
|
10026
10031
|
const parsed = parse(command, args, options);
|
|
10027
10032
|
const spawned = cp2.spawn(parsed.command, parsed.args, parsed.options);
|
|
10028
10033
|
enoent.hookChildProcess(spawned, parsed);
|
|
@@ -10034,8 +10039,8 @@ var require_cross_spawn = __commonJS({
|
|
|
10034
10039
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
10035
10040
|
return result;
|
|
10036
10041
|
}
|
|
10037
|
-
module.exports =
|
|
10038
|
-
module.exports.spawn =
|
|
10042
|
+
module.exports = spawn3;
|
|
10043
|
+
module.exports.spawn = spawn3;
|
|
10039
10044
|
module.exports.sync = spawnSync;
|
|
10040
10045
|
module.exports._parse = parse;
|
|
10041
10046
|
module.exports._enoent = enoent;
|
|
@@ -19336,7 +19341,8 @@ async function executeTool(tool, rawInput, ctx, opts) {
|
|
|
19336
19341
|
}
|
|
19337
19342
|
const validatedInput = parsed.data;
|
|
19338
19343
|
const matchedRule = _matchApprovalRule(opts.approvalRules, tool.name, ctx.agentId, ctx.entityId);
|
|
19339
|
-
|
|
19344
|
+
const effectiveAction = matchedRule?.action ?? tool.defaultApproval;
|
|
19345
|
+
if (effectiveAction === "block") {
|
|
19340
19346
|
const result = { outcome: "error", error: "blocked" };
|
|
19341
19347
|
await _writeToolCall(
|
|
19342
19348
|
ctx,
|
|
@@ -19347,7 +19353,7 @@ async function executeTool(tool, rawInput, ctx, opts) {
|
|
|
19347
19353
|
);
|
|
19348
19354
|
return result;
|
|
19349
19355
|
}
|
|
19350
|
-
if (
|
|
19356
|
+
if (effectiveAction === "require_approval") {
|
|
19351
19357
|
const [row] = await ctx.db.insert(approvalRequests).values({
|
|
19352
19358
|
entityId: ctx.entityId,
|
|
19353
19359
|
jobId: ctx.jobId,
|
|
@@ -21859,6 +21865,108 @@ var SKILL_TOOLS = [
|
|
|
21859
21865
|
skillFileListTool
|
|
21860
21866
|
];
|
|
21861
21867
|
|
|
21868
|
+
// ../../packages/tools/src/builtin/run-command.ts
|
|
21869
|
+
import { spawn } from "node:child_process";
|
|
21870
|
+
import { z as z42 } from "zod";
|
|
21871
|
+
var DEFAULT_TIMEOUT_SECONDS = 300;
|
|
21872
|
+
var MAX_TIMEOUT_SECONDS = 1800;
|
|
21873
|
+
var MAX_OUTPUT_CHARS = 1e5;
|
|
21874
|
+
var runCommandSchema = z42.object({
|
|
21875
|
+
command: z42.string().min(1).max(8e3).describe(
|
|
21876
|
+
'The shell command to run. May be a compound command joined with && or newlines (e.g. "npm install && node build.js") \u2014 it runs as ONE call. Executed via cmd.exe on Windows and /bin/sh on Unix.'
|
|
21877
|
+
),
|
|
21878
|
+
cwd: z42.string().max(1e3).optional().describe(
|
|
21879
|
+
'Optional working directory, relative to the agent workspace (e.g. "scripts/canvas"). Defaults to the workspace root. Must stay inside the workspace.'
|
|
21880
|
+
),
|
|
21881
|
+
timeout_seconds: z42.number().int().positive().max(MAX_TIMEOUT_SECONDS).optional().describe(
|
|
21882
|
+
`Optional timeout in seconds (default ${DEFAULT_TIMEOUT_SECONDS}, max ${MAX_TIMEOUT_SECONDS}). On timeout the command and its child processes are killed.`
|
|
21883
|
+
)
|
|
21884
|
+
});
|
|
21885
|
+
var runCommandTool = {
|
|
21886
|
+
name: "run_command",
|
|
21887
|
+
description: 'Run a shell command in the agent workspace and return its stdout, stderr and exit code. Use it to install dependencies, run scripts, build steps, CLIs, etc. Compound commands (joined with && or newlines) run as a single call. By DEFAULT every command requires human approval before it runs; the user can enable an auto-run ("Yolo") mode per agent. A non-zero exit code is returned to you (not an error) \u2014 read stderr and adapt. Once a command succeeds and gives you the output you need, STOP and deliver your answer with return_result (or dashboard_publish) \u2014 do NOT call run_command again for the same goal (re-running it just re-prompts the user for approval).',
|
|
21888
|
+
inputSchema: runCommandSchema,
|
|
21889
|
+
riskLevel: "destructive",
|
|
21890
|
+
defaultApproval: "require_approval",
|
|
21891
|
+
execute: async (input, ctx) => {
|
|
21892
|
+
assertWorkspacesConfigured(ctx);
|
|
21893
|
+
const cwd = await resolveAndCheckPath(ctx, input.cwd ?? ".");
|
|
21894
|
+
const timeoutMs = (input.timeout_seconds ?? DEFAULT_TIMEOUT_SECONDS) * 1e3;
|
|
21895
|
+
return runInShell(input.command, cwd, timeoutMs);
|
|
21896
|
+
}
|
|
21897
|
+
};
|
|
21898
|
+
function runInShell(command, cwd, timeoutMs) {
|
|
21899
|
+
return new Promise((resolve2) => {
|
|
21900
|
+
const isWindows = process.platform === "win32";
|
|
21901
|
+
const child = spawn(command, {
|
|
21902
|
+
cwd,
|
|
21903
|
+
shell: true,
|
|
21904
|
+
detached: !isWindows,
|
|
21905
|
+
windowsHide: true,
|
|
21906
|
+
env: process.env
|
|
21907
|
+
});
|
|
21908
|
+
let stdout = "";
|
|
21909
|
+
let stderr = "";
|
|
21910
|
+
let truncated = false;
|
|
21911
|
+
let timedOut = false;
|
|
21912
|
+
let settled = false;
|
|
21913
|
+
const append = (existing, chunk) => {
|
|
21914
|
+
if (existing.length >= MAX_OUTPUT_CHARS) {
|
|
21915
|
+
truncated = true;
|
|
21916
|
+
return existing;
|
|
21917
|
+
}
|
|
21918
|
+
const text21 = chunk.toString("utf8");
|
|
21919
|
+
const room = MAX_OUTPUT_CHARS - existing.length;
|
|
21920
|
+
if (text21.length <= room) return existing + text21;
|
|
21921
|
+
truncated = true;
|
|
21922
|
+
return existing + text21.slice(0, room);
|
|
21923
|
+
};
|
|
21924
|
+
child.stdout?.on("data", (c) => {
|
|
21925
|
+
stdout = append(stdout, c);
|
|
21926
|
+
});
|
|
21927
|
+
child.stderr?.on("data", (c) => {
|
|
21928
|
+
stderr = append(stderr, c);
|
|
21929
|
+
});
|
|
21930
|
+
let graceTimer;
|
|
21931
|
+
const killTree = () => {
|
|
21932
|
+
if (child.pid) {
|
|
21933
|
+
if (isWindows) {
|
|
21934
|
+
try {
|
|
21935
|
+
spawn("taskkill", ["/PID", String(child.pid), "/T", "/F"], { windowsHide: true });
|
|
21936
|
+
} catch {
|
|
21937
|
+
}
|
|
21938
|
+
} else {
|
|
21939
|
+
try {
|
|
21940
|
+
process.kill(-child.pid, "SIGKILL");
|
|
21941
|
+
} catch {
|
|
21942
|
+
}
|
|
21943
|
+
}
|
|
21944
|
+
}
|
|
21945
|
+
try {
|
|
21946
|
+
child.kill("SIGKILL");
|
|
21947
|
+
} catch {
|
|
21948
|
+
}
|
|
21949
|
+
};
|
|
21950
|
+
const finish = (exitCode) => {
|
|
21951
|
+
if (settled) return;
|
|
21952
|
+
settled = true;
|
|
21953
|
+
clearTimeout(timer);
|
|
21954
|
+
if (graceTimer) clearTimeout(graceTimer);
|
|
21955
|
+
resolve2({ exitCode, stdout, stderr, timedOut, truncated, cwd });
|
|
21956
|
+
};
|
|
21957
|
+
const timer = setTimeout(() => {
|
|
21958
|
+
timedOut = true;
|
|
21959
|
+
killTree();
|
|
21960
|
+
graceTimer = setTimeout(() => finish(null), 3e3);
|
|
21961
|
+
}, timeoutMs);
|
|
21962
|
+
child.on("error", (err) => {
|
|
21963
|
+
stderr = append(stderr, Buffer.from(`${stderr ? "\n" : ""}spawn_error: ${err.message}`));
|
|
21964
|
+
finish(null);
|
|
21965
|
+
});
|
|
21966
|
+
child.on("close", (code) => finish(code));
|
|
21967
|
+
});
|
|
21968
|
+
}
|
|
21969
|
+
|
|
21862
21970
|
// ../../packages/tools/src/builtin/index.ts
|
|
21863
21971
|
function registerBuiltins(registry) {
|
|
21864
21972
|
registry.register(returnResultTool);
|
|
@@ -21882,6 +21990,7 @@ function registerBuiltins(registry) {
|
|
|
21882
21990
|
for (const tool of SKILL_TOOLS) {
|
|
21883
21991
|
registry.register(tool);
|
|
21884
21992
|
}
|
|
21993
|
+
registry.register(runCommandTool);
|
|
21885
21994
|
}
|
|
21886
21995
|
var ALWAYS_ON_TOOLS = [
|
|
21887
21996
|
"return_result",
|
|
@@ -21911,7 +22020,7 @@ var ALWAYS_ON_TOOL_DOCS = [
|
|
|
21911
22020
|
];
|
|
21912
22021
|
|
|
21913
22022
|
// ../../packages/tools/src/communication/telegram-send-message.ts
|
|
21914
|
-
import { z as
|
|
22023
|
+
import { z as z43 } from "zod";
|
|
21915
22024
|
|
|
21916
22025
|
// ../../packages/delivery/src/errors.ts
|
|
21917
22026
|
var DeliveryError = class extends Error {
|
|
@@ -22047,9 +22156,9 @@ async function getTelegramUpdates(opts) {
|
|
|
22047
22156
|
}
|
|
22048
22157
|
|
|
22049
22158
|
// ../../packages/tools/src/communication/telegram-send-message.ts
|
|
22050
|
-
var TelegramSendMessageInput =
|
|
22051
|
-
chatId:
|
|
22052
|
-
text:
|
|
22159
|
+
var TelegramSendMessageInput = z43.object({
|
|
22160
|
+
chatId: z43.string().regex(/^-?\d+$/, "must be a numeric Telegram chat ID").max(20).optional().describe("Telegram chat ID to send to. Omit to reply to the chat that triggered this job."),
|
|
22161
|
+
text: z43.string().min(1).max(4096).describe("The message text to send.")
|
|
22053
22162
|
});
|
|
22054
22163
|
function createTelegramSendMessageTool() {
|
|
22055
22164
|
return {
|
|
@@ -22254,15 +22363,15 @@ async function healthRoute(c, deps) {
|
|
|
22254
22363
|
}
|
|
22255
22364
|
|
|
22256
22365
|
// src/routes/agent.ts
|
|
22257
|
-
import { z as
|
|
22258
|
-
var AgentRequestSchema =
|
|
22259
|
-
task:
|
|
22366
|
+
import { z as z44 } from "zod";
|
|
22367
|
+
var AgentRequestSchema = z44.object({
|
|
22368
|
+
task: z44.string().min(1).max(2e5),
|
|
22260
22369
|
// generous: large pasted tasks / skill content
|
|
22261
|
-
agentSlug:
|
|
22262
|
-
channel:
|
|
22263
|
-
chatId:
|
|
22264
|
-
parentJobId:
|
|
22265
|
-
triggerImmediately:
|
|
22370
|
+
agentSlug: z44.string().optional(),
|
|
22371
|
+
channel: z44.enum(["telegram", "api", "whatsapp", "internal", "cron", "task-board", "slack", "discord"]).default("api"),
|
|
22372
|
+
chatId: z44.string().optional().nullable(),
|
|
22373
|
+
parentJobId: z44.string().guid().optional().nullable(),
|
|
22374
|
+
triggerImmediately: z44.boolean().default(true)
|
|
22266
22375
|
});
|
|
22267
22376
|
async function agentRoute(c, deps, runnerEnv) {
|
|
22268
22377
|
const body = await c.req.json().catch(() => null);
|
|
@@ -22324,7 +22433,7 @@ async function triggerWorker(jobId, runnerEnv) {
|
|
|
22324
22433
|
}
|
|
22325
22434
|
|
|
22326
22435
|
// src/routes/worker.ts
|
|
22327
|
-
import { z as
|
|
22436
|
+
import { z as z90 } from "zod";
|
|
22328
22437
|
|
|
22329
22438
|
// src/job/execute.ts
|
|
22330
22439
|
init_src();
|
|
@@ -22336,7 +22445,7 @@ function createNotionClient(apiKey) {
|
|
|
22336
22445
|
}
|
|
22337
22446
|
|
|
22338
22447
|
// ../../packages/adapters/notion/src/tools/search.ts
|
|
22339
|
-
import { z as
|
|
22448
|
+
import { z as z45 } from "zod";
|
|
22340
22449
|
|
|
22341
22450
|
// ../../packages/adapters/notion/src/errors.ts
|
|
22342
22451
|
import { APIResponseError } from "@notionhq/client";
|
|
@@ -22533,10 +22642,10 @@ function extractTitle(obj) {
|
|
|
22533
22642
|
}
|
|
22534
22643
|
|
|
22535
22644
|
// ../../packages/adapters/notion/src/tools/search.ts
|
|
22536
|
-
var SearchInput =
|
|
22537
|
-
query:
|
|
22538
|
-
limit:
|
|
22539
|
-
filter_type:
|
|
22645
|
+
var SearchInput = z45.object({
|
|
22646
|
+
query: z45.string().describe("Text to search for in page and database titles."),
|
|
22647
|
+
limit: z45.number().int().min(1).max(100).optional().default(10).describe("Max results to return (1\u2013100, default 10)."),
|
|
22648
|
+
filter_type: z45.enum(["page", "database"]).optional().describe("Optional: restrict results to pages or databases only.")
|
|
22540
22649
|
});
|
|
22541
22650
|
function createSearchTool(client) {
|
|
22542
22651
|
return {
|
|
@@ -22572,7 +22681,7 @@ function createSearchTool(client) {
|
|
|
22572
22681
|
}
|
|
22573
22682
|
|
|
22574
22683
|
// ../../packages/adapters/notion/src/tools/pages.ts
|
|
22575
|
-
import { z as
|
|
22684
|
+
import { z as z46 } from "zod";
|
|
22576
22685
|
|
|
22577
22686
|
// ../../packages/adapters/notion/src/helpers/pagination.ts
|
|
22578
22687
|
async function paginateAll(fetcher, pageSize = 100, maxItems = 500) {
|
|
@@ -22711,8 +22820,8 @@ function blocksToText(blocks, maxLength = 15e3) {
|
|
|
22711
22820
|
}
|
|
22712
22821
|
|
|
22713
22822
|
// ../../packages/adapters/notion/src/tools/pages.ts
|
|
22714
|
-
var GetPageInput =
|
|
22715
|
-
page_id:
|
|
22823
|
+
var GetPageInput = z46.object({
|
|
22824
|
+
page_id: z46.string().describe("Notion page ID (UUID or dashed UUID).")
|
|
22716
22825
|
});
|
|
22717
22826
|
function createGetPageTool(client) {
|
|
22718
22827
|
return {
|
|
@@ -22751,9 +22860,9 @@ function createGetPageTool(client) {
|
|
|
22751
22860
|
}
|
|
22752
22861
|
};
|
|
22753
22862
|
}
|
|
22754
|
-
var GetPageContentInput =
|
|
22755
|
-
page_id:
|
|
22756
|
-
max_blocks:
|
|
22863
|
+
var GetPageContentInput = z46.object({
|
|
22864
|
+
page_id: z46.string().describe("Notion page or block ID whose content to read."),
|
|
22865
|
+
max_blocks: z46.number().int().min(1).max(1e3).optional().default(300).describe("Maximum number of blocks to fetch (default 300).")
|
|
22757
22866
|
});
|
|
22758
22867
|
function createGetPageContentTool(client) {
|
|
22759
22868
|
return {
|
|
@@ -22781,15 +22890,15 @@ function createGetPageContentTool(client) {
|
|
|
22781
22890
|
}
|
|
22782
22891
|
};
|
|
22783
22892
|
}
|
|
22784
|
-
var CreatePageInput =
|
|
22785
|
-
parent_page_id:
|
|
22893
|
+
var CreatePageInput = z46.object({
|
|
22894
|
+
parent_page_id: z46.string().optional().describe(
|
|
22786
22895
|
"ID of the parent PAGE. Use when creating a sub-page inside another page. Mutually exclusive with parent_database_id."
|
|
22787
22896
|
),
|
|
22788
|
-
parent_database_id:
|
|
22897
|
+
parent_database_id: z46.string().optional().describe(
|
|
22789
22898
|
"ID of the parent DATABASE. Use when creating a new row inside a database. Mutually exclusive with parent_page_id."
|
|
22790
22899
|
),
|
|
22791
|
-
title:
|
|
22792
|
-
content:
|
|
22900
|
+
title: z46.string().describe("Title of the new page."),
|
|
22901
|
+
content: z46.string().optional().describe("Optional paragraph text to add as the first block. Auto-chunked if >2000 chars.")
|
|
22793
22902
|
});
|
|
22794
22903
|
function createCreatePageTool(client) {
|
|
22795
22904
|
return {
|
|
@@ -22853,9 +22962,9 @@ function createCreatePageTool(client) {
|
|
|
22853
22962
|
}
|
|
22854
22963
|
};
|
|
22855
22964
|
}
|
|
22856
|
-
var UpdatePageInput =
|
|
22857
|
-
page_id:
|
|
22858
|
-
properties:
|
|
22965
|
+
var UpdatePageInput = z46.object({
|
|
22966
|
+
page_id: z46.string().describe("Page ID to update."),
|
|
22967
|
+
properties: z46.record(z46.string(), z46.unknown()).describe(
|
|
22859
22968
|
'Properties to update as key-value pairs. Example: {"Status": "Done", "Priority": "High", "Score": 95}'
|
|
22860
22969
|
)
|
|
22861
22970
|
});
|
|
@@ -22896,8 +23005,8 @@ function createUpdatePageTool(client) {
|
|
|
22896
23005
|
}
|
|
22897
23006
|
};
|
|
22898
23007
|
}
|
|
22899
|
-
var ArchivePageInput =
|
|
22900
|
-
page_id:
|
|
23008
|
+
var ArchivePageInput = z46.object({
|
|
23009
|
+
page_id: z46.string().describe("Page ID to archive.")
|
|
22901
23010
|
});
|
|
22902
23011
|
function createArchivePageTool(client) {
|
|
22903
23012
|
return {
|
|
@@ -22917,9 +23026,9 @@ function createArchivePageTool(client) {
|
|
|
22917
23026
|
}
|
|
22918
23027
|
|
|
22919
23028
|
// ../../packages/adapters/notion/src/tools/blocks.ts
|
|
22920
|
-
import { z as
|
|
22921
|
-
var GetBlockInput =
|
|
22922
|
-
block_id:
|
|
23029
|
+
import { z as z47 } from "zod";
|
|
23030
|
+
var GetBlockInput = z47.object({
|
|
23031
|
+
block_id: z47.string().describe("Block ID to retrieve.")
|
|
22923
23032
|
});
|
|
22924
23033
|
function createGetBlockTool(client) {
|
|
22925
23034
|
return {
|
|
@@ -22943,8 +23052,8 @@ function createGetBlockTool(client) {
|
|
|
22943
23052
|
}
|
|
22944
23053
|
};
|
|
22945
23054
|
}
|
|
22946
|
-
var BlockItemSchema =
|
|
22947
|
-
type:
|
|
23055
|
+
var BlockItemSchema = z47.object({
|
|
23056
|
+
type: z47.enum([
|
|
22948
23057
|
"paragraph",
|
|
22949
23058
|
"heading_1",
|
|
22950
23059
|
"heading_2",
|
|
@@ -22958,13 +23067,13 @@ var BlockItemSchema = z46.object({
|
|
|
22958
23067
|
"toggle",
|
|
22959
23068
|
"divider"
|
|
22960
23069
|
]).describe("Block type."),
|
|
22961
|
-
content:
|
|
22962
|
-
language:
|
|
22963
|
-
checked:
|
|
23070
|
+
content: z47.string().optional().default("").describe("Text content for the block (not used for divider)."),
|
|
23071
|
+
language: z47.string().optional().describe('Programming language for code blocks (e.g. "python", "javascript").'),
|
|
23072
|
+
checked: z47.boolean().optional().default(false).describe("Whether a to_do block is checked.")
|
|
22964
23073
|
});
|
|
22965
|
-
var AppendBlocksInput =
|
|
22966
|
-
page_id:
|
|
22967
|
-
blocks:
|
|
23074
|
+
var AppendBlocksInput = z47.object({
|
|
23075
|
+
page_id: z47.string().describe("Page or block ID to append content to."),
|
|
23076
|
+
blocks: z47.array(BlockItemSchema).min(1).max(100).describe(
|
|
22968
23077
|
'Array of blocks to add. Example: [{"type": "heading_2", "content": "Summary"}, {"type": "paragraph", "content": "The results show..."}]'
|
|
22969
23078
|
)
|
|
22970
23079
|
});
|
|
@@ -23013,9 +23122,9 @@ function createAppendBlocksTool(client) {
|
|
|
23013
23122
|
}
|
|
23014
23123
|
};
|
|
23015
23124
|
}
|
|
23016
|
-
var UpdateBlockInput =
|
|
23017
|
-
block_id:
|
|
23018
|
-
content:
|
|
23125
|
+
var UpdateBlockInput = z47.object({
|
|
23126
|
+
block_id: z47.string().describe("Block ID to update."),
|
|
23127
|
+
content: z47.string().describe("New text content for the block.")
|
|
23019
23128
|
});
|
|
23020
23129
|
function createUpdateBlockTool(client) {
|
|
23021
23130
|
return {
|
|
@@ -23040,8 +23149,8 @@ function createUpdateBlockTool(client) {
|
|
|
23040
23149
|
}
|
|
23041
23150
|
};
|
|
23042
23151
|
}
|
|
23043
|
-
var DeleteBlockInput =
|
|
23044
|
-
block_id:
|
|
23152
|
+
var DeleteBlockInput = z47.object({
|
|
23153
|
+
block_id: z47.string().describe("Block ID to delete (archive).")
|
|
23045
23154
|
});
|
|
23046
23155
|
function createDeleteBlockTool(client) {
|
|
23047
23156
|
return {
|
|
@@ -23061,14 +23170,14 @@ function createDeleteBlockTool(client) {
|
|
|
23061
23170
|
}
|
|
23062
23171
|
|
|
23063
23172
|
// ../../packages/adapters/notion/src/tools/databases.ts
|
|
23064
|
-
import { z as
|
|
23065
|
-
var QueryDatabaseInput =
|
|
23066
|
-
database_id:
|
|
23067
|
-
filter:
|
|
23173
|
+
import { z as z48 } from "zod";
|
|
23174
|
+
var QueryDatabaseInput = z48.object({
|
|
23175
|
+
database_id: z48.string().describe("Notion database ID (UUID)."),
|
|
23176
|
+
filter: z48.record(z48.string(), z48.unknown()).optional().describe(
|
|
23068
23177
|
'Optional Notion filter object. Example: {"property": "Status", "select": {"equals": "Applied"}}'
|
|
23069
23178
|
),
|
|
23070
|
-
page_size:
|
|
23071
|
-
max_rows:
|
|
23179
|
+
page_size: z48.number().int().min(1).max(100).optional().default(50).describe("Rows per request (1\u2013100, default 50)."),
|
|
23180
|
+
max_rows: z48.number().int().min(1).max(1e3).optional().default(500).describe("Total rows to collect across pagination (default 500, max 1000).")
|
|
23072
23181
|
});
|
|
23073
23182
|
function createQueryDatabaseTool(client) {
|
|
23074
23183
|
return {
|
|
@@ -23121,8 +23230,8 @@ function createQueryDatabaseTool(client) {
|
|
|
23121
23230
|
}
|
|
23122
23231
|
};
|
|
23123
23232
|
}
|
|
23124
|
-
var GetDatabaseInput =
|
|
23125
|
-
database_id:
|
|
23233
|
+
var GetDatabaseInput = z48.object({
|
|
23234
|
+
database_id: z48.string().describe("Notion database ID (UUID).")
|
|
23126
23235
|
});
|
|
23127
23236
|
function createGetDatabaseTool(client) {
|
|
23128
23237
|
return {
|
|
@@ -23161,9 +23270,9 @@ function createGetDatabaseTool(client) {
|
|
|
23161
23270
|
}
|
|
23162
23271
|
};
|
|
23163
23272
|
}
|
|
23164
|
-
var CreateDatabaseEntryInput =
|
|
23165
|
-
database_id:
|
|
23166
|
-
properties:
|
|
23273
|
+
var CreateDatabaseEntryInput = z48.object({
|
|
23274
|
+
database_id: z48.string().describe("Notion database ID to add a row to."),
|
|
23275
|
+
properties: z48.record(z48.string(), z48.unknown()).describe(
|
|
23167
23276
|
'Row properties as key-value pairs. Example: {"Name": "Acme Corp", "Status": "Applied", "Score": 95}'
|
|
23168
23277
|
)
|
|
23169
23278
|
});
|
|
@@ -23214,12 +23323,12 @@ function createCreateDatabaseEntryTool(client) {
|
|
|
23214
23323
|
}
|
|
23215
23324
|
};
|
|
23216
23325
|
}
|
|
23217
|
-
var UpdateDatabaseEntryInput =
|
|
23218
|
-
page_id:
|
|
23219
|
-
database_id:
|
|
23326
|
+
var UpdateDatabaseEntryInput = z48.object({
|
|
23327
|
+
page_id: z48.string().describe("Page ID of the database row to update."),
|
|
23328
|
+
database_id: z48.string().optional().describe(
|
|
23220
23329
|
"Optional: database ID to fetch schema for type coercion. If omitted, types are inferred from values."
|
|
23221
23330
|
),
|
|
23222
|
-
properties:
|
|
23331
|
+
properties: z48.record(z48.string(), z48.unknown()).describe('Properties to update as key-value pairs. Example: {"Status": "Done", "Score": 100}')
|
|
23223
23332
|
});
|
|
23224
23333
|
function createUpdateDatabaseEntryTool(client) {
|
|
23225
23334
|
return {
|
|
@@ -23270,7 +23379,7 @@ function createUpdateDatabaseEntryTool(client) {
|
|
|
23270
23379
|
}
|
|
23271
23380
|
};
|
|
23272
23381
|
}
|
|
23273
|
-
var ColumnTypeSchema =
|
|
23382
|
+
var ColumnTypeSchema = z48.enum([
|
|
23274
23383
|
"title",
|
|
23275
23384
|
"rich_text",
|
|
23276
23385
|
"number",
|
|
@@ -23283,10 +23392,10 @@ var ColumnTypeSchema = z47.enum([
|
|
|
23283
23392
|
"multi_select",
|
|
23284
23393
|
"status"
|
|
23285
23394
|
]);
|
|
23286
|
-
var CreateDatabaseInput =
|
|
23287
|
-
parent_page_id:
|
|
23288
|
-
title:
|
|
23289
|
-
columns:
|
|
23395
|
+
var CreateDatabaseInput = z48.object({
|
|
23396
|
+
parent_page_id: z48.string().describe("Page ID that will contain the new database."),
|
|
23397
|
+
title: z48.string().describe("Database title."),
|
|
23398
|
+
columns: z48.record(z48.string(), ColumnTypeSchema).describe(
|
|
23290
23399
|
'Column definitions as {name: type}. One must be "title". Example: {"Name": "title", "Status": "select", "URL": "url", "Score": "number"}'
|
|
23291
23400
|
)
|
|
23292
23401
|
});
|
|
@@ -23332,10 +23441,10 @@ function createCreateDatabaseTool(client) {
|
|
|
23332
23441
|
}
|
|
23333
23442
|
};
|
|
23334
23443
|
}
|
|
23335
|
-
var UpdateDatabaseInput =
|
|
23336
|
-
database_id:
|
|
23337
|
-
title:
|
|
23338
|
-
new_columns:
|
|
23444
|
+
var UpdateDatabaseInput = z48.object({
|
|
23445
|
+
database_id: z48.string().describe("Database ID to update."),
|
|
23446
|
+
title: z48.string().optional().describe("Optional new title for the database."),
|
|
23447
|
+
new_columns: z48.record(z48.string(), ColumnTypeSchema).optional().describe(
|
|
23339
23448
|
"New columns to add as {name: type}. Same types as notion_create_database. Cannot modify existing column types (Notion API limitation)."
|
|
23340
23449
|
)
|
|
23341
23450
|
});
|
|
@@ -23377,10 +23486,10 @@ function createUpdateDatabaseTool(client) {
|
|
|
23377
23486
|
}
|
|
23378
23487
|
|
|
23379
23488
|
// ../../packages/adapters/notion/src/tools/comments.ts
|
|
23380
|
-
import { z as
|
|
23381
|
-
var ListCommentsInput =
|
|
23382
|
-
block_id:
|
|
23383
|
-
page_size:
|
|
23489
|
+
import { z as z49 } from "zod";
|
|
23490
|
+
var ListCommentsInput = z49.object({
|
|
23491
|
+
block_id: z49.string().describe("Page or block ID to list comments for."),
|
|
23492
|
+
page_size: z49.number().int().min(1).max(50).optional().default(50).describe("Max comments to return (default 50).")
|
|
23384
23493
|
});
|
|
23385
23494
|
function createListCommentsTool(client) {
|
|
23386
23495
|
return {
|
|
@@ -23413,9 +23522,9 @@ function createListCommentsTool(client) {
|
|
|
23413
23522
|
}
|
|
23414
23523
|
};
|
|
23415
23524
|
}
|
|
23416
|
-
var AddCommentInput =
|
|
23417
|
-
page_id:
|
|
23418
|
-
text:
|
|
23525
|
+
var AddCommentInput = z49.object({
|
|
23526
|
+
page_id: z49.string().describe("Page ID to comment on."),
|
|
23527
|
+
text: z49.string().describe("Comment text.")
|
|
23419
23528
|
});
|
|
23420
23529
|
function createAddCommentTool(client) {
|
|
23421
23530
|
return {
|
|
@@ -23438,9 +23547,9 @@ function createAddCommentTool(client) {
|
|
|
23438
23547
|
}
|
|
23439
23548
|
|
|
23440
23549
|
// ../../packages/adapters/notion/src/tools/users.ts
|
|
23441
|
-
import { z as
|
|
23442
|
-
var ListUsersInput =
|
|
23443
|
-
page_size:
|
|
23550
|
+
import { z as z50 } from "zod";
|
|
23551
|
+
var ListUsersInput = z50.object({
|
|
23552
|
+
page_size: z50.number().int().min(1).max(100).optional().default(100).describe("Max users to return (default 100).")
|
|
23444
23553
|
});
|
|
23445
23554
|
function createListUsersTool(client) {
|
|
23446
23555
|
return {
|
|
@@ -23468,8 +23577,8 @@ function createListUsersTool(client) {
|
|
|
23468
23577
|
}
|
|
23469
23578
|
};
|
|
23470
23579
|
}
|
|
23471
|
-
var GetUserInput =
|
|
23472
|
-
user_id:
|
|
23580
|
+
var GetUserInput = z50.object({
|
|
23581
|
+
user_id: z50.string().describe("Notion user ID.")
|
|
23473
23582
|
});
|
|
23474
23583
|
function createGetUserTool(client) {
|
|
23475
23584
|
return {
|
|
@@ -23802,8 +23911,8 @@ function createAirtableClient(accessToken) {
|
|
|
23802
23911
|
}
|
|
23803
23912
|
|
|
23804
23913
|
// ../../packages/adapters/airtable/src/tools/bases.ts
|
|
23805
|
-
import { z as
|
|
23806
|
-
var ListBasesInput =
|
|
23914
|
+
import { z as z51 } from "zod";
|
|
23915
|
+
var ListBasesInput = z51.object({});
|
|
23807
23916
|
function makeAirtableListBasesTool(client) {
|
|
23808
23917
|
return {
|
|
23809
23918
|
name: "airtable_list_bases",
|
|
@@ -23826,8 +23935,8 @@ function makeAirtableListBasesTool(client) {
|
|
|
23826
23935
|
}
|
|
23827
23936
|
};
|
|
23828
23937
|
}
|
|
23829
|
-
var ListTablesInput =
|
|
23830
|
-
baseId:
|
|
23938
|
+
var ListTablesInput = z51.object({
|
|
23939
|
+
baseId: z51.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it.")
|
|
23831
23940
|
});
|
|
23832
23941
|
function makeAirtableListTablesTool(client) {
|
|
23833
23942
|
return {
|
|
@@ -23854,22 +23963,22 @@ function makeAirtableListTablesTool(client) {
|
|
|
23854
23963
|
}
|
|
23855
23964
|
|
|
23856
23965
|
// ../../packages/adapters/airtable/src/tools/records.ts
|
|
23857
|
-
import { z as
|
|
23858
|
-
var SortItemSchema =
|
|
23859
|
-
field:
|
|
23860
|
-
direction:
|
|
23966
|
+
import { z as z52 } from "zod";
|
|
23967
|
+
var SortItemSchema = z52.object({
|
|
23968
|
+
field: z52.string().describe("Field name to sort by."),
|
|
23969
|
+
direction: z52.enum(["asc", "desc"]).optional().describe("Sort direction (default asc).")
|
|
23861
23970
|
});
|
|
23862
|
-
var ListRecordsInput =
|
|
23863
|
-
baseId:
|
|
23864
|
-
tableIdOrName:
|
|
23971
|
+
var ListRecordsInput = z52.object({
|
|
23972
|
+
baseId: z52.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
|
|
23973
|
+
tableIdOrName: z52.string().describe(
|
|
23865
23974
|
"The table ID (tblXXXXXXXX) or name within the base. Use airtable_list_tables to find it."
|
|
23866
23975
|
),
|
|
23867
|
-
view:
|
|
23868
|
-
pageSize:
|
|
23869
|
-
offset:
|
|
23870
|
-
fields:
|
|
23871
|
-
filterByFormula:
|
|
23872
|
-
sort:
|
|
23976
|
+
view: z52.string().optional().describe("Name or ID of the view to use."),
|
|
23977
|
+
pageSize: z52.number().int().min(1).max(100).optional().default(100).describe("Number of records per page (1\u2013100, default 100)."),
|
|
23978
|
+
offset: z52.string().optional().describe("Pagination offset token from a previous response."),
|
|
23979
|
+
fields: z52.array(z52.string()).optional().describe("List of field names to return. Omit to return all fields."),
|
|
23980
|
+
filterByFormula: z52.string().optional().describe(`Airtable formula to filter records. Example: "AND({Status}='Active',{Score}>80)"`),
|
|
23981
|
+
sort: z52.array(SortItemSchema).optional().describe("List of sort objects with field and optional direction.")
|
|
23873
23982
|
});
|
|
23874
23983
|
function makeAirtableListRecordsTool(client) {
|
|
23875
23984
|
return {
|
|
@@ -23915,10 +24024,10 @@ function makeAirtableListRecordsTool(client) {
|
|
|
23915
24024
|
}
|
|
23916
24025
|
};
|
|
23917
24026
|
}
|
|
23918
|
-
var GetRecordInput =
|
|
23919
|
-
baseId:
|
|
23920
|
-
tableIdOrName:
|
|
23921
|
-
recordId:
|
|
24027
|
+
var GetRecordInput = z52.object({
|
|
24028
|
+
baseId: z52.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
|
|
24029
|
+
tableIdOrName: z52.string().describe("The table ID or name within the base."),
|
|
24030
|
+
recordId: z52.string().describe("The record ID (recXXXXXXXX) to retrieve.")
|
|
23922
24031
|
});
|
|
23923
24032
|
function makeAirtableGetRecordTool(client) {
|
|
23924
24033
|
return {
|
|
@@ -23942,13 +24051,13 @@ function makeAirtableGetRecordTool(client) {
|
|
|
23942
24051
|
}
|
|
23943
24052
|
};
|
|
23944
24053
|
}
|
|
23945
|
-
var CreateRecordsInput =
|
|
23946
|
-
baseId:
|
|
23947
|
-
tableIdOrName:
|
|
23948
|
-
records:
|
|
24054
|
+
var CreateRecordsInput = z52.object({
|
|
24055
|
+
baseId: z52.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
|
|
24056
|
+
tableIdOrName: z52.string().describe("The table ID or name within the base."),
|
|
24057
|
+
records: z52.array(z52.object({ fields: z52.record(z52.string(), z52.unknown()) })).min(1).max(10).describe(
|
|
23949
24058
|
'Array of records to create, each with a fields object. Max 10 per call. Example: [{"fields": {"Name": "Alice", "Status": "Active"}}]'
|
|
23950
24059
|
),
|
|
23951
|
-
typecast:
|
|
24060
|
+
typecast: z52.boolean().optional().describe(
|
|
23952
24061
|
"If true, Airtable will attempt to convert string values to the appropriate field type. Default false."
|
|
23953
24062
|
)
|
|
23954
24063
|
});
|
|
@@ -23979,14 +24088,14 @@ function makeAirtableCreateRecordsTool(client) {
|
|
|
23979
24088
|
}
|
|
23980
24089
|
};
|
|
23981
24090
|
}
|
|
23982
|
-
var UpdateRecordInput =
|
|
23983
|
-
baseId:
|
|
23984
|
-
tableIdOrName:
|
|
23985
|
-
recordId:
|
|
23986
|
-
fields:
|
|
24091
|
+
var UpdateRecordInput = z52.object({
|
|
24092
|
+
baseId: z52.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
|
|
24093
|
+
tableIdOrName: z52.string().describe("The table ID or name within the base."),
|
|
24094
|
+
recordId: z52.string().describe("The record ID (recXXXXXXXX) to update."),
|
|
24095
|
+
fields: z52.record(z52.string(), z52.unknown()).describe(
|
|
23987
24096
|
'Fields to update as key-value pairs. Only specified fields are changed (PATCH semantics). Example: {"Status": "Done", "Score": 95}'
|
|
23988
24097
|
),
|
|
23989
|
-
typecast:
|
|
24098
|
+
typecast: z52.boolean().optional().describe("If true, attempt to convert string values to the appropriate field type.")
|
|
23990
24099
|
});
|
|
23991
24100
|
function makeAirtableUpdateRecordTool(client) {
|
|
23992
24101
|
return {
|
|
@@ -24013,14 +24122,14 @@ function makeAirtableUpdateRecordTool(client) {
|
|
|
24013
24122
|
}
|
|
24014
24123
|
};
|
|
24015
24124
|
}
|
|
24016
|
-
var ReplaceRecordInput =
|
|
24017
|
-
baseId:
|
|
24018
|
-
tableIdOrName:
|
|
24019
|
-
recordId:
|
|
24020
|
-
fields:
|
|
24125
|
+
var ReplaceRecordInput = z52.object({
|
|
24126
|
+
baseId: z52.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
|
|
24127
|
+
tableIdOrName: z52.string().describe("The table ID or name within the base."),
|
|
24128
|
+
recordId: z52.string().describe("The record ID (recXXXXXXXX) to replace."),
|
|
24129
|
+
fields: z52.record(z52.string(), z52.unknown()).describe(
|
|
24021
24130
|
"Complete field set to write. Fields NOT included will be cleared (PUT semantics). Use airtable_update_record for partial updates."
|
|
24022
24131
|
),
|
|
24023
|
-
typecast:
|
|
24132
|
+
typecast: z52.boolean().optional().describe("If true, attempt to convert string values to the appropriate field type.")
|
|
24024
24133
|
});
|
|
24025
24134
|
function makeAirtableReplaceRecordTool(client) {
|
|
24026
24135
|
return {
|
|
@@ -24047,10 +24156,10 @@ function makeAirtableReplaceRecordTool(client) {
|
|
|
24047
24156
|
}
|
|
24048
24157
|
};
|
|
24049
24158
|
}
|
|
24050
|
-
var DeleteRecordInput =
|
|
24051
|
-
baseId:
|
|
24052
|
-
tableIdOrName:
|
|
24053
|
-
recordId:
|
|
24159
|
+
var DeleteRecordInput = z52.object({
|
|
24160
|
+
baseId: z52.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
|
|
24161
|
+
tableIdOrName: z52.string().describe("The table ID or name within the base."),
|
|
24162
|
+
recordId: z52.string().describe(
|
|
24054
24163
|
"The record ID (recXXXXXXXX) to delete. This action is permanent and cannot be undone."
|
|
24055
24164
|
)
|
|
24056
24165
|
});
|
|
@@ -24169,7 +24278,7 @@ function createDriveClient(accessToken) {
|
|
|
24169
24278
|
}
|
|
24170
24279
|
|
|
24171
24280
|
// ../../packages/adapters/google-drive/src/tools/list-files.ts
|
|
24172
|
-
import { z as
|
|
24281
|
+
import { z as z53 } from "zod";
|
|
24173
24282
|
|
|
24174
24283
|
// ../../packages/adapters/google-drive/src/errors.ts
|
|
24175
24284
|
var DriveAdapterError = class extends Error {
|
|
@@ -24245,12 +24354,12 @@ async function paginateDrive(fetcher, pageSize = 100, maxItems = 100) {
|
|
|
24245
24354
|
}
|
|
24246
24355
|
|
|
24247
24356
|
// ../../packages/adapters/google-drive/src/tools/list-files.ts
|
|
24248
|
-
var ListFilesInput =
|
|
24249
|
-
query:
|
|
24357
|
+
var ListFilesInput = z53.object({
|
|
24358
|
+
query: z53.string().optional().describe(
|
|
24250
24359
|
`Google Drive search query. Examples: 'name contains "resume"' or '"folder-id" in parents' or 'mimeType="application/pdf"'. Leave empty to list recent files.`
|
|
24251
24360
|
),
|
|
24252
|
-
max_results:
|
|
24253
|
-
order_by:
|
|
24361
|
+
max_results: z53.number().int().min(1).max(1e3).optional().describe("Max files to return (1\u20131000, default 20)."),
|
|
24362
|
+
order_by: z53.string().optional().describe(
|
|
24254
24363
|
"Sort order. Examples: 'modifiedTime desc', 'name', 'createdTime'. Default: 'modifiedTime desc'."
|
|
24255
24364
|
)
|
|
24256
24365
|
});
|
|
@@ -24299,7 +24408,7 @@ function createListFilesTool(drive) {
|
|
|
24299
24408
|
}
|
|
24300
24409
|
|
|
24301
24410
|
// ../../packages/adapters/google-drive/src/tools/read-file.ts
|
|
24302
|
-
import { z as
|
|
24411
|
+
import { z as z54 } from "zod";
|
|
24303
24412
|
|
|
24304
24413
|
// ../../packages/adapters/google-drive/src/extractors/docx.ts
|
|
24305
24414
|
import mammoth2 from "mammoth";
|
|
@@ -24422,8 +24531,8 @@ async function extractFileText(buffer, mimeType, filename) {
|
|
|
24422
24531
|
|
|
24423
24532
|
// ../../packages/adapters/google-drive/src/tools/read-file.ts
|
|
24424
24533
|
var CHAR_CAP = 15e3;
|
|
24425
|
-
var ReadFileInput =
|
|
24426
|
-
file_id:
|
|
24534
|
+
var ReadFileInput = z54.object({
|
|
24535
|
+
file_id: z54.string().describe("The Google Drive file ID (from drive_list_files or drive_get_file_info).")
|
|
24427
24536
|
});
|
|
24428
24537
|
function createReadFileTool(drive) {
|
|
24429
24538
|
return {
|
|
@@ -24490,12 +24599,12 @@ function createReadFileTool(drive) {
|
|
|
24490
24599
|
}
|
|
24491
24600
|
|
|
24492
24601
|
// ../../packages/adapters/google-drive/src/tools/upload-file.ts
|
|
24493
|
-
import { z as
|
|
24494
|
-
var UploadFileInput =
|
|
24495
|
-
name:
|
|
24496
|
-
content:
|
|
24497
|
-
folder_id:
|
|
24498
|
-
mime_type:
|
|
24602
|
+
import { z as z55 } from "zod";
|
|
24603
|
+
var UploadFileInput = z55.object({
|
|
24604
|
+
name: z55.string().describe("File name including extension, e.g. 'cover_letter.txt'."),
|
|
24605
|
+
content: z55.string().describe("Text content of the file."),
|
|
24606
|
+
folder_id: z55.string().optional().describe("Optional Drive folder ID to place the file in."),
|
|
24607
|
+
mime_type: z55.string().optional().describe("MIME type of the file. Default: 'text/plain'.")
|
|
24499
24608
|
});
|
|
24500
24609
|
function createUploadFileTool(drive) {
|
|
24501
24610
|
return {
|
|
@@ -24534,9 +24643,9 @@ function createUploadFileTool(drive) {
|
|
|
24534
24643
|
}
|
|
24535
24644
|
|
|
24536
24645
|
// ../../packages/adapters/google-drive/src/tools/get-file-info.ts
|
|
24537
|
-
import { z as
|
|
24538
|
-
var GetFileInfoInput =
|
|
24539
|
-
file_id:
|
|
24646
|
+
import { z as z56 } from "zod";
|
|
24647
|
+
var GetFileInfoInput = z56.object({
|
|
24648
|
+
file_id: z56.string().describe("Google Drive file ID.")
|
|
24540
24649
|
});
|
|
24541
24650
|
function createGetFileInfoTool(drive) {
|
|
24542
24651
|
return {
|
|
@@ -24572,10 +24681,10 @@ function createGetFileInfoTool(drive) {
|
|
|
24572
24681
|
}
|
|
24573
24682
|
|
|
24574
24683
|
// ../../packages/adapters/google-drive/src/tools/create-folder.ts
|
|
24575
|
-
import { z as
|
|
24576
|
-
var CreateFolderInput =
|
|
24577
|
-
name:
|
|
24578
|
-
parent_id:
|
|
24684
|
+
import { z as z57 } from "zod";
|
|
24685
|
+
var CreateFolderInput = z57.object({
|
|
24686
|
+
name: z57.string().describe("Folder name."),
|
|
24687
|
+
parent_id: z57.string().optional().describe("Optional parent folder ID. Creates in root if omitted.")
|
|
24579
24688
|
});
|
|
24580
24689
|
function createCreateFolderTool(drive) {
|
|
24581
24690
|
return {
|
|
@@ -24607,10 +24716,10 @@ function createCreateFolderTool(drive) {
|
|
|
24607
24716
|
}
|
|
24608
24717
|
|
|
24609
24718
|
// ../../packages/adapters/google-drive/src/tools/move-file.ts
|
|
24610
|
-
import { z as
|
|
24611
|
-
var MoveFileInput =
|
|
24612
|
-
file_id:
|
|
24613
|
-
new_parent_id:
|
|
24719
|
+
import { z as z58 } from "zod";
|
|
24720
|
+
var MoveFileInput = z58.object({
|
|
24721
|
+
file_id: z58.string().describe("File ID to move."),
|
|
24722
|
+
new_parent_id: z58.string().describe("Destination folder ID.")
|
|
24614
24723
|
});
|
|
24615
24724
|
function createMoveFileTool(drive) {
|
|
24616
24725
|
return {
|
|
@@ -24644,10 +24753,10 @@ function createMoveFileTool(drive) {
|
|
|
24644
24753
|
}
|
|
24645
24754
|
|
|
24646
24755
|
// ../../packages/adapters/google-drive/src/tools/rename-file.ts
|
|
24647
|
-
import { z as
|
|
24648
|
-
var RenameFileInput =
|
|
24649
|
-
file_id:
|
|
24650
|
-
new_name:
|
|
24756
|
+
import { z as z59 } from "zod";
|
|
24757
|
+
var RenameFileInput = z59.object({
|
|
24758
|
+
file_id: z59.string().describe("File ID to rename."),
|
|
24759
|
+
new_name: z59.string().describe("New file name (including extension).")
|
|
24651
24760
|
});
|
|
24652
24761
|
function createRenameFileTool(drive) {
|
|
24653
24762
|
return {
|
|
@@ -24674,11 +24783,11 @@ function createRenameFileTool(drive) {
|
|
|
24674
24783
|
}
|
|
24675
24784
|
|
|
24676
24785
|
// ../../packages/adapters/google-drive/src/tools/copy-file.ts
|
|
24677
|
-
import { z as
|
|
24678
|
-
var CopyFileInput =
|
|
24679
|
-
file_id:
|
|
24680
|
-
new_name:
|
|
24681
|
-
folder_id:
|
|
24786
|
+
import { z as z60 } from "zod";
|
|
24787
|
+
var CopyFileInput = z60.object({
|
|
24788
|
+
file_id: z60.string().describe("File ID to copy."),
|
|
24789
|
+
new_name: z60.string().optional().describe("Optional name for the copy."),
|
|
24790
|
+
folder_id: z60.string().optional().describe("Optional destination folder ID for the copy.")
|
|
24682
24791
|
});
|
|
24683
24792
|
function createCopyFileTool(drive) {
|
|
24684
24793
|
return {
|
|
@@ -24709,9 +24818,9 @@ function createCopyFileTool(drive) {
|
|
|
24709
24818
|
}
|
|
24710
24819
|
|
|
24711
24820
|
// ../../packages/adapters/google-drive/src/tools/delete-file.ts
|
|
24712
|
-
import { z as
|
|
24713
|
-
var DeleteFileInput =
|
|
24714
|
-
file_id:
|
|
24821
|
+
import { z as z61 } from "zod";
|
|
24822
|
+
var DeleteFileInput = z61.object({
|
|
24823
|
+
file_id: z61.string().describe("File ID to move to trash.")
|
|
24715
24824
|
});
|
|
24716
24825
|
function createDeleteFileTool(drive) {
|
|
24717
24826
|
return {
|
|
@@ -24739,12 +24848,12 @@ function createDeleteFileTool(drive) {
|
|
|
24739
24848
|
}
|
|
24740
24849
|
|
|
24741
24850
|
// ../../packages/adapters/google-drive/src/tools/share-file.ts
|
|
24742
|
-
import { z as
|
|
24743
|
-
var ShareFileInput =
|
|
24744
|
-
file_id:
|
|
24745
|
-
email:
|
|
24746
|
-
role:
|
|
24747
|
-
type:
|
|
24851
|
+
import { z as z62 } from "zod";
|
|
24852
|
+
var ShareFileInput = z62.object({
|
|
24853
|
+
file_id: z62.string().describe("File ID to share."),
|
|
24854
|
+
email: z62.string().optional().describe("Email address to share with. Omit for link sharing (anyone with link)."),
|
|
24855
|
+
role: z62.enum(["reader", "writer", "commenter", "owner"]).optional().describe("Permission role: 'reader', 'writer', 'commenter', or 'owner'. Default: 'reader'."),
|
|
24856
|
+
type: z62.enum(["user", "group", "domain", "anyone"]).optional().describe(
|
|
24748
24857
|
"Permission type: 'user', 'group', 'domain', or 'anyone'. Defaults to 'user' if email provided, 'anyone' otherwise."
|
|
24749
24858
|
)
|
|
24750
24859
|
});
|
|
@@ -24784,9 +24893,9 @@ function createShareFileTool(drive) {
|
|
|
24784
24893
|
}
|
|
24785
24894
|
|
|
24786
24895
|
// ../../packages/adapters/google-drive/src/tools/list-permissions.ts
|
|
24787
|
-
import { z as
|
|
24788
|
-
var ListPermissionsInput =
|
|
24789
|
-
file_id:
|
|
24896
|
+
import { z as z63 } from "zod";
|
|
24897
|
+
var ListPermissionsInput = z63.object({
|
|
24898
|
+
file_id: z63.string().describe("File ID to list permissions for.")
|
|
24790
24899
|
});
|
|
24791
24900
|
function createListPermissionsTool(drive) {
|
|
24792
24901
|
return {
|
|
@@ -24816,11 +24925,11 @@ function createListPermissionsTool(drive) {
|
|
|
24816
24925
|
}
|
|
24817
24926
|
|
|
24818
24927
|
// ../../packages/adapters/google-drive/src/tools/export-file.ts
|
|
24819
|
-
import { z as
|
|
24928
|
+
import { z as z64 } from "zod";
|
|
24820
24929
|
var CHAR_CAP2 = 15e3;
|
|
24821
|
-
var ExportFileInput =
|
|
24822
|
-
file_id:
|
|
24823
|
-
mime_type:
|
|
24930
|
+
var ExportFileInput = z64.object({
|
|
24931
|
+
file_id: z64.string().describe("Google Drive file ID. Must be a Google Workspace file (Doc, Sheet, Slide, etc.)."),
|
|
24932
|
+
mime_type: z64.string().describe(
|
|
24824
24933
|
"Target MIME type. Examples: 'text/plain', 'text/csv', 'application/pdf', 'text/html', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'."
|
|
24825
24934
|
)
|
|
24826
24935
|
});
|
|
@@ -24991,7 +25100,7 @@ function createGmailClient(accessToken) {
|
|
|
24991
25100
|
}
|
|
24992
25101
|
|
|
24993
25102
|
// ../../packages/adapters/gmail/src/tools/messages.ts
|
|
24994
|
-
import { z as
|
|
25103
|
+
import { z as z65 } from "zod";
|
|
24995
25104
|
|
|
24996
25105
|
// ../../packages/adapters/gmail/src/errors.ts
|
|
24997
25106
|
var GmailAdapterError = class extends Error {
|
|
@@ -25248,20 +25357,20 @@ function buildRfc2822Message(opts) {
|
|
|
25248
25357
|
|
|
25249
25358
|
// ../../packages/adapters/gmail/src/tools/messages.ts
|
|
25250
25359
|
var BODY_CHAR_CAP = 1e4;
|
|
25251
|
-
var AttachmentItemSchema =
|
|
25252
|
-
filename:
|
|
25253
|
-
content:
|
|
25254
|
-
mimeType:
|
|
25255
|
-
encoding:
|
|
25256
|
-
});
|
|
25257
|
-
var SendEmailInput =
|
|
25258
|
-
to:
|
|
25259
|
-
subject:
|
|
25260
|
-
body:
|
|
25261
|
-
cc:
|
|
25262
|
-
bcc:
|
|
25263
|
-
reply_to:
|
|
25264
|
-
attachments:
|
|
25360
|
+
var AttachmentItemSchema = z65.object({
|
|
25361
|
+
filename: z65.string().describe("File name shown in the email, e.g. 'report.html'."),
|
|
25362
|
+
content: z65.string().describe("File content as a string (plain text by default, or base64 if encoding is base64)."),
|
|
25363
|
+
mimeType: z65.string().optional().describe("MIME type, e.g. 'text/html'. Inferred from filename if omitted."),
|
|
25364
|
+
encoding: z65.enum(["text", "base64"]).optional().describe("How content is encoded. Default 'text'. Use 'base64' for pre-encoded binaries.")
|
|
25365
|
+
});
|
|
25366
|
+
var SendEmailInput = z65.object({
|
|
25367
|
+
to: z65.string().describe("Recipient email address or comma-separated list."),
|
|
25368
|
+
subject: z65.string().describe("Email subject line."),
|
|
25369
|
+
body: z65.string().describe("Email body \u2014 plain text or HTML."),
|
|
25370
|
+
cc: z65.string().optional().describe("CC address(es), comma-separated."),
|
|
25371
|
+
bcc: z65.string().optional().describe("BCC address(es), comma-separated."),
|
|
25372
|
+
reply_to: z65.string().optional().describe("Reply-To header."),
|
|
25373
|
+
attachments: z65.array(AttachmentItemSchema).optional().describe(
|
|
25265
25374
|
"Optional file attachments. Each item: {filename, content, mimeType?, encoding?}. Default encoding is 'text' \u2014 pass the file content as a plain string. Use encoding='base64' only when you hold pre-encoded binary content."
|
|
25266
25375
|
)
|
|
25267
25376
|
});
|
|
@@ -25296,12 +25405,12 @@ function createSendEmailTool(gmail) {
|
|
|
25296
25405
|
}
|
|
25297
25406
|
};
|
|
25298
25407
|
}
|
|
25299
|
-
var ListMessagesInput =
|
|
25300
|
-
query:
|
|
25408
|
+
var ListMessagesInput = z65.object({
|
|
25409
|
+
query: z65.string().optional().describe(
|
|
25301
25410
|
"Gmail search query. Examples: 'is:unread', 'from:alice@example.com', 'subject:invoice newer_than:7d'. Default: lists recent messages in inbox."
|
|
25302
25411
|
),
|
|
25303
|
-
max_results:
|
|
25304
|
-
include_spam_trash:
|
|
25412
|
+
max_results: z65.number().int().min(1).max(500).optional().describe("Max messages to return (1\u2013500, default 20)."),
|
|
25413
|
+
include_spam_trash: z65.boolean().optional().describe("Include messages from SPAM and TRASH (default false).")
|
|
25305
25414
|
});
|
|
25306
25415
|
function createListMessagesTool(gmail) {
|
|
25307
25416
|
return {
|
|
@@ -25370,8 +25479,8 @@ function createListMessagesTool(gmail) {
|
|
|
25370
25479
|
}
|
|
25371
25480
|
};
|
|
25372
25481
|
}
|
|
25373
|
-
var GetMessageInput =
|
|
25374
|
-
message_id:
|
|
25482
|
+
var GetMessageInput = z65.object({
|
|
25483
|
+
message_id: z65.string().describe("Gmail message ID (from gmail_list_messages).")
|
|
25375
25484
|
});
|
|
25376
25485
|
function createGetMessageTool(gmail) {
|
|
25377
25486
|
return {
|
|
@@ -25412,11 +25521,11 @@ function createGetMessageTool(gmail) {
|
|
|
25412
25521
|
}
|
|
25413
25522
|
};
|
|
25414
25523
|
}
|
|
25415
|
-
var ReplyMessageInput =
|
|
25416
|
-
message_id:
|
|
25417
|
-
body:
|
|
25418
|
-
cc:
|
|
25419
|
-
attachments:
|
|
25524
|
+
var ReplyMessageInput = z65.object({
|
|
25525
|
+
message_id: z65.string().describe("ID of the message to reply to."),
|
|
25526
|
+
body: z65.string().describe("Reply body \u2014 plain text or HTML."),
|
|
25527
|
+
cc: z65.string().optional().describe("CC address(es), comma-separated."),
|
|
25528
|
+
attachments: z65.array(AttachmentItemSchema).optional().describe("Optional attachments to include with the reply.")
|
|
25420
25529
|
});
|
|
25421
25530
|
function createReplyMessageTool(gmail) {
|
|
25422
25531
|
return {
|
|
@@ -25466,11 +25575,11 @@ function createReplyMessageTool(gmail) {
|
|
|
25466
25575
|
}
|
|
25467
25576
|
};
|
|
25468
25577
|
}
|
|
25469
|
-
var ForwardMessageInput =
|
|
25470
|
-
message_id:
|
|
25471
|
-
to:
|
|
25472
|
-
note:
|
|
25473
|
-
cc:
|
|
25578
|
+
var ForwardMessageInput = z65.object({
|
|
25579
|
+
message_id: z65.string().describe("ID of the message to forward."),
|
|
25580
|
+
to: z65.string().describe("Recipient(s), comma-separated."),
|
|
25581
|
+
note: z65.string().optional().describe("Optional note prepended before the forwarded body."),
|
|
25582
|
+
cc: z65.string().optional().describe("CC address(es), comma-separated.")
|
|
25474
25583
|
});
|
|
25475
25584
|
function createForwardMessageTool(gmail) {
|
|
25476
25585
|
return {
|
|
@@ -25520,10 +25629,10 @@ To: ${headers["to"] ?? ""}
|
|
|
25520
25629
|
}
|
|
25521
25630
|
};
|
|
25522
25631
|
}
|
|
25523
|
-
var ModifyLabelsInput =
|
|
25524
|
-
message_id:
|
|
25525
|
-
add_labels:
|
|
25526
|
-
remove_labels:
|
|
25632
|
+
var ModifyLabelsInput = z65.object({
|
|
25633
|
+
message_id: z65.string().describe("Gmail message ID."),
|
|
25634
|
+
add_labels: z65.array(z65.string()).optional().describe("Label IDs or system labels to add, e.g. ['STARRED', 'IMPORTANT']."),
|
|
25635
|
+
remove_labels: z65.array(z65.string()).optional().describe("Label IDs or system labels to remove, e.g. ['UNREAD', 'INBOX'].")
|
|
25527
25636
|
});
|
|
25528
25637
|
function createModifyLabelsTool(gmail) {
|
|
25529
25638
|
return {
|
|
@@ -25557,8 +25666,8 @@ function createModifyLabelsTool(gmail) {
|
|
|
25557
25666
|
}
|
|
25558
25667
|
};
|
|
25559
25668
|
}
|
|
25560
|
-
var TrashMessageInput =
|
|
25561
|
-
message_id:
|
|
25669
|
+
var TrashMessageInput = z65.object({
|
|
25670
|
+
message_id: z65.string().describe("Gmail message ID to move to Trash.")
|
|
25562
25671
|
});
|
|
25563
25672
|
function createTrashMessageTool(gmail) {
|
|
25564
25673
|
return {
|
|
@@ -25582,8 +25691,8 @@ function createTrashMessageTool(gmail) {
|
|
|
25582
25691
|
}
|
|
25583
25692
|
};
|
|
25584
25693
|
}
|
|
25585
|
-
var UntrashMessageInput =
|
|
25586
|
-
message_id:
|
|
25694
|
+
var UntrashMessageInput = z65.object({
|
|
25695
|
+
message_id: z65.string().describe("Gmail message ID to restore from Trash.")
|
|
25587
25696
|
});
|
|
25588
25697
|
function createUntrashMessageTool(gmail) {
|
|
25589
25698
|
return {
|
|
@@ -25607,8 +25716,8 @@ function createUntrashMessageTool(gmail) {
|
|
|
25607
25716
|
}
|
|
25608
25717
|
};
|
|
25609
25718
|
}
|
|
25610
|
-
var DeleteMessageInput =
|
|
25611
|
-
message_id:
|
|
25719
|
+
var DeleteMessageInput = z65.object({
|
|
25720
|
+
message_id: z65.string().describe("Gmail message ID to permanently delete.")
|
|
25612
25721
|
});
|
|
25613
25722
|
function createDeleteMessageTool(gmail) {
|
|
25614
25723
|
return {
|
|
@@ -25631,12 +25740,12 @@ function createDeleteMessageTool(gmail) {
|
|
|
25631
25740
|
}
|
|
25632
25741
|
|
|
25633
25742
|
// ../../packages/adapters/gmail/src/tools/threads.ts
|
|
25634
|
-
import { z as
|
|
25743
|
+
import { z as z66 } from "zod";
|
|
25635
25744
|
var BODY_CHAR_CAP2 = 5e3;
|
|
25636
|
-
var ListThreadsInput =
|
|
25637
|
-
query:
|
|
25638
|
-
max_results:
|
|
25639
|
-
include_spam_trash:
|
|
25745
|
+
var ListThreadsInput = z66.object({
|
|
25746
|
+
query: z66.string().optional().describe("Gmail search query. Examples: 'is:unread', 'from:alice@example.com label:work'."),
|
|
25747
|
+
max_results: z66.number().int().min(1).max(500).optional().describe("Max threads to return (1\u2013500, default 20)."),
|
|
25748
|
+
include_spam_trash: z66.boolean().optional().describe("Include threads from SPAM and TRASH (default false).")
|
|
25640
25749
|
});
|
|
25641
25750
|
function createListThreadsTool(gmail) {
|
|
25642
25751
|
return {
|
|
@@ -25679,8 +25788,8 @@ function createListThreadsTool(gmail) {
|
|
|
25679
25788
|
}
|
|
25680
25789
|
};
|
|
25681
25790
|
}
|
|
25682
|
-
var GetThreadInput =
|
|
25683
|
-
thread_id:
|
|
25791
|
+
var GetThreadInput = z66.object({
|
|
25792
|
+
thread_id: z66.string().describe("Gmail thread ID (from gmail_list_threads or gmail_list_messages).")
|
|
25684
25793
|
});
|
|
25685
25794
|
function createGetThreadTool(gmail) {
|
|
25686
25795
|
return {
|
|
@@ -25721,10 +25830,10 @@ function createGetThreadTool(gmail) {
|
|
|
25721
25830
|
}
|
|
25722
25831
|
};
|
|
25723
25832
|
}
|
|
25724
|
-
var ModifyThreadLabelsInput =
|
|
25725
|
-
thread_id:
|
|
25726
|
-
add_labels:
|
|
25727
|
-
remove_labels:
|
|
25833
|
+
var ModifyThreadLabelsInput = z66.object({
|
|
25834
|
+
thread_id: z66.string().describe("Gmail thread ID."),
|
|
25835
|
+
add_labels: z66.array(z66.string()).optional().describe("Label IDs or system labels to add to all messages in the thread, e.g. ['STARRED']."),
|
|
25836
|
+
remove_labels: z66.array(z66.string()).optional().describe("Label IDs or system labels to remove from all messages, e.g. ['UNREAD'].")
|
|
25728
25837
|
});
|
|
25729
25838
|
function createModifyThreadLabelsTool(gmail) {
|
|
25730
25839
|
return {
|
|
@@ -25749,8 +25858,8 @@ function createModifyThreadLabelsTool(gmail) {
|
|
|
25749
25858
|
}
|
|
25750
25859
|
};
|
|
25751
25860
|
}
|
|
25752
|
-
var TrashThreadInput =
|
|
25753
|
-
thread_id:
|
|
25861
|
+
var TrashThreadInput = z66.object({
|
|
25862
|
+
thread_id: z66.string().describe("Gmail thread ID to move to Trash.")
|
|
25754
25863
|
});
|
|
25755
25864
|
function createTrashThreadTool(gmail) {
|
|
25756
25865
|
return {
|
|
@@ -25773,8 +25882,8 @@ function createTrashThreadTool(gmail) {
|
|
|
25773
25882
|
}
|
|
25774
25883
|
|
|
25775
25884
|
// ../../packages/adapters/gmail/src/tools/labels.ts
|
|
25776
|
-
import { z as
|
|
25777
|
-
var ListLabelsInput =
|
|
25885
|
+
import { z as z67 } from "zod";
|
|
25886
|
+
var ListLabelsInput = z67.object({});
|
|
25778
25887
|
function createListLabelsTool(gmail) {
|
|
25779
25888
|
return {
|
|
25780
25889
|
name: "gmail_list_labels",
|
|
@@ -25802,8 +25911,8 @@ function createListLabelsTool(gmail) {
|
|
|
25802
25911
|
}
|
|
25803
25912
|
};
|
|
25804
25913
|
}
|
|
25805
|
-
var GetLabelInput =
|
|
25806
|
-
label_id:
|
|
25914
|
+
var GetLabelInput = z67.object({
|
|
25915
|
+
label_id: z67.string().describe("Label ID (from gmail_list_labels). System labels: 'INBOX', 'SENT', etc.")
|
|
25807
25916
|
});
|
|
25808
25917
|
function createGetLabelTool(gmail) {
|
|
25809
25918
|
return {
|
|
@@ -25833,10 +25942,10 @@ function createGetLabelTool(gmail) {
|
|
|
25833
25942
|
}
|
|
25834
25943
|
};
|
|
25835
25944
|
}
|
|
25836
|
-
var CreateLabelInput =
|
|
25837
|
-
name:
|
|
25838
|
-
label_list_visibility:
|
|
25839
|
-
message_list_visibility:
|
|
25945
|
+
var CreateLabelInput = z67.object({
|
|
25946
|
+
name: z67.string().describe("Label name. Use '/' for nesting, e.g. 'Clients/Acme'."),
|
|
25947
|
+
label_list_visibility: z67.enum(["labelShow", "labelShowIfUnread", "labelHide"]).optional().describe("Sidebar visibility (default labelShow)."),
|
|
25948
|
+
message_list_visibility: z67.enum(["show", "hide"]).optional().describe("Visibility in message list (default show).")
|
|
25840
25949
|
});
|
|
25841
25950
|
function createCreateLabelTool(gmail) {
|
|
25842
25951
|
return {
|
|
@@ -25864,11 +25973,11 @@ function createCreateLabelTool(gmail) {
|
|
|
25864
25973
|
}
|
|
25865
25974
|
};
|
|
25866
25975
|
}
|
|
25867
|
-
var UpdateLabelInput =
|
|
25868
|
-
label_id:
|
|
25869
|
-
name:
|
|
25870
|
-
label_list_visibility:
|
|
25871
|
-
message_list_visibility:
|
|
25976
|
+
var UpdateLabelInput = z67.object({
|
|
25977
|
+
label_id: z67.string().describe("Label ID to update (from gmail_list_labels)."),
|
|
25978
|
+
name: z67.string().optional().describe("New label name."),
|
|
25979
|
+
label_list_visibility: z67.enum(["labelShow", "labelShowIfUnread", "labelHide"]).optional().describe("Sidebar visibility."),
|
|
25980
|
+
message_list_visibility: z67.enum(["show", "hide"]).optional().describe("Message list visibility.")
|
|
25872
25981
|
});
|
|
25873
25982
|
function createUpdateLabelTool(gmail) {
|
|
25874
25983
|
return {
|
|
@@ -25899,8 +26008,8 @@ function createUpdateLabelTool(gmail) {
|
|
|
25899
26008
|
}
|
|
25900
26009
|
};
|
|
25901
26010
|
}
|
|
25902
|
-
var DeleteLabelInput =
|
|
25903
|
-
label_id:
|
|
26011
|
+
var DeleteLabelInput = z67.object({
|
|
26012
|
+
label_id: z67.string().describe("Label ID to permanently delete (cannot delete system labels like INBOX).")
|
|
25904
26013
|
});
|
|
25905
26014
|
function createDeleteLabelTool(gmail) {
|
|
25906
26015
|
return {
|
|
@@ -25923,16 +26032,16 @@ function createDeleteLabelTool(gmail) {
|
|
|
25923
26032
|
}
|
|
25924
26033
|
|
|
25925
26034
|
// ../../packages/adapters/gmail/src/tools/drafts.ts
|
|
25926
|
-
import { z as
|
|
25927
|
-
var AttachmentItemSchema2 =
|
|
25928
|
-
filename:
|
|
25929
|
-
content:
|
|
25930
|
-
mimeType:
|
|
25931
|
-
encoding:
|
|
26035
|
+
import { z as z68 } from "zod";
|
|
26036
|
+
var AttachmentItemSchema2 = z68.object({
|
|
26037
|
+
filename: z68.string().describe("File name shown in the email, e.g. 'report.html'."),
|
|
26038
|
+
content: z68.string().describe("File content as a string (plain text by default)."),
|
|
26039
|
+
mimeType: z68.string().optional().describe("MIME type. Inferred from filename if omitted."),
|
|
26040
|
+
encoding: z68.enum(["text", "base64"]).optional().describe("'text' (default) or 'base64' for binaries.")
|
|
25932
26041
|
});
|
|
25933
|
-
var ListDraftsInput =
|
|
25934
|
-
max_results:
|
|
25935
|
-
query:
|
|
26042
|
+
var ListDraftsInput = z68.object({
|
|
26043
|
+
max_results: z68.number().int().min(1).max(500).optional().describe("Max drafts to return (default 20)."),
|
|
26044
|
+
query: z68.string().optional().describe("Optional Gmail search query.")
|
|
25936
26045
|
});
|
|
25937
26046
|
function createListDraftsTool(gmail) {
|
|
25938
26047
|
return {
|
|
@@ -25996,14 +26105,14 @@ function createListDraftsTool(gmail) {
|
|
|
25996
26105
|
}
|
|
25997
26106
|
};
|
|
25998
26107
|
}
|
|
25999
|
-
var CreateDraftInput =
|
|
26000
|
-
to:
|
|
26001
|
-
subject:
|
|
26002
|
-
body:
|
|
26003
|
-
cc:
|
|
26004
|
-
bcc:
|
|
26005
|
-
reply_to_message_id:
|
|
26006
|
-
attachments:
|
|
26108
|
+
var CreateDraftInput = z68.object({
|
|
26109
|
+
to: z68.string().describe("Recipient email address."),
|
|
26110
|
+
subject: z68.string().describe("Email subject line."),
|
|
26111
|
+
body: z68.string().describe("Email body \u2014 plain text or HTML."),
|
|
26112
|
+
cc: z68.string().optional().describe("CC address(es), comma-separated."),
|
|
26113
|
+
bcc: z68.string().optional().describe("BCC address(es), comma-separated."),
|
|
26114
|
+
reply_to_message_id: z68.string().optional().describe("If provided, sets In-Reply-To and threadId so this draft is a reply in-thread."),
|
|
26115
|
+
attachments: z68.array(AttachmentItemSchema2).optional().describe("Optional file attachments.")
|
|
26007
26116
|
});
|
|
26008
26117
|
function createCreateDraftTool(gmail) {
|
|
26009
26118
|
return {
|
|
@@ -26063,14 +26172,14 @@ function createCreateDraftTool(gmail) {
|
|
|
26063
26172
|
}
|
|
26064
26173
|
};
|
|
26065
26174
|
}
|
|
26066
|
-
var UpdateDraftInput =
|
|
26067
|
-
draft_id:
|
|
26068
|
-
to:
|
|
26069
|
-
subject:
|
|
26070
|
-
body:
|
|
26071
|
-
cc:
|
|
26072
|
-
bcc:
|
|
26073
|
-
attachments:
|
|
26175
|
+
var UpdateDraftInput = z68.object({
|
|
26176
|
+
draft_id: z68.string().describe("Draft ID to update (from gmail_list_drafts or gmail_create_draft)."),
|
|
26177
|
+
to: z68.string().describe("Recipient email address."),
|
|
26178
|
+
subject: z68.string().describe("Email subject line."),
|
|
26179
|
+
body: z68.string().describe("Email body \u2014 plain text or HTML."),
|
|
26180
|
+
cc: z68.string().optional().describe("CC address(es), comma-separated."),
|
|
26181
|
+
bcc: z68.string().optional().describe("BCC address(es), comma-separated."),
|
|
26182
|
+
attachments: z68.array(AttachmentItemSchema2).optional().describe("Optional file attachments.")
|
|
26074
26183
|
});
|
|
26075
26184
|
function createUpdateDraftTool(gmail) {
|
|
26076
26185
|
return {
|
|
@@ -26103,8 +26212,8 @@ function createUpdateDraftTool(gmail) {
|
|
|
26103
26212
|
}
|
|
26104
26213
|
};
|
|
26105
26214
|
}
|
|
26106
|
-
var SendDraftInput =
|
|
26107
|
-
draft_id:
|
|
26215
|
+
var SendDraftInput = z68.object({
|
|
26216
|
+
draft_id: z68.string().describe("Draft ID to send (from gmail_list_drafts or gmail_create_draft).")
|
|
26108
26217
|
});
|
|
26109
26218
|
function createSendDraftTool(gmail) {
|
|
26110
26219
|
return {
|
|
@@ -26128,8 +26237,8 @@ function createSendDraftTool(gmail) {
|
|
|
26128
26237
|
}
|
|
26129
26238
|
};
|
|
26130
26239
|
}
|
|
26131
|
-
var DeleteDraftInput =
|
|
26132
|
-
draft_id:
|
|
26240
|
+
var DeleteDraftInput = z68.object({
|
|
26241
|
+
draft_id: z68.string().describe("Draft ID to permanently delete.")
|
|
26133
26242
|
});
|
|
26134
26243
|
function createDeleteDraftTool(gmail) {
|
|
26135
26244
|
return {
|
|
@@ -26152,12 +26261,12 @@ function createDeleteDraftTool(gmail) {
|
|
|
26152
26261
|
}
|
|
26153
26262
|
|
|
26154
26263
|
// ../../packages/adapters/gmail/src/tools/attachments.ts
|
|
26155
|
-
import { z as
|
|
26264
|
+
import { z as z69 } from "zod";
|
|
26156
26265
|
var ATTACHMENT_SIZE_CAP_BYTES = 25 * 1024 * 1024;
|
|
26157
|
-
var GetAttachmentInput =
|
|
26158
|
-
message_id:
|
|
26159
|
-
attachment_id:
|
|
26160
|
-
filename:
|
|
26266
|
+
var GetAttachmentInput = z69.object({
|
|
26267
|
+
message_id: z69.string().describe("Gmail message ID containing the attachment."),
|
|
26268
|
+
attachment_id: z69.string().describe("Attachment ID (from gmail_get_message attachments list)."),
|
|
26269
|
+
filename: z69.string().optional().describe("Filename hint (for display only, not required).")
|
|
26161
26270
|
});
|
|
26162
26271
|
function createGetAttachmentTool(gmail) {
|
|
26163
26272
|
return {
|
|
@@ -26195,13 +26304,13 @@ function createGetAttachmentTool(gmail) {
|
|
|
26195
26304
|
}
|
|
26196
26305
|
|
|
26197
26306
|
// ../../packages/adapters/gmail/src/tools/history.ts
|
|
26198
|
-
import { z as
|
|
26199
|
-
var ListHistoryInput =
|
|
26200
|
-
start_history_id:
|
|
26307
|
+
import { z as z70 } from "zod";
|
|
26308
|
+
var ListHistoryInput = z70.object({
|
|
26309
|
+
start_history_id: z70.string().describe(
|
|
26201
26310
|
"The historyId to start listing changes from. Get an initial historyId from gmail_list_messages or gmail_get_message (historyId field)."
|
|
26202
26311
|
),
|
|
26203
|
-
max_results:
|
|
26204
|
-
label_id:
|
|
26312
|
+
max_results: z70.number().int().min(1).max(500).optional().describe("Max history records to return (default 100)."),
|
|
26313
|
+
label_id: z70.string().optional().describe("Filter history records by label ID.")
|
|
26205
26314
|
});
|
|
26206
26315
|
function createListHistoryTool(gmail) {
|
|
26207
26316
|
return {
|
|
@@ -26479,7 +26588,7 @@ function createSheetsClient(accessToken) {
|
|
|
26479
26588
|
}
|
|
26480
26589
|
|
|
26481
26590
|
// ../../packages/adapters/google-sheets/src/tools/values.ts
|
|
26482
|
-
import { z as
|
|
26591
|
+
import { z as z71 } from "zod";
|
|
26483
26592
|
|
|
26484
26593
|
// ../../packages/adapters/google-sheets/src/errors.ts
|
|
26485
26594
|
var SheetsAdapterError = class extends Error {
|
|
@@ -26594,10 +26703,10 @@ function parseRange(range) {
|
|
|
26594
26703
|
|
|
26595
26704
|
// ../../packages/adapters/google-sheets/src/tools/values.ts
|
|
26596
26705
|
var ROW_CAP = 1e4;
|
|
26597
|
-
var ReadRangeInput =
|
|
26598
|
-
spreadsheet_id:
|
|
26599
|
-
range:
|
|
26600
|
-
value_render_option:
|
|
26706
|
+
var ReadRangeInput = z71.object({
|
|
26707
|
+
spreadsheet_id: z71.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
26708
|
+
range: z71.string().describe("A1-notation range, e.g. 'Sheet1!A1:D10' or 'A:A' for a full column."),
|
|
26709
|
+
value_render_option: z71.enum(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"]).optional().describe(
|
|
26601
26710
|
"How values are rendered. FORMATTED_VALUE (default) returns display strings. UNFORMATTED_VALUE returns raw numbers/booleans. FORMULA returns formula strings."
|
|
26602
26711
|
)
|
|
26603
26712
|
});
|
|
@@ -26632,9 +26741,9 @@ function createReadRangeTool(sheets) {
|
|
|
26632
26741
|
}
|
|
26633
26742
|
};
|
|
26634
26743
|
}
|
|
26635
|
-
var ReadAllInput =
|
|
26636
|
-
spreadsheet_id:
|
|
26637
|
-
sheet_name:
|
|
26744
|
+
var ReadAllInput = z71.object({
|
|
26745
|
+
spreadsheet_id: z71.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
26746
|
+
sheet_name: z71.string().optional().describe("Sheet tab name (default: first sheet).")
|
|
26638
26747
|
});
|
|
26639
26748
|
function createReadAllTool(sheets) {
|
|
26640
26749
|
return {
|
|
@@ -26681,10 +26790,10 @@ function createReadAllTool(sheets) {
|
|
|
26681
26790
|
}
|
|
26682
26791
|
};
|
|
26683
26792
|
}
|
|
26684
|
-
var BatchReadRangesInput =
|
|
26685
|
-
spreadsheet_id:
|
|
26686
|
-
ranges:
|
|
26687
|
-
value_render_option:
|
|
26793
|
+
var BatchReadRangesInput = z71.object({
|
|
26794
|
+
spreadsheet_id: z71.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
26795
|
+
ranges: z71.array(z71.string()).min(1).max(50).describe("Array of A1-notation ranges to read in a single API call (max 50)."),
|
|
26796
|
+
value_render_option: z71.enum(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"]).optional().describe("How values are rendered (default FORMATTED_VALUE).")
|
|
26688
26797
|
});
|
|
26689
26798
|
function createBatchReadRangesTool(sheets) {
|
|
26690
26799
|
return {
|
|
@@ -26714,11 +26823,11 @@ function createBatchReadRangesTool(sheets) {
|
|
|
26714
26823
|
}
|
|
26715
26824
|
};
|
|
26716
26825
|
}
|
|
26717
|
-
var WriteRangeInput =
|
|
26718
|
-
spreadsheet_id:
|
|
26719
|
-
range:
|
|
26720
|
-
values:
|
|
26721
|
-
value_input_option:
|
|
26826
|
+
var WriteRangeInput = z71.object({
|
|
26827
|
+
spreadsheet_id: z71.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
26828
|
+
range: z71.string().describe("A1-notation range. The top-left cell anchors the write, e.g. 'Sheet1!A1'."),
|
|
26829
|
+
values: z71.array(z71.array(z71.unknown())).describe("2D array of values to write. Example: [['Name','Score'],['Alice',95]]."),
|
|
26830
|
+
value_input_option: z71.enum(["RAW", "USER_ENTERED"]).optional().describe(
|
|
26722
26831
|
"RAW stores strings as-is; USER_ENTERED parses numbers/dates/formulas like a human typing (default)."
|
|
26723
26832
|
)
|
|
26724
26833
|
});
|
|
@@ -26750,15 +26859,15 @@ function createWriteRangeTool(sheets) {
|
|
|
26750
26859
|
}
|
|
26751
26860
|
};
|
|
26752
26861
|
}
|
|
26753
|
-
var AppendRowInput =
|
|
26754
|
-
spreadsheet_id:
|
|
26755
|
-
range:
|
|
26862
|
+
var AppendRowInput = z71.object({
|
|
26863
|
+
spreadsheet_id: z71.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
26864
|
+
range: z71.string().describe(
|
|
26756
26865
|
"Sheet name or range that identifies where to append, e.g. 'Sheet1' or 'Sheet1!A:Z'. Sheets auto-detects the last row with data and appends after it."
|
|
26757
26866
|
),
|
|
26758
|
-
values:
|
|
26867
|
+
values: z71.array(z71.array(z71.unknown())).describe(
|
|
26759
26868
|
"2D array of rows to append. For a single row: [['Name','Score']]. For multiple: [['Alice',95],['Bob',87]]."
|
|
26760
26869
|
),
|
|
26761
|
-
value_input_option:
|
|
26870
|
+
value_input_option: z71.enum(["RAW", "USER_ENTERED"]).optional().describe("RAW stores strings as-is; USER_ENTERED parses numbers/dates/formulas (default).")
|
|
26762
26871
|
});
|
|
26763
26872
|
function createAppendRowTool(sheets) {
|
|
26764
26873
|
return {
|
|
@@ -26788,9 +26897,9 @@ function createAppendRowTool(sheets) {
|
|
|
26788
26897
|
}
|
|
26789
26898
|
};
|
|
26790
26899
|
}
|
|
26791
|
-
var ClearRangeInput =
|
|
26792
|
-
spreadsheet_id:
|
|
26793
|
-
range:
|
|
26900
|
+
var ClearRangeInput = z71.object({
|
|
26901
|
+
spreadsheet_id: z71.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
26902
|
+
range: z71.string().describe("A1-notation range to clear, e.g. 'Sheet1!A2:Z100'. Formatting is preserved.")
|
|
26794
26903
|
});
|
|
26795
26904
|
function createClearRangeTool(sheets) {
|
|
26796
26905
|
return {
|
|
@@ -26813,15 +26922,15 @@ function createClearRangeTool(sheets) {
|
|
|
26813
26922
|
}
|
|
26814
26923
|
};
|
|
26815
26924
|
}
|
|
26816
|
-
var BatchUpdateValuesInput =
|
|
26817
|
-
spreadsheet_id:
|
|
26818
|
-
updates:
|
|
26819
|
-
|
|
26820
|
-
range:
|
|
26821
|
-
values:
|
|
26925
|
+
var BatchUpdateValuesInput = z71.object({
|
|
26926
|
+
spreadsheet_id: z71.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
26927
|
+
updates: z71.array(
|
|
26928
|
+
z71.object({
|
|
26929
|
+
range: z71.string().describe("A1-notation range, e.g. 'Sheet1!A1'."),
|
|
26930
|
+
values: z71.array(z71.array(z71.unknown())).describe("2D array of values to write.")
|
|
26822
26931
|
})
|
|
26823
26932
|
).min(1).max(50).describe("Array of range+values pairs to write in a single API call (max 50)."),
|
|
26824
|
-
value_input_option:
|
|
26933
|
+
value_input_option: z71.enum(["RAW", "USER_ENTERED"]).optional().describe("RAW stores strings as-is; USER_ENTERED parses numbers/dates/formulas (default).")
|
|
26825
26934
|
});
|
|
26826
26935
|
function createBatchUpdateValuesTool(sheets) {
|
|
26827
26936
|
return {
|
|
@@ -26858,13 +26967,13 @@ function createBatchUpdateValuesTool(sheets) {
|
|
|
26858
26967
|
}
|
|
26859
26968
|
};
|
|
26860
26969
|
}
|
|
26861
|
-
var FindRowsInput =
|
|
26862
|
-
spreadsheet_id:
|
|
26863
|
-
sheet_name:
|
|
26864
|
-
column:
|
|
26865
|
-
equals:
|
|
26866
|
-
contains:
|
|
26867
|
-
limit:
|
|
26970
|
+
var FindRowsInput = z71.object({
|
|
26971
|
+
spreadsheet_id: z71.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
26972
|
+
sheet_name: z71.string().optional().describe("Sheet tab name (default: first sheet)."),
|
|
26973
|
+
column: z71.string().describe("Header name of the column to search (from row 1)."),
|
|
26974
|
+
equals: z71.string().optional().describe("Return rows where the column value exactly equals this string."),
|
|
26975
|
+
contains: z71.string().optional().describe("Return rows where the column value contains this substring (case-sensitive)."),
|
|
26976
|
+
limit: z71.number().int().min(1).max(1e3).optional().describe("Max matching rows to return (default 100, max 1000).")
|
|
26868
26977
|
});
|
|
26869
26978
|
function createFindRowsTool(sheets) {
|
|
26870
26979
|
return {
|
|
@@ -26936,7 +27045,7 @@ function createFindRowsTool(sheets) {
|
|
|
26936
27045
|
}
|
|
26937
27046
|
|
|
26938
27047
|
// ../../packages/adapters/google-sheets/src/tools/structure.ts
|
|
26939
|
-
import { z as
|
|
27048
|
+
import { z as z72 } from "zod";
|
|
26940
27049
|
|
|
26941
27050
|
// ../../packages/adapters/google-sheets/src/helpers/batch-update.ts
|
|
26942
27051
|
function buildRenameSheetRequest(sheetId, newTitle) {
|
|
@@ -27045,8 +27154,8 @@ function buildSortRangeRequest(sheetId, startRowIndex, endRowIndex, startColumnI
|
|
|
27045
27154
|
}
|
|
27046
27155
|
|
|
27047
27156
|
// ../../packages/adapters/google-sheets/src/tools/structure.ts
|
|
27048
|
-
var GetMetadataInput =
|
|
27049
|
-
spreadsheet_id:
|
|
27157
|
+
var GetMetadataInput = z72.object({
|
|
27158
|
+
spreadsheet_id: z72.string().describe("The spreadsheet ID from the URL (between /d/ and /edit).")
|
|
27050
27159
|
});
|
|
27051
27160
|
function createGetMetadataTool(sheets) {
|
|
27052
27161
|
return {
|
|
@@ -27086,9 +27195,9 @@ function createGetMetadataTool(sheets) {
|
|
|
27086
27195
|
}
|
|
27087
27196
|
};
|
|
27088
27197
|
}
|
|
27089
|
-
var CreateSpreadsheetInput =
|
|
27090
|
-
title:
|
|
27091
|
-
sheet_title:
|
|
27198
|
+
var CreateSpreadsheetInput = z72.object({
|
|
27199
|
+
title: z72.string().describe("Title for the new spreadsheet."),
|
|
27200
|
+
sheet_title: z72.string().optional().describe("Title for the first sheet tab (default: 'Sheet1').")
|
|
27092
27201
|
});
|
|
27093
27202
|
function createCreateSpreadsheetTool(sheets) {
|
|
27094
27203
|
return {
|
|
@@ -27122,10 +27231,10 @@ function createCreateSpreadsheetTool(sheets) {
|
|
|
27122
27231
|
}
|
|
27123
27232
|
};
|
|
27124
27233
|
}
|
|
27125
|
-
var AddSheetInput =
|
|
27126
|
-
spreadsheet_id:
|
|
27127
|
-
title:
|
|
27128
|
-
index:
|
|
27234
|
+
var AddSheetInput = z72.object({
|
|
27235
|
+
spreadsheet_id: z72.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
27236
|
+
title: z72.string().describe("Title for the new sheet tab."),
|
|
27237
|
+
index: z72.number().int().min(0).optional().describe("Zero-based position to insert the sheet (default: appended at end).")
|
|
27129
27238
|
});
|
|
27130
27239
|
function createAddSheetTool(sheets) {
|
|
27131
27240
|
return {
|
|
@@ -27162,9 +27271,9 @@ function createAddSheetTool(sheets) {
|
|
|
27162
27271
|
}
|
|
27163
27272
|
};
|
|
27164
27273
|
}
|
|
27165
|
-
var DeleteSheetInput =
|
|
27166
|
-
spreadsheet_id:
|
|
27167
|
-
sheet_id:
|
|
27274
|
+
var DeleteSheetInput = z72.object({
|
|
27275
|
+
spreadsheet_id: z72.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
27276
|
+
sheet_id: z72.number().int().describe("Numeric sheet ID (not the tab name). Get it from sheets_get_metadata.")
|
|
27168
27277
|
});
|
|
27169
27278
|
function createDeleteSheetTool(sheets) {
|
|
27170
27279
|
return {
|
|
@@ -27185,11 +27294,11 @@ function createDeleteSheetTool(sheets) {
|
|
|
27185
27294
|
}
|
|
27186
27295
|
};
|
|
27187
27296
|
}
|
|
27188
|
-
var DuplicateSheetInput =
|
|
27189
|
-
spreadsheet_id:
|
|
27190
|
-
source_sheet_id:
|
|
27191
|
-
new_sheet_name:
|
|
27192
|
-
insert_sheet_index:
|
|
27297
|
+
var DuplicateSheetInput = z72.object({
|
|
27298
|
+
spreadsheet_id: z72.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
27299
|
+
source_sheet_id: z72.number().int().describe("Numeric ID of the sheet to duplicate. Get it from sheets_get_metadata."),
|
|
27300
|
+
new_sheet_name: z72.string().optional().describe('Name for the duplicated sheet (defaults to "Copy of <original>").'),
|
|
27301
|
+
insert_sheet_index: z72.number().int().min(0).optional().describe("Zero-based position to insert the duplicate (default: appended at end).")
|
|
27193
27302
|
});
|
|
27194
27303
|
function createDuplicateSheetTool(sheets) {
|
|
27195
27304
|
return {
|
|
@@ -27228,10 +27337,10 @@ function createDuplicateSheetTool(sheets) {
|
|
|
27228
27337
|
}
|
|
27229
27338
|
};
|
|
27230
27339
|
}
|
|
27231
|
-
var RenameSheetInput =
|
|
27232
|
-
spreadsheet_id:
|
|
27233
|
-
sheet_id:
|
|
27234
|
-
new_title:
|
|
27340
|
+
var RenameSheetInput = z72.object({
|
|
27341
|
+
spreadsheet_id: z72.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
27342
|
+
sheet_id: z72.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
|
|
27343
|
+
new_title: z72.string().describe("New tab name for the sheet.")
|
|
27235
27344
|
});
|
|
27236
27345
|
function createRenameSheetTool(sheets) {
|
|
27237
27346
|
return {
|
|
@@ -27256,32 +27365,32 @@ function createRenameSheetTool(sheets) {
|
|
|
27256
27365
|
}
|
|
27257
27366
|
|
|
27258
27367
|
// ../../packages/adapters/google-sheets/src/tools/format.ts
|
|
27259
|
-
import { z as
|
|
27260
|
-
var FormatRangeInput =
|
|
27261
|
-
spreadsheet_id:
|
|
27262
|
-
sheet_id:
|
|
27263
|
-
start_row_index:
|
|
27264
|
-
end_row_index:
|
|
27265
|
-
start_column_index:
|
|
27266
|
-
end_column_index:
|
|
27267
|
-
bold:
|
|
27268
|
-
italic:
|
|
27269
|
-
font_size:
|
|
27270
|
-
background_color:
|
|
27271
|
-
red:
|
|
27272
|
-
green:
|
|
27273
|
-
blue:
|
|
27368
|
+
import { z as z73 } from "zod";
|
|
27369
|
+
var FormatRangeInput = z73.object({
|
|
27370
|
+
spreadsheet_id: z73.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
27371
|
+
sheet_id: z73.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
|
|
27372
|
+
start_row_index: z73.number().int().min(0).describe("Zero-based start row index (inclusive)."),
|
|
27373
|
+
end_row_index: z73.number().int().min(1).describe("Zero-based end row index (exclusive). E.g. rows 0\u20131 \u2192 endRowIndex=1."),
|
|
27374
|
+
start_column_index: z73.number().int().min(0).describe("Zero-based start column index (inclusive)."),
|
|
27375
|
+
end_column_index: z73.number().int().min(1).describe("Zero-based end column index (exclusive). E.g. columns 0\u20133 \u2192 endColumnIndex=3."),
|
|
27376
|
+
bold: z73.boolean().optional().describe("Set bold text."),
|
|
27377
|
+
italic: z73.boolean().optional().describe("Set italic text."),
|
|
27378
|
+
font_size: z73.number().int().min(1).optional().describe("Font size in points."),
|
|
27379
|
+
background_color: z73.object({
|
|
27380
|
+
red: z73.number().min(0).max(1).describe("Red channel 0\u20131."),
|
|
27381
|
+
green: z73.number().min(0).max(1).describe("Green channel 0\u20131."),
|
|
27382
|
+
blue: z73.number().min(0).max(1).describe("Blue channel 0\u20131.")
|
|
27274
27383
|
}).optional().describe("Background fill color (RGB, each channel 0\u20131)."),
|
|
27275
|
-
foreground_color:
|
|
27276
|
-
red:
|
|
27277
|
-
green:
|
|
27278
|
-
blue:
|
|
27384
|
+
foreground_color: z73.object({
|
|
27385
|
+
red: z73.number().min(0).max(1).describe("Red channel 0\u20131."),
|
|
27386
|
+
green: z73.number().min(0).max(1).describe("Green channel 0\u20131."),
|
|
27387
|
+
blue: z73.number().min(0).max(1).describe("Blue channel 0\u20131.")
|
|
27279
27388
|
}).optional().describe("Text foreground color (RGB, each channel 0\u20131)."),
|
|
27280
|
-
number_format:
|
|
27281
|
-
type:
|
|
27282
|
-
pattern:
|
|
27389
|
+
number_format: z73.object({
|
|
27390
|
+
type: z73.enum(["TEXT", "NUMBER", "PERCENT", "CURRENCY", "DATE", "TIME", "DATE_TIME", "SCIENTIFIC"]).describe("Number format type."),
|
|
27391
|
+
pattern: z73.string().optional().describe("Optional format pattern, e.g. '#,##0.00' for currency.")
|
|
27283
27392
|
}).optional().describe("Number format to apply."),
|
|
27284
|
-
horizontal_alignment:
|
|
27393
|
+
horizontal_alignment: z73.enum(["LEFT", "CENTER", "RIGHT"]).optional().describe("Horizontal text alignment.")
|
|
27285
27394
|
});
|
|
27286
27395
|
function createFormatRangeTool(sheets) {
|
|
27287
27396
|
return {
|
|
@@ -27368,12 +27477,12 @@ function createFormatRangeTool(sheets) {
|
|
|
27368
27477
|
}
|
|
27369
27478
|
};
|
|
27370
27479
|
}
|
|
27371
|
-
var ResizeColumnsInput =
|
|
27372
|
-
spreadsheet_id:
|
|
27373
|
-
sheet_id:
|
|
27374
|
-
start_column_index:
|
|
27375
|
-
end_column_index:
|
|
27376
|
-
pixel_size:
|
|
27480
|
+
var ResizeColumnsInput = z73.object({
|
|
27481
|
+
spreadsheet_id: z73.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
27482
|
+
sheet_id: z73.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
|
|
27483
|
+
start_column_index: z73.number().int().min(0).describe("Zero-based start column index (inclusive)."),
|
|
27484
|
+
end_column_index: z73.number().int().min(1).describe("Zero-based end column index (exclusive). E.g. columns 0\u20133 \u2192 endColumnIndex=3."),
|
|
27485
|
+
pixel_size: z73.number().int().min(0).optional().describe("Column width in pixels. Omit to auto-resize to fit content.")
|
|
27377
27486
|
});
|
|
27378
27487
|
function createResizeColumnsTool(sheets) {
|
|
27379
27488
|
return {
|
|
@@ -27409,11 +27518,11 @@ function createResizeColumnsTool(sheets) {
|
|
|
27409
27518
|
}
|
|
27410
27519
|
};
|
|
27411
27520
|
}
|
|
27412
|
-
var FreezePanesInput =
|
|
27413
|
-
spreadsheet_id:
|
|
27414
|
-
sheet_id:
|
|
27415
|
-
frozen_row_count:
|
|
27416
|
-
frozen_column_count:
|
|
27521
|
+
var FreezePanesInput = z73.object({
|
|
27522
|
+
spreadsheet_id: z73.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
27523
|
+
sheet_id: z73.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
|
|
27524
|
+
frozen_row_count: z73.number().int().min(0).optional().describe("Number of rows to freeze at the top (0 to unfreeze, default 0)."),
|
|
27525
|
+
frozen_column_count: z73.number().int().min(0).optional().describe("Number of columns to freeze at the left (0 to unfreeze, default 0).")
|
|
27417
27526
|
});
|
|
27418
27527
|
function createFreezePanesTool(sheets) {
|
|
27419
27528
|
return {
|
|
@@ -27444,14 +27553,14 @@ function createFreezePanesTool(sheets) {
|
|
|
27444
27553
|
}
|
|
27445
27554
|
|
|
27446
27555
|
// ../../packages/adapters/google-sheets/src/tools/filters.ts
|
|
27447
|
-
import { z as
|
|
27448
|
-
var SetBasicFilterInput =
|
|
27449
|
-
spreadsheet_id:
|
|
27450
|
-
sheet_id:
|
|
27451
|
-
start_row_index:
|
|
27452
|
-
end_row_index:
|
|
27453
|
-
start_column_index:
|
|
27454
|
-
end_column_index:
|
|
27556
|
+
import { z as z74 } from "zod";
|
|
27557
|
+
var SetBasicFilterInput = z74.object({
|
|
27558
|
+
spreadsheet_id: z74.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
27559
|
+
sheet_id: z74.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
|
|
27560
|
+
start_row_index: z74.number().int().min(0).describe("Zero-based start row index (inclusive). Usually 0 for the header row."),
|
|
27561
|
+
end_row_index: z74.number().int().min(1).describe("Zero-based end row index (exclusive)."),
|
|
27562
|
+
start_column_index: z74.number().int().min(0).describe("Zero-based start column index (inclusive)."),
|
|
27563
|
+
end_column_index: z74.number().int().min(1).describe("Zero-based end column index (exclusive).")
|
|
27455
27564
|
});
|
|
27456
27565
|
function createSetBasicFilterTool(sheets) {
|
|
27457
27566
|
return {
|
|
@@ -27482,9 +27591,9 @@ function createSetBasicFilterTool(sheets) {
|
|
|
27482
27591
|
}
|
|
27483
27592
|
};
|
|
27484
27593
|
}
|
|
27485
|
-
var ClearBasicFilterInput =
|
|
27486
|
-
spreadsheet_id:
|
|
27487
|
-
sheet_id:
|
|
27594
|
+
var ClearBasicFilterInput = z74.object({
|
|
27595
|
+
spreadsheet_id: z74.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
27596
|
+
sheet_id: z74.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata.")
|
|
27488
27597
|
});
|
|
27489
27598
|
function createClearBasicFilterTool(sheets) {
|
|
27490
27599
|
return {
|
|
@@ -27507,18 +27616,18 @@ function createClearBasicFilterTool(sheets) {
|
|
|
27507
27616
|
}
|
|
27508
27617
|
};
|
|
27509
27618
|
}
|
|
27510
|
-
var SortSpecSchema =
|
|
27511
|
-
dimension_index:
|
|
27512
|
-
sort_order:
|
|
27513
|
-
});
|
|
27514
|
-
var SortRangeInput =
|
|
27515
|
-
spreadsheet_id:
|
|
27516
|
-
sheet_id:
|
|
27517
|
-
start_row_index:
|
|
27518
|
-
end_row_index:
|
|
27519
|
-
start_column_index:
|
|
27520
|
-
end_column_index:
|
|
27521
|
-
sort_specs:
|
|
27619
|
+
var SortSpecSchema = z74.object({
|
|
27620
|
+
dimension_index: z74.number().int().min(0).describe("Zero-based column index to sort by."),
|
|
27621
|
+
sort_order: z74.enum(["ASCENDING", "DESCENDING"]).describe("Sort direction: 'ASCENDING' or 'DESCENDING'.")
|
|
27622
|
+
});
|
|
27623
|
+
var SortRangeInput = z74.object({
|
|
27624
|
+
spreadsheet_id: z74.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
|
|
27625
|
+
sheet_id: z74.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
|
|
27626
|
+
start_row_index: z74.number().int().min(0).describe("Zero-based start row index (inclusive). Set to 1 to exclude the header row."),
|
|
27627
|
+
end_row_index: z74.number().int().min(1).describe("Zero-based end row index (exclusive)."),
|
|
27628
|
+
start_column_index: z74.number().int().min(0).describe("Zero-based start column index (inclusive)."),
|
|
27629
|
+
end_column_index: z74.number().int().min(1).describe("Zero-based end column index (exclusive)."),
|
|
27630
|
+
sort_specs: z74.array(SortSpecSchema).min(1).describe(
|
|
27522
27631
|
"Array of sort specs (primary, secondary, ...). Each: { dimension_index, sort_order }. Example: [{ dimension_index: 2, sort_order: 'DESCENDING' }]."
|
|
27523
27632
|
)
|
|
27524
27633
|
});
|
|
@@ -27742,7 +27851,7 @@ function createDocsClient(accessToken) {
|
|
|
27742
27851
|
}
|
|
27743
27852
|
|
|
27744
27853
|
// ../../packages/adapters/google-docs/src/tools/lifecycle.ts
|
|
27745
|
-
import { z as
|
|
27854
|
+
import { z as z75 } from "zod";
|
|
27746
27855
|
|
|
27747
27856
|
// ../../packages/adapters/google-docs/src/errors.ts
|
|
27748
27857
|
var DocsAdapterError = class extends Error {
|
|
@@ -27931,9 +28040,9 @@ function buildUpdateTextStyleRequest(startIndex, endIndex, textStyle, fields) {
|
|
|
27931
28040
|
|
|
27932
28041
|
// ../../packages/adapters/google-docs/src/tools/lifecycle.ts
|
|
27933
28042
|
var CHAR_CAP3 = 1e5;
|
|
27934
|
-
var CreateDocInput =
|
|
27935
|
-
title:
|
|
27936
|
-
content:
|
|
28043
|
+
var CreateDocInput = z75.object({
|
|
28044
|
+
title: z75.string().describe("Title for the new document."),
|
|
28045
|
+
content: z75.string().optional().describe("Optional initial text content to insert into the document body.")
|
|
27937
28046
|
});
|
|
27938
28047
|
function createCreateDocTool(docs) {
|
|
27939
28048
|
return {
|
|
@@ -27969,8 +28078,8 @@ function createCreateDocTool(docs) {
|
|
|
27969
28078
|
}
|
|
27970
28079
|
};
|
|
27971
28080
|
}
|
|
27972
|
-
var GetDocInput =
|
|
27973
|
-
document_id:
|
|
28081
|
+
var GetDocInput = z75.object({
|
|
28082
|
+
document_id: z75.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit).")
|
|
27974
28083
|
});
|
|
27975
28084
|
function createGetDocTool(docs) {
|
|
27976
28085
|
return {
|
|
@@ -28016,8 +28125,8 @@ function createGetDocTool(docs) {
|
|
|
28016
28125
|
}
|
|
28017
28126
|
};
|
|
28018
28127
|
}
|
|
28019
|
-
var GetDocTextInput =
|
|
28020
|
-
document_id:
|
|
28128
|
+
var GetDocTextInput = z75.object({
|
|
28129
|
+
document_id: z75.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit).")
|
|
28021
28130
|
});
|
|
28022
28131
|
function createGetDocTextTool(docs) {
|
|
28023
28132
|
return {
|
|
@@ -28053,11 +28162,11 @@ function createGetDocTextTool(docs) {
|
|
|
28053
28162
|
}
|
|
28054
28163
|
|
|
28055
28164
|
// ../../packages/adapters/google-docs/src/tools/text.ts
|
|
28056
|
-
import { z as
|
|
28057
|
-
var InsertTextInput =
|
|
28058
|
-
document_id:
|
|
28059
|
-
text:
|
|
28060
|
-
index:
|
|
28165
|
+
import { z as z76 } from "zod";
|
|
28166
|
+
var InsertTextInput = z76.object({
|
|
28167
|
+
document_id: z76.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
|
|
28168
|
+
text: z76.string().describe("Text to insert."),
|
|
28169
|
+
index: z76.number().int().min(1).describe(
|
|
28061
28170
|
"Document body index at which to insert text. Index 1 = beginning of body. Use docs_get to inspect element indices. Insertions shift all subsequent content."
|
|
28062
28171
|
)
|
|
28063
28172
|
});
|
|
@@ -28088,9 +28197,9 @@ function createInsertTextTool(docs) {
|
|
|
28088
28197
|
}
|
|
28089
28198
|
};
|
|
28090
28199
|
}
|
|
28091
|
-
var AppendTextInput =
|
|
28092
|
-
document_id:
|
|
28093
|
-
text:
|
|
28200
|
+
var AppendTextInput = z76.object({
|
|
28201
|
+
document_id: z76.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
|
|
28202
|
+
text: z76.string().describe("Text to append at the end of the document. Use \\n for line breaks.")
|
|
28094
28203
|
});
|
|
28095
28204
|
function createAppendTextTool(docs) {
|
|
28096
28205
|
return {
|
|
@@ -28119,11 +28228,11 @@ function createAppendTextTool(docs) {
|
|
|
28119
28228
|
}
|
|
28120
28229
|
};
|
|
28121
28230
|
}
|
|
28122
|
-
var ReplaceTextInput =
|
|
28123
|
-
document_id:
|
|
28124
|
-
find:
|
|
28125
|
-
replace:
|
|
28126
|
-
match_case:
|
|
28231
|
+
var ReplaceTextInput = z76.object({
|
|
28232
|
+
document_id: z76.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
|
|
28233
|
+
find: z76.string().describe("The exact text string to find in the document."),
|
|
28234
|
+
replace: z76.string().describe("The text to replace all found occurrences with."),
|
|
28235
|
+
match_case: z76.boolean().optional().describe("Whether to match case exactly (default: true).")
|
|
28127
28236
|
});
|
|
28128
28237
|
function createReplaceTextTool(docs) {
|
|
28129
28238
|
return {
|
|
@@ -28152,10 +28261,10 @@ function createReplaceTextTool(docs) {
|
|
|
28152
28261
|
}
|
|
28153
28262
|
};
|
|
28154
28263
|
}
|
|
28155
|
-
var DeleteContentRangeInput =
|
|
28156
|
-
document_id:
|
|
28157
|
-
start_index:
|
|
28158
|
-
end_index:
|
|
28264
|
+
var DeleteContentRangeInput = z76.object({
|
|
28265
|
+
document_id: z76.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
|
|
28266
|
+
start_index: z76.number().int().min(1).describe("Start of the range to delete (inclusive). Get indices from docs_get."),
|
|
28267
|
+
end_index: z76.number().int().min(2).describe(
|
|
28159
28268
|
"End of the range to delete (exclusive). Content at [startIndex, endIndex) is removed."
|
|
28160
28269
|
)
|
|
28161
28270
|
});
|
|
@@ -28194,8 +28303,8 @@ function createDeleteContentRangeTool(docs) {
|
|
|
28194
28303
|
}
|
|
28195
28304
|
|
|
28196
28305
|
// ../../packages/adapters/google-docs/src/tools/structure.ts
|
|
28197
|
-
import { z as
|
|
28198
|
-
var NamedStyleType =
|
|
28306
|
+
import { z as z77 } from "zod";
|
|
28307
|
+
var NamedStyleType = z77.enum([
|
|
28199
28308
|
"NORMAL_TEXT",
|
|
28200
28309
|
"TITLE",
|
|
28201
28310
|
"SUBTITLE",
|
|
@@ -28206,10 +28315,10 @@ var NamedStyleType = z76.enum([
|
|
|
28206
28315
|
"HEADING_5",
|
|
28207
28316
|
"HEADING_6"
|
|
28208
28317
|
]);
|
|
28209
|
-
var InsertParagraphInput =
|
|
28210
|
-
document_id:
|
|
28211
|
-
text:
|
|
28212
|
-
index:
|
|
28318
|
+
var InsertParagraphInput = z77.object({
|
|
28319
|
+
document_id: z77.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
|
|
28320
|
+
text: z77.string().describe("Paragraph text. A newline is appended automatically if not present."),
|
|
28321
|
+
index: z77.number().int().min(1).describe(
|
|
28213
28322
|
"Document body index at which to insert the paragraph. Index 1 = beginning of body. Use docs_get to find indices."
|
|
28214
28323
|
),
|
|
28215
28324
|
named_style: NamedStyleType.optional().describe(
|
|
@@ -28246,9 +28355,9 @@ function createInsertParagraphTool(docs) {
|
|
|
28246
28355
|
}
|
|
28247
28356
|
};
|
|
28248
28357
|
}
|
|
28249
|
-
var InsertPageBreakInput =
|
|
28250
|
-
document_id:
|
|
28251
|
-
index:
|
|
28358
|
+
var InsertPageBreakInput = z77.object({
|
|
28359
|
+
document_id: z77.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
|
|
28360
|
+
index: z77.number().int().min(1).describe("Document body index at which to insert the page break.")
|
|
28252
28361
|
});
|
|
28253
28362
|
function createInsertPageBreakTool(docs) {
|
|
28254
28363
|
return {
|
|
@@ -28272,11 +28381,11 @@ function createInsertPageBreakTool(docs) {
|
|
|
28272
28381
|
}
|
|
28273
28382
|
};
|
|
28274
28383
|
}
|
|
28275
|
-
var InsertTableInput =
|
|
28276
|
-
document_id:
|
|
28277
|
-
index:
|
|
28278
|
-
rows:
|
|
28279
|
-
columns:
|
|
28384
|
+
var InsertTableInput = z77.object({
|
|
28385
|
+
document_id: z77.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
|
|
28386
|
+
index: z77.number().int().min(1).describe("Document body index at which to insert the table."),
|
|
28387
|
+
rows: z77.number().int().min(1).max(100).describe("Number of rows in the table (1\u2013100)."),
|
|
28388
|
+
columns: z77.number().int().min(1).max(20).describe("Number of columns in the table (1\u201320).")
|
|
28280
28389
|
});
|
|
28281
28390
|
function createInsertTableTool(docs) {
|
|
28282
28391
|
return {
|
|
@@ -28306,12 +28415,12 @@ function createInsertTableTool(docs) {
|
|
|
28306
28415
|
}
|
|
28307
28416
|
};
|
|
28308
28417
|
}
|
|
28309
|
-
var InsertImageInput =
|
|
28310
|
-
document_id:
|
|
28311
|
-
image_uri:
|
|
28312
|
-
index:
|
|
28313
|
-
width_pt:
|
|
28314
|
-
height_pt:
|
|
28418
|
+
var InsertImageInput = z77.object({
|
|
28419
|
+
document_id: z77.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
|
|
28420
|
+
image_uri: z77.string().url().describe("Public URL of the image to insert (must be publicly accessible)."),
|
|
28421
|
+
index: z77.number().int().min(1).describe("Document body index at which to insert the image."),
|
|
28422
|
+
width_pt: z77.number().positive().optional().describe("Optional image width in points (1pt \u2248 1.333px). Omit to use source dimensions."),
|
|
28423
|
+
height_pt: z77.number().positive().optional().describe("Optional image height in points. Omit to use source dimensions.")
|
|
28315
28424
|
});
|
|
28316
28425
|
function createInsertImageTool(docs) {
|
|
28317
28426
|
return {
|
|
@@ -28349,8 +28458,8 @@ function createInsertImageTool(docs) {
|
|
|
28349
28458
|
}
|
|
28350
28459
|
|
|
28351
28460
|
// ../../packages/adapters/google-docs/src/tools/format.ts
|
|
28352
|
-
import { z as
|
|
28353
|
-
var NamedStyleType2 =
|
|
28461
|
+
import { z as z78 } from "zod";
|
|
28462
|
+
var NamedStyleType2 = z78.enum([
|
|
28354
28463
|
"NORMAL_TEXT",
|
|
28355
28464
|
"TITLE",
|
|
28356
28465
|
"SUBTITLE",
|
|
@@ -28361,21 +28470,21 @@ var NamedStyleType2 = z77.enum([
|
|
|
28361
28470
|
"HEADING_5",
|
|
28362
28471
|
"HEADING_6"
|
|
28363
28472
|
]);
|
|
28364
|
-
var FormatTextInput =
|
|
28365
|
-
document_id:
|
|
28366
|
-
start_index:
|
|
28367
|
-
end_index:
|
|
28368
|
-
bold:
|
|
28369
|
-
italic:
|
|
28370
|
-
underline:
|
|
28371
|
-
strikethrough:
|
|
28372
|
-
font_size_pt:
|
|
28373
|
-
foreground_color:
|
|
28374
|
-
red:
|
|
28375
|
-
green:
|
|
28376
|
-
blue:
|
|
28473
|
+
var FormatTextInput = z78.object({
|
|
28474
|
+
document_id: z78.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
|
|
28475
|
+
start_index: z78.number().int().min(1).describe("Start of the text range to format (inclusive). Get indices from docs_get."),
|
|
28476
|
+
end_index: z78.number().int().min(2).describe("End of the text range to format (exclusive)."),
|
|
28477
|
+
bold: z78.boolean().optional().describe("Apply bold formatting."),
|
|
28478
|
+
italic: z78.boolean().optional().describe("Apply italic formatting."),
|
|
28479
|
+
underline: z78.boolean().optional().describe("Apply underline formatting."),
|
|
28480
|
+
strikethrough: z78.boolean().optional().describe("Apply strikethrough formatting."),
|
|
28481
|
+
font_size_pt: z78.number().positive().optional().describe("Font size in points (e.g. 12, 14, 18)."),
|
|
28482
|
+
foreground_color: z78.object({
|
|
28483
|
+
red: z78.number().min(0).max(1).describe("Red channel 0\u20131."),
|
|
28484
|
+
green: z78.number().min(0).max(1).describe("Green channel 0\u20131."),
|
|
28485
|
+
blue: z78.number().min(0).max(1).describe("Blue channel 0\u20131.")
|
|
28377
28486
|
}).optional().describe("Text foreground color (RGB, each channel 0\u20131)."),
|
|
28378
|
-
font_family:
|
|
28487
|
+
font_family: z78.string().optional().describe('Font family name (e.g. "Arial", "Times New Roman", "Roboto").')
|
|
28379
28488
|
});
|
|
28380
28489
|
function createFormatTextTool(docs) {
|
|
28381
28490
|
return {
|
|
@@ -28461,10 +28570,10 @@ function createFormatTextTool(docs) {
|
|
|
28461
28570
|
}
|
|
28462
28571
|
};
|
|
28463
28572
|
}
|
|
28464
|
-
var ApplyNamedStyleInput =
|
|
28465
|
-
document_id:
|
|
28466
|
-
start_index:
|
|
28467
|
-
end_index:
|
|
28573
|
+
var ApplyNamedStyleInput = z78.object({
|
|
28574
|
+
document_id: z78.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
|
|
28575
|
+
start_index: z78.number().int().min(1).describe("Start of the paragraph range (inclusive). Get indices from docs_get."),
|
|
28576
|
+
end_index: z78.number().int().min(2).describe("End of the paragraph range (exclusive)."),
|
|
28468
28577
|
named_style: NamedStyleType2.describe(
|
|
28469
28578
|
"The paragraph style to apply: NORMAL_TEXT, TITLE, SUBTITLE, HEADING_1 through HEADING_6."
|
|
28470
28579
|
)
|
|
@@ -28505,9 +28614,9 @@ function createApplyNamedStyleTool(docs) {
|
|
|
28505
28614
|
}
|
|
28506
28615
|
};
|
|
28507
28616
|
}
|
|
28508
|
-
var BatchUpdateInput =
|
|
28509
|
-
document_id:
|
|
28510
|
-
requests:
|
|
28617
|
+
var BatchUpdateInput = z78.object({
|
|
28618
|
+
document_id: z78.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
|
|
28619
|
+
requests: z78.array(z78.record(z78.string(), z78.unknown())).min(1).describe(
|
|
28511
28620
|
"Array of Google Docs API Request objects. Each object must have exactly one key matching a Docs API operation (e.g. insertText, deleteContentRange, updateParagraphStyle, replaceAllText, etc.). See https://developers.google.com/docs/api/reference/rest/v1/documents/request for the full schema."
|
|
28512
28621
|
)
|
|
28513
28622
|
});
|
|
@@ -28693,10 +28802,10 @@ function createFirecrawlClient(apiKey) {
|
|
|
28693
28802
|
}
|
|
28694
28803
|
|
|
28695
28804
|
// ../../packages/adapters/firecrawl/src/tools/scrape.ts
|
|
28696
|
-
import { z as
|
|
28697
|
-
var ScrapeInput =
|
|
28698
|
-
url:
|
|
28699
|
-
formats:
|
|
28805
|
+
import { z as z79 } from "zod";
|
|
28806
|
+
var ScrapeInput = z79.object({
|
|
28807
|
+
url: z79.string().url().describe("The URL to scrape."),
|
|
28808
|
+
formats: z79.array(z79.enum(["markdown", "html", "links"])).optional().default(["markdown"]).describe("Content formats to return. Defaults to ['markdown'].")
|
|
28700
28809
|
});
|
|
28701
28810
|
function makeFirecrawlScrapeTool(client) {
|
|
28702
28811
|
return {
|
|
@@ -28721,9 +28830,9 @@ function makeFirecrawlScrapeTool(client) {
|
|
|
28721
28830
|
}
|
|
28722
28831
|
};
|
|
28723
28832
|
}
|
|
28724
|
-
var MapInput =
|
|
28725
|
-
url:
|
|
28726
|
-
search:
|
|
28833
|
+
var MapInput = z79.object({
|
|
28834
|
+
url: z79.string().url().describe("The root URL whose site to map."),
|
|
28835
|
+
search: z79.string().optional().describe("Optional keyword filter \u2014 only return URLs matching this term.")
|
|
28727
28836
|
});
|
|
28728
28837
|
function makeFirecrawlMapTool(client) {
|
|
28729
28838
|
return {
|
|
@@ -28749,9 +28858,9 @@ function makeFirecrawlMapTool(client) {
|
|
|
28749
28858
|
}
|
|
28750
28859
|
};
|
|
28751
28860
|
}
|
|
28752
|
-
var SearchInput2 =
|
|
28753
|
-
query:
|
|
28754
|
-
limit:
|
|
28861
|
+
var SearchInput2 = z79.object({
|
|
28862
|
+
query: z79.string().min(1).describe("The search query to send to Firecrawl."),
|
|
28863
|
+
limit: z79.number().int().min(1).max(100).optional().describe("Maximum number of results to return (1\u2013100).")
|
|
28755
28864
|
});
|
|
28756
28865
|
function makeFirecrawlSearchTool(client) {
|
|
28757
28866
|
return {
|
|
@@ -28782,10 +28891,10 @@ function makeFirecrawlSearchTool(client) {
|
|
|
28782
28891
|
}
|
|
28783
28892
|
|
|
28784
28893
|
// ../../packages/adapters/firecrawl/src/tools/crawl.ts
|
|
28785
|
-
import { z as
|
|
28786
|
-
var CrawlStartInput =
|
|
28787
|
-
url:
|
|
28788
|
-
limit:
|
|
28894
|
+
import { z as z80 } from "zod";
|
|
28895
|
+
var CrawlStartInput = z80.object({
|
|
28896
|
+
url: z80.string().url().describe("The root URL to crawl."),
|
|
28897
|
+
limit: z80.number().int().min(1).max(100).optional().describe("Maximum number of pages to crawl (1\u2013100).")
|
|
28789
28898
|
});
|
|
28790
28899
|
function makeFirecrawlCrawlStartTool(client) {
|
|
28791
28900
|
return {
|
|
@@ -28808,8 +28917,8 @@ function makeFirecrawlCrawlStartTool(client) {
|
|
|
28808
28917
|
}
|
|
28809
28918
|
};
|
|
28810
28919
|
}
|
|
28811
|
-
var CrawlStatusInput =
|
|
28812
|
-
id:
|
|
28920
|
+
var CrawlStatusInput = z80.object({
|
|
28921
|
+
id: z80.string().min(1).describe("The crawl job ID returned by firecrawl_crawl_start.")
|
|
28813
28922
|
});
|
|
28814
28923
|
function makeFirecrawlCrawlStatusTool(client) {
|
|
28815
28924
|
return {
|
|
@@ -28902,12 +29011,12 @@ function createApifyClient(accessToken) {
|
|
|
28902
29011
|
|
|
28903
29012
|
// ../../packages/adapters/apify/src/tools/actors.ts
|
|
28904
29013
|
init_errors();
|
|
28905
|
-
import { z as
|
|
28906
|
-
var WebBrowseInput =
|
|
28907
|
-
query:
|
|
29014
|
+
import { z as z81 } from "zod";
|
|
29015
|
+
var WebBrowseInput = z81.object({
|
|
29016
|
+
query: z81.string().min(1).describe(
|
|
28908
29017
|
"A web page URL to scrape, OR free-text search terms. A URL returns that page; search terms return the top results."
|
|
28909
29018
|
),
|
|
28910
|
-
maxResults:
|
|
29019
|
+
maxResults: z81.number().int().min(1).max(10).optional().describe("For a search query, how many results to return (default 3). Ignored for a single URL.")
|
|
28911
29020
|
});
|
|
28912
29021
|
function sanitizeScraped(s) {
|
|
28913
29022
|
return Array.from(s).filter((ch) => {
|
|
@@ -28952,11 +29061,11 @@ function makeApifyWebBrowseTool(client) {
|
|
|
28952
29061
|
}
|
|
28953
29062
|
};
|
|
28954
29063
|
}
|
|
28955
|
-
var RunActorInput =
|
|
28956
|
-
actorId:
|
|
29064
|
+
var RunActorInput = z81.object({
|
|
29065
|
+
actorId: z81.string().describe(
|
|
28957
29066
|
'The actor ID or name in the format "owner/actor-name" (e.g. "apify/web-scraper") or just the actor ID.'
|
|
28958
29067
|
),
|
|
28959
|
-
input:
|
|
29068
|
+
input: z81.record(z81.string(), z81.unknown()).optional().describe(
|
|
28960
29069
|
"Input object to pass to the actor. Structure depends on the actor. Omit to use actor defaults."
|
|
28961
29070
|
)
|
|
28962
29071
|
});
|
|
@@ -28980,8 +29089,8 @@ function makeApifyRunActorTool(client) {
|
|
|
28980
29089
|
}
|
|
28981
29090
|
};
|
|
28982
29091
|
}
|
|
28983
|
-
var GetRunInput =
|
|
28984
|
-
runId:
|
|
29092
|
+
var GetRunInput = z81.object({
|
|
29093
|
+
runId: z81.string().describe("The Apify run ID to retrieve metadata for.")
|
|
28985
29094
|
});
|
|
28986
29095
|
function makeApifyGetRunTool(client) {
|
|
28987
29096
|
return {
|
|
@@ -29014,10 +29123,10 @@ function makeApifyGetRunTool(client) {
|
|
|
29014
29123
|
|
|
29015
29124
|
// ../../packages/adapters/apify/src/tools/datasets.ts
|
|
29016
29125
|
init_errors();
|
|
29017
|
-
import { z as
|
|
29018
|
-
var ListDatasetsInput =
|
|
29019
|
-
limit:
|
|
29020
|
-
offset:
|
|
29126
|
+
import { z as z82 } from "zod";
|
|
29127
|
+
var ListDatasetsInput = z82.object({
|
|
29128
|
+
limit: z82.number().int().min(1).max(1e3).optional().default(100).describe("Maximum number of datasets to return (default 100, max 1000)."),
|
|
29129
|
+
offset: z82.number().int().min(0).optional().default(0).describe("Number of datasets to skip (for pagination). Default 0.")
|
|
29021
29130
|
});
|
|
29022
29131
|
function makeApifyListDatasetsTool(client) {
|
|
29023
29132
|
return {
|
|
@@ -29049,12 +29158,12 @@ function makeApifyListDatasetsTool(client) {
|
|
|
29049
29158
|
}
|
|
29050
29159
|
};
|
|
29051
29160
|
}
|
|
29052
|
-
var GetDatasetItemsInput =
|
|
29053
|
-
datasetId:
|
|
29161
|
+
var GetDatasetItemsInput = z82.object({
|
|
29162
|
+
datasetId: z82.string().describe(
|
|
29054
29163
|
"The Apify dataset ID to read from. Use apify_run_actor to get the datasetId from a run, or apify_list_datasets to browse existing datasets."
|
|
29055
29164
|
),
|
|
29056
|
-
limit:
|
|
29057
|
-
offset:
|
|
29165
|
+
limit: z82.number().int().min(1).max(1e3).optional().default(100).describe("Maximum number of items to return (default 100, max 1000)."),
|
|
29166
|
+
offset: z82.number().int().min(0).optional().default(0).describe("Number of items to skip (for pagination). Default 0.")
|
|
29058
29167
|
});
|
|
29059
29168
|
function makeApifyGetDatasetItemsTool(client) {
|
|
29060
29169
|
return {
|
|
@@ -29206,13 +29315,13 @@ function createTavilyClient(accessToken) {
|
|
|
29206
29315
|
}
|
|
29207
29316
|
|
|
29208
29317
|
// ../../packages/adapters/tavily/src/tools/search.ts
|
|
29209
|
-
import { z as
|
|
29210
|
-
var SearchInput3 =
|
|
29211
|
-
query:
|
|
29212
|
-
searchDepth:
|
|
29213
|
-
maxResults:
|
|
29214
|
-
includeImages:
|
|
29215
|
-
topic:
|
|
29318
|
+
import { z as z83 } from "zod";
|
|
29319
|
+
var SearchInput3 = z83.object({
|
|
29320
|
+
query: z83.string().min(1).describe("The search query to send to Tavily."),
|
|
29321
|
+
searchDepth: z83.enum(["basic", "advanced"]).optional().describe('Search depth: "basic" is faster, "advanced" is more thorough. Default: "basic".'),
|
|
29322
|
+
maxResults: z83.number().int().min(1).max(20).optional().describe("Maximum number of results to return (1\u201320, default 5)."),
|
|
29323
|
+
includeImages: z83.boolean().optional().describe("Whether to include image results. Default: false."),
|
|
29324
|
+
topic: z83.enum(["general", "news"]).optional().describe('Search topic category: "general" or "news". Default: "general".')
|
|
29216
29325
|
});
|
|
29217
29326
|
function makeTavilySearchTool(client) {
|
|
29218
29327
|
return {
|
|
@@ -29250,9 +29359,9 @@ function makeTavilySearchTool(client) {
|
|
|
29250
29359
|
}
|
|
29251
29360
|
};
|
|
29252
29361
|
}
|
|
29253
|
-
var ExtractInput =
|
|
29254
|
-
urls:
|
|
29255
|
-
extractDepth:
|
|
29362
|
+
var ExtractInput = z83.object({
|
|
29363
|
+
urls: z83.array(z83.string().url()).min(1).max(20).describe("Array of URLs to extract content from (max 20)."),
|
|
29364
|
+
extractDepth: z83.enum(["basic", "advanced"]).optional().describe('Extraction depth: "basic" or "advanced". Default: "basic".')
|
|
29256
29365
|
});
|
|
29257
29366
|
function makeTavilyExtractTool(client) {
|
|
29258
29367
|
return {
|
|
@@ -29283,10 +29392,10 @@ function makeTavilyExtractTool(client) {
|
|
|
29283
29392
|
}
|
|
29284
29393
|
};
|
|
29285
29394
|
}
|
|
29286
|
-
var CrawlInput =
|
|
29287
|
-
url:
|
|
29288
|
-
maxDepth:
|
|
29289
|
-
limit:
|
|
29395
|
+
var CrawlInput = z83.object({
|
|
29396
|
+
url: z83.string().url().describe("The seed URL to start crawling from."),
|
|
29397
|
+
maxDepth: z83.number().int().min(1).max(5).optional().describe("Maximum link depth to follow from the seed URL (1\u20135, default 1)."),
|
|
29398
|
+
limit: z83.number().int().min(1).max(50).optional().describe("Maximum number of pages to scrape (1\u201350, default 10).")
|
|
29290
29399
|
});
|
|
29291
29400
|
function makeTavilyCrawlTool(client) {
|
|
29292
29401
|
return {
|
|
@@ -29485,31 +29594,31 @@ function getLiteralValue(schema) {
|
|
|
29485
29594
|
}
|
|
29486
29595
|
|
|
29487
29596
|
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
29488
|
-
import * as
|
|
29597
|
+
import * as z84 from "zod/v4";
|
|
29489
29598
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
29490
29599
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
29491
29600
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
29492
29601
|
var JSONRPC_VERSION = "2.0";
|
|
29493
|
-
var AssertObjectSchema =
|
|
29494
|
-
var ProgressTokenSchema =
|
|
29495
|
-
var CursorSchema =
|
|
29496
|
-
var TaskCreationParamsSchema =
|
|
29602
|
+
var AssertObjectSchema = z84.custom((v) => v !== null && (typeof v === "object" || typeof v === "function"));
|
|
29603
|
+
var ProgressTokenSchema = z84.union([z84.string(), z84.number().int()]);
|
|
29604
|
+
var CursorSchema = z84.string();
|
|
29605
|
+
var TaskCreationParamsSchema = z84.looseObject({
|
|
29497
29606
|
/**
|
|
29498
29607
|
* Requested duration in milliseconds to retain task from creation.
|
|
29499
29608
|
*/
|
|
29500
|
-
ttl:
|
|
29609
|
+
ttl: z84.number().optional(),
|
|
29501
29610
|
/**
|
|
29502
29611
|
* Time in milliseconds to wait between task status requests.
|
|
29503
29612
|
*/
|
|
29504
|
-
pollInterval:
|
|
29613
|
+
pollInterval: z84.number().optional()
|
|
29505
29614
|
});
|
|
29506
|
-
var TaskMetadataSchema =
|
|
29507
|
-
ttl:
|
|
29615
|
+
var TaskMetadataSchema = z84.object({
|
|
29616
|
+
ttl: z84.number().optional()
|
|
29508
29617
|
});
|
|
29509
|
-
var RelatedTaskMetadataSchema =
|
|
29510
|
-
taskId:
|
|
29618
|
+
var RelatedTaskMetadataSchema = z84.object({
|
|
29619
|
+
taskId: z84.string()
|
|
29511
29620
|
});
|
|
29512
|
-
var RequestMetaSchema =
|
|
29621
|
+
var RequestMetaSchema = z84.looseObject({
|
|
29513
29622
|
/**
|
|
29514
29623
|
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
|
29515
29624
|
*/
|
|
@@ -29519,7 +29628,7 @@ var RequestMetaSchema = z83.looseObject({
|
|
|
29519
29628
|
*/
|
|
29520
29629
|
[RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
|
|
29521
29630
|
});
|
|
29522
|
-
var BaseRequestParamsSchema =
|
|
29631
|
+
var BaseRequestParamsSchema = z84.object({
|
|
29523
29632
|
/**
|
|
29524
29633
|
* See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
|
|
29525
29634
|
*/
|
|
@@ -29537,42 +29646,42 @@ var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
|
29537
29646
|
task: TaskMetadataSchema.optional()
|
|
29538
29647
|
});
|
|
29539
29648
|
var isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;
|
|
29540
|
-
var RequestSchema =
|
|
29541
|
-
method:
|
|
29649
|
+
var RequestSchema = z84.object({
|
|
29650
|
+
method: z84.string(),
|
|
29542
29651
|
params: BaseRequestParamsSchema.loose().optional()
|
|
29543
29652
|
});
|
|
29544
|
-
var NotificationsParamsSchema =
|
|
29653
|
+
var NotificationsParamsSchema = z84.object({
|
|
29545
29654
|
/**
|
|
29546
29655
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
29547
29656
|
* for notes on _meta usage.
|
|
29548
29657
|
*/
|
|
29549
29658
|
_meta: RequestMetaSchema.optional()
|
|
29550
29659
|
});
|
|
29551
|
-
var NotificationSchema =
|
|
29552
|
-
method:
|
|
29660
|
+
var NotificationSchema = z84.object({
|
|
29661
|
+
method: z84.string(),
|
|
29553
29662
|
params: NotificationsParamsSchema.loose().optional()
|
|
29554
29663
|
});
|
|
29555
|
-
var ResultSchema =
|
|
29664
|
+
var ResultSchema = z84.looseObject({
|
|
29556
29665
|
/**
|
|
29557
29666
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
29558
29667
|
* for notes on _meta usage.
|
|
29559
29668
|
*/
|
|
29560
29669
|
_meta: RequestMetaSchema.optional()
|
|
29561
29670
|
});
|
|
29562
|
-
var RequestIdSchema =
|
|
29563
|
-
var JSONRPCRequestSchema =
|
|
29564
|
-
jsonrpc:
|
|
29671
|
+
var RequestIdSchema = z84.union([z84.string(), z84.number().int()]);
|
|
29672
|
+
var JSONRPCRequestSchema = z84.object({
|
|
29673
|
+
jsonrpc: z84.literal(JSONRPC_VERSION),
|
|
29565
29674
|
id: RequestIdSchema,
|
|
29566
29675
|
...RequestSchema.shape
|
|
29567
29676
|
}).strict();
|
|
29568
29677
|
var isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;
|
|
29569
|
-
var JSONRPCNotificationSchema =
|
|
29570
|
-
jsonrpc:
|
|
29678
|
+
var JSONRPCNotificationSchema = z84.object({
|
|
29679
|
+
jsonrpc: z84.literal(JSONRPC_VERSION),
|
|
29571
29680
|
...NotificationSchema.shape
|
|
29572
29681
|
}).strict();
|
|
29573
29682
|
var isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
|
|
29574
|
-
var JSONRPCResultResponseSchema =
|
|
29575
|
-
jsonrpc:
|
|
29683
|
+
var JSONRPCResultResponseSchema = z84.object({
|
|
29684
|
+
jsonrpc: z84.literal(JSONRPC_VERSION),
|
|
29576
29685
|
id: RequestIdSchema,
|
|
29577
29686
|
result: ResultSchema
|
|
29578
29687
|
}).strict();
|
|
@@ -29588,32 +29697,32 @@ var ErrorCode;
|
|
|
29588
29697
|
ErrorCode2[ErrorCode2["InternalError"] = -32603] = "InternalError";
|
|
29589
29698
|
ErrorCode2[ErrorCode2["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
|
|
29590
29699
|
})(ErrorCode || (ErrorCode = {}));
|
|
29591
|
-
var JSONRPCErrorResponseSchema =
|
|
29592
|
-
jsonrpc:
|
|
29700
|
+
var JSONRPCErrorResponseSchema = z84.object({
|
|
29701
|
+
jsonrpc: z84.literal(JSONRPC_VERSION),
|
|
29593
29702
|
id: RequestIdSchema.optional(),
|
|
29594
|
-
error:
|
|
29703
|
+
error: z84.object({
|
|
29595
29704
|
/**
|
|
29596
29705
|
* The error type that occurred.
|
|
29597
29706
|
*/
|
|
29598
|
-
code:
|
|
29707
|
+
code: z84.number().int(),
|
|
29599
29708
|
/**
|
|
29600
29709
|
* A short description of the error. The message SHOULD be limited to a concise single sentence.
|
|
29601
29710
|
*/
|
|
29602
|
-
message:
|
|
29711
|
+
message: z84.string(),
|
|
29603
29712
|
/**
|
|
29604
29713
|
* Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
|
|
29605
29714
|
*/
|
|
29606
|
-
data:
|
|
29715
|
+
data: z84.unknown().optional()
|
|
29607
29716
|
})
|
|
29608
29717
|
}).strict();
|
|
29609
29718
|
var isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;
|
|
29610
|
-
var JSONRPCMessageSchema =
|
|
29719
|
+
var JSONRPCMessageSchema = z84.union([
|
|
29611
29720
|
JSONRPCRequestSchema,
|
|
29612
29721
|
JSONRPCNotificationSchema,
|
|
29613
29722
|
JSONRPCResultResponseSchema,
|
|
29614
29723
|
JSONRPCErrorResponseSchema
|
|
29615
29724
|
]);
|
|
29616
|
-
var JSONRPCResponseSchema =
|
|
29725
|
+
var JSONRPCResponseSchema = z84.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
|
|
29617
29726
|
var EmptyResultSchema = ResultSchema.strict();
|
|
29618
29727
|
var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
29619
29728
|
/**
|
|
@@ -29625,28 +29734,28 @@ var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
|
29625
29734
|
/**
|
|
29626
29735
|
* An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
|
|
29627
29736
|
*/
|
|
29628
|
-
reason:
|
|
29737
|
+
reason: z84.string().optional()
|
|
29629
29738
|
});
|
|
29630
29739
|
var CancelledNotificationSchema = NotificationSchema.extend({
|
|
29631
|
-
method:
|
|
29740
|
+
method: z84.literal("notifications/cancelled"),
|
|
29632
29741
|
params: CancelledNotificationParamsSchema
|
|
29633
29742
|
});
|
|
29634
|
-
var IconSchema =
|
|
29743
|
+
var IconSchema = z84.object({
|
|
29635
29744
|
/**
|
|
29636
29745
|
* URL or data URI for the icon.
|
|
29637
29746
|
*/
|
|
29638
|
-
src:
|
|
29747
|
+
src: z84.string(),
|
|
29639
29748
|
/**
|
|
29640
29749
|
* Optional MIME type for the icon.
|
|
29641
29750
|
*/
|
|
29642
|
-
mimeType:
|
|
29751
|
+
mimeType: z84.string().optional(),
|
|
29643
29752
|
/**
|
|
29644
29753
|
* Optional array of strings that specify sizes at which the icon can be used.
|
|
29645
29754
|
* Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.
|
|
29646
29755
|
*
|
|
29647
29756
|
* If not provided, the client should assume that the icon can be used at any size.
|
|
29648
29757
|
*/
|
|
29649
|
-
sizes:
|
|
29758
|
+
sizes: z84.array(z84.string()).optional(),
|
|
29650
29759
|
/**
|
|
29651
29760
|
* Optional specifier for the theme this icon is designed for. `light` indicates
|
|
29652
29761
|
* the icon is designed to be used with a light background, and `dark` indicates
|
|
@@ -29654,9 +29763,9 @@ var IconSchema = z83.object({
|
|
|
29654
29763
|
*
|
|
29655
29764
|
* If not provided, the client should assume the icon can be used with any theme.
|
|
29656
29765
|
*/
|
|
29657
|
-
theme:
|
|
29766
|
+
theme: z84.enum(["light", "dark"]).optional()
|
|
29658
29767
|
});
|
|
29659
|
-
var IconsSchema =
|
|
29768
|
+
var IconsSchema = z84.object({
|
|
29660
29769
|
/**
|
|
29661
29770
|
* Optional set of sized icons that the client can display in a user interface.
|
|
29662
29771
|
*
|
|
@@ -29668,11 +29777,11 @@ var IconsSchema = z83.object({
|
|
|
29668
29777
|
* - `image/svg+xml` - SVG images (scalable but requires security precautions)
|
|
29669
29778
|
* - `image/webp` - WebP images (modern, efficient format)
|
|
29670
29779
|
*/
|
|
29671
|
-
icons:
|
|
29780
|
+
icons: z84.array(IconSchema).optional()
|
|
29672
29781
|
});
|
|
29673
|
-
var BaseMetadataSchema =
|
|
29782
|
+
var BaseMetadataSchema = z84.object({
|
|
29674
29783
|
/** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
|
|
29675
|
-
name:
|
|
29784
|
+
name: z84.string(),
|
|
29676
29785
|
/**
|
|
29677
29786
|
* Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
|
|
29678
29787
|
* even by those unfamiliar with domain-specific terminology.
|
|
@@ -29681,16 +29790,16 @@ var BaseMetadataSchema = z83.object({
|
|
|
29681
29790
|
* where `annotations.title` should be given precedence over using `name`,
|
|
29682
29791
|
* if present).
|
|
29683
29792
|
*/
|
|
29684
|
-
title:
|
|
29793
|
+
title: z84.string().optional()
|
|
29685
29794
|
});
|
|
29686
29795
|
var ImplementationSchema = BaseMetadataSchema.extend({
|
|
29687
29796
|
...BaseMetadataSchema.shape,
|
|
29688
29797
|
...IconsSchema.shape,
|
|
29689
|
-
version:
|
|
29798
|
+
version: z84.string(),
|
|
29690
29799
|
/**
|
|
29691
29800
|
* An optional URL of the website for this implementation.
|
|
29692
29801
|
*/
|
|
29693
|
-
websiteUrl:
|
|
29802
|
+
websiteUrl: z84.string().optional(),
|
|
29694
29803
|
/**
|
|
29695
29804
|
* An optional human-readable description of what this implementation does.
|
|
29696
29805
|
*
|
|
@@ -29698,23 +29807,23 @@ var ImplementationSchema = BaseMetadataSchema.extend({
|
|
|
29698
29807
|
* and capabilities. For example, a server might describe the types of resources
|
|
29699
29808
|
* or tools it provides, while a client might describe its intended use case.
|
|
29700
29809
|
*/
|
|
29701
|
-
description:
|
|
29810
|
+
description: z84.string().optional()
|
|
29702
29811
|
});
|
|
29703
|
-
var FormElicitationCapabilitySchema =
|
|
29704
|
-
applyDefaults:
|
|
29705
|
-
}),
|
|
29706
|
-
var ElicitationCapabilitySchema =
|
|
29812
|
+
var FormElicitationCapabilitySchema = z84.intersection(z84.object({
|
|
29813
|
+
applyDefaults: z84.boolean().optional()
|
|
29814
|
+
}), z84.record(z84.string(), z84.unknown()));
|
|
29815
|
+
var ElicitationCapabilitySchema = z84.preprocess((value) => {
|
|
29707
29816
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
29708
29817
|
if (Object.keys(value).length === 0) {
|
|
29709
29818
|
return { form: {} };
|
|
29710
29819
|
}
|
|
29711
29820
|
}
|
|
29712
29821
|
return value;
|
|
29713
|
-
},
|
|
29822
|
+
}, z84.intersection(z84.object({
|
|
29714
29823
|
form: FormElicitationCapabilitySchema.optional(),
|
|
29715
29824
|
url: AssertObjectSchema.optional()
|
|
29716
|
-
}),
|
|
29717
|
-
var ClientTasksCapabilitySchema =
|
|
29825
|
+
}), z84.record(z84.string(), z84.unknown()).optional()));
|
|
29826
|
+
var ClientTasksCapabilitySchema = z84.looseObject({
|
|
29718
29827
|
/**
|
|
29719
29828
|
* Present if the client supports listing tasks.
|
|
29720
29829
|
*/
|
|
@@ -29726,22 +29835,22 @@ var ClientTasksCapabilitySchema = z83.looseObject({
|
|
|
29726
29835
|
/**
|
|
29727
29836
|
* Capabilities for task creation on specific request types.
|
|
29728
29837
|
*/
|
|
29729
|
-
requests:
|
|
29838
|
+
requests: z84.looseObject({
|
|
29730
29839
|
/**
|
|
29731
29840
|
* Task support for sampling requests.
|
|
29732
29841
|
*/
|
|
29733
|
-
sampling:
|
|
29842
|
+
sampling: z84.looseObject({
|
|
29734
29843
|
createMessage: AssertObjectSchema.optional()
|
|
29735
29844
|
}).optional(),
|
|
29736
29845
|
/**
|
|
29737
29846
|
* Task support for elicitation requests.
|
|
29738
29847
|
*/
|
|
29739
|
-
elicitation:
|
|
29848
|
+
elicitation: z84.looseObject({
|
|
29740
29849
|
create: AssertObjectSchema.optional()
|
|
29741
29850
|
}).optional()
|
|
29742
29851
|
}).optional()
|
|
29743
29852
|
});
|
|
29744
|
-
var ServerTasksCapabilitySchema =
|
|
29853
|
+
var ServerTasksCapabilitySchema = z84.looseObject({
|
|
29745
29854
|
/**
|
|
29746
29855
|
* Present if the server supports listing tasks.
|
|
29747
29856
|
*/
|
|
@@ -29753,24 +29862,24 @@ var ServerTasksCapabilitySchema = z83.looseObject({
|
|
|
29753
29862
|
/**
|
|
29754
29863
|
* Capabilities for task creation on specific request types.
|
|
29755
29864
|
*/
|
|
29756
|
-
requests:
|
|
29865
|
+
requests: z84.looseObject({
|
|
29757
29866
|
/**
|
|
29758
29867
|
* Task support for tool requests.
|
|
29759
29868
|
*/
|
|
29760
|
-
tools:
|
|
29869
|
+
tools: z84.looseObject({
|
|
29761
29870
|
call: AssertObjectSchema.optional()
|
|
29762
29871
|
}).optional()
|
|
29763
29872
|
}).optional()
|
|
29764
29873
|
});
|
|
29765
|
-
var ClientCapabilitiesSchema =
|
|
29874
|
+
var ClientCapabilitiesSchema = z84.object({
|
|
29766
29875
|
/**
|
|
29767
29876
|
* Experimental, non-standard capabilities that the client supports.
|
|
29768
29877
|
*/
|
|
29769
|
-
experimental:
|
|
29878
|
+
experimental: z84.record(z84.string(), AssertObjectSchema).optional(),
|
|
29770
29879
|
/**
|
|
29771
29880
|
* Present if the client supports sampling from an LLM.
|
|
29772
29881
|
*/
|
|
29773
|
-
sampling:
|
|
29882
|
+
sampling: z84.object({
|
|
29774
29883
|
/**
|
|
29775
29884
|
* Present if the client supports context inclusion via includeContext parameter.
|
|
29776
29885
|
* If not declared, servers SHOULD only use `includeContext: "none"` (or omit it).
|
|
@@ -29788,11 +29897,11 @@ var ClientCapabilitiesSchema = z83.object({
|
|
|
29788
29897
|
/**
|
|
29789
29898
|
* Present if the client supports listing roots.
|
|
29790
29899
|
*/
|
|
29791
|
-
roots:
|
|
29900
|
+
roots: z84.object({
|
|
29792
29901
|
/**
|
|
29793
29902
|
* Whether the client supports issuing notifications for changes to the roots list.
|
|
29794
29903
|
*/
|
|
29795
|
-
listChanged:
|
|
29904
|
+
listChanged: z84.boolean().optional()
|
|
29796
29905
|
}).optional(),
|
|
29797
29906
|
/**
|
|
29798
29907
|
* Present if the client supports task creation.
|
|
@@ -29801,25 +29910,25 @@ var ClientCapabilitiesSchema = z83.object({
|
|
|
29801
29910
|
/**
|
|
29802
29911
|
* Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
|
|
29803
29912
|
*/
|
|
29804
|
-
extensions:
|
|
29913
|
+
extensions: z84.record(z84.string(), AssertObjectSchema).optional()
|
|
29805
29914
|
});
|
|
29806
29915
|
var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
29807
29916
|
/**
|
|
29808
29917
|
* The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
|
|
29809
29918
|
*/
|
|
29810
|
-
protocolVersion:
|
|
29919
|
+
protocolVersion: z84.string(),
|
|
29811
29920
|
capabilities: ClientCapabilitiesSchema,
|
|
29812
29921
|
clientInfo: ImplementationSchema
|
|
29813
29922
|
});
|
|
29814
29923
|
var InitializeRequestSchema = RequestSchema.extend({
|
|
29815
|
-
method:
|
|
29924
|
+
method: z84.literal("initialize"),
|
|
29816
29925
|
params: InitializeRequestParamsSchema
|
|
29817
29926
|
});
|
|
29818
|
-
var ServerCapabilitiesSchema =
|
|
29927
|
+
var ServerCapabilitiesSchema = z84.object({
|
|
29819
29928
|
/**
|
|
29820
29929
|
* Experimental, non-standard capabilities that the server supports.
|
|
29821
29930
|
*/
|
|
29822
|
-
experimental:
|
|
29931
|
+
experimental: z84.record(z84.string(), AssertObjectSchema).optional(),
|
|
29823
29932
|
/**
|
|
29824
29933
|
* Present if the server supports sending log messages to the client.
|
|
29825
29934
|
*/
|
|
@@ -29831,33 +29940,33 @@ var ServerCapabilitiesSchema = z83.object({
|
|
|
29831
29940
|
/**
|
|
29832
29941
|
* Present if the server offers any prompt templates.
|
|
29833
29942
|
*/
|
|
29834
|
-
prompts:
|
|
29943
|
+
prompts: z84.object({
|
|
29835
29944
|
/**
|
|
29836
29945
|
* Whether this server supports issuing notifications for changes to the prompt list.
|
|
29837
29946
|
*/
|
|
29838
|
-
listChanged:
|
|
29947
|
+
listChanged: z84.boolean().optional()
|
|
29839
29948
|
}).optional(),
|
|
29840
29949
|
/**
|
|
29841
29950
|
* Present if the server offers any resources to read.
|
|
29842
29951
|
*/
|
|
29843
|
-
resources:
|
|
29952
|
+
resources: z84.object({
|
|
29844
29953
|
/**
|
|
29845
29954
|
* Whether this server supports clients subscribing to resource updates.
|
|
29846
29955
|
*/
|
|
29847
|
-
subscribe:
|
|
29956
|
+
subscribe: z84.boolean().optional(),
|
|
29848
29957
|
/**
|
|
29849
29958
|
* Whether this server supports issuing notifications for changes to the resource list.
|
|
29850
29959
|
*/
|
|
29851
|
-
listChanged:
|
|
29960
|
+
listChanged: z84.boolean().optional()
|
|
29852
29961
|
}).optional(),
|
|
29853
29962
|
/**
|
|
29854
29963
|
* Present if the server offers any tools to call.
|
|
29855
29964
|
*/
|
|
29856
|
-
tools:
|
|
29965
|
+
tools: z84.object({
|
|
29857
29966
|
/**
|
|
29858
29967
|
* Whether this server supports issuing notifications for changes to the tool list.
|
|
29859
29968
|
*/
|
|
29860
|
-
listChanged:
|
|
29969
|
+
listChanged: z84.boolean().optional()
|
|
29861
29970
|
}).optional(),
|
|
29862
29971
|
/**
|
|
29863
29972
|
* Present if the server supports task creation.
|
|
@@ -29866,13 +29975,13 @@ var ServerCapabilitiesSchema = z83.object({
|
|
|
29866
29975
|
/**
|
|
29867
29976
|
* Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
|
|
29868
29977
|
*/
|
|
29869
|
-
extensions:
|
|
29978
|
+
extensions: z84.record(z84.string(), AssertObjectSchema).optional()
|
|
29870
29979
|
});
|
|
29871
29980
|
var InitializeResultSchema = ResultSchema.extend({
|
|
29872
29981
|
/**
|
|
29873
29982
|
* The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.
|
|
29874
29983
|
*/
|
|
29875
|
-
protocolVersion:
|
|
29984
|
+
protocolVersion: z84.string(),
|
|
29876
29985
|
capabilities: ServerCapabilitiesSchema,
|
|
29877
29986
|
serverInfo: ImplementationSchema,
|
|
29878
29987
|
/**
|
|
@@ -29880,32 +29989,32 @@ var InitializeResultSchema = ResultSchema.extend({
|
|
|
29880
29989
|
*
|
|
29881
29990
|
* This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.
|
|
29882
29991
|
*/
|
|
29883
|
-
instructions:
|
|
29992
|
+
instructions: z84.string().optional()
|
|
29884
29993
|
});
|
|
29885
29994
|
var InitializedNotificationSchema = NotificationSchema.extend({
|
|
29886
|
-
method:
|
|
29995
|
+
method: z84.literal("notifications/initialized"),
|
|
29887
29996
|
params: NotificationsParamsSchema.optional()
|
|
29888
29997
|
});
|
|
29889
29998
|
var isInitializedNotification = (value) => InitializedNotificationSchema.safeParse(value).success;
|
|
29890
29999
|
var PingRequestSchema = RequestSchema.extend({
|
|
29891
|
-
method:
|
|
30000
|
+
method: z84.literal("ping"),
|
|
29892
30001
|
params: BaseRequestParamsSchema.optional()
|
|
29893
30002
|
});
|
|
29894
|
-
var ProgressSchema =
|
|
30003
|
+
var ProgressSchema = z84.object({
|
|
29895
30004
|
/**
|
|
29896
30005
|
* The progress thus far. This should increase every time progress is made, even if the total is unknown.
|
|
29897
30006
|
*/
|
|
29898
|
-
progress:
|
|
30007
|
+
progress: z84.number(),
|
|
29899
30008
|
/**
|
|
29900
30009
|
* Total number of items to process (or total progress required), if known.
|
|
29901
30010
|
*/
|
|
29902
|
-
total:
|
|
30011
|
+
total: z84.optional(z84.number()),
|
|
29903
30012
|
/**
|
|
29904
30013
|
* An optional message describing the current progress.
|
|
29905
30014
|
*/
|
|
29906
|
-
message:
|
|
30015
|
+
message: z84.optional(z84.string())
|
|
29907
30016
|
});
|
|
29908
|
-
var ProgressNotificationParamsSchema =
|
|
30017
|
+
var ProgressNotificationParamsSchema = z84.object({
|
|
29909
30018
|
...NotificationsParamsSchema.shape,
|
|
29910
30019
|
...ProgressSchema.shape,
|
|
29911
30020
|
/**
|
|
@@ -29914,7 +30023,7 @@ var ProgressNotificationParamsSchema = z83.object({
|
|
|
29914
30023
|
progressToken: ProgressTokenSchema
|
|
29915
30024
|
});
|
|
29916
30025
|
var ProgressNotificationSchema = NotificationSchema.extend({
|
|
29917
|
-
method:
|
|
30026
|
+
method: z84.literal("notifications/progress"),
|
|
29918
30027
|
params: ProgressNotificationParamsSchema
|
|
29919
30028
|
});
|
|
29920
30029
|
var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
@@ -29934,86 +30043,86 @@ var PaginatedResultSchema = ResultSchema.extend({
|
|
|
29934
30043
|
*/
|
|
29935
30044
|
nextCursor: CursorSchema.optional()
|
|
29936
30045
|
});
|
|
29937
|
-
var TaskStatusSchema2 =
|
|
29938
|
-
var TaskSchema =
|
|
29939
|
-
taskId:
|
|
30046
|
+
var TaskStatusSchema2 = z84.enum(["working", "input_required", "completed", "failed", "cancelled"]);
|
|
30047
|
+
var TaskSchema = z84.object({
|
|
30048
|
+
taskId: z84.string(),
|
|
29940
30049
|
status: TaskStatusSchema2,
|
|
29941
30050
|
/**
|
|
29942
30051
|
* Time in milliseconds to keep task results available after completion.
|
|
29943
30052
|
* If null, the task has unlimited lifetime until manually cleaned up.
|
|
29944
30053
|
*/
|
|
29945
|
-
ttl:
|
|
30054
|
+
ttl: z84.union([z84.number(), z84.null()]),
|
|
29946
30055
|
/**
|
|
29947
30056
|
* ISO 8601 timestamp when the task was created.
|
|
29948
30057
|
*/
|
|
29949
|
-
createdAt:
|
|
30058
|
+
createdAt: z84.string(),
|
|
29950
30059
|
/**
|
|
29951
30060
|
* ISO 8601 timestamp when the task was last updated.
|
|
29952
30061
|
*/
|
|
29953
|
-
lastUpdatedAt:
|
|
29954
|
-
pollInterval:
|
|
30062
|
+
lastUpdatedAt: z84.string(),
|
|
30063
|
+
pollInterval: z84.optional(z84.number()),
|
|
29955
30064
|
/**
|
|
29956
30065
|
* Optional diagnostic message for failed tasks or other status information.
|
|
29957
30066
|
*/
|
|
29958
|
-
statusMessage:
|
|
30067
|
+
statusMessage: z84.optional(z84.string())
|
|
29959
30068
|
});
|
|
29960
30069
|
var CreateTaskResultSchema = ResultSchema.extend({
|
|
29961
30070
|
task: TaskSchema
|
|
29962
30071
|
});
|
|
29963
30072
|
var TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema);
|
|
29964
30073
|
var TaskStatusNotificationSchema = NotificationSchema.extend({
|
|
29965
|
-
method:
|
|
30074
|
+
method: z84.literal("notifications/tasks/status"),
|
|
29966
30075
|
params: TaskStatusNotificationParamsSchema
|
|
29967
30076
|
});
|
|
29968
30077
|
var GetTaskRequestSchema = RequestSchema.extend({
|
|
29969
|
-
method:
|
|
30078
|
+
method: z84.literal("tasks/get"),
|
|
29970
30079
|
params: BaseRequestParamsSchema.extend({
|
|
29971
|
-
taskId:
|
|
30080
|
+
taskId: z84.string()
|
|
29972
30081
|
})
|
|
29973
30082
|
});
|
|
29974
30083
|
var GetTaskResultSchema = ResultSchema.merge(TaskSchema);
|
|
29975
30084
|
var GetTaskPayloadRequestSchema = RequestSchema.extend({
|
|
29976
|
-
method:
|
|
30085
|
+
method: z84.literal("tasks/result"),
|
|
29977
30086
|
params: BaseRequestParamsSchema.extend({
|
|
29978
|
-
taskId:
|
|
30087
|
+
taskId: z84.string()
|
|
29979
30088
|
})
|
|
29980
30089
|
});
|
|
29981
30090
|
var GetTaskPayloadResultSchema = ResultSchema.loose();
|
|
29982
30091
|
var ListTasksRequestSchema = PaginatedRequestSchema.extend({
|
|
29983
|
-
method:
|
|
30092
|
+
method: z84.literal("tasks/list")
|
|
29984
30093
|
});
|
|
29985
30094
|
var ListTasksResultSchema = PaginatedResultSchema.extend({
|
|
29986
|
-
tasks:
|
|
30095
|
+
tasks: z84.array(TaskSchema)
|
|
29987
30096
|
});
|
|
29988
30097
|
var CancelTaskRequestSchema = RequestSchema.extend({
|
|
29989
|
-
method:
|
|
30098
|
+
method: z84.literal("tasks/cancel"),
|
|
29990
30099
|
params: BaseRequestParamsSchema.extend({
|
|
29991
|
-
taskId:
|
|
30100
|
+
taskId: z84.string()
|
|
29992
30101
|
})
|
|
29993
30102
|
});
|
|
29994
30103
|
var CancelTaskResultSchema = ResultSchema.merge(TaskSchema);
|
|
29995
|
-
var ResourceContentsSchema =
|
|
30104
|
+
var ResourceContentsSchema = z84.object({
|
|
29996
30105
|
/**
|
|
29997
30106
|
* The URI of this resource.
|
|
29998
30107
|
*/
|
|
29999
|
-
uri:
|
|
30108
|
+
uri: z84.string(),
|
|
30000
30109
|
/**
|
|
30001
30110
|
* The MIME type of this resource, if known.
|
|
30002
30111
|
*/
|
|
30003
|
-
mimeType:
|
|
30112
|
+
mimeType: z84.optional(z84.string()),
|
|
30004
30113
|
/**
|
|
30005
30114
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30006
30115
|
* for notes on _meta usage.
|
|
30007
30116
|
*/
|
|
30008
|
-
_meta:
|
|
30117
|
+
_meta: z84.record(z84.string(), z84.unknown()).optional()
|
|
30009
30118
|
});
|
|
30010
30119
|
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
30011
30120
|
/**
|
|
30012
30121
|
* The text of the item. This must only be set if the item can actually be represented as text (not binary data).
|
|
30013
30122
|
*/
|
|
30014
|
-
text:
|
|
30123
|
+
text: z84.string()
|
|
30015
30124
|
});
|
|
30016
|
-
var Base64Schema =
|
|
30125
|
+
var Base64Schema = z84.string().refine((val) => {
|
|
30017
30126
|
try {
|
|
30018
30127
|
atob(val);
|
|
30019
30128
|
return true;
|
|
@@ -30027,44 +30136,44 @@ var BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
|
30027
30136
|
*/
|
|
30028
30137
|
blob: Base64Schema
|
|
30029
30138
|
});
|
|
30030
|
-
var RoleSchema =
|
|
30031
|
-
var AnnotationsSchema =
|
|
30139
|
+
var RoleSchema = z84.enum(["user", "assistant"]);
|
|
30140
|
+
var AnnotationsSchema = z84.object({
|
|
30032
30141
|
/**
|
|
30033
30142
|
* Intended audience(s) for the resource.
|
|
30034
30143
|
*/
|
|
30035
|
-
audience:
|
|
30144
|
+
audience: z84.array(RoleSchema).optional(),
|
|
30036
30145
|
/**
|
|
30037
30146
|
* Importance hint for the resource, from 0 (least) to 1 (most).
|
|
30038
30147
|
*/
|
|
30039
|
-
priority:
|
|
30148
|
+
priority: z84.number().min(0).max(1).optional(),
|
|
30040
30149
|
/**
|
|
30041
30150
|
* ISO 8601 timestamp for the most recent modification.
|
|
30042
30151
|
*/
|
|
30043
|
-
lastModified:
|
|
30152
|
+
lastModified: z84.iso.datetime({ offset: true }).optional()
|
|
30044
30153
|
});
|
|
30045
|
-
var ResourceSchema =
|
|
30154
|
+
var ResourceSchema = z84.object({
|
|
30046
30155
|
...BaseMetadataSchema.shape,
|
|
30047
30156
|
...IconsSchema.shape,
|
|
30048
30157
|
/**
|
|
30049
30158
|
* The URI of this resource.
|
|
30050
30159
|
*/
|
|
30051
|
-
uri:
|
|
30160
|
+
uri: z84.string(),
|
|
30052
30161
|
/**
|
|
30053
30162
|
* A description of what this resource represents.
|
|
30054
30163
|
*
|
|
30055
30164
|
* This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
|
|
30056
30165
|
*/
|
|
30057
|
-
description:
|
|
30166
|
+
description: z84.optional(z84.string()),
|
|
30058
30167
|
/**
|
|
30059
30168
|
* The MIME type of this resource, if known.
|
|
30060
30169
|
*/
|
|
30061
|
-
mimeType:
|
|
30170
|
+
mimeType: z84.optional(z84.string()),
|
|
30062
30171
|
/**
|
|
30063
30172
|
* The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
|
|
30064
30173
|
*
|
|
30065
30174
|
* This can be used by Hosts to display file sizes and estimate context window usage.
|
|
30066
30175
|
*/
|
|
30067
|
-
size:
|
|
30176
|
+
size: z84.optional(z84.number()),
|
|
30068
30177
|
/**
|
|
30069
30178
|
* Optional annotations for the client.
|
|
30070
30179
|
*/
|
|
@@ -30073,25 +30182,25 @@ var ResourceSchema = z83.object({
|
|
|
30073
30182
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30074
30183
|
* for notes on _meta usage.
|
|
30075
30184
|
*/
|
|
30076
|
-
_meta:
|
|
30185
|
+
_meta: z84.optional(z84.looseObject({}))
|
|
30077
30186
|
});
|
|
30078
|
-
var ResourceTemplateSchema =
|
|
30187
|
+
var ResourceTemplateSchema = z84.object({
|
|
30079
30188
|
...BaseMetadataSchema.shape,
|
|
30080
30189
|
...IconsSchema.shape,
|
|
30081
30190
|
/**
|
|
30082
30191
|
* A URI template (according to RFC 6570) that can be used to construct resource URIs.
|
|
30083
30192
|
*/
|
|
30084
|
-
uriTemplate:
|
|
30193
|
+
uriTemplate: z84.string(),
|
|
30085
30194
|
/**
|
|
30086
30195
|
* A description of what this template is for.
|
|
30087
30196
|
*
|
|
30088
30197
|
* This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
|
|
30089
30198
|
*/
|
|
30090
|
-
description:
|
|
30199
|
+
description: z84.optional(z84.string()),
|
|
30091
30200
|
/**
|
|
30092
30201
|
* The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
|
|
30093
30202
|
*/
|
|
30094
|
-
mimeType:
|
|
30203
|
+
mimeType: z84.optional(z84.string()),
|
|
30095
30204
|
/**
|
|
30096
30205
|
* Optional annotations for the client.
|
|
30097
30206
|
*/
|
|
@@ -30100,19 +30209,19 @@ var ResourceTemplateSchema = z83.object({
|
|
|
30100
30209
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30101
30210
|
* for notes on _meta usage.
|
|
30102
30211
|
*/
|
|
30103
|
-
_meta:
|
|
30212
|
+
_meta: z84.optional(z84.looseObject({}))
|
|
30104
30213
|
});
|
|
30105
30214
|
var ListResourcesRequestSchema = PaginatedRequestSchema.extend({
|
|
30106
|
-
method:
|
|
30215
|
+
method: z84.literal("resources/list")
|
|
30107
30216
|
});
|
|
30108
30217
|
var ListResourcesResultSchema = PaginatedResultSchema.extend({
|
|
30109
|
-
resources:
|
|
30218
|
+
resources: z84.array(ResourceSchema)
|
|
30110
30219
|
});
|
|
30111
30220
|
var ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
|
|
30112
|
-
method:
|
|
30221
|
+
method: z84.literal("resources/templates/list")
|
|
30113
30222
|
});
|
|
30114
30223
|
var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
|
|
30115
|
-
resourceTemplates:
|
|
30224
|
+
resourceTemplates: z84.array(ResourceTemplateSchema)
|
|
30116
30225
|
});
|
|
30117
30226
|
var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
30118
30227
|
/**
|
|
@@ -30120,97 +30229,97 @@ var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
|
30120
30229
|
*
|
|
30121
30230
|
* @format uri
|
|
30122
30231
|
*/
|
|
30123
|
-
uri:
|
|
30232
|
+
uri: z84.string()
|
|
30124
30233
|
});
|
|
30125
30234
|
var ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
|
|
30126
30235
|
var ReadResourceRequestSchema = RequestSchema.extend({
|
|
30127
|
-
method:
|
|
30236
|
+
method: z84.literal("resources/read"),
|
|
30128
30237
|
params: ReadResourceRequestParamsSchema
|
|
30129
30238
|
});
|
|
30130
30239
|
var ReadResourceResultSchema = ResultSchema.extend({
|
|
30131
|
-
contents:
|
|
30240
|
+
contents: z84.array(z84.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
|
|
30132
30241
|
});
|
|
30133
30242
|
var ResourceListChangedNotificationSchema = NotificationSchema.extend({
|
|
30134
|
-
method:
|
|
30243
|
+
method: z84.literal("notifications/resources/list_changed"),
|
|
30135
30244
|
params: NotificationsParamsSchema.optional()
|
|
30136
30245
|
});
|
|
30137
30246
|
var SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
30138
30247
|
var SubscribeRequestSchema = RequestSchema.extend({
|
|
30139
|
-
method:
|
|
30248
|
+
method: z84.literal("resources/subscribe"),
|
|
30140
30249
|
params: SubscribeRequestParamsSchema
|
|
30141
30250
|
});
|
|
30142
30251
|
var UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
30143
30252
|
var UnsubscribeRequestSchema = RequestSchema.extend({
|
|
30144
|
-
method:
|
|
30253
|
+
method: z84.literal("resources/unsubscribe"),
|
|
30145
30254
|
params: UnsubscribeRequestParamsSchema
|
|
30146
30255
|
});
|
|
30147
30256
|
var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
30148
30257
|
/**
|
|
30149
30258
|
* The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
|
|
30150
30259
|
*/
|
|
30151
|
-
uri:
|
|
30260
|
+
uri: z84.string()
|
|
30152
30261
|
});
|
|
30153
30262
|
var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
30154
|
-
method:
|
|
30263
|
+
method: z84.literal("notifications/resources/updated"),
|
|
30155
30264
|
params: ResourceUpdatedNotificationParamsSchema
|
|
30156
30265
|
});
|
|
30157
|
-
var PromptArgumentSchema =
|
|
30266
|
+
var PromptArgumentSchema = z84.object({
|
|
30158
30267
|
/**
|
|
30159
30268
|
* The name of the argument.
|
|
30160
30269
|
*/
|
|
30161
|
-
name:
|
|
30270
|
+
name: z84.string(),
|
|
30162
30271
|
/**
|
|
30163
30272
|
* A human-readable description of the argument.
|
|
30164
30273
|
*/
|
|
30165
|
-
description:
|
|
30274
|
+
description: z84.optional(z84.string()),
|
|
30166
30275
|
/**
|
|
30167
30276
|
* Whether this argument must be provided.
|
|
30168
30277
|
*/
|
|
30169
|
-
required:
|
|
30278
|
+
required: z84.optional(z84.boolean())
|
|
30170
30279
|
});
|
|
30171
|
-
var PromptSchema =
|
|
30280
|
+
var PromptSchema = z84.object({
|
|
30172
30281
|
...BaseMetadataSchema.shape,
|
|
30173
30282
|
...IconsSchema.shape,
|
|
30174
30283
|
/**
|
|
30175
30284
|
* An optional description of what this prompt provides
|
|
30176
30285
|
*/
|
|
30177
|
-
description:
|
|
30286
|
+
description: z84.optional(z84.string()),
|
|
30178
30287
|
/**
|
|
30179
30288
|
* A list of arguments to use for templating the prompt.
|
|
30180
30289
|
*/
|
|
30181
|
-
arguments:
|
|
30290
|
+
arguments: z84.optional(z84.array(PromptArgumentSchema)),
|
|
30182
30291
|
/**
|
|
30183
30292
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30184
30293
|
* for notes on _meta usage.
|
|
30185
30294
|
*/
|
|
30186
|
-
_meta:
|
|
30295
|
+
_meta: z84.optional(z84.looseObject({}))
|
|
30187
30296
|
});
|
|
30188
30297
|
var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
30189
|
-
method:
|
|
30298
|
+
method: z84.literal("prompts/list")
|
|
30190
30299
|
});
|
|
30191
30300
|
var ListPromptsResultSchema = PaginatedResultSchema.extend({
|
|
30192
|
-
prompts:
|
|
30301
|
+
prompts: z84.array(PromptSchema)
|
|
30193
30302
|
});
|
|
30194
30303
|
var GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
30195
30304
|
/**
|
|
30196
30305
|
* The name of the prompt or prompt template.
|
|
30197
30306
|
*/
|
|
30198
|
-
name:
|
|
30307
|
+
name: z84.string(),
|
|
30199
30308
|
/**
|
|
30200
30309
|
* Arguments to use for templating the prompt.
|
|
30201
30310
|
*/
|
|
30202
|
-
arguments:
|
|
30311
|
+
arguments: z84.record(z84.string(), z84.string()).optional()
|
|
30203
30312
|
});
|
|
30204
30313
|
var GetPromptRequestSchema = RequestSchema.extend({
|
|
30205
|
-
method:
|
|
30314
|
+
method: z84.literal("prompts/get"),
|
|
30206
30315
|
params: GetPromptRequestParamsSchema
|
|
30207
30316
|
});
|
|
30208
|
-
var TextContentSchema =
|
|
30209
|
-
type:
|
|
30317
|
+
var TextContentSchema = z84.object({
|
|
30318
|
+
type: z84.literal("text"),
|
|
30210
30319
|
/**
|
|
30211
30320
|
* The text content of the message.
|
|
30212
30321
|
*/
|
|
30213
|
-
text:
|
|
30322
|
+
text: z84.string(),
|
|
30214
30323
|
/**
|
|
30215
30324
|
* Optional annotations for the client.
|
|
30216
30325
|
*/
|
|
@@ -30219,10 +30328,10 @@ var TextContentSchema = z83.object({
|
|
|
30219
30328
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30220
30329
|
* for notes on _meta usage.
|
|
30221
30330
|
*/
|
|
30222
|
-
_meta:
|
|
30331
|
+
_meta: z84.record(z84.string(), z84.unknown()).optional()
|
|
30223
30332
|
});
|
|
30224
|
-
var ImageContentSchema =
|
|
30225
|
-
type:
|
|
30333
|
+
var ImageContentSchema = z84.object({
|
|
30334
|
+
type: z84.literal("image"),
|
|
30226
30335
|
/**
|
|
30227
30336
|
* The base64-encoded image data.
|
|
30228
30337
|
*/
|
|
@@ -30230,7 +30339,7 @@ var ImageContentSchema = z83.object({
|
|
|
30230
30339
|
/**
|
|
30231
30340
|
* The MIME type of the image. Different providers may support different image types.
|
|
30232
30341
|
*/
|
|
30233
|
-
mimeType:
|
|
30342
|
+
mimeType: z84.string(),
|
|
30234
30343
|
/**
|
|
30235
30344
|
* Optional annotations for the client.
|
|
30236
30345
|
*/
|
|
@@ -30239,10 +30348,10 @@ var ImageContentSchema = z83.object({
|
|
|
30239
30348
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30240
30349
|
* for notes on _meta usage.
|
|
30241
30350
|
*/
|
|
30242
|
-
_meta:
|
|
30351
|
+
_meta: z84.record(z84.string(), z84.unknown()).optional()
|
|
30243
30352
|
});
|
|
30244
|
-
var AudioContentSchema =
|
|
30245
|
-
type:
|
|
30353
|
+
var AudioContentSchema = z84.object({
|
|
30354
|
+
type: z84.literal("audio"),
|
|
30246
30355
|
/**
|
|
30247
30356
|
* The base64-encoded audio data.
|
|
30248
30357
|
*/
|
|
@@ -30250,7 +30359,7 @@ var AudioContentSchema = z83.object({
|
|
|
30250
30359
|
/**
|
|
30251
30360
|
* The MIME type of the audio. Different providers may support different audio types.
|
|
30252
30361
|
*/
|
|
30253
|
-
mimeType:
|
|
30362
|
+
mimeType: z84.string(),
|
|
30254
30363
|
/**
|
|
30255
30364
|
* Optional annotations for the client.
|
|
30256
30365
|
*/
|
|
@@ -30259,34 +30368,34 @@ var AudioContentSchema = z83.object({
|
|
|
30259
30368
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30260
30369
|
* for notes on _meta usage.
|
|
30261
30370
|
*/
|
|
30262
|
-
_meta:
|
|
30371
|
+
_meta: z84.record(z84.string(), z84.unknown()).optional()
|
|
30263
30372
|
});
|
|
30264
|
-
var ToolUseContentSchema =
|
|
30265
|
-
type:
|
|
30373
|
+
var ToolUseContentSchema = z84.object({
|
|
30374
|
+
type: z84.literal("tool_use"),
|
|
30266
30375
|
/**
|
|
30267
30376
|
* The name of the tool to invoke.
|
|
30268
30377
|
* Must match a tool name from the request's tools array.
|
|
30269
30378
|
*/
|
|
30270
|
-
name:
|
|
30379
|
+
name: z84.string(),
|
|
30271
30380
|
/**
|
|
30272
30381
|
* Unique identifier for this tool call.
|
|
30273
30382
|
* Used to correlate with ToolResultContent in subsequent messages.
|
|
30274
30383
|
*/
|
|
30275
|
-
id:
|
|
30384
|
+
id: z84.string(),
|
|
30276
30385
|
/**
|
|
30277
30386
|
* Arguments to pass to the tool.
|
|
30278
30387
|
* Must conform to the tool's inputSchema.
|
|
30279
30388
|
*/
|
|
30280
|
-
input:
|
|
30389
|
+
input: z84.record(z84.string(), z84.unknown()),
|
|
30281
30390
|
/**
|
|
30282
30391
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30283
30392
|
* for notes on _meta usage.
|
|
30284
30393
|
*/
|
|
30285
|
-
_meta:
|
|
30394
|
+
_meta: z84.record(z84.string(), z84.unknown()).optional()
|
|
30286
30395
|
});
|
|
30287
|
-
var EmbeddedResourceSchema =
|
|
30288
|
-
type:
|
|
30289
|
-
resource:
|
|
30396
|
+
var EmbeddedResourceSchema = z84.object({
|
|
30397
|
+
type: z84.literal("resource"),
|
|
30398
|
+
resource: z84.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
30290
30399
|
/**
|
|
30291
30400
|
* Optional annotations for the client.
|
|
30292
30401
|
*/
|
|
@@ -30295,19 +30404,19 @@ var EmbeddedResourceSchema = z83.object({
|
|
|
30295
30404
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30296
30405
|
* for notes on _meta usage.
|
|
30297
30406
|
*/
|
|
30298
|
-
_meta:
|
|
30407
|
+
_meta: z84.record(z84.string(), z84.unknown()).optional()
|
|
30299
30408
|
});
|
|
30300
30409
|
var ResourceLinkSchema = ResourceSchema.extend({
|
|
30301
|
-
type:
|
|
30410
|
+
type: z84.literal("resource_link")
|
|
30302
30411
|
});
|
|
30303
|
-
var ContentBlockSchema =
|
|
30412
|
+
var ContentBlockSchema = z84.union([
|
|
30304
30413
|
TextContentSchema,
|
|
30305
30414
|
ImageContentSchema,
|
|
30306
30415
|
AudioContentSchema,
|
|
30307
30416
|
ResourceLinkSchema,
|
|
30308
30417
|
EmbeddedResourceSchema
|
|
30309
30418
|
]);
|
|
30310
|
-
var PromptMessageSchema =
|
|
30419
|
+
var PromptMessageSchema = z84.object({
|
|
30311
30420
|
role: RoleSchema,
|
|
30312
30421
|
content: ContentBlockSchema
|
|
30313
30422
|
});
|
|
@@ -30315,24 +30424,24 @@ var GetPromptResultSchema = ResultSchema.extend({
|
|
|
30315
30424
|
/**
|
|
30316
30425
|
* An optional description for the prompt.
|
|
30317
30426
|
*/
|
|
30318
|
-
description:
|
|
30319
|
-
messages:
|
|
30427
|
+
description: z84.string().optional(),
|
|
30428
|
+
messages: z84.array(PromptMessageSchema)
|
|
30320
30429
|
});
|
|
30321
30430
|
var PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|
30322
|
-
method:
|
|
30431
|
+
method: z84.literal("notifications/prompts/list_changed"),
|
|
30323
30432
|
params: NotificationsParamsSchema.optional()
|
|
30324
30433
|
});
|
|
30325
|
-
var ToolAnnotationsSchema =
|
|
30434
|
+
var ToolAnnotationsSchema = z84.object({
|
|
30326
30435
|
/**
|
|
30327
30436
|
* A human-readable title for the tool.
|
|
30328
30437
|
*/
|
|
30329
|
-
title:
|
|
30438
|
+
title: z84.string().optional(),
|
|
30330
30439
|
/**
|
|
30331
30440
|
* If true, the tool does not modify its environment.
|
|
30332
30441
|
*
|
|
30333
30442
|
* Default: false
|
|
30334
30443
|
*/
|
|
30335
|
-
readOnlyHint:
|
|
30444
|
+
readOnlyHint: z84.boolean().optional(),
|
|
30336
30445
|
/**
|
|
30337
30446
|
* If true, the tool may perform destructive updates to its environment.
|
|
30338
30447
|
* If false, the tool performs only additive updates.
|
|
@@ -30341,7 +30450,7 @@ var ToolAnnotationsSchema = z83.object({
|
|
|
30341
30450
|
*
|
|
30342
30451
|
* Default: true
|
|
30343
30452
|
*/
|
|
30344
|
-
destructiveHint:
|
|
30453
|
+
destructiveHint: z84.boolean().optional(),
|
|
30345
30454
|
/**
|
|
30346
30455
|
* If true, calling the tool repeatedly with the same arguments
|
|
30347
30456
|
* will have no additional effect on the its environment.
|
|
@@ -30350,7 +30459,7 @@ var ToolAnnotationsSchema = z83.object({
|
|
|
30350
30459
|
*
|
|
30351
30460
|
* Default: false
|
|
30352
30461
|
*/
|
|
30353
|
-
idempotentHint:
|
|
30462
|
+
idempotentHint: z84.boolean().optional(),
|
|
30354
30463
|
/**
|
|
30355
30464
|
* If true, this tool may interact with an "open world" of external
|
|
30356
30465
|
* entities. If false, the tool's domain of interaction is closed.
|
|
@@ -30359,9 +30468,9 @@ var ToolAnnotationsSchema = z83.object({
|
|
|
30359
30468
|
*
|
|
30360
30469
|
* Default: true
|
|
30361
30470
|
*/
|
|
30362
|
-
openWorldHint:
|
|
30471
|
+
openWorldHint: z84.boolean().optional()
|
|
30363
30472
|
});
|
|
30364
|
-
var ToolExecutionSchema =
|
|
30473
|
+
var ToolExecutionSchema = z84.object({
|
|
30365
30474
|
/**
|
|
30366
30475
|
* Indicates the tool's preference for task-augmented execution.
|
|
30367
30476
|
* - "required": Clients MUST invoke the tool as a task
|
|
@@ -30370,34 +30479,34 @@ var ToolExecutionSchema = z83.object({
|
|
|
30370
30479
|
*
|
|
30371
30480
|
* If not present, defaults to "forbidden".
|
|
30372
30481
|
*/
|
|
30373
|
-
taskSupport:
|
|
30482
|
+
taskSupport: z84.enum(["required", "optional", "forbidden"]).optional()
|
|
30374
30483
|
});
|
|
30375
|
-
var ToolSchema =
|
|
30484
|
+
var ToolSchema = z84.object({
|
|
30376
30485
|
...BaseMetadataSchema.shape,
|
|
30377
30486
|
...IconsSchema.shape,
|
|
30378
30487
|
/**
|
|
30379
30488
|
* A human-readable description of the tool.
|
|
30380
30489
|
*/
|
|
30381
|
-
description:
|
|
30490
|
+
description: z84.string().optional(),
|
|
30382
30491
|
/**
|
|
30383
30492
|
* A JSON Schema 2020-12 object defining the expected parameters for the tool.
|
|
30384
30493
|
* Must have type: 'object' at the root level per MCP spec.
|
|
30385
30494
|
*/
|
|
30386
|
-
inputSchema:
|
|
30387
|
-
type:
|
|
30388
|
-
properties:
|
|
30389
|
-
required:
|
|
30390
|
-
}).catchall(
|
|
30495
|
+
inputSchema: z84.object({
|
|
30496
|
+
type: z84.literal("object"),
|
|
30497
|
+
properties: z84.record(z84.string(), AssertObjectSchema).optional(),
|
|
30498
|
+
required: z84.array(z84.string()).optional()
|
|
30499
|
+
}).catchall(z84.unknown()),
|
|
30391
30500
|
/**
|
|
30392
30501
|
* An optional JSON Schema 2020-12 object defining the structure of the tool's output
|
|
30393
30502
|
* returned in the structuredContent field of a CallToolResult.
|
|
30394
30503
|
* Must have type: 'object' at the root level per MCP spec.
|
|
30395
30504
|
*/
|
|
30396
|
-
outputSchema:
|
|
30397
|
-
type:
|
|
30398
|
-
properties:
|
|
30399
|
-
required:
|
|
30400
|
-
}).catchall(
|
|
30505
|
+
outputSchema: z84.object({
|
|
30506
|
+
type: z84.literal("object"),
|
|
30507
|
+
properties: z84.record(z84.string(), AssertObjectSchema).optional(),
|
|
30508
|
+
required: z84.array(z84.string()).optional()
|
|
30509
|
+
}).catchall(z84.unknown()).optional(),
|
|
30401
30510
|
/**
|
|
30402
30511
|
* Optional additional tool information.
|
|
30403
30512
|
*/
|
|
@@ -30410,13 +30519,13 @@ var ToolSchema = z83.object({
|
|
|
30410
30519
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30411
30520
|
* for notes on _meta usage.
|
|
30412
30521
|
*/
|
|
30413
|
-
_meta:
|
|
30522
|
+
_meta: z84.record(z84.string(), z84.unknown()).optional()
|
|
30414
30523
|
});
|
|
30415
30524
|
var ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
30416
|
-
method:
|
|
30525
|
+
method: z84.literal("tools/list")
|
|
30417
30526
|
});
|
|
30418
30527
|
var ListToolsResultSchema = PaginatedResultSchema.extend({
|
|
30419
|
-
tools:
|
|
30528
|
+
tools: z84.array(ToolSchema)
|
|
30420
30529
|
});
|
|
30421
30530
|
var CallToolResultSchema = ResultSchema.extend({
|
|
30422
30531
|
/**
|
|
@@ -30425,13 +30534,13 @@ var CallToolResultSchema = ResultSchema.extend({
|
|
|
30425
30534
|
* If the Tool does not define an outputSchema, this field MUST be present in the result.
|
|
30426
30535
|
* For backwards compatibility, this field is always present, but it may be empty.
|
|
30427
30536
|
*/
|
|
30428
|
-
content:
|
|
30537
|
+
content: z84.array(ContentBlockSchema).default([]),
|
|
30429
30538
|
/**
|
|
30430
30539
|
* An object containing structured tool output.
|
|
30431
30540
|
*
|
|
30432
30541
|
* If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
|
|
30433
30542
|
*/
|
|
30434
|
-
structuredContent:
|
|
30543
|
+
structuredContent: z84.record(z84.string(), z84.unknown()).optional(),
|
|
30435
30544
|
/**
|
|
30436
30545
|
* Whether the tool call ended in an error.
|
|
30437
30546
|
*
|
|
@@ -30446,30 +30555,30 @@ var CallToolResultSchema = ResultSchema.extend({
|
|
|
30446
30555
|
* server does not support tool calls, or any other exceptional conditions,
|
|
30447
30556
|
* should be reported as an MCP error response.
|
|
30448
30557
|
*/
|
|
30449
|
-
isError:
|
|
30558
|
+
isError: z84.boolean().optional()
|
|
30450
30559
|
});
|
|
30451
30560
|
var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
|
|
30452
|
-
toolResult:
|
|
30561
|
+
toolResult: z84.unknown()
|
|
30453
30562
|
}));
|
|
30454
30563
|
var CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
30455
30564
|
/**
|
|
30456
30565
|
* The name of the tool to call.
|
|
30457
30566
|
*/
|
|
30458
|
-
name:
|
|
30567
|
+
name: z84.string(),
|
|
30459
30568
|
/**
|
|
30460
30569
|
* Arguments to pass to the tool.
|
|
30461
30570
|
*/
|
|
30462
|
-
arguments:
|
|
30571
|
+
arguments: z84.record(z84.string(), z84.unknown()).optional()
|
|
30463
30572
|
});
|
|
30464
30573
|
var CallToolRequestSchema = RequestSchema.extend({
|
|
30465
|
-
method:
|
|
30574
|
+
method: z84.literal("tools/call"),
|
|
30466
30575
|
params: CallToolRequestParamsSchema
|
|
30467
30576
|
});
|
|
30468
30577
|
var ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
30469
|
-
method:
|
|
30578
|
+
method: z84.literal("notifications/tools/list_changed"),
|
|
30470
30579
|
params: NotificationsParamsSchema.optional()
|
|
30471
30580
|
});
|
|
30472
|
-
var ListChangedOptionsBaseSchema =
|
|
30581
|
+
var ListChangedOptionsBaseSchema = z84.object({
|
|
30473
30582
|
/**
|
|
30474
30583
|
* If true, the list will be refreshed automatically when a list changed notification is received.
|
|
30475
30584
|
* The callback will be called with the updated list.
|
|
@@ -30478,7 +30587,7 @@ var ListChangedOptionsBaseSchema = z83.object({
|
|
|
30478
30587
|
*
|
|
30479
30588
|
* @default true
|
|
30480
30589
|
*/
|
|
30481
|
-
autoRefresh:
|
|
30590
|
+
autoRefresh: z84.boolean().default(true),
|
|
30482
30591
|
/**
|
|
30483
30592
|
* Debounce time in milliseconds for list changed notification processing.
|
|
30484
30593
|
*
|
|
@@ -30487,9 +30596,9 @@ var ListChangedOptionsBaseSchema = z83.object({
|
|
|
30487
30596
|
*
|
|
30488
30597
|
* @default 300
|
|
30489
30598
|
*/
|
|
30490
|
-
debounceMs:
|
|
30599
|
+
debounceMs: z84.number().int().nonnegative().default(300)
|
|
30491
30600
|
});
|
|
30492
|
-
var LoggingLevelSchema =
|
|
30601
|
+
var LoggingLevelSchema = z84.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
|
|
30493
30602
|
var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
30494
30603
|
/**
|
|
30495
30604
|
* The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message.
|
|
@@ -30497,7 +30606,7 @@ var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
|
30497
30606
|
level: LoggingLevelSchema
|
|
30498
30607
|
});
|
|
30499
30608
|
var SetLevelRequestSchema = RequestSchema.extend({
|
|
30500
|
-
method:
|
|
30609
|
+
method: z84.literal("logging/setLevel"),
|
|
30501
30610
|
params: SetLevelRequestParamsSchema
|
|
30502
30611
|
});
|
|
30503
30612
|
var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
@@ -30508,80 +30617,80 @@ var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
|
30508
30617
|
/**
|
|
30509
30618
|
* An optional name of the logger issuing this message.
|
|
30510
30619
|
*/
|
|
30511
|
-
logger:
|
|
30620
|
+
logger: z84.string().optional(),
|
|
30512
30621
|
/**
|
|
30513
30622
|
* The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
|
|
30514
30623
|
*/
|
|
30515
|
-
data:
|
|
30624
|
+
data: z84.unknown()
|
|
30516
30625
|
});
|
|
30517
30626
|
var LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
30518
|
-
method:
|
|
30627
|
+
method: z84.literal("notifications/message"),
|
|
30519
30628
|
params: LoggingMessageNotificationParamsSchema
|
|
30520
30629
|
});
|
|
30521
|
-
var ModelHintSchema =
|
|
30630
|
+
var ModelHintSchema = z84.object({
|
|
30522
30631
|
/**
|
|
30523
30632
|
* A hint for a model name.
|
|
30524
30633
|
*/
|
|
30525
|
-
name:
|
|
30634
|
+
name: z84.string().optional()
|
|
30526
30635
|
});
|
|
30527
|
-
var ModelPreferencesSchema =
|
|
30636
|
+
var ModelPreferencesSchema = z84.object({
|
|
30528
30637
|
/**
|
|
30529
30638
|
* Optional hints to use for model selection.
|
|
30530
30639
|
*/
|
|
30531
|
-
hints:
|
|
30640
|
+
hints: z84.array(ModelHintSchema).optional(),
|
|
30532
30641
|
/**
|
|
30533
30642
|
* How much to prioritize cost when selecting a model.
|
|
30534
30643
|
*/
|
|
30535
|
-
costPriority:
|
|
30644
|
+
costPriority: z84.number().min(0).max(1).optional(),
|
|
30536
30645
|
/**
|
|
30537
30646
|
* How much to prioritize sampling speed (latency) when selecting a model.
|
|
30538
30647
|
*/
|
|
30539
|
-
speedPriority:
|
|
30648
|
+
speedPriority: z84.number().min(0).max(1).optional(),
|
|
30540
30649
|
/**
|
|
30541
30650
|
* How much to prioritize intelligence and capabilities when selecting a model.
|
|
30542
30651
|
*/
|
|
30543
|
-
intelligencePriority:
|
|
30652
|
+
intelligencePriority: z84.number().min(0).max(1).optional()
|
|
30544
30653
|
});
|
|
30545
|
-
var ToolChoiceSchema =
|
|
30654
|
+
var ToolChoiceSchema = z84.object({
|
|
30546
30655
|
/**
|
|
30547
30656
|
* Controls when tools are used:
|
|
30548
30657
|
* - "auto": Model decides whether to use tools (default)
|
|
30549
30658
|
* - "required": Model MUST use at least one tool before completing
|
|
30550
30659
|
* - "none": Model MUST NOT use any tools
|
|
30551
30660
|
*/
|
|
30552
|
-
mode:
|
|
30553
|
-
});
|
|
30554
|
-
var ToolResultContentSchema =
|
|
30555
|
-
type:
|
|
30556
|
-
toolUseId:
|
|
30557
|
-
content:
|
|
30558
|
-
structuredContent:
|
|
30559
|
-
isError:
|
|
30661
|
+
mode: z84.enum(["auto", "required", "none"]).optional()
|
|
30662
|
+
});
|
|
30663
|
+
var ToolResultContentSchema = z84.object({
|
|
30664
|
+
type: z84.literal("tool_result"),
|
|
30665
|
+
toolUseId: z84.string().describe("The unique identifier for the corresponding tool call."),
|
|
30666
|
+
content: z84.array(ContentBlockSchema).default([]),
|
|
30667
|
+
structuredContent: z84.object({}).loose().optional(),
|
|
30668
|
+
isError: z84.boolean().optional(),
|
|
30560
30669
|
/**
|
|
30561
30670
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30562
30671
|
* for notes on _meta usage.
|
|
30563
30672
|
*/
|
|
30564
|
-
_meta:
|
|
30673
|
+
_meta: z84.record(z84.string(), z84.unknown()).optional()
|
|
30565
30674
|
});
|
|
30566
|
-
var SamplingContentSchema =
|
|
30567
|
-
var SamplingMessageContentBlockSchema =
|
|
30675
|
+
var SamplingContentSchema = z84.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]);
|
|
30676
|
+
var SamplingMessageContentBlockSchema = z84.discriminatedUnion("type", [
|
|
30568
30677
|
TextContentSchema,
|
|
30569
30678
|
ImageContentSchema,
|
|
30570
30679
|
AudioContentSchema,
|
|
30571
30680
|
ToolUseContentSchema,
|
|
30572
30681
|
ToolResultContentSchema
|
|
30573
30682
|
]);
|
|
30574
|
-
var SamplingMessageSchema =
|
|
30683
|
+
var SamplingMessageSchema = z84.object({
|
|
30575
30684
|
role: RoleSchema,
|
|
30576
|
-
content:
|
|
30685
|
+
content: z84.union([SamplingMessageContentBlockSchema, z84.array(SamplingMessageContentBlockSchema)]),
|
|
30577
30686
|
/**
|
|
30578
30687
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30579
30688
|
* for notes on _meta usage.
|
|
30580
30689
|
*/
|
|
30581
|
-
_meta:
|
|
30690
|
+
_meta: z84.record(z84.string(), z84.unknown()).optional()
|
|
30582
30691
|
});
|
|
30583
30692
|
var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
30584
|
-
messages:
|
|
30693
|
+
messages: z84.array(SamplingMessageSchema),
|
|
30585
30694
|
/**
|
|
30586
30695
|
* The server's preferences for which model to select. The client MAY modify or omit this request.
|
|
30587
30696
|
*/
|
|
@@ -30589,7 +30698,7 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
30589
30698
|
/**
|
|
30590
30699
|
* An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
|
|
30591
30700
|
*/
|
|
30592
|
-
systemPrompt:
|
|
30701
|
+
systemPrompt: z84.string().optional(),
|
|
30593
30702
|
/**
|
|
30594
30703
|
* A request to include context from one or more MCP servers (including the caller), to be attached to the prompt.
|
|
30595
30704
|
* The client MAY ignore this request.
|
|
@@ -30597,15 +30706,15 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
30597
30706
|
* Default is "none". Values "thisServer" and "allServers" are soft-deprecated. Servers SHOULD only use these values if the client
|
|
30598
30707
|
* declares ClientCapabilities.sampling.context. These values may be removed in future spec releases.
|
|
30599
30708
|
*/
|
|
30600
|
-
includeContext:
|
|
30601
|
-
temperature:
|
|
30709
|
+
includeContext: z84.enum(["none", "thisServer", "allServers"]).optional(),
|
|
30710
|
+
temperature: z84.number().optional(),
|
|
30602
30711
|
/**
|
|
30603
30712
|
* The requested maximum number of tokens to sample (to prevent runaway completions).
|
|
30604
30713
|
*
|
|
30605
30714
|
* The client MAY choose to sample fewer tokens than the requested maximum.
|
|
30606
30715
|
*/
|
|
30607
|
-
maxTokens:
|
|
30608
|
-
stopSequences:
|
|
30716
|
+
maxTokens: z84.number().int(),
|
|
30717
|
+
stopSequences: z84.array(z84.string()).optional(),
|
|
30609
30718
|
/**
|
|
30610
30719
|
* Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
|
|
30611
30720
|
*/
|
|
@@ -30614,7 +30723,7 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
30614
30723
|
* Tools that the model may use during generation.
|
|
30615
30724
|
* The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
|
|
30616
30725
|
*/
|
|
30617
|
-
tools:
|
|
30726
|
+
tools: z84.array(ToolSchema).optional(),
|
|
30618
30727
|
/**
|
|
30619
30728
|
* Controls how the model uses tools.
|
|
30620
30729
|
* The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
|
|
@@ -30623,14 +30732,14 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
|
30623
30732
|
toolChoice: ToolChoiceSchema.optional()
|
|
30624
30733
|
});
|
|
30625
30734
|
var CreateMessageRequestSchema = RequestSchema.extend({
|
|
30626
|
-
method:
|
|
30735
|
+
method: z84.literal("sampling/createMessage"),
|
|
30627
30736
|
params: CreateMessageRequestParamsSchema
|
|
30628
30737
|
});
|
|
30629
30738
|
var CreateMessageResultSchema = ResultSchema.extend({
|
|
30630
30739
|
/**
|
|
30631
30740
|
* The name of the model that generated the message.
|
|
30632
30741
|
*/
|
|
30633
|
-
model:
|
|
30742
|
+
model: z84.string(),
|
|
30634
30743
|
/**
|
|
30635
30744
|
* The reason why sampling stopped, if known.
|
|
30636
30745
|
*
|
|
@@ -30641,7 +30750,7 @@ var CreateMessageResultSchema = ResultSchema.extend({
|
|
|
30641
30750
|
*
|
|
30642
30751
|
* This field is an open string to allow for provider-specific stop reasons.
|
|
30643
30752
|
*/
|
|
30644
|
-
stopReason:
|
|
30753
|
+
stopReason: z84.optional(z84.enum(["endTurn", "stopSequence", "maxTokens"]).or(z84.string())),
|
|
30645
30754
|
role: RoleSchema,
|
|
30646
30755
|
/**
|
|
30647
30756
|
* Response content. Single content block (text, image, or audio).
|
|
@@ -30652,7 +30761,7 @@ var CreateMessageResultWithToolsSchema = ResultSchema.extend({
|
|
|
30652
30761
|
/**
|
|
30653
30762
|
* The name of the model that generated the message.
|
|
30654
30763
|
*/
|
|
30655
|
-
model:
|
|
30764
|
+
model: z84.string(),
|
|
30656
30765
|
/**
|
|
30657
30766
|
* The reason why sampling stopped, if known.
|
|
30658
30767
|
*
|
|
@@ -30664,144 +30773,144 @@ var CreateMessageResultWithToolsSchema = ResultSchema.extend({
|
|
|
30664
30773
|
*
|
|
30665
30774
|
* This field is an open string to allow for provider-specific stop reasons.
|
|
30666
30775
|
*/
|
|
30667
|
-
stopReason:
|
|
30776
|
+
stopReason: z84.optional(z84.enum(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(z84.string())),
|
|
30668
30777
|
role: RoleSchema,
|
|
30669
30778
|
/**
|
|
30670
30779
|
* Response content. May be a single block or array. May include ToolUseContent if stopReason is "toolUse".
|
|
30671
30780
|
*/
|
|
30672
|
-
content:
|
|
30673
|
-
});
|
|
30674
|
-
var BooleanSchemaSchema =
|
|
30675
|
-
type:
|
|
30676
|
-
title:
|
|
30677
|
-
description:
|
|
30678
|
-
default:
|
|
30679
|
-
});
|
|
30680
|
-
var StringSchemaSchema =
|
|
30681
|
-
type:
|
|
30682
|
-
title:
|
|
30683
|
-
description:
|
|
30684
|
-
minLength:
|
|
30685
|
-
maxLength:
|
|
30686
|
-
format:
|
|
30687
|
-
default:
|
|
30688
|
-
});
|
|
30689
|
-
var NumberSchemaSchema =
|
|
30690
|
-
type:
|
|
30691
|
-
title:
|
|
30692
|
-
description:
|
|
30693
|
-
minimum:
|
|
30694
|
-
maximum:
|
|
30695
|
-
default:
|
|
30696
|
-
});
|
|
30697
|
-
var UntitledSingleSelectEnumSchemaSchema =
|
|
30698
|
-
type:
|
|
30699
|
-
title:
|
|
30700
|
-
description:
|
|
30701
|
-
enum:
|
|
30702
|
-
default:
|
|
30703
|
-
});
|
|
30704
|
-
var TitledSingleSelectEnumSchemaSchema =
|
|
30705
|
-
type:
|
|
30706
|
-
title:
|
|
30707
|
-
description:
|
|
30708
|
-
oneOf:
|
|
30709
|
-
const:
|
|
30710
|
-
title:
|
|
30781
|
+
content: z84.union([SamplingMessageContentBlockSchema, z84.array(SamplingMessageContentBlockSchema)])
|
|
30782
|
+
});
|
|
30783
|
+
var BooleanSchemaSchema = z84.object({
|
|
30784
|
+
type: z84.literal("boolean"),
|
|
30785
|
+
title: z84.string().optional(),
|
|
30786
|
+
description: z84.string().optional(),
|
|
30787
|
+
default: z84.boolean().optional()
|
|
30788
|
+
});
|
|
30789
|
+
var StringSchemaSchema = z84.object({
|
|
30790
|
+
type: z84.literal("string"),
|
|
30791
|
+
title: z84.string().optional(),
|
|
30792
|
+
description: z84.string().optional(),
|
|
30793
|
+
minLength: z84.number().optional(),
|
|
30794
|
+
maxLength: z84.number().optional(),
|
|
30795
|
+
format: z84.enum(["email", "uri", "date", "date-time"]).optional(),
|
|
30796
|
+
default: z84.string().optional()
|
|
30797
|
+
});
|
|
30798
|
+
var NumberSchemaSchema = z84.object({
|
|
30799
|
+
type: z84.enum(["number", "integer"]),
|
|
30800
|
+
title: z84.string().optional(),
|
|
30801
|
+
description: z84.string().optional(),
|
|
30802
|
+
minimum: z84.number().optional(),
|
|
30803
|
+
maximum: z84.number().optional(),
|
|
30804
|
+
default: z84.number().optional()
|
|
30805
|
+
});
|
|
30806
|
+
var UntitledSingleSelectEnumSchemaSchema = z84.object({
|
|
30807
|
+
type: z84.literal("string"),
|
|
30808
|
+
title: z84.string().optional(),
|
|
30809
|
+
description: z84.string().optional(),
|
|
30810
|
+
enum: z84.array(z84.string()),
|
|
30811
|
+
default: z84.string().optional()
|
|
30812
|
+
});
|
|
30813
|
+
var TitledSingleSelectEnumSchemaSchema = z84.object({
|
|
30814
|
+
type: z84.literal("string"),
|
|
30815
|
+
title: z84.string().optional(),
|
|
30816
|
+
description: z84.string().optional(),
|
|
30817
|
+
oneOf: z84.array(z84.object({
|
|
30818
|
+
const: z84.string(),
|
|
30819
|
+
title: z84.string()
|
|
30711
30820
|
})),
|
|
30712
|
-
default:
|
|
30713
|
-
});
|
|
30714
|
-
var LegacyTitledEnumSchemaSchema =
|
|
30715
|
-
type:
|
|
30716
|
-
title:
|
|
30717
|
-
description:
|
|
30718
|
-
enum:
|
|
30719
|
-
enumNames:
|
|
30720
|
-
default:
|
|
30721
|
-
});
|
|
30722
|
-
var SingleSelectEnumSchemaSchema =
|
|
30723
|
-
var UntitledMultiSelectEnumSchemaSchema =
|
|
30724
|
-
type:
|
|
30725
|
-
title:
|
|
30726
|
-
description:
|
|
30727
|
-
minItems:
|
|
30728
|
-
maxItems:
|
|
30729
|
-
items:
|
|
30730
|
-
type:
|
|
30731
|
-
enum:
|
|
30821
|
+
default: z84.string().optional()
|
|
30822
|
+
});
|
|
30823
|
+
var LegacyTitledEnumSchemaSchema = z84.object({
|
|
30824
|
+
type: z84.literal("string"),
|
|
30825
|
+
title: z84.string().optional(),
|
|
30826
|
+
description: z84.string().optional(),
|
|
30827
|
+
enum: z84.array(z84.string()),
|
|
30828
|
+
enumNames: z84.array(z84.string()).optional(),
|
|
30829
|
+
default: z84.string().optional()
|
|
30830
|
+
});
|
|
30831
|
+
var SingleSelectEnumSchemaSchema = z84.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
|
|
30832
|
+
var UntitledMultiSelectEnumSchemaSchema = z84.object({
|
|
30833
|
+
type: z84.literal("array"),
|
|
30834
|
+
title: z84.string().optional(),
|
|
30835
|
+
description: z84.string().optional(),
|
|
30836
|
+
minItems: z84.number().optional(),
|
|
30837
|
+
maxItems: z84.number().optional(),
|
|
30838
|
+
items: z84.object({
|
|
30839
|
+
type: z84.literal("string"),
|
|
30840
|
+
enum: z84.array(z84.string())
|
|
30732
30841
|
}),
|
|
30733
|
-
default:
|
|
30734
|
-
});
|
|
30735
|
-
var TitledMultiSelectEnumSchemaSchema =
|
|
30736
|
-
type:
|
|
30737
|
-
title:
|
|
30738
|
-
description:
|
|
30739
|
-
minItems:
|
|
30740
|
-
maxItems:
|
|
30741
|
-
items:
|
|
30742
|
-
anyOf:
|
|
30743
|
-
const:
|
|
30744
|
-
title:
|
|
30842
|
+
default: z84.array(z84.string()).optional()
|
|
30843
|
+
});
|
|
30844
|
+
var TitledMultiSelectEnumSchemaSchema = z84.object({
|
|
30845
|
+
type: z84.literal("array"),
|
|
30846
|
+
title: z84.string().optional(),
|
|
30847
|
+
description: z84.string().optional(),
|
|
30848
|
+
minItems: z84.number().optional(),
|
|
30849
|
+
maxItems: z84.number().optional(),
|
|
30850
|
+
items: z84.object({
|
|
30851
|
+
anyOf: z84.array(z84.object({
|
|
30852
|
+
const: z84.string(),
|
|
30853
|
+
title: z84.string()
|
|
30745
30854
|
}))
|
|
30746
30855
|
}),
|
|
30747
|
-
default:
|
|
30856
|
+
default: z84.array(z84.string()).optional()
|
|
30748
30857
|
});
|
|
30749
|
-
var MultiSelectEnumSchemaSchema =
|
|
30750
|
-
var EnumSchemaSchema =
|
|
30751
|
-
var PrimitiveSchemaDefinitionSchema =
|
|
30858
|
+
var MultiSelectEnumSchemaSchema = z84.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
|
|
30859
|
+
var EnumSchemaSchema = z84.union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
|
|
30860
|
+
var PrimitiveSchemaDefinitionSchema = z84.union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
|
|
30752
30861
|
var ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
30753
30862
|
/**
|
|
30754
30863
|
* The elicitation mode.
|
|
30755
30864
|
*
|
|
30756
30865
|
* Optional for backward compatibility. Clients MUST treat missing mode as "form".
|
|
30757
30866
|
*/
|
|
30758
|
-
mode:
|
|
30867
|
+
mode: z84.literal("form").optional(),
|
|
30759
30868
|
/**
|
|
30760
30869
|
* The message to present to the user describing what information is being requested.
|
|
30761
30870
|
*/
|
|
30762
|
-
message:
|
|
30871
|
+
message: z84.string(),
|
|
30763
30872
|
/**
|
|
30764
30873
|
* A restricted subset of JSON Schema.
|
|
30765
30874
|
* Only top-level properties are allowed, without nesting.
|
|
30766
30875
|
*/
|
|
30767
|
-
requestedSchema:
|
|
30768
|
-
type:
|
|
30769
|
-
properties:
|
|
30770
|
-
required:
|
|
30876
|
+
requestedSchema: z84.object({
|
|
30877
|
+
type: z84.literal("object"),
|
|
30878
|
+
properties: z84.record(z84.string(), PrimitiveSchemaDefinitionSchema),
|
|
30879
|
+
required: z84.array(z84.string()).optional()
|
|
30771
30880
|
})
|
|
30772
30881
|
});
|
|
30773
30882
|
var ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
30774
30883
|
/**
|
|
30775
30884
|
* The elicitation mode.
|
|
30776
30885
|
*/
|
|
30777
|
-
mode:
|
|
30886
|
+
mode: z84.literal("url"),
|
|
30778
30887
|
/**
|
|
30779
30888
|
* The message to present to the user explaining why the interaction is needed.
|
|
30780
30889
|
*/
|
|
30781
|
-
message:
|
|
30890
|
+
message: z84.string(),
|
|
30782
30891
|
/**
|
|
30783
30892
|
* The ID of the elicitation, which must be unique within the context of the server.
|
|
30784
30893
|
* The client MUST treat this ID as an opaque value.
|
|
30785
30894
|
*/
|
|
30786
|
-
elicitationId:
|
|
30895
|
+
elicitationId: z84.string(),
|
|
30787
30896
|
/**
|
|
30788
30897
|
* The URL that the user should navigate to.
|
|
30789
30898
|
*/
|
|
30790
|
-
url:
|
|
30899
|
+
url: z84.string().url()
|
|
30791
30900
|
});
|
|
30792
|
-
var ElicitRequestParamsSchema =
|
|
30901
|
+
var ElicitRequestParamsSchema = z84.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
|
|
30793
30902
|
var ElicitRequestSchema = RequestSchema.extend({
|
|
30794
|
-
method:
|
|
30903
|
+
method: z84.literal("elicitation/create"),
|
|
30795
30904
|
params: ElicitRequestParamsSchema
|
|
30796
30905
|
});
|
|
30797
30906
|
var ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
30798
30907
|
/**
|
|
30799
30908
|
* The ID of the elicitation that completed.
|
|
30800
30909
|
*/
|
|
30801
|
-
elicitationId:
|
|
30910
|
+
elicitationId: z84.string()
|
|
30802
30911
|
});
|
|
30803
30912
|
var ElicitationCompleteNotificationSchema = NotificationSchema.extend({
|
|
30804
|
-
method:
|
|
30913
|
+
method: z84.literal("notifications/elicitation/complete"),
|
|
30805
30914
|
params: ElicitationCompleteNotificationParamsSchema
|
|
30806
30915
|
});
|
|
30807
30916
|
var ElicitResultSchema = ResultSchema.extend({
|
|
@@ -30811,98 +30920,98 @@ var ElicitResultSchema = ResultSchema.extend({
|
|
|
30811
30920
|
* - "decline": User explicitly decline the action
|
|
30812
30921
|
* - "cancel": User dismissed without making an explicit choice
|
|
30813
30922
|
*/
|
|
30814
|
-
action:
|
|
30923
|
+
action: z84.enum(["accept", "decline", "cancel"]),
|
|
30815
30924
|
/**
|
|
30816
30925
|
* The submitted form data, only present when action is "accept".
|
|
30817
30926
|
* Contains values matching the requested schema.
|
|
30818
30927
|
* Per MCP spec, content is "typically omitted" for decline/cancel actions.
|
|
30819
30928
|
* We normalize null to undefined for leniency while maintaining type compatibility.
|
|
30820
30929
|
*/
|
|
30821
|
-
content:
|
|
30930
|
+
content: z84.preprocess((val) => val === null ? void 0 : val, z84.record(z84.string(), z84.union([z84.string(), z84.number(), z84.boolean(), z84.array(z84.string())])).optional())
|
|
30822
30931
|
});
|
|
30823
|
-
var ResourceTemplateReferenceSchema =
|
|
30824
|
-
type:
|
|
30932
|
+
var ResourceTemplateReferenceSchema = z84.object({
|
|
30933
|
+
type: z84.literal("ref/resource"),
|
|
30825
30934
|
/**
|
|
30826
30935
|
* The URI or URI template of the resource.
|
|
30827
30936
|
*/
|
|
30828
|
-
uri:
|
|
30937
|
+
uri: z84.string()
|
|
30829
30938
|
});
|
|
30830
|
-
var PromptReferenceSchema =
|
|
30831
|
-
type:
|
|
30939
|
+
var PromptReferenceSchema = z84.object({
|
|
30940
|
+
type: z84.literal("ref/prompt"),
|
|
30832
30941
|
/**
|
|
30833
30942
|
* The name of the prompt or prompt template
|
|
30834
30943
|
*/
|
|
30835
|
-
name:
|
|
30944
|
+
name: z84.string()
|
|
30836
30945
|
});
|
|
30837
30946
|
var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
30838
|
-
ref:
|
|
30947
|
+
ref: z84.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
30839
30948
|
/**
|
|
30840
30949
|
* The argument's information
|
|
30841
30950
|
*/
|
|
30842
|
-
argument:
|
|
30951
|
+
argument: z84.object({
|
|
30843
30952
|
/**
|
|
30844
30953
|
* The name of the argument
|
|
30845
30954
|
*/
|
|
30846
|
-
name:
|
|
30955
|
+
name: z84.string(),
|
|
30847
30956
|
/**
|
|
30848
30957
|
* The value of the argument to use for completion matching.
|
|
30849
30958
|
*/
|
|
30850
|
-
value:
|
|
30959
|
+
value: z84.string()
|
|
30851
30960
|
}),
|
|
30852
|
-
context:
|
|
30961
|
+
context: z84.object({
|
|
30853
30962
|
/**
|
|
30854
30963
|
* Previously-resolved variables in a URI template or prompt.
|
|
30855
30964
|
*/
|
|
30856
|
-
arguments:
|
|
30965
|
+
arguments: z84.record(z84.string(), z84.string()).optional()
|
|
30857
30966
|
}).optional()
|
|
30858
30967
|
});
|
|
30859
30968
|
var CompleteRequestSchema = RequestSchema.extend({
|
|
30860
|
-
method:
|
|
30969
|
+
method: z84.literal("completion/complete"),
|
|
30861
30970
|
params: CompleteRequestParamsSchema
|
|
30862
30971
|
});
|
|
30863
30972
|
var CompleteResultSchema = ResultSchema.extend({
|
|
30864
|
-
completion:
|
|
30973
|
+
completion: z84.looseObject({
|
|
30865
30974
|
/**
|
|
30866
30975
|
* An array of completion values. Must not exceed 100 items.
|
|
30867
30976
|
*/
|
|
30868
|
-
values:
|
|
30977
|
+
values: z84.array(z84.string()).max(100),
|
|
30869
30978
|
/**
|
|
30870
30979
|
* The total number of completion options available. This can exceed the number of values actually sent in the response.
|
|
30871
30980
|
*/
|
|
30872
|
-
total:
|
|
30981
|
+
total: z84.optional(z84.number().int()),
|
|
30873
30982
|
/**
|
|
30874
30983
|
* Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
|
|
30875
30984
|
*/
|
|
30876
|
-
hasMore:
|
|
30985
|
+
hasMore: z84.optional(z84.boolean())
|
|
30877
30986
|
})
|
|
30878
30987
|
});
|
|
30879
|
-
var RootSchema =
|
|
30988
|
+
var RootSchema = z84.object({
|
|
30880
30989
|
/**
|
|
30881
30990
|
* The URI identifying the root. This *must* start with file:// for now.
|
|
30882
30991
|
*/
|
|
30883
|
-
uri:
|
|
30992
|
+
uri: z84.string().startsWith("file://"),
|
|
30884
30993
|
/**
|
|
30885
30994
|
* An optional name for the root.
|
|
30886
30995
|
*/
|
|
30887
|
-
name:
|
|
30996
|
+
name: z84.string().optional(),
|
|
30888
30997
|
/**
|
|
30889
30998
|
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
30890
30999
|
* for notes on _meta usage.
|
|
30891
31000
|
*/
|
|
30892
|
-
_meta:
|
|
31001
|
+
_meta: z84.record(z84.string(), z84.unknown()).optional()
|
|
30893
31002
|
});
|
|
30894
31003
|
var ListRootsRequestSchema = RequestSchema.extend({
|
|
30895
|
-
method:
|
|
31004
|
+
method: z84.literal("roots/list"),
|
|
30896
31005
|
params: BaseRequestParamsSchema.optional()
|
|
30897
31006
|
});
|
|
30898
31007
|
var ListRootsResultSchema = ResultSchema.extend({
|
|
30899
|
-
roots:
|
|
31008
|
+
roots: z84.array(RootSchema)
|
|
30900
31009
|
});
|
|
30901
31010
|
var RootsListChangedNotificationSchema = NotificationSchema.extend({
|
|
30902
|
-
method:
|
|
31011
|
+
method: z84.literal("notifications/roots/list_changed"),
|
|
30903
31012
|
params: NotificationsParamsSchema.optional()
|
|
30904
31013
|
});
|
|
30905
|
-
var ClientRequestSchema =
|
|
31014
|
+
var ClientRequestSchema = z84.union([
|
|
30906
31015
|
PingRequestSchema,
|
|
30907
31016
|
InitializeRequestSchema,
|
|
30908
31017
|
CompleteRequestSchema,
|
|
@@ -30921,14 +31030,14 @@ var ClientRequestSchema = z83.union([
|
|
|
30921
31030
|
ListTasksRequestSchema,
|
|
30922
31031
|
CancelTaskRequestSchema
|
|
30923
31032
|
]);
|
|
30924
|
-
var ClientNotificationSchema =
|
|
31033
|
+
var ClientNotificationSchema = z84.union([
|
|
30925
31034
|
CancelledNotificationSchema,
|
|
30926
31035
|
ProgressNotificationSchema,
|
|
30927
31036
|
InitializedNotificationSchema,
|
|
30928
31037
|
RootsListChangedNotificationSchema,
|
|
30929
31038
|
TaskStatusNotificationSchema
|
|
30930
31039
|
]);
|
|
30931
|
-
var ClientResultSchema =
|
|
31040
|
+
var ClientResultSchema = z84.union([
|
|
30932
31041
|
EmptyResultSchema,
|
|
30933
31042
|
CreateMessageResultSchema,
|
|
30934
31043
|
CreateMessageResultWithToolsSchema,
|
|
@@ -30938,7 +31047,7 @@ var ClientResultSchema = z83.union([
|
|
|
30938
31047
|
ListTasksResultSchema,
|
|
30939
31048
|
CreateTaskResultSchema
|
|
30940
31049
|
]);
|
|
30941
|
-
var ServerRequestSchema =
|
|
31050
|
+
var ServerRequestSchema = z84.union([
|
|
30942
31051
|
PingRequestSchema,
|
|
30943
31052
|
CreateMessageRequestSchema,
|
|
30944
31053
|
ElicitRequestSchema,
|
|
@@ -30948,7 +31057,7 @@ var ServerRequestSchema = z83.union([
|
|
|
30948
31057
|
ListTasksRequestSchema,
|
|
30949
31058
|
CancelTaskRequestSchema
|
|
30950
31059
|
]);
|
|
30951
|
-
var ServerNotificationSchema =
|
|
31060
|
+
var ServerNotificationSchema = z84.union([
|
|
30952
31061
|
CancelledNotificationSchema,
|
|
30953
31062
|
ProgressNotificationSchema,
|
|
30954
31063
|
LoggingMessageNotificationSchema,
|
|
@@ -30959,7 +31068,7 @@ var ServerNotificationSchema = z83.union([
|
|
|
30959
31068
|
TaskStatusNotificationSchema,
|
|
30960
31069
|
ElicitationCompleteNotificationSchema
|
|
30961
31070
|
]);
|
|
30962
|
-
var ServerResultSchema =
|
|
31071
|
+
var ServerResultSchema = z84.union([
|
|
30963
31072
|
EmptyResultSchema,
|
|
30964
31073
|
InitializeResultSchema,
|
|
30965
31074
|
CompleteResultSchema,
|
|
@@ -32848,148 +32957,148 @@ async function pkceChallenge(length) {
|
|
|
32848
32957
|
}
|
|
32849
32958
|
|
|
32850
32959
|
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
|
|
32851
|
-
import * as
|
|
32852
|
-
var SafeUrlSchema =
|
|
32960
|
+
import * as z85 from "zod/v4";
|
|
32961
|
+
var SafeUrlSchema = z85.url().superRefine((val, ctx) => {
|
|
32853
32962
|
if (!URL.canParse(val)) {
|
|
32854
32963
|
ctx.addIssue({
|
|
32855
|
-
code:
|
|
32964
|
+
code: z85.ZodIssueCode.custom,
|
|
32856
32965
|
message: "URL must be parseable",
|
|
32857
32966
|
fatal: true
|
|
32858
32967
|
});
|
|
32859
|
-
return
|
|
32968
|
+
return z85.NEVER;
|
|
32860
32969
|
}
|
|
32861
32970
|
}).refine((url2) => {
|
|
32862
32971
|
const u = new URL(url2);
|
|
32863
32972
|
return u.protocol !== "javascript:" && u.protocol !== "data:" && u.protocol !== "vbscript:";
|
|
32864
32973
|
}, { message: "URL cannot use javascript:, data:, or vbscript: scheme" });
|
|
32865
|
-
var OAuthProtectedResourceMetadataSchema =
|
|
32866
|
-
resource:
|
|
32867
|
-
authorization_servers:
|
|
32868
|
-
jwks_uri:
|
|
32869
|
-
scopes_supported:
|
|
32870
|
-
bearer_methods_supported:
|
|
32871
|
-
resource_signing_alg_values_supported:
|
|
32872
|
-
resource_name:
|
|
32873
|
-
resource_documentation:
|
|
32874
|
-
resource_policy_uri:
|
|
32875
|
-
resource_tos_uri:
|
|
32876
|
-
tls_client_certificate_bound_access_tokens:
|
|
32877
|
-
authorization_details_types_supported:
|
|
32878
|
-
dpop_signing_alg_values_supported:
|
|
32879
|
-
dpop_bound_access_tokens_required:
|
|
32880
|
-
});
|
|
32881
|
-
var OAuthMetadataSchema =
|
|
32882
|
-
issuer:
|
|
32974
|
+
var OAuthProtectedResourceMetadataSchema = z85.looseObject({
|
|
32975
|
+
resource: z85.string().url(),
|
|
32976
|
+
authorization_servers: z85.array(SafeUrlSchema).optional(),
|
|
32977
|
+
jwks_uri: z85.string().url().optional(),
|
|
32978
|
+
scopes_supported: z85.array(z85.string()).optional(),
|
|
32979
|
+
bearer_methods_supported: z85.array(z85.string()).optional(),
|
|
32980
|
+
resource_signing_alg_values_supported: z85.array(z85.string()).optional(),
|
|
32981
|
+
resource_name: z85.string().optional(),
|
|
32982
|
+
resource_documentation: z85.string().optional(),
|
|
32983
|
+
resource_policy_uri: z85.string().url().optional(),
|
|
32984
|
+
resource_tos_uri: z85.string().url().optional(),
|
|
32985
|
+
tls_client_certificate_bound_access_tokens: z85.boolean().optional(),
|
|
32986
|
+
authorization_details_types_supported: z85.array(z85.string()).optional(),
|
|
32987
|
+
dpop_signing_alg_values_supported: z85.array(z85.string()).optional(),
|
|
32988
|
+
dpop_bound_access_tokens_required: z85.boolean().optional()
|
|
32989
|
+
});
|
|
32990
|
+
var OAuthMetadataSchema = z85.looseObject({
|
|
32991
|
+
issuer: z85.string(),
|
|
32883
32992
|
authorization_endpoint: SafeUrlSchema,
|
|
32884
32993
|
token_endpoint: SafeUrlSchema,
|
|
32885
32994
|
registration_endpoint: SafeUrlSchema.optional(),
|
|
32886
|
-
scopes_supported:
|
|
32887
|
-
response_types_supported:
|
|
32888
|
-
response_modes_supported:
|
|
32889
|
-
grant_types_supported:
|
|
32890
|
-
token_endpoint_auth_methods_supported:
|
|
32891
|
-
token_endpoint_auth_signing_alg_values_supported:
|
|
32995
|
+
scopes_supported: z85.array(z85.string()).optional(),
|
|
32996
|
+
response_types_supported: z85.array(z85.string()),
|
|
32997
|
+
response_modes_supported: z85.array(z85.string()).optional(),
|
|
32998
|
+
grant_types_supported: z85.array(z85.string()).optional(),
|
|
32999
|
+
token_endpoint_auth_methods_supported: z85.array(z85.string()).optional(),
|
|
33000
|
+
token_endpoint_auth_signing_alg_values_supported: z85.array(z85.string()).optional(),
|
|
32892
33001
|
service_documentation: SafeUrlSchema.optional(),
|
|
32893
33002
|
revocation_endpoint: SafeUrlSchema.optional(),
|
|
32894
|
-
revocation_endpoint_auth_methods_supported:
|
|
32895
|
-
revocation_endpoint_auth_signing_alg_values_supported:
|
|
32896
|
-
introspection_endpoint:
|
|
32897
|
-
introspection_endpoint_auth_methods_supported:
|
|
32898
|
-
introspection_endpoint_auth_signing_alg_values_supported:
|
|
32899
|
-
code_challenge_methods_supported:
|
|
32900
|
-
client_id_metadata_document_supported:
|
|
32901
|
-
});
|
|
32902
|
-
var OpenIdProviderMetadataSchema =
|
|
32903
|
-
issuer:
|
|
33003
|
+
revocation_endpoint_auth_methods_supported: z85.array(z85.string()).optional(),
|
|
33004
|
+
revocation_endpoint_auth_signing_alg_values_supported: z85.array(z85.string()).optional(),
|
|
33005
|
+
introspection_endpoint: z85.string().optional(),
|
|
33006
|
+
introspection_endpoint_auth_methods_supported: z85.array(z85.string()).optional(),
|
|
33007
|
+
introspection_endpoint_auth_signing_alg_values_supported: z85.array(z85.string()).optional(),
|
|
33008
|
+
code_challenge_methods_supported: z85.array(z85.string()).optional(),
|
|
33009
|
+
client_id_metadata_document_supported: z85.boolean().optional()
|
|
33010
|
+
});
|
|
33011
|
+
var OpenIdProviderMetadataSchema = z85.looseObject({
|
|
33012
|
+
issuer: z85.string(),
|
|
32904
33013
|
authorization_endpoint: SafeUrlSchema,
|
|
32905
33014
|
token_endpoint: SafeUrlSchema,
|
|
32906
33015
|
userinfo_endpoint: SafeUrlSchema.optional(),
|
|
32907
33016
|
jwks_uri: SafeUrlSchema,
|
|
32908
33017
|
registration_endpoint: SafeUrlSchema.optional(),
|
|
32909
|
-
scopes_supported:
|
|
32910
|
-
response_types_supported:
|
|
32911
|
-
response_modes_supported:
|
|
32912
|
-
grant_types_supported:
|
|
32913
|
-
acr_values_supported:
|
|
32914
|
-
subject_types_supported:
|
|
32915
|
-
id_token_signing_alg_values_supported:
|
|
32916
|
-
id_token_encryption_alg_values_supported:
|
|
32917
|
-
id_token_encryption_enc_values_supported:
|
|
32918
|
-
userinfo_signing_alg_values_supported:
|
|
32919
|
-
userinfo_encryption_alg_values_supported:
|
|
32920
|
-
userinfo_encryption_enc_values_supported:
|
|
32921
|
-
request_object_signing_alg_values_supported:
|
|
32922
|
-
request_object_encryption_alg_values_supported:
|
|
32923
|
-
request_object_encryption_enc_values_supported:
|
|
32924
|
-
token_endpoint_auth_methods_supported:
|
|
32925
|
-
token_endpoint_auth_signing_alg_values_supported:
|
|
32926
|
-
display_values_supported:
|
|
32927
|
-
claim_types_supported:
|
|
32928
|
-
claims_supported:
|
|
32929
|
-
service_documentation:
|
|
32930
|
-
claims_locales_supported:
|
|
32931
|
-
ui_locales_supported:
|
|
32932
|
-
claims_parameter_supported:
|
|
32933
|
-
request_parameter_supported:
|
|
32934
|
-
request_uri_parameter_supported:
|
|
32935
|
-
require_request_uri_registration:
|
|
33018
|
+
scopes_supported: z85.array(z85.string()).optional(),
|
|
33019
|
+
response_types_supported: z85.array(z85.string()),
|
|
33020
|
+
response_modes_supported: z85.array(z85.string()).optional(),
|
|
33021
|
+
grant_types_supported: z85.array(z85.string()).optional(),
|
|
33022
|
+
acr_values_supported: z85.array(z85.string()).optional(),
|
|
33023
|
+
subject_types_supported: z85.array(z85.string()),
|
|
33024
|
+
id_token_signing_alg_values_supported: z85.array(z85.string()),
|
|
33025
|
+
id_token_encryption_alg_values_supported: z85.array(z85.string()).optional(),
|
|
33026
|
+
id_token_encryption_enc_values_supported: z85.array(z85.string()).optional(),
|
|
33027
|
+
userinfo_signing_alg_values_supported: z85.array(z85.string()).optional(),
|
|
33028
|
+
userinfo_encryption_alg_values_supported: z85.array(z85.string()).optional(),
|
|
33029
|
+
userinfo_encryption_enc_values_supported: z85.array(z85.string()).optional(),
|
|
33030
|
+
request_object_signing_alg_values_supported: z85.array(z85.string()).optional(),
|
|
33031
|
+
request_object_encryption_alg_values_supported: z85.array(z85.string()).optional(),
|
|
33032
|
+
request_object_encryption_enc_values_supported: z85.array(z85.string()).optional(),
|
|
33033
|
+
token_endpoint_auth_methods_supported: z85.array(z85.string()).optional(),
|
|
33034
|
+
token_endpoint_auth_signing_alg_values_supported: z85.array(z85.string()).optional(),
|
|
33035
|
+
display_values_supported: z85.array(z85.string()).optional(),
|
|
33036
|
+
claim_types_supported: z85.array(z85.string()).optional(),
|
|
33037
|
+
claims_supported: z85.array(z85.string()).optional(),
|
|
33038
|
+
service_documentation: z85.string().optional(),
|
|
33039
|
+
claims_locales_supported: z85.array(z85.string()).optional(),
|
|
33040
|
+
ui_locales_supported: z85.array(z85.string()).optional(),
|
|
33041
|
+
claims_parameter_supported: z85.boolean().optional(),
|
|
33042
|
+
request_parameter_supported: z85.boolean().optional(),
|
|
33043
|
+
request_uri_parameter_supported: z85.boolean().optional(),
|
|
33044
|
+
require_request_uri_registration: z85.boolean().optional(),
|
|
32936
33045
|
op_policy_uri: SafeUrlSchema.optional(),
|
|
32937
33046
|
op_tos_uri: SafeUrlSchema.optional(),
|
|
32938
|
-
client_id_metadata_document_supported:
|
|
33047
|
+
client_id_metadata_document_supported: z85.boolean().optional()
|
|
32939
33048
|
});
|
|
32940
|
-
var OpenIdProviderDiscoveryMetadataSchema =
|
|
33049
|
+
var OpenIdProviderDiscoveryMetadataSchema = z85.object({
|
|
32941
33050
|
...OpenIdProviderMetadataSchema.shape,
|
|
32942
33051
|
...OAuthMetadataSchema.pick({
|
|
32943
33052
|
code_challenge_methods_supported: true
|
|
32944
33053
|
}).shape
|
|
32945
33054
|
});
|
|
32946
|
-
var OAuthTokensSchema =
|
|
32947
|
-
access_token:
|
|
32948
|
-
id_token:
|
|
33055
|
+
var OAuthTokensSchema = z85.object({
|
|
33056
|
+
access_token: z85.string(),
|
|
33057
|
+
id_token: z85.string().optional(),
|
|
32949
33058
|
// Optional for OAuth 2.1, but necessary in OpenID Connect
|
|
32950
|
-
token_type:
|
|
32951
|
-
expires_in:
|
|
32952
|
-
scope:
|
|
32953
|
-
refresh_token:
|
|
33059
|
+
token_type: z85.string(),
|
|
33060
|
+
expires_in: z85.coerce.number().optional(),
|
|
33061
|
+
scope: z85.string().optional(),
|
|
33062
|
+
refresh_token: z85.string().optional()
|
|
32954
33063
|
}).strip();
|
|
32955
|
-
var OAuthErrorResponseSchema =
|
|
32956
|
-
error:
|
|
32957
|
-
error_description:
|
|
32958
|
-
error_uri:
|
|
32959
|
-
});
|
|
32960
|
-
var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(
|
|
32961
|
-
var OAuthClientMetadataSchema =
|
|
32962
|
-
redirect_uris:
|
|
32963
|
-
token_endpoint_auth_method:
|
|
32964
|
-
grant_types:
|
|
32965
|
-
response_types:
|
|
32966
|
-
client_name:
|
|
33064
|
+
var OAuthErrorResponseSchema = z85.object({
|
|
33065
|
+
error: z85.string(),
|
|
33066
|
+
error_description: z85.string().optional(),
|
|
33067
|
+
error_uri: z85.string().optional()
|
|
33068
|
+
});
|
|
33069
|
+
var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z85.literal("").transform(() => void 0));
|
|
33070
|
+
var OAuthClientMetadataSchema = z85.object({
|
|
33071
|
+
redirect_uris: z85.array(SafeUrlSchema),
|
|
33072
|
+
token_endpoint_auth_method: z85.string().optional(),
|
|
33073
|
+
grant_types: z85.array(z85.string()).optional(),
|
|
33074
|
+
response_types: z85.array(z85.string()).optional(),
|
|
33075
|
+
client_name: z85.string().optional(),
|
|
32967
33076
|
client_uri: SafeUrlSchema.optional(),
|
|
32968
33077
|
logo_uri: OptionalSafeUrlSchema,
|
|
32969
|
-
scope:
|
|
32970
|
-
contacts:
|
|
33078
|
+
scope: z85.string().optional(),
|
|
33079
|
+
contacts: z85.array(z85.string()).optional(),
|
|
32971
33080
|
tos_uri: OptionalSafeUrlSchema,
|
|
32972
|
-
policy_uri:
|
|
33081
|
+
policy_uri: z85.string().optional(),
|
|
32973
33082
|
jwks_uri: SafeUrlSchema.optional(),
|
|
32974
|
-
jwks:
|
|
32975
|
-
software_id:
|
|
32976
|
-
software_version:
|
|
32977
|
-
software_statement:
|
|
33083
|
+
jwks: z85.any().optional(),
|
|
33084
|
+
software_id: z85.string().optional(),
|
|
33085
|
+
software_version: z85.string().optional(),
|
|
33086
|
+
software_statement: z85.string().optional()
|
|
32978
33087
|
}).strip();
|
|
32979
|
-
var OAuthClientInformationSchema =
|
|
32980
|
-
client_id:
|
|
32981
|
-
client_secret:
|
|
32982
|
-
client_id_issued_at:
|
|
32983
|
-
client_secret_expires_at:
|
|
33088
|
+
var OAuthClientInformationSchema = z85.object({
|
|
33089
|
+
client_id: z85.string(),
|
|
33090
|
+
client_secret: z85.string().optional(),
|
|
33091
|
+
client_id_issued_at: z85.number().optional(),
|
|
33092
|
+
client_secret_expires_at: z85.number().optional()
|
|
32984
33093
|
}).strip();
|
|
32985
33094
|
var OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
|
|
32986
|
-
var OAuthClientRegistrationErrorSchema =
|
|
32987
|
-
error:
|
|
32988
|
-
error_description:
|
|
33095
|
+
var OAuthClientRegistrationErrorSchema = z85.object({
|
|
33096
|
+
error: z85.string(),
|
|
33097
|
+
error_description: z85.string().optional()
|
|
32989
33098
|
}).strip();
|
|
32990
|
-
var OAuthTokenRevocationRequestSchema =
|
|
32991
|
-
token:
|
|
32992
|
-
token_type_hint:
|
|
33099
|
+
var OAuthTokenRevocationRequestSchema = z85.object({
|
|
33100
|
+
token: z85.string(),
|
|
33101
|
+
token_type_hint: z85.string().optional()
|
|
32993
33102
|
}).strip();
|
|
32994
33103
|
|
|
32995
33104
|
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
|
|
@@ -34493,8 +34602,8 @@ async function connectMcp(opts) {
|
|
|
34493
34602
|
}
|
|
34494
34603
|
|
|
34495
34604
|
// ../../packages/adapters/mcp/src/json-schema-to-zod.ts
|
|
34496
|
-
import { z as
|
|
34497
|
-
var PERMISSIVE =
|
|
34605
|
+
import { z as z86 } from "zod";
|
|
34606
|
+
var PERMISSIVE = z86.record(z86.string(), z86.unknown());
|
|
34498
34607
|
function jsonSchemaToZod(schema) {
|
|
34499
34608
|
try {
|
|
34500
34609
|
return convert(schema);
|
|
@@ -34503,36 +34612,36 @@ function jsonSchemaToZod(schema) {
|
|
|
34503
34612
|
}
|
|
34504
34613
|
}
|
|
34505
34614
|
function convert(raw) {
|
|
34506
|
-
if (!raw || typeof raw !== "object") return
|
|
34615
|
+
if (!raw || typeof raw !== "object") return z86.unknown();
|
|
34507
34616
|
const schema = raw;
|
|
34508
34617
|
const enumVals = schema["enum"];
|
|
34509
34618
|
if (Array.isArray(enumVals) && enumVals.length > 0) {
|
|
34510
34619
|
if (enumVals.every((v) => typeof v === "string")) {
|
|
34511
|
-
return describe(
|
|
34620
|
+
return describe(z86.enum(enumVals), schema);
|
|
34512
34621
|
}
|
|
34513
|
-
return
|
|
34622
|
+
return z86.unknown();
|
|
34514
34623
|
}
|
|
34515
34624
|
switch (schema["type"]) {
|
|
34516
34625
|
case "string":
|
|
34517
|
-
return describe(
|
|
34626
|
+
return describe(z86.string(), schema);
|
|
34518
34627
|
case "number":
|
|
34519
|
-
return describe(
|
|
34628
|
+
return describe(z86.number(), schema);
|
|
34520
34629
|
case "integer":
|
|
34521
|
-
return describe(
|
|
34630
|
+
return describe(z86.number().int(), schema);
|
|
34522
34631
|
case "boolean":
|
|
34523
|
-
return describe(
|
|
34632
|
+
return describe(z86.boolean(), schema);
|
|
34524
34633
|
case "null":
|
|
34525
|
-
return
|
|
34634
|
+
return z86.null();
|
|
34526
34635
|
case "array": {
|
|
34527
34636
|
const items = schema["items"];
|
|
34528
|
-
const itemSchema = items && typeof items === "object" ? convert(items) :
|
|
34529
|
-
return describe(
|
|
34637
|
+
const itemSchema = items && typeof items === "object" ? convert(items) : z86.unknown();
|
|
34638
|
+
return describe(z86.array(itemSchema), schema);
|
|
34530
34639
|
}
|
|
34531
34640
|
case "object":
|
|
34532
34641
|
return convertObject(schema);
|
|
34533
34642
|
default:
|
|
34534
34643
|
if (schema["properties"]) return convertObject(schema);
|
|
34535
|
-
return
|
|
34644
|
+
return z86.unknown();
|
|
34536
34645
|
}
|
|
34537
34646
|
}
|
|
34538
34647
|
function convertObject(schema) {
|
|
@@ -34549,7 +34658,7 @@ function convertObject(schema) {
|
|
|
34549
34658
|
const zodProp = convert(propSchema);
|
|
34550
34659
|
shape[key] = required.has(key) ? zodProp : zodProp.optional();
|
|
34551
34660
|
}
|
|
34552
|
-
return describe(
|
|
34661
|
+
return describe(z86.object(shape), schema);
|
|
34553
34662
|
}
|
|
34554
34663
|
function describe(zodType, schema) {
|
|
34555
34664
|
const desc2 = schema["description"];
|
|
@@ -34887,10 +34996,10 @@ function detectOrchestratorMode(agent, children) {
|
|
|
34887
34996
|
}
|
|
34888
34997
|
|
|
34889
34998
|
// ../../packages/orchestration/src/router/assign-tools.ts
|
|
34890
|
-
import { z as
|
|
34891
|
-
var assignInputSchema =
|
|
34892
|
-
task:
|
|
34893
|
-
data:
|
|
34999
|
+
import { z as z87 } from "zod";
|
|
35000
|
+
var assignInputSchema = z87.object({
|
|
35001
|
+
task: z87.string().describe("What this agent should do. Be specific and complete."),
|
|
35002
|
+
data: z87.string().optional().describe(
|
|
34894
35003
|
"Data from a previous step to pass to this agent (e.g. spreadsheet content, search results)."
|
|
34895
35004
|
)
|
|
34896
35005
|
});
|
|
@@ -35225,19 +35334,19 @@ function buildDeferredToolResults(dropped) {
|
|
|
35225
35334
|
}
|
|
35226
35335
|
|
|
35227
35336
|
// ../../packages/orchestration/src/planner/task-tools.ts
|
|
35228
|
-
import { z as
|
|
35229
|
-
var createTaskSchema =
|
|
35230
|
-
title:
|
|
35231
|
-
description:
|
|
35232
|
-
assigned_to:
|
|
35233
|
-
priority:
|
|
35234
|
-
depends_on:
|
|
35337
|
+
import { z as z88 } from "zod";
|
|
35338
|
+
var createTaskSchema = z88.object({
|
|
35339
|
+
title: z88.string().max(200).describe("Short title for this task (max 200 chars)."),
|
|
35340
|
+
description: z88.string().max(2e3).optional().describe("Detailed description of what to do."),
|
|
35341
|
+
assigned_to: z88.string().describe("Slug of the agent to assign this task to."),
|
|
35342
|
+
priority: z88.enum(["low", "medium", "high"]).optional().describe("Task priority (default: medium)."),
|
|
35343
|
+
depends_on: z88.array(z88.string()).optional().describe(
|
|
35235
35344
|
"Array of task IDs that must complete before this task starts. Use list_tasks to get IDs."
|
|
35236
35345
|
),
|
|
35237
|
-
context:
|
|
35346
|
+
context: z88.record(z88.string(), z88.unknown()).optional().describe("Additional context key/value pairs.")
|
|
35238
35347
|
});
|
|
35239
|
-
var listTasksSchema =
|
|
35240
|
-
status:
|
|
35348
|
+
var listTasksSchema = z88.object({
|
|
35349
|
+
status: z88.enum(["todo", "in_progress", "done", "cancelled", "blocked"]).optional().describe("Filter by status. Omit to list all tasks for this job.")
|
|
35241
35350
|
});
|
|
35242
35351
|
function generateTaskTools(orchestratorAgentId, db) {
|
|
35243
35352
|
const createTaskTool = {
|
|
@@ -36582,7 +36691,7 @@ function tryReserveReflectionSlot(entityId, maxPerHour, now = Date.now()) {
|
|
|
36582
36691
|
}
|
|
36583
36692
|
|
|
36584
36693
|
// src/reflection/run-reflection.ts
|
|
36585
|
-
import { z as
|
|
36694
|
+
import { z as z89 } from "zod";
|
|
36586
36695
|
|
|
36587
36696
|
// src/reflection/prompt.ts
|
|
36588
36697
|
var ANTI_LESSON_FILTER = `ANTI-LESSON FILTER \u2014 do NOT persist any of the following as skills:
|
|
@@ -36609,18 +36718,18 @@ Write skills as durable, generalised guidance \u2014 a technique the agent shoul
|
|
|
36609
36718
|
// src/reflection/run-reflection.ts
|
|
36610
36719
|
var MAX_REFLECTION_TOOL_RESULT_CHARS = 2e3;
|
|
36611
36720
|
var REFLECTION_TRACE = "[reflection]";
|
|
36612
|
-
var CreateSkillArgs =
|
|
36613
|
-
slug:
|
|
36614
|
-
name:
|
|
36615
|
-
content:
|
|
36616
|
-
description:
|
|
36617
|
-
});
|
|
36618
|
-
var UpdateSkillArgs =
|
|
36619
|
-
skillSlug:
|
|
36620
|
-
name:
|
|
36621
|
-
description:
|
|
36622
|
-
content:
|
|
36623
|
-
active:
|
|
36721
|
+
var CreateSkillArgs = z89.object({
|
|
36722
|
+
slug: z89.string().regex(/^[a-z0-9-]+$/, "Slug must be lowercase alphanumeric with hyphens only.").min(1),
|
|
36723
|
+
name: z89.string().min(1),
|
|
36724
|
+
content: z89.string().min(1),
|
|
36725
|
+
description: z89.string().optional()
|
|
36726
|
+
});
|
|
36727
|
+
var UpdateSkillArgs = z89.object({
|
|
36728
|
+
skillSlug: z89.string().min(1),
|
|
36729
|
+
name: z89.string().min(1).optional(),
|
|
36730
|
+
description: z89.string().optional(),
|
|
36731
|
+
content: z89.string().min(1).optional(),
|
|
36732
|
+
active: z89.boolean().optional()
|
|
36624
36733
|
});
|
|
36625
36734
|
function compactToolResult(value) {
|
|
36626
36735
|
if (value.length <= MAX_REFLECTION_TOOL_RESULT_CHARS) return value;
|
|
@@ -36931,7 +37040,7 @@ function shortBlockReason(reason) {
|
|
|
36931
37040
|
const firstSentence = r.split(/(?<=[.!?])\s/)[0] ?? r;
|
|
36932
37041
|
return firstSentence.length > 240 ? firstSentence.slice(0, 239).trimEnd() + "\u2026" : firstSentence;
|
|
36933
37042
|
}
|
|
36934
|
-
async function executeJob(jobId, deps,
|
|
37043
|
+
async function executeJob(jobId, deps, runnerEnv) {
|
|
36935
37044
|
const { db, registry } = deps;
|
|
36936
37045
|
let llmClient;
|
|
36937
37046
|
let modelSupportsForcedToolChoice = true;
|
|
@@ -37194,13 +37303,33 @@ async function executeJob(jobId, deps, _runnerEnv) {
|
|
|
37194
37303
|
return { status: "failed", error: errorCode };
|
|
37195
37304
|
}
|
|
37196
37305
|
const ruleRows = await db.select().from(approvalRules).where(eq4(approvalRules.entityId, job.entityId ?? ""));
|
|
37197
|
-
|
|
37306
|
+
let approvalRuleList = ruleRows.map((r) => ({
|
|
37198
37307
|
id: r.id,
|
|
37199
37308
|
toolName: r.toolName,
|
|
37200
37309
|
action: r.action ?? "auto_approve",
|
|
37201
37310
|
agentId: r.agentId,
|
|
37202
37311
|
entityId: r.entityId
|
|
37203
37312
|
}));
|
|
37313
|
+
const authMode = runnerEnv?.AUTH_MODE ?? env.AUTH_MODE;
|
|
37314
|
+
if (authMode !== "local-trust") {
|
|
37315
|
+
const RUN_COMMAND_TOOL = "run_command";
|
|
37316
|
+
const [yoloEntityRow] = await db.select({ lanCommandYolo: entities.lanCommandYolo }).from(entities).where(eq4(entities.id, job.entityId ?? "")).limit(1);
|
|
37317
|
+
if (!yoloEntityRow?.lanCommandYolo) {
|
|
37318
|
+
approvalRuleList = approvalRuleList.filter(
|
|
37319
|
+
(r) => !(r.toolName === RUN_COMMAND_TOOL && r.action === "auto_approve")
|
|
37320
|
+
);
|
|
37321
|
+
const hasRunCommandRule = approvalRuleList.some((r) => r.toolName === RUN_COMMAND_TOOL);
|
|
37322
|
+
if (!hasRunCommandRule) {
|
|
37323
|
+
approvalRuleList.push({
|
|
37324
|
+
id: "lan-yolo-gate",
|
|
37325
|
+
toolName: RUN_COMMAND_TOOL,
|
|
37326
|
+
action: "require_approval",
|
|
37327
|
+
agentId: agentRow.id,
|
|
37328
|
+
entityId: job.entityId ?? ""
|
|
37329
|
+
});
|
|
37330
|
+
}
|
|
37331
|
+
}
|
|
37332
|
+
}
|
|
37204
37333
|
const counters = new ChainCounters(DEFAULT_LIMITS);
|
|
37205
37334
|
const hasAdapterTools = !isOrchestrator && toolDefs.length > ALWAYS_ON_TOOLS.length;
|
|
37206
37335
|
const toolMap = new Map(toolDefs.map((t) => [t.name, t]));
|
|
@@ -37255,6 +37384,15 @@ async function executeJob(jobId, deps, _runnerEnv) {
|
|
|
37255
37384
|
error: `approved_tool_not_found:${req.toolName}`
|
|
37256
37385
|
});
|
|
37257
37386
|
} else {
|
|
37387
|
+
const resumeApprovalRules = [
|
|
37388
|
+
{
|
|
37389
|
+
id: "resume-bypass",
|
|
37390
|
+
entityId: job.entityId ?? "",
|
|
37391
|
+
agentId: null,
|
|
37392
|
+
toolName: req.toolName,
|
|
37393
|
+
action: "auto_approve"
|
|
37394
|
+
}
|
|
37395
|
+
];
|
|
37258
37396
|
const execResult = await executeTool(
|
|
37259
37397
|
toolDef,
|
|
37260
37398
|
req.toolInput,
|
|
@@ -37270,7 +37408,7 @@ async function executeJob(jobId, deps, _runnerEnv) {
|
|
|
37270
37408
|
assignedSkillSlugs,
|
|
37271
37409
|
provisioning: TOOL_PROVISIONING
|
|
37272
37410
|
},
|
|
37273
|
-
{ approvalRules:
|
|
37411
|
+
{ approvalRules: resumeApprovalRules, onApprovalRequired: async () => {
|
|
37274
37412
|
} }
|
|
37275
37413
|
);
|
|
37276
37414
|
if (execResult.outcome === "success") {
|
|
@@ -37598,7 +37736,7 @@ async function executeJob(jobId, deps, _runnerEnv) {
|
|
|
37598
37736
|
turn,
|
|
37599
37737
|
toolsUsed,
|
|
37600
37738
|
messages
|
|
37601
|
-
},
|
|
37739
|
+
}, runnerEnv).catch((e) => console.warn("[reflection]", e));
|
|
37602
37740
|
}
|
|
37603
37741
|
return { status: "completed", result: textContent };
|
|
37604
37742
|
}
|
|
@@ -37830,7 +37968,7 @@ async function executeJob(jobId, deps, _runnerEnv) {
|
|
|
37830
37968
|
[...sideToolResults, ...preAssignSideResults],
|
|
37831
37969
|
db
|
|
37832
37970
|
);
|
|
37833
|
-
const childOutcome = await executeJob(delegation.childJobId, deps,
|
|
37971
|
+
const childOutcome = await executeJob(delegation.childJobId, deps, runnerEnv);
|
|
37834
37972
|
if (childOutcome.status === "failed") {
|
|
37835
37973
|
const childErr = childOutcome.result || childOutcome.error || "unknown";
|
|
37836
37974
|
await resumeDelegated(
|
|
@@ -37839,7 +37977,7 @@ async function executeJob(jobId, deps, _runnerEnv) {
|
|
|
37839
37977
|
{ error: childErr },
|
|
37840
37978
|
db
|
|
37841
37979
|
);
|
|
37842
|
-
return executeJob(jobId, deps,
|
|
37980
|
+
return executeJob(jobId, deps, runnerEnv);
|
|
37843
37981
|
}
|
|
37844
37982
|
if (childOutcome.status === "cancelled") {
|
|
37845
37983
|
await db.update(agentJobs).set({ status: "cancelled", updatedAt: /* @__PURE__ */ new Date() }).where(eq4(agentJobs.id, jobId));
|
|
@@ -37859,7 +37997,7 @@ async function executeJob(jobId, deps, _runnerEnv) {
|
|
|
37859
37997
|
};
|
|
37860
37998
|
}
|
|
37861
37999
|
await resumeDelegated(jobId, delegation.childJobId, childOutcome.result, db);
|
|
37862
|
-
return executeJob(jobId, deps,
|
|
38000
|
+
return executeJob(jobId, deps, runnerEnv);
|
|
37863
38001
|
}
|
|
37864
38002
|
throw err;
|
|
37865
38003
|
}
|
|
@@ -38078,7 +38216,7 @@ async function executeJob(jobId, deps, _runnerEnv) {
|
|
|
38078
38216
|
turn,
|
|
38079
38217
|
toolsUsed,
|
|
38080
38218
|
messages
|
|
38081
|
-
},
|
|
38219
|
+
}, runnerEnv).catch((e) => console.warn("[reflection]", e));
|
|
38082
38220
|
}
|
|
38083
38221
|
const [finalRow] = await db.select({ result: agentJobs.result }).from(agentJobs).where(eq4(agentJobs.id, jobId)).limit(1);
|
|
38084
38222
|
const propagatedResult = finalRow?.result ?? "";
|
|
@@ -38245,8 +38383,8 @@ function isValidWorkerSecret(provided, expected) {
|
|
|
38245
38383
|
}
|
|
38246
38384
|
|
|
38247
38385
|
// src/routes/worker.ts
|
|
38248
|
-
var WorkerRequestSchema =
|
|
38249
|
-
jobId:
|
|
38386
|
+
var WorkerRequestSchema = z90.object({
|
|
38387
|
+
jobId: z90.string().guid()
|
|
38250
38388
|
});
|
|
38251
38389
|
async function workerRoute(c, deps, runnerEnv) {
|
|
38252
38390
|
const workerSecret = runnerEnv.WORKER_SECRET;
|
|
@@ -38275,11 +38413,11 @@ async function runJobBackground(jobId, deps, runnerEnv) {
|
|
|
38275
38413
|
}
|
|
38276
38414
|
|
|
38277
38415
|
// src/routes/approve.ts
|
|
38278
|
-
import { z as
|
|
38279
|
-
var ApproveRequestSchema =
|
|
38280
|
-
approvalRequestId:
|
|
38281
|
-
decision:
|
|
38282
|
-
notes:
|
|
38416
|
+
import { z as z91 } from "zod";
|
|
38417
|
+
var ApproveRequestSchema = z91.object({
|
|
38418
|
+
approvalRequestId: z91.string().guid(),
|
|
38419
|
+
decision: z91.enum(["approve", "reject"]),
|
|
38420
|
+
notes: z91.string().optional()
|
|
38283
38421
|
});
|
|
38284
38422
|
async function approveRoute(c, deps, runnerEnv) {
|
|
38285
38423
|
const body = await c.req.json().catch(() => null);
|
|
@@ -38774,16 +38912,16 @@ ${body || "(no result)"}`;
|
|
|
38774
38912
|
}
|
|
38775
38913
|
|
|
38776
38914
|
// src/reflection/run-curator.ts
|
|
38777
|
-
import { z as
|
|
38915
|
+
import { z as z92 } from "zod";
|
|
38778
38916
|
var CURATOR_TRACE = "[curator]";
|
|
38779
|
-
var CreateSkillArgs2 =
|
|
38780
|
-
slug:
|
|
38781
|
-
name:
|
|
38782
|
-
content:
|
|
38783
|
-
description:
|
|
38917
|
+
var CreateSkillArgs2 = z92.object({
|
|
38918
|
+
slug: z92.string().regex(/^[a-z0-9-]+$/, "Slug must be lowercase alphanumeric with hyphens only.").min(1),
|
|
38919
|
+
name: z92.string().min(1),
|
|
38920
|
+
content: z92.string().min(1),
|
|
38921
|
+
description: z92.string().optional()
|
|
38784
38922
|
});
|
|
38785
|
-
var ArchiveSkillArgs =
|
|
38786
|
-
skillId:
|
|
38923
|
+
var ArchiveSkillArgs = z92.object({
|
|
38924
|
+
skillId: z92.string().uuid("skillId must be a valid UUID.")
|
|
38787
38925
|
});
|
|
38788
38926
|
function buildCuratorSystemPrompt(candidateList) {
|
|
38789
38927
|
return `You are the SKILL CURATOR for this entity. Your job is to keep the agent-created skill library small and discoverable.
|
|
@@ -39111,17 +39249,17 @@ async function cronRoute(c, deps) {
|
|
|
39111
39249
|
}
|
|
39112
39250
|
|
|
39113
39251
|
// src/routes/chat.ts
|
|
39114
|
-
import { z as
|
|
39252
|
+
import { z as z94 } from "zod";
|
|
39115
39253
|
|
|
39116
39254
|
// src/chat/run-chat-turn.ts
|
|
39117
|
-
import { z as
|
|
39255
|
+
import { z as z93 } from "zod";
|
|
39118
39256
|
var HISTORY_LIMIT = 20;
|
|
39119
39257
|
var DEFAULT_MODEL = "claude-sonnet-4-6-20260217";
|
|
39120
39258
|
var TITLE_MAX = 60;
|
|
39121
39259
|
var CHAT_TOOLS = {
|
|
39122
39260
|
run_task: {
|
|
39123
39261
|
description: "Your gateway to EVERY capability you have. Calling this runs a tracked job with your full toolset \u2014 connectors, skills, delegation to your team, and (as the workspace ROOT) creating agents, skills, MCP servers, connectors or automations. Use it for ANY action: send, fetch, create, configure, publish, or multi-step work. Pass a clear, self-contained instruction. Never decline an action the user asks for \u2014 escalate it here. For plain conversation or recalling facts, reply in text instead (do not call this).",
|
|
39124
|
-
inputSchema:
|
|
39262
|
+
inputSchema: z93.object({ instruction: z93.string().min(1).max(4e3) })
|
|
39125
39263
|
}
|
|
39126
39264
|
};
|
|
39127
39265
|
var ESCALATION_RECHECK = "Re-read your previous reply. If it committed to performing an action \u2014 running, launching, sending, fetching, creating, configuring, delegating, or any task or tool use \u2014 then your text ALONE did nothing: call the run_task tool NOW with a clear, self-contained instruction. If your reply was pure conversation, a question, or simply recalling a fact, do not call any tool \u2014 the conversation is complete.";
|
|
@@ -39286,12 +39424,12 @@ async function runChatTurn(opts) {
|
|
|
39286
39424
|
}
|
|
39287
39425
|
|
|
39288
39426
|
// src/routes/chat.ts
|
|
39289
|
-
var ChatRequestSchema =
|
|
39290
|
-
entityId:
|
|
39291
|
-
agentId:
|
|
39292
|
-
conversationId:
|
|
39427
|
+
var ChatRequestSchema = z94.object({
|
|
39428
|
+
entityId: z94.string().guid(),
|
|
39429
|
+
agentId: z94.string().guid(),
|
|
39430
|
+
conversationId: z94.string().guid(),
|
|
39293
39431
|
// Generous cap (matches the web SendChatMessageSchema): large pasted skills/personalities.
|
|
39294
|
-
message:
|
|
39432
|
+
message: z94.string().min(1).max(2e5)
|
|
39295
39433
|
});
|
|
39296
39434
|
async function chatRoute(c, deps, runnerEnv) {
|
|
39297
39435
|
const body = await c.req.json().catch(() => null);
|
|
@@ -39315,13 +39453,13 @@ async function chatRoute(c, deps, runnerEnv) {
|
|
|
39315
39453
|
}
|
|
39316
39454
|
|
|
39317
39455
|
// src/routes/skills.ts
|
|
39318
|
-
import { z as
|
|
39319
|
-
var InstallRequestSchema =
|
|
39320
|
-
source:
|
|
39321
|
-
entityId:
|
|
39456
|
+
import { z as z95 } from "zod";
|
|
39457
|
+
var InstallRequestSchema = z95.object({
|
|
39458
|
+
source: z95.string().min(1).max(2048),
|
|
39459
|
+
entityId: z95.string().guid()
|
|
39322
39460
|
});
|
|
39323
|
-
var UninstallRequestSchema =
|
|
39324
|
-
slug:
|
|
39461
|
+
var UninstallRequestSchema = z95.object({
|
|
39462
|
+
slug: z95.string().min(1).max(128)
|
|
39325
39463
|
});
|
|
39326
39464
|
function checkWorkerSecret(c, runnerEnv) {
|
|
39327
39465
|
const secret = runnerEnv.WORKER_SECRET;
|
|
@@ -39617,11 +39755,11 @@ function startTelegramManager(deps, opts) {
|
|
|
39617
39755
|
if (existing.botToken !== token) {
|
|
39618
39756
|
existing.controller.abort();
|
|
39619
39757
|
await existing.exit;
|
|
39620
|
-
|
|
39758
|
+
spawn3(row.id, row.entityId, token, row.botUsername, row.offset ?? 0);
|
|
39621
39759
|
}
|
|
39622
39760
|
continue;
|
|
39623
39761
|
}
|
|
39624
|
-
|
|
39762
|
+
spawn3(row.id, row.entityId, token, row.botUsername, row.offset ?? 0);
|
|
39625
39763
|
}
|
|
39626
39764
|
for (const [agentId, poller] of active) {
|
|
39627
39765
|
if (seen.has(agentId)) continue;
|
|
@@ -39630,7 +39768,7 @@ function startTelegramManager(deps, opts) {
|
|
|
39630
39768
|
active.delete(agentId);
|
|
39631
39769
|
}
|
|
39632
39770
|
}
|
|
39633
|
-
function
|
|
39771
|
+
function spawn3(agentId, agentEntityId, botToken, botUsername, startOffset) {
|
|
39634
39772
|
const controller = new AbortController();
|
|
39635
39773
|
const exit = runTelegramPoller({
|
|
39636
39774
|
agentId,
|
|
@@ -41106,6 +41244,37 @@ Office tools enforce a hard 25 MiB cap per file (read and write). Files larger t
|
|
|
41106
41244
|
`
|
|
41107
41245
|
};
|
|
41108
41246
|
|
|
41247
|
+
// ../../packages/catalog/src/skills/command-execution.ts
|
|
41248
|
+
var commandExecutionSkill = {
|
|
41249
|
+
slug: "command-execution",
|
|
41250
|
+
name: "Command execution",
|
|
41251
|
+
description: 'Run shell commands in the agent workspace (install deps, run scripts, build steps, CLIs). Every command requires your approval by default; an optional per-agent "Yolo" mode auto-runs them.',
|
|
41252
|
+
requiredBuiltins: ["run_command"],
|
|
41253
|
+
content: `## Command execution
|
|
41254
|
+
|
|
41255
|
+
This skill unlocks the \`run_command\` tool, which runs a shell command in the agent's workspace and returns its **stdout**, **stderr** and **exit code**. Use it for anything that needs the shell: installing dependencies (\`npm install\`, \`pip install\`), running scripts (\`node build.js\`, \`python gen.py\`), build steps, or CLI tools.
|
|
41256
|
+
|
|
41257
|
+
### How it runs
|
|
41258
|
+
|
|
41259
|
+
- The command runs via **cmd.exe** on Windows and **/bin/sh** on Unix, so shell features like \`&&\`, \`|\` and quoting work.
|
|
41260
|
+
- The working directory defaults to the **workspace root**. Pass \`cwd\` (a workspace-relative path, e.g. \`"scripts/canvas"\`) to run somewhere else inside the workspace.
|
|
41261
|
+
- Default timeout is **300 seconds**; pass \`timeout_seconds\` to change it (e.g. a long native build). On timeout the command and its child processes are killed.
|
|
41262
|
+
|
|
41263
|
+
### Discipline
|
|
41264
|
+
|
|
41265
|
+
1. **Run, then finish.** As soon as a command gives you the output you need, STOP \u2014 deliver the result to the user with \`return_result\` (or \`dashboard_publish\`) and end your turn. A successful command (exit 0) is DONE; re-running it, or running another just to "double-check", only re-prompts the user for approval and goes nowhere. Run another command ONLY if the task genuinely requires a different one.
|
|
41266
|
+
2. **Batch multi-step work into ONE call.** A compound command (\`npm install && node download_font.js && node draw_text.js\`) runs as a single \`run_command\` \u2014 and, in approval mode, is **one approval** instead of three. Prefer this over three separate calls.
|
|
41267
|
+
3. **A non-zero exit code is data, not a crash.** It is returned to you with stderr \u2014 read it, fix the cause, and retry a corrected command. Do not silently repeat the same failing command.
|
|
41268
|
+
4. **Stay in the workspace.** Read/write files with the \`file_*\` tools and target the workspace; \`cwd\` cannot point outside it.
|
|
41269
|
+
5. **Non-interactive only.** Commands that wait for input (a \`y/n\` prompt, a password) will hang until the timeout. Use non-interactive flags (e.g. \`npm install --yes\`, \`--no-input\`).
|
|
41270
|
+
6. **Output is capped** (~100k characters per stream). If you need full output of a verbose command, redirect it to a file in the workspace and read it back with \`file_read\`.
|
|
41271
|
+
|
|
41272
|
+
### Approval vs Yolo
|
|
41273
|
+
|
|
41274
|
+
By default **every command pauses for human approval** \u2014 the user sees the exact command before it runs and approves or rejects it. If the user has enabled **Yolo mode** for this agent (in the agent's settings), commands run immediately without asking. Either way, announce what you are about to run and why before calling the tool.
|
|
41275
|
+
`
|
|
41276
|
+
};
|
|
41277
|
+
|
|
41109
41278
|
// ../../packages/catalog/src/index.ts
|
|
41110
41279
|
var systemSkills = [
|
|
41111
41280
|
obsidianSkill,
|
|
@@ -41118,7 +41287,8 @@ var systemSkills = [
|
|
|
41118
41287
|
verifyBeforeDoneSkill,
|
|
41119
41288
|
citationDisciplineSkill,
|
|
41120
41289
|
safeToolUseSkill,
|
|
41121
|
-
officeEditingSkill
|
|
41290
|
+
officeEditingSkill,
|
|
41291
|
+
commandExecutionSkill
|
|
41122
41292
|
];
|
|
41123
41293
|
var systemSkillSlugs = systemSkills.map((s) => s.slug);
|
|
41124
41294
|
|