@5ss/ai-tools 2.11.3 → 3.0.0

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 (147) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +4 -11
  3. package/dist/{bedrock-agentcore-browser-a_qOs-NR.js → bedrock-agentcore-browser-o_oqSPMK.js} +2 -2
  4. package/dist/{bedrock-agentcore-browser-a_qOs-NR.js.map → bedrock-agentcore-browser-o_oqSPMK.js.map} +1 -1
  5. package/dist/{bedrock-agentcore-code-interpreter-MWK-8RhA.js → bedrock-agentcore-code-interpreter-D4ERRFj1.js} +2 -2
  6. package/dist/{bedrock-agentcore-code-interpreter-MWK-8RhA.js.map → bedrock-agentcore-code-interpreter-D4ERRFj1.js.map} +1 -1
  7. package/dist/{cloudflare-browser-B6Yolpin.js → cloudflare-browser-nLJdH5nG.js} +3 -3
  8. package/dist/{cloudflare-browser-B6Yolpin.js.map → cloudflare-browser-nLJdH5nG.js.map} +1 -1
  9. package/dist/{cloudflare-email-Dy0KHeDf.js → cloudflare-email-CSRq8mRd.js} +2 -2
  10. package/dist/{cloudflare-email-Dy0KHeDf.js.map → cloudflare-email-CSRq8mRd.js.map} +1 -1
  11. package/dist/{cloudflare-sandbox-Dp_uNaqW.js → cloudflare-sandbox-Be7SeS4-.js} +3 -3
  12. package/dist/{cloudflare-sandbox-Dp_uNaqW.js.map → cloudflare-sandbox-Be7SeS4-.js.map} +1 -1
  13. package/dist/content-type-E4_Qdoa0.js +19 -0
  14. package/dist/{content-type-CORxaxcv.js.map → content-type-E4_Qdoa0.js.map} +1 -1
  15. package/dist/core/index.js +2 -6
  16. package/dist/core/index.js.map +1 -1
  17. package/dist/{define-CvpJ_pNP.js → define-ieoksEQ0.js} +1 -6
  18. package/dist/define-ieoksEQ0.js.map +1 -0
  19. package/dist/{eventbridge-scheduler-Bh6GqZY2.js → eventbridge-scheduler-BhQaReAz.js} +2 -2
  20. package/dist/{eventbridge-scheduler-Bh6GqZY2.js.map → eventbridge-scheduler-BhQaReAz.js.map} +1 -1
  21. package/dist/imessage-CH49-sFn.js +558 -0
  22. package/dist/imessage-CH49-sFn.js.map +1 -0
  23. package/dist/index-CZX5OeOF.d.ts.map +1 -1
  24. package/dist/{mastra-vector-Dhc6XZ8l.js → mastra-vector-B8HjvdMT.js} +2 -2
  25. package/dist/{mastra-vector-Dhc6XZ8l.js.map → mastra-vector-B8HjvdMT.js.map} +1 -1
  26. package/dist/modules/artifacts/index.js +3 -3
  27. package/dist/modules/browser/index.js +3 -3
  28. package/dist/modules/calendar/index.js +1 -1
  29. package/dist/modules/code-sandbox/index.js +3 -3
  30. package/dist/modules/content-type/index.js +2 -2
  31. package/dist/modules/crypto/index.js +1 -1
  32. package/dist/modules/document-extract/index.js +2 -2
  33. package/dist/modules/document-render/index.d.ts +21 -30
  34. package/dist/modules/document-render/index.d.ts.map +1 -1
  35. package/dist/modules/document-render/index.js +11 -28
  36. package/dist/modules/document-render/index.js.map +1 -1
  37. package/dist/modules/email/index.d.ts +19 -1
  38. package/dist/modules/email/index.d.ts.map +1 -1
  39. package/dist/modules/email/index.js +3 -3
  40. package/dist/modules/email-message/index.js +1 -1
  41. package/dist/modules/files/index.js +2 -2
  42. package/dist/modules/image/index.d.ts +4 -1
  43. package/dist/modules/image/index.d.ts.map +1 -1
  44. package/dist/modules/image/index.js +25 -4
  45. package/dist/modules/image/index.js.map +1 -1
  46. package/dist/modules/messaging/index.d.ts +12 -24
  47. package/dist/modules/messaging/index.d.ts.map +1 -1
  48. package/dist/modules/messaging/index.js +28 -43
  49. package/dist/modules/messaging/index.js.map +1 -1
  50. package/dist/modules/queue/index.js +2 -2
  51. package/dist/modules/rag/index.js +2 -2
  52. package/dist/modules/scheduler/index.js +2 -2
  53. package/dist/modules/skills/index.js +1 -1
  54. package/dist/modules/tasks/index.js +1 -1
  55. package/dist/modules/vector-store/index.js +1 -1
  56. package/dist/modules/web-fetch/index.js +1 -1
  57. package/dist/{pinecone-umY4t6OF.js → pinecone-CNnCFmix.js} +2 -2
  58. package/dist/{pinecone-umY4t6OF.js.map → pinecone-CNnCFmix.js.map} +1 -1
  59. package/dist/{qdrant-DMp4NhKR.js → qdrant-R_FIcG9d.js} +2 -2
  60. package/dist/{qdrant-DMp4NhKR.js.map → qdrant-R_FIcG9d.js.map} +1 -1
  61. package/dist/{resend-BAC38_dA.js → resend-Bu0NFO3h.js} +2 -2
  62. package/dist/{resend-BAC38_dA.js.map → resend-Bu0NFO3h.js.map} +1 -1
  63. package/dist/{s3-CsOaPWMP.js → s3-Dj7Teh-A.js} +2 -2
  64. package/dist/{s3-CsOaPWMP.js.map → s3-Dj7Teh-A.js.map} +1 -1
  65. package/dist/{slack-Di5BBNpt.js → slack-AjJDNnXJ.js} +2 -2
  66. package/dist/{slack-Di5BBNpt.js.map → slack-AjJDNnXJ.js.map} +1 -1
  67. package/dist/{sqs-DCwS1i2N.js → sqs-CjyXjasF.js} +2 -2
  68. package/dist/{sqs-DCwS1i2N.js.map → sqs-CjyXjasF.js.map} +1 -1
  69. package/dist/{supabase-vector-Dpp9mmJR.js → supabase-vector-BNoJZuft.js} +2 -2
  70. package/dist/{supabase-vector-Dpp9mmJR.js.map → supabase-vector-BNoJZuft.js.map} +1 -1
  71. package/dist/{teams-DYAHNb39.js → teams-CvxYLAi5.js} +2 -2
  72. package/dist/{teams-DYAHNb39.js.map → teams-CvxYLAi5.js.map} +1 -1
  73. package/dist/{telegram-DDXWzkfL.js → telegram-B_-Jljk3.js} +2 -2
  74. package/dist/{telegram-DDXWzkfL.js.map → telegram-B_-Jljk3.js.map} +1 -1
  75. package/dist/{textract-CPLiB22H.js → textract-CAfnGvua.js} +3 -3
  76. package/dist/{textract-CPLiB22H.js.map → textract-CAfnGvua.js.map} +1 -1
  77. package/dist/{vector-store-C3nEO80e.js → vector-store-DDiu3XPg.js} +6 -6
  78. package/dist/{vector-store-C3nEO80e.js.map → vector-store-DDiu3XPg.js.map} +1 -1
  79. package/dist/vendors/amazon-sp-api/index.js +339 -2
  80. package/dist/vendors/amazon-sp-api/index.js.map +1 -1
  81. package/dist/vendors/bedrock-agentcore-browser/index.js +1 -1
  82. package/dist/vendors/bedrock-agentcore-code-interpreter/index.js +1 -1
  83. package/dist/vendors/cloudflare-browser/index.js +1 -1
  84. package/dist/vendors/cloudflare-email/index.js +1 -1
  85. package/dist/vendors/cloudflare-sandbox/index.js +1 -1
  86. package/dist/vendors/eventbridge-scheduler/index.js +1 -1
  87. package/dist/vendors/imessage/index.d.ts +65 -188
  88. package/dist/vendors/imessage/index.d.ts.map +1 -1
  89. package/dist/vendors/imessage/index.js +2 -3
  90. package/dist/vendors/katana/index.js +1 -1
  91. package/dist/vendors/mastra-vector/index.js +1 -1
  92. package/dist/vendors/pinecone/index.js +1 -1
  93. package/dist/vendors/qdrant/index.js +1 -1
  94. package/dist/vendors/resend/index.js +1 -1
  95. package/dist/vendors/s3/index.js +1 -1
  96. package/dist/vendors/slack/index.js +1 -1
  97. package/dist/vendors/sqs/index.js +1 -1
  98. package/dist/vendors/supabase-vector/index.js +1 -1
  99. package/dist/vendors/teams/index.js +1 -1
  100. package/dist/vendors/telegram/index.js +1 -1
  101. package/dist/vendors/textract/index.js +1 -1
  102. package/dist/vendors/woocommerce/index.js +1 -1
  103. package/logos/README.md +0 -4
  104. package/logos/pack-logos.json +0 -5
  105. package/package.json +4 -55
  106. package/dist/artifacts-O8g-40Pw.js +0 -404
  107. package/dist/artifacts-O8g-40Pw.js.map +0 -1
  108. package/dist/batch-BMM5dXqL.d.ts +0 -22
  109. package/dist/batch-BMM5dXqL.d.ts.map +0 -1
  110. package/dist/client-CCKGsTeI.js +0 -743
  111. package/dist/client-CCKGsTeI.js.map +0 -1
  112. package/dist/content-type-CORxaxcv.js +0 -49
  113. package/dist/define-CvpJ_pNP.js.map +0 -1
  114. package/dist/esm-BDrCssjb.js +0 -957
  115. package/dist/esm-BDrCssjb.js.map +0 -1
  116. package/dist/gotenberg-NuJjxyln.js +0 -291
  117. package/dist/gotenberg-NuJjxyln.js.map +0 -1
  118. package/dist/imessage-BSAFOI8Z.js +0 -154
  119. package/dist/imessage-BSAFOI8Z.js.map +0 -1
  120. package/dist/modules/document/index.d.ts +0 -575
  121. package/dist/modules/document/index.d.ts.map +0 -1
  122. package/dist/modules/document/index.js +0 -444
  123. package/dist/modules/document/index.js.map +0 -1
  124. package/dist/modules/file-convert/index.d.ts +0 -273
  125. package/dist/modules/file-convert/index.d.ts.map +0 -1
  126. package/dist/modules/file-convert/index.js +0 -103
  127. package/dist/modules/file-convert/index.js.map +0 -1
  128. package/dist/modules/pdf/index.d.ts +0 -287
  129. package/dist/modules/pdf/index.d.ts.map +0 -1
  130. package/dist/modules/pdf/index.js +0 -259
  131. package/dist/modules/pdf/index.js.map +0 -1
  132. package/dist/modules/presentation/index.d.ts +0 -247
  133. package/dist/modules/presentation/index.d.ts.map +0 -1
  134. package/dist/modules/presentation/index.js +0 -11721
  135. package/dist/modules/presentation/index.js.map +0 -1
  136. package/dist/object-artifact-store-BVLietAc.d.ts +0 -7
  137. package/dist/object-artifact-store-BVLietAc.d.ts.map +0 -1
  138. package/dist/object-artifact-store-wZ2j9cto.js +0 -28
  139. package/dist/object-artifact-store-wZ2j9cto.js.map +0 -1
  140. package/dist/vendors/gotenberg/index.d.ts +0 -306
  141. package/dist/vendors/gotenberg/index.d.ts.map +0 -1
  142. package/dist/vendors/gotenberg/index.js +0 -2
  143. package/logos/document.svg +0 -10
  144. package/logos/file-convert.svg +0 -9
  145. package/logos/gotenberg.svg +0 -340
  146. package/logos/pdf.svg +0 -10
  147. package/logos/presentation.svg +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"index-CZX5OeOF.d.ts","names":[],"sources":["../src/core/filter-tools.ts","../src/core/hooks.ts","../src/core/bind.ts","../src/core/context.ts","../src/core/contracts.ts","../src/core/catalog.ts","../src/core/define.ts","../src/generated/pack-logos.ts","../src/core/provider.ts","../src/core/resolve-tools.ts","../src/core/unique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AAG,gBAAgB,KAAK,KAAK,MAAM;;iBAKpD,eAAe,GAC9B,gBAAgB,KAChB,KAAK,MAAM,cACX,UAAU;;;iBCMK,aAAa,QAAQ,SACpC,MAAM,eAAe,QAAQ,UAC7B,gBACE,eAAe,QAAQ;KAoBd;;;;;EAKX,QAAQ;;iBAGO,SAAS,OACxB,QAAQ,iBAAiB,QACzB,OAAO,OACP,UAAS,kBACP,iBAAiB;KAYf,aAAa,QAAQ;EACzB;EACA;EACA;EACA,OAAO;EACP,YAAY;EACZ,aAAa,eAAe,QAAQ;EACpC,cAAc,eAAe,QAAQ;EACrC,UAAU,gBAAgB,KAAK,gBAAgB;;;iBAI1B,QAAQ,QAAQ,SACrC,MAAM,aAAa,QAAQ,UAC3B,OAAO,QACP,MAAK,cACH,QAAQ;iBAkDK,UAAU,QAAQ,4BAA4B"}
