nodal-agents 0.3.8 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/README.md +6 -6
  2. package/cli.js +5 -0
  3. package/migrations/0023_agent_schedules_notify_on_success.sql +10 -0
  4. package/migrations/meta/_journal.json +7 -0
  5. package/package.json +1 -1
  6. package/runner.js +1230 -1066
  7. package/web/.next/BUILD_ID +1 -1
  8. package/web/.next/app-path-routes-manifest.json +1 -1
  9. package/web/.next/build-manifest.json +2 -2
  10. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +2 -2
  11. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js.nft.json +1 -1
  12. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page_client-reference-manifest.js +1 -1
  13. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js +1 -1
  14. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page_client-reference-manifest.js +1 -1
  15. package/web/.next/server/app/(dashboard)/agents/page.js +1 -1
  16. package/web/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
  17. package/web/.next/server/app/(dashboard)/approvals/page.js +1 -1
  18. package/web/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
  19. package/web/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  20. package/web/.next/server/app/(dashboard)/automations/page.js +2 -2
  21. package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -1
  22. package/web/.next/server/app/(dashboard)/billing/page.js +1 -1
  23. package/web/.next/server/app/(dashboard)/billing/page_client-reference-manifest.js +1 -1
  24. package/web/.next/server/app/(dashboard)/connectors/page.js +1 -1
  25. package/web/.next/server/app/(dashboard)/connectors/page.js.nft.json +1 -1
  26. package/web/.next/server/app/(dashboard)/connectors/page_client-reference-manifest.js +1 -1
  27. package/web/.next/server/app/(dashboard)/credentials/page.js +1 -1
  28. package/web/.next/server/app/(dashboard)/credentials/page.js.nft.json +1 -1
  29. package/web/.next/server/app/(dashboard)/credentials/page_client-reference-manifest.js +1 -1
  30. package/web/.next/server/app/(dashboard)/jobs/[id]/page.js +1 -1
  31. package/web/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
  32. package/web/.next/server/app/(dashboard)/jobs/page.js +1 -1
  33. package/web/.next/server/app/(dashboard)/jobs/page.js.nft.json +1 -1
  34. package/web/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -1
  35. package/web/.next/server/app/(dashboard)/llm-providers/page.js +2 -2
  36. package/web/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
  37. package/web/.next/server/app/(dashboard)/logs/page.js +2 -2
  38. package/web/.next/server/app/(dashboard)/logs/page_client-reference-manifest.js +1 -1
  39. package/web/.next/server/app/(dashboard)/mcp/page.js +1 -1
  40. package/web/.next/server/app/(dashboard)/mcp/page_client-reference-manifest.js +1 -1
  41. package/web/.next/server/app/(dashboard)/memories/page.js +2 -2
  42. package/web/.next/server/app/(dashboard)/memories/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/(dashboard)/page.js +1 -1
  44. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  45. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  46. package/web/.next/server/app/(dashboard)/settings/page.js +2 -2
  47. package/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  48. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +1 -1
  49. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js.nft.json +1 -1
  50. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/(dashboard)/skills/new/page.js +1 -1
  52. package/web/.next/server/app/(dashboard)/skills/new/page.js.nft.json +1 -1
  53. package/web/.next/server/app/(dashboard)/skills/new/page_client-reference-manifest.js +1 -1
  54. package/web/.next/server/app/(dashboard)/skills/page.js +2 -2
  55. package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
  56. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/_global-error.html +1 -1
  58. package/web/.next/server/app/_global-error.rsc +1 -1
  59. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  60. package/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  61. package/web/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  62. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  63. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  64. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  65. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  66. package/web/.next/server/app/_not-found.html +1 -1
  67. package/web/.next/server/app/_not-found.rsc +2 -2
  68. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  69. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  70. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  71. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  72. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  73. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  74. package/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
  75. package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/onboarding.html +1 -1
  77. package/web/.next/server/app/onboarding.rsc +2 -2
  78. package/web/.next/server/app/onboarding.segments/_full.segment.rsc +2 -2
  79. package/web/.next/server/app/onboarding.segments/_head.segment.rsc +1 -1
  80. package/web/.next/server/app/onboarding.segments/_index.segment.rsc +2 -2
  81. package/web/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
  82. package/web/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +1 -1
  83. package/web/.next/server/app/onboarding.segments/onboarding.segment.rsc +1 -1
  84. package/web/.next/server/app-paths-manifest.json +1 -1
  85. package/web/.next/server/chunks/4574.js +1 -1
  86. package/web/.next/server/chunks/5163.js +1 -0
  87. package/web/.next/server/chunks/6680.js +1 -0
  88. package/web/.next/server/chunks/7741.js +2 -2
  89. package/web/.next/server/chunks/8013.js +1 -0
  90. package/web/.next/server/chunks/{8193.js → 9140.js} +1 -1
  91. package/web/.next/server/middleware-build-manifest.js +1 -1
  92. package/web/.next/server/pages/404.html +1 -1
  93. package/web/.next/server/pages/500.html +1 -1
  94. package/web/.next/server/server-reference-manifest.js +1 -1
  95. package/web/.next/server/server-reference-manifest.json +1 -1
  96. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/{page-daa833e779c2b465.js → page-d3724fbf38b71806.js} +1 -1
  97. package/web/.next/static/chunks/app/(dashboard)/automations/page-4807e81e2af3030e.js +1 -0
  98. package/web/.next/static/chunks/app/(dashboard)/mcp/{page-6cd433a027afdf32.js → page-3fa9d4448a31b696.js} +1 -1
  99. package/web/.next/static/chunks/app/(dashboard)/settings/{page-550fcfa4184838ea.js → page-8bc69f353f8d48a3.js} +1 -1
  100. package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/{page-5fab5bdd950d7037.js → page-0b61f21847f4c7a0.js} +1 -1
  101. package/web/.next/static/chunks/app/(dashboard)/skills/new/{page-86cfe805e82b43aa.js → page-9de96e643c361732.js} +1 -1
  102. package/web/.next/static/css/90e1bf719df42081.css +3 -0
  103. package/web/.next/server/chunks/1248.js +0 -1
  104. package/web/.next/server/chunks/3362.js +0 -1
  105. package/web/.next/server/chunks/5527.js +0 -1
  106. package/web/.next/static/chunks/app/(dashboard)/automations/page-70005fabd08ae4a5.js +0 -1
  107. package/web/.next/static/css/e7183ce0b0791ec7.css +0 -3
  108. /package/web/.next/static/{4iUNkSxNfwq7_PqLIuvuO → oCvSEboPKulEdUGcfE5Px}/_buildManifest.js +0 -0
  109. /package/web/.next/static/{4iUNkSxNfwq7_PqLIuvuO → oCvSEboPKulEdUGcfE5Px}/_ssgManifest.js +0 -0
package/runner.js CHANGED
@@ -960,10 +960,11 @@ function parseRootGrants(raw) {
960
960
  const src = raw !== null && typeof raw === "object" ? raw : {};
961
961
  const createAgent = typeof src["createAgent"] === "boolean" ? src["createAgent"] : DEFAULT_ROOT_GRANTS.createAgent;
962
962
  const createSkill = typeof src["createSkill"] === "boolean" ? src["createSkill"] : DEFAULT_ROOT_GRANTS.createSkill;
963
+ const updateSkill = typeof src["updateSkill"] === "boolean" ? src["updateSkill"] : DEFAULT_ROOT_GRANTS.updateSkill;
963
964
  const assignSkill = typeof src["assignSkill"] === "boolean" ? src["assignSkill"] : DEFAULT_ROOT_GRANTS.assignSkill;
964
965
  const autonomyParsed = AutonomyLevelSchema.safeParse(src["autonomy"]);
965
966
  const autonomy = autonomyParsed.success ? autonomyParsed.data : DEFAULT_ROOT_GRANTS.autonomy;
966
- return { createAgent, createSkill, assignSkill, autonomy };
967
+ return { createAgent, createSkill, updateSkill, assignSkill, autonomy };
967
968
  }
968
969
  var AutonomyLevelSchema, RootGrantsSchema, DEFAULT_ROOT_GRANTS, META_TOOL_BY_GRANT;
