@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,153 @@
|
|
|
1
|
+
import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
|
|
2
|
+
import { n as requireAuth } from "../../provider-CgDAlg6K.js";
|
|
3
|
+
import { C as scheduleWriteOutputSchema, S as scheduleUpdateInputSchema, _ as scheduleListInputSchema, b as scheduleStateSchema, f as eventBridgeSchedulerAuthSchema, g as scheduleGetOutputSchema, h as scheduleDetailSchema, m as scheduleDeleteOutputSchema, p as scheduleCreateInputSchema, s as EventBridgeSchedulerClient, v as scheduleListOutputSchema, x as scheduleSummarySchema, y as scheduleNameInputSchema } from "../../eventbridge-scheduler-Bh6GqZY2.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/modules/scheduler/contracts.ts
|
|
6
|
+
/**
|
|
7
|
+
* Provider-neutral scheduler seam contracts.
|
|
8
|
+
* Schedule shapes are reused from the EventBridge vendor until another provider
|
|
9
|
+
* requires a broader shared contract.
|
|
10
|
+
*/
|
|
11
|
+
const eventBridgeSchedulerSeamAuthSchema = eventBridgeSchedulerAuthSchema.extend({ provider: z.literal("eventbridge") });
|
|
12
|
+
const schedulerAuthSchema = eventBridgeSchedulerSeamAuthSchema;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/modules/scheduler/providers/eventbridge.ts
|
|
15
|
+
var EventBridgeSchedulerProvider = class {
|
|
16
|
+
#client;
|
|
17
|
+
constructor(auth, options = {}) {
|
|
18
|
+
const { provider: _provider, ...vendorAuth } = auth;
|
|
19
|
+
this.#client = new EventBridgeSchedulerClient(vendorAuth, options);
|
|
20
|
+
}
|
|
21
|
+
create(input) {
|
|
22
|
+
return this.#client.create(input);
|
|
23
|
+
}
|
|
24
|
+
update(input) {
|
|
25
|
+
return this.#client.update(input);
|
|
26
|
+
}
|
|
27
|
+
get(input) {
|
|
28
|
+
return this.#client.get(input);
|
|
29
|
+
}
|
|
30
|
+
list(input = {}) {
|
|
31
|
+
return this.#client.list(input);
|
|
32
|
+
}
|
|
33
|
+
delete(input) {
|
|
34
|
+
return this.#client.delete(input);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/modules/scheduler/client.ts
|
|
39
|
+
function transportOptions(ctx) {
|
|
40
|
+
return {
|
|
41
|
+
...ctx.fetch && { fetch: ctx.fetch },
|
|
42
|
+
...ctx.signal && { signal: ctx.signal }
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function providerFor(auth, ctx) {
|
|
46
|
+
switch (auth.provider) {
|
|
47
|
+
case "eventbridge": return new EventBridgeSchedulerProvider(auth, transportOptions(ctx));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
var SchedulerClient = class SchedulerClient {
|
|
51
|
+
#ops;
|
|
52
|
+
constructor(ops) {
|
|
53
|
+
this.#ops = ops;
|
|
54
|
+
}
|
|
55
|
+
static fromContext(ctx) {
|
|
56
|
+
const auth = requireAuth(ctx, schedulerAuthSchema);
|
|
57
|
+
return new SchedulerClient(providerFor(auth, ctx));
|
|
58
|
+
}
|
|
59
|
+
static fromAuth(auth, ctx = {}) {
|
|
60
|
+
return new SchedulerClient(providerFor(auth, ctx));
|
|
61
|
+
}
|
|
62
|
+
create(input) {
|
|
63
|
+
return this.#ops.create(input);
|
|
64
|
+
}
|
|
65
|
+
update(input) {
|
|
66
|
+
return this.#ops.update(input);
|
|
67
|
+
}
|
|
68
|
+
get(input) {
|
|
69
|
+
return this.#ops.get(input);
|
|
70
|
+
}
|
|
71
|
+
list(input = {}) {
|
|
72
|
+
return this.#ops.list(input);
|
|
73
|
+
}
|
|
74
|
+
delete(input) {
|
|
75
|
+
return this.#ops.delete(input);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/modules/scheduler/module.ts
|
|
80
|
+
const schedulerCreateTool = defineTool({
|
|
81
|
+
id: "scheduler-create",
|
|
82
|
+
name: "createSchedule",
|
|
83
|
+
description: "Create a schedule on the bound provider for an opaque task reference. Supports one-time, recurring, and calendar expressions accepted by that provider.",
|
|
84
|
+
inputSchema: scheduleCreateInputSchema,
|
|
85
|
+
outputSchema: scheduleWriteOutputSchema,
|
|
86
|
+
sideEffect: "write",
|
|
87
|
+
runtime: "both",
|
|
88
|
+
execute: async (input, ctx) => SchedulerClient.fromContext(ctx).create(input)
|
|
89
|
+
});
|
|
90
|
+
const schedulerUpdateTool = defineTool({
|
|
91
|
+
id: "scheduler-update",
|
|
92
|
+
name: "updateSchedule",
|
|
93
|
+
description: "Replace an existing schedule on the bound provider. Read the schedule first when fields not supplied by this update must be retained.",
|
|
94
|
+
inputSchema: scheduleUpdateInputSchema,
|
|
95
|
+
outputSchema: scheduleWriteOutputSchema,
|
|
96
|
+
sideEffect: "write",
|
|
97
|
+
runtime: "both",
|
|
98
|
+
execute: async (input, ctx) => SchedulerClient.fromContext(ctx).update(input)
|
|
99
|
+
});
|
|
100
|
+
const schedulerGetTool = defineTool({
|
|
101
|
+
id: "scheduler-get",
|
|
102
|
+
name: "getSchedule",
|
|
103
|
+
description: "Get one schedule by name from the bound provider, including its task reference when available.",
|
|
104
|
+
inputSchema: scheduleNameInputSchema,
|
|
105
|
+
outputSchema: scheduleGetOutputSchema,
|
|
106
|
+
sideEffect: "read",
|
|
107
|
+
runtime: "both",
|
|
108
|
+
execute: async (input, ctx) => SchedulerClient.fromContext(ctx).get(input)
|
|
109
|
+
});
|
|
110
|
+
const schedulerListTool = defineTool({
|
|
111
|
+
id: "scheduler-list",
|
|
112
|
+
name: "listSchedules",
|
|
113
|
+
description: "List schedules from the bound provider with optional name, state, and pagination filters.",
|
|
114
|
+
inputSchema: scheduleListInputSchema,
|
|
115
|
+
outputSchema: scheduleListOutputSchema,
|
|
116
|
+
sideEffect: "read",
|
|
117
|
+
runtime: "both",
|
|
118
|
+
execute: async (input, ctx) => SchedulerClient.fromContext(ctx).list(input)
|
|
119
|
+
});
|
|
120
|
+
const schedulerDeleteTool = defineTool({
|
|
121
|
+
id: "scheduler-delete",
|
|
122
|
+
name: "deleteSchedule",
|
|
123
|
+
description: "Delete one schedule by name from the bound provider.",
|
|
124
|
+
inputSchema: scheduleNameInputSchema,
|
|
125
|
+
outputSchema: scheduleDeleteOutputSchema,
|
|
126
|
+
sideEffect: "delete",
|
|
127
|
+
runtime: "both",
|
|
128
|
+
execute: async (input, ctx) => SchedulerClient.fromContext(ctx).delete(input)
|
|
129
|
+
});
|
|
130
|
+
const schedulerModule = defineModule({
|
|
131
|
+
id: "scheduler",
|
|
132
|
+
title: "Scheduler",
|
|
133
|
+
description: "Create, replace, inspect, list, and delete schedules through the bound scheduling provider.",
|
|
134
|
+
runtime: "both",
|
|
135
|
+
auth: {
|
|
136
|
+
type: "custom",
|
|
137
|
+
schema: schedulerAuthSchema
|
|
138
|
+
},
|
|
139
|
+
categories: ["scheduler", "async"],
|
|
140
|
+
classification: "standard",
|
|
141
|
+
tags: ["cron", "eventbridge"],
|
|
142
|
+
tools: [
|
|
143
|
+
schedulerCreateTool,
|
|
144
|
+
schedulerUpdateTool,
|
|
145
|
+
schedulerGetTool,
|
|
146
|
+
schedulerListTool,
|
|
147
|
+
schedulerDeleteTool
|
|
148
|
+
]
|
|
149
|
+
});
|
|
150
|
+
//#endregion
|
|
151
|
+
export { EventBridgeSchedulerProvider, SchedulerClient, eventBridgeSchedulerSeamAuthSchema, scheduleCreateInputSchema, scheduleDeleteOutputSchema, scheduleDetailSchema, scheduleGetOutputSchema, scheduleListInputSchema, scheduleListOutputSchema, scheduleNameInputSchema, scheduleStateSchema, scheduleSummarySchema, scheduleUpdateInputSchema, scheduleWriteOutputSchema, schedulerAuthSchema, schedulerCreateTool, schedulerDeleteTool, schedulerGetTool, schedulerListTool, schedulerModule, schedulerUpdateTool };
|
|
152
|
+
|
|
153
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["#client","#ops"],"sources":["../../../src/modules/scheduler/contracts.ts","../../../src/modules/scheduler/providers/eventbridge.ts","../../../src/modules/scheduler/client.ts","../../../src/modules/scheduler/module.ts"],"sourcesContent":["/**\n * Provider-neutral scheduler seam contracts.\n * Schedule shapes are reused from the EventBridge vendor until another provider\n * requires a broader shared contract.\n */\n\nimport { z } from 'zod'\n\nimport {\n\teventBridgeSchedulerAuthSchema,\n\tscheduleCreateInputSchema,\n\tscheduleDeleteOutputSchema,\n\tscheduleDetailSchema,\n\tscheduleGetOutputSchema,\n\tscheduleListInputSchema,\n\tscheduleListOutputSchema,\n\tscheduleNameInputSchema,\n\tscheduleStateSchema,\n\tscheduleSummarySchema,\n\tscheduleUpdateInputSchema,\n\tscheduleWriteOutputSchema\n} from '../../vendors/eventbridge-scheduler'\nimport type {\n\tScheduleCreateInput,\n\tScheduleDeleteOutput,\n\tScheduleGetOutput,\n\tScheduleListInput,\n\tScheduleListOutput,\n\tScheduleNameInput,\n\tScheduleUpdateInput,\n\tScheduleWriteOutput\n} from '../../vendors/eventbridge-scheduler'\n\nexport {\n\tscheduleCreateInputSchema,\n\tscheduleDeleteOutputSchema,\n\tscheduleDetailSchema,\n\tscheduleGetOutputSchema,\n\tscheduleListInputSchema,\n\tscheduleListOutputSchema,\n\tscheduleNameInputSchema,\n\tscheduleStateSchema,\n\tscheduleSummarySchema,\n\tscheduleUpdateInputSchema,\n\tscheduleWriteOutputSchema\n}\nexport type {\n\tScheduleCreateInput,\n\tScheduleDeleteOutput,\n\tScheduleDetail,\n\tScheduleGetOutput,\n\tScheduleListInput,\n\tScheduleListOutput,\n\tScheduleNameInput,\n\tScheduleState,\n\tScheduleSummary,\n\tScheduleUpdateInput,\n\tScheduleWriteOutput\n} from '../../vendors/eventbridge-scheduler'\n\nexport const eventBridgeSchedulerSeamAuthSchema = eventBridgeSchedulerAuthSchema.extend({\n\tprovider: z.literal('eventbridge')\n})\n\nexport const schedulerAuthSchema = eventBridgeSchedulerSeamAuthSchema\n\nexport type EventBridgeSchedulerSeamAuth = z.infer<typeof eventBridgeSchedulerSeamAuthSchema>\nexport type SchedulerAuth = z.infer<typeof schedulerAuthSchema>\n\nexport type SchedulerOps = {\n\tcreate(input: ScheduleCreateInput): Promise<ScheduleWriteOutput>\n\tupdate(input: ScheduleUpdateInput): Promise<ScheduleWriteOutput>\n\tget(input: ScheduleNameInput): Promise<ScheduleGetOutput>\n\tlist(input?: ScheduleListInput): Promise<ScheduleListOutput>\n\tdelete(input: ScheduleNameInput): Promise<ScheduleDeleteOutput>\n}\n","import type { HttpServiceOptions } from '../../../transport/http-service'\nimport { EventBridgeSchedulerClient } from '../../../vendors/eventbridge-scheduler'\nimport type {\n\tEventBridgeSchedulerSeamAuth,\n\tScheduleCreateInput,\n\tScheduleListInput,\n\tScheduleNameInput,\n\tScheduleUpdateInput,\n\tSchedulerOps\n} from '../contracts'\n\nexport type EventBridgeSchedulerProviderOptions = Pick<HttpServiceOptions, 'fetch' | 'signal'>\n\nexport class EventBridgeSchedulerProvider implements SchedulerOps {\n\treadonly #client: EventBridgeSchedulerClient\n\n\tconstructor(auth: EventBridgeSchedulerSeamAuth, options: EventBridgeSchedulerProviderOptions = {}) {\n\t\tconst { provider: _provider, ...vendorAuth } = auth\n\t\tthis.#client = new EventBridgeSchedulerClient(vendorAuth, options)\n\t}\n\n\tcreate(input: ScheduleCreateInput) {\n\t\treturn this.#client.create(input)\n\t}\n\n\tupdate(input: ScheduleUpdateInput) {\n\t\treturn this.#client.update(input)\n\t}\n\n\tget(input: ScheduleNameInput) {\n\t\treturn this.#client.get(input)\n\t}\n\n\tlist(input: ScheduleListInput = {}) {\n\t\treturn this.#client.list(input)\n\t}\n\n\tdelete(input: ScheduleNameInput) {\n\t\treturn this.#client.delete(input)\n\t}\n}\n","import { requireAuth } from '../../core/provider'\nimport type { ToolContext } from '../../core/types'\nimport type {\n\tScheduleCreateInput,\n\tScheduleListInput,\n\tScheduleNameInput,\n\tScheduleUpdateInput,\n\tSchedulerAuth,\n\tSchedulerOps\n} from './contracts'\nimport { schedulerAuthSchema } from './contracts'\nimport { EventBridgeSchedulerProvider } from './providers/eventbridge'\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: SchedulerAuth, ctx: ToolContext): SchedulerOps {\n\tswitch (auth.provider) {\n\t\tcase 'eventbridge':\n\t\t\treturn new EventBridgeSchedulerProvider(auth, transportOptions(ctx))\n\t}\n}\n\nexport class SchedulerClient implements SchedulerOps {\n\treadonly #ops: SchedulerOps\n\n\tconstructor(ops: SchedulerOps) {\n\t\tthis.#ops = ops\n\t}\n\n\tstatic fromContext(ctx: ToolContext): SchedulerClient {\n\t\tconst auth = requireAuth(ctx, schedulerAuthSchema)\n\t\treturn new SchedulerClient(providerFor(auth, ctx))\n\t}\n\n\tstatic fromAuth(auth: SchedulerAuth, ctx: ToolContext = {}): SchedulerClient {\n\t\treturn new SchedulerClient(providerFor(auth, ctx))\n\t}\n\n\tcreate(input: ScheduleCreateInput) {\n\t\treturn this.#ops.create(input)\n\t}\n\n\tupdate(input: ScheduleUpdateInput) {\n\t\treturn this.#ops.update(input)\n\t}\n\n\tget(input: ScheduleNameInput) {\n\t\treturn this.#ops.get(input)\n\t}\n\n\tlist(input: ScheduleListInput = {}) {\n\t\treturn this.#ops.list(input)\n\t}\n\n\tdelete(input: ScheduleNameInput) {\n\t\treturn this.#ops.delete(input)\n\t}\n}\n","import { defineModule, defineTool } from '../../core/define'\nimport { SchedulerClient } from './client'\nimport {\n\tscheduleCreateInputSchema,\n\tscheduleDeleteOutputSchema,\n\tscheduleGetOutputSchema,\n\tscheduleListInputSchema,\n\tscheduleListOutputSchema,\n\tscheduleNameInputSchema,\n\tscheduleUpdateInputSchema,\n\tscheduleWriteOutputSchema,\n\tschedulerAuthSchema\n} from './contracts'\n\nexport const schedulerCreateTool = defineTool({\n\tid: 'scheduler-create',\n\tname: 'createSchedule',\n\tdescription:\n\t\t'Create a schedule on the bound provider for an opaque task reference. Supports one-time, recurring, and calendar expressions accepted by that provider.',\n\tinputSchema: scheduleCreateInputSchema,\n\toutputSchema: scheduleWriteOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => SchedulerClient.fromContext(ctx).create(input)\n})\n\nexport const schedulerUpdateTool = defineTool({\n\tid: 'scheduler-update',\n\tname: 'updateSchedule',\n\tdescription:\n\t\t'Replace an existing schedule on the bound provider. Read the schedule first when fields not supplied by this update must be retained.',\n\tinputSchema: scheduleUpdateInputSchema,\n\toutputSchema: scheduleWriteOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => SchedulerClient.fromContext(ctx).update(input)\n})\n\nexport const schedulerGetTool = defineTool({\n\tid: 'scheduler-get',\n\tname: 'getSchedule',\n\tdescription: 'Get one schedule by name from the bound provider, including its task reference when available.',\n\tinputSchema: scheduleNameInputSchema,\n\toutputSchema: scheduleGetOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => SchedulerClient.fromContext(ctx).get(input)\n})\n\nexport const schedulerListTool = defineTool({\n\tid: 'scheduler-list',\n\tname: 'listSchedules',\n\tdescription: 'List schedules from the bound provider with optional name, state, and pagination filters.',\n\tinputSchema: scheduleListInputSchema,\n\toutputSchema: scheduleListOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => SchedulerClient.fromContext(ctx).list(input)\n})\n\nexport const schedulerDeleteTool = defineTool({\n\tid: 'scheduler-delete',\n\tname: 'deleteSchedule',\n\tdescription: 'Delete one schedule by name from the bound provider.',\n\tinputSchema: scheduleNameInputSchema,\n\toutputSchema: scheduleDeleteOutputSchema,\n\tsideEffect: 'delete',\n\truntime: 'both',\n\texecute: async (input, ctx) => SchedulerClient.fromContext(ctx).delete(input)\n})\n\nexport const schedulerModule = defineModule({\n\tid: 'scheduler',\n\ttitle: 'Scheduler',\n\tdescription: 'Create, replace, inspect, list, and delete schedules through the bound scheduling provider.',\n\truntime: 'both',\n\tauth: { type: 'custom', schema: schedulerAuthSchema },\n\tcategories: ['scheduler', 'async'],\n\tclassification: 'standard',\n\ttags: ['cron', 'eventbridge'],\n\ttools: [schedulerCreateTool, schedulerUpdateTool, schedulerGetTool, schedulerListTool, schedulerDeleteTool]\n})\n"],"mappings":";;;;;;;;;;AA4DA,MAAa,qCAAqC,+BAA+B,OAAO,EACvF,UAAU,EAAE,QAAQ,aAAa,EAClC,CAAC;AAED,MAAa,sBAAsB;;;ACnDnC,IAAa,+BAAb,MAAkE;CACjE;CAEA,YAAY,MAAoC,UAA+C,CAAC,GAAG;EAClG,MAAM,EAAE,UAAU,WAAW,GAAG,eAAe;EAC/C,KAAKA,UAAU,IAAI,2BAA2B,YAAY,OAAO;CAClE;CAEA,OAAO,OAA4B;EAClC,OAAO,KAAKA,QAAQ,OAAO,KAAK;CACjC;CAEA,OAAO,OAA4B;EACl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inition, o as ToolContext, s as ToolDefinition } from "../../types-Ccb0DXY9.js";
|
|
2
|
+
import "../../index-CZX5OeOF.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/modules/skills/contracts.d.ts
|
|
5
|
+
declare const MAX_SKILLS = 200;
|
|
6
|
+
declare const MAX_INSTRUCTIONS_CHARS = 100000;
|
|
7
|
+
declare const MAX_SUPPORTING_FILES = 20;
|
|
8
|
+
declare const MAX_SUPPORTING_FILE_CHARS = 50000;
|
|
9
|
+
declare const MAX_SEARCH_RESULTS = 50;
|
|
10
|
+
declare const skillSupportingFileSchema: z.ZodObject<{
|
|
11
|
+
path: z.ZodString;
|
|
12
|
+
media_type: z.ZodOptional<z.ZodString>;
|
|
13
|
+
text: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
declare const skillDefinitionSchema: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
title: z.ZodString;
|
|
18
|
+
description: z.ZodString;
|
|
19
|
+
instructions: z.ZodString;
|
|
20
|
+
version: z.ZodOptional<z.ZodString>;
|
|
21
|
+
required_tool_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
+
required_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
|
+
input_expectations: z.ZodOptional<z.ZodString>;
|
|
25
|
+
output_expectations: z.ZodOptional<z.ZodString>;
|
|
26
|
+
supporting_files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
|
+
path: z.ZodString;
|
|
28
|
+
media_type: z.ZodOptional<z.ZodString>;
|
|
29
|
+
text: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
type SkillDefinition = z.infer<typeof skillDefinitionSchema>;
|
|
33
|
+
type SkillSupportingFile = z.infer<typeof skillSupportingFileSchema>;
|
|
34
|
+
/** Host binds the resolved catalog for this agent/org run. */
|
|
35
|
+
declare const skillsAuthSchema: z.ZodObject<{
|
|
36
|
+
skills: z.ZodArray<z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
title: z.ZodString;
|
|
39
|
+
description: z.ZodString;
|
|
40
|
+
instructions: z.ZodString;
|
|
41
|
+
version: z.ZodOptional<z.ZodString>;
|
|
42
|
+
required_tool_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
|
+
required_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
44
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
45
|
+
input_expectations: z.ZodOptional<z.ZodString>;
|
|
46
|
+
output_expectations: z.ZodOptional<z.ZodString>;
|
|
47
|
+
supporting_files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
48
|
+
path: z.ZodString;
|
|
49
|
+
media_type: z.ZodOptional<z.ZodString>;
|
|
50
|
+
text: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>>>;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
type SkillsAuth = z.infer<typeof skillsAuthSchema>;
|
|
55
|
+
declare const skillSummarySchema: z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
title: z.ZodString;
|
|
58
|
+
description: z.ZodString;
|
|
59
|
+
version: z.ZodOptional<z.ZodString>;
|
|
60
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
type SkillSummary = z.infer<typeof skillSummarySchema>;
|
|
63
|
+
declare const skillsListInputSchema: z.ZodObject<{
|
|
64
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
declare const skillsListOutputSchema: z.ZodObject<{
|
|
67
|
+
skills: z.ZodArray<z.ZodObject<{
|
|
68
|
+
id: z.ZodString;
|
|
69
|
+
title: z.ZodString;
|
|
70
|
+
description: z.ZodString;
|
|
71
|
+
version: z.ZodOptional<z.ZodString>;
|
|
72
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
declare const skillsGetInputSchema: z.ZodObject<{
|
|
76
|
+
id: z.ZodString;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
declare const skillsGetOutputSchema: z.ZodObject<{
|
|
79
|
+
skill: z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
title: z.ZodString;
|
|
82
|
+
description: z.ZodString;
|
|
83
|
+
instructions: z.ZodString;
|
|
84
|
+
version: z.ZodOptional<z.ZodString>;
|
|
85
|
+
required_tool_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
86
|
+
required_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
|
+
input_expectations: z.ZodOptional<z.ZodString>;
|
|
89
|
+
output_expectations: z.ZodOptional<z.ZodString>;
|
|
90
|
+
supporting_files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
91
|
+
path: z.ZodString;
|
|
92
|
+
media_type: z.ZodOptional<z.ZodString>;
|
|
93
|
+
text: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>>>;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
declare const skillsSearchInputSchema: z.ZodObject<{
|
|
98
|
+
query: z.ZodString;
|
|
99
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
100
|
+
limit: z.ZodOptional<z.ZodInt>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
declare const skillsSearchOutputSchema: z.ZodObject<{
|
|
103
|
+
skills: z.ZodArray<z.ZodObject<{
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
title: z.ZodString;
|
|
106
|
+
description: z.ZodString;
|
|
107
|
+
version: z.ZodOptional<z.ZodString>;
|
|
108
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
type SkillsListInput = z.infer<typeof skillsListInputSchema>;
|
|
112
|
+
type SkillsListOutput = z.infer<typeof skillsListOutputSchema>;
|
|
113
|
+
type SkillsGetInput = z.infer<typeof skillsGetInputSchema>;
|
|
114
|
+
type SkillsGetOutput = z.infer<typeof skillsGetOutputSchema>;
|
|
115
|
+
type SkillsSearchInput = z.infer<typeof skillsSearchInputSchema>;
|
|
116
|
+
type SkillsSearchOutput = z.infer<typeof skillsSearchOutputSchema>;
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/modules/skills/client.d.ts
|
|
119
|
+
declare class SkillsClient {
|
|
120
|
+
#private;
|
|
121
|
+
constructor(auth: SkillsAuth);
|
|
122
|
+
static fromContext(ctx: ToolContext): SkillsClient;
|
|
123
|
+
list(input?: SkillsListInput): SkillsListOutput;
|
|
124
|
+
get(input: SkillsGetInput): SkillsGetOutput;
|
|
125
|
+
search(input: SkillsSearchInput): SkillsSearchOutput;
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/modules/skills/domain.d.ts
|
|
129
|
+
declare function toSummary(skill: SkillDefinition): SkillSummary;
|
|
130
|
+
declare function listSkills(catalog: readonly SkillDefinition[], tag?: string): SkillSummary[];
|
|
131
|
+
declare function getSkill(catalog: readonly SkillDefinition[], id: string): SkillDefinition;
|
|
132
|
+
declare function searchSkills(catalog: readonly SkillDefinition[], options: {
|
|
133
|
+
query: string;
|
|
134
|
+
tags?: readonly string[] | undefined;
|
|
135
|
+
limit?: number | undefined;
|
|
136
|
+
}): SkillSummary[];
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/modules/skills/module.d.ts
|
|
139
|
+
declare const skillsListTool: ToolDefinition<{
|
|
140
|
+
tag?: string | undefined;
|
|
141
|
+
}, {
|
|
142
|
+
skills: {
|
|
143
|
+
id: string;
|
|
144
|
+
title: string;
|
|
145
|
+
description: string;
|
|
146
|
+
version?: string | undefined;
|
|
147
|
+
tags?: string[] | undefined;
|
|
148
|
+
}[];
|
|
149
|
+
}>;
|
|
150
|
+
declare const skillsGetTool: ToolDefinition<{
|
|
151
|
+
id: string;
|
|
152
|
+
}, {
|
|
153
|
+
skill: {
|
|
154
|
+
id: string;
|
|
155
|
+
title: string;
|
|
156
|
+
description: string;
|
|
157
|
+
instructions: string;
|
|
158
|
+
version?: string | undefined;
|
|
159
|
+
required_tool_ids?: string[] | undefined;
|
|
160
|
+
required_tags?: string[] | undefined;
|
|
161
|
+
tags?: string[] | undefined;
|
|
162
|
+
input_expectations?: string | undefined;
|
|
163
|
+
output_expectations?: string | undefined;
|
|
164
|
+
supporting_files?: {
|
|
165
|
+
path: string;
|
|
166
|
+
media_type?: string | undefined;
|
|
167
|
+
text?: string | undefined;
|
|
168
|
+
}[] | undefined;
|
|
169
|
+
};
|
|
170
|
+
}>;
|
|
171
|
+
declare const skillsSearchTool: ToolDefinition<{
|
|
172
|
+
query: string;
|
|
173
|
+
tags?: string[] | undefined;
|
|
174
|
+
limit?: number | undefined;
|
|
175
|
+
}, {
|
|
176
|
+
skills: {
|
|
177
|
+
id: string;
|
|
178
|
+
title: string;
|
|
179
|
+
description: string;
|
|
180
|
+
version?: string | undefined;
|
|
181
|
+
tags?: string[] | undefined;
|
|
182
|
+
}[];
|
|
183
|
+
}>;
|
|
184
|
+
declare const skillsModule: ModuleDefinition<{
|
|
185
|
+
skills: {
|
|
186
|
+
id: string;
|
|
187
|
+
title: string;
|
|
188
|
+
description: string;
|
|
189
|
+
instructions: string;
|
|
190
|
+
version?: string | undefined;
|
|
191
|
+
required_tool_ids?: string[] | undefined;
|
|
192
|
+
required_tags?: string[] | undefined;
|
|
193
|
+
tags?: string[] | undefined;
|
|
194
|
+
input_expectations?: string | undefined;
|
|
195
|
+
output_expectations?: string | undefined;
|
|
196
|
+
supporting_files?: {
|
|
197
|
+
path: string;
|
|
198
|
+
media_type?: string | undefined;
|
|
199
|
+
text?: string | undefined;
|
|
200
|
+
}[] | undefined;
|
|
201
|
+
}[];
|
|
202
|
+
}>;
|
|
203
|
+
//#endregion
|
|
204
|
+
export { MAX_INSTRUCTIONS_CHARS, MAX_SEARCH_RESULTS, MAX_SKILLS, MAX_SUPPORTING_FILES, MAX_SUPPORTING_FILE_CHARS, type SkillDefinition, type SkillSummary, type SkillSupportingFile, type SkillsAuth, SkillsClient, type SkillsGetInput, type SkillsGetOutput, type SkillsListInput, type SkillsListOutput, type SkillsSearchInput, type SkillsSearchOutput, getSkill, listSkills, searchSkills, skillDefinitionSchema, skillSummarySchema, skillSupportingFileSchema, skillsAuthSchema, skillsGetInputSchema, skillsGetOutputSchema, skillsGetTool, skillsListInputSchema, skillsListOutputSchema, skillsListTool, skillsModule, skillsSearchInputSchema, skillsSearchOutputSchema, skillsSearchTool, toSummary };
|
|
205
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/modules/skills/contracts.ts","../../../src/modules/skills/client.ts","../../../src/modules/skills/domain.ts","../../../src/modules/skills/module.ts"],"mappings":";;;;cAOa;cACA;cACA;cACA;cACA;cAQA,2BAAyB,EAAA;;;;GAIpC,EAAA,KAAA;cAEW,uBAAqB,EAAA;;;;;;;;;;;;;;;;GAoBhC,EAAA,KAAA;KAEU,kBAAkB,EAAE,aAAa;KACjC,sBAAsB,EAAE,aAAa;;cAGpC,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;GAK3B,EAAA,KAAA;KAEU,aAAa,EAAE,aAAa;cAE3B,oBAAkB,EAAA;;;;;;GAM7B,EAAA,KAAA;KAEU,eAAe,EAAE,aAAa;cAE7B,uBAAqB,EAAA;;GAEhC,EAAA,KAAA;cAEW,wBAAsB,EAAA;;;;;;;;GAEjC,EAAA,KAAA;cAEW,sBAAoB,EAAA;;GAE/B,EAAA,KAAA;cAEW,uBAAqB,EAAA;;;;;;;;;;;;;;;;;;GAEhC,EAAA,KAAA;cAEW,yBAAuB,EAAA;;;;GAIlC,EAAA,KAAA;cAEW,0BAAwB,EAAA;;;;;;;;GAEnC,EAAA,KAAA;KAEU,kBAAkB,EAAE,aAAa;KACjC,mBAAmB,EAAE,aAAa;KAClC,iBAAiB,EAAE,aAAa;KAChC,kBAAkB,EAAE,aAAa;KACjC,oBAAoB,EAAE,aAAa;KACnC,qBAAqB,EAAE,aAAa;;;cCjFnC;;EAGZ,YAAY,MAAM;SAWX,YAAY,KAAK,cAAc;EAKtC,KAAK,QAAO,kBAAuB;EAInC,IAAI,OAAO,iBAAiB;EAI5B,OAAO,OAAO,oBAAoB;;;;iBCtCnB,UAAU,OAAO,kBAAkB;iBAWnC,WAAW,kBAAkB,mBAAmB,eAAe;iBAQ/D,SAAS,kBAAkB,mBAAmB,aAAa;iBAgD3D,aACf,kBAAkB,mBAClB;EAAW;EAAe;EAAsC;IAC9D;;;cChEU,gBAAA;;;;;;;;;;;cAYA,eAAA;;;;;;;;;;;;;;;;;;;;;cAYA,kBAAA;;;;;;;;;;;;;cAYA,cAAA"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { t as ToolError } from "../../errors-DoSpNHvs.js";
|
|
2
|
+
import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
|
|
3
|
+
import { n as requireAuth } from "../../provider-CgDAlg6K.js";
|
|
4
|
+
import { isString } from "es-toolkit";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
//#region src/modules/skills/contracts.ts
|
|
7
|
+
/**
|
|
8
|
+
* Portable skill definitions + host-bound catalog auth.
|
|
9
|
+
* Org assignment / persistence stays on the host.
|
|
10
|
+
*/
|
|
11
|
+
const MAX_SKILLS = 200;
|
|
12
|
+
const MAX_INSTRUCTIONS_CHARS = 1e5;
|
|
13
|
+
const MAX_SUPPORTING_FILES = 20;
|
|
14
|
+
const MAX_SUPPORTING_FILE_CHARS = 5e4;
|
|
15
|
+
const MAX_SEARCH_RESULTS = 50;
|
|
16
|
+
const kebabId = z.string().min(1).max(128).regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "Must be lowercase kebab-case");
|
|
17
|
+
const skillSupportingFileSchema = z.object({
|
|
18
|
+
path: z.string().min(1).max(512).describe("Relative path for the supporting file"),
|
|
19
|
+
media_type: z.string().min(1).max(200).optional().describe("MIME type when known"),
|
|
20
|
+
text: z.string().max(MAX_SUPPORTING_FILE_CHARS).optional().describe("Small text body for the supporting file")
|
|
21
|
+
});
|
|
22
|
+
const skillDefinitionSchema = z.object({
|
|
23
|
+
id: kebabId.describe("Stable skill id (kebab-case)"),
|
|
24
|
+
title: z.string().min(1).max(200).describe("Short display title"),
|
|
25
|
+
description: z.string().min(1).max(2e3).describe("When to use this skill"),
|
|
26
|
+
instructions: z.string().min(1).max(MAX_INSTRUCTIONS_CHARS).describe("Full skill instructions (markdown or plain text)"),
|
|
27
|
+
version: z.string().min(1).max(64).optional().describe("Skill version string"),
|
|
28
|
+
required_tool_ids: z.array(kebabId).max(100).optional().describe("Tool ids this skill expects to be available"),
|
|
29
|
+
required_tags: z.array(z.string().min(1).max(64)).max(50).optional().describe("Required catalog tags"),
|
|
30
|
+
tags: z.array(z.string().min(1).max(64)).max(50).optional().describe("Searchable tags"),
|
|
31
|
+
input_expectations: z.string().max(5e3).optional().describe("What inputs the skill expects"),
|
|
32
|
+
output_expectations: z.string().max(5e3).optional().describe("What outputs the skill should produce"),
|
|
33
|
+
supporting_files: z.array(skillSupportingFileSchema).max(20).optional().describe("Optional small supporting text files")
|
|
34
|
+
});
|
|
35
|
+
/** Host binds the resolved catalog for this agent/org run. */
|
|
36
|
+
const skillsAuthSchema = z.object({ skills: z.array(skillDefinitionSchema).max(200).describe("Host-resolved skill catalog for this bind (assignment stays host-side)") });
|
|
37
|
+
const skillSummarySchema = z.object({
|
|
38
|
+
id: z.string().describe("Skill id"),
|
|
39
|
+
title: z.string().describe("Display title"),
|
|
40
|
+
description: z.string().describe("When to use"),
|
|
41
|
+
version: z.string().optional().describe("Version when set"),
|
|
42
|
+
tags: z.array(z.string()).optional().describe("Tags when set")
|
|
43
|
+
});
|
|
44
|
+
const skillsListInputSchema = z.object({ tag: z.string().min(1).max(64).optional().describe("Optional tag filter (exact match)") });
|
|
45
|
+
const skillsListOutputSchema = z.object({ skills: z.array(skillSummarySchema).describe("Catalog summaries (instructions omitted)") });
|
|
46
|
+
const skillsGetInputSchema = z.object({ id: kebabId.describe("Skill id to load") });
|
|
47
|
+
const skillsGetOutputSchema = z.object({ skill: skillDefinitionSchema.describe("Full skill definition") });
|
|
48
|
+
const skillsSearchInputSchema = z.object({
|
|
49
|
+
query: z.string().min(1).max(500).describe("Free-text query over title, description, tags, instructions"),
|
|
50
|
+
tags: z.array(z.string().min(1).max(64)).max(20).optional().describe("Optional tags that must all match"),
|
|
51
|
+
limit: z.int().min(1).max(50).optional().describe("Max results (default 10)")
|
|
52
|
+
});
|
|
53
|
+
const skillsSearchOutputSchema = z.object({ skills: z.array(skillSummarySchema).describe("Matching skill summaries, best first") });
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/modules/skills/domain.ts
|
|
56
|
+
/**
|
|
57
|
+
* Pure skill catalog helpers (no HTTP).
|
|
58
|
+
*/
|
|
59
|
+
function toSummary(skill) {
|
|
60
|
+
const out = {
|
|
61
|
+
id: skill.id,
|
|
62
|
+
title: skill.title,
|
|
63
|
+
description: skill.description
|
|
64
|
+
};
|
|
65
|
+
if (skill.version !== void 0) out.version = skill.version;
|
|
66
|
+
if (skill.tags !== void 0) out.tags = skill.tags;
|
|
67
|
+
return out;
|
|
68
|
+
}
|
|
69
|
+
function listSkills(catalog, tag) {
|
|
70
|
+
return (tag === void 0 ? catalog : catalog.filter((s) => (s.tags ?? []).some((t) => t.toLowerCase() === tag.toLowerCase()))).map(toSummary);
|
|
71
|
+
}
|
|
72
|
+
function getSkill(catalog, id) {
|
|
73
|
+
const found = catalog.find((s) => s.id === id);
|
|
74
|
+
if (!found) throw new ToolError(`Skill not found: ${id}`, {
|
|
75
|
+
code: "not_found",
|
|
76
|
+
details: { id }
|
|
77
|
+
});
|
|
78
|
+
return found;
|
|
79
|
+
}
|
|
80
|
+
function fieldScore(haystack, token, weight) {
|
|
81
|
+
return haystack.includes(token) ? weight : 0;
|
|
82
|
+
}
|
|
83
|
+
function scoreSkill(skill, query, requiredTags) {
|
|
84
|
+
const q = query.toLowerCase().trim();
|
|
85
|
+
const tags = (skill.tags ?? []).map((t) => t.toLowerCase());
|
|
86
|
+
for (const t of requiredTags) if (!tags.includes(t.toLowerCase())) return -1;
|
|
87
|
+
if (q.length === 0) return 0;
|
|
88
|
+
const id = skill.id.toLowerCase();
|
|
89
|
+
const title = skill.title.toLowerCase();
|
|
90
|
+
const description = skill.description.toLowerCase();
|
|
91
|
+
const instructions = skill.instructions.toLowerCase();
|
|
92
|
+
const tokens = q.split(/[\s/_-]+/).filter((t) => t.length > 0);
|
|
93
|
+
let score = 0;
|
|
94
|
+
if (id === q) score += 100;
|
|
95
|
+
if (id.includes(q)) score += 40;
|
|
96
|
+
if (title.includes(q)) score += 30;
|
|
97
|
+
if (description.includes(q)) score += 20;
|
|
98
|
+
for (const token of tokens) {
|
|
99
|
+
score += fieldScore(id, token, 25);
|
|
100
|
+
score += fieldScore(title, token, 20);
|
|
101
|
+
score += fieldScore(description, token, 12);
|
|
102
|
+
if (tags.some((t) => t.includes(token))) score += 15;
|
|
103
|
+
score += fieldScore(instructions, token, 4);
|
|
104
|
+
if (isString(skill.input_expectations)) score += fieldScore(skill.input_expectations.toLowerCase(), token, 2);
|
|
105
|
+
if (isString(skill.output_expectations)) score += fieldScore(skill.output_expectations.toLowerCase(), token, 2);
|
|
106
|
+
}
|
|
107
|
+
return score;
|
|
108
|
+
}
|
|
109
|
+
function searchSkills(catalog, options) {
|
|
110
|
+
const requiredTags = options.tags ?? [];
|
|
111
|
+
const limit = options.limit ?? 10;
|
|
112
|
+
return catalog.map((skill) => ({
|
|
113
|
+
skill,
|
|
114
|
+
score: scoreSkill(skill, options.query, requiredTags)
|
|
115
|
+
})).filter((row) => row.score > 0).sort((a, b) => b.score - a.score || a.skill.id.localeCompare(b.skill.id)).slice(0, limit).map((row) => toSummary(row.skill));
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/modules/skills/client.ts
|
|
119
|
+
/**
|
|
120
|
+
* Skills catalog client — host binds the resolved skill list.
|
|
121
|
+
*/
|
|
122
|
+
var SkillsClient = class SkillsClient {
|
|
123
|
+
#catalog;
|
|
124
|
+
constructor(auth) {
|
|
125
|
+
const parsed = skillsAuthSchema.safeParse(auth);
|
|
126
|
+
if (!parsed.success) throw new ToolError("Invalid skills auth catalog", {
|
|
127
|
+
code: "bad_auth",
|
|
128
|
+
details: { issues: parsed.error.issues.map((issue) => issue.message) }
|
|
129
|
+
});
|
|
130
|
+
this.#catalog = parsed.data.skills;
|
|
131
|
+
}
|
|
132
|
+
static fromContext(ctx) {
|
|
133
|
+
const auth = requireAuth(ctx, skillsAuthSchema);
|
|
134
|
+
return new SkillsClient(auth);
|
|
135
|
+
}
|
|
136
|
+
list(input = {}) {
|
|
137
|
+
return { skills: listSkills(this.#catalog, input.tag) };
|
|
138
|
+
}
|
|
139
|
+
get(input) {
|
|
140
|
+
return { skill: getSkill(this.#catalog, input.id) };
|
|
141
|
+
}
|
|
142
|
+
search(input) {
|
|
143
|
+
return { skills: searchSkills(this.#catalog, {
|
|
144
|
+
query: input.query,
|
|
145
|
+
...input.tags && { tags: input.tags },
|
|
146
|
+
...input.limit !== void 0 && { limit: input.limit }
|
|
147
|
+
}) };
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/modules/skills/module.ts
|
|
152
|
+
const skillsListTool = defineTool({
|
|
153
|
+
id: "skills-list",
|
|
154
|
+
name: "listSkills",
|
|
155
|
+
description: "List skills available in the bound catalog as short summaries (id, title, description, tags). Does not return full instructions. Optional tag filter.",
|
|
156
|
+
inputSchema: skillsListInputSchema,
|
|
157
|
+
outputSchema: skillsListOutputSchema,
|
|
158
|
+
sideEffect: "none",
|
|
159
|
+
runtime: "both",
|
|
160
|
+
execute: async (input, ctx) => SkillsClient.fromContext(ctx).list(input)
|
|
161
|
+
});
|
|
162
|
+
const skillsGetTool = defineTool({
|
|
163
|
+
id: "skills-get",
|
|
164
|
+
name: "getSkill",
|
|
165
|
+
description: "Load one skill by id from the bound catalog, including full instructions, required tool ids, and supporting files when present.",
|
|
166
|
+
inputSchema: skillsGetInputSchema,
|
|
167
|
+
outputSchema: skillsGetOutputSchema,
|
|
168
|
+
sideEffect: "none",
|
|
169
|
+
runtime: "both",
|
|
170
|
+
execute: async (input, ctx) => SkillsClient.fromContext(ctx).get(input)
|
|
171
|
+
});
|
|
172
|
+
const skillsSearchTool = defineTool({
|
|
173
|
+
id: "skills-search",
|
|
174
|
+
name: "searchSkills",
|
|
175
|
+
description: "Search the bound skill catalog by free text and optional tags. Returns matching summaries ordered by relevance. Use skills-get for full instructions.",
|
|
176
|
+
inputSchema: skillsSearchInputSchema,
|
|
177
|
+
outputSchema: skillsSearchOutputSchema,
|
|
178
|
+
sideEffect: "none",
|
|
179
|
+
runtime: "both",
|
|
180
|
+
execute: async (input, ctx) => SkillsClient.fromContext(ctx).search(input)
|
|
181
|
+
});
|
|
182
|
+
const skillsModule = defineModule({
|
|
183
|
+
id: "skills",
|
|
184
|
+
title: "Skills",
|
|
185
|
+
description: "List, search, and load portable skill definitions, including instructions and required tool ids.",
|
|
186
|
+
runtime: "both",
|
|
187
|
+
auth: {
|
|
188
|
+
type: "custom",
|
|
189
|
+
schema: skillsAuthSchema
|
|
190
|
+
},
|
|
191
|
+
categories: ["agent", "skills"],
|
|
192
|
+
classification: "standard",
|
|
193
|
+
tags: ["catalog"],
|
|
194
|
+
tools: [
|
|
195
|
+
skillsListTool,
|
|
196
|
+
skillsGetTool,
|
|
197
|
+
skillsSearchTool
|
|
198
|
+
]
|
|
199
|
+
});
|
|
200
|
+
//#endregion
|
|
201
|
+
export { MAX_INSTRUCTIONS_CHARS, MAX_SEARCH_RESULTS, MAX_SKILLS, MAX_SUPPORTING_FILES, MAX_SUPPORTING_FILE_CHARS, SkillsClient, getSkill, listSkills, searchSkills, skillDefinitionSchema, skillSummarySchema, skillSupportingFileSchema, skillsAuthSchema, skillsGetInputSchema, skillsGetOutputSchema, skillsGetTool, skillsListInputSchema, skillsListOutputSchema, skillsListTool, skillsModule, skillsSearchInputSchema, skillsSearchOutputSchema, skillsSearchTool, toSummary };
|
|
202
|
+
|
|
203
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["#catalog"],"sources":["../../../src/modules/skills/contracts.ts","../../../src/modules/skills/domain.ts","../../../src/modules/skills/client.ts","../../../src/modules/skills/module.ts"],"sourcesContent":["/**\n * Portable skill definitions + host-bound catalog auth.\n * Org assignment / persistence stays on the host.\n */\n\nimport { z } from 'zod'\n\nexport const MAX_SKILLS = 200\nexport const MAX_INSTRUCTIONS_CHARS = 100_000\nexport const MAX_SUPPORTING_FILES = 20\nexport const MAX_SUPPORTING_FILE_CHARS = 50_000\nexport const MAX_SEARCH_RESULTS = 50\n\nconst kebabId = z\n\t.string()\n\t.min(1)\n\t.max(128)\n\t.regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, 'Must be lowercase kebab-case')\n\nexport const skillSupportingFileSchema = z.object({\n\tpath: z.string().min(1).max(512).describe('Relative path for the supporting file'),\n\tmedia_type: z.string().min(1).max(200).optional().describe('MIME type when known'),\n\ttext: z.string().max(MAX_SUPPORTING_FILE_CHARS).optional().describe('Small text body for the supporting file')\n})\n\nexport const skillDefinitionSchema = z.object({\n\tid: kebabId.describe('Stable skill id (kebab-case)'),\n\ttitle: z.string().min(1).max(200).describe('Short display title'),\n\tdescription: z.string().min(1).max(2_000).describe('When to use this skill'),\n\tinstructions: z\n\t\t.string()\n\t\t.min(1)\n\t\t.max(MAX_INSTRUCTIONS_CHARS)\n\t\t.describe('Full skill instructions (markdown or plain text)'),\n\tversion: z.string().min(1).max(64).optional().describe('Skill version string'),\n\trequired_tool_ids: z.array(kebabId).max(100).optional().describe('Tool ids this skill expects to be available'),\n\trequired_tags: z.array(z.string().min(1).max(64)).max(50).optional().describe('Required catalog tags'),\n\ttags: z.array(z.string().min(1).max(64)).max(50).optional().describe('Searchable tags'),\n\tinput_expectations: z.string().max(5_000).optional().describe('What inputs the skill expects'),\n\toutput_expectations: z.string().max(5_000).optional().describe('What outputs the skill should produce'),\n\tsupporting_files: z\n\t\t.array(skillSupportingFileSchema)\n\t\t.max(MAX_SUPPORTING_FILES)\n\t\t.optional()\n\t\t.describe('Optional small supporting text files')\n})\n\nexport type SkillDefinition = z.infer<typeof skillDefinitionSchema>\nexport type SkillSupportingFile = z.infer<typeof skillSupportingFileSchema>\n\n/** Host binds the resolved catalog for this agent/org run. */\nexport const skillsAuthSchema = z.object({\n\tskills: z\n\t\t.array(skillDefinitionSchema)\n\t\t.max(MAX_SKILLS)\n\t\t.describe('Host-resolved skill catalog for this bind (assignment stays host-side)')\n})\n\nexport type SkillsAuth = z.infer<typeof skillsAuthSchema>\n\nexport const skillSummarySchema = z.object({\n\tid: z.string().describe('Skill id'),\n\ttitle: z.string().describe('Display title'),\n\tdescription: z.string().describe('When to use'),\n\tversion: z.string().optional().describe('Version when set'),\n\ttags: z.array(z.string()).optional().describe('Tags when set')\n})\n\nexport type SkillSummary = z.infer<typeof skillSummarySchema>\n\nexport const skillsListInputSchema = z.object({\n\ttag: z.string().min(1).max(64).optional().describe('Optional tag filter (exact match)')\n})\n\nexport const skillsListOutputSchema = z.object({\n\tskills: z.array(skillSummarySchema).describe('Catalog summaries (instructions omitted)')\n})\n\nexport const skillsGetInputSchema = z.object({\n\tid: kebabId.describe('Skill id to load')\n})\n\nexport const skillsGetOutputSchema = z.object({\n\tskill: skillDefinitionSchema.describe('Full skill definition')\n})\n\nexport const skillsSearchInputSchema = z.object({\n\tquery: z.string().min(1).max(500).describe('Free-text query over title, description, tags, instructions'),\n\ttags: z.array(z.string().min(1).max(64)).max(20).optional().describe('Optional tags that must all match'),\n\tlimit: z.int().min(1).max(MAX_SEARCH_RESULTS).optional().describe('Max results (default 10)')\n})\n\nexport const skillsSearchOutputSchema = z.object({\n\tskills: z.array(skillSummarySchema).describe('Matching skill summaries, best first')\n})\n\nexport type SkillsListInput = z.infer<typeof skillsListInputSchema>\nexport type SkillsListOutput = z.infer<typeof skillsListOutputSchema>\nexport type SkillsGetInput = z.infer<typeof skillsGetInputSchema>\nexport type SkillsGetOutput = z.infer<typeof skillsGetOutputSchema>\nexport type SkillsSearchInput = z.infer<typeof skillsSearchInputSchema>\nexport type SkillsSearchOutput = z.infer<typeof skillsSearchOutputSchema>\n","/**\n * Pure skill catalog helpers (no HTTP).\n */\n\nimport { isString } from 'es-toolkit'\n\nimport { ToolError } from '../../core/errors'\nimport type { SkillDefinition, SkillSummary } from './contracts'\n\nexport function toSummary(skill: SkillDefinition): SkillSummary {\n\tconst out: SkillSummary = {\n\t\tid: skill.id,\n\t\ttitle: skill.title,\n\t\tdescription: skill.description\n\t}\n\tif (skill.version !== undefined) out.version = skill.version\n\tif (skill.tags !== undefined) out.tags = skill.tags\n\treturn out\n}\n\nexport function listSkills(catalog: readonly SkillDefinition[], tag?: string): SkillSummary[] {\n\tconst filtered =\n\t\ttag === undefined\n\t\t\t? catalog\n\t\t\t: catalog.filter((s) => (s.tags ?? []).some((t) => t.toLowerCase() === tag.toLowerCase()))\n\treturn filtered.map(toSummary)\n}\n\nexport function getSkill(catalog: readonly SkillDefinition[], id: string): SkillDefinition {\n\tconst found = catalog.find((s) => s.id === id)\n\tif (!found) {\n\t\tthrow new ToolError(`Skill not found: ${id}`, { code: 'not_found', details: { id } })\n\t}\n\treturn found\n}\n\nfunction fieldScore(haystack: string, token: string, weight: number): number {\n\treturn haystack.includes(token) ? weight : 0\n}\n\nfunction scoreSkill(skill: SkillDefinition, query: string, requiredTags: readonly string[]): number {\n\tconst q = query.toLowerCase().trim()\n\tconst tags = (skill.tags ?? []).map((t) => t.toLowerCase())\n\tfor (const t of requiredTags) {\n\t\tif (!tags.includes(t.toLowerCase())) return -1\n\t}\n\tif (q.length === 0) return 0\n\n\tconst id = skill.id.toLowerCase()\n\tconst title = skill.title.toLowerCase()\n\tconst description = skill.description.toLowerCase()\n\tconst instructions = skill.instructions.toLowerCase()\n\tconst tokens = q.split(/[\\s/_-]+/).filter((t) => t.length > 0)\n\n\tlet score = 0\n\tif (id === q) score += 100\n\tif (id.includes(q)) score += 40\n\tif (title.includes(q)) score += 30\n\tif (description.includes(q)) score += 20\n\n\tfor (const token of tokens) {\n\t\tscore += fieldScore(id, token, 25)\n\t\tscore += fieldScore(title, token, 20)\n\t\tscore += fieldScore(description, token, 12)\n\t\tif (tags.some((t) => t.includes(token))) score += 15\n\t\tscore += fieldScore(instructions, token, 4)\n\t\tif (isString(skill.input_expectations)) {\n\t\t\tscore += fieldScore(skill.input_expectations.toLowerCase(), token, 2)\n\t\t}\n\t\tif (isString(skill.output_expectations)) {\n\t\t\tscore += fieldScore(skill.output_expectations.toLowerCase(), token, 2)\n\t\t}\n\t}\n\treturn score\n}\n\nexport function searchSkills(\n\tcatalog: readonly SkillDefinition[],\n\toptions: { query: string; tags?: readonly string[] | undefined; limit?: number | undefined }\n): SkillSummary[] {\n\tconst requiredTags = options.tags ?? []\n\tconst limit = options.limit ?? 10\n\tconst ranked = catalog\n\t\t.map((skill) => ({ skill, score: scoreSkill(skill, options.query, requiredTags) }))\n\t\t.filter((row) => row.score > 0)\n\t\t.sort((a, b) => b.score - a.score || a.skill.id.localeCompare(b.skill.id))\n\t\t.slice(0, limit)\n\treturn ranked.map((row) => toSummary(row.skill))\n}\n","/**\n * Skills catalog client — host binds the resolved skill list.\n */\n\nimport { ToolError } from '../../core/errors'\nimport { requireAuth } from '../../core/provider'\nimport type { ToolContext } from '../../core/types'\nimport type {\n\tSkillDefinition,\n\tSkillsAuth,\n\tSkillsGetInput,\n\tSkillsGetOutput,\n\tSkillsListInput,\n\tSkillsListOutput,\n\tSkillsSearchInput,\n\tSkillsSearchOutput\n} from './contracts'\nimport { skillsAuthSchema } from './contracts'\nimport { getSkill, listSkills, searchSkills } from './domain'\n\nexport class SkillsClient {\n\treadonly #catalog: readonly SkillDefinition[]\n\n\tconstructor(auth: SkillsAuth) {\n\t\tconst parsed = skillsAuthSchema.safeParse(auth)\n\t\tif (!parsed.success) {\n\t\t\tthrow new ToolError('Invalid skills auth catalog', {\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\tthis.#catalog = parsed.data.skills\n\t}\n\n\tstatic fromContext(ctx: ToolContext): SkillsClient {\n\t\tconst auth = requireAuth(ctx, skillsAuthSchema)\n\t\treturn new SkillsClient(auth)\n\t}\n\n\tlist(input: SkillsListInput = {}): SkillsListOutput {\n\t\treturn { skills: listSkills(this.#catalog, input.tag) }\n\t}\n\n\tget(input: SkillsGetInput): SkillsGetOutput {\n\t\treturn { skill: getSkill(this.#catalog, input.id) }\n\t}\n\n\tsearch(input: SkillsSearchInput): SkillsSearchOutput {\n\t\treturn {\n\t\t\tskills: searchSkills(this.#catalog, {\n\t\t\t\tquery: input.query,\n\t\t\t\t...(input.tags && { tags: input.tags }),\n\t\t\t\t...(input.limit !== undefined && { limit: input.limit })\n\t\t\t})\n\t\t}\n\t}\n}\n","import { defineModule, defineTool } from '../../core/define'\nimport { SkillsClient } from './client'\nimport {\n\tskillsAuthSchema,\n\tskillsGetInputSchema,\n\tskillsGetOutputSchema,\n\tskillsListInputSchema,\n\tskillsListOutputSchema,\n\tskillsSearchInputSchema,\n\tskillsSearchOutputSchema\n} from './contracts'\n\nexport type { SkillsAuth } from './contracts'\nexport { skillsAuthSchema }\n\nexport const skillsListTool = defineTool({\n\tid: 'skills-list',\n\tname: 'listSkills',\n\tdescription:\n\t\t'List skills available in the bound catalog as short summaries (id, title, description, tags). Does not return full instructions. Optional tag filter.',\n\tinputSchema: skillsListInputSchema,\n\toutputSchema: skillsListOutputSchema,\n\tsideEffect: 'none',\n\truntime: 'both',\n\texecute: async (input, ctx) => SkillsClient.fromContext(ctx).list(input)\n})\n\nexport const skillsGetTool = defineTool({\n\tid: 'skills-get',\n\tname: 'getSkill',\n\tdescription:\n\t\t'Load one skill by id from the bound catalog, including full instructions, required tool ids, and supporting files when present.',\n\tinputSchema: skillsGetInputSchema,\n\toutputSchema: skillsGetOutputSchema,\n\tsideEffect: 'none',\n\truntime: 'both',\n\texecute: async (input, ctx) => SkillsClient.fromContext(ctx).get(input)\n})\n\nexport const skillsSearchTool = defineTool({\n\tid: 'skills-search',\n\tname: 'searchSkills',\n\tdescription:\n\t\t'Search the bound skill catalog by free text and optional tags. Returns matching summaries ordered by relevance. Use skills-get for full instructions.',\n\tinputSchema: skillsSearchInputSchema,\n\toutputSchema: skillsSearchOutputSchema,\n\tsideEffect: 'none',\n\truntime: 'both',\n\texecute: async (input, ctx) => SkillsClient.fromContext(ctx).search(input)\n})\n\nexport const skillsModule = defineModule({\n\tid: 'skills',\n\ttitle: 'Skills',\n\tdescription: 'List, search, and load portable skill definitions, including instructions and required tool ids.',\n\truntime: 'both',\n\tauth: { type: 'custom', schema: skillsAuthSchema },\n\tcategories: ['agent', 'skills'],\n\tclassification: 'standard',\n\ttags: ['catalog'],\n\ttools: [skillsListTool, skillsGetTool, skillsSearchTool]\n})\n"],"mappings":";;;;;;;;;;AAOA,MAAa,aAAa;AAC1B,MAAa,yBAAyB;AACtC,MAAa,uBAAuB;AACpC,MAAa,4BAA4B;AACzC,MAAa,qBAAqB;AAElC,MAAM,UAAU,EACd,OAAO,CAAC,CACR,IAAI,CAAC,C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