1
+ {"version":3,"file":"index-CZX5OeOF.d.ts","names":[],"sources":["../src/core/filter-tools.ts","../src/core/hooks.ts","../src/core/bind.ts","../src/core/context.ts","../src/core/contracts.ts","../src/core/catalog.ts","../src/core/define.ts","../src/generated/pack-logos.ts","../src/core/provider.ts","../src/core/resolve-tools.ts","../src/core/unique.ts","../src/core/with-auth.ts"],"mappings":";;;;;;;KAYY;EAAkB;EAAyB;;EAAqB;EAA2B;;;KAG3F,eAAe;;KAGf,kBAAkB,QAAQ;EAAiB;;;KAG3C,oBAAoB,QAAQ;EAAiB;;;KAG7C,aAAa,UAAU,oBAAoB;;;;;iBAuCvC,UAAU,aAAa,6BACtC,QAAQ,iBAAiB,QACzB,cAAc,QACZ,iBAAiB;;;;;iBAsBJ,YAAY,aAAa,6BACxC,QAAQ,iBAAiB,QACzB,cAAc,QACZ,iBAAiB;;iBAWJ,kBAAkB,OACjC,QAAQ,iBAAiB,QACzB,WAAW,gBACT,iBAAiB;;;iBCnGJ,cAAc,QAAQ,SACrC,MAAM,eAAe,QAAQ,UAC7B,OAAO,YACL,eAAe,QAAQ;iBAQV,UAAU,OAAO,QAAQ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AAU,QAAQ,4BAA4B"}
@@ -1,5 +1,5 @@
1
1
  import { t as ToolError } from "./errors-DoSpNHvs.js";
2
- import { n as defineModule, r as defineTool } from "./define-CvpJ_pNP.js";
2
+ import { n as defineModule, r as defineTool } from "./define-ieoksEQ0.js";
3
3
  import { n as requireAuth } from "./provider-CgDAlg6K.js";
4
4
  import { S as requireCollection, _ as parseMetadata, a as deleteVectorsOutputSchema, c as upsertVectorsInputSchema, g as mergeVectorFilter, i as deleteVectorsInputSchema, l as upsertVectorsOutputSchema, o as queryVectorsInputSchema, s as queryVectorsOutputSchema, u as vectorDefaultFilterSchema, w as stampDefaultFilterMetadata } from "./schemas-ChOAhdo9.js";
5
5
  import { isNumber, isPlainObject, isString } from "es-toolkit";