969
970
  var init_root_agent = __esm({
@@ -973,18 +974,21 @@ var init_root_agent = __esm({
973
974
  RootGrantsSchema = z19.object({
974
975
  createAgent: z19.boolean(),
975
976
  createSkill: z19.boolean(),
977
+ updateSkill: z19.boolean(),
976
978
  assignSkill: z19.boolean(),
977
979
  autonomy: AutonomyLevelSchema
978
980
  });
979
981
  DEFAULT_ROOT_GRANTS = {
980
982
  createAgent: true,
981
983
  createSkill: true,
984
+ updateSkill: true,
982
985
  assignSkill: true,
983
986
  autonomy: "propose_confirm"
984
987
  };
985
988
  META_TOOL_BY_GRANT = {
986
989
  createAgent: "create_agent",
987
990
  createSkill: "create_skill",
991
+ updateSkill: "update_skill",
988
992
  assignSkill: "attach_skill"
989
993
  };
990
994
  }
@@ -1811,6 +1815,10 @@ var init_schedules = __esm({
1811
1815
  nextRun: timestamp14("next_run", { withTimezone: true }),
1812
1816
  lastStatus: text14("last_status"),
1813
1817
  chatId: text14("chat_id"),
1818
+ // Opt-in: when true, a fired job carries a delivery target so the runner
1819
+ // forces the agent to send the user a success confirmation before finishing.
1820
+ // Default false → the cron runs silently (the user must opt in per schedule).
1821
+ notifyOnSuccess: boolean8("notify_on_success").notNull().default(false),
1814
1822
  createdAt: timestamp14("created_at", { withTimezone: true }).defaultNow(),
1815
1823
  updatedAt: timestamp14("updated_at", { withTimezone: true }).defaultNow()
1816
1824
  },
@@ -9998,6 +10006,20 @@ async function createSkillRepo(db, entityId, input) {
9998
10006
  throw err;
9999
10007
  }
10000
10008
  }
10009
+ async function updateSkillRepo(db, entityId, skillId, patch) {
10010
+ const [existing] = await db.select({ id: agentSkills.id }).from(agentSkills).where(and2(eq3(agentSkills.id, skillId), eq3(agentSkills.entityId, entityId)));
10011
+ if (!existing) return { error: "not_found" };
10012
+ const set = { updatedAt: /* @__PURE__ */ new Date() };
10013
+ if (patch.name !== void 0) set.name = patch.name;
10014
+ if (patch.description !== void 0) set.description = patch.description;
10015
+ if (patch.active !== void 0) set.active = patch.active;
10016
+ if (patch.content !== void 0) {
10017
+ set.content = patch.content;
10018
+ set.contentOverridden = true;
10019
+ }
10020
+ await db.update(agentSkills).set(set).where(eq3(agentSkills.id, skillId));
10021
+ return { ok: true };
10022
+ }
10001
10023
  async function assignSkillRepo(db, entityId, input, systemSkillSlugs2) {
10002
10024
  const [skill] = await db.select({ id: agentSkills.id }).from(agentSkills).where(
10003
10025
  and2(
@@ -12879,6 +12901,47 @@ var OFFICE_TOOLS = [
12879
12901
 
12880
12902
  // ../../packages/tools/src/builtin/meta-ops/create-skill.ts
12881
12903
  import { z as z35 } from "zod";
12904
+
12905
+ // ../../packages/tools/src/builtin/meta-ops/lint-skill-content.ts
12906
+ function slugToPrefix(slug) {
12907
+ return slug.replace(/[^a-z0-9]+/gi, "_").toLowerCase();
12908
+ }
12909
+ async function listWorkspaceMcpToolNames(db, entityId) {
12910
+ const rows = await db.select({ slug: mcpServers.slug, availableTools: mcpServers.availableTools }).from(mcpServers).where(and3(eq4(mcpServers.entityId, entityId), eq4(mcpServers.active, true)));
12911
+ const names = [];
12912
+ for (const r of rows) {
12913
+ const prefix = slugToPrefix(r.slug);
12914
+ const tools = Array.isArray(r.availableTools) ? r.availableTools : [];
12915
+ for (const t of tools) {
12916
+ const name = typeof t === "string" ? t : t && typeof t === "object" && "name" in t ? String(t.name) : "";
12917
+ if (name) names.push(`${prefix}__${name}`);
12918
+ }
12919
+ }
12920
+ return names;
12921
+ }
12922
+ var CONVENTION_HINT = 'NodalAI MCP tools are named "<server-slug>__<tool>" (e.g. "airtable__list_records_for_table", "apify__apify--rag-web-browser"). There is NO "mcp__\u2026" prefix and no Claude-Desktop / Cursor / Claude-in-Chrome tooling here. Built-in and connector tools are bare snake_case and need no namespace. If you adapted an example from another platform, translate its tool names to NodalAI, or omit tool names and let the agent discover them at runtime.';
12923
+ async function lintSkillContent(db, entityId, content) {
12924
+ if (/"mcpServers"\s*:/.test(content)) {
12925
+ return {
12926
+ ok: false,
12927
+ error: `This skill embeds a \`"mcpServers": \u2026\` config block, which belongs to another MCP client (Claude Desktop / Cursor), not NodalAI. Remove it. ${CONVENTION_HINT}`
12928
+ };
12929
+ }
12930
+ const allow = new Set(await listWorkspaceMcpToolNames(db, entityId));
12931
+ const tokens = content.match(/\b[\w-]+__[\w-]+\b/g) ?? [];
12932
+ const offenders = [...new Set(tokens)].filter((tok) => !allow.has(tok));
12933
+ if (offenders.length > 0) {
12934
+ const available = allow.size > 0 ? [...allow].slice(0, 40).join(", ") : "(no MCP servers connected in this workspace)";
12935
+ return {
12936
+ ok: false,
12937
+ error: `This skill references tool names that don't exist in this workspace: ${offenders.join(", ")}. ${CONVENTION_HINT} Available MCP tools here: ${available}.`
12938
+ };
12939
+ }
12940
+ return { ok: true };
12941
+ }
12942
+
12943
+ // ../../packages/tools/src/builtin/meta-ops/create-skill.ts
12944
+ var SKILL_AUTHORING_GUIDE = ' AUTHORING FOR NODALAI: a skill is a prompt fragment for an agent running on THIS platform. Reference tools by their NodalAI names only \u2014 MCP tools are "<server-slug>__<tool>" (e.g. "airtable__list_records_for_table", "apify__apify--rag-web-browser"); built-in and connector tools are bare snake_case (e.g. "save_memory"). There is NO "mcp__\u2026" prefix and no Claude-Desktop / Cursor / Claude-in-Chrome tooling here. If you adapt an example from another platform, TRANSLATE its tool names to NodalAI. Prefer DISCOVERING schemas at runtime (list tables/fields) over hardcoding IDs that go stale. Do not invent tool names \u2014 references to tools that do not exist in this workspace are rejected.';
12882
12945
  var CreateSkillInput = z35.object({
12883
12946
  slug: z35.string().regex(/^[a-z0-9-]+$/, "Slug must be lowercase alphanumeric with hyphens only.").min(1).describe('URL-safe identifier for the skill (e.g. "customer-support-v2").'),
12884
12947
  name: z35.string().min(1).describe("Human-readable display name for the skill."),
@@ -12887,10 +12950,14 @@ var CreateSkillInput = z35.object({
12887
12950
  });
12888
12951
  var createSkillTool = {
12889
12952
  name: "create_skill",
12890
- description: "Create a new skill for this entity. The skill can then be assigned to agents via attach_skill. slug must be lowercase alphanumeric + hyphens. Fails with an error if the slug is already taken.",
12953
+ description: "Create a new skill for this entity. The skill can then be assigned to agents via attach_skill. slug must be lowercase alphanumeric + hyphens. Fails with an error if the slug is already taken." + SKILL_AUTHORING_GUIDE,
12891
12954
  inputSchema: CreateSkillInput,
12892
12955
  riskLevel: "write",
12893
12956
  execute: async (input, ctx) => {
12957
+ const lint = await lintSkillContent(ctx.db, ctx.entityId, input.content);
12958
+ if (!lint.ok) {
12959
+ return { ok: false, error: lint.error };
12960
+ }
12894
12961
  const result = await createSkillRepo(ctx.db, ctx.entityId, {
12895
12962
  slug: input.slug,
12896
12963
  name: input.name,
@@ -12910,11 +12977,61 @@ var createSkillTool = {
12910
12977
  }
12911
12978
  };
12912
12979
 
12913
- // ../../packages/tools/src/builtin/meta-ops/assign-skill.ts
12980
+ // ../../packages/tools/src/builtin/meta-ops/update-skill.ts
12914
12981
  import { z as z36 } from "zod";
12915
- var AssignSkillInput = z36.object({
12916
- skillSlug: z36.string().min(1).describe('The slug OR name of the skill to assign (e.g. "customer-support-v2").'),
12917
- agentSlug: z36.string().min(1).describe("The slug OR name of the agent to assign the skill to.")
12982
+ var UpdateSkillInput = z36.object({
12983
+ skillSlug: z36.string().min(1).describe("The slug OR name of the skill to update."),
12984
+ name: z36.string().min(1).optional().describe("New display name (optional)."),
12985
+ description: z36.string().optional().describe("New short description (optional)."),
12986
+ content: z36.string().min(1).optional().describe("New skill instructions, replacing the current ones (optional)."),
12987
+ active: z36.boolean().optional().describe("Enable (true) or disable (false) the skill (optional).")
12988
+ });
12989
+ var updateSkillTool = {
12990
+ name: "update_skill",
12991
+ description: "Update an existing skill in this entity (content, name, description, or active). Identify the skill by its slug OR name. The slug itself cannot be changed. Provide at least one field to change. Returns an error if the skill is not found." + SKILL_AUTHORING_GUIDE,
12992
+ inputSchema: UpdateSkillInput,
12993
+ riskLevel: "write",
12994
+ execute: async (input, ctx) => {
12995
+ if (input.name === void 0 && input.description === void 0 && input.content === void 0 && input.active === void 0) {
12996
+ return {
12997
+ ok: false,
12998
+ error: "Nothing to update: provide at least one of name, description, content, active."
12999
+ };
13000
+ }
13001
+ if (input.content !== void 0) {
13002
+ const lint = await lintSkillContent(ctx.db, ctx.entityId, input.content);
13003
+ if (!lint.ok) return { ok: false, error: lint.error };
13004
+ }
13005
+ const [skillRow] = await ctx.db.select({ id: agentSkills.id, name: agentSkills.name }).from(agentSkills).where(
13006
+ and3(
13007
+ eq4(agentSkills.entityId, ctx.entityId),
13008
+ or2(eq4(agentSkills.slug, input.skillSlug), ilike(agentSkills.name, input.skillSlug))
13009
+ )
13010
+ ).limit(1);
13011
+ if (!skillRow) {
13012
+ return {
13013
+ ok: false,
13014
+ error: `Skill "${input.skillSlug}" not found in this entity. Use create_skill to make a new one.`
13015
+ };
13016
+ }
13017
+ const result = await updateSkillRepo(ctx.db, ctx.entityId, skillRow.id, {
13018
+ name: input.name,
13019
+ description: input.description,
13020
+ content: input.content,
13021
+ active: input.active
13022
+ });
13023
+ if ("error" in result) {
13024
+ return { ok: false, error: `Skill "${input.skillSlug}" not found in this entity.` };
13025
+ }
13026
+ return { ok: true, message: `Updated skill "${skillRow.name}" (${input.skillSlug}).` };
13027
+ }
13028
+ };
13029
+
13030
+ // ../../packages/tools/src/builtin/meta-ops/assign-skill.ts
13031
+ import { z as z37 } from "zod";
13032
+ var AssignSkillInput = z37.object({
13033
+ skillSlug: z37.string().min(1).describe('The slug OR name of the skill to assign (e.g. "customer-support-v2").'),
13034
+ agentSlug: z37.string().min(1).describe("The slug OR name of the agent to assign the skill to.")
12918
13035
  });
12919
13036
  var assignSkillTool = {
12920
13037
  name: "attach_skill",
@@ -12974,16 +13091,16 @@ var assignSkillTool = {
12974
13091
  };
12975
13092
 
12976
13093
  // ../../packages/tools/src/builtin/meta-ops/create-agent.ts
12977
- import { z as z37 } from "zod";
12978
- var CreateAgentInput = z37.object({
12979
- slug: z37.string().regex(/^[a-z0-9-]+$/, "Slug must be lowercase alphanumeric with hyphens only.").min(1).describe('URL-safe identifier for the agent (e.g. "support-bot").'),
12980
- name: z37.string().min(1).describe("Human-readable display name for the agent."),
12981
- personality: z37.string().min(1).describe("System prompt / personality instructions for the agent."),
12982
- model: z37.string().min(1).describe('LLM model identifier (e.g. "claude-sonnet-4-6-20260217").'),
12983
- role: z37.enum(["worker", "router", "planner"]).describe(
13094
+ import { z as z38 } from "zod";
13095
+ var CreateAgentInput = z38.object({
13096
+ slug: z38.string().regex(/^[a-z0-9-]+$/, "Slug must be lowercase alphanumeric with hyphens only.").min(1).describe('URL-safe identifier for the agent (e.g. "support-bot").'),
13097
+ name: z38.string().min(1).describe("Human-readable display name for the agent."),
13098
+ personality: z38.string().min(1).describe("System prompt / personality instructions for the agent."),
13099
+ model: z38.string().min(1).describe('LLM model identifier (e.g. "claude-sonnet-4-6-20260217").'),
13100
+ role: z38.enum(["worker", "router", "planner"]).describe(
12984
13101
  "Agent role: worker = standard task-running agent; router = orchestrator that routes to sub-agents; planner = orchestrator that plans and delegates."
12985
13102
  ),
12986
- subAgentSlugs: z37.array(z37.string().min(1)).optional().describe(
13103
+ subAgentSlugs: z38.array(z38.string().min(1)).optional().describe(
12987
13104
  "Slugs of existing agents to assign as sub-agents (for router/planner roles). Optional."
12988
13105
  )
12989
13106
  });
@@ -13056,6 +13173,7 @@ var createAgentTool = {
13056
13173
  // ../../packages/tools/src/builtin/meta-ops/index.ts
13057
13174
  var META_TOOLS = [
13058
13175
  createSkillTool,
13176
+ updateSkillTool,
13059
13177
  assignSkillTool,
13060
13178
  createAgentTool
13061
13179
  ];
@@ -13109,7 +13227,7 @@ var ALWAYS_ON_TOOL_DOCS = [
13109
13227
  ];
13110
13228
 
13111
13229
  // ../../packages/tools/src/communication/telegram-send-message.ts
13112
- import { z as z38 } from "zod";
13230
+ import { z as z39 } from "zod";
13113
13231
 
13114
13232
  // ../../packages/delivery/src/errors.ts
13115
13233
  var DeliveryError = class extends Error {
@@ -13245,9 +13363,9 @@ async function getTelegramUpdates(opts) {
13245
13363
  }
13246
13364
 
13247
13365
  // ../../packages/tools/src/communication/telegram-send-message.ts
13248
- var TelegramSendMessageInput = z38.object({
13249
- chatId: z38.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."),
13250
- text: z38.string().min(1).max(4096).describe("The message text to send.")
13366
+ var TelegramSendMessageInput = z39.object({
13367
+ chatId: z39.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."),
13368
+ text: z39.string().min(1).max(4096).describe("The message text to send.")
13251
13369
  });
13252
13370
  function createTelegramSendMessageTool() {
13253
13371
  return {
@@ -13452,14 +13570,14 @@ async function healthRoute(c, deps) {
13452
13570
  }
13453
13571
 
13454
13572
  // src/routes/agent.ts
13455
- import { z as z39 } from "zod";
13456
- var AgentRequestSchema = z39.object({
13457
- task: z39.string().min(1).max(1e4),
13458
- agentSlug: z39.string().optional(),
13459
- channel: z39.enum(["telegram", "api", "whatsapp", "internal", "cron", "task-board", "slack", "discord"]).default("api"),
13460
- chatId: z39.string().optional().nullable(),
13461
- parentJobId: z39.string().guid().optional().nullable(),
13462
- triggerImmediately: z39.boolean().default(true)
13573
+ import { z as z40 } from "zod";
13574
+ var AgentRequestSchema = z40.object({
13575
+ task: z40.string().min(1).max(1e4),
13576
+ agentSlug: z40.string().optional(),
13577
+ channel: z40.enum(["telegram", "api", "whatsapp", "internal", "cron", "task-board", "slack", "discord"]).default("api"),
13578
+ chatId: z40.string().optional().nullable(),
13579
+ parentJobId: z40.string().guid().optional().nullable(),
13580
+ triggerImmediately: z40.boolean().default(true)
13463
13581
  });
13464
13582
  async function agentRoute(c, deps, runnerEnv) {
13465
13583
  const body = await c.req.json().catch(() => null);
@@ -13521,7 +13639,7 @@ async function triggerWorker(jobId, runnerEnv) {
13521
13639
  }
13522
13640
 
13523
13641
  // src/routes/worker.ts
13524
- import { z as z84 } from "zod";
13642
+ import { z as z85 } from "zod";
13525
13643
 
13526
13644
  // src/job/execute.ts
13527
13645
  init_src();
@@ -13533,7 +13651,7 @@ function createNotionClient(apiKey) {
13533
13651
  }
13534
13652
 
13535
13653
  // ../../packages/adapters/notion/src/tools/search.ts
13536
- import { z as z40 } from "zod";
13654
+ import { z as z41 } from "zod";
13537
13655
 
13538
13656
  // ../../packages/adapters/notion/src/errors.ts
13539
13657
  import { APIResponseError } from "@notionhq/client";
@@ -13730,10 +13848,10 @@ function extractTitle(obj) {
13730
13848
  }
13731
13849
 
13732
13850
  // ../../packages/adapters/notion/src/tools/search.ts
13733
- var SearchInput = z40.object({
13734
- query: z40.string().describe("Text to search for in page and database titles."),
13735
- limit: z40.number().int().min(1).max(100).optional().default(10).describe("Max results to return (1\u2013100, default 10)."),
13736
- filter_type: z40.enum(["page", "database"]).optional().describe("Optional: restrict results to pages or databases only.")
13851
+ var SearchInput = z41.object({
13852
+ query: z41.string().describe("Text to search for in page and database titles."),
13853
+ limit: z41.number().int().min(1).max(100).optional().default(10).describe("Max results to return (1\u2013100, default 10)."),
13854
+ filter_type: z41.enum(["page", "database"]).optional().describe("Optional: restrict results to pages or databases only.")
13737
13855
  });
13738
13856
  function createSearchTool(client) {
13739
13857
  return {
@@ -13769,7 +13887,7 @@ function createSearchTool(client) {
13769
13887
  }
13770
13888
 
13771
13889
  // ../../packages/adapters/notion/src/tools/pages.ts
13772
- import { z as z41 } from "zod";
13890
+ import { z as z42 } from "zod";
13773
13891
 
13774
13892
  // ../../packages/adapters/notion/src/helpers/pagination.ts
13775
13893
  async function paginateAll(fetcher, pageSize = 100, maxItems = 500) {
@@ -13908,8 +14026,8 @@ function blocksToText(blocks, maxLength = 15e3) {
13908
14026
  }
13909
14027
 
13910
14028
  // ../../packages/adapters/notion/src/tools/pages.ts
13911
- var GetPageInput = z41.object({
13912
- page_id: z41.string().describe("Notion page ID (UUID or dashed UUID).")
14029
+ var GetPageInput = z42.object({
14030
+ page_id: z42.string().describe("Notion page ID (UUID or dashed UUID).")
13913
14031
  });
13914
14032
  function createGetPageTool(client) {
13915
14033
  return {
@@ -13948,9 +14066,9 @@ function createGetPageTool(client) {
13948
14066
  }
13949
14067
  };
13950
14068
  }
13951
- var GetPageContentInput = z41.object({
13952
- page_id: z41.string().describe("Notion page or block ID whose content to read."),
13953
- max_blocks: z41.number().int().min(1).max(1e3).optional().default(300).describe("Maximum number of blocks to fetch (default 300).")
14069
+ var GetPageContentInput = z42.object({
14070
+ page_id: z42.string().describe("Notion page or block ID whose content to read."),
14071
+ max_blocks: z42.number().int().min(1).max(1e3).optional().default(300).describe("Maximum number of blocks to fetch (default 300).")
13954
14072
  });
13955
14073
  function createGetPageContentTool(client) {
13956
14074
  return {
@@ -13978,15 +14096,15 @@ function createGetPageContentTool(client) {
13978
14096
  }
13979
14097
  };
13980
14098
  }
13981
- var CreatePageInput = z41.object({
13982
- parent_page_id: z41.string().optional().describe(
14099
+ var CreatePageInput = z42.object({
14100
+ parent_page_id: z42.string().optional().describe(
13983
14101
  "ID of the parent PAGE. Use when creating a sub-page inside another page. Mutually exclusive with parent_database_id."
13984
14102
  ),
13985
- parent_database_id: z41.string().optional().describe(
14103
+ parent_database_id: z42.string().optional().describe(
13986
14104
  "ID of the parent DATABASE. Use when creating a new row inside a database. Mutually exclusive with parent_page_id."
13987
14105
  ),
13988
- title: z41.string().describe("Title of the new page."),
13989
- content: z41.string().optional().describe("Optional paragraph text to add as the first block. Auto-chunked if >2000 chars.")
14106
+ title: z42.string().describe("Title of the new page."),
14107
+ content: z42.string().optional().describe("Optional paragraph text to add as the first block. Auto-chunked if >2000 chars.")
13990
14108
  });
13991
14109
  function createCreatePageTool(client) {
13992
14110
  return {
@@ -14050,9 +14168,9 @@ function createCreatePageTool(client) {
14050
14168
  }
14051
14169
  };
14052
14170
  }
14053
- var UpdatePageInput = z41.object({
14054
- page_id: z41.string().describe("Page ID to update."),
14055
- properties: z41.record(z41.string(), z41.unknown()).describe(
14171
+ var UpdatePageInput = z42.object({
14172
+ page_id: z42.string().describe("Page ID to update."),
14173
+ properties: z42.record(z42.string(), z42.unknown()).describe(
14056
14174
  'Properties to update as key-value pairs. Example: {"Status": "Done", "Priority": "High", "Score": 95}'
14057
14175
  )
14058
14176
  });
@@ -14093,8 +14211,8 @@ function createUpdatePageTool(client) {
14093
14211
  }
14094
14212
  };
14095
14213
  }
14096
- var ArchivePageInput = z41.object({
14097
- page_id: z41.string().describe("Page ID to archive.")
14214
+ var ArchivePageInput = z42.object({
14215
+ page_id: z42.string().describe("Page ID to archive.")
14098
14216
  });
14099
14217
  function createArchivePageTool(client) {
14100
14218
  return {
@@ -14114,9 +14232,9 @@ function createArchivePageTool(client) {
14114
14232
  }
14115
14233
 
14116
14234
  // ../../packages/adapters/notion/src/tools/blocks.ts
14117
- import { z as z42 } from "zod";
14118
- var GetBlockInput = z42.object({
14119
- block_id: z42.string().describe("Block ID to retrieve.")
14235
+ import { z as z43 } from "zod";
14236
+ var GetBlockInput = z43.object({
14237
+ block_id: z43.string().describe("Block ID to retrieve.")
14120
14238
  });
14121
14239
  function createGetBlockTool(client) {
14122
14240
  return {
@@ -14140,8 +14258,8 @@ function createGetBlockTool(client) {
14140
14258
  }
14141
14259
  };
14142
14260
  }
14143
- var BlockItemSchema = z42.object({
14144
- type: z42.enum([
14261
+ var BlockItemSchema = z43.object({
14262
+ type: z43.enum([
14145
14263
  "paragraph",
14146
14264
  "heading_1",
14147
14265
  "heading_2",
@@ -14155,13 +14273,13 @@ var BlockItemSchema = z42.object({
14155
14273
  "toggle",
14156
14274
  "divider"
14157
14275
  ]).describe("Block type."),
14158
- content: z42.string().optional().default("").describe("Text content for the block (not used for divider)."),
14159
- language: z42.string().optional().describe('Programming language for code blocks (e.g. "python", "javascript").'),
14160
- checked: z42.boolean().optional().default(false).describe("Whether a to_do block is checked.")
14276
+ content: z43.string().optional().default("").describe("Text content for the block (not used for divider)."),
14277
+ language: z43.string().optional().describe('Programming language for code blocks (e.g. "python", "javascript").'),
14278
+ checked: z43.boolean().optional().default(false).describe("Whether a to_do block is checked.")
14161
14279
  });
14162
- var AppendBlocksInput = z42.object({
14163
- page_id: z42.string().describe("Page or block ID to append content to."),
14164
- blocks: z42.array(BlockItemSchema).min(1).max(100).describe(
14280
+ var AppendBlocksInput = z43.object({
14281
+ page_id: z43.string().describe("Page or block ID to append content to."),
14282
+ blocks: z43.array(BlockItemSchema).min(1).max(100).describe(
14165
14283
  'Array of blocks to add. Example: [{"type": "heading_2", "content": "Summary"}, {"type": "paragraph", "content": "The results show..."}]'
14166
14284
  )
14167
14285
  });
@@ -14210,9 +14328,9 @@ function createAppendBlocksTool(client) {
14210
14328
  }
14211
14329
  };
14212
14330
  }
14213
- var UpdateBlockInput = z42.object({
14214
- block_id: z42.string().describe("Block ID to update."),
14215
- content: z42.string().describe("New text content for the block.")
14331
+ var UpdateBlockInput = z43.object({
14332
+ block_id: z43.string().describe("Block ID to update."),
14333
+ content: z43.string().describe("New text content for the block.")
14216
14334
  });
14217
14335
  function createUpdateBlockTool(client) {
14218
14336
  return {
@@ -14237,8 +14355,8 @@ function createUpdateBlockTool(client) {
14237
14355
  }
14238
14356
  };
14239
14357
  }
14240
- var DeleteBlockInput = z42.object({
14241
- block_id: z42.string().describe("Block ID to delete (archive).")
14358
+ var DeleteBlockInput = z43.object({
14359
+ block_id: z43.string().describe("Block ID to delete (archive).")
14242
14360
  });
14243
14361
  function createDeleteBlockTool(client) {
14244
14362
  return {
@@ -14258,14 +14376,14 @@ function createDeleteBlockTool(client) {
14258
14376
  }
14259
14377
 
14260
14378
  // ../../packages/adapters/notion/src/tools/databases.ts
14261
- import { z as z43 } from "zod";
14262
- var QueryDatabaseInput = z43.object({
14263
- database_id: z43.string().describe("Notion database ID (UUID)."),
14264
- filter: z43.record(z43.string(), z43.unknown()).optional().describe(
14379
+ import { z as z44 } from "zod";
14380
+ var QueryDatabaseInput = z44.object({
14381
+ database_id: z44.string().describe("Notion database ID (UUID)."),
14382
+ filter: z44.record(z44.string(), z44.unknown()).optional().describe(
14265
14383
  'Optional Notion filter object. Example: {"property": "Status", "select": {"equals": "Applied"}}'
14266
14384
  ),
14267
- page_size: z43.number().int().min(1).max(100).optional().default(50).describe("Rows per request (1\u2013100, default 50)."),
14268
- max_rows: z43.number().int().min(1).max(1e3).optional().default(500).describe("Total rows to collect across pagination (default 500, max 1000).")
14385
+ page_size: z44.number().int().min(1).max(100).optional().default(50).describe("Rows per request (1\u2013100, default 50)."),
14386
+ max_rows: z44.number().int().min(1).max(1e3).optional().default(500).describe("Total rows to collect across pagination (default 500, max 1000).")
14269
14387
  });
14270
14388
  function createQueryDatabaseTool(client) {
14271
14389
  return {
@@ -14318,8 +14436,8 @@ function createQueryDatabaseTool(client) {
14318
14436
  }
14319
14437
  };
14320
14438
  }
14321
- var GetDatabaseInput = z43.object({
14322
- database_id: z43.string().describe("Notion database ID (UUID).")
14439
+ var GetDatabaseInput = z44.object({
14440
+ database_id: z44.string().describe("Notion database ID (UUID).")
14323
14441
  });
14324
14442
  function createGetDatabaseTool(client) {
14325
14443
  return {
@@ -14358,9 +14476,9 @@ function createGetDatabaseTool(client) {
14358
14476
  }
14359
14477
  };
14360
14478
  }
14361
- var CreateDatabaseEntryInput = z43.object({
14362
- database_id: z43.string().describe("Notion database ID to add a row to."),
14363
- properties: z43.record(z43.string(), z43.unknown()).describe(
14479
+ var CreateDatabaseEntryInput = z44.object({
14480
+ database_id: z44.string().describe("Notion database ID to add a row to."),
14481
+ properties: z44.record(z44.string(), z44.unknown()).describe(
14364
14482
  'Row properties as key-value pairs. Example: {"Name": "Acme Corp", "Status": "Applied", "Score": 95}'
14365
14483
  )
14366
14484
  });
@@ -14411,12 +14529,12 @@ function createCreateDatabaseEntryTool(client) {
14411
14529
  }
14412
14530
  };
14413
14531
  }
14414
- var UpdateDatabaseEntryInput = z43.object({
14415
- page_id: z43.string().describe("Page ID of the database row to update."),
14416
- database_id: z43.string().optional().describe(
14532
+ var UpdateDatabaseEntryInput = z44.object({
14533
+ page_id: z44.string().describe("Page ID of the database row to update."),
14534
+ database_id: z44.string().optional().describe(
14417
14535
  "Optional: database ID to fetch schema for type coercion. If omitted, types are inferred from values."
14418
14536
  ),
14419
- properties: z43.record(z43.string(), z43.unknown()).describe('Properties to update as key-value pairs. Example: {"Status": "Done", "Score": 100}')
14537
+ properties: z44.record(z44.string(), z44.unknown()).describe('Properties to update as key-value pairs. Example: {"Status": "Done", "Score": 100}')
14420
14538
  });
14421
14539
  function createUpdateDatabaseEntryTool(client) {
14422
14540
  return {
@@ -14467,7 +14585,7 @@ function createUpdateDatabaseEntryTool(client) {
14467
14585
  }
14468
14586
  };
14469
14587
  }
14470
- var ColumnTypeSchema = z43.enum([
14588
+ var ColumnTypeSchema = z44.enum([
14471
14589
  "title",
14472
14590
  "rich_text",
14473
14591
  "number",
@@ -14480,10 +14598,10 @@ var ColumnTypeSchema = z43.enum([
14480
14598
  "multi_select",
14481
14599
  "status"
14482
14600
  ]);
14483
- var CreateDatabaseInput = z43.object({
14484
- parent_page_id: z43.string().describe("Page ID that will contain the new database."),
14485
- title: z43.string().describe("Database title."),
14486
- columns: z43.record(z43.string(), ColumnTypeSchema).describe(
14601
+ var CreateDatabaseInput = z44.object({
14602
+ parent_page_id: z44.string().describe("Page ID that will contain the new database."),
14603
+ title: z44.string().describe("Database title."),
14604
+ columns: z44.record(z44.string(), ColumnTypeSchema).describe(
14487
14605
  'Column definitions as {name: type}. One must be "title". Example: {"Name": "title", "Status": "select", "URL": "url", "Score": "number"}'
14488
14606
  )
14489
14607
  });
@@ -14529,10 +14647,10 @@ function createCreateDatabaseTool(client) {
14529
14647
  }
14530
14648
  };
14531
14649
  }
14532
- var UpdateDatabaseInput = z43.object({
14533
- database_id: z43.string().describe("Database ID to update."),
14534
- title: z43.string().optional().describe("Optional new title for the database."),
14535
- new_columns: z43.record(z43.string(), ColumnTypeSchema).optional().describe(
14650
+ var UpdateDatabaseInput = z44.object({
14651
+ database_id: z44.string().describe("Database ID to update."),
14652
+ title: z44.string().optional().describe("Optional new title for the database."),
14653
+ new_columns: z44.record(z44.string(), ColumnTypeSchema).optional().describe(
14536
14654
  "New columns to add as {name: type}. Same types as notion_create_database. Cannot modify existing column types (Notion API limitation)."
14537
14655
  )
14538
14656
  });
@@ -14574,10 +14692,10 @@ function createUpdateDatabaseTool(client) {
14574
14692
  }
14575
14693
 
14576
14694
  // ../../packages/adapters/notion/src/tools/comments.ts
14577
- import { z as z44 } from "zod";
14578
- var ListCommentsInput = z44.object({
14579
- block_id: z44.string().describe("Page or block ID to list comments for."),
14580
- page_size: z44.number().int().min(1).max(50).optional().default(50).describe("Max comments to return (default 50).")
14695
+ import { z as z45 } from "zod";
14696
+ var ListCommentsInput = z45.object({
14697
+ block_id: z45.string().describe("Page or block ID to list comments for."),
14698
+ page_size: z45.number().int().min(1).max(50).optional().default(50).describe("Max comments to return (default 50).")
14581
14699
  });
14582
14700
  function createListCommentsTool(client) {
14583
14701
  return {
@@ -14610,9 +14728,9 @@ function createListCommentsTool(client) {
14610
14728
  }
14611
14729
  };
14612
14730
  }
14613
- var AddCommentInput = z44.object({
14614
- page_id: z44.string().describe("Page ID to comment on."),
14615
- text: z44.string().describe("Comment text.")
14731
+ var AddCommentInput = z45.object({
14732
+ page_id: z45.string().describe("Page ID to comment on."),
14733
+ text: z45.string().describe("Comment text.")
14616
14734
  });
14617
14735
  function createAddCommentTool(client) {
14618
14736
  return {
@@ -14635,9 +14753,9 @@ function createAddCommentTool(client) {
14635
14753
  }
14636
14754
 
14637
14755
  // ../../packages/adapters/notion/src/tools/users.ts
14638
- import { z as z45 } from "zod";
14639
- var ListUsersInput = z45.object({
14640
- page_size: z45.number().int().min(1).max(100).optional().default(100).describe("Max users to return (default 100).")
14756
+ import { z as z46 } from "zod";
14757
+ var ListUsersInput = z46.object({
14758
+ page_size: z46.number().int().min(1).max(100).optional().default(100).describe("Max users to return (default 100).")
14641
14759
  });
14642
14760
  function createListUsersTool(client) {
14643
14761
  return {
@@ -14665,8 +14783,8 @@ function createListUsersTool(client) {
14665
14783
  }
14666
14784
  };
14667
14785
  }
14668
- var GetUserInput = z45.object({
14669
- user_id: z45.string().describe("Notion user ID.")
14786
+ var GetUserInput = z46.object({
14787
+ user_id: z46.string().describe("Notion user ID.")
14670
14788
  });
14671
14789
  function createGetUserTool(client) {
14672
14790
  return {
@@ -14999,8 +15117,8 @@ function createAirtableClient(accessToken) {
14999
15117
  }
15000
15118
 
15001
15119
  // ../../packages/adapters/airtable/src/tools/bases.ts
15002
- import { z as z46 } from "zod";
15003
- var ListBasesInput = z46.object({});
15120
+ import { z as z47 } from "zod";
15121
+ var ListBasesInput = z47.object({});
15004
15122
  function makeAirtableListBasesTool(client) {
15005
15123
  return {
15006
15124
  name: "airtable_list_bases",
@@ -15023,8 +15141,8 @@ function makeAirtableListBasesTool(client) {
15023
15141
  }
15024
15142
  };
15025
15143
  }
15026
- var ListTablesInput = z46.object({
15027
- baseId: z46.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it.")
15144
+ var ListTablesInput = z47.object({
15145
+ baseId: z47.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it.")
15028
15146
  });
15029
15147
  function makeAirtableListTablesTool(client) {
15030
15148
  return {
@@ -15051,22 +15169,22 @@ function makeAirtableListTablesTool(client) {
15051
15169
  }
15052
15170
 
15053
15171
  // ../../packages/adapters/airtable/src/tools/records.ts
15054
- import { z as z47 } from "zod";
15055
- var SortItemSchema = z47.object({
15056
- field: z47.string().describe("Field name to sort by."),
15057
- direction: z47.enum(["asc", "desc"]).optional().describe("Sort direction (default asc).")
15172
+ import { z as z48 } from "zod";
15173
+ var SortItemSchema = z48.object({
15174
+ field: z48.string().describe("Field name to sort by."),
15175
+ direction: z48.enum(["asc", "desc"]).optional().describe("Sort direction (default asc).")
15058
15176
  });
15059
- var ListRecordsInput = z47.object({
15060
- baseId: z47.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15061
- tableIdOrName: z47.string().describe(
15177
+ var ListRecordsInput = z48.object({
15178
+ baseId: z48.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15179
+ tableIdOrName: z48.string().describe(
15062
15180
  "The table ID (tblXXXXXXXX) or name within the base. Use airtable_list_tables to find it."
15063
15181
  ),
15064
- view: z47.string().optional().describe("Name or ID of the view to use."),
15065
- pageSize: z47.number().int().min(1).max(100).optional().default(100).describe("Number of records per page (1\u2013100, default 100)."),
15066
- offset: z47.string().optional().describe("Pagination offset token from a previous response."),
15067
- fields: z47.array(z47.string()).optional().describe("List of field names to return. Omit to return all fields."),
15068
- filterByFormula: z47.string().optional().describe(`Airtable formula to filter records. Example: "AND({Status}='Active',{Score}>80)"`),
15069
- sort: z47.array(SortItemSchema).optional().describe("List of sort objects with field and optional direction.")
15182
+ view: z48.string().optional().describe("Name or ID of the view to use."),
15183
+ pageSize: z48.number().int().min(1).max(100).optional().default(100).describe("Number of records per page (1\u2013100, default 100)."),
15184
+ offset: z48.string().optional().describe("Pagination offset token from a previous response."),
15185
+ fields: z48.array(z48.string()).optional().describe("List of field names to return. Omit to return all fields."),
15186
+ filterByFormula: z48.string().optional().describe(`Airtable formula to filter records. Example: "AND({Status}='Active',{Score}>80)"`),
15187
+ sort: z48.array(SortItemSchema).optional().describe("List of sort objects with field and optional direction.")
15070
15188
  });
15071
15189
  function makeAirtableListRecordsTool(client) {
15072
15190
  return {
@@ -15112,10 +15230,10 @@ function makeAirtableListRecordsTool(client) {
15112
15230
  }
15113
15231
  };
15114
15232
  }
15115
- var GetRecordInput = z47.object({
15116
- baseId: z47.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15117
- tableIdOrName: z47.string().describe("The table ID or name within the base."),
15118
- recordId: z47.string().describe("The record ID (recXXXXXXXX) to retrieve.")
15233
+ var GetRecordInput = z48.object({
15234
+ baseId: z48.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15235
+ tableIdOrName: z48.string().describe("The table ID or name within the base."),
15236
+ recordId: z48.string().describe("The record ID (recXXXXXXXX) to retrieve.")
15119
15237
  });
15120
15238
  function makeAirtableGetRecordTool(client) {
15121
15239
  return {
@@ -15139,13 +15257,13 @@ function makeAirtableGetRecordTool(client) {
15139
15257
  }
15140
15258
  };
15141
15259
  }
15142
- var CreateRecordsInput = z47.object({
15143
- baseId: z47.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15144
- tableIdOrName: z47.string().describe("The table ID or name within the base."),
15145
- records: z47.array(z47.object({ fields: z47.record(z47.string(), z47.unknown()) })).min(1).max(10).describe(
15260
+ var CreateRecordsInput = z48.object({
15261
+ baseId: z48.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15262
+ tableIdOrName: z48.string().describe("The table ID or name within the base."),
15263
+ records: z48.array(z48.object({ fields: z48.record(z48.string(), z48.unknown()) })).min(1).max(10).describe(
15146
15264
  'Array of records to create, each with a fields object. Max 10 per call. Example: [{"fields": {"Name": "Alice", "Status": "Active"}}]'
15147
15265
  ),
15148
- typecast: z47.boolean().optional().describe(
15266
+ typecast: z48.boolean().optional().describe(
15149
15267
  "If true, Airtable will attempt to convert string values to the appropriate field type. Default false."
15150
15268
  )
15151
15269
  });
@@ -15176,14 +15294,14 @@ function makeAirtableCreateRecordsTool(client) {
15176
15294
  }
15177
15295
  };
15178
15296
  }
15179
- var UpdateRecordInput = z47.object({
15180
- baseId: z47.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15181
- tableIdOrName: z47.string().describe("The table ID or name within the base."),
15182
- recordId: z47.string().describe("The record ID (recXXXXXXXX) to update."),
15183
- fields: z47.record(z47.string(), z47.unknown()).describe(
15297
+ var UpdateRecordInput = z48.object({
15298
+ baseId: z48.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15299
+ tableIdOrName: z48.string().describe("The table ID or name within the base."),
15300
+ recordId: z48.string().describe("The record ID (recXXXXXXXX) to update."),
15301
+ fields: z48.record(z48.string(), z48.unknown()).describe(
15184
15302
  'Fields to update as key-value pairs. Only specified fields are changed (PATCH semantics). Example: {"Status": "Done", "Score": 95}'
15185
15303
  ),
15186
- typecast: z47.boolean().optional().describe("If true, attempt to convert string values to the appropriate field type.")
15304
+ typecast: z48.boolean().optional().describe("If true, attempt to convert string values to the appropriate field type.")
15187
15305
  });
15188
15306
  function makeAirtableUpdateRecordTool(client) {
15189
15307
  return {
@@ -15210,14 +15328,14 @@ function makeAirtableUpdateRecordTool(client) {
15210
15328
  }
15211
15329
  };
15212
15330
  }
15213
- var ReplaceRecordInput = z47.object({
15214
- baseId: z47.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15215
- tableIdOrName: z47.string().describe("The table ID or name within the base."),
15216
- recordId: z47.string().describe("The record ID (recXXXXXXXX) to replace."),
15217
- fields: z47.record(z47.string(), z47.unknown()).describe(
15331
+ var ReplaceRecordInput = z48.object({
15332
+ baseId: z48.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15333
+ tableIdOrName: z48.string().describe("The table ID or name within the base."),
15334
+ recordId: z48.string().describe("The record ID (recXXXXXXXX) to replace."),
15335
+ fields: z48.record(z48.string(), z48.unknown()).describe(
15218
15336
  "Complete field set to write. Fields NOT included will be cleared (PUT semantics). Use airtable_update_record for partial updates."
15219
15337
  ),
15220
- typecast: z47.boolean().optional().describe("If true, attempt to convert string values to the appropriate field type.")
15338
+ typecast: z48.boolean().optional().describe("If true, attempt to convert string values to the appropriate field type.")
15221
15339
  });
15222
15340
  function makeAirtableReplaceRecordTool(client) {
15223
15341
  return {
@@ -15244,10 +15362,10 @@ function makeAirtableReplaceRecordTool(client) {
15244
15362
  }
15245
15363
  };
15246
15364
  }
15247
- var DeleteRecordInput = z47.object({
15248
- baseId: z47.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15249
- tableIdOrName: z47.string().describe("The table ID or name within the base."),
15250
- recordId: z47.string().describe(
15365
+ var DeleteRecordInput = z48.object({
15366
+ baseId: z48.string().describe("The Airtable base ID (e.g. appXXXXXXXX). Use airtable_list_bases to find it."),
15367
+ tableIdOrName: z48.string().describe("The table ID or name within the base."),
15368
+ recordId: z48.string().describe(
15251
15369
  "The record ID (recXXXXXXXX) to delete. This action is permanent and cannot be undone."
15252
15370
  )
15253
15371
  });
@@ -15366,7 +15484,7 @@ function createDriveClient(accessToken) {
15366
15484
  }
15367
15485
 
15368
15486
  // ../../packages/adapters/google-drive/src/tools/list-files.ts
15369
- import { z as z48 } from "zod";
15487
+ import { z as z49 } from "zod";
15370
15488
 
15371
15489
  // ../../packages/adapters/google-drive/src/errors.ts
15372
15490
  var DriveAdapterError = class extends Error {
@@ -15442,12 +15560,12 @@ async function paginateDrive(fetcher, pageSize = 100, maxItems = 100) {
15442
15560
  }
15443
15561
 
15444
15562
  // ../../packages/adapters/google-drive/src/tools/list-files.ts
15445
- var ListFilesInput = z48.object({
15446
- query: z48.string().optional().describe(
15563
+ var ListFilesInput = z49.object({
15564
+ query: z49.string().optional().describe(
15447
15565
  `Google Drive search query. Examples: 'name contains "resume"' or '"folder-id" in parents' or 'mimeType="application/pdf"'. Leave empty to list recent files.`
15448
15566
  ),
15449
- max_results: z48.number().int().min(1).max(1e3).optional().describe("Max files to return (1\u20131000, default 20)."),
15450
- order_by: z48.string().optional().describe(
15567
+ max_results: z49.number().int().min(1).max(1e3).optional().describe("Max files to return (1\u20131000, default 20)."),
15568
+ order_by: z49.string().optional().describe(
15451
15569
  "Sort order. Examples: 'modifiedTime desc', 'name', 'createdTime'. Default: 'modifiedTime desc'."
15452
15570
  )
15453
15571
  });
@@ -15496,7 +15614,7 @@ function createListFilesTool(drive) {
15496
15614
  }
15497
15615
 
15498
15616
  // ../../packages/adapters/google-drive/src/tools/read-file.ts
15499
- import { z as z49 } from "zod";
15617
+ import { z as z50 } from "zod";
15500
15618
 
15501
15619
  // ../../packages/adapters/google-drive/src/extractors/docx.ts
15502
15620
  import mammoth2 from "mammoth";
@@ -15619,8 +15737,8 @@ async function extractFileText(buffer, mimeType, filename) {
15619
15737
 
15620
15738
  // ../../packages/adapters/google-drive/src/tools/read-file.ts
15621
15739
  var CHAR_CAP = 15e3;
15622
- var ReadFileInput = z49.object({
15623
- file_id: z49.string().describe("The Google Drive file ID (from drive_list_files or drive_get_file_info).")
15740
+ var ReadFileInput = z50.object({
15741
+ file_id: z50.string().describe("The Google Drive file ID (from drive_list_files or drive_get_file_info).")
15624
15742
  });
15625
15743
  function createReadFileTool(drive) {
15626
15744
  return {
@@ -15687,12 +15805,12 @@ function createReadFileTool(drive) {
15687
15805
  }
15688
15806
 
15689
15807
  // ../../packages/adapters/google-drive/src/tools/upload-file.ts
15690
- import { z as z50 } from "zod";
15691
- var UploadFileInput = z50.object({
15692
- name: z50.string().describe("File name including extension, e.g. 'cover_letter.txt'."),
15693
- content: z50.string().describe("Text content of the file."),
15694
- folder_id: z50.string().optional().describe("Optional Drive folder ID to place the file in."),
15695
- mime_type: z50.string().optional().describe("MIME type of the file. Default: 'text/plain'.")
15808
+ import { z as z51 } from "zod";
15809
+ var UploadFileInput = z51.object({
15810
+ name: z51.string().describe("File name including extension, e.g. 'cover_letter.txt'."),
15811
+ content: z51.string().describe("Text content of the file."),
15812
+ folder_id: z51.string().optional().describe("Optional Drive folder ID to place the file in."),
15813
+ mime_type: z51.string().optional().describe("MIME type of the file. Default: 'text/plain'.")
15696
15814
  });
15697
15815
  function createUploadFileTool(drive) {
15698
15816
  return {
@@ -15731,9 +15849,9 @@ function createUploadFileTool(drive) {
15731
15849
  }
15732
15850
 
15733
15851
  // ../../packages/adapters/google-drive/src/tools/get-file-info.ts
15734
- import { z as z51 } from "zod";
15735
- var GetFileInfoInput = z51.object({
15736
- file_id: z51.string().describe("Google Drive file ID.")
15852
+ import { z as z52 } from "zod";
15853
+ var GetFileInfoInput = z52.object({
15854
+ file_id: z52.string().describe("Google Drive file ID.")
15737
15855
  });
15738
15856
  function createGetFileInfoTool(drive) {
15739
15857
  return {
@@ -15769,10 +15887,10 @@ function createGetFileInfoTool(drive) {
15769
15887
  }
15770
15888
 
15771
15889
  // ../../packages/adapters/google-drive/src/tools/create-folder.ts
15772
- import { z as z52 } from "zod";
15773
- var CreateFolderInput = z52.object({
15774
- name: z52.string().describe("Folder name."),
15775
- parent_id: z52.string().optional().describe("Optional parent folder ID. Creates in root if omitted.")
15890
+ import { z as z53 } from "zod";
15891
+ var CreateFolderInput = z53.object({
15892
+ name: z53.string().describe("Folder name."),
15893
+ parent_id: z53.string().optional().describe("Optional parent folder ID. Creates in root if omitted.")
15776
15894
  });
15777
15895
  function createCreateFolderTool(drive) {
15778
15896
  return {
@@ -15804,10 +15922,10 @@ function createCreateFolderTool(drive) {
15804
15922
  }
15805
15923
 
15806
15924
  // ../../packages/adapters/google-drive/src/tools/move-file.ts
15807
- import { z as z53 } from "zod";
15808
- var MoveFileInput = z53.object({
15809
- file_id: z53.string().describe("File ID to move."),
15810
- new_parent_id: z53.string().describe("Destination folder ID.")
15925
+ import { z as z54 } from "zod";
15926
+ var MoveFileInput = z54.object({
15927
+ file_id: z54.string().describe("File ID to move."),
15928
+ new_parent_id: z54.string().describe("Destination folder ID.")
15811
15929
  });
15812
15930
  function createMoveFileTool(drive) {
15813
15931
  return {
@@ -15841,10 +15959,10 @@ function createMoveFileTool(drive) {
15841
15959
  }
15842
15960
 
15843
15961
  // ../../packages/adapters/google-drive/src/tools/rename-file.ts
15844
- import { z as z54 } from "zod";
15845
- var RenameFileInput = z54.object({
15846
- file_id: z54.string().describe("File ID to rename."),
15847
- new_name: z54.string().describe("New file name (including extension).")
15962
+ import { z as z55 } from "zod";
15963
+ var RenameFileInput = z55.object({
15964
+ file_id: z55.string().describe("File ID to rename."),
15965
+ new_name: z55.string().describe("New file name (including extension).")
15848
15966
  });
15849
15967
  function createRenameFileTool(drive) {
15850
15968
  return {
@@ -15871,11 +15989,11 @@ function createRenameFileTool(drive) {
15871
15989
  }
15872
15990
 
15873
15991
  // ../../packages/adapters/google-drive/src/tools/copy-file.ts
15874
- import { z as z55 } from "zod";
15875
- var CopyFileInput = z55.object({
15876
- file_id: z55.string().describe("File ID to copy."),
15877
- new_name: z55.string().optional().describe("Optional name for the copy."),
15878
- folder_id: z55.string().optional().describe("Optional destination folder ID for the copy.")
15992
+ import { z as z56 } from "zod";
15993
+ var CopyFileInput = z56.object({
15994
+ file_id: z56.string().describe("File ID to copy."),
15995
+ new_name: z56.string().optional().describe("Optional name for the copy."),
15996
+ folder_id: z56.string().optional().describe("Optional destination folder ID for the copy.")
15879
15997
  });
15880
15998
  function createCopyFileTool(drive) {
15881
15999
  return {
@@ -15906,9 +16024,9 @@ function createCopyFileTool(drive) {
15906
16024
  }
15907
16025
 
15908
16026
  // ../../packages/adapters/google-drive/src/tools/delete-file.ts
15909
- import { z as z56 } from "zod";
15910
- var DeleteFileInput = z56.object({
15911
- file_id: z56.string().describe("File ID to move to trash.")
16027
+ import { z as z57 } from "zod";
16028
+ var DeleteFileInput = z57.object({
16029
+ file_id: z57.string().describe("File ID to move to trash.")
15912
16030
  });
15913
16031
  function createDeleteFileTool(drive) {
15914
16032
  return {
@@ -15936,12 +16054,12 @@ function createDeleteFileTool(drive) {
15936
16054
  }
15937
16055
 
15938
16056
  // ../../packages/adapters/google-drive/src/tools/share-file.ts
15939
- import { z as z57 } from "zod";
15940
- var ShareFileInput = z57.object({
15941
- file_id: z57.string().describe("File ID to share."),
15942
- email: z57.string().optional().describe("Email address to share with. Omit for link sharing (anyone with link)."),
15943
- role: z57.enum(["reader", "writer", "commenter", "owner"]).optional().describe("Permission role: 'reader', 'writer', 'commenter', or 'owner'. Default: 'reader'."),
15944
- type: z57.enum(["user", "group", "domain", "anyone"]).optional().describe(
16057
+ import { z as z58 } from "zod";
16058
+ var ShareFileInput = z58.object({
16059
+ file_id: z58.string().describe("File ID to share."),
16060
+ email: z58.string().optional().describe("Email address to share with. Omit for link sharing (anyone with link)."),
16061
+ role: z58.enum(["reader", "writer", "commenter", "owner"]).optional().describe("Permission role: 'reader', 'writer', 'commenter', or 'owner'. Default: 'reader'."),
16062
+ type: z58.enum(["user", "group", "domain", "anyone"]).optional().describe(
15945
16063
  "Permission type: 'user', 'group', 'domain', or 'anyone'. Defaults to 'user' if email provided, 'anyone' otherwise."
15946
16064
  )
15947
16065
  });
@@ -15981,9 +16099,9 @@ function createShareFileTool(drive) {
15981
16099
  }
15982
16100
 
15983
16101
  // ../../packages/adapters/google-drive/src/tools/list-permissions.ts
15984
- import { z as z58 } from "zod";
15985
- var ListPermissionsInput = z58.object({
15986
- file_id: z58.string().describe("File ID to list permissions for.")
16102
+ import { z as z59 } from "zod";
16103
+ var ListPermissionsInput = z59.object({
16104
+ file_id: z59.string().describe("File ID to list permissions for.")
15987
16105
  });
15988
16106
  function createListPermissionsTool(drive) {
15989
16107
  return {
@@ -16013,11 +16131,11 @@ function createListPermissionsTool(drive) {
16013
16131
  }
16014
16132
 
16015
16133
  // ../../packages/adapters/google-drive/src/tools/export-file.ts
16016
- import { z as z59 } from "zod";
16134
+ import { z as z60 } from "zod";
16017
16135
  var CHAR_CAP2 = 15e3;
16018
- var ExportFileInput = z59.object({
16019
- file_id: z59.string().describe("Google Drive file ID. Must be a Google Workspace file (Doc, Sheet, Slide, etc.)."),
16020
- mime_type: z59.string().describe(
16136
+ var ExportFileInput = z60.object({
16137
+ file_id: z60.string().describe("Google Drive file ID. Must be a Google Workspace file (Doc, Sheet, Slide, etc.)."),
16138
+ mime_type: z60.string().describe(
16021
16139
  "Target MIME type. Examples: 'text/plain', 'text/csv', 'application/pdf', 'text/html', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'."
16022
16140
  )
16023
16141
  });
@@ -16188,7 +16306,7 @@ function createGmailClient(accessToken) {
16188
16306
  }
16189
16307
 
16190
16308
  // ../../packages/adapters/gmail/src/tools/messages.ts
16191
- import { z as z60 } from "zod";
16309
+ import { z as z61 } from "zod";
16192
16310
 
16193
16311
  // ../../packages/adapters/gmail/src/errors.ts
16194
16312
  var GmailAdapterError = class extends Error {
@@ -16445,20 +16563,20 @@ function buildRfc2822Message(opts) {
16445
16563
 
16446
16564
  // ../../packages/adapters/gmail/src/tools/messages.ts
16447
16565
  var BODY_CHAR_CAP = 1e4;
16448
- var AttachmentItemSchema = z60.object({
16449
- filename: z60.string().describe("File name shown in the email, e.g. 'report.html'."),
16450
- content: z60.string().describe("File content as a string (plain text by default, or base64 if encoding is base64)."),
16451
- mimeType: z60.string().optional().describe("MIME type, e.g. 'text/html'. Inferred from filename if omitted."),
16452
- encoding: z60.enum(["text", "base64"]).optional().describe("How content is encoded. Default 'text'. Use 'base64' for pre-encoded binaries.")
16453
- });
16454
- var SendEmailInput = z60.object({
16455
- to: z60.string().describe("Recipient email address or comma-separated list."),
16456
- subject: z60.string().describe("Email subject line."),
16457
- body: z60.string().describe("Email body \u2014 plain text or HTML."),
16458
- cc: z60.string().optional().describe("CC address(es), comma-separated."),
16459
- bcc: z60.string().optional().describe("BCC address(es), comma-separated."),
16460
- reply_to: z60.string().optional().describe("Reply-To header."),
16461
- attachments: z60.array(AttachmentItemSchema).optional().describe(
16566
+ var AttachmentItemSchema = z61.object({
16567
+ filename: z61.string().describe("File name shown in the email, e.g. 'report.html'."),
16568
+ content: z61.string().describe("File content as a string (plain text by default, or base64 if encoding is base64)."),
16569
+ mimeType: z61.string().optional().describe("MIME type, e.g. 'text/html'. Inferred from filename if omitted."),
16570
+ encoding: z61.enum(["text", "base64"]).optional().describe("How content is encoded. Default 'text'. Use 'base64' for pre-encoded binaries.")
16571
+ });
16572
+ var SendEmailInput = z61.object({
16573
+ to: z61.string().describe("Recipient email address or comma-separated list."),
16574
+ subject: z61.string().describe("Email subject line."),
16575
+ body: z61.string().describe("Email body \u2014 plain text or HTML."),
16576
+ cc: z61.string().optional().describe("CC address(es), comma-separated."),
16577
+ bcc: z61.string().optional().describe("BCC address(es), comma-separated."),
16578
+ reply_to: z61.string().optional().describe("Reply-To header."),
16579
+ attachments: z61.array(AttachmentItemSchema).optional().describe(
16462
16580
  "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."
16463
16581
  )
16464
16582
  });
@@ -16493,12 +16611,12 @@ function createSendEmailTool(gmail) {
16493
16611
  }
16494
16612
  };
16495
16613
  }
16496
- var ListMessagesInput = z60.object({
16497
- query: z60.string().optional().describe(
16614
+ var ListMessagesInput = z61.object({
16615
+ query: z61.string().optional().describe(
16498
16616
  "Gmail search query. Examples: 'is:unread', 'from:alice@example.com', 'subject:invoice newer_than:7d'. Default: lists recent messages in inbox."
16499
16617
  ),
16500
- max_results: z60.number().int().min(1).max(500).optional().describe("Max messages to return (1\u2013500, default 20)."),
16501
- include_spam_trash: z60.boolean().optional().describe("Include messages from SPAM and TRASH (default false).")
16618
+ max_results: z61.number().int().min(1).max(500).optional().describe("Max messages to return (1\u2013500, default 20)."),
16619
+ include_spam_trash: z61.boolean().optional().describe("Include messages from SPAM and TRASH (default false).")
16502
16620
  });
16503
16621
  function createListMessagesTool(gmail) {
16504
16622
  return {
@@ -16567,8 +16685,8 @@ function createListMessagesTool(gmail) {
16567
16685
  }
16568
16686
  };
16569
16687
  }
16570
- var GetMessageInput = z60.object({
16571
- message_id: z60.string().describe("Gmail message ID (from gmail_list_messages).")
16688
+ var GetMessageInput = z61.object({
16689
+ message_id: z61.string().describe("Gmail message ID (from gmail_list_messages).")
16572
16690
  });
16573
16691
  function createGetMessageTool(gmail) {
16574
16692
  return {
@@ -16609,11 +16727,11 @@ function createGetMessageTool(gmail) {
16609
16727
  }
16610
16728
  };
16611
16729
  }
16612
- var ReplyMessageInput = z60.object({
16613
- message_id: z60.string().describe("ID of the message to reply to."),
16614
- body: z60.string().describe("Reply body \u2014 plain text or HTML."),
16615
- cc: z60.string().optional().describe("CC address(es), comma-separated."),
16616
- attachments: z60.array(AttachmentItemSchema).optional().describe("Optional attachments to include with the reply.")
16730
+ var ReplyMessageInput = z61.object({
16731
+ message_id: z61.string().describe("ID of the message to reply to."),
16732
+ body: z61.string().describe("Reply body \u2014 plain text or HTML."),
16733
+ cc: z61.string().optional().describe("CC address(es), comma-separated."),
16734
+ attachments: z61.array(AttachmentItemSchema).optional().describe("Optional attachments to include with the reply.")
16617
16735
  });
16618
16736
  function createReplyMessageTool(gmail) {
16619
16737
  return {
@@ -16663,11 +16781,11 @@ function createReplyMessageTool(gmail) {
16663
16781
  }
16664
16782
  };
16665
16783
  }
16666
- var ForwardMessageInput = z60.object({
16667
- message_id: z60.string().describe("ID of the message to forward."),
16668
- to: z60.string().describe("Recipient(s), comma-separated."),
16669
- note: z60.string().optional().describe("Optional note prepended before the forwarded body."),
16670
- cc: z60.string().optional().describe("CC address(es), comma-separated.")
16784
+ var ForwardMessageInput = z61.object({
16785
+ message_id: z61.string().describe("ID of the message to forward."),
16786
+ to: z61.string().describe("Recipient(s), comma-separated."),
16787
+ note: z61.string().optional().describe("Optional note prepended before the forwarded body."),
16788
+ cc: z61.string().optional().describe("CC address(es), comma-separated.")
16671
16789
  });
16672
16790
  function createForwardMessageTool(gmail) {
16673
16791
  return {
@@ -16717,10 +16835,10 @@ To: ${headers["to"] ?? ""}
16717
16835
  }
16718
16836
  };
16719
16837
  }
16720
- var ModifyLabelsInput = z60.object({
16721
- message_id: z60.string().describe("Gmail message ID."),
16722
- add_labels: z60.array(z60.string()).optional().describe("Label IDs or system labels to add, e.g. ['STARRED', 'IMPORTANT']."),
16723
- remove_labels: z60.array(z60.string()).optional().describe("Label IDs or system labels to remove, e.g. ['UNREAD', 'INBOX'].")
16838
+ var ModifyLabelsInput = z61.object({
16839
+ message_id: z61.string().describe("Gmail message ID."),
16840
+ add_labels: z61.array(z61.string()).optional().describe("Label IDs or system labels to add, e.g. ['STARRED', 'IMPORTANT']."),
16841
+ remove_labels: z61.array(z61.string()).optional().describe("Label IDs or system labels to remove, e.g. ['UNREAD', 'INBOX'].")
16724
16842
  });
16725
16843
  function createModifyLabelsTool(gmail) {
16726
16844
  return {
@@ -16754,8 +16872,8 @@ function createModifyLabelsTool(gmail) {
16754
16872
  }
16755
16873
  };
16756
16874
  }
16757
- var TrashMessageInput = z60.object({
16758
- message_id: z60.string().describe("Gmail message ID to move to Trash.")
16875
+ var TrashMessageInput = z61.object({
16876
+ message_id: z61.string().describe("Gmail message ID to move to Trash.")
16759
16877
  });
16760
16878
  function createTrashMessageTool(gmail) {
16761
16879
  return {
@@ -16779,8 +16897,8 @@ function createTrashMessageTool(gmail) {
16779
16897
  }
16780
16898
  };
16781
16899
  }
16782
- var UntrashMessageInput = z60.object({
16783
- message_id: z60.string().describe("Gmail message ID to restore from Trash.")
16900
+ var UntrashMessageInput = z61.object({
16901
+ message_id: z61.string().describe("Gmail message ID to restore from Trash.")
16784
16902
  });
16785
16903
  function createUntrashMessageTool(gmail) {
16786
16904
  return {
@@ -16804,8 +16922,8 @@ function createUntrashMessageTool(gmail) {
16804
16922
  }
16805
16923
  };
16806
16924
  }
16807
- var DeleteMessageInput = z60.object({
16808
- message_id: z60.string().describe("Gmail message ID to permanently delete.")
16925
+ var DeleteMessageInput = z61.object({
16926
+ message_id: z61.string().describe("Gmail message ID to permanently delete.")
16809
16927
  });
16810
16928
  function createDeleteMessageTool(gmail) {
16811
16929
  return {
@@ -16828,12 +16946,12 @@ function createDeleteMessageTool(gmail) {
16828
16946
  }
16829
16947
 
16830
16948
  // ../../packages/adapters/gmail/src/tools/threads.ts
16831
- import { z as z61 } from "zod";
16949
+ import { z as z62 } from "zod";
16832
16950
  var BODY_CHAR_CAP2 = 5e3;
16833
- var ListThreadsInput = z61.object({
16834
- query: z61.string().optional().describe("Gmail search query. Examples: 'is:unread', 'from:alice@example.com label:work'."),
16835
- max_results: z61.number().int().min(1).max(500).optional().describe("Max threads to return (1\u2013500, default 20)."),
16836
- include_spam_trash: z61.boolean().optional().describe("Include threads from SPAM and TRASH (default false).")
16951
+ var ListThreadsInput = z62.object({
16952
+ query: z62.string().optional().describe("Gmail search query. Examples: 'is:unread', 'from:alice@example.com label:work'."),
16953
+ max_results: z62.number().int().min(1).max(500).optional().describe("Max threads to return (1\u2013500, default 20)."),
16954
+ include_spam_trash: z62.boolean().optional().describe("Include threads from SPAM and TRASH (default false).")
16837
16955
  });
16838
16956
  function createListThreadsTool(gmail) {
16839
16957
  return {
@@ -16876,8 +16994,8 @@ function createListThreadsTool(gmail) {
16876
16994
  }
16877
16995
  };
16878
16996
  }
16879
- var GetThreadInput = z61.object({
16880
- thread_id: z61.string().describe("Gmail thread ID (from gmail_list_threads or gmail_list_messages).")
16997
+ var GetThreadInput = z62.object({
16998
+ thread_id: z62.string().describe("Gmail thread ID (from gmail_list_threads or gmail_list_messages).")
16881
16999
  });
16882
17000
  function createGetThreadTool(gmail) {
16883
17001
  return {
@@ -16918,10 +17036,10 @@ function createGetThreadTool(gmail) {
16918
17036
  }
16919
17037
  };
16920
17038
  }
16921
- var ModifyThreadLabelsInput = z61.object({
16922
- thread_id: z61.string().describe("Gmail thread ID."),
16923
- add_labels: z61.array(z61.string()).optional().describe("Label IDs or system labels to add to all messages in the thread, e.g. ['STARRED']."),
16924
- remove_labels: z61.array(z61.string()).optional().describe("Label IDs or system labels to remove from all messages, e.g. ['UNREAD'].")
17039
+ var ModifyThreadLabelsInput = z62.object({
17040
+ thread_id: z62.string().describe("Gmail thread ID."),
17041
+ add_labels: z62.array(z62.string()).optional().describe("Label IDs or system labels to add to all messages in the thread, e.g. ['STARRED']."),
17042
+ remove_labels: z62.array(z62.string()).optional().describe("Label IDs or system labels to remove from all messages, e.g. ['UNREAD'].")
16925
17043
  });
16926
17044
  function createModifyThreadLabelsTool(gmail) {
16927
17045
  return {
@@ -16946,8 +17064,8 @@ function createModifyThreadLabelsTool(gmail) {
16946
17064
  }
16947
17065
  };
16948
17066
  }
16949
- var TrashThreadInput = z61.object({
16950
- thread_id: z61.string().describe("Gmail thread ID to move to Trash.")
17067
+ var TrashThreadInput = z62.object({
17068
+ thread_id: z62.string().describe("Gmail thread ID to move to Trash.")
16951
17069
  });
16952
17070
  function createTrashThreadTool(gmail) {
16953
17071
  return {
@@ -16970,8 +17088,8 @@ function createTrashThreadTool(gmail) {
16970
17088
  }
16971
17089
 
16972
17090
  // ../../packages/adapters/gmail/src/tools/labels.ts
16973
- import { z as z62 } from "zod";
16974
- var ListLabelsInput = z62.object({});
17091
+ import { z as z63 } from "zod";
17092
+ var ListLabelsInput = z63.object({});
16975
17093
  function createListLabelsTool(gmail) {
16976
17094
  return {
16977
17095
  name: "gmail_list_labels",
@@ -16999,8 +17117,8 @@ function createListLabelsTool(gmail) {
16999
17117
  }
17000
17118
  };
17001
17119
  }
17002
- var GetLabelInput = z62.object({
17003
- label_id: z62.string().describe("Label ID (from gmail_list_labels). System labels: 'INBOX', 'SENT', etc.")
17120
+ var GetLabelInput = z63.object({
17121
+ label_id: z63.string().describe("Label ID (from gmail_list_labels). System labels: 'INBOX', 'SENT', etc.")
17004
17122
  });
17005
17123
  function createGetLabelTool(gmail) {
17006
17124
  return {
@@ -17030,10 +17148,10 @@ function createGetLabelTool(gmail) {
17030
17148
  }
17031
17149
  };
17032
17150
  }
17033
- var CreateLabelInput = z62.object({
17034
- name: z62.string().describe("Label name. Use '/' for nesting, e.g. 'Clients/Acme'."),
17035
- label_list_visibility: z62.enum(["labelShow", "labelShowIfUnread", "labelHide"]).optional().describe("Sidebar visibility (default labelShow)."),
17036
- message_list_visibility: z62.enum(["show", "hide"]).optional().describe("Visibility in message list (default show).")
17151
+ var CreateLabelInput = z63.object({
17152
+ name: z63.string().describe("Label name. Use '/' for nesting, e.g. 'Clients/Acme'."),
17153
+ label_list_visibility: z63.enum(["labelShow", "labelShowIfUnread", "labelHide"]).optional().describe("Sidebar visibility (default labelShow)."),
17154
+ message_list_visibility: z63.enum(["show", "hide"]).optional().describe("Visibility in message list (default show).")
17037
17155
  });
17038
17156
  function createCreateLabelTool(gmail) {
17039
17157
  return {
@@ -17061,11 +17179,11 @@ function createCreateLabelTool(gmail) {
17061
17179
  }
17062
17180
  };
17063
17181
  }
17064
- var UpdateLabelInput = z62.object({
17065
- label_id: z62.string().describe("Label ID to update (from gmail_list_labels)."),
17066
- name: z62.string().optional().describe("New label name."),
17067
- label_list_visibility: z62.enum(["labelShow", "labelShowIfUnread", "labelHide"]).optional().describe("Sidebar visibility."),
17068
- message_list_visibility: z62.enum(["show", "hide"]).optional().describe("Message list visibility.")
17182
+ var UpdateLabelInput = z63.object({
17183
+ label_id: z63.string().describe("Label ID to update (from gmail_list_labels)."),
17184
+ name: z63.string().optional().describe("New label name."),
17185
+ label_list_visibility: z63.enum(["labelShow", "labelShowIfUnread", "labelHide"]).optional().describe("Sidebar visibility."),
17186
+ message_list_visibility: z63.enum(["show", "hide"]).optional().describe("Message list visibility.")
17069
17187
  });
17070
17188
  function createUpdateLabelTool(gmail) {
17071
17189
  return {
@@ -17096,8 +17214,8 @@ function createUpdateLabelTool(gmail) {
17096
17214
  }
17097
17215
  };
17098
17216
  }
17099
- var DeleteLabelInput = z62.object({
17100
- label_id: z62.string().describe("Label ID to permanently delete (cannot delete system labels like INBOX).")
17217
+ var DeleteLabelInput = z63.object({
17218
+ label_id: z63.string().describe("Label ID to permanently delete (cannot delete system labels like INBOX).")
17101
17219
  });
17102
17220
  function createDeleteLabelTool(gmail) {
17103
17221
  return {
@@ -17120,16 +17238,16 @@ function createDeleteLabelTool(gmail) {
17120
17238
  }
17121
17239
 
17122
17240
  // ../../packages/adapters/gmail/src/tools/drafts.ts
17123
- import { z as z63 } from "zod";
17124
- var AttachmentItemSchema2 = z63.object({
17125
- filename: z63.string().describe("File name shown in the email, e.g. 'report.html'."),
17126
- content: z63.string().describe("File content as a string (plain text by default)."),
17127
- mimeType: z63.string().optional().describe("MIME type. Inferred from filename if omitted."),
17128
- encoding: z63.enum(["text", "base64"]).optional().describe("'text' (default) or 'base64' for binaries.")
17241
+ import { z as z64 } from "zod";
17242
+ var AttachmentItemSchema2 = z64.object({
17243
+ filename: z64.string().describe("File name shown in the email, e.g. 'report.html'."),
17244
+ content: z64.string().describe("File content as a string (plain text by default)."),
17245
+ mimeType: z64.string().optional().describe("MIME type. Inferred from filename if omitted."),
17246
+ encoding: z64.enum(["text", "base64"]).optional().describe("'text' (default) or 'base64' for binaries.")
17129
17247
  });
17130
- var ListDraftsInput = z63.object({
17131
- max_results: z63.number().int().min(1).max(500).optional().describe("Max drafts to return (default 20)."),
17132
- query: z63.string().optional().describe("Optional Gmail search query.")
17248
+ var ListDraftsInput = z64.object({
17249
+ max_results: z64.number().int().min(1).max(500).optional().describe("Max drafts to return (default 20)."),
17250
+ query: z64.string().optional().describe("Optional Gmail search query.")
17133
17251
  });
17134
17252
  function createListDraftsTool(gmail) {
17135
17253
  return {
@@ -17193,14 +17311,14 @@ function createListDraftsTool(gmail) {
17193
17311
  }
17194
17312
  };
17195
17313
  }
17196
- var CreateDraftInput = z63.object({
17197
- to: z63.string().describe("Recipient email address."),
17198
- subject: z63.string().describe("Email subject line."),
17199
- body: z63.string().describe("Email body \u2014 plain text or HTML."),
17200
- cc: z63.string().optional().describe("CC address(es), comma-separated."),
17201
- bcc: z63.string().optional().describe("BCC address(es), comma-separated."),
17202
- reply_to_message_id: z63.string().optional().describe("If provided, sets In-Reply-To and threadId so this draft is a reply in-thread."),
17203
- attachments: z63.array(AttachmentItemSchema2).optional().describe("Optional file attachments.")
17314
+ var CreateDraftInput = z64.object({
17315
+ to: z64.string().describe("Recipient email address."),
17316
+ subject: z64.string().describe("Email subject line."),
17317
+ body: z64.string().describe("Email body \u2014 plain text or HTML."),
17318
+ cc: z64.string().optional().describe("CC address(es), comma-separated."),
17319
+ bcc: z64.string().optional().describe("BCC address(es), comma-separated."),
17320
+ reply_to_message_id: z64.string().optional().describe("If provided, sets In-Reply-To and threadId so this draft is a reply in-thread."),
17321
+ attachments: z64.array(AttachmentItemSchema2).optional().describe("Optional file attachments.")
17204
17322
  });
17205
17323
  function createCreateDraftTool(gmail) {
17206
17324
  return {
@@ -17260,14 +17378,14 @@ function createCreateDraftTool(gmail) {
17260
17378
  }
17261
17379
  };
17262
17380
  }
17263
- var UpdateDraftInput = z63.object({
17264
- draft_id: z63.string().describe("Draft ID to update (from gmail_list_drafts or gmail_create_draft)."),
17265
- to: z63.string().describe("Recipient email address."),
17266
- subject: z63.string().describe("Email subject line."),
17267
- body: z63.string().describe("Email body \u2014 plain text or HTML."),
17268
- cc: z63.string().optional().describe("CC address(es), comma-separated."),
17269
- bcc: z63.string().optional().describe("BCC address(es), comma-separated."),
17270
- attachments: z63.array(AttachmentItemSchema2).optional().describe("Optional file attachments.")
17381
+ var UpdateDraftInput = z64.object({
17382
+ draft_id: z64.string().describe("Draft ID to update (from gmail_list_drafts or gmail_create_draft)."),
17383
+ to: z64.string().describe("Recipient email address."),
17384
+ subject: z64.string().describe("Email subject line."),
17385
+ body: z64.string().describe("Email body \u2014 plain text or HTML."),
17386
+ cc: z64.string().optional().describe("CC address(es), comma-separated."),
17387
+ bcc: z64.string().optional().describe("BCC address(es), comma-separated."),
17388
+ attachments: z64.array(AttachmentItemSchema2).optional().describe("Optional file attachments.")
17271
17389
  });
17272
17390
  function createUpdateDraftTool(gmail) {
17273
17391
  return {
@@ -17300,8 +17418,8 @@ function createUpdateDraftTool(gmail) {
17300
17418
  }
17301
17419
  };
17302
17420
  }
17303
- var SendDraftInput = z63.object({
17304
- draft_id: z63.string().describe("Draft ID to send (from gmail_list_drafts or gmail_create_draft).")
17421
+ var SendDraftInput = z64.object({
17422
+ draft_id: z64.string().describe("Draft ID to send (from gmail_list_drafts or gmail_create_draft).")
17305
17423
  });
17306
17424
  function createSendDraftTool(gmail) {
17307
17425
  return {
@@ -17325,8 +17443,8 @@ function createSendDraftTool(gmail) {
17325
17443
  }
17326
17444
  };
17327
17445
  }
17328
- var DeleteDraftInput = z63.object({
17329
- draft_id: z63.string().describe("Draft ID to permanently delete.")
17446
+ var DeleteDraftInput = z64.object({
17447
+ draft_id: z64.string().describe("Draft ID to permanently delete.")
17330
17448
  });
17331
17449
  function createDeleteDraftTool(gmail) {
17332
17450
  return {
@@ -17349,12 +17467,12 @@ function createDeleteDraftTool(gmail) {
17349
17467
  }
17350
17468
 
17351
17469
  // ../../packages/adapters/gmail/src/tools/attachments.ts
17352
- import { z as z64 } from "zod";
17470
+ import { z as z65 } from "zod";
17353
17471
  var ATTACHMENT_SIZE_CAP_BYTES = 25 * 1024 * 1024;
17354
- var GetAttachmentInput = z64.object({
17355
- message_id: z64.string().describe("Gmail message ID containing the attachment."),
17356
- attachment_id: z64.string().describe("Attachment ID (from gmail_get_message attachments list)."),
17357
- filename: z64.string().optional().describe("Filename hint (for display only, not required).")
17472
+ var GetAttachmentInput = z65.object({
17473
+ message_id: z65.string().describe("Gmail message ID containing the attachment."),
17474
+ attachment_id: z65.string().describe("Attachment ID (from gmail_get_message attachments list)."),
17475
+ filename: z65.string().optional().describe("Filename hint (for display only, not required).")
17358
17476
  });
17359
17477
  function createGetAttachmentTool(gmail) {
17360
17478
  return {
@@ -17392,13 +17510,13 @@ function createGetAttachmentTool(gmail) {
17392
17510
  }
17393
17511
 
17394
17512
  // ../../packages/adapters/gmail/src/tools/history.ts
17395
- import { z as z65 } from "zod";
17396
- var ListHistoryInput = z65.object({
17397
- start_history_id: z65.string().describe(
17513
+ import { z as z66 } from "zod";
17514
+ var ListHistoryInput = z66.object({
17515
+ start_history_id: z66.string().describe(
17398
17516
  "The historyId to start listing changes from. Get an initial historyId from gmail_list_messages or gmail_get_message (historyId field)."
17399
17517
  ),
17400
- max_results: z65.number().int().min(1).max(500).optional().describe("Max history records to return (default 100)."),
17401
- label_id: z65.string().optional().describe("Filter history records by label ID.")
17518
+ max_results: z66.number().int().min(1).max(500).optional().describe("Max history records to return (default 100)."),
17519
+ label_id: z66.string().optional().describe("Filter history records by label ID.")
17402
17520
  });
17403
17521
  function createListHistoryTool(gmail) {
17404
17522
  return {
@@ -17676,7 +17794,7 @@ function createSheetsClient(accessToken) {
17676
17794
  }
17677
17795
 
17678
17796
  // ../../packages/adapters/google-sheets/src/tools/values.ts
17679
- import { z as z66 } from "zod";
17797
+ import { z as z67 } from "zod";
17680
17798
 
17681
17799
  // ../../packages/adapters/google-sheets/src/errors.ts
17682
17800
  var SheetsAdapterError = class extends Error {
@@ -17791,10 +17909,10 @@ function parseRange(range) {
17791
17909
 
17792
17910
  // ../../packages/adapters/google-sheets/src/tools/values.ts
17793
17911
  var ROW_CAP = 1e4;
17794
- var ReadRangeInput = z66.object({
17795
- spreadsheet_id: z66.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
17796
- range: z66.string().describe("A1-notation range, e.g. 'Sheet1!A1:D10' or 'A:A' for a full column."),
17797
- value_render_option: z66.enum(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"]).optional().describe(
17912
+ var ReadRangeInput = z67.object({
17913
+ spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
17914
+ range: z67.string().describe("A1-notation range, e.g. 'Sheet1!A1:D10' or 'A:A' for a full column."),
17915
+ value_render_option: z67.enum(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"]).optional().describe(
17798
17916
  "How values are rendered. FORMATTED_VALUE (default) returns display strings. UNFORMATTED_VALUE returns raw numbers/booleans. FORMULA returns formula strings."
17799
17917
  )
17800
17918
  });
@@ -17829,9 +17947,9 @@ function createReadRangeTool(sheets) {
17829
17947
  }
17830
17948
  };
17831
17949
  }
17832
- var ReadAllInput = z66.object({
17833
- spreadsheet_id: z66.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
17834
- sheet_name: z66.string().optional().describe("Sheet tab name (default: first sheet).")
17950
+ var ReadAllInput = z67.object({
17951
+ spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
17952
+ sheet_name: z67.string().optional().describe("Sheet tab name (default: first sheet).")
17835
17953
  });
17836
17954
  function createReadAllTool(sheets) {
17837
17955
  return {
@@ -17878,10 +17996,10 @@ function createReadAllTool(sheets) {
17878
17996
  }
17879
17997
  };
17880
17998
  }
17881
- var BatchReadRangesInput = z66.object({
17882
- spreadsheet_id: z66.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
17883
- ranges: z66.array(z66.string()).min(1).max(50).describe("Array of A1-notation ranges to read in a single API call (max 50)."),
17884
- value_render_option: z66.enum(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"]).optional().describe("How values are rendered (default FORMATTED_VALUE).")
17999
+ var BatchReadRangesInput = z67.object({
18000
+ spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18001
+ ranges: z67.array(z67.string()).min(1).max(50).describe("Array of A1-notation ranges to read in a single API call (max 50)."),
18002
+ value_render_option: z67.enum(["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"]).optional().describe("How values are rendered (default FORMATTED_VALUE).")
17885
18003
  });
17886
18004
  function createBatchReadRangesTool(sheets) {
17887
18005
  return {
@@ -17911,11 +18029,11 @@ function createBatchReadRangesTool(sheets) {
17911
18029
  }
17912
18030
  };
17913
18031
  }
17914
- var WriteRangeInput = z66.object({
17915
- spreadsheet_id: z66.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
17916
- range: z66.string().describe("A1-notation range. The top-left cell anchors the write, e.g. 'Sheet1!A1'."),
17917
- values: z66.array(z66.array(z66.unknown())).describe("2D array of values to write. Example: [['Name','Score'],['Alice',95]]."),
17918
- value_input_option: z66.enum(["RAW", "USER_ENTERED"]).optional().describe(
18032
+ var WriteRangeInput = z67.object({
18033
+ spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18034
+ range: z67.string().describe("A1-notation range. The top-left cell anchors the write, e.g. 'Sheet1!A1'."),
18035
+ values: z67.array(z67.array(z67.unknown())).describe("2D array of values to write. Example: [['Name','Score'],['Alice',95]]."),
18036
+ value_input_option: z67.enum(["RAW", "USER_ENTERED"]).optional().describe(
17919
18037
  "RAW stores strings as-is; USER_ENTERED parses numbers/dates/formulas like a human typing (default)."
17920
18038
  )
17921
18039
  });
@@ -17947,15 +18065,15 @@ function createWriteRangeTool(sheets) {
17947
18065
  }
17948
18066
  };
17949
18067
  }
17950
- var AppendRowInput = z66.object({
17951
- spreadsheet_id: z66.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
17952
- range: z66.string().describe(
18068
+ var AppendRowInput = z67.object({
18069
+ spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18070
+ range: z67.string().describe(
17953
18071
  "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."
17954
18072
  ),
17955
- values: z66.array(z66.array(z66.unknown())).describe(
18073
+ values: z67.array(z67.array(z67.unknown())).describe(
17956
18074
  "2D array of rows to append. For a single row: [['Name','Score']]. For multiple: [['Alice',95],['Bob',87]]."
17957
18075
  ),
17958
- value_input_option: z66.enum(["RAW", "USER_ENTERED"]).optional().describe("RAW stores strings as-is; USER_ENTERED parses numbers/dates/formulas (default).")
18076
+ value_input_option: z67.enum(["RAW", "USER_ENTERED"]).optional().describe("RAW stores strings as-is; USER_ENTERED parses numbers/dates/formulas (default).")
17959
18077
  });
17960
18078
  function createAppendRowTool(sheets) {
17961
18079
  return {
@@ -17985,9 +18103,9 @@ function createAppendRowTool(sheets) {
17985
18103
  }
17986
18104
  };
17987
18105
  }
17988
- var ClearRangeInput = z66.object({
17989
- spreadsheet_id: z66.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
17990
- range: z66.string().describe("A1-notation range to clear, e.g. 'Sheet1!A2:Z100'. Formatting is preserved.")
18106
+ var ClearRangeInput = z67.object({
18107
+ spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18108
+ range: z67.string().describe("A1-notation range to clear, e.g. 'Sheet1!A2:Z100'. Formatting is preserved.")
17991
18109
  });
17992
18110
  function createClearRangeTool(sheets) {
17993
18111
  return {
@@ -18010,15 +18128,15 @@ function createClearRangeTool(sheets) {
18010
18128
  }
18011
18129
  };
18012
18130
  }
18013
- var BatchUpdateValuesInput = z66.object({
18014
- spreadsheet_id: z66.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18015
- updates: z66.array(
18016
- z66.object({
18017
- range: z66.string().describe("A1-notation range, e.g. 'Sheet1!A1'."),
18018
- values: z66.array(z66.array(z66.unknown())).describe("2D array of values to write.")
18131
+ var BatchUpdateValuesInput = z67.object({
18132
+ spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18133
+ updates: z67.array(
18134
+ z67.object({
18135
+ range: z67.string().describe("A1-notation range, e.g. 'Sheet1!A1'."),
18136
+ values: z67.array(z67.array(z67.unknown())).describe("2D array of values to write.")
18019
18137
  })
18020
18138
  ).min(1).max(50).describe("Array of range+values pairs to write in a single API call (max 50)."),
18021
- value_input_option: z66.enum(["RAW", "USER_ENTERED"]).optional().describe("RAW stores strings as-is; USER_ENTERED parses numbers/dates/formulas (default).")
18139
+ value_input_option: z67.enum(["RAW", "USER_ENTERED"]).optional().describe("RAW stores strings as-is; USER_ENTERED parses numbers/dates/formulas (default).")
18022
18140
  });
18023
18141
  function createBatchUpdateValuesTool(sheets) {
18024
18142
  return {
@@ -18055,13 +18173,13 @@ function createBatchUpdateValuesTool(sheets) {
18055
18173
  }
18056
18174
  };
18057
18175
  }
18058
- var FindRowsInput = z66.object({
18059
- spreadsheet_id: z66.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18060
- sheet_name: z66.string().optional().describe("Sheet tab name (default: first sheet)."),
18061
- column: z66.string().describe("Header name of the column to search (from row 1)."),
18062
- equals: z66.string().optional().describe("Return rows where the column value exactly equals this string."),
18063
- contains: z66.string().optional().describe("Return rows where the column value contains this substring (case-sensitive)."),
18064
- limit: z66.number().int().min(1).max(1e3).optional().describe("Max matching rows to return (default 100, max 1000).")
18176
+ var FindRowsInput = z67.object({
18177
+ spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18178
+ sheet_name: z67.string().optional().describe("Sheet tab name (default: first sheet)."),
18179
+ column: z67.string().describe("Header name of the column to search (from row 1)."),
18180
+ equals: z67.string().optional().describe("Return rows where the column value exactly equals this string."),
18181
+ contains: z67.string().optional().describe("Return rows where the column value contains this substring (case-sensitive)."),
18182
+ limit: z67.number().int().min(1).max(1e3).optional().describe("Max matching rows to return (default 100, max 1000).")
18065
18183
  });
18066
18184
  function createFindRowsTool(sheets) {
18067
18185
  return {
@@ -18133,7 +18251,7 @@ function createFindRowsTool(sheets) {
18133
18251
  }
18134
18252
 
18135
18253
  // ../../packages/adapters/google-sheets/src/tools/structure.ts
18136
- import { z as z67 } from "zod";
18254
+ import { z as z68 } from "zod";
18137
18255
 
18138
18256
  // ../../packages/adapters/google-sheets/src/helpers/batch-update.ts
18139
18257
  function buildRenameSheetRequest(sheetId, newTitle) {
@@ -18242,8 +18360,8 @@ function buildSortRangeRequest(sheetId, startRowIndex, endRowIndex, startColumnI
18242
18360
  }
18243
18361
 
18244
18362
  // ../../packages/adapters/google-sheets/src/tools/structure.ts
18245
- var GetMetadataInput = z67.object({
18246
- spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit).")
18363
+ var GetMetadataInput = z68.object({
18364
+ spreadsheet_id: z68.string().describe("The spreadsheet ID from the URL (between /d/ and /edit).")
18247
18365
  });
18248
18366
  function createGetMetadataTool(sheets) {
18249
18367
  return {
@@ -18283,9 +18401,9 @@ function createGetMetadataTool(sheets) {
18283
18401
  }
18284
18402
  };
18285
18403
  }
18286
- var CreateSpreadsheetInput = z67.object({
18287
- title: z67.string().describe("Title for the new spreadsheet."),
18288
- sheet_title: z67.string().optional().describe("Title for the first sheet tab (default: 'Sheet1').")
18404
+ var CreateSpreadsheetInput = z68.object({
18405
+ title: z68.string().describe("Title for the new spreadsheet."),
18406
+ sheet_title: z68.string().optional().describe("Title for the first sheet tab (default: 'Sheet1').")
18289
18407
  });
18290
18408
  function createCreateSpreadsheetTool(sheets) {
18291
18409
  return {
@@ -18319,10 +18437,10 @@ function createCreateSpreadsheetTool(sheets) {
18319
18437
  }
18320
18438
  };
18321
18439
  }
18322
- var AddSheetInput = z67.object({
18323
- spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18324
- title: z67.string().describe("Title for the new sheet tab."),
18325
- index: z67.number().int().min(0).optional().describe("Zero-based position to insert the sheet (default: appended at end).")
18440
+ var AddSheetInput = z68.object({
18441
+ spreadsheet_id: z68.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18442
+ title: z68.string().describe("Title for the new sheet tab."),
18443
+ index: z68.number().int().min(0).optional().describe("Zero-based position to insert the sheet (default: appended at end).")
18326
18444
  });
18327
18445
  function createAddSheetTool(sheets) {
18328
18446
  return {
@@ -18359,9 +18477,9 @@ function createAddSheetTool(sheets) {
18359
18477
  }
18360
18478
  };
18361
18479
  }
18362
- var DeleteSheetInput = z67.object({
18363
- spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18364
- sheet_id: z67.number().int().describe("Numeric sheet ID (not the tab name). Get it from sheets_get_metadata.")
18480
+ var DeleteSheetInput = z68.object({
18481
+ spreadsheet_id: z68.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18482
+ sheet_id: z68.number().int().describe("Numeric sheet ID (not the tab name). Get it from sheets_get_metadata.")
18365
18483
  });
18366
18484
  function createDeleteSheetTool(sheets) {
18367
18485
  return {
@@ -18382,11 +18500,11 @@ function createDeleteSheetTool(sheets) {
18382
18500
  }
18383
18501
  };
18384
18502
  }
18385
- var DuplicateSheetInput = z67.object({
18386
- spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18387
- source_sheet_id: z67.number().int().describe("Numeric ID of the sheet to duplicate. Get it from sheets_get_metadata."),
18388
- new_sheet_name: z67.string().optional().describe('Name for the duplicated sheet (defaults to "Copy of <original>").'),
18389
- insert_sheet_index: z67.number().int().min(0).optional().describe("Zero-based position to insert the duplicate (default: appended at end).")
18503
+ var DuplicateSheetInput = z68.object({
18504
+ spreadsheet_id: z68.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18505
+ source_sheet_id: z68.number().int().describe("Numeric ID of the sheet to duplicate. Get it from sheets_get_metadata."),
18506
+ new_sheet_name: z68.string().optional().describe('Name for the duplicated sheet (defaults to "Copy of <original>").'),
18507
+ insert_sheet_index: z68.number().int().min(0).optional().describe("Zero-based position to insert the duplicate (default: appended at end).")
18390
18508
  });
18391
18509
  function createDuplicateSheetTool(sheets) {
18392
18510
  return {
@@ -18425,10 +18543,10 @@ function createDuplicateSheetTool(sheets) {
18425
18543
  }
18426
18544
  };
18427
18545
  }
18428
- var RenameSheetInput = z67.object({
18429
- spreadsheet_id: z67.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18430
- sheet_id: z67.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18431
- new_title: z67.string().describe("New tab name for the sheet.")
18546
+ var RenameSheetInput = z68.object({
18547
+ spreadsheet_id: z68.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18548
+ sheet_id: z68.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18549
+ new_title: z68.string().describe("New tab name for the sheet.")
18432
18550
  });
18433
18551
  function createRenameSheetTool(sheets) {
18434
18552
  return {
@@ -18453,32 +18571,32 @@ function createRenameSheetTool(sheets) {
18453
18571
  }
18454
18572
 
18455
18573
  // ../../packages/adapters/google-sheets/src/tools/format.ts
18456
- import { z as z68 } from "zod";
18457
- var FormatRangeInput = z68.object({
18458
- spreadsheet_id: z68.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18459
- sheet_id: z68.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18460
- start_row_index: z68.number().int().min(0).describe("Zero-based start row index (inclusive)."),
18461
- end_row_index: z68.number().int().min(1).describe("Zero-based end row index (exclusive). E.g. rows 0\u20131 \u2192 endRowIndex=1."),
18462
- start_column_index: z68.number().int().min(0).describe("Zero-based start column index (inclusive)."),
18463
- end_column_index: z68.number().int().min(1).describe("Zero-based end column index (exclusive). E.g. columns 0\u20133 \u2192 endColumnIndex=3."),
18464
- bold: z68.boolean().optional().describe("Set bold text."),
18465
- italic: z68.boolean().optional().describe("Set italic text."),
18466
- font_size: z68.number().int().min(1).optional().describe("Font size in points."),
18467
- background_color: z68.object({
18468
- red: z68.number().min(0).max(1).describe("Red channel 0\u20131."),
18469
- green: z68.number().min(0).max(1).describe("Green channel 0\u20131."),
18470
- blue: z68.number().min(0).max(1).describe("Blue channel 0\u20131.")
18574
+ import { z as z69 } from "zod";
18575
+ var FormatRangeInput = z69.object({
18576
+ spreadsheet_id: z69.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18577
+ sheet_id: z69.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18578
+ start_row_index: z69.number().int().min(0).describe("Zero-based start row index (inclusive)."),
18579
+ end_row_index: z69.number().int().min(1).describe("Zero-based end row index (exclusive). E.g. rows 0\u20131 \u2192 endRowIndex=1."),
18580
+ start_column_index: z69.number().int().min(0).describe("Zero-based start column index (inclusive)."),
18581
+ end_column_index: z69.number().int().min(1).describe("Zero-based end column index (exclusive). E.g. columns 0\u20133 \u2192 endColumnIndex=3."),
18582
+ bold: z69.boolean().optional().describe("Set bold text."),
18583
+ italic: z69.boolean().optional().describe("Set italic text."),
18584
+ font_size: z69.number().int().min(1).optional().describe("Font size in points."),
18585
+ background_color: z69.object({
18586
+ red: z69.number().min(0).max(1).describe("Red channel 0\u20131."),
18587
+ green: z69.number().min(0).max(1).describe("Green channel 0\u20131."),
18588
+ blue: z69.number().min(0).max(1).describe("Blue channel 0\u20131.")
18471
18589
  }).optional().describe("Background fill color (RGB, each channel 0\u20131)."),
18472
- foreground_color: z68.object({
18473
- red: z68.number().min(0).max(1).describe("Red channel 0\u20131."),
18474
- green: z68.number().min(0).max(1).describe("Green channel 0\u20131."),
18475
- blue: z68.number().min(0).max(1).describe("Blue channel 0\u20131.")
18590
+ foreground_color: z69.object({
18591
+ red: z69.number().min(0).max(1).describe("Red channel 0\u20131."),
18592
+ green: z69.number().min(0).max(1).describe("Green channel 0\u20131."),
18593
+ blue: z69.number().min(0).max(1).describe("Blue channel 0\u20131.")
18476
18594
  }).optional().describe("Text foreground color (RGB, each channel 0\u20131)."),
18477
- number_format: z68.object({
18478
- type: z68.enum(["TEXT", "NUMBER", "PERCENT", "CURRENCY", "DATE", "TIME", "DATE_TIME", "SCIENTIFIC"]).describe("Number format type."),
18479
- pattern: z68.string().optional().describe("Optional format pattern, e.g. '#,##0.00' for currency.")
18595
+ number_format: z69.object({
18596
+ type: z69.enum(["TEXT", "NUMBER", "PERCENT", "CURRENCY", "DATE", "TIME", "DATE_TIME", "SCIENTIFIC"]).describe("Number format type."),
18597
+ pattern: z69.string().optional().describe("Optional format pattern, e.g. '#,##0.00' for currency.")
18480
18598
  }).optional().describe("Number format to apply."),
18481
- horizontal_alignment: z68.enum(["LEFT", "CENTER", "RIGHT"]).optional().describe("Horizontal text alignment.")
18599
+ horizontal_alignment: z69.enum(["LEFT", "CENTER", "RIGHT"]).optional().describe("Horizontal text alignment.")
18482
18600
  });
18483
18601
  function createFormatRangeTool(sheets) {
18484
18602
  return {
@@ -18565,12 +18683,12 @@ function createFormatRangeTool(sheets) {
18565
18683
  }
18566
18684
  };
18567
18685
  }
18568
- var ResizeColumnsInput = z68.object({
18569
- spreadsheet_id: z68.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18570
- sheet_id: z68.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18571
- start_column_index: z68.number().int().min(0).describe("Zero-based start column index (inclusive)."),
18572
- end_column_index: z68.number().int().min(1).describe("Zero-based end column index (exclusive). E.g. columns 0\u20133 \u2192 endColumnIndex=3."),
18573
- pixel_size: z68.number().int().min(0).optional().describe("Column width in pixels. Omit to auto-resize to fit content.")
18686
+ var ResizeColumnsInput = z69.object({
18687
+ spreadsheet_id: z69.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18688
+ sheet_id: z69.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18689
+ start_column_index: z69.number().int().min(0).describe("Zero-based start column index (inclusive)."),
18690
+ end_column_index: z69.number().int().min(1).describe("Zero-based end column index (exclusive). E.g. columns 0\u20133 \u2192 endColumnIndex=3."),
18691
+ pixel_size: z69.number().int().min(0).optional().describe("Column width in pixels. Omit to auto-resize to fit content.")
18574
18692
  });
18575
18693
  function createResizeColumnsTool(sheets) {
18576
18694
  return {
@@ -18606,11 +18724,11 @@ function createResizeColumnsTool(sheets) {
18606
18724
  }
18607
18725
  };
18608
18726
  }
18609
- var FreezePanesInput = z68.object({
18610
- spreadsheet_id: z68.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18611
- sheet_id: z68.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18612
- frozen_row_count: z68.number().int().min(0).optional().describe("Number of rows to freeze at the top (0 to unfreeze, default 0)."),
18613
- frozen_column_count: z68.number().int().min(0).optional().describe("Number of columns to freeze at the left (0 to unfreeze, default 0).")
18727
+ var FreezePanesInput = z69.object({
18728
+ spreadsheet_id: z69.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18729
+ sheet_id: z69.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18730
+ frozen_row_count: z69.number().int().min(0).optional().describe("Number of rows to freeze at the top (0 to unfreeze, default 0)."),
18731
+ frozen_column_count: z69.number().int().min(0).optional().describe("Number of columns to freeze at the left (0 to unfreeze, default 0).")
18614
18732
  });
18615
18733
  function createFreezePanesTool(sheets) {
18616
18734
  return {
@@ -18641,14 +18759,14 @@ function createFreezePanesTool(sheets) {
18641
18759
  }
18642
18760
 
18643
18761
  // ../../packages/adapters/google-sheets/src/tools/filters.ts
18644
- import { z as z69 } from "zod";
18645
- var SetBasicFilterInput = z69.object({
18646
- spreadsheet_id: z69.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18647
- sheet_id: z69.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18648
- start_row_index: z69.number().int().min(0).describe("Zero-based start row index (inclusive). Usually 0 for the header row."),
18649
- end_row_index: z69.number().int().min(1).describe("Zero-based end row index (exclusive)."),
18650
- start_column_index: z69.number().int().min(0).describe("Zero-based start column index (inclusive)."),
18651
- end_column_index: z69.number().int().min(1).describe("Zero-based end column index (exclusive).")
18762
+ import { z as z70 } from "zod";
18763
+ var SetBasicFilterInput = z70.object({
18764
+ spreadsheet_id: z70.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18765
+ sheet_id: z70.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18766
+ start_row_index: z70.number().int().min(0).describe("Zero-based start row index (inclusive). Usually 0 for the header row."),
18767
+ end_row_index: z70.number().int().min(1).describe("Zero-based end row index (exclusive)."),
18768
+ start_column_index: z70.number().int().min(0).describe("Zero-based start column index (inclusive)."),
18769
+ end_column_index: z70.number().int().min(1).describe("Zero-based end column index (exclusive).")
18652
18770
  });
18653
18771
  function createSetBasicFilterTool(sheets) {
18654
18772
  return {
@@ -18679,9 +18797,9 @@ function createSetBasicFilterTool(sheets) {
18679
18797
  }
18680
18798
  };
18681
18799
  }
18682
- var ClearBasicFilterInput = z69.object({
18683
- spreadsheet_id: z69.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18684
- sheet_id: z69.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata.")
18800
+ var ClearBasicFilterInput = z70.object({
18801
+ spreadsheet_id: z70.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18802
+ sheet_id: z70.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata.")
18685
18803
  });
18686
18804
  function createClearBasicFilterTool(sheets) {
18687
18805
  return {
@@ -18704,18 +18822,18 @@ function createClearBasicFilterTool(sheets) {
18704
18822
  }
18705
18823
  };
18706
18824
  }
18707
- var SortSpecSchema = z69.object({
18708
- dimension_index: z69.number().int().min(0).describe("Zero-based column index to sort by."),
18709
- sort_order: z69.enum(["ASCENDING", "DESCENDING"]).describe("Sort direction: 'ASCENDING' or 'DESCENDING'.")
18710
- });
18711
- var SortRangeInput = z69.object({
18712
- spreadsheet_id: z69.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18713
- sheet_id: z69.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18714
- start_row_index: z69.number().int().min(0).describe("Zero-based start row index (inclusive). Set to 1 to exclude the header row."),
18715
- end_row_index: z69.number().int().min(1).describe("Zero-based end row index (exclusive)."),
18716
- start_column_index: z69.number().int().min(0).describe("Zero-based start column index (inclusive)."),
18717
- end_column_index: z69.number().int().min(1).describe("Zero-based end column index (exclusive)."),
18718
- sort_specs: z69.array(SortSpecSchema).min(1).describe(
18825
+ var SortSpecSchema = z70.object({
18826
+ dimension_index: z70.number().int().min(0).describe("Zero-based column index to sort by."),
18827
+ sort_order: z70.enum(["ASCENDING", "DESCENDING"]).describe("Sort direction: 'ASCENDING' or 'DESCENDING'.")
18828
+ });
18829
+ var SortRangeInput = z70.object({
18830
+ spreadsheet_id: z70.string().describe("The spreadsheet ID from the URL (between /d/ and /edit)."),
18831
+ sheet_id: z70.number().int().describe("Numeric sheet ID. Get it from sheets_get_metadata."),
18832
+ start_row_index: z70.number().int().min(0).describe("Zero-based start row index (inclusive). Set to 1 to exclude the header row."),
18833
+ end_row_index: z70.number().int().min(1).describe("Zero-based end row index (exclusive)."),
18834
+ start_column_index: z70.number().int().min(0).describe("Zero-based start column index (inclusive)."),
18835
+ end_column_index: z70.number().int().min(1).describe("Zero-based end column index (exclusive)."),
18836
+ sort_specs: z70.array(SortSpecSchema).min(1).describe(
18719
18837
  "Array of sort specs (primary, secondary, ...). Each: { dimension_index, sort_order }. Example: [{ dimension_index: 2, sort_order: 'DESCENDING' }]."
18720
18838
  )
18721
18839
  });
@@ -18939,7 +19057,7 @@ function createDocsClient(accessToken) {
18939
19057
  }
18940
19058
 
18941
19059
  // ../../packages/adapters/google-docs/src/tools/lifecycle.ts
18942
- import { z as z70 } from "zod";
19060
+ import { z as z71 } from "zod";
18943
19061
 
18944
19062
  // ../../packages/adapters/google-docs/src/errors.ts
18945
19063
  var DocsAdapterError = class extends Error {
@@ -19128,9 +19246,9 @@ function buildUpdateTextStyleRequest(startIndex, endIndex, textStyle, fields) {
19128
19246
 
19129
19247
  // ../../packages/adapters/google-docs/src/tools/lifecycle.ts
19130
19248
  var CHAR_CAP3 = 1e5;
19131
- var CreateDocInput = z70.object({
19132
- title: z70.string().describe("Title for the new document."),
19133
- content: z70.string().optional().describe("Optional initial text content to insert into the document body.")
19249
+ var CreateDocInput = z71.object({
19250
+ title: z71.string().describe("Title for the new document."),
19251
+ content: z71.string().optional().describe("Optional initial text content to insert into the document body.")
19134
19252
  });
19135
19253
  function createCreateDocTool(docs) {
19136
19254
  return {
@@ -19166,8 +19284,8 @@ function createCreateDocTool(docs) {
19166
19284
  }
19167
19285
  };
19168
19286
  }
19169
- var GetDocInput = z70.object({
19170
- document_id: z70.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit).")
19287
+ var GetDocInput = z71.object({
19288
+ document_id: z71.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit).")
19171
19289
  });
19172
19290
  function createGetDocTool(docs) {
19173
19291
  return {
@@ -19213,8 +19331,8 @@ function createGetDocTool(docs) {
19213
19331
  }
19214
19332
  };
19215
19333
  }
19216
- var GetDocTextInput = z70.object({
19217
- document_id: z70.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit).")
19334
+ var GetDocTextInput = z71.object({
19335
+ document_id: z71.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit).")
19218
19336
  });
19219
19337
  function createGetDocTextTool(docs) {
19220
19338
  return {
@@ -19250,11 +19368,11 @@ function createGetDocTextTool(docs) {
19250
19368
  }
19251
19369
 
19252
19370
  // ../../packages/adapters/google-docs/src/tools/text.ts
19253
- import { z as z71 } from "zod";
19254
- var InsertTextInput = z71.object({
19255
- document_id: z71.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19256
- text: z71.string().describe("Text to insert."),
19257
- index: z71.number().int().min(1).describe(
19371
+ import { z as z72 } from "zod";
19372
+ var InsertTextInput = z72.object({
19373
+ document_id: z72.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19374
+ text: z72.string().describe("Text to insert."),
19375
+ index: z72.number().int().min(1).describe(
19258
19376
  "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."
19259
19377
  )
19260
19378
  });
@@ -19285,9 +19403,9 @@ function createInsertTextTool(docs) {
19285
19403
  }
19286
19404
  };
19287
19405
  }
19288
- var AppendTextInput = z71.object({
19289
- document_id: z71.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19290
- text: z71.string().describe("Text to append at the end of the document. Use \\n for line breaks.")
19406
+ var AppendTextInput = z72.object({
19407
+ document_id: z72.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19408
+ text: z72.string().describe("Text to append at the end of the document. Use \\n for line breaks.")
19291
19409
  });
19292
19410
  function createAppendTextTool(docs) {
19293
19411
  return {
@@ -19316,11 +19434,11 @@ function createAppendTextTool(docs) {
19316
19434
  }
19317
19435
  };
19318
19436
  }
19319
- var ReplaceTextInput = z71.object({
19320
- document_id: z71.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19321
- find: z71.string().describe("The exact text string to find in the document."),
19322
- replace: z71.string().describe("The text to replace all found occurrences with."),
19323
- match_case: z71.boolean().optional().describe("Whether to match case exactly (default: true).")
19437
+ var ReplaceTextInput = z72.object({
19438
+ document_id: z72.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19439
+ find: z72.string().describe("The exact text string to find in the document."),
19440
+ replace: z72.string().describe("The text to replace all found occurrences with."),
19441
+ match_case: z72.boolean().optional().describe("Whether to match case exactly (default: true).")
19324
19442
  });
19325
19443
  function createReplaceTextTool(docs) {
19326
19444
  return {
@@ -19349,10 +19467,10 @@ function createReplaceTextTool(docs) {
19349
19467
  }
19350
19468
  };
19351
19469
  }
19352
- var DeleteContentRangeInput = z71.object({
19353
- document_id: z71.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19354
- start_index: z71.number().int().min(1).describe("Start of the range to delete (inclusive). Get indices from docs_get."),
19355
- end_index: z71.number().int().min(2).describe(
19470
+ var DeleteContentRangeInput = z72.object({
19471
+ document_id: z72.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19472
+ start_index: z72.number().int().min(1).describe("Start of the range to delete (inclusive). Get indices from docs_get."),
19473
+ end_index: z72.number().int().min(2).describe(
19356
19474
  "End of the range to delete (exclusive). Content at [startIndex, endIndex) is removed."
19357
19475
  )
19358
19476
  });
@@ -19391,8 +19509,8 @@ function createDeleteContentRangeTool(docs) {
19391
19509
  }
19392
19510
 
19393
19511
  // ../../packages/adapters/google-docs/src/tools/structure.ts
19394
- import { z as z72 } from "zod";
19395
- var NamedStyleType = z72.enum([
19512
+ import { z as z73 } from "zod";
19513
+ var NamedStyleType = z73.enum([
19396
19514
  "NORMAL_TEXT",
19397
19515
  "TITLE",
19398
19516
  "SUBTITLE",
@@ -19403,10 +19521,10 @@ var NamedStyleType = z72.enum([
19403
19521
  "HEADING_5",
19404
19522
  "HEADING_6"
19405
19523
  ]);
19406
- var InsertParagraphInput = z72.object({
19407
- document_id: z72.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19408
- text: z72.string().describe("Paragraph text. A newline is appended automatically if not present."),
19409
- index: z72.number().int().min(1).describe(
19524
+ var InsertParagraphInput = z73.object({
19525
+ document_id: z73.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19526
+ text: z73.string().describe("Paragraph text. A newline is appended automatically if not present."),
19527
+ index: z73.number().int().min(1).describe(
19410
19528
  "Document body index at which to insert the paragraph. Index 1 = beginning of body. Use docs_get to find indices."
19411
19529
  ),
19412
19530
  named_style: NamedStyleType.optional().describe(
@@ -19443,9 +19561,9 @@ function createInsertParagraphTool(docs) {
19443
19561
  }
19444
19562
  };
19445
19563
  }
19446
- var InsertPageBreakInput = z72.object({
19447
- document_id: z72.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19448
- index: z72.number().int().min(1).describe("Document body index at which to insert the page break.")
19564
+ var InsertPageBreakInput = z73.object({
19565
+ document_id: z73.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19566
+ index: z73.number().int().min(1).describe("Document body index at which to insert the page break.")
19449
19567
  });
19450
19568
  function createInsertPageBreakTool(docs) {
19451
19569
  return {
@@ -19469,11 +19587,11 @@ function createInsertPageBreakTool(docs) {
19469
19587
  }
19470
19588
  };
19471
19589
  }
19472
- var InsertTableInput = z72.object({
19473
- document_id: z72.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19474
- index: z72.number().int().min(1).describe("Document body index at which to insert the table."),
19475
- rows: z72.number().int().min(1).max(100).describe("Number of rows in the table (1\u2013100)."),
19476
- columns: z72.number().int().min(1).max(20).describe("Number of columns in the table (1\u201320).")
19590
+ var InsertTableInput = z73.object({
19591
+ document_id: z73.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19592
+ index: z73.number().int().min(1).describe("Document body index at which to insert the table."),
19593
+ rows: z73.number().int().min(1).max(100).describe("Number of rows in the table (1\u2013100)."),
19594
+ columns: z73.number().int().min(1).max(20).describe("Number of columns in the table (1\u201320).")
19477
19595
  });
19478
19596
  function createInsertTableTool(docs) {
19479
19597
  return {
@@ -19503,12 +19621,12 @@ function createInsertTableTool(docs) {
19503
19621
  }
19504
19622
  };
19505
19623
  }
19506
- var InsertImageInput = z72.object({
19507
- document_id: z72.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19508
- image_uri: z72.string().url().describe("Public URL of the image to insert (must be publicly accessible)."),
19509
- index: z72.number().int().min(1).describe("Document body index at which to insert the image."),
19510
- width_pt: z72.number().positive().optional().describe("Optional image width in points (1pt \u2248 1.333px). Omit to use source dimensions."),
19511
- height_pt: z72.number().positive().optional().describe("Optional image height in points. Omit to use source dimensions.")
19624
+ var InsertImageInput = z73.object({
19625
+ document_id: z73.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19626
+ image_uri: z73.string().url().describe("Public URL of the image to insert (must be publicly accessible)."),
19627
+ index: z73.number().int().min(1).describe("Document body index at which to insert the image."),
19628
+ width_pt: z73.number().positive().optional().describe("Optional image width in points (1pt \u2248 1.333px). Omit to use source dimensions."),
19629
+ height_pt: z73.number().positive().optional().describe("Optional image height in points. Omit to use source dimensions.")
19512
19630
  });
19513
19631
  function createInsertImageTool(docs) {
19514
19632
  return {
@@ -19546,8 +19664,8 @@ function createInsertImageTool(docs) {
19546
19664
  }
19547
19665
 
19548
19666
  // ../../packages/adapters/google-docs/src/tools/format.ts
19549
- import { z as z73 } from "zod";
19550
- var NamedStyleType2 = z73.enum([
19667
+ import { z as z74 } from "zod";
19668
+ var NamedStyleType2 = z74.enum([
19551
19669
  "NORMAL_TEXT",
19552
19670
  "TITLE",
19553
19671
  "SUBTITLE",
@@ -19558,21 +19676,21 @@ var NamedStyleType2 = z73.enum([
19558
19676
  "HEADING_5",
19559
19677
  "HEADING_6"
19560
19678
  ]);
19561
- var FormatTextInput = z73.object({
19562
- document_id: z73.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19563
- start_index: z73.number().int().min(1).describe("Start of the text range to format (inclusive). Get indices from docs_get."),
19564
- end_index: z73.number().int().min(2).describe("End of the text range to format (exclusive)."),
19565
- bold: z73.boolean().optional().describe("Apply bold formatting."),
19566
- italic: z73.boolean().optional().describe("Apply italic formatting."),
19567
- underline: z73.boolean().optional().describe("Apply underline formatting."),
19568
- strikethrough: z73.boolean().optional().describe("Apply strikethrough formatting."),
19569
- font_size_pt: z73.number().positive().optional().describe("Font size in points (e.g. 12, 14, 18)."),
19570
- foreground_color: z73.object({
19571
- red: z73.number().min(0).max(1).describe("Red channel 0\u20131."),
19572
- green: z73.number().min(0).max(1).describe("Green channel 0\u20131."),
19573
- blue: z73.number().min(0).max(1).describe("Blue channel 0\u20131.")
19679
+ var FormatTextInput = z74.object({
19680
+ document_id: z74.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19681
+ start_index: z74.number().int().min(1).describe("Start of the text range to format (inclusive). Get indices from docs_get."),
19682
+ end_index: z74.number().int().min(2).describe("End of the text range to format (exclusive)."),
19683
+ bold: z74.boolean().optional().describe("Apply bold formatting."),
19684
+ italic: z74.boolean().optional().describe("Apply italic formatting."),
19685
+ underline: z74.boolean().optional().describe("Apply underline formatting."),
19686
+ strikethrough: z74.boolean().optional().describe("Apply strikethrough formatting."),
19687
+ font_size_pt: z74.number().positive().optional().describe("Font size in points (e.g. 12, 14, 18)."),
19688
+ foreground_color: z74.object({
19689
+ red: z74.number().min(0).max(1).describe("Red channel 0\u20131."),
19690
+ green: z74.number().min(0).max(1).describe("Green channel 0\u20131."),
19691
+ blue: z74.number().min(0).max(1).describe("Blue channel 0\u20131.")
19574
19692
  }).optional().describe("Text foreground color (RGB, each channel 0\u20131)."),
19575
- font_family: z73.string().optional().describe('Font family name (e.g. "Arial", "Times New Roman", "Roboto").')
19693
+ font_family: z74.string().optional().describe('Font family name (e.g. "Arial", "Times New Roman", "Roboto").')
19576
19694
  });
19577
19695
  function createFormatTextTool(docs) {
19578
19696
  return {
@@ -19658,10 +19776,10 @@ function createFormatTextTool(docs) {
19658
19776
  }
19659
19777
  };
19660
19778
  }
19661
- var ApplyNamedStyleInput = z73.object({
19662
- document_id: z73.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19663
- start_index: z73.number().int().min(1).describe("Start of the paragraph range (inclusive). Get indices from docs_get."),
19664
- end_index: z73.number().int().min(2).describe("End of the paragraph range (exclusive)."),
19779
+ var ApplyNamedStyleInput = z74.object({
19780
+ document_id: z74.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19781
+ start_index: z74.number().int().min(1).describe("Start of the paragraph range (inclusive). Get indices from docs_get."),
19782
+ end_index: z74.number().int().min(2).describe("End of the paragraph range (exclusive)."),
19665
19783
  named_style: NamedStyleType2.describe(
19666
19784
  "The paragraph style to apply: NORMAL_TEXT, TITLE, SUBTITLE, HEADING_1 through HEADING_6."
19667
19785
  )
@@ -19702,9 +19820,9 @@ function createApplyNamedStyleTool(docs) {
19702
19820
  }
19703
19821
  };
19704
19822
  }
19705
- var BatchUpdateInput = z73.object({
19706
- document_id: z73.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19707
- requests: z73.array(z73.record(z73.string(), z73.unknown())).min(1).describe(
19823
+ var BatchUpdateInput = z74.object({
19824
+ document_id: z74.string().describe("The Google Doc ID (from the URL: docs.google.com/document/d/{ID}/edit)."),
19825
+ requests: z74.array(z74.record(z74.string(), z74.unknown())).min(1).describe(
19708
19826
  "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."
19709
19827
  )
19710
19828
  });
@@ -19890,10 +20008,10 @@ function createFirecrawlClient(apiKey) {
19890
20008
  }
19891
20009
 
19892
20010
  // ../../packages/adapters/firecrawl/src/tools/scrape.ts
19893
- import { z as z74 } from "zod";
19894
- var ScrapeInput = z74.object({
19895
- url: z74.string().url().describe("The URL to scrape."),
19896
- formats: z74.array(z74.enum(["markdown", "html", "links"])).optional().default(["markdown"]).describe("Content formats to return. Defaults to ['markdown'].")
20011
+ import { z as z75 } from "zod";
20012
+ var ScrapeInput = z75.object({
20013
+ url: z75.string().url().describe("The URL to scrape."),
20014
+ formats: z75.array(z75.enum(["markdown", "html", "links"])).optional().default(["markdown"]).describe("Content formats to return. Defaults to ['markdown'].")
19897
20015
  });
19898
20016
  function makeFirecrawlScrapeTool(client) {
19899
20017
  return {
@@ -19918,9 +20036,9 @@ function makeFirecrawlScrapeTool(client) {
19918
20036
  }
19919
20037
  };
19920
20038
  }
19921
- var MapInput = z74.object({
19922
- url: z74.string().url().describe("The root URL whose site to map."),
19923
- search: z74.string().optional().describe("Optional keyword filter \u2014 only return URLs matching this term.")
20039
+ var MapInput = z75.object({
20040
+ url: z75.string().url().describe("The root URL whose site to map."),
20041
+ search: z75.string().optional().describe("Optional keyword filter \u2014 only return URLs matching this term.")
19924
20042
  });
19925
20043
  function makeFirecrawlMapTool(client) {
19926
20044
  return {
@@ -19946,9 +20064,9 @@ function makeFirecrawlMapTool(client) {
19946
20064
  }
19947
20065
  };
19948
20066
  }
19949
- var SearchInput2 = z74.object({
19950
- query: z74.string().min(1).describe("The search query to send to Firecrawl."),
19951
- limit: z74.number().int().min(1).max(100).optional().describe("Maximum number of results to return (1\u2013100).")
20067
+ var SearchInput2 = z75.object({
20068
+ query: z75.string().min(1).describe("The search query to send to Firecrawl."),
20069
+ limit: z75.number().int().min(1).max(100).optional().describe("Maximum number of results to return (1\u2013100).")
19952
20070
  });
19953
20071
  function makeFirecrawlSearchTool(client) {
19954
20072
  return {
@@ -19979,10 +20097,10 @@ function makeFirecrawlSearchTool(client) {
19979
20097
  }
19980
20098
 
19981
20099
  // ../../packages/adapters/firecrawl/src/tools/crawl.ts
19982
- import { z as z75 } from "zod";
19983
- var CrawlStartInput = z75.object({
19984
- url: z75.string().url().describe("The root URL to crawl."),
19985
- limit: z75.number().int().min(1).max(100).optional().describe("Maximum number of pages to crawl (1\u2013100).")
20100
+ import { z as z76 } from "zod";
20101
+ var CrawlStartInput = z76.object({
20102
+ url: z76.string().url().describe("The root URL to crawl."),
20103
+ limit: z76.number().int().min(1).max(100).optional().describe("Maximum number of pages to crawl (1\u2013100).")
19986
20104
  });
19987
20105
  function makeFirecrawlCrawlStartTool(client) {
19988
20106
  return {
@@ -20005,8 +20123,8 @@ function makeFirecrawlCrawlStartTool(client) {
20005
20123
  }
20006
20124
  };
20007
20125
  }
20008
- var CrawlStatusInput = z75.object({
20009
- id: z75.string().min(1).describe("The crawl job ID returned by firecrawl_crawl_start.")
20126
+ var CrawlStatusInput = z76.object({
20127
+ id: z76.string().min(1).describe("The crawl job ID returned by firecrawl_crawl_start.")
20010
20128
  });
20011
20129
  function makeFirecrawlCrawlStatusTool(client) {
20012
20130
  return {
@@ -20099,12 +20217,12 @@ function createApifyClient(accessToken) {
20099
20217
 
20100
20218
  // ../../packages/adapters/apify/src/tools/actors.ts
20101
20219
  init_errors();
20102
- import { z as z76 } from "zod";
20103
- var RunActorInput = z76.object({
20104
- actorId: z76.string().describe(
20220
+ import { z as z77 } from "zod";
20221
+ var RunActorInput = z77.object({
20222
+ actorId: z77.string().describe(
20105
20223
  'The actor ID or name in the format "owner/actor-name" (e.g. "apify/web-scraper") or just the actor ID.'
20106
20224
  ),
20107
- input: z76.record(z76.string(), z76.unknown()).optional().describe(
20225
+ input: z77.record(z77.string(), z77.unknown()).optional().describe(
20108
20226
  "Input object to pass to the actor. Structure depends on the actor. Omit to use actor defaults."
20109
20227
  )
20110
20228
  });
@@ -20128,8 +20246,8 @@ function makeApifyRunActorTool(client) {
20128
20246
  }
20129
20247
  };
20130
20248
  }
20131
- var GetRunInput = z76.object({
20132
- runId: z76.string().describe("The Apify run ID to retrieve metadata for.")
20249
+ var GetRunInput = z77.object({
20250
+ runId: z77.string().describe("The Apify run ID to retrieve metadata for.")
20133
20251
  });
20134
20252
  function makeApifyGetRunTool(client) {
20135
20253
  return {
@@ -20162,10 +20280,10 @@ function makeApifyGetRunTool(client) {
20162
20280
 
20163
20281
  // ../../packages/adapters/apify/src/tools/datasets.ts
20164
20282
  init_errors();
20165
- import { z as z77 } from "zod";
20166
- var ListDatasetsInput = z77.object({
20167
- limit: z77.number().int().min(1).max(1e3).optional().default(100).describe("Maximum number of datasets to return (default 100, max 1000)."),
20168
- offset: z77.number().int().min(0).optional().default(0).describe("Number of datasets to skip (for pagination). Default 0.")
20283
+ import { z as z78 } from "zod";
20284
+ var ListDatasetsInput = z78.object({
20285
+ limit: z78.number().int().min(1).max(1e3).optional().default(100).describe("Maximum number of datasets to return (default 100, max 1000)."),
20286
+ offset: z78.number().int().min(0).optional().default(0).describe("Number of datasets to skip (for pagination). Default 0.")
20169
20287
  });
20170
20288
  function makeApifyListDatasetsTool(client) {
20171
20289
  return {
@@ -20197,12 +20315,12 @@ function makeApifyListDatasetsTool(client) {
20197
20315
  }
20198
20316
  };
20199
20317
  }
20200
- var GetDatasetItemsInput = z77.object({
20201
- datasetId: z77.string().describe(
20318
+ var GetDatasetItemsInput = z78.object({
20319
+ datasetId: z78.string().describe(
20202
20320
  "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."
20203
20321
  ),
20204
- limit: z77.number().int().min(1).max(1e3).optional().default(100).describe("Maximum number of items to return (default 100, max 1000)."),
20205
- offset: z77.number().int().min(0).optional().default(0).describe("Number of items to skip (for pagination). Default 0.")
20322
+ limit: z78.number().int().min(1).max(1e3).optional().default(100).describe("Maximum number of items to return (default 100, max 1000)."),
20323
+ offset: z78.number().int().min(0).optional().default(0).describe("Number of items to skip (for pagination). Default 0.")
20206
20324
  });
20207
20325
  function makeApifyGetDatasetItemsTool(client) {
20208
20326
  return {
@@ -20346,13 +20464,13 @@ function createTavilyClient(accessToken) {
20346
20464
  }
20347
20465
 
20348
20466
  // ../../packages/adapters/tavily/src/tools/search.ts
20349
- import { z as z78 } from "zod";
20350
- var SearchInput3 = z78.object({
20351
- query: z78.string().min(1).describe("The search query to send to Tavily."),
20352
- searchDepth: z78.enum(["basic", "advanced"]).optional().describe('Search depth: "basic" is faster, "advanced" is more thorough. Default: "basic".'),
20353
- maxResults: z78.number().int().min(1).max(20).optional().describe("Maximum number of results to return (1\u201320, default 5)."),
20354
- includeImages: z78.boolean().optional().describe("Whether to include image results. Default: false."),
20355
- topic: z78.enum(["general", "news"]).optional().describe('Search topic category: "general" or "news". Default: "general".')
20467
+ import { z as z79 } from "zod";
20468
+ var SearchInput3 = z79.object({
20469
+ query: z79.string().min(1).describe("The search query to send to Tavily."),
20470
+ searchDepth: z79.enum(["basic", "advanced"]).optional().describe('Search depth: "basic" is faster, "advanced" is more thorough. Default: "basic".'),
20471
+ maxResults: z79.number().int().min(1).max(20).optional().describe("Maximum number of results to return (1\u201320, default 5)."),
20472
+ includeImages: z79.boolean().optional().describe("Whether to include image results. Default: false."),
20473
+ topic: z79.enum(["general", "news"]).optional().describe('Search topic category: "general" or "news". Default: "general".')
20356
20474
  });
20357
20475
  function makeTavilySearchTool(client) {
20358
20476
  return {
@@ -20390,9 +20508,9 @@ function makeTavilySearchTool(client) {
20390
20508
  }
20391
20509
  };
20392
20510
  }
20393
- var ExtractInput = z78.object({
20394
- urls: z78.array(z78.string().url()).min(1).max(20).describe("Array of URLs to extract content from (max 20)."),
20395
- extractDepth: z78.enum(["basic", "advanced"]).optional().describe('Extraction depth: "basic" or "advanced". Default: "basic".')
20511
+ var ExtractInput = z79.object({
20512
+ urls: z79.array(z79.string().url()).min(1).max(20).describe("Array of URLs to extract content from (max 20)."),
20513
+ extractDepth: z79.enum(["basic", "advanced"]).optional().describe('Extraction depth: "basic" or "advanced". Default: "basic".')
20396
20514
  });
20397
20515
  function makeTavilyExtractTool(client) {
20398
20516
  return {
@@ -20423,10 +20541,10 @@ function makeTavilyExtractTool(client) {
20423
20541
  }
20424
20542
  };
20425
20543
  }
20426
- var CrawlInput = z78.object({
20427
- url: z78.string().url().describe("The seed URL to start crawling from."),
20428
- maxDepth: z78.number().int().min(1).max(5).optional().describe("Maximum link depth to follow from the seed URL (1\u20135, default 1)."),
20429
- limit: z78.number().int().min(1).max(50).optional().describe("Maximum number of pages to scrape (1\u201350, default 10).")
20544
+ var CrawlInput = z79.object({
20545
+ url: z79.string().url().describe("The seed URL to start crawling from."),
20546
+ maxDepth: z79.number().int().min(1).max(5).optional().describe("Maximum link depth to follow from the seed URL (1\u20135, default 1)."),
20547
+ limit: z79.number().int().min(1).max(50).optional().describe("Maximum number of pages to scrape (1\u201350, default 10).")
20430
20548
  });
20431
20549
  function makeTavilyCrawlTool(client) {
20432
20550
  return {
@@ -20625,31 +20743,31 @@ function getLiteralValue(schema) {
20625
20743
  }
20626
20744
 
20627
20745
  // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
20628
- import * as z79 from "zod/v4";
20746
+ import * as z80 from "zod/v4";
20629
20747
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
20630
20748
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
20631
20749
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
20632
20750
  var JSONRPC_VERSION = "2.0";
20633
- var AssertObjectSchema = z79.custom((v) => v !== null && (typeof v === "object" || typeof v === "function"));
20634
- var ProgressTokenSchema = z79.union([z79.string(), z79.number().int()]);
20635
- var CursorSchema = z79.string();
20636
- var TaskCreationParamsSchema = z79.looseObject({
20751
+ var AssertObjectSchema = z80.custom((v) => v !== null && (typeof v === "object" || typeof v === "function"));
20752
+ var ProgressTokenSchema = z80.union([z80.string(), z80.number().int()]);
20753
+ var CursorSchema = z80.string();
20754
+ var TaskCreationParamsSchema = z80.looseObject({
20637
20755
  /**
20638
20756
  * Requested duration in milliseconds to retain task from creation.
20639
20757
  */
20640
- ttl: z79.number().optional(),
20758
+ ttl: z80.number().optional(),
20641
20759
  /**
20642
20760
  * Time in milliseconds to wait between task status requests.
20643
20761
  */
20644
- pollInterval: z79.number().optional()
20762
+ pollInterval: z80.number().optional()
20645
20763
  });
20646
- var TaskMetadataSchema = z79.object({
20647
- ttl: z79.number().optional()
20764
+ var TaskMetadataSchema = z80.object({
20765
+ ttl: z80.number().optional()
20648
20766
  });
20649
- var RelatedTaskMetadataSchema = z79.object({
20650
- taskId: z79.string()
20767
+ var RelatedTaskMetadataSchema = z80.object({
20768
+ taskId: z80.string()
20651
20769
  });
20652
- var RequestMetaSchema = z79.looseObject({
20770
+ var RequestMetaSchema = z80.looseObject({
20653
20771
  /**
20654
20772
  * 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.
20655
20773
  */
@@ -20659,7 +20777,7 @@ var RequestMetaSchema = z79.looseObject({
20659
20777
  */
20660
20778
  [RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
20661
20779
  });
20662
- var BaseRequestParamsSchema = z79.object({
20780
+ var BaseRequestParamsSchema = z80.object({
20663
20781
  /**
20664
20782
  * See [General fields: `_meta`](/specification/draft/basic/index#meta) for notes on `_meta` usage.
20665
20783
  */
@@ -20677,42 +20795,42 @@ var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
20677
20795
  task: TaskMetadataSchema.optional()
20678
20796
  });
20679
20797
  var isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;
20680
- var RequestSchema = z79.object({
20681
- method: z79.string(),
20798
+ var RequestSchema = z80.object({
20799
+ method: z80.string(),
20682
20800
  params: BaseRequestParamsSchema.loose().optional()
20683
20801
  });
20684
- var NotificationsParamsSchema = z79.object({
20802
+ var NotificationsParamsSchema = z80.object({
20685
20803
  /**
20686
20804
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
20687
20805
  * for notes on _meta usage.
20688
20806
  */
20689
20807
  _meta: RequestMetaSchema.optional()
20690
20808
  });
20691
- var NotificationSchema = z79.object({
20692
- method: z79.string(),
20809
+ var NotificationSchema = z80.object({
20810
+ method: z80.string(),
20693
20811
  params: NotificationsParamsSchema.loose().optional()
20694
20812
  });
20695
- var ResultSchema = z79.looseObject({
20813
+ var ResultSchema = z80.looseObject({
20696
20814
  /**
20697
20815
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
20698
20816
  * for notes on _meta usage.
20699
20817
  */
20700
20818
  _meta: RequestMetaSchema.optional()
20701
20819
  });
20702
- var RequestIdSchema = z79.union([z79.string(), z79.number().int()]);
20703
- var JSONRPCRequestSchema = z79.object({
20704
- jsonrpc: z79.literal(JSONRPC_VERSION),
20820
+ var RequestIdSchema = z80.union([z80.string(), z80.number().int()]);
20821
+ var JSONRPCRequestSchema = z80.object({
20822
+ jsonrpc: z80.literal(JSONRPC_VERSION),
20705
20823
  id: RequestIdSchema,
20706
20824
  ...RequestSchema.shape
20707
20825
  }).strict();
20708
20826
  var isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;
20709
- var JSONRPCNotificationSchema = z79.object({
20710
- jsonrpc: z79.literal(JSONRPC_VERSION),
20827
+ var JSONRPCNotificationSchema = z80.object({
20828
+ jsonrpc: z80.literal(JSONRPC_VERSION),
20711
20829
  ...NotificationSchema.shape
20712
20830
  }).strict();
20713
20831
  var isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
20714
- var JSONRPCResultResponseSchema = z79.object({
20715
- jsonrpc: z79.literal(JSONRPC_VERSION),
20832
+ var JSONRPCResultResponseSchema = z80.object({
20833
+ jsonrpc: z80.literal(JSONRPC_VERSION),
20716
20834
  id: RequestIdSchema,
20717
20835
  result: ResultSchema
20718
20836
  }).strict();
@@ -20728,32 +20846,32 @@ var ErrorCode;
20728
20846
  ErrorCode2[ErrorCode2["InternalError"] = -32603] = "InternalError";
20729
20847
  ErrorCode2[ErrorCode2["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
20730
20848
  })(ErrorCode || (ErrorCode = {}));
20731
- var JSONRPCErrorResponseSchema = z79.object({
20732
- jsonrpc: z79.literal(JSONRPC_VERSION),
20849
+ var JSONRPCErrorResponseSchema = z80.object({
20850
+ jsonrpc: z80.literal(JSONRPC_VERSION),
20733
20851
  id: RequestIdSchema.optional(),
20734
- error: z79.object({
20852
+ error: z80.object({
20735
20853
  /**
20736
20854
  * The error type that occurred.
20737
20855
  */
20738
- code: z79.number().int(),
20856
+ code: z80.number().int(),
20739
20857
  /**
20740
20858
  * A short description of the error. The message SHOULD be limited to a concise single sentence.
20741
20859
  */
20742
- message: z79.string(),
20860
+ message: z80.string(),
20743
20861
  /**
20744
20862
  * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
20745
20863
  */
20746
- data: z79.unknown().optional()
20864
+ data: z80.unknown().optional()
20747
20865
  })
20748
20866
  }).strict();
20749
20867
  var isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;
20750
- var JSONRPCMessageSchema = z79.union([
20868
+ var JSONRPCMessageSchema = z80.union([
20751
20869
  JSONRPCRequestSchema,
20752
20870
  JSONRPCNotificationSchema,
20753
20871
  JSONRPCResultResponseSchema,
20754
20872
  JSONRPCErrorResponseSchema
20755
20873
  ]);
20756
- var JSONRPCResponseSchema = z79.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
20874
+ var JSONRPCResponseSchema = z80.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
20757
20875
  var EmptyResultSchema = ResultSchema.strict();
20758
20876
  var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
20759
20877
  /**
@@ -20765,28 +20883,28 @@ var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
20765
20883
  /**
20766
20884
  * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
20767
20885
  */
20768
- reason: z79.string().optional()
20886
+ reason: z80.string().optional()
20769
20887
  });
20770
20888
  var CancelledNotificationSchema = NotificationSchema.extend({
20771
- method: z79.literal("notifications/cancelled"),
20889
+ method: z80.literal("notifications/cancelled"),
20772
20890
  params: CancelledNotificationParamsSchema
20773
20891
  });
20774
- var IconSchema = z79.object({
20892
+ var IconSchema = z80.object({
20775
20893
  /**
20776
20894
  * URL or data URI for the icon.
20777
20895
  */
20778
- src: z79.string(),
20896
+ src: z80.string(),
20779
20897
  /**
20780
20898
  * Optional MIME type for the icon.
20781
20899
  */
20782
- mimeType: z79.string().optional(),
20900
+ mimeType: z80.string().optional(),
20783
20901
  /**
20784
20902
  * Optional array of strings that specify sizes at which the icon can be used.
20785
20903
  * Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.
20786
20904
  *
20787
20905
  * If not provided, the client should assume that the icon can be used at any size.
20788
20906
  */
20789
- sizes: z79.array(z79.string()).optional(),
20907
+ sizes: z80.array(z80.string()).optional(),
20790
20908
  /**
20791
20909
  * Optional specifier for the theme this icon is designed for. `light` indicates
20792
20910
  * the icon is designed to be used with a light background, and `dark` indicates
@@ -20794,9 +20912,9 @@ var IconSchema = z79.object({
20794
20912
  *
20795
20913
  * If not provided, the client should assume the icon can be used with any theme.
20796
20914
  */
20797
- theme: z79.enum(["light", "dark"]).optional()
20915
+ theme: z80.enum(["light", "dark"]).optional()
20798
20916
  });
20799
- var IconsSchema = z79.object({
20917
+ var IconsSchema = z80.object({
20800
20918
  /**
20801
20919
  * Optional set of sized icons that the client can display in a user interface.
20802
20920
  *
@@ -20808,11 +20926,11 @@ var IconsSchema = z79.object({
20808
20926
  * - `image/svg+xml` - SVG images (scalable but requires security precautions)
20809
20927
  * - `image/webp` - WebP images (modern, efficient format)
20810
20928
  */
20811
- icons: z79.array(IconSchema).optional()
20929
+ icons: z80.array(IconSchema).optional()
20812
20930
  });
20813
- var BaseMetadataSchema = z79.object({
20931
+ var BaseMetadataSchema = z80.object({
20814
20932
  /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
20815
- name: z79.string(),
20933
+ name: z80.string(),
20816
20934
  /**
20817
20935
  * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
20818
20936
  * even by those unfamiliar with domain-specific terminology.
@@ -20821,16 +20939,16 @@ var BaseMetadataSchema = z79.object({
20821
20939
  * where `annotations.title` should be given precedence over using `name`,
20822
20940
  * if present).
20823
20941
  */
20824
- title: z79.string().optional()
20942
+ title: z80.string().optional()
20825
20943
  });
20826
20944
  var ImplementationSchema = BaseMetadataSchema.extend({
20827
20945
  ...BaseMetadataSchema.shape,
20828
20946
  ...IconsSchema.shape,
20829
- version: z79.string(),
20947
+ version: z80.string(),
20830
20948
  /**
20831
20949
  * An optional URL of the website for this implementation.
20832
20950
  */
20833
- websiteUrl: z79.string().optional(),
20951
+ websiteUrl: z80.string().optional(),
20834
20952
  /**
20835
20953
  * An optional human-readable description of what this implementation does.
20836
20954
  *
@@ -20838,23 +20956,23 @@ var ImplementationSchema = BaseMetadataSchema.extend({
20838
20956
  * and capabilities. For example, a server might describe the types of resources
20839
20957
  * or tools it provides, while a client might describe its intended use case.
20840
20958
  */
20841
- description: z79.string().optional()
20959
+ description: z80.string().optional()
20842
20960
  });
20843
- var FormElicitationCapabilitySchema = z79.intersection(z79.object({
20844
- applyDefaults: z79.boolean().optional()
20845
- }), z79.record(z79.string(), z79.unknown()));
20846
- var ElicitationCapabilitySchema = z79.preprocess((value) => {
20961
+ var FormElicitationCapabilitySchema = z80.intersection(z80.object({
20962
+ applyDefaults: z80.boolean().optional()
20963
+ }), z80.record(z80.string(), z80.unknown()));
20964
+ var ElicitationCapabilitySchema = z80.preprocess((value) => {
20847
20965
  if (value && typeof value === "object" && !Array.isArray(value)) {
20848
20966
  if (Object.keys(value).length === 0) {
20849
20967
  return { form: {} };
20850
20968
  }
20851
20969
  }
20852
20970
  return value;
20853
- }, z79.intersection(z79.object({
20971
+ }, z80.intersection(z80.object({
20854
20972
  form: FormElicitationCapabilitySchema.optional(),
20855
20973
  url: AssertObjectSchema.optional()
20856
- }), z79.record(z79.string(), z79.unknown()).optional()));
20857
- var ClientTasksCapabilitySchema = z79.looseObject({
20974
+ }), z80.record(z80.string(), z80.unknown()).optional()));
20975
+ var ClientTasksCapabilitySchema = z80.looseObject({
20858
20976
  /**
20859
20977
  * Present if the client supports listing tasks.
20860
20978
  */
@@ -20866,22 +20984,22 @@ var ClientTasksCapabilitySchema = z79.looseObject({
20866
20984
  /**
20867
20985
  * Capabilities for task creation on specific request types.
20868
20986
  */
20869
- requests: z79.looseObject({
20987
+ requests: z80.looseObject({
20870
20988
  /**
20871
20989
  * Task support for sampling requests.
20872
20990
  */
20873
- sampling: z79.looseObject({
20991
+ sampling: z80.looseObject({
20874
20992
  createMessage: AssertObjectSchema.optional()
20875
20993
  }).optional(),
20876
20994
  /**
20877
20995
  * Task support for elicitation requests.
20878
20996
  */
20879
- elicitation: z79.looseObject({
20997
+ elicitation: z80.looseObject({
20880
20998
  create: AssertObjectSchema.optional()
20881
20999
  }).optional()
20882
21000
  }).optional()
20883
21001
  });
20884
- var ServerTasksCapabilitySchema = z79.looseObject({
21002
+ var ServerTasksCapabilitySchema = z80.looseObject({
20885
21003
  /**
20886
21004
  * Present if the server supports listing tasks.
20887
21005
  */
@@ -20893,24 +21011,24 @@ var ServerTasksCapabilitySchema = z79.looseObject({
20893
21011
  /**
20894
21012
  * Capabilities for task creation on specific request types.
20895
21013
  */
20896
- requests: z79.looseObject({
21014
+ requests: z80.looseObject({
20897
21015
  /**
20898
21016
  * Task support for tool requests.
20899
21017
  */
20900
- tools: z79.looseObject({
21018
+ tools: z80.looseObject({
20901
21019
  call: AssertObjectSchema.optional()
20902
21020
  }).optional()
20903
21021
  }).optional()
20904
21022
  });
20905
- var ClientCapabilitiesSchema = z79.object({
21023
+ var ClientCapabilitiesSchema = z80.object({
20906
21024
  /**
20907
21025
  * Experimental, non-standard capabilities that the client supports.
20908
21026
  */
20909
- experimental: z79.record(z79.string(), AssertObjectSchema).optional(),
21027
+ experimental: z80.record(z80.string(), AssertObjectSchema).optional(),
20910
21028
  /**
20911
21029
  * Present if the client supports sampling from an LLM.
20912
21030
  */
20913
- sampling: z79.object({
21031
+ sampling: z80.object({
20914
21032
  /**
20915
21033
  * Present if the client supports context inclusion via includeContext parameter.
20916
21034
  * If not declared, servers SHOULD only use `includeContext: "none"` (or omit it).
@@ -20928,11 +21046,11 @@ var ClientCapabilitiesSchema = z79.object({
20928
21046
  /**
20929
21047
  * Present if the client supports listing roots.
20930
21048
  */
20931
- roots: z79.object({
21049
+ roots: z80.object({
20932
21050
  /**
20933
21051
  * Whether the client supports issuing notifications for changes to the roots list.
20934
21052
  */
20935
- listChanged: z79.boolean().optional()
21053
+ listChanged: z80.boolean().optional()
20936
21054
  }).optional(),
20937
21055
  /**
20938
21056
  * Present if the client supports task creation.
@@ -20941,25 +21059,25 @@ var ClientCapabilitiesSchema = z79.object({
20941
21059
  /**
20942
21060
  * Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
20943
21061
  */
20944
- extensions: z79.record(z79.string(), AssertObjectSchema).optional()
21062
+ extensions: z80.record(z80.string(), AssertObjectSchema).optional()
20945
21063
  });
20946
21064
  var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
20947
21065
  /**
20948
21066
  * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
20949
21067
  */
20950
- protocolVersion: z79.string(),
21068
+ protocolVersion: z80.string(),
20951
21069
  capabilities: ClientCapabilitiesSchema,
20952
21070
  clientInfo: ImplementationSchema
20953
21071
  });
20954
21072
  var InitializeRequestSchema = RequestSchema.extend({
20955
- method: z79.literal("initialize"),
21073
+ method: z80.literal("initialize"),
20956
21074
  params: InitializeRequestParamsSchema
20957
21075
  });
20958
- var ServerCapabilitiesSchema = z79.object({
21076
+ var ServerCapabilitiesSchema = z80.object({
20959
21077
  /**
20960
21078
  * Experimental, non-standard capabilities that the server supports.
20961
21079
  */
20962
- experimental: z79.record(z79.string(), AssertObjectSchema).optional(),
21080
+ experimental: z80.record(z80.string(), AssertObjectSchema).optional(),
20963
21081
  /**
20964
21082
  * Present if the server supports sending log messages to the client.
20965
21083
  */
@@ -20971,33 +21089,33 @@ var ServerCapabilitiesSchema = z79.object({
20971
21089
  /**
20972
21090
  * Present if the server offers any prompt templates.
20973
21091
  */
20974
- prompts: z79.object({
21092
+ prompts: z80.object({
20975
21093
  /**
20976
21094
  * Whether this server supports issuing notifications for changes to the prompt list.
20977
21095
  */
20978
- listChanged: z79.boolean().optional()
21096
+ listChanged: z80.boolean().optional()
20979
21097
  }).optional(),
20980
21098
  /**
20981
21099
  * Present if the server offers any resources to read.
20982
21100
  */
20983
- resources: z79.object({
21101
+ resources: z80.object({
20984
21102
  /**
20985
21103
  * Whether this server supports clients subscribing to resource updates.
20986
21104
  */
20987
- subscribe: z79.boolean().optional(),
21105
+ subscribe: z80.boolean().optional(),
20988
21106
  /**
20989
21107
  * Whether this server supports issuing notifications for changes to the resource list.
20990
21108
  */
20991
- listChanged: z79.boolean().optional()
21109
+ listChanged: z80.boolean().optional()
20992
21110
  }).optional(),
20993
21111
  /**
20994
21112
  * Present if the server offers any tools to call.
20995
21113
  */
20996
- tools: z79.object({
21114
+ tools: z80.object({
20997
21115
  /**
20998
21116
  * Whether this server supports issuing notifications for changes to the tool list.
20999
21117
  */
21000
- listChanged: z79.boolean().optional()
21118
+ listChanged: z80.boolean().optional()
21001
21119
  }).optional(),
21002
21120
  /**
21003
21121
  * Present if the server supports task creation.
@@ -21006,13 +21124,13 @@ var ServerCapabilitiesSchema = z79.object({
21006
21124
  /**
21007
21125
  * Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
21008
21126
  */
21009
- extensions: z79.record(z79.string(), AssertObjectSchema).optional()
21127
+ extensions: z80.record(z80.string(), AssertObjectSchema).optional()
21010
21128
  });
21011
21129
  var InitializeResultSchema = ResultSchema.extend({
21012
21130
  /**
21013
21131
  * 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.
21014
21132
  */
21015
- protocolVersion: z79.string(),
21133
+ protocolVersion: z80.string(),
21016
21134
  capabilities: ServerCapabilitiesSchema,
21017
21135
  serverInfo: ImplementationSchema,
21018
21136
  /**
@@ -21020,32 +21138,32 @@ var InitializeResultSchema = ResultSchema.extend({
21020
21138
  *
21021
21139
  * 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.
21022
21140
  */
21023
- instructions: z79.string().optional()
21141
+ instructions: z80.string().optional()
21024
21142
  });
21025
21143
  var InitializedNotificationSchema = NotificationSchema.extend({
21026
- method: z79.literal("notifications/initialized"),
21144
+ method: z80.literal("notifications/initialized"),
21027
21145
  params: NotificationsParamsSchema.optional()
21028
21146
  });
21029
21147
  var isInitializedNotification = (value) => InitializedNotificationSchema.safeParse(value).success;
21030
21148
  var PingRequestSchema = RequestSchema.extend({
21031
- method: z79.literal("ping"),
21149
+ method: z80.literal("ping"),
21032
21150
  params: BaseRequestParamsSchema.optional()
21033
21151
  });
21034
- var ProgressSchema = z79.object({
21152
+ var ProgressSchema = z80.object({
21035
21153
  /**
21036
21154
  * The progress thus far. This should increase every time progress is made, even if the total is unknown.
21037
21155
  */
21038
- progress: z79.number(),
21156
+ progress: z80.number(),
21039
21157
  /**
21040
21158
  * Total number of items to process (or total progress required), if known.
21041
21159
  */
21042
- total: z79.optional(z79.number()),
21160
+ total: z80.optional(z80.number()),
21043
21161
  /**
21044
21162
  * An optional message describing the current progress.
21045
21163
  */
21046
- message: z79.optional(z79.string())
21164
+ message: z80.optional(z80.string())
21047
21165
  });
21048
- var ProgressNotificationParamsSchema = z79.object({
21166
+ var ProgressNotificationParamsSchema = z80.object({
21049
21167
  ...NotificationsParamsSchema.shape,
21050
21168
  ...ProgressSchema.shape,
21051
21169
  /**
@@ -21054,7 +21172,7 @@ var ProgressNotificationParamsSchema = z79.object({
21054
21172
  progressToken: ProgressTokenSchema
21055
21173
  });
21056
21174
  var ProgressNotificationSchema = NotificationSchema.extend({
21057
- method: z79.literal("notifications/progress"),
21175
+ method: z80.literal("notifications/progress"),
21058
21176
  params: ProgressNotificationParamsSchema
21059
21177
  });
21060
21178
  var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
@@ -21074,86 +21192,86 @@ var PaginatedResultSchema = ResultSchema.extend({
21074
21192
  */
21075
21193
  nextCursor: CursorSchema.optional()
21076
21194
  });
21077
- var TaskStatusSchema2 = z79.enum(["working", "input_required", "completed", "failed", "cancelled"]);
21078
- var TaskSchema = z79.object({
21079
- taskId: z79.string(),
21195
+ var TaskStatusSchema2 = z80.enum(["working", "input_required", "completed", "failed", "cancelled"]);
21196
+ var TaskSchema = z80.object({
21197
+ taskId: z80.string(),
21080
21198
  status: TaskStatusSchema2,
21081
21199
  /**
21082
21200
  * Time in milliseconds to keep task results available after completion.
21083
21201
  * If null, the task has unlimited lifetime until manually cleaned up.
21084
21202
  */
21085
- ttl: z79.union([z79.number(), z79.null()]),
21203
+ ttl: z80.union([z80.number(), z80.null()]),
21086
21204
  /**
21087
21205
  * ISO 8601 timestamp when the task was created.
21088
21206
  */
21089
- createdAt: z79.string(),
21207
+ createdAt: z80.string(),
21090
21208
  /**
21091
21209
  * ISO 8601 timestamp when the task was last updated.
21092
21210
  */
21093
- lastUpdatedAt: z79.string(),
21094
- pollInterval: z79.optional(z79.number()),
21211
+ lastUpdatedAt: z80.string(),
21212
+ pollInterval: z80.optional(z80.number()),
21095
21213
  /**
21096
21214
  * Optional diagnostic message for failed tasks or other status information.
21097
21215
  */
21098
- statusMessage: z79.optional(z79.string())
21216
+ statusMessage: z80.optional(z80.string())
21099
21217
  });
21100
21218
  var CreateTaskResultSchema = ResultSchema.extend({
21101
21219
  task: TaskSchema
21102
21220
  });
21103
21221
  var TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema);
21104
21222
  var TaskStatusNotificationSchema = NotificationSchema.extend({
21105
- method: z79.literal("notifications/tasks/status"),
21223
+ method: z80.literal("notifications/tasks/status"),
21106
21224
  params: TaskStatusNotificationParamsSchema
21107
21225
  });
21108
21226
  var GetTaskRequestSchema = RequestSchema.extend({
21109
- method: z79.literal("tasks/get"),
21227
+ method: z80.literal("tasks/get"),
21110
21228
  params: BaseRequestParamsSchema.extend({
21111
- taskId: z79.string()
21229
+ taskId: z80.string()
21112
21230
  })
21113
21231
  });
21114
21232
  var GetTaskResultSchema = ResultSchema.merge(TaskSchema);
21115
21233
  var GetTaskPayloadRequestSchema = RequestSchema.extend({
21116
- method: z79.literal("tasks/result"),
21234
+ method: z80.literal("tasks/result"),
21117
21235
  params: BaseRequestParamsSchema.extend({
21118
- taskId: z79.string()
21236
+ taskId: z80.string()
21119
21237
  })
21120
21238
  });
21121
21239
  var GetTaskPayloadResultSchema = ResultSchema.loose();
21122
21240
  var ListTasksRequestSchema = PaginatedRequestSchema.extend({
21123
- method: z79.literal("tasks/list")
21241
+ method: z80.literal("tasks/list")
21124
21242
  });
21125
21243
  var ListTasksResultSchema = PaginatedResultSchema.extend({
21126
- tasks: z79.array(TaskSchema)
21244
+ tasks: z80.array(TaskSchema)
21127
21245
  });
21128
21246
  var CancelTaskRequestSchema = RequestSchema.extend({
21129
- method: z79.literal("tasks/cancel"),
21247
+ method: z80.literal("tasks/cancel"),
21130
21248
  params: BaseRequestParamsSchema.extend({
21131
- taskId: z79.string()
21249
+ taskId: z80.string()
21132
21250
  })
21133
21251
  });
21134
21252
  var CancelTaskResultSchema = ResultSchema.merge(TaskSchema);
21135
- var ResourceContentsSchema = z79.object({
21253
+ var ResourceContentsSchema = z80.object({
21136
21254
  /**
21137
21255
  * The URI of this resource.
21138
21256
  */
21139
- uri: z79.string(),
21257
+ uri: z80.string(),
21140
21258
  /**
21141
21259
  * The MIME type of this resource, if known.
21142
21260
  */
21143
- mimeType: z79.optional(z79.string()),
21261
+ mimeType: z80.optional(z80.string()),
21144
21262
  /**
21145
21263
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21146
21264
  * for notes on _meta usage.
21147
21265
  */
21148
- _meta: z79.record(z79.string(), z79.unknown()).optional()
21266
+ _meta: z80.record(z80.string(), z80.unknown()).optional()
21149
21267
  });
21150
21268
  var TextResourceContentsSchema = ResourceContentsSchema.extend({
21151
21269
  /**
21152
21270
  * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
21153
21271
  */
21154
- text: z79.string()
21272
+ text: z80.string()
21155
21273
  });
21156
- var Base64Schema = z79.string().refine((val) => {
21274
+ var Base64Schema = z80.string().refine((val) => {
21157
21275
  try {
21158
21276
  atob(val);
21159
21277
  return true;
@@ -21167,44 +21285,44 @@ var BlobResourceContentsSchema = ResourceContentsSchema.extend({
21167
21285
  */
21168
21286
  blob: Base64Schema
21169
21287
  });
21170
- var RoleSchema = z79.enum(["user", "assistant"]);
21171
- var AnnotationsSchema = z79.object({
21288
+ var RoleSchema = z80.enum(["user", "assistant"]);
21289
+ var AnnotationsSchema = z80.object({
21172
21290
  /**
21173
21291
  * Intended audience(s) for the resource.
21174
21292
  */
21175
- audience: z79.array(RoleSchema).optional(),
21293
+ audience: z80.array(RoleSchema).optional(),
21176
21294
  /**
21177
21295
  * Importance hint for the resource, from 0 (least) to 1 (most).
21178
21296
  */
21179
- priority: z79.number().min(0).max(1).optional(),
21297
+ priority: z80.number().min(0).max(1).optional(),
21180
21298
  /**
21181
21299
  * ISO 8601 timestamp for the most recent modification.
21182
21300
  */
21183
- lastModified: z79.iso.datetime({ offset: true }).optional()
21301
+ lastModified: z80.iso.datetime({ offset: true }).optional()
21184
21302
  });
21185
- var ResourceSchema = z79.object({
21303
+ var ResourceSchema = z80.object({
21186
21304
  ...BaseMetadataSchema.shape,
21187
21305
  ...IconsSchema.shape,
21188
21306
  /**
21189
21307
  * The URI of this resource.
21190
21308
  */
21191
- uri: z79.string(),
21309
+ uri: z80.string(),
21192
21310
  /**
21193
21311
  * A description of what this resource represents.
21194
21312
  *
21195
21313
  * 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.
21196
21314
  */
21197
- description: z79.optional(z79.string()),
21315
+ description: z80.optional(z80.string()),
21198
21316
  /**
21199
21317
  * The MIME type of this resource, if known.
21200
21318
  */
21201
- mimeType: z79.optional(z79.string()),
21319
+ mimeType: z80.optional(z80.string()),
21202
21320
  /**
21203
21321
  * The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
21204
21322
  *
21205
21323
  * This can be used by Hosts to display file sizes and estimate context window usage.
21206
21324
  */
21207
- size: z79.optional(z79.number()),
21325
+ size: z80.optional(z80.number()),
21208
21326
  /**
21209
21327
  * Optional annotations for the client.
21210
21328
  */
@@ -21213,25 +21331,25 @@ var ResourceSchema = z79.object({
21213
21331
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21214
21332
  * for notes on _meta usage.
21215
21333
  */
21216
- _meta: z79.optional(z79.looseObject({}))
21334
+ _meta: z80.optional(z80.looseObject({}))
21217
21335
  });
21218
- var ResourceTemplateSchema = z79.object({
21336
+ var ResourceTemplateSchema = z80.object({
21219
21337
  ...BaseMetadataSchema.shape,
21220
21338
  ...IconsSchema.shape,
21221
21339
  /**
21222
21340
  * A URI template (according to RFC 6570) that can be used to construct resource URIs.
21223
21341
  */
21224
- uriTemplate: z79.string(),
21342
+ uriTemplate: z80.string(),
21225
21343
  /**
21226
21344
  * A description of what this template is for.
21227
21345
  *
21228
21346
  * 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.
21229
21347
  */
21230
- description: z79.optional(z79.string()),
21348
+ description: z80.optional(z80.string()),
21231
21349
  /**
21232
21350
  * 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.
21233
21351
  */
21234
- mimeType: z79.optional(z79.string()),
21352
+ mimeType: z80.optional(z80.string()),
21235
21353
  /**
21236
21354
  * Optional annotations for the client.
21237
21355
  */
@@ -21240,19 +21358,19 @@ var ResourceTemplateSchema = z79.object({
21240
21358
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21241
21359
  * for notes on _meta usage.
21242
21360
  */
21243
- _meta: z79.optional(z79.looseObject({}))
21361
+ _meta: z80.optional(z80.looseObject({}))
21244
21362
  });
21245
21363
  var ListResourcesRequestSchema = PaginatedRequestSchema.extend({
21246
- method: z79.literal("resources/list")
21364
+ method: z80.literal("resources/list")
21247
21365
  });
21248
21366
  var ListResourcesResultSchema = PaginatedResultSchema.extend({
21249
- resources: z79.array(ResourceSchema)
21367
+ resources: z80.array(ResourceSchema)
21250
21368
  });
21251
21369
  var ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
21252
- method: z79.literal("resources/templates/list")
21370
+ method: z80.literal("resources/templates/list")
21253
21371
  });
21254
21372
  var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
21255
- resourceTemplates: z79.array(ResourceTemplateSchema)
21373
+ resourceTemplates: z80.array(ResourceTemplateSchema)
21256
21374
  });
21257
21375
  var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
21258
21376
  /**
@@ -21260,97 +21378,97 @@ var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
21260
21378
  *
21261
21379
  * @format uri
21262
21380
  */
21263
- uri: z79.string()
21381
+ uri: z80.string()
21264
21382
  });
21265
21383
  var ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
21266
21384
  var ReadResourceRequestSchema = RequestSchema.extend({
21267
- method: z79.literal("resources/read"),
21385
+ method: z80.literal("resources/read"),
21268
21386
  params: ReadResourceRequestParamsSchema
21269
21387
  });
21270
21388
  var ReadResourceResultSchema = ResultSchema.extend({
21271
- contents: z79.array(z79.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
21389
+ contents: z80.array(z80.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
21272
21390
  });
21273
21391
  var ResourceListChangedNotificationSchema = NotificationSchema.extend({
21274
- method: z79.literal("notifications/resources/list_changed"),
21392
+ method: z80.literal("notifications/resources/list_changed"),
21275
21393
  params: NotificationsParamsSchema.optional()
21276
21394
  });
21277
21395
  var SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
21278
21396
  var SubscribeRequestSchema = RequestSchema.extend({
21279
- method: z79.literal("resources/subscribe"),
21397
+ method: z80.literal("resources/subscribe"),
21280
21398
  params: SubscribeRequestParamsSchema
21281
21399
  });
21282
21400
  var UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
21283
21401
  var UnsubscribeRequestSchema = RequestSchema.extend({
21284
- method: z79.literal("resources/unsubscribe"),
21402
+ method: z80.literal("resources/unsubscribe"),
21285
21403
  params: UnsubscribeRequestParamsSchema
21286
21404
  });
21287
21405
  var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
21288
21406
  /**
21289
21407
  * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
21290
21408
  */
21291
- uri: z79.string()
21409
+ uri: z80.string()
21292
21410
  });
21293
21411
  var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
21294
- method: z79.literal("notifications/resources/updated"),
21412
+ method: z80.literal("notifications/resources/updated"),
21295
21413
  params: ResourceUpdatedNotificationParamsSchema
21296
21414
  });
21297
- var PromptArgumentSchema = z79.object({
21415
+ var PromptArgumentSchema = z80.object({
21298
21416
  /**
21299
21417
  * The name of the argument.
21300
21418
  */
21301
- name: z79.string(),
21419
+ name: z80.string(),
21302
21420
  /**
21303
21421
  * A human-readable description of the argument.
21304
21422
  */
21305
- description: z79.optional(z79.string()),
21423
+ description: z80.optional(z80.string()),
21306
21424
  /**
21307
21425
  * Whether this argument must be provided.
21308
21426
  */
21309
- required: z79.optional(z79.boolean())
21427
+ required: z80.optional(z80.boolean())
21310
21428
  });
21311
- var PromptSchema = z79.object({
21429
+ var PromptSchema = z80.object({
21312
21430
  ...BaseMetadataSchema.shape,
21313
21431
  ...IconsSchema.shape,
21314
21432
  /**
21315
21433
  * An optional description of what this prompt provides
21316
21434
  */
21317
- description: z79.optional(z79.string()),
21435
+ description: z80.optional(z80.string()),
21318
21436
  /**
21319
21437
  * A list of arguments to use for templating the prompt.
21320
21438
  */
21321
- arguments: z79.optional(z79.array(PromptArgumentSchema)),
21439
+ arguments: z80.optional(z80.array(PromptArgumentSchema)),
21322
21440
  /**
21323
21441
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21324
21442
  * for notes on _meta usage.
21325
21443
  */
21326
- _meta: z79.optional(z79.looseObject({}))
21444
+ _meta: z80.optional(z80.looseObject({}))
21327
21445
  });
21328
21446
  var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
21329
- method: z79.literal("prompts/list")
21447
+ method: z80.literal("prompts/list")
21330
21448
  });
21331
21449
  var ListPromptsResultSchema = PaginatedResultSchema.extend({
21332
- prompts: z79.array(PromptSchema)
21450
+ prompts: z80.array(PromptSchema)
21333
21451
  });
21334
21452
  var GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
21335
21453
  /**
21336
21454
  * The name of the prompt or prompt template.
21337
21455
  */
21338
- name: z79.string(),
21456
+ name: z80.string(),
21339
21457
  /**
21340
21458
  * Arguments to use for templating the prompt.
21341
21459
  */
21342
- arguments: z79.record(z79.string(), z79.string()).optional()
21460
+ arguments: z80.record(z80.string(), z80.string()).optional()
21343
21461
  });
21344
21462
  var GetPromptRequestSchema = RequestSchema.extend({
21345
- method: z79.literal("prompts/get"),
21463
+ method: z80.literal("prompts/get"),
21346
21464
  params: GetPromptRequestParamsSchema
21347
21465
  });
21348
- var TextContentSchema = z79.object({
21349
- type: z79.literal("text"),
21466
+ var TextContentSchema = z80.object({
21467
+ type: z80.literal("text"),
21350
21468
  /**
21351
21469
  * The text content of the message.
21352
21470
  */
21353
- text: z79.string(),
21471
+ text: z80.string(),
21354
21472
  /**
21355
21473
  * Optional annotations for the client.
21356
21474
  */
@@ -21359,10 +21477,10 @@ var TextContentSchema = z79.object({
21359
21477
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21360
21478
  * for notes on _meta usage.
21361
21479
  */
21362
- _meta: z79.record(z79.string(), z79.unknown()).optional()
21480
+ _meta: z80.record(z80.string(), z80.unknown()).optional()
21363
21481
  });
21364
- var ImageContentSchema = z79.object({
21365
- type: z79.literal("image"),
21482
+ var ImageContentSchema = z80.object({
21483
+ type: z80.literal("image"),
21366
21484
  /**
21367
21485
  * The base64-encoded image data.
21368
21486
  */
@@ -21370,7 +21488,7 @@ var ImageContentSchema = z79.object({
21370
21488
  /**
21371
21489
  * The MIME type of the image. Different providers may support different image types.
21372
21490
  */
21373
- mimeType: z79.string(),
21491
+ mimeType: z80.string(),
21374
21492
  /**
21375
21493
  * Optional annotations for the client.
21376
21494
  */
@@ -21379,10 +21497,10 @@ var ImageContentSchema = z79.object({
21379
21497
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21380
21498
  * for notes on _meta usage.
21381
21499
  */
21382
- _meta: z79.record(z79.string(), z79.unknown()).optional()
21500
+ _meta: z80.record(z80.string(), z80.unknown()).optional()
21383
21501
  });
21384
- var AudioContentSchema = z79.object({
21385
- type: z79.literal("audio"),
21502
+ var AudioContentSchema = z80.object({
21503
+ type: z80.literal("audio"),
21386
21504
  /**
21387
21505
  * The base64-encoded audio data.
21388
21506
  */
@@ -21390,7 +21508,7 @@ var AudioContentSchema = z79.object({
21390
21508
  /**
21391
21509
  * The MIME type of the audio. Different providers may support different audio types.
21392
21510
  */
21393
- mimeType: z79.string(),
21511
+ mimeType: z80.string(),
21394
21512
  /**
21395
21513
  * Optional annotations for the client.
21396
21514
  */
@@ -21399,34 +21517,34 @@ var AudioContentSchema = z79.object({
21399
21517
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21400
21518
  * for notes on _meta usage.
21401
21519
  */
21402
- _meta: z79.record(z79.string(), z79.unknown()).optional()
21520
+ _meta: z80.record(z80.string(), z80.unknown()).optional()
21403
21521
  });
21404
- var ToolUseContentSchema = z79.object({
21405
- type: z79.literal("tool_use"),
21522
+ var ToolUseContentSchema = z80.object({
21523
+ type: z80.literal("tool_use"),
21406
21524
  /**
21407
21525
  * The name of the tool to invoke.
21408
21526
  * Must match a tool name from the request's tools array.
21409
21527
  */
21410
- name: z79.string(),
21528
+ name: z80.string(),
21411
21529
  /**
21412
21530
  * Unique identifier for this tool call.
21413
21531
  * Used to correlate with ToolResultContent in subsequent messages.
21414
21532
  */
21415
- id: z79.string(),
21533
+ id: z80.string(),
21416
21534
  /**
21417
21535
  * Arguments to pass to the tool.
21418
21536
  * Must conform to the tool's inputSchema.
21419
21537
  */
21420
- input: z79.record(z79.string(), z79.unknown()),
21538
+ input: z80.record(z80.string(), z80.unknown()),
21421
21539
  /**
21422
21540
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21423
21541
  * for notes on _meta usage.
21424
21542
  */
21425
- _meta: z79.record(z79.string(), z79.unknown()).optional()
21543
+ _meta: z80.record(z80.string(), z80.unknown()).optional()
21426
21544
  });
21427
- var EmbeddedResourceSchema = z79.object({
21428
- type: z79.literal("resource"),
21429
- resource: z79.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
21545
+ var EmbeddedResourceSchema = z80.object({
21546
+ type: z80.literal("resource"),
21547
+ resource: z80.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
21430
21548
  /**
21431
21549
  * Optional annotations for the client.
21432
21550
  */
@@ -21435,19 +21553,19 @@ var EmbeddedResourceSchema = z79.object({
21435
21553
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21436
21554
  * for notes on _meta usage.
21437
21555
  */
21438
- _meta: z79.record(z79.string(), z79.unknown()).optional()
21556
+ _meta: z80.record(z80.string(), z80.unknown()).optional()
21439
21557
  });
21440
21558
  var ResourceLinkSchema = ResourceSchema.extend({
21441
- type: z79.literal("resource_link")
21559
+ type: z80.literal("resource_link")
21442
21560
  });
21443
- var ContentBlockSchema = z79.union([
21561
+ var ContentBlockSchema = z80.union([
21444
21562
  TextContentSchema,
21445
21563
  ImageContentSchema,
21446
21564
  AudioContentSchema,
21447
21565
  ResourceLinkSchema,
21448
21566
  EmbeddedResourceSchema
21449
21567
  ]);
21450
- var PromptMessageSchema = z79.object({
21568
+ var PromptMessageSchema = z80.object({
21451
21569
  role: RoleSchema,
21452
21570
  content: ContentBlockSchema
21453
21571
  });
@@ -21455,24 +21573,24 @@ var GetPromptResultSchema = ResultSchema.extend({
21455
21573
  /**
21456
21574
  * An optional description for the prompt.
21457
21575
  */
21458
- description: z79.string().optional(),
21459
- messages: z79.array(PromptMessageSchema)
21576
+ description: z80.string().optional(),
21577
+ messages: z80.array(PromptMessageSchema)
21460
21578
  });
21461
21579
  var PromptListChangedNotificationSchema = NotificationSchema.extend({
21462
- method: z79.literal("notifications/prompts/list_changed"),
21580
+ method: z80.literal("notifications/prompts/list_changed"),
21463
21581
  params: NotificationsParamsSchema.optional()
21464
21582
  });
21465
- var ToolAnnotationsSchema = z79.object({
21583
+ var ToolAnnotationsSchema = z80.object({
21466
21584
  /**
21467
21585
  * A human-readable title for the tool.
21468
21586
  */
21469
- title: z79.string().optional(),
21587
+ title: z80.string().optional(),
21470
21588
  /**
21471
21589
  * If true, the tool does not modify its environment.
21472
21590
  *
21473
21591
  * Default: false
21474
21592
  */
21475
- readOnlyHint: z79.boolean().optional(),
21593
+ readOnlyHint: z80.boolean().optional(),
21476
21594
  /**
21477
21595
  * If true, the tool may perform destructive updates to its environment.
21478
21596
  * If false, the tool performs only additive updates.
@@ -21481,7 +21599,7 @@ var ToolAnnotationsSchema = z79.object({
21481
21599
  *
21482
21600
  * Default: true
21483
21601
  */
21484
- destructiveHint: z79.boolean().optional(),
21602
+ destructiveHint: z80.boolean().optional(),
21485
21603
  /**
21486
21604
  * If true, calling the tool repeatedly with the same arguments
21487
21605
  * will have no additional effect on the its environment.
@@ -21490,7 +21608,7 @@ var ToolAnnotationsSchema = z79.object({
21490
21608
  *
21491
21609
  * Default: false
21492
21610
  */
21493
- idempotentHint: z79.boolean().optional(),
21611
+ idempotentHint: z80.boolean().optional(),
21494
21612
  /**
21495
21613
  * If true, this tool may interact with an "open world" of external
21496
21614
  * entities. If false, the tool's domain of interaction is closed.
@@ -21499,9 +21617,9 @@ var ToolAnnotationsSchema = z79.object({
21499
21617
  *
21500
21618
  * Default: true
21501
21619
  */
21502
- openWorldHint: z79.boolean().optional()
21620
+ openWorldHint: z80.boolean().optional()
21503
21621
  });
21504
- var ToolExecutionSchema = z79.object({
21622
+ var ToolExecutionSchema = z80.object({
21505
21623
  /**
21506
21624
  * Indicates the tool's preference for task-augmented execution.
21507
21625
  * - "required": Clients MUST invoke the tool as a task
@@ -21510,34 +21628,34 @@ var ToolExecutionSchema = z79.object({
21510
21628
  *
21511
21629
  * If not present, defaults to "forbidden".
21512
21630
  */
21513
- taskSupport: z79.enum(["required", "optional", "forbidden"]).optional()
21631
+ taskSupport: z80.enum(["required", "optional", "forbidden"]).optional()
21514
21632
  });
21515
- var ToolSchema = z79.object({
21633
+ var ToolSchema = z80.object({
21516
21634
  ...BaseMetadataSchema.shape,
21517
21635
  ...IconsSchema.shape,
21518
21636
  /**
21519
21637
  * A human-readable description of the tool.
21520
21638
  */
21521
- description: z79.string().optional(),
21639
+ description: z80.string().optional(),
21522
21640
  /**
21523
21641
  * A JSON Schema 2020-12 object defining the expected parameters for the tool.
21524
21642
  * Must have type: 'object' at the root level per MCP spec.
21525
21643
  */
21526
- inputSchema: z79.object({
21527
- type: z79.literal("object"),
21528
- properties: z79.record(z79.string(), AssertObjectSchema).optional(),
21529
- required: z79.array(z79.string()).optional()
21530
- }).catchall(z79.unknown()),
21644
+ inputSchema: z80.object({
21645
+ type: z80.literal("object"),
21646
+ properties: z80.record(z80.string(), AssertObjectSchema).optional(),
21647
+ required: z80.array(z80.string()).optional()
21648
+ }).catchall(z80.unknown()),
21531
21649
  /**
21532
21650
  * An optional JSON Schema 2020-12 object defining the structure of the tool's output
21533
21651
  * returned in the structuredContent field of a CallToolResult.
21534
21652
  * Must have type: 'object' at the root level per MCP spec.
21535
21653
  */
21536
- outputSchema: z79.object({
21537
- type: z79.literal("object"),
21538
- properties: z79.record(z79.string(), AssertObjectSchema).optional(),
21539
- required: z79.array(z79.string()).optional()
21540
- }).catchall(z79.unknown()).optional(),
21654
+ outputSchema: z80.object({
21655
+ type: z80.literal("object"),
21656
+ properties: z80.record(z80.string(), AssertObjectSchema).optional(),
21657
+ required: z80.array(z80.string()).optional()
21658
+ }).catchall(z80.unknown()).optional(),
21541
21659
  /**
21542
21660
  * Optional additional tool information.
21543
21661
  */
@@ -21550,13 +21668,13 @@ var ToolSchema = z79.object({
21550
21668
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21551
21669
  * for notes on _meta usage.
21552
21670
  */
21553
- _meta: z79.record(z79.string(), z79.unknown()).optional()
21671
+ _meta: z80.record(z80.string(), z80.unknown()).optional()
21554
21672
  });
21555
21673
  var ListToolsRequestSchema = PaginatedRequestSchema.extend({
21556
- method: z79.literal("tools/list")
21674
+ method: z80.literal("tools/list")
21557
21675
  });
21558
21676
  var ListToolsResultSchema = PaginatedResultSchema.extend({
21559
- tools: z79.array(ToolSchema)
21677
+ tools: z80.array(ToolSchema)
21560
21678
  });
21561
21679
  var CallToolResultSchema = ResultSchema.extend({
21562
21680
  /**
@@ -21565,13 +21683,13 @@ var CallToolResultSchema = ResultSchema.extend({
21565
21683
  * If the Tool does not define an outputSchema, this field MUST be present in the result.
21566
21684
  * For backwards compatibility, this field is always present, but it may be empty.
21567
21685
  */
21568
- content: z79.array(ContentBlockSchema).default([]),
21686
+ content: z80.array(ContentBlockSchema).default([]),
21569
21687
  /**
21570
21688
  * An object containing structured tool output.
21571
21689
  *
21572
21690
  * If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
21573
21691
  */
21574
- structuredContent: z79.record(z79.string(), z79.unknown()).optional(),
21692
+ structuredContent: z80.record(z80.string(), z80.unknown()).optional(),
21575
21693
  /**
21576
21694
  * Whether the tool call ended in an error.
21577
21695
  *
@@ -21586,30 +21704,30 @@ var CallToolResultSchema = ResultSchema.extend({
21586
21704
  * server does not support tool calls, or any other exceptional conditions,
21587
21705
  * should be reported as an MCP error response.
21588
21706
  */
21589
- isError: z79.boolean().optional()
21707
+ isError: z80.boolean().optional()
21590
21708
  });
21591
21709
  var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
21592
- toolResult: z79.unknown()
21710
+ toolResult: z80.unknown()
21593
21711
  }));
21594
21712
  var CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
21595
21713
  /**
21596
21714
  * The name of the tool to call.
21597
21715
  */
21598
- name: z79.string(),
21716
+ name: z80.string(),
21599
21717
  /**
21600
21718
  * Arguments to pass to the tool.
21601
21719
  */
21602
- arguments: z79.record(z79.string(), z79.unknown()).optional()
21720
+ arguments: z80.record(z80.string(), z80.unknown()).optional()
21603
21721
  });
21604
21722
  var CallToolRequestSchema = RequestSchema.extend({
21605
- method: z79.literal("tools/call"),
21723
+ method: z80.literal("tools/call"),
21606
21724
  params: CallToolRequestParamsSchema
21607
21725
  });
21608
21726
  var ToolListChangedNotificationSchema = NotificationSchema.extend({
21609
- method: z79.literal("notifications/tools/list_changed"),
21727
+ method: z80.literal("notifications/tools/list_changed"),
21610
21728
  params: NotificationsParamsSchema.optional()
21611
21729
  });
21612
- var ListChangedOptionsBaseSchema = z79.object({
21730
+ var ListChangedOptionsBaseSchema = z80.object({
21613
21731
  /**
21614
21732
  * If true, the list will be refreshed automatically when a list changed notification is received.
21615
21733
  * The callback will be called with the updated list.
@@ -21618,7 +21736,7 @@ var ListChangedOptionsBaseSchema = z79.object({
21618
21736
  *
21619
21737
  * @default true
21620
21738
  */
21621
- autoRefresh: z79.boolean().default(true),
21739
+ autoRefresh: z80.boolean().default(true),
21622
21740
  /**
21623
21741
  * Debounce time in milliseconds for list changed notification processing.
21624
21742
  *
@@ -21627,9 +21745,9 @@ var ListChangedOptionsBaseSchema = z79.object({
21627
21745
  *
21628
21746
  * @default 300
21629
21747
  */
21630
- debounceMs: z79.number().int().nonnegative().default(300)
21748
+ debounceMs: z80.number().int().nonnegative().default(300)
21631
21749
  });
21632
- var LoggingLevelSchema = z79.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
21750
+ var LoggingLevelSchema = z80.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
21633
21751
  var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
21634
21752
  /**
21635
21753
  * 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.
@@ -21637,7 +21755,7 @@ var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
21637
21755
  level: LoggingLevelSchema
21638
21756
  });
21639
21757
  var SetLevelRequestSchema = RequestSchema.extend({
21640
- method: z79.literal("logging/setLevel"),
21758
+ method: z80.literal("logging/setLevel"),
21641
21759
  params: SetLevelRequestParamsSchema
21642
21760
  });
21643
21761
  var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
@@ -21648,80 +21766,80 @@ var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
21648
21766
  /**
21649
21767
  * An optional name of the logger issuing this message.
21650
21768
  */
21651
- logger: z79.string().optional(),
21769
+ logger: z80.string().optional(),
21652
21770
  /**
21653
21771
  * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
21654
21772
  */
21655
- data: z79.unknown()
21773
+ data: z80.unknown()
21656
21774
  });
21657
21775
  var LoggingMessageNotificationSchema = NotificationSchema.extend({
21658
- method: z79.literal("notifications/message"),
21776
+ method: z80.literal("notifications/message"),
21659
21777
  params: LoggingMessageNotificationParamsSchema
21660
21778
  });
21661
- var ModelHintSchema = z79.object({
21779
+ var ModelHintSchema = z80.object({
21662
21780
  /**
21663
21781
  * A hint for a model name.
21664
21782
  */
21665
- name: z79.string().optional()
21783
+ name: z80.string().optional()
21666
21784
  });
21667
- var ModelPreferencesSchema = z79.object({
21785
+ var ModelPreferencesSchema = z80.object({
21668
21786
  /**
21669
21787
  * Optional hints to use for model selection.
21670
21788
  */
21671
- hints: z79.array(ModelHintSchema).optional(),
21789
+ hints: z80.array(ModelHintSchema).optional(),
21672
21790
  /**
21673
21791
  * How much to prioritize cost when selecting a model.
21674
21792
  */
21675
- costPriority: z79.number().min(0).max(1).optional(),
21793
+ costPriority: z80.number().min(0).max(1).optional(),
21676
21794
  /**
21677
21795
  * How much to prioritize sampling speed (latency) when selecting a model.
21678
21796
  */
21679
- speedPriority: z79.number().min(0).max(1).optional(),
21797
+ speedPriority: z80.number().min(0).max(1).optional(),
21680
21798
  /**
21681
21799
  * How much to prioritize intelligence and capabilities when selecting a model.
21682
21800
  */
21683
- intelligencePriority: z79.number().min(0).max(1).optional()
21801
+ intelligencePriority: z80.number().min(0).max(1).optional()
21684
21802
  });
21685
- var ToolChoiceSchema = z79.object({
21803
+ var ToolChoiceSchema = z80.object({
21686
21804
  /**
21687
21805
  * Controls when tools are used:
21688
21806
  * - "auto": Model decides whether to use tools (default)
21689
21807
  * - "required": Model MUST use at least one tool before completing
21690
21808
  * - "none": Model MUST NOT use any tools
21691
21809
  */
21692
- mode: z79.enum(["auto", "required", "none"]).optional()
21693
- });
21694
- var ToolResultContentSchema = z79.object({
21695
- type: z79.literal("tool_result"),
21696
- toolUseId: z79.string().describe("The unique identifier for the corresponding tool call."),
21697
- content: z79.array(ContentBlockSchema).default([]),
21698
- structuredContent: z79.object({}).loose().optional(),
21699
- isError: z79.boolean().optional(),
21810
+ mode: z80.enum(["auto", "required", "none"]).optional()
21811
+ });
21812
+ var ToolResultContentSchema = z80.object({
21813
+ type: z80.literal("tool_result"),
21814
+ toolUseId: z80.string().describe("The unique identifier for the corresponding tool call."),
21815
+ content: z80.array(ContentBlockSchema).default([]),
21816
+ structuredContent: z80.object({}).loose().optional(),
21817
+ isError: z80.boolean().optional(),
21700
21818
  /**
21701
21819
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21702
21820
  * for notes on _meta usage.
21703
21821
  */
21704
- _meta: z79.record(z79.string(), z79.unknown()).optional()
21822
+ _meta: z80.record(z80.string(), z80.unknown()).optional()
21705
21823
  });
21706
- var SamplingContentSchema = z79.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]);
21707
- var SamplingMessageContentBlockSchema = z79.discriminatedUnion("type", [
21824
+ var SamplingContentSchema = z80.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]);
21825
+ var SamplingMessageContentBlockSchema = z80.discriminatedUnion("type", [
21708
21826
  TextContentSchema,
21709
21827
  ImageContentSchema,
21710
21828
  AudioContentSchema,
21711
21829
  ToolUseContentSchema,
21712
21830
  ToolResultContentSchema
21713
21831
  ]);
21714
- var SamplingMessageSchema = z79.object({
21832
+ var SamplingMessageSchema = z80.object({
21715
21833
  role: RoleSchema,
21716
- content: z79.union([SamplingMessageContentBlockSchema, z79.array(SamplingMessageContentBlockSchema)]),
21834
+ content: z80.union([SamplingMessageContentBlockSchema, z80.array(SamplingMessageContentBlockSchema)]),
21717
21835
  /**
21718
21836
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
21719
21837
  * for notes on _meta usage.
21720
21838
  */
21721
- _meta: z79.record(z79.string(), z79.unknown()).optional()
21839
+ _meta: z80.record(z80.string(), z80.unknown()).optional()
21722
21840
  });
21723
21841
  var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
21724
- messages: z79.array(SamplingMessageSchema),
21842
+ messages: z80.array(SamplingMessageSchema),
21725
21843
  /**
21726
21844
  * The server's preferences for which model to select. The client MAY modify or omit this request.
21727
21845
  */
@@ -21729,7 +21847,7 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
21729
21847
  /**
21730
21848
  * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
21731
21849
  */
21732
- systemPrompt: z79.string().optional(),
21850
+ systemPrompt: z80.string().optional(),
21733
21851
  /**
21734
21852
  * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt.
21735
21853
  * The client MAY ignore this request.
@@ -21737,15 +21855,15 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
21737
21855
  * Default is "none". Values "thisServer" and "allServers" are soft-deprecated. Servers SHOULD only use these values if the client
21738
21856
  * declares ClientCapabilities.sampling.context. These values may be removed in future spec releases.
21739
21857
  */
21740
- includeContext: z79.enum(["none", "thisServer", "allServers"]).optional(),
21741
- temperature: z79.number().optional(),
21858
+ includeContext: z80.enum(["none", "thisServer", "allServers"]).optional(),
21859
+ temperature: z80.number().optional(),
21742
21860
  /**
21743
21861
  * The requested maximum number of tokens to sample (to prevent runaway completions).
21744
21862
  *
21745
21863
  * The client MAY choose to sample fewer tokens than the requested maximum.
21746
21864
  */
21747
- maxTokens: z79.number().int(),
21748
- stopSequences: z79.array(z79.string()).optional(),
21865
+ maxTokens: z80.number().int(),
21866
+ stopSequences: z80.array(z80.string()).optional(),
21749
21867
  /**
21750
21868
  * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
21751
21869
  */
@@ -21754,7 +21872,7 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
21754
21872
  * Tools that the model may use during generation.
21755
21873
  * The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
21756
21874
  */
21757
- tools: z79.array(ToolSchema).optional(),
21875
+ tools: z80.array(ToolSchema).optional(),
21758
21876
  /**
21759
21877
  * Controls how the model uses tools.
21760
21878
  * The client MUST return an error if this field is provided but ClientCapabilities.sampling.tools is not declared.
@@ -21763,14 +21881,14 @@ var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
21763
21881
  toolChoice: ToolChoiceSchema.optional()
21764
21882
  });
21765
21883
  var CreateMessageRequestSchema = RequestSchema.extend({
21766
- method: z79.literal("sampling/createMessage"),
21884
+ method: z80.literal("sampling/createMessage"),
21767
21885
  params: CreateMessageRequestParamsSchema
21768
21886
  });
21769
21887
  var CreateMessageResultSchema = ResultSchema.extend({
21770
21888
  /**
21771
21889
  * The name of the model that generated the message.
21772
21890
  */
21773
- model: z79.string(),
21891
+ model: z80.string(),
21774
21892
  /**
21775
21893
  * The reason why sampling stopped, if known.
21776
21894
  *
@@ -21781,7 +21899,7 @@ var CreateMessageResultSchema = ResultSchema.extend({
21781
21899
  *
21782
21900
  * This field is an open string to allow for provider-specific stop reasons.
21783
21901
  */
21784
- stopReason: z79.optional(z79.enum(["endTurn", "stopSequence", "maxTokens"]).or(z79.string())),
21902
+ stopReason: z80.optional(z80.enum(["endTurn", "stopSequence", "maxTokens"]).or(z80.string())),
21785
21903
  role: RoleSchema,
21786
21904
  /**
21787
21905
  * Response content. Single content block (text, image, or audio).
@@ -21792,7 +21910,7 @@ var CreateMessageResultWithToolsSchema = ResultSchema.extend({
21792
21910
  /**
21793
21911
  * The name of the model that generated the message.
21794
21912
  */
21795
- model: z79.string(),
21913
+ model: z80.string(),
21796
21914
  /**
21797
21915
  * The reason why sampling stopped, if known.
21798
21916
  *
@@ -21804,144 +21922,144 @@ var CreateMessageResultWithToolsSchema = ResultSchema.extend({
21804
21922
  *
21805
21923
  * This field is an open string to allow for provider-specific stop reasons.
21806
21924
  */
21807
- stopReason: z79.optional(z79.enum(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(z79.string())),
21925
+ stopReason: z80.optional(z80.enum(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(z80.string())),
21808
21926
  role: RoleSchema,
21809
21927
  /**
21810
21928
  * Response content. May be a single block or array. May include ToolUseContent if stopReason is "toolUse".
21811
21929
  */
21812
- content: z79.union([SamplingMessageContentBlockSchema, z79.array(SamplingMessageContentBlockSchema)])
21813
- });
21814
- var BooleanSchemaSchema = z79.object({
21815
- type: z79.literal("boolean"),
21816
- title: z79.string().optional(),
21817
- description: z79.string().optional(),
21818
- default: z79.boolean().optional()
21819
- });
21820
- var StringSchemaSchema = z79.object({
21821
- type: z79.literal("string"),
21822
- title: z79.string().optional(),
21823
- description: z79.string().optional(),
21824
- minLength: z79.number().optional(),
21825
- maxLength: z79.number().optional(),
21826
- format: z79.enum(["email", "uri", "date", "date-time"]).optional(),
21827
- default: z79.string().optional()
21828
- });
21829
- var NumberSchemaSchema = z79.object({
21830
- type: z79.enum(["number", "integer"]),
21831
- title: z79.string().optional(),
21832
- description: z79.string().optional(),
21833
- minimum: z79.number().optional(),
21834
- maximum: z79.number().optional(),
21835
- default: z79.number().optional()
21836
- });
21837
- var UntitledSingleSelectEnumSchemaSchema = z79.object({
21838
- type: z79.literal("string"),
21839
- title: z79.string().optional(),
21840
- description: z79.string().optional(),
21841
- enum: z79.array(z79.string()),
21842
- default: z79.string().optional()
21843
- });
21844
- var TitledSingleSelectEnumSchemaSchema = z79.object({
21845
- type: z79.literal("string"),
21846
- title: z79.string().optional(),
21847
- description: z79.string().optional(),
21848
- oneOf: z79.array(z79.object({
21849
- const: z79.string(),
21850
- title: z79.string()
21930
+ content: z80.union([SamplingMessageContentBlockSchema, z80.array(SamplingMessageContentBlockSchema)])
21931
+ });
21932
+ var BooleanSchemaSchema = z80.object({
21933
+ type: z80.literal("boolean"),
21934
+ title: z80.string().optional(),
21935
+ description: z80.string().optional(),
21936
+ default: z80.boolean().optional()
21937
+ });
21938
+ var StringSchemaSchema = z80.object({
21939
+ type: z80.literal("string"),
21940
+ title: z80.string().optional(),
21941
+ description: z80.string().optional(),
21942
+ minLength: z80.number().optional(),
21943
+ maxLength: z80.number().optional(),
21944
+ format: z80.enum(["email", "uri", "date", "date-time"]).optional(),
21945
+ default: z80.string().optional()
21946
+ });
21947
+ var NumberSchemaSchema = z80.object({
21948
+ type: z80.enum(["number", "integer"]),
21949
+ title: z80.string().optional(),
21950
+ description: z80.string().optional(),
21951
+ minimum: z80.number().optional(),
21952
+ maximum: z80.number().optional(),
21953
+ default: z80.number().optional()
21954
+ });
21955
+ var UntitledSingleSelectEnumSchemaSchema = z80.object({
21956
+ type: z80.literal("string"),
21957
+ title: z80.string().optional(),
21958
+ description: z80.string().optional(),
21959
+ enum: z80.array(z80.string()),
21960
+ default: z80.string().optional()
21961
+ });
21962
+ var TitledSingleSelectEnumSchemaSchema = z80.object({
21963
+ type: z80.literal("string"),
21964
+ title: z80.string().optional(),
21965
+ description: z80.string().optional(),
21966
+ oneOf: z80.array(z80.object({
21967
+ const: z80.string(),
21968
+ title: z80.string()
21851
21969
  })),
21852
- default: z79.string().optional()
21853
- });
21854
- var LegacyTitledEnumSchemaSchema = z79.object({
21855
- type: z79.literal("string"),
21856
- title: z79.string().optional(),
21857
- description: z79.string().optional(),
21858
- enum: z79.array(z79.string()),
21859
- enumNames: z79.array(z79.string()).optional(),
21860
- default: z79.string().optional()
21861
- });
21862
- var SingleSelectEnumSchemaSchema = z79.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
21863
- var UntitledMultiSelectEnumSchemaSchema = z79.object({
21864
- type: z79.literal("array"),
21865
- title: z79.string().optional(),
21866
- description: z79.string().optional(),
21867
- minItems: z79.number().optional(),
21868
- maxItems: z79.number().optional(),
21869
- items: z79.object({
21870
- type: z79.literal("string"),
21871
- enum: z79.array(z79.string())
21970
+ default: z80.string().optional()
21971
+ });
21972
+ var LegacyTitledEnumSchemaSchema = z80.object({
21973
+ type: z80.literal("string"),
21974
+ title: z80.string().optional(),
21975
+ description: z80.string().optional(),
21976
+ enum: z80.array(z80.string()),
21977
+ enumNames: z80.array(z80.string()).optional(),
21978
+ default: z80.string().optional()
21979
+ });
21980
+ var SingleSelectEnumSchemaSchema = z80.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
21981
+ var UntitledMultiSelectEnumSchemaSchema = z80.object({
21982
+ type: z80.literal("array"),
21983
+ title: z80.string().optional(),
21984
+ description: z80.string().optional(),
21985
+ minItems: z80.number().optional(),
21986
+ maxItems: z80.number().optional(),
21987
+ items: z80.object({
21988
+ type: z80.literal("string"),
21989
+ enum: z80.array(z80.string())
21872
21990
  }),
21873
- default: z79.array(z79.string()).optional()
21874
- });
21875
- var TitledMultiSelectEnumSchemaSchema = z79.object({
21876
- type: z79.literal("array"),
21877
- title: z79.string().optional(),
21878
- description: z79.string().optional(),
21879
- minItems: z79.number().optional(),
21880
- maxItems: z79.number().optional(),
21881
- items: z79.object({
21882
- anyOf: z79.array(z79.object({
21883
- const: z79.string(),
21884
- title: z79.string()
21991
+ default: z80.array(z80.string()).optional()
21992
+ });
21993
+ var TitledMultiSelectEnumSchemaSchema = z80.object({
21994
+ type: z80.literal("array"),
21995
+ title: z80.string().optional(),
21996
+ description: z80.string().optional(),
21997
+ minItems: z80.number().optional(),
21998
+ maxItems: z80.number().optional(),
21999
+ items: z80.object({
22000
+ anyOf: z80.array(z80.object({
22001
+ const: z80.string(),
22002
+ title: z80.string()
21885
22003
  }))
21886
22004
  }),
21887
- default: z79.array(z79.string()).optional()
22005
+ default: z80.array(z80.string()).optional()
21888
22006
  });
21889
- var MultiSelectEnumSchemaSchema = z79.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
21890
- var EnumSchemaSchema = z79.union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
21891
- var PrimitiveSchemaDefinitionSchema = z79.union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
22007
+ var MultiSelectEnumSchemaSchema = z80.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
22008
+ var EnumSchemaSchema = z80.union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
22009
+ var PrimitiveSchemaDefinitionSchema = z80.union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
21892
22010
  var ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
21893
22011
  /**
21894
22012
  * The elicitation mode.
21895
22013
  *
21896
22014
  * Optional for backward compatibility. Clients MUST treat missing mode as "form".
21897
22015
  */
21898
- mode: z79.literal("form").optional(),
22016
+ mode: z80.literal("form").optional(),
21899
22017
  /**
21900
22018
  * The message to present to the user describing what information is being requested.
21901
22019
  */
21902
- message: z79.string(),
22020
+ message: z80.string(),
21903
22021
  /**
21904
22022
  * A restricted subset of JSON Schema.
21905
22023
  * Only top-level properties are allowed, without nesting.
21906
22024
  */
21907
- requestedSchema: z79.object({
21908
- type: z79.literal("object"),
21909
- properties: z79.record(z79.string(), PrimitiveSchemaDefinitionSchema),
21910
- required: z79.array(z79.string()).optional()
22025
+ requestedSchema: z80.object({
22026
+ type: z80.literal("object"),
22027
+ properties: z80.record(z80.string(), PrimitiveSchemaDefinitionSchema),
22028
+ required: z80.array(z80.string()).optional()
21911
22029
  })
21912
22030
  });
21913
22031
  var ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
21914
22032
  /**
21915
22033
  * The elicitation mode.
21916
22034
  */
21917
- mode: z79.literal("url"),
22035
+ mode: z80.literal("url"),
21918
22036
  /**
21919
22037
  * The message to present to the user explaining why the interaction is needed.
21920
22038
  */
21921
- message: z79.string(),
22039
+ message: z80.string(),
21922
22040
  /**
21923
22041
  * The ID of the elicitation, which must be unique within the context of the server.
21924
22042
  * The client MUST treat this ID as an opaque value.
21925
22043
  */
21926
- elicitationId: z79.string(),
22044
+ elicitationId: z80.string(),
21927
22045
  /**
21928
22046
  * The URL that the user should navigate to.
21929
22047
  */
21930
- url: z79.string().url()
22048
+ url: z80.string().url()
21931
22049
  });
21932
- var ElicitRequestParamsSchema = z79.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
22050
+ var ElicitRequestParamsSchema = z80.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
21933
22051
  var ElicitRequestSchema = RequestSchema.extend({
21934
- method: z79.literal("elicitation/create"),
22052
+ method: z80.literal("elicitation/create"),
21935
22053
  params: ElicitRequestParamsSchema
21936
22054
  });
21937
22055
  var ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({
21938
22056
  /**
21939
22057
  * The ID of the elicitation that completed.
21940
22058
  */
21941
- elicitationId: z79.string()
22059
+ elicitationId: z80.string()
21942
22060
  });
21943
22061
  var ElicitationCompleteNotificationSchema = NotificationSchema.extend({
21944
- method: z79.literal("notifications/elicitation/complete"),
22062
+ method: z80.literal("notifications/elicitation/complete"),
21945
22063
  params: ElicitationCompleteNotificationParamsSchema
21946
22064
  });
21947
22065
  var ElicitResultSchema = ResultSchema.extend({
@@ -21951,98 +22069,98 @@ var ElicitResultSchema = ResultSchema.extend({
21951
22069
  * - "decline": User explicitly decline the action
21952
22070
  * - "cancel": User dismissed without making an explicit choice
21953
22071
  */
21954
- action: z79.enum(["accept", "decline", "cancel"]),
22072
+ action: z80.enum(["accept", "decline", "cancel"]),
21955
22073
  /**
21956
22074
  * The submitted form data, only present when action is "accept".
21957
22075
  * Contains values matching the requested schema.
21958
22076
  * Per MCP spec, content is "typically omitted" for decline/cancel actions.
21959
22077
  * We normalize null to undefined for leniency while maintaining type compatibility.
21960
22078
  */
21961
- content: z79.preprocess((val) => val === null ? void 0 : val, z79.record(z79.string(), z79.union([z79.string(), z79.number(), z79.boolean(), z79.array(z79.string())])).optional())
22079
+ content: z80.preprocess((val) => val === null ? void 0 : val, z80.record(z80.string(), z80.union([z80.string(), z80.number(), z80.boolean(), z80.array(z80.string())])).optional())
21962
22080
  });
21963
- var ResourceTemplateReferenceSchema = z79.object({
21964
- type: z79.literal("ref/resource"),
22081
+ var ResourceTemplateReferenceSchema = z80.object({
22082
+ type: z80.literal("ref/resource"),
21965
22083
  /**
21966
22084
  * The URI or URI template of the resource.
21967
22085
  */
21968
- uri: z79.string()
22086
+ uri: z80.string()
21969
22087
  });
21970
- var PromptReferenceSchema = z79.object({
21971
- type: z79.literal("ref/prompt"),
22088
+ var PromptReferenceSchema = z80.object({
22089
+ type: z80.literal("ref/prompt"),
21972
22090
  /**
21973
22091
  * The name of the prompt or prompt template
21974
22092
  */
21975
- name: z79.string()
22093
+ name: z80.string()
21976
22094
  });
21977
22095
  var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
21978
- ref: z79.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
22096
+ ref: z80.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
21979
22097
  /**
21980
22098
  * The argument's information
21981
22099
  */
21982
- argument: z79.object({
22100
+ argument: z80.object({
21983
22101
  /**
21984
22102
  * The name of the argument
21985
22103
  */
21986
- name: z79.string(),
22104
+ name: z80.string(),
21987
22105
  /**
21988
22106
  * The value of the argument to use for completion matching.
21989
22107
  */
21990
- value: z79.string()
22108
+ value: z80.string()
21991
22109
  }),
21992
- context: z79.object({
22110
+ context: z80.object({
21993
22111
  /**
21994
22112
  * Previously-resolved variables in a URI template or prompt.
21995
22113
  */
21996
- arguments: z79.record(z79.string(), z79.string()).optional()
22114
+ arguments: z80.record(z80.string(), z80.string()).optional()
21997
22115
  }).optional()
21998
22116
  });
21999
22117
  var CompleteRequestSchema = RequestSchema.extend({
22000
- method: z79.literal("completion/complete"),
22118
+ method: z80.literal("completion/complete"),
22001
22119
  params: CompleteRequestParamsSchema
22002
22120
  });
22003
22121
  var CompleteResultSchema = ResultSchema.extend({
22004
- completion: z79.looseObject({
22122
+ completion: z80.looseObject({
22005
22123
  /**
22006
22124
  * An array of completion values. Must not exceed 100 items.
22007
22125
  */
22008
- values: z79.array(z79.string()).max(100),
22126
+ values: z80.array(z80.string()).max(100),
22009
22127
  /**
22010
22128
  * The total number of completion options available. This can exceed the number of values actually sent in the response.
22011
22129
  */
22012
- total: z79.optional(z79.number().int()),
22130
+ total: z80.optional(z80.number().int()),
22013
22131
  /**
22014
22132
  * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
22015
22133
  */
22016
- hasMore: z79.optional(z79.boolean())
22134
+ hasMore: z80.optional(z80.boolean())
22017
22135
  })
22018
22136
  });
22019
- var RootSchema = z79.object({
22137
+ var RootSchema = z80.object({
22020
22138
  /**
22021
22139
  * The URI identifying the root. This *must* start with file:// for now.
22022
22140
  */
22023
- uri: z79.string().startsWith("file://"),
22141
+ uri: z80.string().startsWith("file://"),
22024
22142
  /**
22025
22143
  * An optional name for the root.
22026
22144
  */
22027
- name: z79.string().optional(),
22145
+ name: z80.string().optional(),
22028
22146
  /**
22029
22147
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
22030
22148
  * for notes on _meta usage.
22031
22149
  */
22032
- _meta: z79.record(z79.string(), z79.unknown()).optional()
22150
+ _meta: z80.record(z80.string(), z80.unknown()).optional()
22033
22151
  });
22034
22152
  var ListRootsRequestSchema = RequestSchema.extend({
22035
- method: z79.literal("roots/list"),
22153
+ method: z80.literal("roots/list"),
22036
22154
  params: BaseRequestParamsSchema.optional()
22037
22155
  });
22038
22156
  var ListRootsResultSchema = ResultSchema.extend({
22039
- roots: z79.array(RootSchema)
22157
+ roots: z80.array(RootSchema)
22040
22158
  });
22041
22159
  var RootsListChangedNotificationSchema = NotificationSchema.extend({
22042
- method: z79.literal("notifications/roots/list_changed"),
22160
+ method: z80.literal("notifications/roots/list_changed"),
22043
22161
  params: NotificationsParamsSchema.optional()
22044
22162
  });
22045
- var ClientRequestSchema = z79.union([
22163
+ var ClientRequestSchema = z80.union([
22046
22164
  PingRequestSchema,
22047
22165
  InitializeRequestSchema,
22048
22166
  CompleteRequestSchema,
@@ -22061,14 +22179,14 @@ var ClientRequestSchema = z79.union([
22061
22179
  ListTasksRequestSchema,
22062
22180
  CancelTaskRequestSchema
22063
22181
  ]);
22064
- var ClientNotificationSchema = z79.union([
22182
+ var ClientNotificationSchema = z80.union([
22065
22183
  CancelledNotificationSchema,
22066
22184
  ProgressNotificationSchema,
22067
22185
  InitializedNotificationSchema,
22068
22186
  RootsListChangedNotificationSchema,
22069
22187
  TaskStatusNotificationSchema
22070
22188
  ]);
22071
- var ClientResultSchema = z79.union([
22189
+ var ClientResultSchema = z80.union([
22072
22190
  EmptyResultSchema,
22073
22191
  CreateMessageResultSchema,
22074
22192
  CreateMessageResultWithToolsSchema,
@@ -22078,7 +22196,7 @@ var ClientResultSchema = z79.union([
22078
22196
  ListTasksResultSchema,
22079
22197
  CreateTaskResultSchema
22080
22198
  ]);
22081
- var ServerRequestSchema = z79.union([
22199
+ var ServerRequestSchema = z80.union([
22082
22200
  PingRequestSchema,
22083
22201
  CreateMessageRequestSchema,
22084
22202
  ElicitRequestSchema,
@@ -22088,7 +22206,7 @@ var ServerRequestSchema = z79.union([
22088
22206
  ListTasksRequestSchema,
22089
22207
  CancelTaskRequestSchema
22090
22208
  ]);
22091
- var ServerNotificationSchema = z79.union([
22209
+ var ServerNotificationSchema = z80.union([
22092
22210
  CancelledNotificationSchema,
22093
22211
  ProgressNotificationSchema,
22094
22212
  LoggingMessageNotificationSchema,
@@ -22099,7 +22217,7 @@ var ServerNotificationSchema = z79.union([
22099
22217
  TaskStatusNotificationSchema,
22100
22218
  ElicitationCompleteNotificationSchema
22101
22219
  ]);
22102
- var ServerResultSchema = z79.union([
22220
+ var ServerResultSchema = z80.union([
22103
22221
  EmptyResultSchema,
22104
22222
  InitializeResultSchema,
22105
22223
  CompleteResultSchema,
@@ -23988,148 +24106,148 @@ async function pkceChallenge(length) {
23988
24106
  }
23989
24107
 
23990
24108
  // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
23991
- import * as z80 from "zod/v4";
23992
- var SafeUrlSchema = z80.url().superRefine((val, ctx) => {
24109
+ import * as z81 from "zod/v4";
24110
+ var SafeUrlSchema = z81.url().superRefine((val, ctx) => {
23993
24111
  if (!URL.canParse(val)) {
23994
24112
  ctx.addIssue({
23995
- code: z80.ZodIssueCode.custom,
24113
+ code: z81.ZodIssueCode.custom,
23996
24114
  message: "URL must be parseable",
23997
24115
  fatal: true
23998
24116
  });
23999
- return z80.NEVER;
24117
+ return z81.NEVER;
24000
24118
  }
24001
24119
  }).refine((url2) => {
24002
24120
  const u = new URL(url2);
24003
24121
  return u.protocol !== "javascript:" && u.protocol !== "data:" && u.protocol !== "vbscript:";
24004
24122
  }, { message: "URL cannot use javascript:, data:, or vbscript: scheme" });
24005
- var OAuthProtectedResourceMetadataSchema = z80.looseObject({
24006
- resource: z80.string().url(),
24007
- authorization_servers: z80.array(SafeUrlSchema).optional(),
24008
- jwks_uri: z80.string().url().optional(),
24009
- scopes_supported: z80.array(z80.string()).optional(),
24010
- bearer_methods_supported: z80.array(z80.string()).optional(),
24011
- resource_signing_alg_values_supported: z80.array(z80.string()).optional(),
24012
- resource_name: z80.string().optional(),
24013
- resource_documentation: z80.string().optional(),
24014
- resource_policy_uri: z80.string().url().optional(),
24015
- resource_tos_uri: z80.string().url().optional(),
24016
- tls_client_certificate_bound_access_tokens: z80.boolean().optional(),
24017
- authorization_details_types_supported: z80.array(z80.string()).optional(),
24018
- dpop_signing_alg_values_supported: z80.array(z80.string()).optional(),
24019
- dpop_bound_access_tokens_required: z80.boolean().optional()
24020
- });
24021
- var OAuthMetadataSchema = z80.looseObject({
24022
- issuer: z80.string(),
24123
+ var OAuthProtectedResourceMetadataSchema = z81.looseObject({
24124
+ resource: z81.string().url(),
24125
+ authorization_servers: z81.array(SafeUrlSchema).optional(),
24126
+ jwks_uri: z81.string().url().optional(),
24127
+ scopes_supported: z81.array(z81.string()).optional(),
24128
+ bearer_methods_supported: z81.array(z81.string()).optional(),
24129
+ resource_signing_alg_values_supported: z81.array(z81.string()).optional(),
24130
+ resource_name: z81.string().optional(),
24131
+ resource_documentation: z81.string().optional(),
24132
+ resource_policy_uri: z81.string().url().optional(),
24133
+ resource_tos_uri: z81.string().url().optional(),
24134
+ tls_client_certificate_bound_access_tokens: z81.boolean().optional(),
24135
+ authorization_details_types_supported: z81.array(z81.string()).optional(),
24136
+ dpop_signing_alg_values_supported: z81.array(z81.string()).optional(),
24137
+ dpop_bound_access_tokens_required: z81.boolean().optional()
24138
+ });
24139
+ var OAuthMetadataSchema = z81.looseObject({
24140
+ issuer: z81.string(),
24023
24141
  authorization_endpoint: SafeUrlSchema,
24024
24142
  token_endpoint: SafeUrlSchema,
24025
24143
  registration_endpoint: SafeUrlSchema.optional(),
24026
- scopes_supported: z80.array(z80.string()).optional(),
24027
- response_types_supported: z80.array(z80.string()),
24028
- response_modes_supported: z80.array(z80.string()).optional(),
24029
- grant_types_supported: z80.array(z80.string()).optional(),
24030
- token_endpoint_auth_methods_supported: z80.array(z80.string()).optional(),
24031
- token_endpoint_auth_signing_alg_values_supported: z80.array(z80.string()).optional(),
24144
+ scopes_supported: z81.array(z81.string()).optional(),
24145
+ response_types_supported: z81.array(z81.string()),
24146
+ response_modes_supported: z81.array(z81.string()).optional(),
24147
+ grant_types_supported: z81.array(z81.string()).optional(),
24148
+ token_endpoint_auth_methods_supported: z81.array(z81.string()).optional(),
24149
+ token_endpoint_auth_signing_alg_values_supported: z81.array(z81.string()).optional(),
24032
24150
  service_documentation: SafeUrlSchema.optional(),
24033
24151
  revocation_endpoint: SafeUrlSchema.optional(),
24034
- revocation_endpoint_auth_methods_supported: z80.array(z80.string()).optional(),
24035
- revocation_endpoint_auth_signing_alg_values_supported: z80.array(z80.string()).optional(),
24036
- introspection_endpoint: z80.string().optional(),
24037
- introspection_endpoint_auth_methods_supported: z80.array(z80.string()).optional(),
24038
- introspection_endpoint_auth_signing_alg_values_supported: z80.array(z80.string()).optional(),
24039
- code_challenge_methods_supported: z80.array(z80.string()).optional(),
24040
- client_id_metadata_document_supported: z80.boolean().optional()
24041
- });
24042
- var OpenIdProviderMetadataSchema = z80.looseObject({
24043
- issuer: z80.string(),
24152
+ revocation_endpoint_auth_methods_supported: z81.array(z81.string()).optional(),
24153
+ revocation_endpoint_auth_signing_alg_values_supported: z81.array(z81.string()).optional(),
24154
+ introspection_endpoint: z81.string().optional(),
24155
+ introspection_endpoint_auth_methods_supported: z81.array(z81.string()).optional(),
24156
+ introspection_endpoint_auth_signing_alg_values_supported: z81.array(z81.string()).optional(),
24157
+ code_challenge_methods_supported: z81.array(z81.string()).optional(),
24158
+ client_id_metadata_document_supported: z81.boolean().optional()
24159
+ });
24160
+ var OpenIdProviderMetadataSchema = z81.looseObject({
24161
+ issuer: z81.string(),
24044
24162
  authorization_endpoint: SafeUrlSchema,
24045
24163
  token_endpoint: SafeUrlSchema,
24046
24164
  userinfo_endpoint: SafeUrlSchema.optional(),
24047
24165
  jwks_uri: SafeUrlSchema,
24048
24166
  registration_endpoint: SafeUrlSchema.optional(),
24049
- scopes_supported: z80.array(z80.string()).optional(),
24050
- response_types_supported: z80.array(z80.string()),
24051
- response_modes_supported: z80.array(z80.string()).optional(),
24052
- grant_types_supported: z80.array(z80.string()).optional(),
24053
- acr_values_supported: z80.array(z80.string()).optional(),
24054
- subject_types_supported: z80.array(z80.string()),
24055
- id_token_signing_alg_values_supported: z80.array(z80.string()),
24056
- id_token_encryption_alg_values_supported: z80.array(z80.string()).optional(),
24057
- id_token_encryption_enc_values_supported: z80.array(z80.string()).optional(),
24058
- userinfo_signing_alg_values_supported: z80.array(z80.string()).optional(),
24059
- userinfo_encryption_alg_values_supported: z80.array(z80.string()).optional(),
24060
- userinfo_encryption_enc_values_supported: z80.array(z80.string()).optional(),
24061
- request_object_signing_alg_values_supported: z80.array(z80.string()).optional(),
24062
- request_object_encryption_alg_values_supported: z80.array(z80.string()).optional(),
24063
- request_object_encryption_enc_values_supported: z80.array(z80.string()).optional(),
24064
- token_endpoint_auth_methods_supported: z80.array(z80.string()).optional(),
24065
- token_endpoint_auth_signing_alg_values_supported: z80.array(z80.string()).optional(),
24066
- display_values_supported: z80.array(z80.string()).optional(),
24067
- claim_types_supported: z80.array(z80.string()).optional(),
24068
- claims_supported: z80.array(z80.string()).optional(),
24069
- service_documentation: z80.string().optional(),
24070
- claims_locales_supported: z80.array(z80.string()).optional(),
24071
- ui_locales_supported: z80.array(z80.string()).optional(),
24072
- claims_parameter_supported: z80.boolean().optional(),
24073
- request_parameter_supported: z80.boolean().optional(),
24074
- request_uri_parameter_supported: z80.boolean().optional(),
24075
- require_request_uri_registration: z80.boolean().optional(),
24167
+ scopes_supported: z81.array(z81.string()).optional(),
24168
+ response_types_supported: z81.array(z81.string()),
24169
+ response_modes_supported: z81.array(z81.string()).optional(),
24170
+ grant_types_supported: z81.array(z81.string()).optional(),
24171
+ acr_values_supported: z81.array(z81.string()).optional(),
24172
+ subject_types_supported: z81.array(z81.string()),
24173
+ id_token_signing_alg_values_supported: z81.array(z81.string()),
24174
+ id_token_encryption_alg_values_supported: z81.array(z81.string()).optional(),
24175
+ id_token_encryption_enc_values_supported: z81.array(z81.string()).optional(),
24176
+ userinfo_signing_alg_values_supported: z81.array(z81.string()).optional(),
24177
+ userinfo_encryption_alg_values_supported: z81.array(z81.string()).optional(),
24178
+ userinfo_encryption_enc_values_supported: z81.array(z81.string()).optional(),
24179
+ request_object_signing_alg_values_supported: z81.array(z81.string()).optional(),
24180
+ request_object_encryption_alg_values_supported: z81.array(z81.string()).optional(),
24181
+ request_object_encryption_enc_values_supported: z81.array(z81.string()).optional(),
24182
+ token_endpoint_auth_methods_supported: z81.array(z81.string()).optional(),
24183
+ token_endpoint_auth_signing_alg_values_supported: z81.array(z81.string()).optional(),
24184
+ display_values_supported: z81.array(z81.string()).optional(),
24185
+ claim_types_supported: z81.array(z81.string()).optional(),
24186
+ claims_supported: z81.array(z81.string()).optional(),
24187
+ service_documentation: z81.string().optional(),
24188
+ claims_locales_supported: z81.array(z81.string()).optional(),
24189
+ ui_locales_supported: z81.array(z81.string()).optional(),
24190
+ claims_parameter_supported: z81.boolean().optional(),
24191
+ request_parameter_supported: z81.boolean().optional(),
24192
+ request_uri_parameter_supported: z81.boolean().optional(),
24193
+ require_request_uri_registration: z81.boolean().optional(),
24076
24194
  op_policy_uri: SafeUrlSchema.optional(),
24077
24195
  op_tos_uri: SafeUrlSchema.optional(),
24078
- client_id_metadata_document_supported: z80.boolean().optional()
24196
+ client_id_metadata_document_supported: z81.boolean().optional()
24079
24197
  });
24080
- var OpenIdProviderDiscoveryMetadataSchema = z80.object({
24198
+ var OpenIdProviderDiscoveryMetadataSchema = z81.object({
24081
24199
  ...OpenIdProviderMetadataSchema.shape,
24082
24200
  ...OAuthMetadataSchema.pick({
24083
24201
  code_challenge_methods_supported: true
24084
24202
  }).shape
24085
24203
  });
24086
- var OAuthTokensSchema = z80.object({
24087
- access_token: z80.string(),
24088
- id_token: z80.string().optional(),
24204
+ var OAuthTokensSchema = z81.object({
24205
+ access_token: z81.string(),
24206
+ id_token: z81.string().optional(),
24089
24207
  // Optional for OAuth 2.1, but necessary in OpenID Connect
24090
- token_type: z80.string(),
24091
- expires_in: z80.coerce.number().optional(),
24092
- scope: z80.string().optional(),
24093
- refresh_token: z80.string().optional()
24208
+ token_type: z81.string(),
24209
+ expires_in: z81.coerce.number().optional(),
24210
+ scope: z81.string().optional(),
24211
+ refresh_token: z81.string().optional()
24094
24212
  }).strip();
24095
- var OAuthErrorResponseSchema = z80.object({
24096
- error: z80.string(),
24097
- error_description: z80.string().optional(),
24098
- error_uri: z80.string().optional()
24099
- });
24100
- var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z80.literal("").transform(() => void 0));
24101
- var OAuthClientMetadataSchema = z80.object({
24102
- redirect_uris: z80.array(SafeUrlSchema),
24103
- token_endpoint_auth_method: z80.string().optional(),
24104
- grant_types: z80.array(z80.string()).optional(),
24105
- response_types: z80.array(z80.string()).optional(),
24106
- client_name: z80.string().optional(),
24213
+ var OAuthErrorResponseSchema = z81.object({
24214
+ error: z81.string(),
24215
+ error_description: z81.string().optional(),
24216
+ error_uri: z81.string().optional()
24217
+ });
24218
+ var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z81.literal("").transform(() => void 0));
24219
+ var OAuthClientMetadataSchema = z81.object({
24220
+ redirect_uris: z81.array(SafeUrlSchema),
24221
+ token_endpoint_auth_method: z81.string().optional(),
24222
+ grant_types: z81.array(z81.string()).optional(),
24223
+ response_types: z81.array(z81.string()).optional(),
24224
+ client_name: z81.string().optional(),
24107
24225
  client_uri: SafeUrlSchema.optional(),
24108
24226
  logo_uri: OptionalSafeUrlSchema,
24109
- scope: z80.string().optional(),
24110
- contacts: z80.array(z80.string()).optional(),
24227
+ scope: z81.string().optional(),
24228
+ contacts: z81.array(z81.string()).optional(),
24111
24229
  tos_uri: OptionalSafeUrlSchema,
24112
- policy_uri: z80.string().optional(),
24230
+ policy_uri: z81.string().optional(),
24113
24231
  jwks_uri: SafeUrlSchema.optional(),
24114
- jwks: z80.any().optional(),
24115
- software_id: z80.string().optional(),
24116
- software_version: z80.string().optional(),
24117
- software_statement: z80.string().optional()
24232
+ jwks: z81.any().optional(),
24233
+ software_id: z81.string().optional(),
24234
+ software_version: z81.string().optional(),
24235
+ software_statement: z81.string().optional()
24118
24236
  }).strip();
24119
- var OAuthClientInformationSchema = z80.object({
24120
- client_id: z80.string(),
24121
- client_secret: z80.string().optional(),
24122
- client_id_issued_at: z80.number().optional(),
24123
- client_secret_expires_at: z80.number().optional()
24237
+ var OAuthClientInformationSchema = z81.object({
24238
+ client_id: z81.string(),
24239
+ client_secret: z81.string().optional(),
24240
+ client_id_issued_at: z81.number().optional(),
24241
+ client_secret_expires_at: z81.number().optional()
24124
24242
  }).strip();
24125
24243
  var OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
24126
- var OAuthClientRegistrationErrorSchema = z80.object({
24127
- error: z80.string(),
24128
- error_description: z80.string().optional()
24244
+ var OAuthClientRegistrationErrorSchema = z81.object({
24245
+ error: z81.string(),
24246
+ error_description: z81.string().optional()
24129
24247
  }).strip();
24130
- var OAuthTokenRevocationRequestSchema = z80.object({
24131
- token: z80.string(),
24132
- token_type_hint: z80.string().optional()
24248
+ var OAuthTokenRevocationRequestSchema = z81.object({
24249
+ token: z81.string(),
24250
+ token_type_hint: z81.string().optional()
24133
24251
  }).strip();
24134
24252
 
24135
24253
  // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
@@ -25633,8 +25751,8 @@ async function connectMcp(opts) {
25633
25751
  }
25634
25752
 
25635
25753
  // ../../packages/adapters/mcp/src/json-schema-to-zod.ts
25636
- import { z as z81 } from "zod";
25637
- var PERMISSIVE = z81.record(z81.string(), z81.unknown());
25754
+ import { z as z82 } from "zod";
25755
+ var PERMISSIVE = z82.record(z82.string(), z82.unknown());
25638
25756
  function jsonSchemaToZod(schema) {
25639
25757
  try {
25640
25758
  return convert(schema);
@@ -25643,36 +25761,36 @@ function jsonSchemaToZod(schema) {
25643
25761
  }
25644
25762
  }
25645
25763
  function convert(raw) {
25646
- if (!raw || typeof raw !== "object") return z81.unknown();
25764
+ if (!raw || typeof raw !== "object") return z82.unknown();
25647
25765
  const schema = raw;
25648
25766
  const enumVals = schema["enum"];
25649
25767
  if (Array.isArray(enumVals) && enumVals.length > 0) {
25650
25768
  if (enumVals.every((v) => typeof v === "string")) {
25651
- return describe(z81.enum(enumVals), schema);
25769
+ return describe(z82.enum(enumVals), schema);
25652
25770
  }
25653
- return z81.unknown();
25771
+ return z82.unknown();
25654
25772
  }
25655
25773
  switch (schema["type"]) {
25656
25774
  case "string":
25657
- return describe(z81.string(), schema);
25775
+ return describe(z82.string(), schema);
25658
25776
  case "number":
25659
- return describe(z81.number(), schema);
25777
+ return describe(z82.number(), schema);
25660
25778
  case "integer":
25661
- return describe(z81.number().int(), schema);
25779
+ return describe(z82.number().int(), schema);
25662
25780
  case "boolean":
25663
- return describe(z81.boolean(), schema);
25781
+ return describe(z82.boolean(), schema);
25664
25782
  case "null":
25665
- return z81.null();
25783
+ return z82.null();
25666
25784
  case "array": {
25667
25785
  const items = schema["items"];
25668
- const itemSchema = items && typeof items === "object" ? convert(items) : z81.unknown();
25669
- return describe(z81.array(itemSchema), schema);
25786
+ const itemSchema = items && typeof items === "object" ? convert(items) : z82.unknown();
25787
+ return describe(z82.array(itemSchema), schema);
25670
25788
  }
25671
25789
  case "object":
25672
25790
  return convertObject(schema);
25673
25791
  default:
25674
25792
  if (schema["properties"]) return convertObject(schema);
25675
- return z81.unknown();
25793
+ return z82.unknown();
25676
25794
  }
25677
25795
  }
25678
25796
  function convertObject(schema) {
@@ -25689,7 +25807,7 @@ function convertObject(schema) {
25689
25807
  const zodProp = convert(propSchema);
25690
25808
  shape[key] = required.has(key) ? zodProp : zodProp.optional();
25691
25809
  }
25692
- return describe(z81.object(shape), schema);
25810
+ return describe(z82.object(shape), schema);
25693
25811
  }
25694
25812
  function describe(zodType, schema) {
25695
25813
  const desc2 = schema["description"];
@@ -25697,7 +25815,7 @@ function describe(zodType, schema) {
25697
25815
  }
25698
25816
 
25699
25817
  // ../../packages/adapters/mcp/src/tools.ts
25700
- function slugToPrefix(slug) {
25818
+ function slugToPrefix2(slug) {
25701
25819
  return slug.replace(/[^a-z0-9]+/gi, "_").toLowerCase();
25702
25820
  }
25703
25821
  function riskFromAnnotations(a) {
@@ -25714,7 +25832,7 @@ function extractText(content) {
25714
25832
  function mcpToolToToolDefinition(client, mcpTool, slug) {
25715
25833
  const originalName = mcpTool.name;
25716
25834
  return {
25717
- name: `${slugToPrefix(slug)}__${originalName}`,
25835
+ name: `${slugToPrefix2(slug)}__${originalName}`,
25718
25836
  description: mcpTool.description ?? `MCP tool ${originalName}`,
25719
25837
  inputSchema: jsonSchemaToZod(mcpTool.inputSchema),
25720
25838
  riskLevel: riskFromAnnotations(mcpTool.annotations),
@@ -25727,7 +25845,12 @@ function mcpToolToToolDefinition(client, mcpTool, slug) {
25727
25845
  const detail = extractText(result.content);
25728
25846
  throw new Error(`MCP tool ${originalName} failed: ${detail || "unknown error"}`);
25729
25847
  }
25730
- return result.content;
25848
+ if (result.structuredContent != null) return result.structuredContent;
25849
+ const content = result.content ?? [];
25850
+ if (Array.isArray(content) && content.length > 0 && content.every((c) => c.type === "text")) {
25851
+ return extractText(content);
25852
+ }
25853
+ return content;
25731
25854
  }
25732
25855
  };
25733
25856
  }
@@ -25907,10 +26030,10 @@ function detectOrchestratorMode(agent, children) {
25907
26030
  }
25908
26031
 
25909
26032
  // ../../packages/orchestration/src/router/assign-tools.ts
25910
- import { z as z82 } from "zod";
25911
- var assignInputSchema = z82.object({
25912
- task: z82.string().describe("What this agent should do. Be specific and complete."),
25913
- data: z82.string().optional().describe(
26033
+ import { z as z83 } from "zod";
26034
+ var assignInputSchema = z83.object({
26035
+ task: z83.string().describe("What this agent should do. Be specific and complete."),
26036
+ data: z83.string().optional().describe(
25914
26037
  "Data from a previous step to pass to this agent (e.g. spreadsheet content, search results)."
25915
26038
  )
25916
26039
  });
@@ -26245,19 +26368,19 @@ function buildDeferredToolResults(dropped) {
26245
26368
  }
26246
26369
 
26247
26370
  // ../../packages/orchestration/src/planner/task-tools.ts
26248
- import { z as z83 } from "zod";
26249
- var createTaskSchema = z83.object({
26250
- title: z83.string().max(200).describe("Short title for this task (max 200 chars)."),
26251
- description: z83.string().max(2e3).optional().describe("Detailed description of what to do."),
26252
- assigned_to: z83.string().describe("Slug of the agent to assign this task to."),
26253
- priority: z83.enum(["low", "medium", "high"]).optional().describe("Task priority (default: medium)."),
26254
- depends_on: z83.array(z83.string()).optional().describe(
26371
+ import { z as z84 } from "zod";
26372
+ var createTaskSchema = z84.object({
26373
+ title: z84.string().max(200).describe("Short title for this task (max 200 chars)."),
26374
+ description: z84.string().max(2e3).optional().describe("Detailed description of what to do."),
26375
+ assigned_to: z84.string().describe("Slug of the agent to assign this task to."),
26376
+ priority: z84.enum(["low", "medium", "high"]).optional().describe("Task priority (default: medium)."),
26377
+ depends_on: z84.array(z84.string()).optional().describe(
26255
26378
  "Array of task IDs that must complete before this task starts. Use list_tasks to get IDs."
26256
26379
  ),
26257
- context: z83.record(z83.string(), z83.unknown()).optional().describe("Additional context key/value pairs.")
26380
+ context: z84.record(z84.string(), z84.unknown()).optional().describe("Additional context key/value pairs.")
26258
26381
  });
26259
- var listTasksSchema = z83.object({
26260
- status: z83.enum(["todo", "in_progress", "done", "cancelled", "blocked"]).optional().describe("Filter by status. Omit to list all tasks for this job.")
26382
+ var listTasksSchema = z84.object({
26383
+ status: z84.enum(["todo", "in_progress", "done", "cancelled", "blocked"]).optional().describe("Filter by status. Omit to list all tasks for this job.")
26261
26384
  });
26262
26385
  function generateTaskTools(orchestratorAgentId, db) {
26263
26386
  const createTaskTool = {
@@ -26496,6 +26619,11 @@ async function buildTeamBlock(parentAgentId, db) {
26496
26619
  function buildJobContextBlock(ctx) {
26497
26620
  const lines = [`- origin: ${ctx.origin}`];
26498
26621
  if (ctx.telegramChatId) lines.push(`- telegram_chat_id: ${ctx.telegramChatId}`);
26622
+ if (ctx.notifyOnSuccess) {
26623
+ lines.push(
26624
+ "- notify_on_success: true \u2014 when this job finishes, send the user a short confirmation (what you did + the outcome) via your delivery tool before calling return_result."
26625
+ );
26626
+ }
26499
26627
  return `
26500
26628
 
26501
26629
  ## Job context
@@ -26918,9 +27046,11 @@ async function executeJob(jobId, deps, _runnerEnv) {
26918
27046
  }));
26919
27047
  const orchestratorMode = detectOrchestratorMode(agent, children);
26920
27048
  const isOrchestrator = agent.role === "orchestrator";
27049
+ const cronWantsConfirmation = job.channel === "cron" && job.chatId != null;
26921
27050
  const jobContext = {
26922
27051
  origin: job.channel ?? "unknown",
26923
- ...job.chatId ? { telegramChatId: job.chatId } : {}
27052
+ ...job.chatId ? { telegramChatId: job.chatId } : {},
27053
+ ...cronWantsConfirmation ? { notifyOnSuccess: true } : {}
26924
27054
  };
26925
27055
  let systemPrompt = job.systemPrompt;
26926
27056
  if (!systemPrompt) {
@@ -27061,7 +27191,7 @@ async function executeJob(jobId, deps, _runnerEnv) {
27061
27191
  }
27062
27192
  mcpClosers.push(toolset.close);
27063
27193
  const enabled = ms.enabledTools;
27064
- const prefixLen = slugToPrefix(ms.slug).length + 2;
27194
+ const prefixLen = slugToPrefix2(ms.slug).length + 2;
27065
27195
  const filtered = enabled === null ? toolset.tools : toolset.tools.filter((t) => enabled.includes(t.name.slice(prefixLen)));
27066
27196
  capabilityTools.push(...filtered);
27067
27197
  } catch {
@@ -27097,6 +27227,11 @@ async function executeJob(jobId, deps, _runnerEnv) {
27097
27227
  const counters = new ChainCounters(DEFAULT_LIMITS);
27098
27228
  const hasAdapterTools = !isOrchestrator && toolDefs.length > ALWAYS_ON_TOOLS.length;
27099
27229
  const toolMap = new Map(toolDefs.map((t) => [t.name, t]));
27230
+ let authoringToolsSuffix = "";
27231
+ if (toolMap.has("create_skill") || toolMap.has("update_skill")) {
27232
+ const mcpToolNames = await listWorkspaceMcpToolNames(db, job.entityId ?? "");
27233
+ authoringToolsSuffix = mcpToolNames.length > 0 ? ` When a skill needs an MCP tool, reference one of these EXACT names available in this workspace (built-in and connector tools are bare snake_case and need no namespace): ${mcpToolNames.join(", ")}.` : " This workspace has no MCP servers connected yet \u2014 a skill should only reference built-in tools (bare snake_case) or none.";
27234
+ }
27100
27235
  let messages = Array.isArray(job.messages) ? job.messages : [];
27101
27236
  if (messages.length === 0) {
27102
27237
  messages = [{ role: "user", content: job.task }];
@@ -27214,11 +27349,25 @@ async function executeJob(jobId, deps, _runnerEnv) {
27214
27349
  const MAX_EMPTY_TURN_RETRIES = 2;
27215
27350
  let emptyTurnRetries = 0;
27216
27351
  let consecutiveDeliveryOnlyTurns = 0;
27217
- const requiresToolDelivery = TOOL_ONLY_DELIVERY_CHANNELS.has(job.channel ?? "");
27352
+ const requiresToolDelivery = TOOL_ONLY_DELIVERY_CHANNELS.has(job.channel ?? "") || cronWantsConfirmation;
27218
27353
  const MAX_TELEGRAM_REDELIVERY_NUDGES = 2;
27219
27354
  let telegramRedeliveryNudges = 0;
27220
27355
  let telegramDelivered = false;
27221
27356
  const deliveryNudge = "[syst\xE8me] Tu es sur Telegram. Tu n'as pas encore livr\xE9 ta r\xE9ponse \xE0 l'utilisateur. Appelle `telegram_send_message` avec ta r\xE9ponse, PUIS `return_result`. Ne r\xE9ponds pas en texte simple \u2014 sur Telegram, seul un message envoy\xE9 via `telegram_send_message` est visible par l'utilisateur.";
27357
+ let approvalPending = false;
27358
+ const approvalNudge = "[syst\xE8me] Tu es sur Telegram et une de tes actions vient de cr\xE9er une demande d'approbation : elle attend la validation de l'utilisateur avant de s'ex\xE9cuter. Avant que le job se mette en pause, appelle `telegram_send_message` pour dire \xE0 l'utilisateur, avec tes propres mots, quelle action tu as lanc\xE9e et que tu attends son approbation (il la validera depuis le dashboard). N'appelle PAS `return_result` \u2014 la mise en pause est automatique.";
27359
+ const suspendForApproval = async () => {
27360
+ await saveCheckpoint(db, jobId, {
27361
+ messages,
27362
+ turn,
27363
+ chainCount: job.chainCount ?? 0,
27364
+ toolsUsed,
27365
+ inputTokens,
27366
+ outputTokens
27367
+ });
27368
+ await setJobStatus(db, jobId, "awaiting_approval");
27369
+ return { status: "awaiting_approval" };
27370
+ };
27222
27371
  try {
27223
27372
  while (true) {
27224
27373
  turn += 1;
@@ -27237,7 +27386,8 @@ async function executeJob(jobId, deps, _runnerEnv) {
27237
27386
  const toolChoice = computeToolChoice({ isOrchestrator, turn, hasAdapterTools });
27238
27387
  const aiSdkTools = {};
27239
27388
  for (const [name, toolDef] of toolMap) {
27240
- aiSdkTools[name] = { description: toolDef.description, inputSchema: toolDef.inputSchema };
27389
+ const description = authoringToolsSuffix && (name === "create_skill" || name === "update_skill") ? toolDef.description + authoringToolsSuffix : toolDef.description;
27390
+ aiSdkTools[name] = { description, inputSchema: toolDef.inputSchema };
27241
27391
  }
27242
27392
  trace("llm_call_start", { turn, msgCount: messages.length });
27243
27393
  const response = await llmClient.generateText({
@@ -27278,6 +27428,9 @@ async function executeJob(jobId, deps, _runnerEnv) {
27278
27428
  const returnResultCall = rawToolCalls.find((tc) => tc.toolName === "return_result");
27279
27429
  if (rawToolCalls.length === 0) {
27280
27430
  trace("no_tool_calls_branch", { turn, hasText: Boolean(response.text) });
27431
+ if (approvalPending) {
27432
+ return await suspendForApproval();
27433
+ }
27281
27434
  const textContent = response.text ?? "";
27282
27435
  if (textContent) {
27283
27436
  if (requiresToolDelivery && !telegramDelivered) {
@@ -27500,19 +27653,27 @@ async function executeJob(jobId, deps, _runnerEnv) {
27500
27653
  });
27501
27654
  }
27502
27655
  if (awaitingApproval) {
27656
+ approvalPending = true;
27657
+ }
27658
+ if (approvalPending) {
27659
+ if (returnResultCall && !toolResultBlocks.some((b) => b.toolName === "return_result")) {
27660
+ toolResultBlocks.push({
27661
+ type: "tool-result",
27662
+ toolCallId: returnResultCall.toolCallId,
27663
+ toolName: "return_result",
27664
+ output: toResultOutput({ error: "deferred: an action is awaiting user approval" })
27665
+ });
27666
+ }
27503
27667
  if (toolResultBlocks.length > 0) {
27504
27668
  messages = [...messages, { role: "tool", content: toolResultBlocks }];
27505
27669
  }
27506
- await saveCheckpoint(db, jobId, {
27507
- messages,
27508
- turn,
27509
- chainCount: job.chainCount ?? 0,
27510
- toolsUsed,
27511
- inputTokens,
27512
- outputTokens
27513
- });
27514
- await setJobStatus(db, jobId, "awaiting_approval");
27515
- return { status: "awaiting_approval" };
27670
+ if (requiresToolDelivery && !telegramDelivered && telegramRedeliveryNudges < MAX_TELEGRAM_REDELIVERY_NUDGES) {
27671
+ telegramRedeliveryNudges += 1;
27672
+ trace("telegram_approval_nudge", { turn, attempt: telegramRedeliveryNudges });
27673
+ messages = [...messages, { role: "user", content: approvalNudge }];
27674
+ continue;
27675
+ }
27676
+ return await suspendForApproval();
27516
27677
  }
27517
27678
  const isToolErrorBlock = (block) => block.toolName !== "return_result" && block.output.type === "json" && block.output.value !== null && typeof block.output.value === "object" && "error" in block.output.value;
27518
27679
  const turnHadSiblingToolError = returnResultCall !== void 0 && toolResultBlocks.some(isToolErrorBlock);
@@ -27646,8 +27807,8 @@ async function executeJob(jobId, deps, _runnerEnv) {
27646
27807
  }
27647
27808
 
27648
27809
  // src/routes/worker.ts
27649
- var WorkerRequestSchema = z84.object({
27650
- jobId: z84.string().guid()
27810
+ var WorkerRequestSchema = z85.object({
27811
+ jobId: z85.string().guid()
27651
27812
  });
27652
27813
  async function workerRoute(c, deps, runnerEnv) {
27653
27814
  const workerSecret = runnerEnv.WORKER_SECRET;
@@ -27691,11 +27852,11 @@ function timingSafeEqual(a, b) {
27691
27852
  }
27692
27853
 
27693
27854
  // src/routes/approve.ts
27694
- import { z as z85 } from "zod";
27695
- var ApproveRequestSchema = z85.object({
27696
- approvalRequestId: z85.string().guid(),
27697
- decision: z85.enum(["approve", "reject"]),
27698
- notes: z85.string().optional()
27855
+ import { z as z86 } from "zod";
27856
+ var ApproveRequestSchema = z86.object({
27857
+ approvalRequestId: z86.string().guid(),
27858
+ decision: z86.enum(["approve", "reject"]),
27859
+ notes: z86.string().optional()
27699
27860
  });
27700
27861
  async function approveRoute(c, deps, runnerEnv) {
27701
27862
  const body = await c.req.json().catch(() => null);
@@ -28058,9 +28219,11 @@ async function runScheduleTick(db, deps, max2 = 5) {
28058
28219
  cronExpr: agentSchedules.cronExpr,
28059
28220
  task: agentSchedules.task,
28060
28221
  nextRun: agentSchedules.nextRun,
28061
- // The agent's last-seen Telegram chat is the default delivery target for
28062
- // cron-fired jobs (no per-schedule chat UI yet). Populated by the
28063
- // inbound poller on every DM; null until the user has DM'd the bot once.
28222
+ // Per-schedule opt-in: deliver a success confirmation to the user.
28223
+ notifyOnSuccess: agentSchedules.notifyOnSuccess,
28224
+ // The agent's last-seen Telegram chat is the delivery target for cron-fired
28225
+ // jobs that opted into a confirmation. Populated by the inbound poller on
28226
+ // every DM; null until the user has DM'd the bot once.
28064
28227
  agentLastSeenChatIdTelegram: agents.lastSeenChatIdTelegram
28065
28228
  }).from(agentSchedules).leftJoin(agents, eq4(agents.id, agentSchedules.agentId)).where(
28066
28229
  and3(
@@ -28099,11 +28262,12 @@ async function runScheduleTick(db, deps, max2 = 5) {
28099
28262
  )
28100
28263
  ).returning({ id: agentSchedules.id });
28101
28264
  if (claimed.length === 0) continue;
28265
+ const notifyChatId = sched.notifyOnSuccess ? sched.agentLastSeenChatIdTelegram ?? null : null;
28102
28266
  const [job] = await db.insert(agentJobs).values({
28103
28267
  entityId: sched.entityId,
28104
28268
  agentId: sched.agentId,
28105
28269
  channel: "cron",
28106
- chatId: sched.agentLastSeenChatIdTelegram ?? null,
28270
+ chatId: notifyChatId,
28107
28271
  task: sched.task,
28108
28272
  status: "pending",
28109
28273
  messages: [{ role: "user", content: sched.task }]