@5ss/ai-tools 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +112 -0
- package/LICENSE +21 -0
- package/README.md +221 -0
- package/dist/ai-sdk/index.d.ts +15 -0
- package/dist/ai-sdk/index.d.ts.map +1 -0
- package/dist/ai-sdk/index.js +24 -0
- package/dist/ai-sdk/index.js.map +1 -0
- package/dist/artifact-D064mHfK.js +44 -0
- package/dist/artifact-D064mHfK.js.map +1 -0
- package/dist/artifacts-O8g-40Pw.js +404 -0
- package/dist/artifacts-O8g-40Pw.js.map +1 -0
- package/dist/aws-json-CecFqzqX.js +23 -0
- package/dist/aws-json-CecFqzqX.js.map +1 -0
- package/dist/aws-service-msttbPrz.js +58 -0
- package/dist/aws-service-msttbPrz.js.map +1 -0
- package/dist/batch-BMM5dXqL.d.ts +22 -0
- package/dist/batch-BMM5dXqL.d.ts.map +1 -0
- package/dist/batch-Co1ujeAW.js +67 -0
- package/dist/batch-Co1ujeAW.js.map +1 -0
- package/dist/bedrock-agentcore-browser-a_qOs-NR.js +182 -0
- package/dist/bedrock-agentcore-browser-a_qOs-NR.js.map +1 -0
- package/dist/bedrock-agentcore-code-interpreter-MWK-8RhA.js +357 -0
- package/dist/bedrock-agentcore-code-interpreter-MWK-8RhA.js.map +1 -0
- package/dist/bytes-BxpimpQx.js +45 -0
- package/dist/bytes-BxpimpQx.js.map +1 -0
- package/dist/client-CCKGsTeI.js +743 -0
- package/dist/client-CCKGsTeI.js.map +1 -0
- package/dist/cloudflare/index.d.ts +37 -0
- package/dist/cloudflare/index.d.ts.map +1 -0
- package/dist/cloudflare/index.js +41 -0
- package/dist/cloudflare/index.js.map +1 -0
- package/dist/cloudflare-browser-B6Yolpin.js +428 -0
- package/dist/cloudflare-browser-B6Yolpin.js.map +1 -0
- package/dist/cloudflare-email-Dy0KHeDf.js +197 -0
- package/dist/cloudflare-email-Dy0KHeDf.js.map +1 -0
- package/dist/cloudflare-sandbox-Dp_uNaqW.js +982 -0
- package/dist/cloudflare-sandbox-Dp_uNaqW.js.map +1 -0
- package/dist/content-type-CORxaxcv.js +49 -0
- package/dist/content-type-CORxaxcv.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +204 -0
- package/dist/core/index.js.map +1 -0
- package/dist/define-CvpJ_pNP.js +115 -0
- package/dist/define-CvpJ_pNP.js.map +1 -0
- package/dist/errors-DoSpNHvs.js +20 -0
- package/dist/errors-DoSpNHvs.js.map +1 -0
- package/dist/errors-aKhko9T1.d.ts +18 -0
- package/dist/errors-aKhko9T1.d.ts.map +1 -0
- package/dist/eventbridge-scheduler-Bh6GqZY2.js +349 -0
- package/dist/eventbridge-scheduler-Bh6GqZY2.js.map +1 -0
- package/dist/framework-context-DVIIY8ZO.js +24 -0
- package/dist/framework-context-DVIIY8ZO.js.map +1 -0
- package/dist/gotenberg-NuJjxyln.js +291 -0
- package/dist/gotenberg-NuJjxyln.js.map +1 -0
- package/dist/http/index.d.ts +47 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/index.js +3 -0
- package/dist/http-service-DDNCO1s4.js +254 -0
- package/dist/http-service-DDNCO1s4.js.map +1 -0
- package/dist/http-service-T7E5UjP8.d.ts +80 -0
- package/dist/http-service-T7E5UjP8.d.ts.map +1 -0
- package/dist/imessage-BSAFOI8Z.js +154 -0
- package/dist/imessage-BSAFOI8Z.js.map +1 -0
- package/dist/index-BU4gmYO8.d.ts +254 -0
- package/dist/index-BU4gmYO8.d.ts.map +1 -0
- package/dist/index-CCivzmxO.d.ts +188 -0
- package/dist/index-CCivzmxO.d.ts.map +1 -0
- package/dist/index-CLmTrcu5.d.ts +22 -0
- package/dist/index-CLmTrcu5.d.ts.map +1 -0
- package/dist/index-CZX5OeOF.d.ts +235 -0
- package/dist/index-CZX5OeOF.d.ts.map +1 -0
- package/dist/index-CdFmEfZO.d.ts +359 -0
- package/dist/index-CdFmEfZO.d.ts.map +1 -0
- package/dist/index-Cuh6eMWc.d.ts +285 -0
- package/dist/index-Cuh6eMWc.d.ts.map +1 -0
- package/dist/index-DuOGj7vc.d.ts +107 -0
- package/dist/index-DuOGj7vc.d.ts.map +1 -0
- package/dist/index-ccZ1XOHw.d.ts +69 -0
- package/dist/index-ccZ1XOHw.d.ts.map +1 -0
- package/dist/index-n8JTpNf1.d.ts +247 -0
- package/dist/index-n8JTpNf1.d.ts.map +1 -0
- package/dist/index-pwW1OsOx.d.ts +134 -0
- package/dist/index-pwW1OsOx.d.ts.map +1 -0
- package/dist/index-zK1ZwS4m.d.ts +347 -0
- package/dist/index-zK1ZwS4m.d.ts.map +1 -0
- package/dist/limits-hjrO8zUG.js +80 -0
- package/dist/limits-hjrO8zUG.js.map +1 -0
- package/dist/mastra/index.d.ts +14 -0
- package/dist/mastra/index.d.ts.map +1 -0
- package/dist/mastra/index.js +26 -0
- package/dist/mastra/index.js.map +1 -0
- package/dist/mastra-vector-Dhc6XZ8l.js +234 -0
- package/dist/mastra-vector-Dhc6XZ8l.js.map +1 -0
- package/dist/mcp/index.d.ts +80 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +97 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/modules/artifacts/index.d.ts +337 -0
- package/dist/modules/artifacts/index.d.ts.map +1 -0
- package/dist/modules/artifacts/index.js +348 -0
- package/dist/modules/artifacts/index.js.map +1 -0
- package/dist/modules/browser/index.d.ts +516 -0
- package/dist/modules/browser/index.d.ts.map +1 -0
- package/dist/modules/browser/index.js +475 -0
- package/dist/modules/browser/index.js.map +1 -0
- package/dist/modules/calendar/index.d.ts +93 -0
- package/dist/modules/calendar/index.d.ts.map +1 -0
- package/dist/modules/calendar/index.js +131 -0
- package/dist/modules/calendar/index.js.map +1 -0
- package/dist/modules/code-sandbox/index.d.ts +317 -0
- package/dist/modules/code-sandbox/index.d.ts.map +1 -0
- package/dist/modules/code-sandbox/index.js +537 -0
- package/dist/modules/code-sandbox/index.js.map +1 -0
- package/dist/modules/content-type/index.d.ts +22 -0
- package/dist/modules/content-type/index.d.ts.map +1 -0
- package/dist/modules/content-type/index.js +66 -0
- package/dist/modules/content-type/index.js.map +1 -0
- package/dist/modules/crypto/index.d.ts +115 -0
- package/dist/modules/crypto/index.d.ts.map +1 -0
- package/dist/modules/crypto/index.js +139 -0
- package/dist/modules/crypto/index.js.map +1 -0
- package/dist/modules/document/index.d.ts +575 -0
- package/dist/modules/document/index.d.ts.map +1 -0
- package/dist/modules/document/index.js +444 -0
- package/dist/modules/document/index.js.map +1 -0
- package/dist/modules/document-extract/index.d.ts +438 -0
- package/dist/modules/document-extract/index.d.ts.map +1 -0
- package/dist/modules/document-extract/index.js +127 -0
- package/dist/modules/document-extract/index.js.map +1 -0
- package/dist/modules/document-render/index.d.ts +336 -0
- package/dist/modules/document-render/index.d.ts.map +1 -0
- package/dist/modules/document-render/index.js +155 -0
- package/dist/modules/document-render/index.js.map +1 -0
- package/dist/modules/email/index.d.ts +311 -0
- package/dist/modules/email/index.d.ts.map +1 -0
- package/dist/modules/email/index.js +167 -0
- package/dist/modules/email/index.js.map +1 -0
- package/dist/modules/email-message/index.d.ts +95 -0
- package/dist/modules/email-message/index.d.ts.map +1 -0
- package/dist/modules/email-message/index.js +264 -0
- package/dist/modules/email-message/index.js.map +1 -0
- package/dist/modules/file-convert/index.d.ts +273 -0
- package/dist/modules/file-convert/index.d.ts.map +1 -0
- package/dist/modules/file-convert/index.js +103 -0
- package/dist/modules/file-convert/index.js.map +1 -0
- package/dist/modules/files/index.d.ts +452 -0
- package/dist/modules/files/index.d.ts.map +1 -0
- package/dist/modules/files/index.js +733 -0
- package/dist/modules/files/index.js.map +1 -0
- package/dist/modules/image/index.d.ts +342 -0
- package/dist/modules/image/index.d.ts.map +1 -0
- package/dist/modules/image/index.js +281 -0
- package/dist/modules/image/index.js.map +1 -0
- package/dist/modules/messaging/index.d.ts +608 -0
- package/dist/modules/messaging/index.d.ts.map +1 -0
- package/dist/modules/messaging/index.js +1067 -0
- package/dist/modules/messaging/index.js.map +1 -0
- package/dist/modules/pdf/index.d.ts +287 -0
- package/dist/modules/pdf/index.d.ts.map +1 -0
- package/dist/modules/pdf/index.js +259 -0
- package/dist/modules/pdf/index.js.map +1 -0
- package/dist/modules/presentation/index.d.ts +247 -0
- package/dist/modules/presentation/index.d.ts.map +1 -0
- package/dist/modules/presentation/index.js +12657 -0
- package/dist/modules/presentation/index.js.map +1 -0
- package/dist/modules/queue/index.d.ts +129 -0
- package/dist/modules/queue/index.d.ts.map +1 -0
- package/dist/modules/queue/index.js +131 -0
- package/dist/modules/queue/index.js.map +1 -0
- package/dist/modules/rag/index.d.ts +250 -0
- package/dist/modules/rag/index.d.ts.map +1 -0
- package/dist/modules/rag/index.js +366 -0
- package/dist/modules/rag/index.js.map +1 -0
- package/dist/modules/scheduler/index.d.ts +216 -0
- package/dist/modules/scheduler/index.d.ts.map +1 -0
- package/dist/modules/scheduler/index.js +153 -0
- package/dist/modules/scheduler/index.js.map +1 -0
- package/dist/modules/skills/index.d.ts +205 -0
- package/dist/modules/skills/index.d.ts.map +1 -0
- package/dist/modules/skills/index.js +203 -0
- package/dist/modules/skills/index.js.map +1 -0
- package/dist/modules/tasks/index.d.ts +287 -0
- package/dist/modules/tasks/index.d.ts.map +1 -0
- package/dist/modules/tasks/index.js +207 -0
- package/dist/modules/tasks/index.js.map +1 -0
- package/dist/modules/vector-store/index.d.ts +3 -0
- package/dist/modules/vector-store/index.js +3 -0
- package/dist/modules/web-fetch/index.d.ts +99 -0
- package/dist/modules/web-fetch/index.d.ts.map +1 -0
- package/dist/modules/web-fetch/index.js +242 -0
- package/dist/modules/web-fetch/index.js.map +1 -0
- package/dist/object-artifact-store-CMTzCm_G.d.ts +7 -0
- package/dist/object-artifact-store-CMTzCm_G.d.ts.map +1 -0
- package/dist/object-artifact-store-wZ2j9cto.js +28 -0
- package/dist/object-artifact-store-wZ2j9cto.js.map +1 -0
- package/dist/pinecone-umY4t6OF.js +190 -0
- package/dist/pinecone-umY4t6OF.js.map +1 -0
- package/dist/provider-CgDAlg6K.js +34 -0
- package/dist/provider-CgDAlg6K.js.map +1 -0
- package/dist/qdrant-DMp4NhKR.js +253 -0
- package/dist/qdrant-DMp4NhKR.js.map +1 -0
- package/dist/resend-BAC38_dA.js +155 -0
- package/dist/resend-BAC38_dA.js.map +1 -0
- package/dist/s3-CsOaPWMP.js +955 -0
- package/dist/s3-CsOaPWMP.js.map +1 -0
- package/dist/schemas-ChOAhdo9.js +192 -0
- package/dist/schemas-ChOAhdo9.js.map +1 -0
- package/dist/slack-Di5BBNpt.js +1455 -0
- package/dist/slack-Di5BBNpt.js.map +1 -0
- package/dist/sqs-DCwS1i2N.js +225 -0
- package/dist/sqs-DCwS1i2N.js.map +1 -0
- package/dist/supabase-vector-Dpp9mmJR.js +218 -0
- package/dist/supabase-vector-Dpp9mmJR.js.map +1 -0
- package/dist/tanstack/index.d.ts +15 -0
- package/dist/tanstack/index.d.ts.map +1 -0
- package/dist/tanstack/index.js +28 -0
- package/dist/tanstack/index.js.map +1 -0
- package/dist/teams-DYAHNb39.js +835 -0
- package/dist/teams-DYAHNb39.js.map +1 -0
- package/dist/telegram-DDXWzkfL.js +734 -0
- package/dist/telegram-DDXWzkfL.js.map +1 -0
- package/dist/textract-CPLiB22H.js +554 -0
- package/dist/textract-CPLiB22H.js.map +1 -0
- package/dist/transport-B4vn-XiQ.js +157 -0
- package/dist/transport-B4vn-XiQ.js.map +1 -0
- package/dist/transport-i96ACAI_.d.ts +46 -0
- package/dist/transport-i96ACAI_.d.ts.map +1 -0
- package/dist/types-Ccb0DXY9.d.ts +150 -0
- package/dist/types-Ccb0DXY9.d.ts.map +1 -0
- package/dist/unique-EwBH1JPB.js +19 -0
- package/dist/unique-EwBH1JPB.js.map +1 -0
- package/dist/vector-store-C3nEO80e.js +193 -0
- package/dist/vector-store-C3nEO80e.js.map +1 -0
- package/dist/vendors/amazon-sp-api/index.d.ts +526 -0
- package/dist/vendors/amazon-sp-api/index.d.ts.map +1 -0
- package/dist/vendors/amazon-sp-api/index.js +975 -0
- package/dist/vendors/amazon-sp-api/index.js.map +1 -0
- package/dist/vendors/bedrock-agentcore-browser/index.d.ts +2 -0
- package/dist/vendors/bedrock-agentcore-browser/index.js +2 -0
- package/dist/vendors/bedrock-agentcore-code-interpreter/index.d.ts +228 -0
- package/dist/vendors/bedrock-agentcore-code-interpreter/index.d.ts.map +1 -0
- package/dist/vendors/bedrock-agentcore-code-interpreter/index.js +2 -0
- package/dist/vendors/cloudflare-browser/index.d.ts +2 -0
- package/dist/vendors/cloudflare-browser/index.js +2 -0
- package/dist/vendors/cloudflare-email/index.d.ts +260 -0
- package/dist/vendors/cloudflare-email/index.d.ts.map +1 -0
- package/dist/vendors/cloudflare-email/index.js +3 -0
- package/dist/vendors/cloudflare-sandbox/index.d.ts +565 -0
- package/dist/vendors/cloudflare-sandbox/index.d.ts.map +1 -0
- package/dist/vendors/cloudflare-sandbox/index.js +2 -0
- package/dist/vendors/eventbridge-scheduler/index.d.ts +2 -0
- package/dist/vendors/eventbridge-scheduler/index.js +2 -0
- package/dist/vendors/gotenberg/index.d.ts +306 -0
- package/dist/vendors/gotenberg/index.d.ts.map +1 -0
- package/dist/vendors/gotenberg/index.js +2 -0
- package/dist/vendors/imessage/index.d.ts +420 -0
- package/dist/vendors/imessage/index.d.ts.map +1 -0
- package/dist/vendors/imessage/index.js +4 -0
- package/dist/vendors/katana/index.d.ts +1570 -0
- package/dist/vendors/katana/index.d.ts.map +1 -0
- package/dist/vendors/katana/index.js +1639 -0
- package/dist/vendors/katana/index.js.map +1 -0
- package/dist/vendors/mastra-vector/index.d.ts +120 -0
- package/dist/vendors/mastra-vector/index.d.ts.map +1 -0
- package/dist/vendors/mastra-vector/index.js +3 -0
- package/dist/vendors/pinecone/index.d.ts +75 -0
- package/dist/vendors/pinecone/index.d.ts.map +1 -0
- package/dist/vendors/pinecone/index.js +3 -0
- package/dist/vendors/qdrant/index.d.ts +75 -0
- package/dist/vendors/qdrant/index.d.ts.map +1 -0
- package/dist/vendors/qdrant/index.js +3 -0
- package/dist/vendors/resend/index.d.ts +3 -0
- package/dist/vendors/resend/index.js +3 -0
- package/dist/vendors/s3/index.d.ts +2 -0
- package/dist/vendors/s3/index.js +2 -0
- package/dist/vendors/slack/index.d.ts +576 -0
- package/dist/vendors/slack/index.d.ts.map +1 -0
- package/dist/vendors/slack/index.js +3 -0
- package/dist/vendors/sqs/index.d.ts +2 -0
- package/dist/vendors/sqs/index.js +2 -0
- package/dist/vendors/supabase-vector/index.d.ts +89 -0
- package/dist/vendors/supabase-vector/index.d.ts.map +1 -0
- package/dist/vendors/supabase-vector/index.js +3 -0
- package/dist/vendors/teams/index.d.ts +303 -0
- package/dist/vendors/teams/index.d.ts.map +1 -0
- package/dist/vendors/teams/index.js +3 -0
- package/dist/vendors/telegram/index.d.ts +319 -0
- package/dist/vendors/telegram/index.d.ts.map +1 -0
- package/dist/vendors/telegram/index.js +3 -0
- package/dist/vendors/textract/index.d.ts +2 -0
- package/dist/vendors/textract/index.js +2 -0
- package/dist/vendors/woocommerce/index.d.ts +1700 -0
- package/dist/vendors/woocommerce/index.d.ts.map +1 -0
- package/dist/vendors/woocommerce/index.js +1427 -0
- package/dist/vendors/woocommerce/index.js.map +1 -0
- package/dist/with-auth-CpKqTrGK.js +240 -0
- package/dist/with-auth-CpKqTrGK.js.map +1 -0
- package/logos/LUCIDE-ATTRIBUTION.txt +4 -0
- package/logos/README.md +89 -0
- package/logos/amazon.svg +6 -0
- package/logos/artifacts.svg +9 -0
- package/logos/browser.svg +9 -0
- package/logos/calendar.svg +15 -0
- package/logos/cloudflare-browser.svg +5 -0
- package/logos/cloudflare-email.svg +5 -0
- package/logos/cloudflare.svg +4 -0
- package/logos/code-sandbox.svg +8 -0
- package/logos/content-type.svg +10 -0
- package/logos/crypto.svg +7 -0
- package/logos/document-extract.svg +12 -0
- package/logos/document-render.svg +8 -0
- package/logos/document.svg +10 -0
- package/logos/email-message.svg +8 -0
- package/logos/email.svg +7 -0
- package/logos/file-convert.svg +9 -0
- package/logos/files.svg +6 -0
- package/logos/gotenberg.svg +340 -0
- package/logos/image.svg +8 -0
- package/logos/imessage.svg +7 -0
- package/logos/katana.svg +13 -0
- package/logos/mastra.svg +7 -0
- package/logos/messaging.svg +7 -0
- package/logos/pack-logos.json +48 -0
- package/logos/pdf.svg +10 -0
- package/logos/pinecone.svg +25 -0
- package/logos/presentation.svg +8 -0
- package/logos/qdrant.svg +4 -0
- package/logos/queue.svg +11 -0
- package/logos/rag.svg +18 -0
- package/logos/resend.svg +5 -0
- package/logos/scheduler.svg +7 -0
- package/logos/skills.svg +10 -0
- package/logos/slack.svg +14 -0
- package/logos/supabase.svg +4 -0
- package/logos/tasks.svg +10 -0
- package/logos/teams.svg +6 -0
- package/logos/telegram.svg +10 -0
- package/logos/textract.svg +5 -0
- package/logos/vector-store.svg +8 -0
- package/logos/web-fetch.svg +8 -0
- package/logos/woocommerce.svg +4 -0
- package/package.json +373 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { a as ModuleDefinition, o as ToolContext, s as ToolDefinition } from "../../types-Ccb0DXY9.js";
|
|
2
|
+
import "../../index-CZX5OeOF.js";
|
|
3
|
+
import { C as queueExtendVisibilityInputSchema, D as queueReceiveInputSchema, E as queueReceiptInputSchema, O as queueReceiveOutputSchema, S as queueEnqueueOutputSchema, T as queueMessageSchema, _ as QueueReceiveInput, b as queueAcknowledgeOutputSchema, d as QueueEnqueueOutput, f as QueueExtendVisibilityInput, g as QueueReceiptInput, h as QueueOps, l as QueueAcknowledgeOutput, m as QueueMessage, p as QueueExtendVisibilityOutput, s as SqsClientOptions, u as QueueEnqueueInput, v as QueueReceiveOutput, w as queueExtendVisibilityOutputSchema, x as queueEnqueueInputSchema } from "../../index-pwW1OsOx.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/modules/queue/contracts.d.ts
|
|
6
|
+
declare const sqsQueueAuthSchema: z.ZodObject<{
|
|
7
|
+
access_key_id: z.ZodString;
|
|
8
|
+
secret_access_key: z.ZodString;
|
|
9
|
+
region: z.ZodString;
|
|
10
|
+
session_token: z.ZodOptional<z.ZodString>;
|
|
11
|
+
queue_url: z.ZodURL;
|
|
12
|
+
provider: z.ZodLiteral<"sqs">;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
declare const queueAuthSchema: z.ZodObject<{
|
|
15
|
+
access_key_id: z.ZodString;
|
|
16
|
+
secret_access_key: z.ZodString;
|
|
17
|
+
region: z.ZodString;
|
|
18
|
+
session_token: z.ZodOptional<z.ZodString>;
|
|
19
|
+
queue_url: z.ZodURL;
|
|
20
|
+
provider: z.ZodLiteral<"sqs">;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
type SqsQueueAuth = z.infer<typeof sqsQueueAuthSchema>;
|
|
23
|
+
type QueueAuth = z.infer<typeof queueAuthSchema>;
|
|
24
|
+
type QueueSeamOps = QueueOps;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/modules/queue/client.d.ts
|
|
27
|
+
declare class QueueClient implements QueueSeamOps {
|
|
28
|
+
#private;
|
|
29
|
+
constructor(ops: QueueSeamOps);
|
|
30
|
+
static fromContext(ctx: ToolContext): QueueClient;
|
|
31
|
+
static fromAuth(auth: QueueAuth, ctx?: ToolContext): QueueClient;
|
|
32
|
+
enqueue(input: QueueEnqueueInput): Promise<{
|
|
33
|
+
message_id: string;
|
|
34
|
+
body_md5?: string | undefined;
|
|
35
|
+
sequence_number?: string | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
receive(input?: QueueReceiveInput): Promise<{
|
|
38
|
+
messages: {
|
|
39
|
+
message_id: string;
|
|
40
|
+
receipt_handle: string;
|
|
41
|
+
body: string;
|
|
42
|
+
body_md5?: string | undefined;
|
|
43
|
+
attributes?: Record<string, string> | undefined;
|
|
44
|
+
}[];
|
|
45
|
+
}>;
|
|
46
|
+
acknowledge(input: QueueReceiptInput): Promise<{
|
|
47
|
+
acknowledged: true;
|
|
48
|
+
}>;
|
|
49
|
+
extendVisibility(input: QueueExtendVisibilityInput): Promise<{
|
|
50
|
+
extended: true;
|
|
51
|
+
visibility_timeout_seconds: number;
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/modules/queue/module.d.ts
|
|
56
|
+
declare const queueEnqueueTool: ToolDefinition<{
|
|
57
|
+
body: string;
|
|
58
|
+
delay_seconds?: number | undefined;
|
|
59
|
+
message_group_id?: string | undefined;
|
|
60
|
+
deduplication_id?: string | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
message_id: string;
|
|
63
|
+
body_md5?: string | undefined;
|
|
64
|
+
sequence_number?: string | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
declare const queueReceiveTool: ToolDefinition<{
|
|
67
|
+
max_messages?: number | undefined;
|
|
68
|
+
wait_seconds?: number | undefined;
|
|
69
|
+
visibility_timeout_seconds?: number | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
messages: {
|
|
72
|
+
message_id: string;
|
|
73
|
+
receipt_handle: string;
|
|
74
|
+
body: string;
|
|
75
|
+
body_md5?: string | undefined;
|
|
76
|
+
attributes?: Record<string, string> | undefined;
|
|
77
|
+
}[];
|
|
78
|
+
}>;
|
|
79
|
+
declare const queueAcknowledgeTool: ToolDefinition<{
|
|
80
|
+
receipt_handle: string;
|
|
81
|
+
}, {
|
|
82
|
+
acknowledged: true;
|
|
83
|
+
}>;
|
|
84
|
+
declare const queueExtendVisibilityTool: ToolDefinition<{
|
|
85
|
+
receipt_handle: string;
|
|
86
|
+
visibility_timeout_seconds: number;
|
|
87
|
+
}, {
|
|
88
|
+
extended: true;
|
|
89
|
+
visibility_timeout_seconds: number;
|
|
90
|
+
}>;
|
|
91
|
+
declare const queueModule: ModuleDefinition<{
|
|
92
|
+
access_key_id: string;
|
|
93
|
+
secret_access_key: string;
|
|
94
|
+
region: string;
|
|
95
|
+
session_token?: string | undefined;
|
|
96
|
+
queue_url: string;
|
|
97
|
+
provider: "sqs";
|
|
98
|
+
}>;
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/modules/queue/providers/sqs.d.ts
|
|
101
|
+
type SqsQueueProviderOptions = SqsClientOptions;
|
|
102
|
+
declare class SqsQueueProvider implements QueueSeamOps {
|
|
103
|
+
#private;
|
|
104
|
+
constructor(auth: SqsQueueAuth, options?: SqsQueueProviderOptions);
|
|
105
|
+
enqueue(input: QueueEnqueueInput): Promise<{
|
|
106
|
+
message_id: string;
|
|
107
|
+
body_md5?: string | undefined;
|
|
108
|
+
sequence_number?: string | undefined;
|
|
109
|
+
}>;
|
|
110
|
+
receive(input?: QueueReceiveInput): Promise<{
|
|
111
|
+
messages: {
|
|
112
|
+
message_id: string;
|
|
113
|
+
receipt_handle: string;
|
|
114
|
+
body: string;
|
|
115
|
+
body_md5?: string | undefined;
|
|
116
|
+
attributes?: Record<string, string> | undefined;
|
|
117
|
+
}[];
|
|
118
|
+
}>;
|
|
119
|
+
acknowledge(input: QueueReceiptInput): Promise<{
|
|
120
|
+
acknowledged: true;
|
|
121
|
+
}>;
|
|
122
|
+
extendVisibility(input: QueueExtendVisibilityInput): Promise<{
|
|
123
|
+
extended: true;
|
|
124
|
+
visibility_timeout_seconds: number;
|
|
125
|
+
}>;
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
export { type QueueAcknowledgeOutput, type QueueAuth, QueueClient, type QueueEnqueueInput, type QueueEnqueueOutput, type QueueExtendVisibilityInput, type QueueExtendVisibilityOutput, type QueueMessage, type QueueReceiptInput, type QueueReceiveInput, type QueueReceiveOutput, type QueueSeamOps, type SqsQueueAuth, SqsQueueProvider, type SqsQueueProviderOptions, queueAcknowledgeOutputSchema, queueAcknowledgeTool, queueAuthSchema, queueEnqueueInputSchema, queueEnqueueOutputSchema, queueEnqueueTool, queueExtendVisibilityInputSchema, queueExtendVisibilityOutputSchema, queueExtendVisibilityTool, queueMessageSchema, queueModule, queueReceiptInputSchema, queueReceiveInputSchema, queueReceiveOutputSchema, queueReceiveTool, sqsQueueAuthSchema };
|
|
129
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/modules/queue/contracts.ts","../../../src/modules/queue/client.ts","../../../src/modules/queue/module.ts","../../../src/modules/queue/providers/sqs.ts"],"mappings":";;;;;cAwCa,oBAAkB,EAAA;;;;;;;GAE7B,EAAA,KAAA;cAEW,iBAAe,EAAA;;;;;;;GAAqB,EAAA,KAAA;KAErC,eAAe,EAAE,aAAa;KAC9B,YAAY,EAAE,aAAa;KAE3B,eAAe;;;cC1Bd,uBAAuB;;EAGnC,YAAY,KAAK;SAIV,YAAY,KAAK,cAAc;SAI/B,SAAS,MAAM,WAAW,MAAK,cAAmB;EAIzD,QAAQ,OAAO,oBAAiB;;;;;EAIhC,QAAQ,QAAO,oBAAsB;;;;;;;;;EAIrC,YAAY,OAAO,oBAAiB;;;EAIpC,iBAAiB,OAAO,6BAA0B;;;;;;;cCpCtC,kBAAA;;;;;;;;;;cAaA,kBAAA;;;;;;;;;;iBAAA;;;cAYA,sBAAA;;;;;cAYA,2BAAA;;;;;;;cAYA,aAAA;;;;;;;;;;KCpDD,0BAA0B;cAEzB,4BAA4B;;EAGxC,YAAY,MAAM,cAAc,UAAS;EAKzC,QAAQ,OAAO,oBAAiB;;;;;EAIhC,QAAQ,QAAO,oBAAsB;;;;;;;;;EAIrC,YAAY,OAAO,oBAAiB;;;EAIpC,iBAAiB,OAAO,6BAA0B"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
|
|
2
|
+
import { n as requireAuth } from "../../provider-CgDAlg6K.js";
|
|
3
|
+
import { _ as sqsAuthSchema, c as queueAcknowledgeOutputSchema, d as queueExtendVisibilityInputSchema, f as queueExtendVisibilityOutputSchema, g as queueReceiveOutputSchema, h as queueReceiveInputSchema, l as queueEnqueueInputSchema, m as queueReceiptInputSchema, o as SqsClient, p as queueMessageSchema, u as queueEnqueueOutputSchema } from "../../sqs-DCwS1i2N.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/modules/queue/contracts.ts
|
|
6
|
+
const sqsQueueAuthSchema = sqsAuthSchema.extend({ provider: z.literal("sqs") });
|
|
7
|
+
const queueAuthSchema = sqsQueueAuthSchema;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/modules/queue/providers/sqs.ts
|
|
10
|
+
var SqsQueueProvider = class {
|
|
11
|
+
#client;
|
|
12
|
+
constructor(auth, options = {}) {
|
|
13
|
+
const { provider: _provider, ...vendorAuth } = auth;
|
|
14
|
+
this.#client = new SqsClient(vendorAuth, options);
|
|
15
|
+
}
|
|
16
|
+
enqueue(input) {
|
|
17
|
+
return this.#client.enqueue(input);
|
|
18
|
+
}
|
|
19
|
+
receive(input = {}) {
|
|
20
|
+
return this.#client.receive(input);
|
|
21
|
+
}
|
|
22
|
+
acknowledge(input) {
|
|
23
|
+
return this.#client.acknowledge(input);
|
|
24
|
+
}
|
|
25
|
+
extendVisibility(input) {
|
|
26
|
+
return this.#client.extendVisibility(input);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/modules/queue/client.ts
|
|
31
|
+
function providerFor(auth, ctx) {
|
|
32
|
+
switch (auth.provider) {
|
|
33
|
+
case "sqs": return new SqsQueueProvider(auth, {
|
|
34
|
+
...ctx.fetch && { fetch: ctx.fetch },
|
|
35
|
+
...ctx.signal && { signal: ctx.signal }
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
var QueueClient = class QueueClient {
|
|
40
|
+
#ops;
|
|
41
|
+
constructor(ops) {
|
|
42
|
+
this.#ops = ops;
|
|
43
|
+
}
|
|
44
|
+
static fromContext(ctx) {
|
|
45
|
+
return new QueueClient(providerFor(requireAuth(ctx, queueAuthSchema), ctx));
|
|
46
|
+
}
|
|
47
|
+
static fromAuth(auth, ctx = {}) {
|
|
48
|
+
return new QueueClient(providerFor(auth, ctx));
|
|
49
|
+
}
|
|
50
|
+
enqueue(input) {
|
|
51
|
+
return this.#ops.enqueue(input);
|
|
52
|
+
}
|
|
53
|
+
receive(input = {}) {
|
|
54
|
+
return this.#ops.receive(input);
|
|
55
|
+
}
|
|
56
|
+
acknowledge(input) {
|
|
57
|
+
return this.#ops.acknowledge(input);
|
|
58
|
+
}
|
|
59
|
+
extendVisibility(input) {
|
|
60
|
+
return this.#ops.extendVisibility(input);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/modules/queue/module.ts
|
|
65
|
+
const queueEnqueueTool = defineTool({
|
|
66
|
+
id: "queue-enqueue",
|
|
67
|
+
name: "enqueueMessage",
|
|
68
|
+
description: "Enqueue one message on the bound queue, with optional delivery delay and ordering controls when supported.",
|
|
69
|
+
inputSchema: queueEnqueueInputSchema,
|
|
70
|
+
outputSchema: queueEnqueueOutputSchema,
|
|
71
|
+
sideEffect: "write",
|
|
72
|
+
runtime: "both",
|
|
73
|
+
network: true,
|
|
74
|
+
execute: async (input, ctx) => QueueClient.fromContext(ctx).enqueue(input)
|
|
75
|
+
});
|
|
76
|
+
const queueReceiveTool = defineTool({
|
|
77
|
+
id: "queue-receive",
|
|
78
|
+
name: "receiveMessages",
|
|
79
|
+
description: "Receive a bounded batch of messages from the bound queue for processing.",
|
|
80
|
+
inputSchema: queueReceiveInputSchema,
|
|
81
|
+
outputSchema: queueReceiveOutputSchema,
|
|
82
|
+
sideEffect: "write",
|
|
83
|
+
runtime: "both",
|
|
84
|
+
network: true,
|
|
85
|
+
execute: async (input, ctx) => QueueClient.fromContext(ctx).receive(input)
|
|
86
|
+
});
|
|
87
|
+
const queueAcknowledgeTool = defineTool({
|
|
88
|
+
id: "queue-acknowledge",
|
|
89
|
+
name: "acknowledgeMessage",
|
|
90
|
+
description: "Acknowledge a received message after processing succeeds so it can be removed from the bound queue.",
|
|
91
|
+
inputSchema: queueReceiptInputSchema,
|
|
92
|
+
outputSchema: queueAcknowledgeOutputSchema,
|
|
93
|
+
sideEffect: "delete",
|
|
94
|
+
runtime: "both",
|
|
95
|
+
network: true,
|
|
96
|
+
execute: async (input, ctx) => QueueClient.fromContext(ctx).acknowledge(input)
|
|
97
|
+
});
|
|
98
|
+
const queueExtendVisibilityTool = defineTool({
|
|
99
|
+
id: "queue-extend-visibility",
|
|
100
|
+
name: "extendMessageVisibility",
|
|
101
|
+
description: "Change how long a received message remains unavailable to other consumers while work continues.",
|
|
102
|
+
inputSchema: queueExtendVisibilityInputSchema,
|
|
103
|
+
outputSchema: queueExtendVisibilityOutputSchema,
|
|
104
|
+
sideEffect: "write",
|
|
105
|
+
runtime: "both",
|
|
106
|
+
network: true,
|
|
107
|
+
execute: async (input, ctx) => QueueClient.fromContext(ctx).extendVisibility(input)
|
|
108
|
+
});
|
|
109
|
+
const queueModule = defineModule({
|
|
110
|
+
id: "queue",
|
|
111
|
+
title: "Queue",
|
|
112
|
+
description: "Enqueue, receive, acknowledge, and extend visibility for messages through the bound queue provider.",
|
|
113
|
+
runtime: "both",
|
|
114
|
+
auth: {
|
|
115
|
+
type: "custom",
|
|
116
|
+
schema: queueAuthSchema
|
|
117
|
+
},
|
|
118
|
+
categories: ["queue", "async"],
|
|
119
|
+
classification: "standard",
|
|
120
|
+
tags: ["enqueue", "receive"],
|
|
121
|
+
tools: [
|
|
122
|
+
queueEnqueueTool,
|
|
123
|
+
queueReceiveTool,
|
|
124
|
+
queueAcknowledgeTool,
|
|
125
|
+
queueExtendVisibilityTool
|
|
126
|
+
]
|
|
127
|
+
});
|
|
128
|
+
//#endregion
|
|
129
|
+
export { QueueClient, SqsQueueProvider, queueAcknowledgeOutputSchema, queueAcknowledgeTool, queueAuthSchema, queueEnqueueInputSchema, queueEnqueueOutputSchema, queueEnqueueTool, queueExtendVisibilityInputSchema, queueExtendVisibilityOutputSchema, queueExtendVisibilityTool, queueMessageSchema, queueModule, queueReceiptInputSchema, queueReceiveInputSchema, queueReceiveOutputSchema, queueReceiveTool, sqsQueueAuthSchema };
|
|
130
|
+
|
|
131
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["#client","#ops"],"sources":["../../../src/modules/queue/contracts.ts","../../../src/modules/queue/providers/sqs.ts","../../../src/modules/queue/client.ts","../../../src/modules/queue/module.ts"],"sourcesContent":["import { z } from 'zod'\n\nimport {\n\tqueueAcknowledgeOutputSchema,\n\tqueueEnqueueInputSchema,\n\tqueueEnqueueOutputSchema,\n\tqueueExtendVisibilityInputSchema,\n\tqueueExtendVisibilityOutputSchema,\n\tqueueMessageSchema,\n\tqueueReceiptInputSchema,\n\tqueueReceiveInputSchema,\n\tqueueReceiveOutputSchema,\n\tsqsAuthSchema\n} from '../../vendors/sqs'\nimport type { QueueOps } from '../../vendors/sqs'\n\nexport {\n\tqueueAcknowledgeOutputSchema,\n\tqueueEnqueueInputSchema,\n\tqueueEnqueueOutputSchema,\n\tqueueExtendVisibilityInputSchema,\n\tqueueExtendVisibilityOutputSchema,\n\tqueueMessageSchema,\n\tqueueReceiptInputSchema,\n\tqueueReceiveInputSchema,\n\tqueueReceiveOutputSchema\n}\nexport type {\n\tQueueAcknowledgeOutput,\n\tQueueEnqueueInput,\n\tQueueEnqueueOutput,\n\tQueueExtendVisibilityInput,\n\tQueueExtendVisibilityOutput,\n\tQueueMessage,\n\tQueueOps,\n\tQueueReceiptInput,\n\tQueueReceiveInput,\n\tQueueReceiveOutput\n} from '../../vendors/sqs'\n\nexport const sqsQueueAuthSchema = sqsAuthSchema.extend({\n\tprovider: z.literal('sqs')\n})\n\nexport const queueAuthSchema = sqsQueueAuthSchema\n\nexport type SqsQueueAuth = z.infer<typeof sqsQueueAuthSchema>\nexport type QueueAuth = z.infer<typeof queueAuthSchema>\n\nexport type QueueSeamOps = QueueOps\n","import { SqsClient } from '../../../vendors/sqs'\nimport type { SqsClientOptions } from '../../../vendors/sqs'\nimport type {\n\tQueueEnqueueInput,\n\tQueueExtendVisibilityInput,\n\tQueueReceiptInput,\n\tQueueReceiveInput,\n\tQueueSeamOps,\n\tSqsQueueAuth\n} from '../contracts'\n\nexport type SqsQueueProviderOptions = SqsClientOptions\n\nexport class SqsQueueProvider implements QueueSeamOps {\n\treadonly #client: SqsClient\n\n\tconstructor(auth: SqsQueueAuth, options: SqsQueueProviderOptions = {}) {\n\t\tconst { provider: _provider, ...vendorAuth } = auth\n\t\tthis.#client = new SqsClient(vendorAuth, options)\n\t}\n\n\tenqueue(input: QueueEnqueueInput) {\n\t\treturn this.#client.enqueue(input)\n\t}\n\n\treceive(input: QueueReceiveInput = {}) {\n\t\treturn this.#client.receive(input)\n\t}\n\n\tacknowledge(input: QueueReceiptInput) {\n\t\treturn this.#client.acknowledge(input)\n\t}\n\n\textendVisibility(input: QueueExtendVisibilityInput) {\n\t\treturn this.#client.extendVisibility(input)\n\t}\n}\n","import { requireAuth } from '../../core/provider'\nimport type { ToolContext } from '../../core/types'\nimport type {\n\tQueueAuth,\n\tQueueEnqueueInput,\n\tQueueExtendVisibilityInput,\n\tQueueReceiptInput,\n\tQueueReceiveInput,\n\tQueueSeamOps\n} from './contracts'\nimport { queueAuthSchema } from './contracts'\nimport { SqsQueueProvider } from './providers/sqs'\n\nfunction providerFor(auth: QueueAuth, ctx: ToolContext): QueueSeamOps {\n\tswitch (auth.provider) {\n\t\tcase 'sqs':\n\t\t\treturn new SqsQueueProvider(auth, {\n\t\t\t\t...(ctx.fetch && { fetch: ctx.fetch }),\n\t\t\t\t...(ctx.signal && { signal: ctx.signal })\n\t\t\t})\n\t}\n}\n\nexport class QueueClient implements QueueSeamOps {\n\treadonly #ops: QueueSeamOps\n\n\tconstructor(ops: QueueSeamOps) {\n\t\tthis.#ops = ops\n\t}\n\n\tstatic fromContext(ctx: ToolContext): QueueClient {\n\t\treturn new QueueClient(providerFor(requireAuth(ctx, queueAuthSchema), ctx))\n\t}\n\n\tstatic fromAuth(auth: QueueAuth, ctx: ToolContext = {}): QueueClient {\n\t\treturn new QueueClient(providerFor(auth, ctx))\n\t}\n\n\tenqueue(input: QueueEnqueueInput) {\n\t\treturn this.#ops.enqueue(input)\n\t}\n\n\treceive(input: QueueReceiveInput = {}) {\n\t\treturn this.#ops.receive(input)\n\t}\n\n\tacknowledge(input: QueueReceiptInput) {\n\t\treturn this.#ops.acknowledge(input)\n\t}\n\n\textendVisibility(input: QueueExtendVisibilityInput) {\n\t\treturn this.#ops.extendVisibility(input)\n\t}\n}\n","import { defineModule, defineTool } from '../../core/define'\nimport { QueueClient } from './client'\nimport {\n\tqueueAcknowledgeOutputSchema,\n\tqueueAuthSchema,\n\tqueueEnqueueInputSchema,\n\tqueueEnqueueOutputSchema,\n\tqueueExtendVisibilityInputSchema,\n\tqueueExtendVisibilityOutputSchema,\n\tqueueReceiptInputSchema,\n\tqueueReceiveInputSchema,\n\tqueueReceiveOutputSchema\n} from './contracts'\n\nexport const queueEnqueueTool = defineTool({\n\tid: 'queue-enqueue',\n\tname: 'enqueueMessage',\n\tdescription:\n\t\t'Enqueue one message on the bound queue, with optional delivery delay and ordering controls when supported.',\n\tinputSchema: queueEnqueueInputSchema,\n\toutputSchema: queueEnqueueOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\tnetwork: true,\n\texecute: async (input, ctx) => QueueClient.fromContext(ctx).enqueue(input)\n})\n\nexport const queueReceiveTool = defineTool({\n\tid: 'queue-receive',\n\tname: 'receiveMessages',\n\tdescription: 'Receive a bounded batch of messages from the bound queue for processing.',\n\tinputSchema: queueReceiveInputSchema,\n\toutputSchema: queueReceiveOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\tnetwork: true,\n\texecute: async (input, ctx) => QueueClient.fromContext(ctx).receive(input)\n})\n\nexport const queueAcknowledgeTool = defineTool({\n\tid: 'queue-acknowledge',\n\tname: 'acknowledgeMessage',\n\tdescription: 'Acknowledge a received message after processing succeeds so it can be removed from the bound queue.',\n\tinputSchema: queueReceiptInputSchema,\n\toutputSchema: queueAcknowledgeOutputSchema,\n\tsideEffect: 'delete',\n\truntime: 'both',\n\tnetwork: true,\n\texecute: async (input, ctx) => QueueClient.fromContext(ctx).acknowledge(input)\n})\n\nexport const queueExtendVisibilityTool = defineTool({\n\tid: 'queue-extend-visibility',\n\tname: 'extendMessageVisibility',\n\tdescription: 'Change how long a received message remains unavailable to other consumers while work continues.',\n\tinputSchema: queueExtendVisibilityInputSchema,\n\toutputSchema: queueExtendVisibilityOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\tnetwork: true,\n\texecute: async (input, ctx) => QueueClient.fromContext(ctx).extendVisibility(input)\n})\n\nexport const queueModule = defineModule({\n\tid: 'queue',\n\ttitle: 'Queue',\n\tdescription: 'Enqueue, receive, acknowledge, and extend visibility for messages through the bound queue provider.',\n\truntime: 'both',\n\tauth: { type: 'custom', schema: queueAuthSchema },\n\tcategories: ['queue', 'async'],\n\tclassification: 'standard',\n\ttags: ['enqueue', 'receive'],\n\ttools: [queueEnqueueTool, queueReceiveTool, queueAcknowledgeTool, queueExtendVisibilityTool]\n})\n"],"mappings":";;;;;AAwCA,MAAa,qBAAqB,cAAc,OAAO,EACtD,UAAU,EAAE,QAAQ,KAAK,EAC1B,CAAC;AAED,MAAa,kBAAkB;;;AC/B/B,IAAa,mBAAb,MAAsD;CACrD;CAEA,YAAY,MAAoB,UAAmC,CAAC,GAAG;EACtE,MAAM,EAAE,UAAU,WAAW,GAAG,eAAe;EAC/C,KAAKA,UAAU,IAAI,UAAU,YAAY,OAAO;CACjD;CAEA,QAAQ,OAA0B;EACjC,OAAO,KAAKA,QAAQ,QAAQ,KAAK;CAClC;CAEA,QAAQ,QAA2B,CAAC,GAAG;EACtC,OAAO,KAAKA,QAAQ,QAAQ,KAAK;CAClC;CAEA,YAAY,OAA0B;EACrC,OAAO,KAAKA,QAAQ,YAAY,KAAK;CACtC;CAEA,iBAAiB,OAAmC;EACnD,OAAO,KAAKA,QAAQ,iBAAiB,KAAK;CAC3C;AACD;;;ACvBA,SAAS,YAAY,MAAiB,KAAgC;CACrE,QAAQ,KAAK,UAAb;EACC,KAAK,OACJ,OAAO,IAAI,iBAAiB,MAAM;GACjC,GAAI,IAAI,SAAS,EAAE,OAAO,IAAI,MAAM;GACpC,GAAI,IAAI,UAAU,EAAE,QAAQ,IAAI,OAAO;EACxC,CAAC;CACH;AACD;AAEA,IAAa,cAAb,MAAa,YAAoC;CAChD;CAEA,YAAY,KAAmB;EAC9B,KAAKC,OAAO;CACb;CAEA,OAAO,YAAY,KAA+B;EACjD,OAAO,IAAI,YAAY,YAAY,YAAY,KAAK,eAAe,GAAG,GAAG,CAAC;CAC3E;CAEA,OAAO,SAAS,MAAiB,MAAmB,CAAC,GAAgB;EACpE,OAAO,IAAI,YAAY,YAAY,MAAM,GAAG,CAAC;CAC9C;CAEA,QAAQ,OAA0B;EACjC,OAAO,KAAKA,KAAK,QAAQ,KAAK;CAC/B;CAEA,QAAQ,QAA2B,CAAC,GAAG;EACtC,OAAO,KAAKA,KAAK,QAAQ,KAAK;CAC/B;CAEA,YAAY,OAA0B;EACrC,OAAO,KAAKA,KAAK,YAAY,KAAK;CACnC;CAEA,iBAAiB,OAAmC;EACnD,OAAO,KAAKA,KAAK,iBAAiB,KAAK;CACxC;AACD;;;ACvCA,MAAa,mBAAmB,WAAW;CAC1C,IAAI;CACJ,MAAM;CACN,aACC;CACD,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,YAAY,YAAY,GAAG,CAAC,CAAC,QAAQ,KAAK;AAC1E,CAAC;AAED,MAAa,mBAAmB,WAAW;CAC1C,IAAI;CACJ,MAAM;CACN,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,YAAY,YAAY,GAAG,CAAC,CAAC,QAAQ,KAAK;AAC1E,CAAC;AAED,MAAa,uBAAuB,WAAW;CAC9C,IAAI;CACJ,MAAM;CACN,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,YAAY,YAAY,GAAG,CAAC,CAAC,YAAY,KAAK;AAC9E,CAAC;AAED,MAAa,4BAA4B,WAAW;CACnD,IAAI;CACJ,MAAM;CACN,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,YAAY,YAAY,GAAG,CAAC,CAAC,iBAAiB,KAAK;AACnF,CAAC;AAED,MAAa,cAAc,aAAa;CACvC,IAAI;CACJ,OAAO;CACP,aAAa;CACb,SAAS;CACT,MAAM;EAAE,MAAM;EAAU,QAAQ;CAAgB;CAChD,YAAY,CAAC,SAAS,OAAO;CAC7B,gBAAgB;CAChB,MAAM,CAAC,WAAW,SAAS;CAC3B,OAAO;EAAC;EAAkB;EAAkB;EAAsB;CAAyB;AAC5F,CAAC"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { a as ModuleDefinition, o as ToolContext, s as ToolDefinition } from "../../types-Ccb0DXY9.js";
|
|
2
|
+
import "../../index-CZX5OeOF.js";
|
|
3
|
+
import { s as HttpServiceOptions } from "../../http-service-T7E5UjP8.js";
|
|
4
|
+
import "../../index-CCivzmxO.js";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
//#region src/modules/rag/contracts.d.ts
|
|
7
|
+
declare const DEFAULT_CHUNK_MAX_CHARS = 1200;
|
|
8
|
+
declare const DEFAULT_CHUNK_OVERLAP = 200;
|
|
9
|
+
declare const MAX_CHUNK_MAX_CHARS = 8000;
|
|
10
|
+
declare const MAX_INGEST_CHARS = 500000;
|
|
11
|
+
declare const MAX_EMBED_BATCH = 32;
|
|
12
|
+
declare const embedAuthSchema: z.ZodObject<{
|
|
13
|
+
base_url: z.ZodString;
|
|
14
|
+
api_key: z.ZodOptional<z.ZodString>;
|
|
15
|
+
model: z.ZodString;
|
|
16
|
+
path: z.ZodOptional<z.ZodString>;
|
|
17
|
+
dimensions: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
declare const ragAuthSchema: z.ZodObject<{
|
|
20
|
+
vector_store: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
21
|
+
base_url: z.ZodString;
|
|
22
|
+
api_key: z.ZodOptional<z.ZodString>;
|
|
23
|
+
default_collection: z.ZodOptional<z.ZodString>;
|
|
24
|
+
default_filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
25
|
+
provider: z.ZodLiteral<"qdrant">;
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
+
api_key: z.ZodString;
|
|
28
|
+
base_url: z.ZodString;
|
|
29
|
+
default_namespace: z.ZodOptional<z.ZodString>;
|
|
30
|
+
default_filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
31
|
+
provider: z.ZodLiteral<"pinecone">;
|
|
32
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
33
|
+
url: z.ZodString;
|
|
34
|
+
api_key: z.ZodString;
|
|
35
|
+
default_collection: z.ZodOptional<z.ZodString>;
|
|
36
|
+
schema: z.ZodOptional<z.ZodString>;
|
|
37
|
+
id_column: z.ZodOptional<z.ZodString>;
|
|
38
|
+
embedding_column: z.ZodOptional<z.ZodString>;
|
|
39
|
+
metadata_column: z.ZodOptional<z.ZodString>;
|
|
40
|
+
match_rpc: z.ZodOptional<z.ZodString>;
|
|
41
|
+
default_filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
42
|
+
provider: z.ZodLiteral<"supabase">;
|
|
43
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
+
connection_string: z.ZodString;
|
|
45
|
+
id: z.ZodString;
|
|
46
|
+
schema_name: z.ZodOptional<z.ZodString>;
|
|
47
|
+
default_index: z.ZodOptional<z.ZodString>;
|
|
48
|
+
dimension: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
auto_create_index: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
disable_init: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
default_filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
52
|
+
provider: z.ZodLiteral<"mastra">;
|
|
53
|
+
}, z.core.$strip>], "provider">;
|
|
54
|
+
embed: z.ZodObject<{
|
|
55
|
+
base_url: z.ZodString;
|
|
56
|
+
api_key: z.ZodOptional<z.ZodString>;
|
|
57
|
+
model: z.ZodString;
|
|
58
|
+
path: z.ZodOptional<z.ZodString>;
|
|
59
|
+
dimensions: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
default_collection: z.ZodOptional<z.ZodString>;
|
|
62
|
+
chunk: z.ZodOptional<z.ZodObject<{
|
|
63
|
+
max_chars: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
overlap: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
declare const ragIngestInputSchema: z.ZodObject<{
|
|
68
|
+
document_id: z.ZodString;
|
|
69
|
+
text: z.ZodString;
|
|
70
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
71
|
+
collection: z.ZodOptional<z.ZodString>;
|
|
72
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
73
|
+
chunk: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
max_chars: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
overlap: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
declare const ragIngestOutputSchema: z.ZodObject<{
|
|
79
|
+
document_id: z.ZodString;
|
|
80
|
+
chunk_count: z.ZodNumber;
|
|
81
|
+
chunk_ids: z.ZodArray<z.ZodString>;
|
|
82
|
+
collection: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
declare const ragRetrieveInputSchema: z.ZodObject<{
|
|
85
|
+
query: z.ZodString;
|
|
86
|
+
top_k: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
collection: z.ZodOptional<z.ZodString>;
|
|
88
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
89
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
declare const ragRetrievedChunkSchema: z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
score: z.ZodNumber;
|
|
94
|
+
text: z.ZodOptional<z.ZodString>;
|
|
95
|
+
document_id: z.ZodOptional<z.ZodString>;
|
|
96
|
+
chunk_index: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
declare const ragRetrieveOutputSchema: z.ZodObject<{
|
|
100
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
score: z.ZodNumber;
|
|
103
|
+
text: z.ZodOptional<z.ZodString>;
|
|
104
|
+
document_id: z.ZodOptional<z.ZodString>;
|
|
105
|
+
chunk_index: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
collection: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
declare const ragDeleteInputSchema: z.ZodObject<{
|
|
111
|
+
chunk_ids: z.ZodArray<z.ZodString>;
|
|
112
|
+
collection: z.ZodOptional<z.ZodString>;
|
|
113
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
declare const ragDeleteOutputSchema: z.ZodObject<{
|
|
116
|
+
deleted: z.ZodNumber;
|
|
117
|
+
collection: z.ZodOptional<z.ZodString>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
type EmbedAuth = z.infer<typeof embedAuthSchema>;
|
|
120
|
+
type RagAuth = z.infer<typeof ragAuthSchema>;
|
|
121
|
+
type RagIngestInput = z.infer<typeof ragIngestInputSchema>;
|
|
122
|
+
type RagIngestOutput = z.infer<typeof ragIngestOutputSchema>;
|
|
123
|
+
type RagRetrieveInput = z.infer<typeof ragRetrieveInputSchema>;
|
|
124
|
+
type RagRetrieveOutput = z.infer<typeof ragRetrieveOutputSchema>;
|
|
125
|
+
type RagDeleteInput = z.infer<typeof ragDeleteInputSchema>;
|
|
126
|
+
type RagDeleteOutput = z.infer<typeof ragDeleteOutputSchema>;
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/modules/rag/client.d.ts
|
|
129
|
+
type RagClientOptions = {
|
|
130
|
+
fetch?: HttpServiceOptions['fetch'] | undefined;
|
|
131
|
+
signal?: HttpServiceOptions['signal'] | undefined;
|
|
132
|
+
};
|
|
133
|
+
declare class RagClient {
|
|
134
|
+
#private;
|
|
135
|
+
constructor(auth: RagAuth, options?: RagClientOptions);
|
|
136
|
+
static fromContext(ctx: ToolContext): RagClient;
|
|
137
|
+
static fromAuth(auth: RagAuth, options?: RagClientOptions): RagClient;
|
|
138
|
+
ingest(input: RagIngestInput): Promise<RagIngestOutput>;
|
|
139
|
+
retrieve(input: RagRetrieveInput): Promise<RagRetrieveOutput>;
|
|
140
|
+
delete(input: RagDeleteInput): Promise<RagDeleteOutput>;
|
|
141
|
+
}
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region src/modules/rag/domain.d.ts
|
|
144
|
+
/**
|
|
145
|
+
* Pure RAG helpers: text chunking (no HTTP).
|
|
146
|
+
*/
|
|
147
|
+
type ChunkOptions = {
|
|
148
|
+
max_chars?: number | undefined;
|
|
149
|
+
overlap?: number | undefined;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Split text into overlapping character windows.
|
|
153
|
+
* Prefers paragraph then newline boundaries when a soft break exists near the end of a window.
|
|
154
|
+
*/
|
|
155
|
+
declare function chunkText(text: string, options?: ChunkOptions): string[];
|
|
156
|
+
declare function chunkId(documentId: string, index: number): string;
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/modules/rag/module.d.ts
|
|
159
|
+
declare const ragIngestTool: ToolDefinition<{
|
|
160
|
+
document_id: string;
|
|
161
|
+
text: string;
|
|
162
|
+
metadata?: Record<string, string | number | boolean | null> | undefined;
|
|
163
|
+
collection?: string | undefined;
|
|
164
|
+
namespace?: string | undefined;
|
|
165
|
+
chunk?: {
|
|
166
|
+
max_chars?: number | undefined;
|
|
167
|
+
overlap?: number | undefined;
|
|
168
|
+
} | undefined;
|
|
169
|
+
}, {
|
|
170
|
+
document_id: string;
|
|
171
|
+
chunk_count: number;
|
|
172
|
+
chunk_ids: string[];
|
|
173
|
+
collection?: string | undefined;
|
|
174
|
+
}>;
|
|
175
|
+
declare const ragRetrieveTool: ToolDefinition<{
|
|
176
|
+
query: string;
|
|
177
|
+
top_k?: number | undefined;
|
|
178
|
+
collection?: string | undefined;
|
|
179
|
+
namespace?: string | undefined;
|
|
180
|
+
filter?: Record<string, unknown> | undefined;
|
|
181
|
+
}, {
|
|
182
|
+
matches: {
|
|
183
|
+
id: string;
|
|
184
|
+
score: number;
|
|
185
|
+
text?: string | undefined;
|
|
186
|
+
document_id?: string | undefined;
|
|
187
|
+
chunk_index?: number | undefined;
|
|
188
|
+
metadata?: Record<string, string | number | boolean | null> | undefined;
|
|
189
|
+
}[];
|
|
190
|
+
collection?: string | undefined;
|
|
191
|
+
}>;
|
|
192
|
+
declare const ragDeleteTool: ToolDefinition<{
|
|
193
|
+
chunk_ids: string[];
|
|
194
|
+
collection?: string | undefined;
|
|
195
|
+
namespace?: string | undefined;
|
|
196
|
+
}, {
|
|
197
|
+
deleted: number;
|
|
198
|
+
collection?: string | undefined;
|
|
199
|
+
}>;
|
|
200
|
+
declare const ragModule: ModuleDefinition<{
|
|
201
|
+
vector_store: {
|
|
202
|
+
base_url: string;
|
|
203
|
+
api_key?: string | undefined;
|
|
204
|
+
default_collection?: string | undefined;
|
|
205
|
+
default_filter?: Record<string, unknown> | undefined;
|
|
206
|
+
provider: "qdrant";
|
|
207
|
+
} | {
|
|
208
|
+
api_key: string;
|
|
209
|
+
base_url: string;
|
|
210
|
+
default_namespace?: string | undefined;
|
|
211
|
+
default_filter?: Record<string, unknown> | undefined;
|
|
212
|
+
provider: "pinecone";
|
|
213
|
+
} | {
|
|
214
|
+
url: string;
|
|
215
|
+
api_key: string;
|
|
216
|
+
default_collection?: string | undefined;
|
|
217
|
+
schema?: string | undefined;
|
|
218
|
+
id_column?: string | undefined;
|
|
219
|
+
embedding_column?: string | undefined;
|
|
220
|
+
metadata_column?: string | undefined;
|
|
221
|
+
match_rpc?: string | undefined;
|
|
222
|
+
default_filter?: Record<string, unknown> | undefined;
|
|
223
|
+
provider: "supabase";
|
|
224
|
+
} | {
|
|
225
|
+
connection_string: string;
|
|
226
|
+
id: string;
|
|
227
|
+
schema_name?: string | undefined;
|
|
228
|
+
default_index?: string | undefined;
|
|
229
|
+
dimension?: number | undefined;
|
|
230
|
+
auto_create_index?: boolean | undefined;
|
|
231
|
+
disable_init?: boolean | undefined;
|
|
232
|
+
default_filter?: Record<string, unknown> | undefined;
|
|
233
|
+
provider: "mastra";
|
|
234
|
+
};
|
|
235
|
+
embed: {
|
|
236
|
+
base_url: string;
|
|
237
|
+
api_key?: string | undefined;
|
|
238
|
+
model: string;
|
|
239
|
+
path?: string | undefined;
|
|
240
|
+
dimensions?: number | undefined;
|
|
241
|
+
};
|
|
242
|
+
default_collection?: string | undefined;
|
|
243
|
+
chunk?: {
|
|
244
|
+
max_chars?: number | undefined;
|
|
245
|
+
overlap?: number | undefined;
|
|
246
|
+
} | undefined;
|
|
247
|
+
}>;
|
|
248
|
+
//#endregion
|
|
249
|
+
export { type ChunkOptions, DEFAULT_CHUNK_MAX_CHARS, DEFAULT_CHUNK_OVERLAP, type EmbedAuth, MAX_CHUNK_MAX_CHARS, MAX_EMBED_BATCH, MAX_INGEST_CHARS, type RagAuth, RagClient, type RagClientOptions, type RagDeleteInput, type RagDeleteOutput, type RagIngestInput, type RagIngestOutput, type RagRetrieveInput, type RagRetrieveOutput, chunkId, chunkText, embedAuthSchema, ragAuthSchema, ragDeleteInputSchema, ragDeleteOutputSchema, ragDeleteTool, ragIngestInputSchema, ragIngestOutputSchema, ragIngestTool, ragModule, ragRetrieveInputSchema, ragRetrieveOutputSchema, ragRetrieveTool, ragRetrievedChunkSchema };
|
|
250
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/modules/rag/contracts.ts","../../../src/modules/rag/client.ts","../../../src/modules/rag/domain.ts","../../../src/modules/rag/module.ts"],"mappings":";;;;;;cAca;cACA;cACA;cACA;cACA;cAEA,iBAAe,EAAA;;;;;;GAW1B,EAAA,KAAA;cAmBW,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAcxB,EAAA,KAAA;cAEW,sBAAoB,EAAA;;;;;;;;;;GAW/B,EAAA,KAAA;cAEW,uBAAqB,EAAA;;;;;GAKhC,EAAA,KAAA;cAEW,wBAAsB,EAAA;;;;;;GAMjC,EAAA,KAAA;cAEW,yBAAuB,EAAA;;;;;;;GAOlC,EAAA,KAAA;cAEW,yBAAuB,EAAA;;;;;;;;;;GAGlC,EAAA,KAAA;cAEW,sBAAoB,EAAA;;;;GAQ/B,EAAA,KAAA;cAEW,uBAAqB,EAAA;;;GAGhC,EAAA,KAAA;KAEU,YAAY,EAAE,aAAa;KAC3B,UAAU,EAAE,aAAa;KACzB,iBAAiB,EAAE,aAAa;KAChC,kBAAkB,EAAE,aAAa;KACjC,mBAAmB,EAAE,aAAa;KAClC,oBAAoB,EAAE,aAAa;KACnC,iBAAiB,EAAE,aAAa;KAChC,kBAAkB,EAAE,aAAa;;;KCxGjC;EACX,QAAQ;EACR,SAAS;;cAGG;;EAOZ,YAAY,MAAM,SAAS,UAAS;SAyB7B,YAAY,KAAK,cAAc;SAQ/B,SAAS,MAAM,SAAS,UAAS,mBAAwB;EAI1D,OAAO,OAAO,iBAAiB,QAAQ;EA0DvC,SAAS,OAAO,mBAAmB,QAAQ;EA4C3C,OAAO,OAAO,iBAAiB,QAAQ;;;;;;;KC3KlC;EACX;EACA;;;;;;iBAOe,UAAU,cAAc,UAAS;iBA6BjC,QAAQ,oBAAoB;;;cC7B/B,eAAA;;;aAAA;;;;;;;;;;;;;cAYA;;;;;;;;;;;;;;;;;cAYA,eAAA;;;;;;;;cAWA"}
|