@@ -231,4 +231,4 @@ const mastraVectorModule = defineModule({
231
231
  //#endregion
232
232
  export { MastraVectorClient as a, mastraVectorUpsertTool as i, mastraVectorModule as n, mastraVectorAuthSchema as o, mastraVectorQueryTool as r, mastraVectorDeleteTool as t };
233
233
 
234
- //# sourceMappingURL=mastra-vector-Dhc6XZ8l.js.map
234
+ //# sourceMappingURL=mastra-vector-B8HjvdMT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mastra-vector-Dhc6XZ8l.js","names":["#store","#defaultIndex","#defaultFilter","#dimension","#autoCreateIndex","#ownsStore","#ensureIndex"],"sources":["../src/vendors/mastra-vector/contracts.ts","../src/vendors/mastra-vector/client.ts","../src/vendors/mastra-vector/module.ts"],"sourcesContent":["import { z } from 'zod'\n\nimport { vectorDefaultFilterSchema } from '../_vector'\n\nexport {\n\tMAX_TOP_K,\n\tMAX_VECTOR_BATCH,\n\tMAX_VECTOR_DIMENSIONS,\n\tdeleteVectorsInputSchema,\n\tdeleteVectorsOutputSchema,\n\tqueryVectorsInputSchema,\n\tqueryVectorsOutputSchema,\n\tupsertVectorsInputSchema,\n\tupsertVectorsOutputSchema,\n\tvectorMatchSchema,\n\tvectorMetadataSchema,\n\tvectorPointSchema\n} from '../_vector'\nexport type {\n\tDeleteVectorsInput,\n\tDeleteVectorsOutput,\n\tQueryVectorsInput,\n\tQueryVectorsOutput,\n\tUpsertVectorsInput,\n\tUpsertVectorsOutput,\n\tVectorMatch,\n\tVectorMetadata,\n\tVectorPoint\n} from '../_vector'\n\n/**\n * Mastra PgVector auth (`@mastra/pg`).\n * Host owns Postgres connection + schema; package does not invent org policy.\n */\nexport const mastraVectorAuthSchema = z.object({\n\tconnection_string: z\n\t\t.string()\n\t\t.min(1)\n\t\t.describe('Postgres connection string for Mastra PgVector (e.g. Supabase DB URL)'),\n\tid: z.string().min(1).describe('Mastra vector store id (stable string for this store instance)'),\n\tschema_name: z\n\t\t.string()\n\t\t.min(1)\n\t\t.optional()\n\t\t.describe('Postgres schema for vector tables (e.g. agent); omit for package default'),\n\tdefault_index: z.string().min(1).optional().describe('Default index name when tool input omits collection'),\n\tdimension: z\n\t\t.number()\n\t\t.int()\n\t\t.positive()\n\t\t.optional()\n\t\t.describe('Embedding dimension; required when auto_create_index is true'),\n\tauto_create_index: z\n\t\t.boolean()\n\t\t.optional()\n\t\t.describe('When true, create the index on upsert if missing (needs dimension)'),\n\tdisable_init: z.boolean().optional().describe('Pass disableInit to PgVector (host manages migration/init)'),\n\tdefault_filter: vectorDefaultFilterSchema\n\t\t.optional()\n\t\t.describe(\n\t\t\t'Host-bound metadata filter always applied on query (Mongo-style / Mastra PG filter); flat keys stamped on upsert'\n\t\t)\n})\n\nexport type MastraVectorAuth = z.infer<typeof mastraVectorAuthSchema>\n","/**\n * Mastra PgVector vendor client (`@mastra/pg`).\n * Host: `new MastraVectorClient(auth)`. Agent tools: `fromContext(ctx)`.\n * Runtime: node (Postgres). Optional peer: `@mastra/pg`.\n */\n\nimport { PgVector } from '@mastra/pg'\nimport { isNumber, isPlainObject, isString } from 'es-toolkit'\n\nimport { ToolError } from '../../core/errors'\nimport { requireAuth } from '../../core/provider'\nimport type { ToolContext } from '../../core/types'\nimport { mergeVectorFilter, parseMetadata, requireCollection, stampDefaultFilterMetadata } from '../_vector/domain'\nimport type { VectorDefaultFilter } from '../_vector/domain'\nimport type {\n\tDeleteVectorsInput,\n\tDeleteVectorsOutput,\n\tMastraVectorAuth,\n\tQueryVectorsInput,\n\tQueryVectorsOutput,\n\tUpsertVectorsInput,\n\tUpsertVectorsOutput,\n\tVectorMatch\n} from './contracts'\nimport { mastraVectorAuthSchema } from './contracts'\n\n/** Injected / real store surface (filter is opaque Record for seam compatibility). */\ntype MastraStore = {\n\tupsert: (input: {\n\t\tindexName: string\n\t\tids: string[]\n\t\tvectors: number[][]\n\t\tmetadata: Array<Record<string, unknown>>\n\t}) => Promise<unknown>\n\tquery: (input: {\n\t\tindexName: string\n\t\tqueryVector: number[]\n\t\ttopK?: number\n\t\tincludeVector?: boolean\n\t\tfilter?: Record<string, unknown>\n\t}) => Promise<Array<{ id?: string; score?: number; metadata?: unknown; vector?: number[] }>>\n\tdeleteVectors: (input: { indexName: string; ids: string[] }) => Promise<unknown>\n\tcreateIndex: (input: { indexName: string; dimension: number }) => Promise<unknown>\n\tdisconnect?: () => Promise<void>\n}\n\ntype PgQueryArgs = Parameters<PgVector['query']>[0]\n\n/** Narrow a built arg bag to PgVector query params (Mongo-style filter is structural). */\nfunction isPgQueryArgs(value: unknown): value is PgQueryArgs {\n\treturn (\n\t\tisPlainObject(value) &&\n\t\tisString(value['indexName']) &&\n\t\tvalue['indexName'].length > 0 &&\n\t\tArray.isArray(value['queryVector'])\n\t)\n}\n\nexport type MastraVectorClientOptions = {\n\t/**\n\t * Test injection — production uses PgVector.\n\t * Must implement the same method names as PgVector for upsert/query/deleteVectors/createIndex.\n\t */\n\tstore?: MastraStore\n}\n\nexport class MastraVectorClient {\n\treadonly #store: MastraStore\n\treadonly #defaultIndex: string | undefined\n\treadonly #defaultFilter: VectorDefaultFilter | undefined\n\treadonly #dimension: number | undefined\n\treadonly #autoCreateIndex: boolean\n\treadonly #ownsStore: boolean\n\n\tconstructor(auth: MastraVectorAuth, options: MastraVectorClientOptions = {}) {\n\t\tconst parsed = mastraVectorAuthSchema.safeParse(auth)\n\t\tif (!parsed.success) {\n\t\t\tthrow new ToolError('Invalid Mastra vector auth credentials', {\n\t\t\t\tcode: 'bad_auth',\n\t\t\t\tdetails: { issues: parsed.error.issues.map((issue) => issue.message) }\n\t\t\t})\n\t\t}\n\t\tconst data = parsed.data\n\t\tthis.#defaultIndex = data.default_index\n\t\tthis.#defaultFilter = data.default_filter\n\t\tthis.#dimension = data.dimension\n\t\tthis.#autoCreateIndex = data.auto_create_index === true\n\n\t\tif (options.store) {\n\t\t\tthis.#store = options.store\n\t\t\tthis.#ownsStore = false\n\t\t\treturn\n\t\t}\n\n\t\tconst config: {\n\t\t\tconnectionString: string\n\t\t\tid: string\n\t\t\tschemaName?: string\n\t\t\tdisableInit?: boolean\n\t\t} = {\n\t\t\tconnectionString: data.connection_string,\n\t\t\tid: data.id\n\t\t}\n\t\tif (data.schema_name) config.schemaName = data.schema_name\n\t\tif (data.disable_init === true) config.disableInit = true\n\n\t\tconst pg = new PgVector(config)\n\t\t// Adapt PgVector to opaque Record filters (Mongo-style / flat equality is native).\n\t\tthis.#store = {\n\t\t\tupsert: (input) =>\n\t\t\t\tpg.upsert({\n\t\t\t\t\tindexName: input.indexName,\n\t\t\t\t\tids: input.ids,\n\t\t\t\t\tvectors: input.vectors,\n\t\t\t\t\tmetadata: input.metadata\n\t\t\t\t}),\n\t\t\tquery: (input) => {\n\t\t\t\tconst args: Record<string, unknown> = {\n\t\t\t\t\tindexName: input.indexName,\n\t\t\t\t\tqueryVector: input.queryVector,\n\t\t\t\t\t...(input.topK !== undefined && { topK: input.topK }),\n\t\t\t\t\t...(input.includeVector !== undefined && { includeVector: input.includeVector }),\n\t\t\t\t\t...(input.filter !== undefined && { filter: input.filter })\n\t\t\t\t}\n\t\t\t\tif (!isPgQueryArgs(args)) {\n\t\t\t\t\tthrow new ToolError('Invalid Mastra vector query args', { code: 'internal' })\n\t\t\t\t}\n\t\t\t\treturn pg.query(args)\n\t\t\t},\n\t\t\tdeleteVectors: (input) => pg.deleteVectors({ indexName: input.indexName, ids: input.ids }),\n\t\t\tcreateIndex: (input) => pg.createIndex({ indexName: input.indexName, dimension: input.dimension }),\n\t\t\tdisconnect: () => pg.disconnect()\n\t\t}\n\t\tthis.#ownsStore = true\n\t}\n\n\tstatic fromContext(ctx: ToolContext): MastraVectorClient {\n\t\tconst auth = requireAuth(ctx, mastraVectorAuthSchema)\n\t\treturn new MastraVectorClient(auth)\n\t}\n\n\tasync upsert(input: UpsertVectorsInput): Promise<UpsertVectorsOutput> {\n\t\tconst indexName = requireCollection(input.collection, this.#defaultIndex, 'Mastra vector upsert')\n\t\tawait this.#ensureIndex(indexName, input.vectors[0]?.values.length)\n\n\t\tawait this.#store.upsert({\n\t\t\tindexName,\n\t\t\tids: input.vectors.map((point) => point.id),\n\t\t\tvectors: input.vectors.map((point) => point.values),\n\t\t\tmetadata: input.vectors.map((point) => stampDefaultFilterMetadata(point.metadata, this.#defaultFilter) ?? {})\n\t\t})\n\t\treturn { upserted: input.vectors.length, collection: indexName }\n\t}\n\n\tasync query(input: QueryVectorsInput): Promise<QueryVectorsOutput> {\n\t\tconst indexName = requireCollection(input.collection, this.#defaultIndex, 'Mastra vector query')\n\t\tconst topK = input.top_k ?? 8\n\t\tconst includeVector = input.include_values === true\n\t\tconst filter = mergeVectorFilter(this.#defaultFilter, input.filter)\n\n\t\tconst rows = await this.#store.query({\n\t\t\tindexName,\n\t\t\tqueryVector: input.vector,\n\t\t\ttopK,\n\t\t\tincludeVector,\n\t\t\t...(filter && { filter })\n\t\t})\n\n\t\tconst includeMetadata = input.include_metadata !== false\n\t\tconst matches: VectorMatch[] = []\n\t\tfor (const row of rows) {\n\t\t\tif (!isString(row.id) || row.id.length === 0) continue\n\t\t\tconst score = isNumber(row.score) ? row.score : 0\n\t\t\tconst match: VectorMatch = { id: row.id, score }\n\t\t\tif (includeMetadata && row.metadata !== undefined) {\n\t\t\t\tconst meta = parseMetadata(row.metadata)\n\t\t\t\tif (meta) match.metadata = meta\n\t\t\t}\n\t\t\tif (includeVector && Array.isArray(row.vector)) {\n\t\t\t\tconst values = row.vector.filter((n): n is number => isNumber(n) && Number.isFinite(n))\n\t\t\t\tif (values.length === row.vector.length) match.values = values\n\t\t\t}\n\t\t\tmatches.push(match)\n\t\t}\n\t\treturn { matches, collection: indexName }\n\t}\n\n\tasync delete(input: DeleteVectorsInput): Promise<DeleteVectorsOutput> {\n\t\tconst indexName = requireCollection(input.collection, this.#defaultIndex, 'Mastra vector delete')\n\t\tawait this.#store.deleteVectors({ indexName, ids: input.ids })\n\t\treturn { deleted: input.ids.length, collection: indexName }\n\t}\n\n\tasync disconnect(): Promise<void> {\n\t\tif (this.#ownsStore && this.#store.disconnect) {\n\t\t\tawait this.#store.disconnect()\n\t\t}\n\t}\n\n\tasync #ensureIndex(indexName: string, inferredDimension: number | undefined): Promise<void> {\n\t\tif (!this.#autoCreateIndex) return\n\t\tconst dimension = this.#dimension ?? inferredDimension\n\t\tif (dimension === undefined) {\n\t\t\tthrow new ToolError('Mastra auto_create_index requires dimension on auth or non-empty vectors', {\n\t\t\t\tcode: 'bad_input'\n\t\t\t})\n\t\t}\n\t\ttry {\n\t\t\tawait this.#store.createIndex({ indexName, dimension })\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : String(error)\n\t\t\tif (/already exists|duplicate|exist/i.test(message)) return\n\t\t\tthrow new ToolError(`Mastra createIndex failed: ${message}`, {\n\t\t\t\tcode: 'upstream',\n\t\t\t\tcause: error\n\t\t\t})\n\t\t}\n\t}\n}\n","import { defineModule, defineTool } from '../../core/define'\nimport { MastraVectorClient } from './client'\nimport {\n\tdeleteVectorsInputSchema,\n\tdeleteVectorsOutputSchema,\n\tmastraVectorAuthSchema,\n\tqueryVectorsInputSchema,\n\tqueryVectorsOutputSchema,\n\tupsertVectorsInputSchema,\n\tupsertVectorsOutputSchema\n} from './contracts'\n\nexport const mastraVectorUpsertTool = defineTool({\n\tid: 'mastra-vector-upsert',\n\tname: 'mastraVectorUpsert',\n\tdescription: 'Upsert vectors into a Mastra PgVector index. collection maps to indexName.',\n\tinputSchema: upsertVectorsInputSchema,\n\toutputSchema: upsertVectorsOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'node',\n\texecute: async (input, ctx) => MastraVectorClient.fromContext(ctx).upsert(input)\n})\n\nexport const mastraVectorQueryTool = defineTool({\n\tid: 'mastra-vector-query',\n\tname: 'mastraVectorQuery',\n\tdescription: 'Nearest-neighbor query against a Mastra PgVector index.',\n\tinputSchema: queryVectorsInputSchema,\n\toutputSchema: queryVectorsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'node',\n\texecute: async (input, ctx) => MastraVectorClient.fromContext(ctx).query(input)\n})\n\nexport const mastraVectorDeleteTool = defineTool({\n\tid: 'mastra-vector-delete',\n\tname: 'mastraVectorDelete',\n\tdescription: 'Delete vectors by id from a Mastra PgVector index.',\n\tinputSchema: deleteVectorsInputSchema,\n\toutputSchema: deleteVectorsOutputSchema,\n\tsideEffect: 'delete',\n\truntime: 'node',\n\texecute: async (input, ctx) => MastraVectorClient.fromContext(ctx).delete(input)\n})\n\nexport const mastraVectorModule = defineModule({\n\tid: 'mastra-vector',\n\ttitle: 'Mastra Vector',\n\tdescription:\n\t\t'Mastra PgVector over Postgres: upsert, query, and delete vectors. Index names map from collection. Node runtime.',\n\truntime: 'node',\n\tauth: { type: 'custom', schema: mastraVectorAuthSchema },\n\tcategories: ['ai', 'vector'],\n\tclassification: 'pii',\n\ttags: ['pgvector', 'mastra'],\n\ttools: [mastraVectorUpsertTool, mastraVectorQueryTool, mastraVectorDeleteTool]\n})\n"],"mappings":";;;;;;;;;;;;AAkCA,MAAa,yBAAyB,EAAE,OAAO;CAC9C,mBAAmB,EACjB,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,SAAS,uEAAuE;CAClF,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAA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,CAAC,CAAC,OAAO,KAAK;AAChF,CAAC;AAED,MAAa,qBAAqB,aAAa;CAC9C,IAAI;CACJ,OAAO;CACP,aACC;CACD,SAAS;CACT,MAAM;EAAE,MAAM;EAAU,QAAQ;CAAuB;CACvD,YAAY,CAAC,MAAM,QAAQ;CAC3B,gBAAgB;CAChB,MAAM,CAAC,YAAY,QAAQ;CAC3B,OAAO;EAAC;EAAwB;EAAuB;CAAsB;AAC9E,CAAC"}
1
+ {"version":3,"file":"mastra-vector-B8HjvdMT.js","names":["#store","#defaultIndex","#defaultFilter","#dimension","#autoCreateIndex","#ownsStore","#ensureIndex"],"sources":["../src/vendors/mastra-vector/contracts.ts","../src/vendors/mastra-vector/client.ts","../src/vendors/mastra-vector/module.ts"],"sourcesContent":["import { z } from 'zod'\n\nimport { vectorDefaultFilterSchema } from '../_vector'\n\nexport {\n\tMAX_TOP_K,\n\tMAX_VECTOR_BATCH,\n\tMAX_VECTOR_DIMENSIONS,\n\tdeleteVectorsInputSchema,\n\tdeleteVectorsOutputSchema,\n\tqueryVectorsInputSchema,\n\tqueryVectorsOutputSchema,\n\tupsertVectorsInputSchema,\n\tupsertVectorsOutputSchema,\n\tvectorMatchSchema,\n\tvectorMetadataSchema,\n\tvectorPointSchema\n} from '../_vector'\nexport type {\n\tDeleteVectorsInput,\n\tDeleteVectorsOutput,\n\tQueryVectorsInput,\n\tQueryVectorsOutput,\n\tUpsertVectorsInput,\n\tUpsertVectorsOutput,\n\tVectorMatch,\n\tVectorMetadata,\n\tVectorPoint\n} from '../_vector'\n\n/**\n * Mastra PgVector auth (`@mastra/pg`).\n * Host owns Postgres connection + schema; package does not invent org policy.\n */\nexport const mastraVectorAuthSchema = z.object({\n\tconnection_string: z\n\t\t.string()\n\t\t.min(1)\n\t\t.describe('Postgres connection string for Mastra PgVector (e.g. Supabase DB URL)'),\n\tid: z.string().min(1).describe('Mastra vector store id (stable string for this store instance)'),\n\tschema_name: z\n\t\t.string()\n\t\t.min(1)\n\t\t.optional()\n\t\t.describe('Postgres schema for vector tables (e.g. agent); omit for package default'),\n\tdefault_index: z.string().min(1).optional().describe('Default index name when tool input omits collection'),\n\tdimension: z\n\t\t.number()\n\t\t.int()\n\t\t.positive()\n\t\t.optional()\n\t\t.describe('Embedding dimension; required when auto_create_index is true'),\n\tauto_create_index: z\n\t\t.boolean()\n\t\t.optional()\n\t\t.describe('When true, create the index on upsert if missing (needs dimension)'),\n\tdisable_init: z.boolean().optional().describe('Pass disableInit to PgVector (host manages migration/init)'),\n\tdefault_filter: vectorDefaultFilterSchema\n\t\t.optional()\n\t\t.describe(\n\t\t\t'Host-bound metadata filter always applied on query (Mongo-style / Mastra PG filter); flat keys stamped on upsert'\n\t\t)\n})\n\nexport type MastraVectorAuth = z.infer<typeof mastraVectorAuthSchema>\n","/**\n * Mastra PgVector vendor client (`@mastra/pg`).\n * Host: `new MastraVectorClient(auth)`. Agent tools: `fromContext(ctx)`.\n * Runtime: node (Postgres). Optional peer: `@mastra/pg`.\n */\n\nimport { PgVector } from '@mastra/pg'\nimport { isNumber, isPlainObject, isString } from 'es-toolkit'\n\nimport { ToolError } from '../../core/errors'\nimport { requireAuth } from '../../core/provider'\nimport type { ToolContext } from '../../core/types'\nimport { mergeVectorFilter, parseMetadata, requireCollection, stampDefaultFilterMetadata } from '../_vector/domain'\nimport type { VectorDefaultFilter } from '../_vector/domain'\nimport type {\n\tDeleteVectorsInput,\n\tDeleteVectorsOutput,\n\tMastraVectorAuth,\n\tQueryVectorsInput,\n\tQueryVectorsOutput,\n\tUpsertVectorsInput,\n\tUpsertVectorsOutput,\n\tVectorMatch\n} from './contracts'\nimport { mastraVectorAuthSchema } from './contracts'\n\n/** Injected / real store surface (filter is opaque Record for seam compatibility). */\ntype MastraStore = {\n\tupsert: (input: {\n\t\tindexName: string\n\t\tids: string[]\n\t\tvectors: number[][]\n\t\tmetadata: Array<Record<string, unknown>>\n\t}) => Promise<unknown>\n\tquery: (input: {\n\t\tindexName: string\n\t\tqueryVector: number[]\n\t\ttopK?: number\n\t\tincludeVector?: boolean\n\t\tfilter?: Record<string, unknown>\n\t}) => Promise<Array<{ id?: string; score?: number; metadata?: unknown; vector?: number[] }>>\n\tdeleteVectors: (input: { indexName: string; ids: string[] }) => Promise<unknown>\n\tcreateIndex: (input: { indexName: string; dimension: number }) => Promise<unknown>\n\tdisconnect?: () => Promise<void>\n}\n\ntype PgQueryArgs = Parameters<PgVector['query']>[0]\n\n/** Narrow a built arg bag to PgVector query params (Mongo-style filter is structural). */\nfunction isPgQueryArgs(value: unknown): value is PgQueryArgs {\n\treturn (\n\t\tisPlainObject(value) &&\n\t\tisString(value['indexName']) &&\n\t\tvalue['indexName'].length > 0 &&\n\t\tArray.isArray(value['queryVector'])\n\t)\n}\n\nexport type MastraVectorClientOptions = {\n\t/**\n\t * Test injection — production uses PgVector.\n\t * Must implement the same method names as PgVector for upsert/query/deleteVectors/createIndex.\n\t */\n\tstore?: MastraStore\n}\n\nexport class MastraVectorClient {\n\treadonly #store: MastraStore\n\treadonly #defaultIndex: string | undefined\n\treadonly #defaultFilter: VectorDefaultFilter | undefined\n\treadonly #dimension: number | undefined\n\treadonly #autoCreateIndex: boolean\n\treadonly #ownsStore: boolean\n\n\tconstructor(auth: MastraVectorAuth, options: MastraVectorClientOptions = {}) {\n\t\tconst parsed = mastraVectorAuthSchema.safeParse(auth)\n\t\tif (!parsed.success) {\n\t\t\tthrow new ToolError('Invalid Mastra vector auth credentials', {\n\t\t\t\tcode: 'bad_auth',\n\t\t\t\tdetails: { issues: parsed.error.issues.map((issue) => issue.message) }\n\t\t\t})\n\t\t}\n\t\tconst data = parsed.data\n\t\tthis.#defaultIndex = data.default_index\n\t\tthis.#defaultFilter = data.default_filter\n\t\tthis.#dimension = data.dimension\n\t\tthis.#autoCreateIndex = data.auto_create_index === true\n\n\t\tif (options.store) {\n\t\t\tthis.#store = options.store\n\t\t\tthis.#ownsStore = false\n\t\t\treturn\n\t\t}\n\n\t\tconst config: {\n\t\t\tconnectionString: string\n\t\t\tid: string\n\t\t\tschemaName?: string\n\t\t\tdisableInit?: boolean\n\t\t} = {\n\t\t\tconnectionString: data.connection_string,\n\t\t\tid: data.id\n\t\t}\n\t\tif (data.schema_name) config.schemaName = data.schema_name\n\t\tif (data.disable_init === true) config.disableInit = true\n\n\t\tconst pg = new PgVector(config)\n\t\t// Adapt PgVector to opaque Record filters (Mongo-style / flat equality is native).\n\t\tthis.#store = {\n\t\t\tupsert: (input) =>\n\t\t\t\tpg.upsert({\n\t\t\t\t\tindexName: input.indexName,\n\t\t\t\t\tids: input.ids,\n\t\t\t\t\tvectors: input.vectors,\n\t\t\t\t\tmetadata: input.metadata\n\t\t\t\t}),\n\t\t\tquery: (input) => {\n\t\t\t\tconst args: Record<string, unknown> = {\n\t\t\t\t\tindexName: input.indexName,\n\t\t\t\t\tqueryVector: input.queryVector,\n\t\t\t\t\t...(input.topK !== undefined && { topK: input.topK }),\n\t\t\t\t\t...(input.includeVector !== undefined && { includeVector: input.includeVector }),\n\t\t\t\t\t...(input.filter !== undefined && { filter: input.filter })\n\t\t\t\t}\n\t\t\t\tif (!isPgQueryArgs(args)) {\n\t\t\t\t\tthrow new ToolError('Invalid Mastra vector query args', { code: 'internal' })\n\t\t\t\t}\n\t\t\t\treturn pg.query(args)\n\t\t\t},\n\t\t\tdeleteVectors: (input) => pg.deleteVectors({ indexName: input.indexName, ids: input.ids }),\n\t\t\tcreateIndex: (input) => pg.createIndex({ indexName: input.indexName, dimension: input.dimension }),\n\t\t\tdisconnect: () => pg.disconnect()\n\t\t}\n\t\tthis.#ownsStore = true\n\t}\n\n\tstatic fromContext(ctx: ToolContext): MastraVectorClient {\n\t\tconst auth = requireAuth(ctx, mastraVectorAuthSchema)\n\t\treturn new MastraVectorClient(auth)\n\t}\n\n\tasync upsert(input: UpsertVectorsInput): Promise<UpsertVectorsOutput> {\n\t\tconst indexName = requireCollection(input.collection, this.#defaultIndex, 'Mastra vector upsert')\n\t\tawait this.#ensureIndex(indexName, input.vectors[0]?.values.length)\n\n\t\tawait this.#store.upsert({\n\t\t\tindexName,\n\t\t\tids: input.vectors.map((point) => point.id),\n\t\t\tvectors: input.vectors.map((point) => point.values),\n\t\t\tmetadata: input.vectors.map((point) => stampDefaultFilterMetadata(point.metadata, this.#defaultFilter) ?? {})\n\t\t})\n\t\treturn { upserted: input.vectors.length, collection: indexName }\n\t}\n\n\tasync query(input: QueryVectorsInput): Promise<QueryVectorsOutput> {\n\t\tconst indexName = requireCollection(input.collection, this.#defaultIndex, 'Mastra vector query')\n\t\tconst topK = input.top_k ?? 8\n\t\tconst includeVector = input.include_values === true\n\t\tconst filter = mergeVectorFilter(this.#defaultFilter, input.filter)\n\n\t\tconst rows = await this.#store.query({\n\t\t\tindexName,\n\t\t\tqueryVector: input.vector,\n\t\t\ttopK,\n\t\t\tincludeVector,\n\t\t\t...(filter && { filter })\n\t\t})\n\n\t\tconst includeMetadata = input.include_metadata !== false\n\t\tconst matches: VectorMatch[] = []\n\t\tfor (const row of rows) {\n\t\t\tif (!isString(row.id) || row.id.length === 0) continue\n\t\t\tconst score = isNumber(row.score) ? row.score : 0\n\t\t\tconst match: VectorMatch = { id: row.id, score }\n\t\t\tif (includeMetadata && row.metadata !== undefined) {\n\t\t\t\tconst meta = parseMetadata(row.metadata)\n\t\t\t\tif (meta) match.metadata = meta\n\t\t\t}\n\t\t\tif (includeVector && Array.isArray(row.vector)) {\n\t\t\t\tconst values = row.vector.filter((n): n is number => isNumber(n) && Number.isFinite(n))\n\t\t\t\tif (values.length === row.vector.length) match.values = values\n\t\t\t}\n\t\t\tmatches.push(match)\n\t\t}\n\t\treturn { matches, collection: indexName }\n\t}\n\n\tasync delete(input: DeleteVectorsInput): Promise<DeleteVectorsOutput> {\n\t\tconst indexName = requireCollection(input.collection, this.#defaultIndex, 'Mastra vector delete')\n\t\tawait this.#store.deleteVectors({ indexName, ids: input.ids })\n\t\treturn { deleted: input.ids.length, collection: indexName }\n\t}\n\n\tasync disconnect(): Promise<void> {\n\t\tif (this.#ownsStore && this.#store.disconnect) {\n\t\t\tawait this.#store.disconnect()\n\t\t}\n\t}\n\n\tasync #ensureIndex(indexName: string, inferredDimension: number | undefined): Promise<void> {\n\t\tif (!this.#autoCreateIndex) return\n\t\tconst dimension = this.#dimension ?? inferredDimension\n\t\tif (dimension === undefined) {\n\t\t\tthrow new ToolError('Mastra auto_create_index requires dimension on auth or non-empty vectors', {\n\t\t\t\tcode: 'bad_input'\n\t\t\t})\n\t\t}\n\t\ttry {\n\t\t\tawait this.#store.createIndex({ indexName, dimension })\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : String(error)\n\t\t\tif (/already exists|duplicate|exist/i.test(message)) return\n\t\t\tthrow new ToolError(`Mastra createIndex failed: ${message}`, {\n\t\t\t\tcode: 'upstream',\n\t\t\t\tcause: error\n\t\t\t})\n\t\t}\n\t}\n}\n","import { defineModule, defineTool } from '../../core/define'\nimport { MastraVectorClient } from './client'\nimport {\n\tdeleteVectorsInputSchema,\n\tdeleteVectorsOutputSchema,\n\tmastraVectorAuthSchema,\n\tqueryVectorsInputSchema,\n\tqueryVectorsOutputSchema,\n\tupsertVectorsInputSchema,\n\tupsertVectorsOutputSchema\n} from './contracts'\n\nexport const mastraVectorUpsertTool = defineTool({\n\tid: 'mastra-vector-upsert',\n\tname: 'mastraVectorUpsert',\n\tdescription: 'Upsert vectors into a Mastra PgVector index. collection maps to indexName.',\n\tinputSchema: upsertVectorsInputSchema,\n\toutputSchema: upsertVectorsOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'node',\n\texecute: async (input, ctx) => MastraVectorClient.fromContext(ctx).upsert(input)\n})\n\nexport const mastraVectorQueryTool = defineTool({\n\tid: 'mastra-vector-query',\n\tname: 'mastraVectorQuery',\n\tdescription: 'Nearest-neighbor query against a Mastra PgVector index.',\n\tinputSchema: queryVectorsInputSchema,\n\toutputSchema: queryVectorsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'node',\n\texecute: async (input, ctx) => MastraVectorClient.fromContext(ctx).query(input)\n})\n\nexport const mastraVectorDeleteTool = defineTool({\n\tid: 'mastra-vector-delete',\n\tname: 'mastraVectorDelete',\n\tdescription: 'Delete vectors by id from a Mastra PgVector index.',\n\tinputSchema: deleteVectorsInputSchema,\n\toutputSchema: deleteVectorsOutputSchema,\n\tsideEffect: 'delete',\n\truntime: 'node',\n\texecute: async (input, ctx) => MastraVectorClient.fromContext(ctx).delete(input)\n})\n\nexport const mastraVectorModule = defineModule({\n\tid: 'mastra-vector',\n\ttitle: 'Mastra Vector',\n\tdescription:\n\t\t'Mastra PgVector over Postgres: upsert, query, and delete vectors. Index names map from collection. Node runtime.',\n\truntime: 'node',\n\tauth: { type: 'custom', schema: mastraVectorAuthSchema },\n\tcategories: ['ai', 'vector'],\n\tclassification: 'pii',\n\ttags: ['pgvector', 'mastra'],\n\ttools: [mastraVectorUpsertTool, mastraVectorQueryTool, mastraVectorDeleteTool]\n})\n"],"mappings":";;;;;;;;;;;;AAkCA,MAAa,yBAAyB,EAAE,OAAO;CAC9C,mBAAmB,EACjB,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,SAAS,uEAAuE;CAClF,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,gEAAgE;CAC/F,aAAa,EACX,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,SAAS,CAAC,CACV,SAAS,0EAA0E;CACrF,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,qDAAqD;CAC1G,WAAW,EACT,OAAO,CAAC,CACR,IAAI,CAAC,CACL,SAAS,CAAC,CACV,SAAS,CAAC,CACV,SAAS,8DAA8D;CACzE,mBAAmB,EACjB,QAAQ,CAAC,CACT,SAAS,CAAC,CACV,SAAS,oEAAoE;CAC/E,cAAc,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,4DAA4D;CAC1G,gBA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KAAKH,OAAO,YAAY;IAAE;IAAW;GAAU,CAAC;EACvD,SAAS,OAAO;GACf,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GACrE,IAAI,kCAAkC,KAAK,OAAO,GAAG;GACrD,MAAM,IAAI,UAAU,8BAA8B,WAAW;IAC5D,MAAM;IACN,OAAO;GACR,CAAC;EACF;CACD;AACD;;;AC9MA,MAAa,yBAAyB,WAAW;CAChD,IAAI;CACJ,MAAM;CACN,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,mBAAmB,YAAY,GAAG,CAAC,CAAC,OAAO,KAAK;AAChF,CAAC;AAED,MAAa,wBAAwB,WAAW;CAC/C,IAAI;CACJ,MAAM;CACN,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,mBAAmB,YAAY,GAAG,CAAC,CAAC,MAAM,KAAK;AAC/E,CAAC;AAED,MAAa,yBAAyB,WAAW;CAChD,IAAI;CACJ,MAAM;CACN,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,mBAAmB,YAAY,GAAG,CAAC,CAAC,OAAO,KAAK;AAChF,CAAC;AAED,MAAa,qBAAqB,aAAa;CAC9C,IAAI;CACJ,OAAO;CACP,aACC;CACD,SAAS;CACT,MAAM;EAAE,MAAM;EAAU,QAAQ;CAAuB;CACvD,YAAY,CAAC,MAAM,QAAQ;CAC3B,gBAAgB;CAChB,MAAM,CAAC,YAAY,QAAQ;CAC3B,OAAO;EAAC;EAAwB;EAAuB;CAAsB;AAC9E,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { t as ToolError } from "../../errors-DoSpNHvs.js";
2
- import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
2
+ import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
3
3
  import { n as requireAuth } from "../../provider-CgDAlg6K.js";
4
4
  import { n as findArtifactRefs, t as artifactRefSchema } from "../../artifact-D064mHfK.js";
5
5
  import { n as bytesToBase64, o as utf8ToBytes, r as bytesToUtf8, t as base64ToBytes } from "../../bytes-BxpimpQx.js";
6
- import { _ as MAX_OBJECT_BYTES, m as s3AuthSchema, p as S3Client } from "../../s3-CsOaPWMP.js";
7
- import { r as mediaTypeFromPath } from "../../content-type-CORxaxcv.js";
6
+ import { _ as MAX_OBJECT_BYTES, m as s3AuthSchema, p as S3Client } from "../../s3-Dj7Teh-A.js";
7
+ import { r as mediaTypeFromPath } from "../../content-type-E4_Qdoa0.js";
8
8
  import { isFunction } from "es-toolkit";
9
9
  import { z } from "zod";
10
10
  //#region src/modules/artifacts/contracts.ts
@@ -1,9 +1,9 @@
1
1
  import { t as ToolError } from "../../errors-DoSpNHvs.js";
2
- import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
2
+ import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
3
3
  import { n as requireAuth } from "../../provider-CgDAlg6K.js";
4
4
  import { t as artifactRefSchema } from "../../artifact-D064mHfK.js";
5
- import { a as BedrockAgentCoreBrowserClient, c as browserSessionIdInputSchema, d as browserStreamSchema, l as browserSessionOutputSchema, s as bedrockAgentCoreBrowserAuthSchema, u as browserStartSessionInputSchema } from "../../bedrock-agentcore-browser-a_qOs-NR.js";
6
- import { c as CloudflareBrowserClient, l as plainTextFromHtml, p as cloudflareBrowserClientAuthSchema } from "../../cloudflare-browser-B6Yolpin.js";
5
+ import { a as BedrockAgentCoreBrowserClient, c as browserSessionIdInputSchema, d as browserStreamSchema, l as browserSessionOutputSchema, s as bedrockAgentCoreBrowserAuthSchema, u as browserStartSessionInputSchema } from "../../bedrock-agentcore-browser-o_oqSPMK.js";
6
+ import { c as CloudflareBrowserClient, l as plainTextFromHtml, p as cloudflareBrowserClientAuthSchema } from "../../cloudflare-browser-nLJdH5nG.js";
7
7
  import { z } from "zod";
8
8
  //#region src/modules/browser/contracts.ts
9
9
  const agentCoreBrowserSeamAuthSchema = bedrockAgentCoreBrowserAuthSchema.extend({ provider: z.literal("bedrock-agentcore") });
@@ -1,5 +1,5 @@
1
1
  import { t as ToolError } from "../../errors-DoSpNHvs.js";
2
- import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
2
+ import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
3
3
  import { z } from "zod";
4
4
  import ICAL from "ical.js";
5
5
  //#region src/modules/calendar/contracts.ts
@@ -1,7 +1,7 @@
1
- import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
1
+ import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
2
2
  import { n as requireAuth } from "../../provider-CgDAlg6K.js";
3
- import { _ as MAX_COMMAND_CHARS, g as MAX_CODE_CHARS, m as BedrockAgentCoreCodeInterpreterClient, x as bedrockAgentCoreCodeInterpreterAuthSchema, y as MAX_FILE_TEXT } from "../../bedrock-agentcore-code-interpreter-MWK-8RhA.js";
4
- import { F as cloudflareSandboxAuthSchema, v as CloudflareSandboxClient } from "../../cloudflare-sandbox-Dp_uNaqW.js";
3
+ import { _ as MAX_COMMAND_CHARS, g as MAX_CODE_CHARS, m as BedrockAgentCoreCodeInterpreterClient, x as bedrockAgentCoreCodeInterpreterAuthSchema, y as MAX_FILE_TEXT } from "../../bedrock-agentcore-code-interpreter-D4ERRFj1.js";
4
+ import { F as cloudflareSandboxAuthSchema, v as CloudflareSandboxClient } from "../../cloudflare-sandbox-Be7SeS4-.js";
5
5
  import { isPlainObject, isString } from "es-toolkit";
6
6
  import { z } from "zod";
7
7
  //#region src/modules/code-sandbox/contracts.ts
@@ -1,5 +1,5 @@
1
- import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
2
- import { n as extensionFromMediaType, r as mediaTypeFromPath, t as allExtensionsFromMediaType } from "../../content-type-CORxaxcv.js";
1
+ import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
2
+ import { n as extensionFromMediaType, r as mediaTypeFromPath, t as allExtensionsFromMediaType } from "../../content-type-E4_Qdoa0.js";
3
3
  import { z } from "zod";
4
4
  //#region src/modules/content-type/module.ts
5
5
  const getTypeInput = z.object({ path: z.string().min(1).describe("File path, filename, or extension (with or without leading dot), for example report.pdf or pdf") });
@@ -1,5 +1,5 @@
1
1
  import { t as ToolError } from "../../errors-DoSpNHvs.js";
2
- import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
2
+ import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
3
3
  import { n as requireAuth } from "../../provider-CgDAlg6K.js";
4
4
  import { a as toArrayBuffer, n as bytesToBase64, o as utf8ToBytes, t as base64ToBytes } from "../../bytes-BxpimpQx.js";
5
5
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
- import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
1
+ import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
2
2
  import { n as requireAuth } from "../../provider-CgDAlg6K.js";
3
- import { S as textractStatusInputSchema, _ as textractExtractResultSchema, a as TextractClient, b as textractExtractTextInputSchema, f as MAX_INLINE_EXTRACT_CHARS, h as textractAuthSchema, u as MAX_BATCH_EXTRACT, v as textractExtractTextBatchInputSchema, x as textractOutputModeSchema, y as textractExtractTextBatchOutputSchema } from "../../textract-CPLiB22H.js";
3
+ import { S as textractStatusInputSchema, _ as textractExtractResultSchema, a as TextractClient, b as textractExtractTextInputSchema, f as MAX_INLINE_EXTRACT_CHARS, h as textractAuthSchema, u as MAX_BATCH_EXTRACT, v as textractExtractTextBatchInputSchema, x as textractOutputModeSchema, y as textractExtractTextBatchOutputSchema } from "../../textract-CAfnGvua.js";
4
4
  import { z } from "zod";
5
5
  //#region src/modules/document-extract/contracts.ts
6
6
  /** Host auth: vendor credentials + provider discriminator. */
@@ -1,23 +1,8 @@
1
1
  import { a as ModuleDefinition, o as ToolContext, s as ToolDefinition } from "../../types-Ccb0DXY9.js";
2
2
  import "../../index-CZX5OeOF.js";
3
- import "../../index-9oSRRNdR.js";
4
3
  import { z } from "zod";
5
4
  //#region src/modules/document-render/contracts.d.ts
6
5
  declare const documentRenderAuthSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
- gotenberg_base_url: z.ZodURL;
8
- gotenberg_api_username: z.ZodOptional<z.ZodString>;
9
- gotenberg_api_password: z.ZodOptional<z.ZodString>;
10
- storage: z.ZodObject<{
11
- access_key_id: z.ZodString;
12
- secret_access_key: z.ZodString;
13
- region: z.ZodString;
14
- bucket: z.ZodString;
15
- endpoint: z.ZodOptional<z.ZodURL>;
16
- session_token: z.ZodOptional<z.ZodString>;
17
- key_prefix: z.ZodOptional<z.ZodString>;
18
- }, z.core.$strip>;
19
- provider: z.ZodLiteral<"gotenberg">;
20
- }, z.core.$strip>, z.ZodObject<{
21
6
  account_id: z.ZodString;
22
7
  api_token: z.ZodString;
23
8
  browser: z.ZodOptional<z.ZodEnum<{
@@ -36,7 +21,7 @@ declare const documentRenderAuthSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
36
21
  provider: z.ZodLiteral<"cloudflare-browser">;
37
22
  }, z.core.$strip>], "provider">;
38
23
  type DocumentRenderAuth = z.infer<typeof documentRenderAuthSchema>;
39
- /** Same I/O both render vendors accept (gotenberg schemas are the canonical seam shape). */
24
+ /** Capability I/O re-export Cloudflare Browser shapes under seam names. */
40
25
  declare const renderPdfInputSchema: z.ZodObject<{
41
26
  source: z.ZodObject<{
42
27
  html: z.ZodOptional<z.ZodString>;
@@ -44,6 +29,10 @@ declare const renderPdfInputSchema: z.ZodObject<{
44
29
  }, z.core.$strip>;
45
30
  output_key: z.ZodOptional<z.ZodString>;
46
31
  filename: z.ZodOptional<z.ZodString>;
32
+ browser: z.ZodOptional<z.ZodEnum<{
33
+ chromium: "chromium";
34
+ kitesurf: "kitesurf";
35
+ }>>;
47
36
  }, z.core.$strip>;
48
37
  declare const renderScreenshotInputSchema: z.ZodObject<{
49
38
  source: z.ZodObject<{
@@ -57,6 +46,10 @@ declare const renderScreenshotInputSchema: z.ZodObject<{
57
46
  height: z.ZodInt;
58
47
  device_scale_factor: z.ZodOptional<z.ZodNumber>;
59
48
  }, z.core.$strip>>;
49
+ browser: z.ZodOptional<z.ZodEnum<{
50
+ chromium: "chromium";
51
+ kitesurf: "kitesurf";
52
+ }>>;
60
53
  }, z.core.$strip>;
61
54
  declare const renderOutputSchema: z.ZodObject<{
62
55
  result: z.ZodObject<{
@@ -82,6 +75,10 @@ declare const renderPdfBatchInputSchema: z.ZodObject<{
82
75
  }, z.core.$strip>;
83
76
  output_key: z.ZodOptional<z.ZodString>;
84
77
  filename: z.ZodOptional<z.ZodString>;
78
+ browser: z.ZodOptional<z.ZodEnum<{
79
+ chromium: "chromium";
80
+ kitesurf: "kitesurf";
81
+ }>>;
85
82
  }, z.core.$strip>>;
86
83
  }, z.core.$strip>;
87
84
  declare const renderScreenshotBatchInputSchema: z.ZodObject<{
@@ -97,6 +94,10 @@ declare const renderScreenshotBatchInputSchema: z.ZodObject<{
97
94
  height: z.ZodInt;
98
95
  device_scale_factor: z.ZodOptional<z.ZodNumber>;
99
96
  }, z.core.$strip>>;
97
+ browser: z.ZodOptional<z.ZodEnum<{
98
+ chromium: "chromium";
99
+ kitesurf: "kitesurf";
100
+ }>>;
100
101
  }, z.core.$strip>>;
101
102
  }, z.core.$strip>;
102
103
  declare const renderPdfBatchOutputSchema: z.ZodObject<{
@@ -201,6 +202,7 @@ declare const documentRenderPdfTool: ToolDefinition<{
201
202
  };
202
203
  output_key?: string | undefined;
203
204
  filename?: string | undefined;
205
+ browser?: "chromium" | "kitesurf" | undefined;
204
206
  }, {
205
207
  result: {
206
208
  store: "host" | "object";
@@ -223,6 +225,7 @@ declare const documentRenderScreenshotTool: ToolDefinition<{
223
225
  height: number;
224
226
  device_scale_factor?: number | undefined;
225
227
  } | undefined;
228
+ browser?: "chromium" | "kitesurf" | undefined;
226
229
  }, {
227
230
  result: {
228
231
  store: "host" | "object";
@@ -241,6 +244,7 @@ declare const documentRenderPdfBatchTool: ToolDefinition<{
241
244
  };
242
245
  output_key?: string | undefined;
243
246
  filename?: string | undefined;
247
+ browser?: "chromium" | "kitesurf" | undefined;
244
248
  }[];
245
249
  }, {
246
250
  results: {
@@ -278,6 +282,7 @@ declare const documentRenderScreenshotBatchTool: ToolDefinition<{
278
282
  height: number;
279
283
  device_scale_factor?: number | undefined;
280
284
  } | undefined;
285
+ browser?: "chromium" | "kitesurf" | undefined;
281
286
  }[];
282
287
  }, {
283
288
  results: {
@@ -303,20 +308,6 @@ declare const documentRenderScreenshotBatchTool: ToolDefinition<{
303
308
  failed: number;
304
309
  }>;
305
310
  declare const documentRenderModule: ModuleDefinition<{
306
- gotenberg_base_url: string;
307
- gotenberg_api_username?: string | undefined;
308
- gotenberg_api_password?: string | undefined;
309
- storage: {
310
- access_key_id: string;
311
- secret_access_key: string;
312
- region: string;
313
- bucket: string;
314
- endpoint?: string | undefined;
315
- session_token?: string | undefined;
316
- key_prefix?: string | undefined;
317
- };
318
- provider: "gotenberg";
319
- } | {
320
311
  account_id: string;
321
312
  api_token: string;
322
313
  browser?: "chromium" | "kitesurf" | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/modules/document-render/contracts.ts","../../../src/modules/document-render/client.ts","../../../src/modules/document-render/module.ts"],"mappings":";;;;;cA6Ba,0BAAwB,EAAA,uBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGnC,EAAA,KAAA;KAEU,qBAAqB,EAAE,aAAa;;cAGnC,sBAAoB,EAAA;;;;;;;GAAgC,EAAA,KAAA;cACpD,6BAA2B,EAAA;;;;;;;;;;;;GAAuC,EAAA,KAAA;cAClE,oBAAkB,EAAA;;;;;;;;;;;;;;;GAA8B,EAAA,KAAA;cAEhD,2BAAyB,EAAA;;;;;;;;;GAEpC,EAAA,KAAA;cAEW,kCAAgC,EAAA;;;;;;;;;;;;;;GAE3C,EAAA,KAAA;cAEW,4BAA0B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAwC,EAAA,KAAA;cAClE,mCAAiC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAwC,EAAA,KAAA;KAE1E,iBAAiB,EAAE,aAAa;KAChC,wBAAwB,EAAE,aAAa;KACvC,eAAe,EAAE,aAAa;KAa9B;EACX,YAAY,OAAO,mBAAmB,QAAQ;EAC9C,mBAAmB,OAAO,0BAA0B,QAAQ;;;;cCzChD,gCAAgC;;EAG5C,YAAY,KAAK;SAIV,YAAY,KAAK,cAAc;SAK/B,SAAS,MAAM,oBAAoB,MAAK,cAAmB;EAIlE,UAAU,OAAO,iBAAc;;;;;;;;;;EAI/B,iBAAiB,OAAO,wBAAqB;;;;;;;;;;;;;cC/BjC,uBAAA;;;;;;;;;;;;;;;;;cAYA,8BAAA;;;;;;;;;;;;;;;;;;;;;;cAYA,4BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAeA,mCAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAeA,sBAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/modules/document-render/contracts.ts","../../../src/modules/document-render/client.ts","../../../src/modules/document-render/module.ts"],"mappings":";;;;cAmBa,0BAAwB,EAAA,uBAAA,EAAA;;;;;;;;;;;;;;;;;GAAgF,EAAA,KAAA;KAEzG,qBAAqB,EAAE,aAAa;;cAGnC,sBAAoB,EAAA;;;;;;;;;;;GAAwC,EAAA,KAAA;cAC5D,6BAA2B,EAAA;;;;;;;;;;;;;;;;GAA+C,EAAA,KAAA;cAC1E,oBAAkB,EAAA;;;;;;;;;;;;;;;GAAsC,EAAA,KAAA;cAExD,2BAAyB,EAAA;;;;;;;;;;;;;GAEpC,EAAA,KAAA;cAEW,kCAAgC,EAAA;;;;;;;;;;;;;;;;;;GAE3C,EAAA,KAAA;cAEW,4BAA0B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAwC,EAAA,KAAA;cAClE,mCAAiC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAwC,EAAA,KAAA;KAE1E,iBAAiB,EAAE,aAAa;KAChC,wBAAwB,EAAE,aAAa;KACvC,eAAe,EAAE,aAAa;KAM9B;EACX,YAAY,OAAO,mBAAmB,QAAQ;EAC9C,mBAAmB,OAAO,0BAA0B,QAAQ;;;;cCxBhD,gCAAgC;;EAG5C,YAAY,KAAK;SAIV,YAAY,KAAK,cAAc;SAK/B,SAAS,MAAM,oBAAoB,MAAK,cAAmB;EAIlE,UAAU,OAAO,iBAAc;;;;;;;;;;EAI/B,iBAAiB,OAAO,wBAAqB;;;;;;;;;;;;;cC5BjC,uBAAA;;;;;;;;;;;;;;;;;;cAYA,8BAAA;;;;;;;;;;;;;;;;;;;;;;;cAYA,4BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAeA,mCAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAeA,sBAAA"}
@@ -1,16 +1,15 @@
1
- import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
1
+ import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
2
2
  import { n as requireAuth } from "../../provider-CgDAlg6K.js";
3
3
  import { n as runBatchItems, t as batchResultSchema } from "../../batch-Co1ujeAW.js";
4
- import { c as CloudflareBrowserClient, f as cloudflareBrowserAuthSchema } from "../../cloudflare-browser-B6Yolpin.js";
5
- import { g as gotenbergRenderScreenshotInputSchema, h as gotenbergRenderPdfInputSchema, l as gotenbergAuthSchema, m as gotenbergRenderOutputSchema, o as GotenbergClient } from "../../gotenberg-NuJjxyln.js";
4
+ import { _ as cloudflareBrowserRenderScreenshotInputSchema, c as CloudflareBrowserClient, f as cloudflareBrowserAuthSchema, g as cloudflareBrowserRenderPdfInputSchema, h as cloudflareBrowserRenderOutputSchema } from "../../cloudflare-browser-nLJdH5nG.js";
6
5
  import { z } from "zod";
7
- const gotenbergDocumentRenderAuthSchema = gotenbergAuthSchema.extend({ provider: z.literal("gotenberg") });
6
+ /** Host auth: vendor credentials + provider discriminator. */
8
7
  const cloudflareBrowserDocumentRenderAuthSchema = cloudflareBrowserAuthSchema.extend({ provider: z.literal("cloudflare-browser") });
9
- const documentRenderAuthSchema = z.discriminatedUnion("provider", [gotenbergDocumentRenderAuthSchema, cloudflareBrowserDocumentRenderAuthSchema]);
10
- /** Same I/O both render vendors accept (gotenberg schemas are the canonical seam shape). */
11
- const renderPdfInputSchema = gotenbergRenderPdfInputSchema;
12
- const renderScreenshotInputSchema = gotenbergRenderScreenshotInputSchema;
13
- const renderOutputSchema = gotenbergRenderOutputSchema;
8
+ const documentRenderAuthSchema = z.discriminatedUnion("provider", [cloudflareBrowserDocumentRenderAuthSchema]);
9
+ /** Capability I/O re-export Cloudflare Browser shapes under seam names. */
10
+ const renderPdfInputSchema = cloudflareBrowserRenderPdfInputSchema;
11
+ const renderScreenshotInputSchema = cloudflareBrowserRenderScreenshotInputSchema;
12
+ const renderOutputSchema = cloudflareBrowserRenderOutputSchema;
14
13
  const renderPdfBatchInputSchema = z.object({ items: z.array(renderPdfInputSchema).min(1).max(10).describe("PDF render jobs (max 10)") });
15
14
  const renderScreenshotBatchInputSchema = z.object({ items: z.array(renderScreenshotInputSchema).min(1).max(10).describe("Screenshot jobs (max 10)") });
16
15
  const renderPdfBatchOutputSchema = batchResultSchema(renderOutputSchema);
@@ -31,24 +30,9 @@ var CloudflareBrowserDocumentRenderProvider = class {
31
30
  }
32
31
  };
33
32
  //#endregion
34
- //#region src/modules/document-render/providers/gotenberg.ts
35
- var GotenbergDocumentRenderProvider = class {
36
- #client;
37
- constructor(auth, options = {}) {
38
- const { provider: _p, ...vendorAuth } = auth;
39
- this.#client = new GotenbergClient(vendorAuth, options);
40
- }
41
- renderPdf(input) {
42
- return this.#client.renderPdf(input);
43
- }
44
- renderScreenshot(input) {
45
- return this.#client.renderScreenshot(input);
46
- }
47
- };
48
- //#endregion
49
33
  //#region src/modules/document-render/client.ts
50
34
  /**
51
- * Document-render seam client — picks gotenberg / cloudflare-browser from host auth.
35
+ * Document-render seam client — picks cloudflare-browser from host auth.
52
36
  */
53
37
  function transportOptions(ctx) {
54
38
  return {
@@ -59,7 +43,6 @@ function transportOptions(ctx) {
59
43
  function providerFor(auth, ctx) {
60
44
  const options = transportOptions(ctx);
61
45
  switch (auth.provider) {
62
- case "gotenberg": return new GotenbergDocumentRenderProvider(auth, options);
63
46
  case "cloudflare-browser": return new CloudflareBrowserDocumentRenderProvider(auth, options);
64
47
  }
65
48
  }
@@ -87,7 +70,7 @@ var DocumentRenderClient = class DocumentRenderClient {
87
70
  const documentRenderPdfTool = defineTool({
88
71
  id: "document-render-pdf",
89
72
  name: "renderDocumentPdf",
90
- description: "Create a PDF from HTML or a URL with a browser print engine and return the final ArtifactRef. Use for web layouts, reports, and invoices. Use file-convert for an existing office document; do not use a general code sandbox to print HTML.",
73
+ description: "Create a PDF from HTML or a URL with a browser print engine and return the final ArtifactRef. Use for web layouts, reports, and invoices. Do not use a general code sandbox to print HTML.",
91
74
  inputSchema: renderPdfInputSchema,
92
75
  outputSchema: renderOutputSchema,
93
76
  sideEffect: "write",
@@ -133,7 +116,7 @@ const documentRenderScreenshotBatchTool = defineTool({
133
116
  const documentRenderModule = defineModule({
134
117
  id: "document-render",
135
118
  title: "Document Render",
136
- description: "Create final PDF or PNG ArtifactRefs from HTML or URLs with a browser renderer. Use file conversion for existing office documents.",
119
+ description: "Create final PDF or PNG ArtifactRefs from HTML or URLs with a browser renderer.",
137
120
  runtime: "both",
138
121
  auth: {
139
122
  type: "custom",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["#client","#client","#ops"],"sources":["../../../src/modules/document-render/contracts.ts","../../../src/modules/document-render/providers/cloudflare-browser.ts","../../../src/modules/document-render/providers/gotenberg.ts","../../../src/modules/document-render/client.ts","../../../src/modules/document-render/module.ts"],"sourcesContent":["import { z } from 'zod'\n\nimport { batchResultSchema } from '../../shared/batch'\nimport {\n\tcloudflareBrowserAuthSchema,\n\tcloudflareBrowserRenderOutputSchema,\n\tcloudflareBrowserRenderPdfInputSchema,\n\tcloudflareBrowserRenderScreenshotInputSchema\n} from '../../vendors/cloudflare-browser'\nimport {\n\tgotenbergAuthSchema,\n\tgotenbergRenderOutputSchema,\n\tgotenbergRenderPdfInputSchema,\n\tgotenbergRenderScreenshotInputSchema\n} from '../../vendors/gotenberg'\n\nexport const MAX_BATCH_RENDER = 10\n\nexport const gotenbergDocumentRenderAuthSchema = gotenbergAuthSchema.extend({\n\tprovider: z.literal('gotenberg')\n})\n\nexport const cloudflareBrowserDocumentRenderAuthSchema = cloudflareBrowserAuthSchema.extend({\n\tprovider: z.literal('cloudflare-browser')\n})\n\nexport type GotenbergDocumentRenderAuth = z.infer<typeof gotenbergDocumentRenderAuthSchema>\nexport type CloudflareBrowserDocumentRenderAuth = z.infer<typeof cloudflareBrowserDocumentRenderAuthSchema>\n\nexport const documentRenderAuthSchema = z.discriminatedUnion('provider', [\n\tgotenbergDocumentRenderAuthSchema,\n\tcloudflareBrowserDocumentRenderAuthSchema\n])\n\nexport type DocumentRenderAuth = z.infer<typeof documentRenderAuthSchema>\n\n/** Same I/O both render vendors accept (gotenberg schemas are the canonical seam shape). */\nexport const renderPdfInputSchema = gotenbergRenderPdfInputSchema\nexport const renderScreenshotInputSchema = gotenbergRenderScreenshotInputSchema\nexport const renderOutputSchema = gotenbergRenderOutputSchema\n\nexport const renderPdfBatchInputSchema = z.object({\n\titems: z.array(renderPdfInputSchema).min(1).max(MAX_BATCH_RENDER).describe('PDF render jobs (max 10)')\n})\n\nexport const renderScreenshotBatchInputSchema = z.object({\n\titems: z.array(renderScreenshotInputSchema).min(1).max(MAX_BATCH_RENDER).describe('Screenshot jobs (max 10)')\n})\n\nexport const renderPdfBatchOutputSchema = batchResultSchema(renderOutputSchema)\nexport const renderScreenshotBatchOutputSchema = batchResultSchema(renderOutputSchema)\n\nexport type RenderPdfInput = z.infer<typeof renderPdfInputSchema>\nexport type RenderScreenshotInput = z.infer<typeof renderScreenshotInputSchema>\nexport type RenderOutput = z.infer<typeof renderOutputSchema>\nexport type RenderPdfBatchInput = z.infer<typeof renderPdfBatchInputSchema>\nexport type RenderScreenshotBatchInput = z.infer<typeof renderScreenshotBatchInputSchema>\nexport type RenderPdfBatchOutput = z.infer<typeof renderPdfBatchOutputSchema>\nexport type RenderScreenshotBatchOutput = z.infer<typeof renderScreenshotBatchOutputSchema>\n\n// Re-export cloudflare schemas for type identity checks if needed\nexport {\n\tcloudflareBrowserRenderPdfInputSchema,\n\tcloudflareBrowserRenderScreenshotInputSchema,\n\tcloudflareBrowserRenderOutputSchema\n}\n\nexport type DocumentRenderOps = {\n\trenderPdf: (input: RenderPdfInput) => Promise<RenderOutput>\n\trenderScreenshot: (input: RenderScreenshotInput) => Promise<RenderOutput>\n}\n","/**\n * Cloudflare Browser provider for the document-render seam. Wraps `CloudflareBrowserClient`.\n */\n\nimport type { HttpServiceOptions } from '../../../transport/http-service'\nimport { CloudflareBrowserClient } from '../../../vendors/cloudflare-browser'\nimport type {\n\tCloudflareBrowserDocumentRenderAuth,\n\tDocumentRenderOps,\n\tRenderPdfInput,\n\tRenderScreenshotInput\n} from '../contracts'\n\nexport type CloudflareBrowserDocumentRenderProviderOptions = Pick<HttpServiceOptions, 'fetch' | 'signal'>\n\nexport class CloudflareBrowserDocumentRenderProvider implements DocumentRenderOps {\n\treadonly #client: CloudflareBrowserClient\n\n\tconstructor(auth: CloudflareBrowserDocumentRenderAuth, options: CloudflareBrowserDocumentRenderProviderOptions = {}) {\n\t\tconst { provider: _p, ...vendorAuth } = auth\n\t\tthis.#client = new CloudflareBrowserClient(vendorAuth, options)\n\t}\n\n\trenderPdf(input: RenderPdfInput) {\n\t\treturn this.#client.renderPdf(input)\n\t}\n\n\trenderScreenshot(input: RenderScreenshotInput) {\n\t\treturn this.#client.renderScreenshot(input)\n\t}\n}\n","/**\n * Gotenberg provider for the document-render seam. Wraps `GotenbergClient`.\n */\n\nimport type { HttpServiceOptions } from '../../../transport/http-service'\nimport { GotenbergClient } from '../../../vendors/gotenberg'\nimport type {\n\tDocumentRenderOps,\n\tGotenbergDocumentRenderAuth,\n\tRenderPdfInput,\n\tRenderScreenshotInput\n} from '../contracts'\n\nexport type GotenbergDocumentRenderProviderOptions = Pick<HttpServiceOptions, 'fetch' | 'signal'>\n\nexport class GotenbergDocumentRenderProvider implements DocumentRenderOps {\n\treadonly #client: GotenbergClient\n\n\tconstructor(auth: GotenbergDocumentRenderAuth, options: GotenbergDocumentRenderProviderOptions = {}) {\n\t\tconst { provider: _p, ...vendorAuth } = auth\n\t\tthis.#client = new GotenbergClient(vendorAuth, options)\n\t}\n\n\trenderPdf(input: RenderPdfInput) {\n\t\treturn this.#client.renderPdf(input)\n\t}\n\n\trenderScreenshot(input: RenderScreenshotInput) {\n\t\treturn this.#client.renderScreenshot(input)\n\t}\n}\n","/**\n * Document-render seam client — picks gotenberg / cloudflare-browser from host auth.\n */\n\nimport { requireAuth } from '../../core/provider'\nimport type { ToolContext } from '../../core/types'\nimport { documentRenderAuthSchema } from './contracts'\nimport type { DocumentRenderAuth, DocumentRenderOps, RenderPdfInput, RenderScreenshotInput } from './contracts'\nimport { CloudflareBrowserDocumentRenderProvider } from './providers/cloudflare-browser'\nimport { GotenbergDocumentRenderProvider } from './providers/gotenberg'\n\nfunction transportOptions(ctx: ToolContext) {\n\treturn {\n\t\t...(ctx.fetch && { fetch: ctx.fetch }),\n\t\t...(ctx.signal && { signal: ctx.signal })\n\t}\n}\n\nfunction providerFor(auth: DocumentRenderAuth, ctx: ToolContext): DocumentRenderOps {\n\tconst options = transportOptions(ctx)\n\tswitch (auth.provider) {\n\t\tcase 'gotenberg':\n\t\t\treturn new GotenbergDocumentRenderProvider(auth, options)\n\t\tcase 'cloudflare-browser':\n\t\t\treturn new CloudflareBrowserDocumentRenderProvider(auth, options)\n\t}\n}\n\nexport class DocumentRenderClient implements DocumentRenderOps {\n\treadonly #ops: DocumentRenderOps\n\n\tconstructor(ops: DocumentRenderOps) {\n\t\tthis.#ops = ops\n\t}\n\n\tstatic fromContext(ctx: ToolContext): DocumentRenderClient {\n\t\tconst auth = requireAuth(ctx, documentRenderAuthSchema)\n\t\treturn new DocumentRenderClient(providerFor(auth, ctx))\n\t}\n\n\tstatic fromAuth(auth: DocumentRenderAuth, ctx: ToolContext = {}): DocumentRenderClient {\n\t\treturn new DocumentRenderClient(providerFor(auth, ctx))\n\t}\n\n\trenderPdf(input: RenderPdfInput) {\n\t\treturn this.#ops.renderPdf(input)\n\t}\n\n\trenderScreenshot(input: RenderScreenshotInput) {\n\t\treturn this.#ops.renderScreenshot(input)\n\t}\n}\n","import { defineModule, defineTool } from '../../core/define'\nimport { runBatchItems } from '../../shared/batch'\nimport { DocumentRenderClient } from './client'\nimport {\n\tdocumentRenderAuthSchema,\n\trenderOutputSchema,\n\trenderPdfBatchInputSchema,\n\trenderPdfBatchOutputSchema,\n\trenderPdfInputSchema,\n\trenderScreenshotBatchInputSchema,\n\trenderScreenshotBatchOutputSchema,\n\trenderScreenshotInputSchema\n} from './contracts'\n\nexport type { DocumentRenderAuth } from './contracts'\nexport { documentRenderAuthSchema }\n\nexport const documentRenderPdfTool = defineTool({\n\tid: 'document-render-pdf',\n\tname: 'renderDocumentPdf',\n\tdescription:\n\t\t'Create a PDF from HTML or a URL with a browser print engine and return the final ArtifactRef. Use for web layouts, reports, and invoices. Use file-convert for an existing office document; do not use a general code sandbox to print HTML.',\n\tinputSchema: renderPdfInputSchema,\n\toutputSchema: renderOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => DocumentRenderClient.fromContext(ctx).renderPdf(input)\n})\n\nexport const documentRenderScreenshotTool = defineTool({\n\tid: 'document-render-screenshot',\n\tname: 'renderDocumentScreenshot',\n\tdescription:\n\t\t'Create a PNG screenshot ArtifactRef from HTML or a URL. Use when the requested deliverable is a rendered page image, not when interactive browsing or a source image transform is required.',\n\tinputSchema: renderScreenshotInputSchema,\n\toutputSchema: renderOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => DocumentRenderClient.fromContext(ctx).renderScreenshot(input)\n})\n\nexport const documentRenderPdfBatchTool = defineTool({\n\tid: 'document-render-pdf-batch',\n\tname: 'renderDocumentPdfBatch',\n\tdescription:\n\t\t'Create PDF ArtifactRefs from up to 10 HTML or URL sources. Use only when multiple independent browser-printed PDFs are required. Returns per-item success or error without aborting the batch.',\n\tinputSchema: renderPdfBatchInputSchema,\n\toutputSchema: renderPdfBatchOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => {\n\t\tconst client = DocumentRenderClient.fromContext(ctx)\n\t\treturn runBatchItems(input.items, async (item) => client.renderPdf(item))\n\t}\n})\n\nexport const documentRenderScreenshotBatchTool = defineTool({\n\tid: 'document-render-screenshot-batch',\n\tname: 'renderDocumentScreenshotBatch',\n\tdescription:\n\t\t'Create PNG screenshot ArtifactRefs from up to 10 HTML or URL sources. Use only when multiple independent page images are required. Returns per-item success or error without aborting the batch.',\n\tinputSchema: renderScreenshotBatchInputSchema,\n\toutputSchema: renderScreenshotBatchOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => {\n\t\tconst client = DocumentRenderClient.fromContext(ctx)\n\t\treturn runBatchItems(input.items, async (item) => client.renderScreenshot(item))\n\t}\n})\n\nexport const documentRenderModule = defineModule({\n\tid: 'document-render',\n\ttitle: 'Document Render',\n\tdescription:\n\t\t'Create final PDF or PNG ArtifactRefs from HTML or URLs with a browser renderer. Use file conversion for existing office documents.',\n\truntime: 'both',\n\tauth: { type: 'custom', schema: documentRenderAuthSchema },\n\tcategories: ['documents', 'render'],\n\tclassification: 'standard',\n\ttags: ['pdf', 'screenshot'],\n\ttools: [\n\t\tdocumentRenderPdfTool,\n\t\tdocumentRenderScreenshotT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,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,qBAAqB,YAAY,GAAG,CAAC,CAAC,iBAAiB,KAAK;AAC5F,CAAC;AAED,MAAa,6BAA6B,WAAW;CACpD,IAAI;CACJ,MAAM;CACN,aACC;CACD,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ;EAC9B,MAAM,SAAS,qBAAqB,YAAY,GAAG;EACnD,OAAO,cAAc,MAAM,OAAO,OAAO,SAAS,OAAO,UAAU,IAAI,CAAC;CACzE;AACD,CAAC;AAED,MAAa,oCAAoC,WAAW;CAC3D,IAAI;CACJ,MAAM;CACN,aACC;CACD,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ;EAC9B,MAAM,SAAS,qBAAqB,YAAY,GAAG;EACnD,OAAO,cAAc,MAAM,OAAO,OAAO,SAAS,OAAO,iBAAiB,IAAI,CAAC;CAChF;AACD,CAAC;AAED,MAAa,uBAAuB,aAAa;CAChD,IAAI;CACJ,OAAO;CACP,aACC;CACD,SAAS;CACT,MAAM;EAAE,MAAM;EAAU,QAAQ;CAAyB;CACzD,YAAY,CAAC,aAAa,QAAQ;CAClC,gBAAgB;CAChB,MAAM,CAAC,OAAO,YAAY;CAC1B,OAAO;EACN;EACA;EACA;EACA;CACD;AACD,CAAC"}
1
+ {"version":3,"file":"index.js","names":["#client","#ops"],"sources":["../../../src/modules/document-render/contracts.ts","../../../src/modules/document-render/providers/cloudflare-browser.ts","../../../src/modules/document-render/client.ts","../../../src/modules/document-render/module.ts"],"sourcesContent":["import { z } from 'zod'\n\nimport { batchResultSchema } from '../../shared/batch'\nimport {\n\tcloudflareBrowserAuthSchema,\n\tcloudflareBrowserRenderOutputSchema,\n\tcloudflareBrowserRenderPdfInputSchema,\n\tcloudflareBrowserRenderScreenshotInputSchema\n} from '../../vendors/cloudflare-browser'\n\nexport const MAX_BATCH_RENDER = 10\n\n/** Host auth: vendor credentials + provider discriminator. */\nexport const cloudflareBrowserDocumentRenderAuthSchema = cloudflareBrowserAuthSchema.extend({\n\tprovider: z.literal('cloudflare-browser')\n})\n\nexport type CloudflareBrowserDocumentRenderAuth = z.infer<typeof cloudflareBrowserDocumentRenderAuthSchema>\n\nexport const documentRenderAuthSchema = z.discriminatedUnion('provider', [cloudflareBrowserDocumentRenderAuthSchema])\n\nexport type DocumentRenderAuth = z.infer<typeof documentRenderAuthSchema>\n\n/** Capability I/O — re-export Cloudflare Browser shapes under seam names. */\nexport const renderPdfInputSchema = cloudflareBrowserRenderPdfInputSchema\nexport const renderScreenshotInputSchema = cloudflareBrowserRenderScreenshotInputSchema\nexport const renderOutputSchema = cloudflareBrowserRenderOutputSchema\n\nexport const renderPdfBatchInputSchema = z.object({\n\titems: z.array(renderPdfInputSchema).min(1).max(MAX_BATCH_RENDER).describe('PDF render jobs (max 10)')\n})\n\nexport const renderScreenshotBatchInputSchema = z.object({\n\titems: z.array(renderScreenshotInputSchema).min(1).max(MAX_BATCH_RENDER).describe('Screenshot jobs (max 10)')\n})\n\nexport const renderPdfBatchOutputSchema = batchResultSchema(renderOutputSchema)\nexport const renderScreenshotBatchOutputSchema = batchResultSchema(renderOutputSchema)\n\nexport type RenderPdfInput = z.infer<typeof renderPdfInputSchema>\nexport type RenderScreenshotInput = z.infer<typeof renderScreenshotInputSchema>\nexport type RenderOutput = z.infer<typeof renderOutputSchema>\nexport type RenderPdfBatchInput = z.infer<typeof renderPdfBatchInputSchema>\nexport type RenderScreenshotBatchInput = z.infer<typeof renderScreenshotBatchInputSchema>\nexport type RenderPdfBatchOutput = z.infer<typeof renderPdfBatchOutputSchema>\nexport type RenderScreenshotBatchOutput = z.infer<typeof renderScreenshotBatchOutputSchema>\n\nexport type DocumentRenderOps = {\n\trenderPdf: (input: RenderPdfInput) => Promise<RenderOutput>\n\trenderScreenshot: (input: RenderScreenshotInput) => Promise<RenderOutput>\n}\n","/**\n * Cloudflare Browser provider for the document-render seam. Wraps `CloudflareBrowserClient`.\n */\n\nimport type { HttpServiceOptions } from '../../../transport/http-service'\nimport { CloudflareBrowserClient } from '../../../vendors/cloudflare-browser'\nimport type {\n\tCloudflareBrowserDocumentRenderAuth,\n\tDocumentRenderOps,\n\tRenderPdfInput,\n\tRenderScreenshotInput\n} from '../contracts'\n\nexport type CloudflareBrowserDocumentRenderProviderOptions = Pick<HttpServiceOptions, 'fetch' | 'signal'>\n\nexport class CloudflareBrowserDocumentRenderProvider implements DocumentRenderOps {\n\treadonly #client: CloudflareBrowserClient\n\n\tconstructor(auth: CloudflareBrowserDocumentRenderAuth, options: CloudflareBrowserDocumentRenderProviderOptions = {}) {\n\t\tconst { provider: _p, ...vendorAuth } = auth\n\t\tthis.#client = new CloudflareBrowserClient(vendorAuth, options)\n\t}\n\n\trenderPdf(input: RenderPdfInput) {\n\t\treturn this.#client.renderPdf(input)\n\t}\n\n\trenderScreenshot(input: RenderScreenshotInput) {\n\t\treturn this.#client.renderScreenshot(input)\n\t}\n}\n","/**\n * Document-render seam client — picks cloudflare-browser from host auth.\n */\n\nimport { requireAuth } from '../../core/provider'\nimport type { ToolContext } from '../../core/types'\nimport { documentRenderAuthSchema } from './contracts'\nimport type { DocumentRenderAuth, DocumentRenderOps, RenderPdfInput, RenderScreenshotInput } from './contracts'\nimport { CloudflareBrowserDocumentRenderProvider } from './providers/cloudflare-browser'\n\nfunction transportOptions(ctx: ToolContext) {\n\treturn {\n\t\t...(ctx.fetch && { fetch: ctx.fetch }),\n\t\t...(ctx.signal && { signal: ctx.signal })\n\t}\n}\n\nfunction providerFor(auth: DocumentRenderAuth, ctx: ToolContext): DocumentRenderOps {\n\tconst options = transportOptions(ctx)\n\tswitch (auth.provider) {\n\t\tcase 'cloudflare-browser':\n\t\t\treturn new CloudflareBrowserDocumentRenderProvider(auth, options)\n\t}\n}\n\nexport class DocumentRenderClient implements DocumentRenderOps {\n\treadonly #ops: DocumentRenderOps\n\n\tconstructor(ops: DocumentRenderOps) {\n\t\tthis.#ops = ops\n\t}\n\n\tstatic fromContext(ctx: ToolContext): DocumentRenderClient {\n\t\tconst auth = requireAuth(ctx, documentRenderAuthSchema)\n\t\treturn new DocumentRenderClient(providerFor(auth, ctx))\n\t}\n\n\tstatic fromAuth(auth: DocumentRenderAuth, ctx: ToolContext = {}): DocumentRenderClient {\n\t\treturn new DocumentRenderClient(providerFor(auth, ctx))\n\t}\n\n\trenderPdf(input: RenderPdfInput) {\n\t\treturn this.#ops.renderPdf(input)\n\t}\n\n\trenderScreenshot(input: RenderScreenshotInput) {\n\t\treturn this.#ops.renderScreenshot(input)\n\t}\n}\n","import { defineModule, defineTool } from '../../core/define'\nimport { runBatchItems } from '../../shared/batch'\nimport { DocumentRenderClient } from './client'\nimport {\n\tdocumentRenderAuthSchema,\n\trenderOutputSchema,\n\trenderPdfBatchInputSchema,\n\trenderPdfBatchOutputSchema,\n\trenderPdfInputSchema,\n\trenderScreenshotBatchInputSchema,\n\trenderScreenshotBatchOutputSchema,\n\trenderScreenshotInputSchema\n} from './contracts'\n\nexport type { DocumentRenderAuth } from './contracts'\nexport { documentRenderAuthSchema }\n\nexport const documentRenderPdfTool = defineTool({\n\tid: 'document-render-pdf',\n\tname: 'renderDocumentPdf',\n\tdescription:\n\t\t'Create a PDF from HTML or a URL with a browser print engine and return the final ArtifactRef. Use for web layouts, reports, and invoices. Do not use a general code sandbox to print HTML.',\n\tinputSchema: renderPdfInputSchema,\n\toutputSchema: renderOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => DocumentRenderClient.fromContext(ctx).renderPdf(input)\n})\n\nexport const documentRenderScreenshotTool = defineTool({\n\tid: 'document-render-screenshot',\n\tname: 'renderDocumentScreenshot',\n\tdescription:\n\t\t'Create a PNG screenshot ArtifactRef from HTML or a URL. Use when the requested deliverable is a rendered page image, not when interactive browsing or a source image transform is required.',\n\tinputSchema: renderScreenshotInputSchema,\n\toutputSchema: renderOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => DocumentRenderClient.fromContext(ctx).renderScreenshot(input)\n})\n\nexport const documentRenderPdfBatchTool = defineTool({\n\tid: 'document-render-pdf-batch',\n\tname: 'renderDocumentPdfBatch',\n\tdescription:\n\t\t'Create PDF ArtifactRefs from up to 10 HTML or URL sources. Use only when multiple independent browser-printed PDFs are required. Returns per-item success or error without aborting the batch.',\n\tinputSchema: renderPdfBatchInputSchema,\n\toutputSchema: renderPdfBatchOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => {\n\t\tconst client = DocumentRenderClient.fromContext(ctx)\n\t\treturn runBatchItems(input.items, async (item) => client.renderPdf(item))\n\t}\n})\n\nexport const documentRenderScreenshotBatchTool = defineTool({\n\tid: 'document-render-screenshot-batch',\n\tname: 'renderDocumentScreenshotBatch',\n\tdescription:\n\t\t'Create PNG screenshot ArtifactRefs from up to 10 HTML or URL sources. Use only when multiple independent page images are required. Returns per-item success or error without aborting the batch.',\n\tinputSchema: renderScreenshotBatchInputSchema,\n\toutputSchema: renderScreenshotBatchOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => {\n\t\tconst client = DocumentRenderClient.fromContext(ctx)\n\t\treturn runBatchItems(input.items, async (item) => client.renderScreenshot(item))\n\t}\n})\n\nexport const documentRenderModule = defineModule({\n\tid: 'document-render',\n\ttitle: 'Document Render',\n\tdescription: 'Create final PDF or PNG ArtifactRefs from HTML or URLs with a browser renderer.',\n\truntime: 'both',\n\tauth: { type: 'custom', schema: documentRenderAuthSchema },\n\tcategories: ['documents', 'render'],\n\tclassification: 'standard',\n\ttags: ['pdf', 'screenshot'],\n\ttools: [\n\t\tdocumentRenderPdfTool,\n\t\tdocumentRenderScreenshotTool,\n\t\tdocumentRenderPdfBatchTool,\n\t\tdocumentRenderScreenshotBatchTool\n\t]\n})\n"],"mappings":";;;;;;AAaA,MAAa,4CAA4C,4BAA4B,OAAO,EAC3F,UAA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,OAAO,iBAAiB,IAAI,CAAC;CAChF;AACD,CAAC;AAED,MAAa,uBAAuB,aAAa;CAChD,IAAI;CACJ,OAAO;CACP,aAAa;CACb,SAAS;CACT,MAAM;EAAE,MAAM;EAAU,QAAQ;CAAyB;CACzD,YAAY,CAAC,aAAa,QAAQ;CAClC,gBAAgB;CAChB,MAAM,CAAC,OAAO,YAAY;CAC1B,OAAO;EACN;EACA;EACA;EACA;CACD;AACD,CAAC"}
@@ -1,10 +1,28 @@
1
1
  import { a as ModuleDefinition, o as ToolContext, s as ToolDefinition } from "../../types-Ccb0DXY9.js";
2
2
  import "../../index-CZX5OeOF.js";
3
3
  import { s as HttpServiceOptions } from "../../http-service-CerzWwQO.js";
4
- import { t as BatchResult } from "../../batch-BMM5dXqL.js";
5
4
  import { a as namedAddressSchema, i as attachmentSchema, n as MAX_EMAIL_BYTES, r as NamedAddress, t as MAX_BATCH_EMAILS } from "../../index-CLmTrcu5.js";
6
5
  import "../../index-C-Cuh9it.js";
7
6
  import { z } from "zod";
7
+ //#region src/shared/batch.d.ts
8
+ declare const batchItemErrorSchema: z.ZodObject<{
9
+ code: z.ZodString;
10
+ message: z.ZodString;
11
+ retryable: z.ZodOptional<z.ZodBoolean>;
12
+ }, z.core.$strip>;
13
+ type BatchItemError = z.infer<typeof batchItemErrorSchema>;
14
+ type BatchItemResult<TValue> = {
15
+ index: number;
16
+ ok: boolean;
17
+ value?: TValue;
18
+ error?: BatchItemError;
19
+ };
20
+ type BatchResult<TValue> = {
21
+ results: Array<BatchItemResult<TValue>>;
22
+ succeeded: number;
23
+ failed: number;
24
+ };
25
+ //#endregion
8
26
  //#region src/modules/email/contracts.d.ts
9
27
  declare const emailSenderSchema: z.ZodUnion<readonly [z.ZodEmail, z.ZodObject<{
10
28
  email: z.ZodEmail;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/modules/email/contracts.ts","../../../src/modules/email/client.ts","../../../src/modules/email/module.ts"],"mappings":";;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAYA,oBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAYA,aAAA"}
@@ -1,10 +1,10 @@
1
1
  import { n as isToolError, t as ToolError } from "../../errors-DoSpNHvs.js";
2
- import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
2
+ import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
3
3
  import { n as requireAuth } from "../../provider-CgDAlg6K.js";
4
4
  import { n as runBatchItems, t as batchResultSchema } from "../../batch-Co1ujeAW.js";
5
5
  import { a as attachmentSchema, i as MAX_EMAIL_BYTES, o as namedAddressSchema, r as MAX_BATCH_EMAILS } from "../../limits-hjrO8zUG.js";
6
- import { a as cloudflareEmailAuthSchema, i as CloudflareEmailClient } from "../../cloudflare-email-Dy0KHeDf.js";
7
- import { a as resendAuthSchema, c as resendSendInputSchema, i as ResendClient } from "../../resend-BAC38_dA.js";
6
+ import { a as cloudflareEmailAuthSchema, i as CloudflareEmailClient } from "../../cloudflare-email-CSRq8mRd.js";
7
+ import { a as resendAuthSchema, c as resendSendInputSchema, i as ResendClient } from "../../resend-Bu0NFO3h.js";
8
8
  import { z } from "zod";
9
9
  //#region src/modules/email/contracts.ts
10
10
  /**
@@ -1,5 +1,5 @@
1
1
  import { t as ToolError } from "../../errors-DoSpNHvs.js";
2
- import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
2
+ import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
3
3
  import { n as bytesToBase64, o as utf8ToBytes, t as base64ToBytes } from "../../bytes-BxpimpQx.js";
4
4
  import { isNil, isPlainObject, isString } from "es-toolkit";
5
5
  import { castArray, has, isArray } from "es-toolkit/compat";
@@ -1,9 +1,9 @@
1
1
  import { t as ToolError } from "../../errors-DoSpNHvs.js";
2
- import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
2
+ import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
3
3
  import { n as requireAuth } from "../../provider-CgDAlg6K.js";
4
4
  import { t as artifactRefSchema } from "../../artifact-D064mHfK.js";
5
5
  import { n as bytesToBase64, r as bytesToUtf8 } from "../../bytes-BxpimpQx.js";
6
- import { m as s3AuthSchema, p as S3Client } from "../../s3-CsOaPWMP.js";
6
+ import { m as s3AuthSchema, p as S3Client } from "../../s3-Dj7Teh-A.js";
7
7
  import { z } from "zod";
8
8
  //#region src/modules/files/contracts.ts
9
9
  /** Max bytes for a single range read through files tools. */
@@ -1,7 +1,10 @@
1
1
  import { a as ModuleDefinition, o as ToolContext, s as ToolDefinition } from "../../types-Ccb0DXY9.js";
2
2
  import "../../index-CZX5OeOF.js";
3
- import { t as ObjectArtifactStoreOptions } from "../../object-artifact-store-BVLietAc.js";
3
+ import { g as S3ClientOptions } from "../../index-ByHp3nZm.js";
4
4
  import { z } from "zod";
5
+ //#region src/shared/object-artifact-store.d.ts
6
+ type ObjectArtifactStoreOptions = S3ClientOptions;
7
+ //#endregion
5
8
  //#region src/modules/image/contracts.d.ts
6
9
  declare const MAX_IMAGE_BYTES: number;
7
10
  declare const MAX_IMAGE_DIMENSION = 16384;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/modules/image/contracts.ts","../../../src/modules/image/client.ts","../../../src/modules/image/module.ts"],"mappings":";;;;;cAKa;cACA;cAEA,iBAAe,EAAA;;;;;;;;;;GAE1B,EAAA,KAAA;cAQW,0BAAwB,EAAA;;;;;;;;;;;GAAuB,EAAA,KAAA;cAE/C,qBAAmB,EAAA;;;;;;;;;;GAU9B,EAAA,KAAA;cAEW,4BAA0B,EAAA;;;;;;;;;;;;;;;;;;;;;;GAGrC,EAAA,KAAA;cAEW,wBAAsB,EAAA;;;;;;;;;;;;;;;;;;;;;;;GAgBhC,EAAA,KAAA;cAEU,sBAAoB,EAAA;;;;;;;;;;;;;;;;;GAQ/B,EAAA,KAAA;cAEW,2BAAyB,EAAA;;;;;;;;;;;;;;;GAMpC,EAAA,KAAA;cAEW,mBAAiB,EAAA;;;;;;;;cAEjB,yBAAuB,EAAA;;;;;;;;;;;;;;;;;;;;;;GAMlC,EAAA,KAAA;KAEU,YAAY,EAAE,aAAa;KAC3B,qBAAqB,EAAE,aAAa;KACpC,gBAAgB,EAAE,aAAa;KAC/B,mBAAmB,EAAE,aAAa;KAClC,iBAAiB,EAAE,aAAa;KAChC,sBAAsB,EAAE,aAAa;KACrC,oBAAoB,EAAE,aAAa;KACnC,uBAAuB,EAAE,aAAa;;;KCrEtC,qBAAqB;cAoBpB;;EAGZ,YAAY,MAAM,WAAW,UAAS;SAW/B,YAAY,KAAK,cAAc;SAO/B,SAAS,MAAM,WAAW,UAAS,qBAA0B;EAI9D,SAAS,OAAO,qBAAqB,QAAQ;EAQ7C,OAAO,OAAO,mBAAmB,QAAQ;EAYzC,KAAK,OAAO,iBAAiB,QAAQ;EAYrC,UAAU,OAAO,sBAAsB,QAAQ;EAO/C,QAAQ,OAAO,oBAAoB,QAAQ;;;;cC5FrC,mBAAA;;;;;;;;;;;;;;;;;;;cAaA,iBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAaA,eAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAaA,oBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAaA,kBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAaA,aAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/shared/object-artifact-store.ts","../../../src/modules/image/contracts.ts","../../../src/modules/image/client.ts","../../../src/modules/image/module.ts"],"mappings":";;;;;KAMY,6BAA6B;;;cCD5B;cACA;cAEA,iBAAe,EAAA;;;;;;;;;;GAE1B,EAAA,KAAA;cAQW,0BAAwB,EAAA;;;;;;;;;;;GAAuB,EAAA,KAAA;cAE/C,qBAAmB,EAAA;;;;;;;;;;GAU9B,EAAA,KAAA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