@5ss/ai-tools 2.11.4 → 3.0.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +1 -1
  3. package/dist/{aws-service-msttbPrz.js → aws-service-Cn_ozX4X.js} +2 -2
  4. package/dist/{aws-service-msttbPrz.js.map → aws-service-Cn_ozX4X.js.map} +1 -1
  5. package/dist/{bedrock-agentcore-browser-o_oqSPMK.js → bedrock-agentcore-browser-DwDSP_YL.js} +2 -2
  6. package/dist/{bedrock-agentcore-browser-o_oqSPMK.js.map → bedrock-agentcore-browser-DwDSP_YL.js.map} +1 -1
  7. package/dist/{bedrock-agentcore-code-interpreter-D4ERRFj1.js → bedrock-agentcore-code-interpreter-F0dnrAm4.js} +2 -2
  8. package/dist/{bedrock-agentcore-code-interpreter-D4ERRFj1.js.map → bedrock-agentcore-code-interpreter-F0dnrAm4.js.map} +1 -1
  9. package/dist/{cloudflare-browser-nLJdH5nG.js → cloudflare-browser-D-HT43hu.js} +3 -3
  10. package/dist/{cloudflare-browser-nLJdH5nG.js.map → cloudflare-browser-D-HT43hu.js.map} +1 -1
  11. package/dist/{cloudflare-email-CSRq8mRd.js → cloudflare-email-BLI3z96V.js} +2 -2
  12. package/dist/{cloudflare-email-CSRq8mRd.js.map → cloudflare-email-BLI3z96V.js.map} +1 -1
  13. package/dist/{cloudflare-sandbox-Be7SeS4-.js → cloudflare-sandbox-6nX5lIev.js} +3 -3
  14. package/dist/{cloudflare-sandbox-Be7SeS4-.js.map → cloudflare-sandbox-6nX5lIev.js.map} +1 -1
  15. package/dist/{eventbridge-scheduler-BhQaReAz.js → eventbridge-scheduler-CDmO2-Te.js} +2 -2
  16. package/dist/{eventbridge-scheduler-BhQaReAz.js.map → eventbridge-scheduler-CDmO2-Te.js.map} +1 -1
  17. package/dist/http/index.d.ts.map +1 -1
  18. package/dist/http/index.js +2 -2
  19. package/dist/{http-service-DDNCO1s4.js → http-service-BMBIryAL.js} +2 -5
  20. package/dist/http-service-BMBIryAL.js.map +1 -0
  21. package/dist/imessage-Dsms04rC.js +558 -0
  22. package/dist/imessage-Dsms04rC.js.map +1 -0
  23. package/dist/modules/artifacts/index.js +1 -1
  24. package/dist/modules/browser/index.js +2 -2
  25. package/dist/modules/code-sandbox/index.js +2 -2
  26. package/dist/modules/document-extract/index.js +1 -1
  27. package/dist/modules/document-render/index.js +1 -1
  28. package/dist/modules/email/index.js +2 -2
  29. package/dist/modules/files/index.js +1 -1
  30. package/dist/modules/image/index.js +1 -1
  31. package/dist/modules/messaging/index.d.ts +12 -24
  32. package/dist/modules/messaging/index.d.ts.map +1 -1
  33. package/dist/modules/messaging/index.js +27 -42
  34. package/dist/modules/messaging/index.js.map +1 -1
  35. package/dist/modules/queue/index.js +1 -1
  36. package/dist/modules/rag/index.js +2 -2
  37. package/dist/modules/scheduler/index.js +1 -1
  38. package/dist/modules/vector-store/index.js +1 -1
  39. package/dist/modules/web-fetch/index.js +1 -1
  40. package/dist/{pinecone-CNnCFmix.js → pinecone-BvdXAZMi.js} +2 -2
  41. package/dist/{pinecone-CNnCFmix.js.map → pinecone-BvdXAZMi.js.map} +1 -1
  42. package/dist/{qdrant-R_FIcG9d.js → qdrant-D2E2Lxrw.js} +2 -2
  43. package/dist/{qdrant-R_FIcG9d.js.map → qdrant-D2E2Lxrw.js.map} +1 -1
  44. package/dist/{resend-Bu0NFO3h.js → resend-A2SnRdQ8.js} +2 -2
  45. package/dist/{resend-Bu0NFO3h.js.map → resend-A2SnRdQ8.js.map} +1 -1
  46. package/dist/{s3-Dj7Teh-A.js → s3-CoZQRTfe.js} +2 -2
  47. package/dist/{s3-Dj7Teh-A.js.map → s3-CoZQRTfe.js.map} +1 -1
  48. package/dist/{slack-AjJDNnXJ.js → slack-C9UJ0b61.js} +2 -2
  49. package/dist/{slack-AjJDNnXJ.js.map → slack-C9UJ0b61.js.map} +1 -1
  50. package/dist/{sqs-CjyXjasF.js → sqs-DxFnfODk.js} +2 -2
  51. package/dist/{sqs-CjyXjasF.js.map → sqs-DxFnfODk.js.map} +1 -1
  52. package/dist/{supabase-vector-BNoJZuft.js → supabase-vector-DT3qfnt2.js} +2 -2
  53. package/dist/{supabase-vector-BNoJZuft.js.map → supabase-vector-DT3qfnt2.js.map} +1 -1
  54. package/dist/{teams-CvxYLAi5.js → teams-NODh3i6U.js} +2 -2
  55. package/dist/{teams-CvxYLAi5.js.map → teams-NODh3i6U.js.map} +1 -1
  56. package/dist/{telegram-B_-Jljk3.js → telegram-CWMHBeKo.js} +2 -2
  57. package/dist/{telegram-B_-Jljk3.js.map → telegram-CWMHBeKo.js.map} +1 -1
  58. package/dist/{textract-CAfnGvua.js → textract-2jkPuRiE.js} +3 -3
  59. package/dist/{textract-CAfnGvua.js.map → textract-2jkPuRiE.js.map} +1 -1
  60. package/dist/{vector-store-DDiu3XPg.js → vector-store-CDQaQXFV.js} +4 -4
  61. package/dist/{vector-store-DDiu3XPg.js.map → vector-store-CDQaQXFV.js.map} +1 -1
  62. package/dist/vendors/amazon-sp-api/index.d.ts +1 -8
  63. package/dist/vendors/amazon-sp-api/index.d.ts.map +1 -1
  64. package/dist/vendors/amazon-sp-api/index.js +3 -14
  65. package/dist/vendors/amazon-sp-api/index.js.map +1 -1
  66. package/dist/vendors/bedrock-agentcore-browser/index.js +1 -1
  67. package/dist/vendors/bedrock-agentcore-code-interpreter/index.js +1 -1
  68. package/dist/vendors/cloudflare-browser/index.js +1 -1
  69. package/dist/vendors/cloudflare-email/index.js +1 -1
  70. package/dist/vendors/cloudflare-sandbox/index.js +1 -1
  71. package/dist/vendors/eventbridge-scheduler/index.js +1 -1
  72. package/dist/vendors/imessage/index.d.ts +65 -188
  73. package/dist/vendors/imessage/index.d.ts.map +1 -1
  74. package/dist/vendors/imessage/index.js +2 -2
  75. package/dist/vendors/katana/index.d.ts +112 -56
  76. package/dist/vendors/katana/index.d.ts.map +1 -1
  77. package/dist/vendors/katana/index.js +42 -16
  78. package/dist/vendors/katana/index.js.map +1 -1
  79. package/dist/vendors/pinecone/index.js +1 -1
  80. package/dist/vendors/qdrant/index.js +1 -1
  81. package/dist/vendors/resend/index.js +1 -1
  82. package/dist/vendors/s3/index.js +1 -1
  83. package/dist/vendors/slack/index.js +1 -1
  84. package/dist/vendors/sqs/index.js +1 -1
  85. package/dist/vendors/supabase-vector/index.js +1 -1
  86. package/dist/vendors/teams/index.js +1 -1
  87. package/dist/vendors/telegram/index.js +1 -1
  88. package/dist/vendors/textract/index.js +1 -1
  89. package/dist/vendors/woocommerce/index.js +1 -1
  90. package/package.json +2 -18
  91. package/dist/http-service-DDNCO1s4.js.map +0 -1
  92. package/dist/imessage-CofjmONG.js +0 -893
  93. package/dist/imessage-CofjmONG.js.map +0 -1
@@ -1,3 +1,3 @@
1
1
  import { a as deleteVectorsOutputSchema, c as upsertVectorsInputSchema, d as vectorMatchSchema, f as vectorMetadataSchema, i as deleteVectorsInputSchema, l as upsertVectorsOutputSchema, n as MAX_VECTOR_BATCH, o as queryVectorsInputSchema, p as vectorPointSchema, r as MAX_VECTOR_DIMENSIONS, s as queryVectorsOutputSchema, t as MAX_TOP_K } from "../../schemas-ChOAhdo9.js";
2
- import { a as PineconeClient, i as pineconeUpsertTool, n as pineconeModule, o as pineconeAuthSchema, r as pineconeQueryTool, t as pineconeDeleteTool } from "../../pinecone-CNnCFmix.js";
2
+ import { a as PineconeClient, i as pineconeUpsertTool, n as pineconeModule, o as pineconeAuthSchema, r as pineconeQueryTool, t as pineconeDeleteTool } from "../../pinecone-BvdXAZMi.js";
3
3
  export { MAX_TOP_K, MAX_VECTOR_BATCH, MAX_VECTOR_DIMENSIONS, PineconeClient, deleteVectorsInputSchema, deleteVectorsOutputSchema, pineconeAuthSchema, pineconeDeleteTool, pineconeModule, pineconeQueryTool, pineconeUpsertTool, queryVectorsInputSchema, queryVectorsOutputSchema, upsertVectorsInputSchema, upsertVectorsOutputSchema, vectorMatchSchema, vectorMetadataSchema, vectorPointSchema };
@@ -1,3 +1,3 @@
1
1
  import { a as deleteVectorsOutputSchema, c as upsertVectorsInputSchema, d as vectorMatchSchema, f as vectorMetadataSchema, i as deleteVectorsInputSchema, l as upsertVectorsOutputSchema, n as MAX_VECTOR_BATCH, o as queryVectorsInputSchema, p as vectorPointSchema, r as MAX_VECTOR_DIMENSIONS, s as queryVectorsOutputSchema, t as MAX_TOP_K } from "../../schemas-ChOAhdo9.js";
2
- import { a as QdrantClient, i as qdrantUpsertTool, n as qdrantModule, o as qdrantAuthSchema, r as qdrantQueryTool, t as qdrantDeleteTool } from "../../qdrant-R_FIcG9d.js";
2
+ import { a as QdrantClient, i as qdrantUpsertTool, n as qdrantModule, o as qdrantAuthSchema, r as qdrantQueryTool, t as qdrantDeleteTool } from "../../qdrant-D2E2Lxrw.js";
3
3
  export { MAX_TOP_K, MAX_VECTOR_BATCH, MAX_VECTOR_DIMENSIONS, QdrantClient, deleteVectorsInputSchema, deleteVectorsOutputSchema, qdrantAuthSchema, qdrantDeleteTool, qdrantModule, qdrantQueryTool, qdrantUpsertTool, queryVectorsInputSchema, queryVectorsOutputSchema, upsertVectorsInputSchema, upsertVectorsOutputSchema, vectorMatchSchema, vectorMetadataSchema, vectorPointSchema };
@@ -1,3 +1,3 @@
1
1
  import { a as attachmentSchema, i as MAX_EMAIL_BYTES, o as namedAddressSchema, r as MAX_BATCH_EMAILS } from "../../limits-hjrO8zUG.js";
2
- import { a as resendAuthSchema, c as resendSendInputSchema, i as ResendClient, l as resendSendOutputSchema, n as resendSendBatchTool, o as resendSendBatchInputSchema, r as resendSendTool, s as resendSendBatchOutputSchema, t as resendModule } from "../../resend-Bu0NFO3h.js";
2
+ import { a as resendAuthSchema, c as resendSendInputSchema, i as ResendClient, l as resendSendOutputSchema, n as resendSendBatchTool, o as resendSendBatchInputSchema, r as resendSendTool, s as resendSendBatchOutputSchema, t as resendModule } from "../../resend-A2SnRdQ8.js";
3
3
  export { MAX_BATCH_EMAILS, MAX_EMAIL_BYTES, ResendClient, attachmentSchema, namedAddressSchema, resendAuthSchema, resendModule, resendSendBatchInputSchema, resendSendBatchOutputSchema, resendSendBatchTool, resendSendInputSchema, resendSendOutputSchema, resendSendTool };
@@ -1,2 +1,2 @@
1
- import { A as getObjectOutputSchema, B as uploadPartOutputSchema, C as copyObjectInputSchema, D as deleteObjectInputSchema, E as createMultipartUploadOutputSchema, F as putObjectInputSchema, I as putObjectOutputSchema, L as signedUrlInputSchema, M as headObjectOutputSchema, N as listObjectsInputSchema, O as deleteObjectOutputSchema, P as listObjectsOutputSchema, R as signedUrlOutputSchema, S as completeMultipartUploadOutputSchema, T as createMultipartUploadInputSchema, _ as MAX_OBJECT_BYTES, a as s3CreateSignedUrlTool, b as abortMultipartUploadOutputSchema, c as s3HeadObjectTool, d as s3PutObjectTool, f as s3UploadPartTool, g as MAX_MULTIPART_PART_BYTES, h as DEFAULT_SIGNED_URL_SECONDS, i as s3CreateMultipartUploadTool, j as headObjectInputSchema, k as getObjectInputSchema, l as s3ListObjectsTool, m as s3AuthSchema, n as s3CompleteMultipartUploadTool, o as s3DeleteObjectTool, p as S3Client, r as s3CopyObjectTool, s as s3GetObjectTool, t as s3AbortMultipartUploadTool, u as s3Module, v as MAX_SIGNED_URL_SECONDS, w as copyObjectOutputSchema, x as completeMultipartUploadInputSchema, y as abortMultipartUploadInputSchema, z as uploadPartInputSchema } from "../../s3-Dj7Teh-A.js";
1
+ import { A as getObjectOutputSchema, B as uploadPartOutputSchema, C as copyObjectInputSchema, D as deleteObjectInputSchema, E as createMultipartUploadOutputSchema, F as putObjectInputSchema, I as putObjectOutputSchema, L as signedUrlInputSchema, M as headObjectOutputSchema, N as listObjectsInputSchema, O as deleteObjectOutputSchema, P as listObjectsOutputSchema, R as signedUrlOutputSchema, S as completeMultipartUploadOutputSchema, T as createMultipartUploadInputSchema, _ as MAX_OBJECT_BYTES, a as s3CreateSignedUrlTool, b as abortMultipartUploadOutputSchema, c as s3HeadObjectTool, d as s3PutObjectTool, f as s3UploadPartTool, g as MAX_MULTIPART_PART_BYTES, h as DEFAULT_SIGNED_URL_SECONDS, i as s3CreateMultipartUploadTool, j as headObjectInputSchema, k as getObjectInputSchema, l as s3ListObjectsTool, m as s3AuthSchema, n as s3CompleteMultipartUploadTool, o as s3DeleteObjectTool, p as S3Client, r as s3CopyObjectTool, s as s3GetObjectTool, t as s3AbortMultipartUploadTool, u as s3Module, v as MAX_SIGNED_URL_SECONDS, w as copyObjectOutputSchema, x as completeMultipartUploadInputSchema, y as abortMultipartUploadInputSchema, z as uploadPartInputSchema } from "../../s3-CoZQRTfe.js";
2
2
  export { DEFAULT_SIGNED_URL_SECONDS, MAX_MULTIPART_PART_BYTES, MAX_OBJECT_BYTES, MAX_SIGNED_URL_SECONDS, S3Client, abortMultipartUploadInputSchema, abortMultipartUploadOutputSchema, completeMultipartUploadInputSchema, completeMultipartUploadOutputSchema, copyObjectInputSchema, copyObjectOutputSchema, createMultipartUploadInputSchema, createMultipartUploadOutputSchema, deleteObjectInputSchema, deleteObjectOutputSchema, getObjectInputSchema, getObjectOutputSchema, headObjectInputSchema, headObjectOutputSchema, listObjectsInputSchema, listObjectsOutputSchema, putObjectInputSchema, putObjectOutputSchema, s3AbortMultipartUploadTool, s3AuthSchema, s3CompleteMultipartUploadTool, s3CopyObjectTool, s3CreateMultipartUploadTool, s3CreateSignedUrlTool, s3DeleteObjectTool, s3GetObjectTool, s3HeadObjectTool, s3ListObjectsTool, s3Module, s3PutObjectTool, s3UploadPartTool, signedUrlInputSchema, signedUrlOutputSchema, uploadPartInputSchema, uploadPartOutputSchema };
@@ -1,3 +1,3 @@
1
1
  import { n as createTypingPulse, t as createLiveMessage } from "../../transport-B4vn-XiQ.js";
2
- import { $ as slackSetAssistantStatusInputSchema, A as slackAuthSchema, B as slackGetBotOutputSchema, C as isSlackOutcomeUnknown, D as slackAppendStreamInputSchema, E as slackAnswerCallbackInputSchema, F as slackConversationMessagesOutputSchema, G as slackPostEphemeralInputSchema, H as slackListConversationsOutputSchema, I as slackConversationRepliesInputSchema, J as slackSendMediaBatchInputSchema, K as slackPublishHomeInputSchema, L as slackDownloadFileInputSchema, M as slackConversationHistoryInputSchema, N as slackConversationInfoInputSchema, O as slackAuthRevokeInputSchema, P as slackConversationInfoOutputSchema, Q as slackSendTextInputSchema, R as slackDownloadFileOutputSchema, S as isSlackDefiniteRejection, T as MAX_SLACK_MEDIA_BATCH, U as slackMessageOutputSchema, V as slackListConversationsInputSchema, W as slackOkOutputSchema, X as slackSendMediaBatchOutputSchema, Y as slackSendMediaBatchItemSchema, Z as slackSendMediaInputSchema, _ as slackSendMediaTool, a as formatSlackChannelRef, at as slackUsersConversationsInputSchema, b as SlackClient, c as slackMrkdwnToPlainText, d as slackClearReactionTool, et as slackSetReactionInputSchema, f as slackDownloadFileTool, g as slackSendChatActionTool, h as slackModule, i as extractSlackUserMentions, it as slackStopTypingInputSchema, j as slackClearReactionInputSchema, k as slackAuthRevokeOutputSchema, l as stripLeadingSlackBotMention, m as slackGetBotTool, n as verifySlackRequestSignature, nt as slackStartStreamInputSchema, o as formatSlackMessagePermalink, ot as slackUsersInfoInputSchema, p as slackEditTextTool, q as slackSendChatActionInputSchema, r as extractSlackChannelRefs, rt as slackStopStreamInputSchema, s as formatSlackUserMention, st as slackUsersInfoOutputSchema, t as parseSlackEvent, tt as slackSetSuggestedPromptsInputSchema, u as slackAnswerCallbackTool, v as slackSendTextTool, w as MAX_MEDIA_BYTES, x as SlackClientError, y as slackSetReactionTool, z as slackEditTextInputSchema } from "../../slack-AjJDNnXJ.js";
2
+ import { $ as slackSetAssistantStatusInputSchema, A as slackAuthSchema, B as slackGetBotOutputSchema, C as isSlackOutcomeUnknown, D as slackAppendStreamInputSchema, E as slackAnswerCallbackInputSchema, F as slackConversationMessagesOutputSchema, G as slackPostEphemeralInputSchema, H as slackListConversationsOutputSchema, I as slackConversationRepliesInputSchema, J as slackSendMediaBatchInputSchema, K as slackPublishHomeInputSchema, L as slackDownloadFileInputSchema, M as slackConversationHistoryInputSchema, N as slackConversationInfoInputSchema, O as slackAuthRevokeInputSchema, P as slackConversationInfoOutputSchema, Q as slackSendTextInputSchema, R as slackDownloadFileOutputSchema, S as isSlackDefiniteRejection, T as MAX_SLACK_MEDIA_BATCH, U as slackMessageOutputSchema, V as slackListConversationsInputSchema, W as slackOkOutputSchema, X as slackSendMediaBatchOutputSchema, Y as slackSendMediaBatchItemSchema, Z as slackSendMediaInputSchema, _ as slackSendMediaTool, a as formatSlackChannelRef, at as slackUsersConversationsInputSchema, b as SlackClient, c as slackMrkdwnToPlainText, d as slackClearReactionTool, et as slackSetReactionInputSchema, f as slackDownloadFileTool, g as slackSendChatActionTool, h as slackModule, i as extractSlackUserMentions, it as slackStopTypingInputSchema, j as slackClearReactionInputSchema, k as slackAuthRevokeOutputSchema, l as stripLeadingSlackBotMention, m as slackGetBotTool, n as verifySlackRequestSignature, nt as slackStartStreamInputSchema, o as formatSlackMessagePermalink, ot as slackUsersInfoInputSchema, p as slackEditTextTool, q as slackSendChatActionInputSchema, r as extractSlackChannelRefs, rt as slackStopStreamInputSchema, s as formatSlackUserMention, st as slackUsersInfoOutputSchema, t as parseSlackEvent, tt as slackSetSuggestedPromptsInputSchema, u as slackAnswerCallbackTool, v as slackSendTextTool, w as MAX_MEDIA_BYTES, x as SlackClientError, y as slackSetReactionTool, z as slackEditTextInputSchema } from "../../slack-C9UJ0b61.js";
3
3
  export { MAX_MEDIA_BYTES, MAX_SLACK_MEDIA_BATCH, SlackClient, SlackClientError, createLiveMessage, createTypingPulse, extractSlackChannelRefs, extractSlackUserMentions, formatSlackChannelRef, formatSlackMessagePermalink, formatSlackUserMention, isSlackDefiniteRejection, isSlackOutcomeUnknown, parseSlackEvent, slackAnswerCallbackInputSchema, slackAnswerCallbackTool, slackAppendStreamInputSchema, slackAuthRevokeInputSchema, slackAuthRevokeOutputSchema, slackAuthSchema, slackClearReactionInputSchema, slackClearReactionTool, slackConversationHistoryInputSchema, slackConversationInfoInputSchema, slackConversationInfoOutputSchema, slackConversationMessagesOutputSchema, slackConversationRepliesInputSchema, slackDownloadFileInputSchema, slackDownloadFileOutputSchema, slackDownloadFileTool, slackEditTextInputSchema, slackEditTextTool, slackGetBotOutputSchema, slackGetBotTool, slackListConversationsInputSchema, slackListConversationsOutputSchema, slackMessageOutputSchema, slackModule, slackMrkdwnToPlainText, slackOkOutputSchema, slackPostEphemeralInputSchema, slackPublishHomeInputSchema, slackSendChatActionInputSchema, slackSendChatActionTool, slackSendMediaBatchInputSchema, slackSendMediaBatchItemSchema, slackSendMediaBatchOutputSchema, slackSendMediaInputSchema, slackSendMediaTool, slackSendTextInputSchema, slackSendTextTool, slackSetAssistantStatusInputSchema, slackSetReactionInputSchema, slackSetReactionTool, slackSetSuggestedPromptsInputSchema, slackStartStreamInputSchema, slackStopStreamInputSchema, slackStopTypingInputSchema, slackUsersConversationsInputSchema, slackUsersInfoInputSchema, slackUsersInfoOutputSchema, stripLeadingSlackBotMention, verifySlackRequestSignature };
@@ -1,2 +1,2 @@
1
- import { _ as sqsAuthSchema, a as sqsSendTool, c as queueAcknowledgeOutputSchema, d as queueExtendVisibilityInputSchema, f as queueExtendVisibilityOutputSchema, g as queueReceiveOutputSchema, h as queueReceiveInputSchema, i as sqsReceiveTool, l as queueEnqueueInputSchema, m as queueReceiptInputSchema, n as sqsDeleteTool, o as SqsClient, p as queueMessageSchema, r as sqsModule, s as MAX_SQS_MESSAGE_CHARS, t as sqsChangeVisibilityTool, u as queueEnqueueOutputSchema } from "../../sqs-CjyXjasF.js";
1
+ import { _ as sqsAuthSchema, a as sqsSendTool, c as queueAcknowledgeOutputSchema, d as queueExtendVisibilityInputSchema, f as queueExtendVisibilityOutputSchema, g as queueReceiveOutputSchema, h as queueReceiveInputSchema, i as sqsReceiveTool, l as queueEnqueueInputSchema, m as queueReceiptInputSchema, n as sqsDeleteTool, o as SqsClient, p as queueMessageSchema, r as sqsModule, s as MAX_SQS_MESSAGE_CHARS, t as sqsChangeVisibilityTool, u as queueEnqueueOutputSchema } from "../../sqs-DxFnfODk.js";
2
2
  export { MAX_SQS_MESSAGE_CHARS, SqsClient, queueAcknowledgeOutputSchema, queueEnqueueInputSchema, queueEnqueueOutputSchema, queueExtendVisibilityInputSchema, queueExtendVisibilityOutputSchema, queueMessageSchema, queueReceiptInputSchema, queueReceiveInputSchema, queueReceiveOutputSchema, sqsAuthSchema, sqsChangeVisibilityTool, sqsDeleteTool, sqsModule, sqsReceiveTool, sqsSendTool };
@@ -1,3 +1,3 @@
1
1
  import { a as deleteVectorsOutputSchema, c as upsertVectorsInputSchema, d as vectorMatchSchema, f as vectorMetadataSchema, i as deleteVectorsInputSchema, l as upsertVectorsOutputSchema, n as MAX_VECTOR_BATCH, o as queryVectorsInputSchema, p as vectorPointSchema, r as MAX_VECTOR_DIMENSIONS, s as queryVectorsOutputSchema, t as MAX_TOP_K } from "../../schemas-ChOAhdo9.js";
2
- import { a as SupabaseVectorClient, i as supabaseVectorUpsertTool, n as supabaseVectorModule, o as supabaseVectorAuthSchema, r as supabaseVectorQueryTool, t as supabaseVectorDeleteTool } from "../../supabase-vector-BNoJZuft.js";
2
+ import { a as SupabaseVectorClient, i as supabaseVectorUpsertTool, n as supabaseVectorModule, o as supabaseVectorAuthSchema, r as supabaseVectorQueryTool, t as supabaseVectorDeleteTool } from "../../supabase-vector-DT3qfnt2.js";
3
3
  export { MAX_TOP_K, MAX_VECTOR_BATCH, MAX_VECTOR_DIMENSIONS, SupabaseVectorClient, deleteVectorsInputSchema, deleteVectorsOutputSchema, queryVectorsInputSchema, queryVectorsOutputSchema, supabaseVectorAuthSchema, supabaseVectorDeleteTool, supabaseVectorModule, supabaseVectorQueryTool, supabaseVectorUpsertTool, upsertVectorsInputSchema, upsertVectorsOutputSchema, vectorMatchSchema, vectorMetadataSchema, vectorPointSchema };
@@ -1,3 +1,3 @@
1
1
  import { n as createTypingPulse, t as createLiveMessage } from "../../transport-B4vn-XiQ.js";
2
- import { A as teamsSendTextInputSchema, C as teamsDownloadFileOutputSchema, D as teamsOkOutputSchema, E as teamsMessageOutputSchema, O as teamsSendChatActionInputSchema, S as teamsDownloadFileInputSchema, T as teamsGetBotOutputSchema, _ as isTeamsOutcomeUnknown, a as teamsClearReactionTool, b as teamsAuthSchema, c as teamsGetBotTool, d as teamsSendMediaTool, f as teamsSendTextTool, g as isTeamsDefiniteRejection, h as TeamsClientError, i as teamsAnswerCallbackTool, j as teamsSetReactionInputSchema, k as teamsSendMediaInputSchema, l as teamsModule, m as TeamsClient, n as parseTeamsActivity, o as teamsDownloadFileTool, p as teamsSetReactionTool, r as verifyTeamsAuthHeader, s as teamsEditTextTool, t as isTeamsActivity, u as teamsSendChatActionTool, v as MAX_MEDIA_BYTES, w as teamsEditTextInputSchema, x as teamsClearReactionInputSchema, y as teamsAnswerCallbackInputSchema } from "../../teams-CvxYLAi5.js";
2
+ import { A as teamsSendTextInputSchema, C as teamsDownloadFileOutputSchema, D as teamsOkOutputSchema, E as teamsMessageOutputSchema, O as teamsSendChatActionInputSchema, S as teamsDownloadFileInputSchema, T as teamsGetBotOutputSchema, _ as isTeamsOutcomeUnknown, a as teamsClearReactionTool, b as teamsAuthSchema, c as teamsGetBotTool, d as teamsSendMediaTool, f as teamsSendTextTool, g as isTeamsDefiniteRejection, h as TeamsClientError, i as teamsAnswerCallbackTool, j as teamsSetReactionInputSchema, k as teamsSendMediaInputSchema, l as teamsModule, m as TeamsClient, n as parseTeamsActivity, o as teamsDownloadFileTool, p as teamsSetReactionTool, r as verifyTeamsAuthHeader, s as teamsEditTextTool, t as isTeamsActivity, u as teamsSendChatActionTool, v as MAX_MEDIA_BYTES, w as teamsEditTextInputSchema, x as teamsClearReactionInputSchema, y as teamsAnswerCallbackInputSchema } from "../../teams-NODh3i6U.js";
3
3
  export { MAX_MEDIA_BYTES, TeamsClient, TeamsClientError, createLiveMessage, createTypingPulse, isTeamsActivity, isTeamsDefiniteRejection, isTeamsOutcomeUnknown, parseTeamsActivity, teamsAnswerCallbackInputSchema, teamsAnswerCallbackTool, teamsAuthSchema, teamsClearReactionInputSchema, teamsClearReactionTool, teamsDownloadFileInputSchema, teamsDownloadFileOutputSchema, teamsDownloadFileTool, teamsEditTextInputSchema, teamsEditTextTool, teamsGetBotOutputSchema, teamsGetBotTool, teamsMessageOutputSchema, teamsModule, teamsOkOutputSchema, teamsSendChatActionInputSchema, teamsSendChatActionTool, teamsSendMediaInputSchema, teamsSendMediaTool, teamsSendTextInputSchema, teamsSendTextTool, teamsSetReactionInputSchema, teamsSetReactionTool, verifyTeamsAuthHeader };
@@ -1,3 +1,3 @@
1
1
  import { n as createTypingPulse, t as createLiveMessage } from "../../transport-B4vn-XiQ.js";
2
- import { A as telegramSendMediaGroupOutputSchema, C as telegramDownloadFileOutputSchema, D as telegramOkOutputSchema, E as telegramMessageOutputSchema, M as telegramSendTextInputSchema, N as telegramSetReactionInputSchema, O as telegramSendChatActionInputSchema, S as telegramDownloadFileInputSchema, T as telegramGetBotOutputSchema, _ as isTelegramOutcomeUnknown, a as telegramDownloadFileTool, b as telegramAuthSchema, c as telegramModule, d as telegramSendMediaTool, f as telegramSendTextTool, g as isTelegramDefiniteRejection, h as TelegramClientError, i as telegramClearReactionTool, j as telegramSendMediaInputSchema, k as telegramSendMediaGroupInputSchema, l as telegramSendChatActionTool, m as TelegramClient, n as verifyTelegramWebhookSecret, o as telegramEditTextTool, p as telegramSetReactionTool, r as telegramAnswerCallbackTool, s as telegramGetBotTool, t as parseTelegramUpdate, u as telegramSendMediaGroupTool, v as MAX_MEDIA_BYTES, w as telegramEditTextInputSchema, x as telegramClearReactionInputSchema, y as telegramAnswerCallbackInputSchema } from "../../telegram-B_-Jljk3.js";
2
+ import { A as telegramSendMediaGroupOutputSchema, C as telegramDownloadFileOutputSchema, D as telegramOkOutputSchema, E as telegramMessageOutputSchema, M as telegramSendTextInputSchema, N as telegramSetReactionInputSchema, O as telegramSendChatActionInputSchema, S as telegramDownloadFileInputSchema, T as telegramGetBotOutputSchema, _ as isTelegramOutcomeUnknown, a as telegramDownloadFileTool, b as telegramAuthSchema, c as telegramModule, d as telegramSendMediaTool, f as telegramSendTextTool, g as isTelegramDefiniteRejection, h as TelegramClientError, i as telegramClearReactionTool, j as telegramSendMediaInputSchema, k as telegramSendMediaGroupInputSchema, l as telegramSendChatActionTool, m as TelegramClient, n as verifyTelegramWebhookSecret, o as telegramEditTextTool, p as telegramSetReactionTool, r as telegramAnswerCallbackTool, s as telegramGetBotTool, t as parseTelegramUpdate, u as telegramSendMediaGroupTool, v as MAX_MEDIA_BYTES, w as telegramEditTextInputSchema, x as telegramClearReactionInputSchema, y as telegramAnswerCallbackInputSchema } from "../../telegram-CWMHBeKo.js";
3
3
  export { MAX_MEDIA_BYTES, TelegramClient, TelegramClientError, createLiveMessage, createTypingPulse, isTelegramDefiniteRejection, isTelegramOutcomeUnknown, parseTelegramUpdate, telegramAnswerCallbackInputSchema, telegramAnswerCallbackTool, telegramAuthSchema, telegramClearReactionInputSchema, telegramClearReactionTool, telegramDownloadFileInputSchema, telegramDownloadFileOutputSchema, telegramDownloadFileTool, telegramEditTextInputSchema, telegramEditTextTool, telegramGetBotOutputSchema, telegramGetBotTool, telegramMessageOutputSchema, telegramModule, telegramOkOutputSchema, telegramSendChatActionInputSchema, telegramSendChatActionTool, telegramSendMediaGroupInputSchema, telegramSendMediaGroupOutputSchema, telegramSendMediaGroupTool, telegramSendMediaInputSchema, telegramSendMediaTool, telegramSendTextInputSchema, telegramSendTextTool, telegramSetReactionInputSchema, telegramSetReactionTool, verifyTelegramWebhookSecret };
@@ -1,2 +1,2 @@
1
- import { C as textractTextChunkSchema, S as textractStatusInputSchema, _ as textractExtractResultSchema, a as TextractClient, b as textractExtractTextInputSchema, c as DEFAULT_POLL_INTERVAL_MS, d as MAX_EXTRACT_CHUNK_MAX_CHARS, f as MAX_INLINE_EXTRACT_CHARS, g as textractChunkOptionsSchema, h as textractAuthSchema, i as textractModule, l as DEFAULT_POLL_TIMEOUT_MS, m as MAX_POLL_TIMEOUT_MS, n as textractExtractTextTool, o as DEFAULT_EXTRACT_CHUNK_MAX_CHARS, p as MAX_POLL_INTERVAL_MS, r as textractGetStatusTool, s as DEFAULT_EXTRACT_CHUNK_OVERLAP, t as textractExtractTextBatchTool, u as MAX_BATCH_EXTRACT, v as textractExtractTextBatchInputSchema, x as textractOutputModeSchema, y as textractExtractTextBatchOutputSchema } from "../../textract-CAfnGvua.js";
1
+ import { C as textractTextChunkSchema, S as textractStatusInputSchema, _ as textractExtractResultSchema, a as TextractClient, b as textractExtractTextInputSchema, c as DEFAULT_POLL_INTERVAL_MS, d as MAX_EXTRACT_CHUNK_MAX_CHARS, f as MAX_INLINE_EXTRACT_CHARS, g as textractChunkOptionsSchema, h as textractAuthSchema, i as textractModule, l as DEFAULT_POLL_TIMEOUT_MS, m as MAX_POLL_TIMEOUT_MS, n as textractExtractTextTool, o as DEFAULT_EXTRACT_CHUNK_MAX_CHARS, p as MAX_POLL_INTERVAL_MS, r as textractGetStatusTool, s as DEFAULT_EXTRACT_CHUNK_OVERLAP, t as textractExtractTextBatchTool, u as MAX_BATCH_EXTRACT, v as textractExtractTextBatchInputSchema, x as textractOutputModeSchema, y as textractExtractTextBatchOutputSchema } from "../../textract-2jkPuRiE.js";
2
2
  export { DEFAULT_EXTRACT_CHUNK_MAX_CHARS, DEFAULT_EXTRACT_CHUNK_OVERLAP, DEFAULT_POLL_INTERVAL_MS, DEFAULT_POLL_TIMEOUT_MS, MAX_BATCH_EXTRACT, MAX_EXTRACT_CHUNK_MAX_CHARS, MAX_INLINE_EXTRACT_CHARS, MAX_POLL_INTERVAL_MS, MAX_POLL_TIMEOUT_MS, TextractClient, textractAuthSchema, textractChunkOptionsSchema, textractExtractResultSchema, textractExtractTextBatchInputSchema, textractExtractTextBatchOutputSchema, textractExtractTextBatchTool, textractExtractTextInputSchema, textractExtractTextTool, textractGetStatusTool, textractModule, textractOutputModeSchema, textractStatusInputSchema, textractTextChunkSchema };
@@ -1,7 +1,7 @@
1
1
  import { t as ToolError } from "../../errors-DoSpNHvs.js";
2
2
  import { n as defineModule, r as defineTool } from "../../define-ieoksEQ0.js";
3
3
  import { n as requireAuth } from "../../provider-CgDAlg6K.js";
4
- import { t as HttpService } from "../../http-service-DDNCO1s4.js";
4
+ import { t as HttpService } from "../../http-service-BMBIryAL.js";
5
5
  import { n as bytesToBase64, o as utf8ToBytes } from "../../bytes-BxpimpQx.js";
6
6
  import { isPlainObject, isString } from "es-toolkit";
7
7
  import { z } from "zod";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5ss/ai-tools",
3
- "version": "2.11.4",
3
+ "version": "3.0.1",
4
4
  "description": "Reusable AI tools with strict schemas and model-facing contracts. Define once; project to Node, edge, Mastra, AI SDK, TanStack AI, Cloudflare Workers AI, or MCP.",
5
5
  "license": "MIT",
6
6
  "author": "harryy",
@@ -248,7 +248,6 @@
248
248
  "release:dry": "semantic-release --dry-run"
249
249
  },
250
250
  "dependencies": {
251
- "@photon-ai/advanced-imessage": "2.0.2",
252
251
  "aws4fetch": "1.0.20",
253
252
  "decimal.js": "10.6.0",
254
253
  "es-toolkit": "1.50.0",
@@ -268,7 +267,6 @@
268
267
  "zod": "4.4.3"
269
268
  },
270
269
  "devDependencies": {
271
- "@grpc/grpc-js": "1.14.3",
272
270
  "@mastra/core": "1.57.0",
273
271
  "@mastra/pg": "1.19.0",
274
272
  "@modelcontextprotocol/sdk": "1.30.0",
@@ -285,8 +283,6 @@
285
283
  "ai": "7.0.55",
286
284
  "conventional-changelog-conventionalcommits": "10.2.1",
287
285
  "lefthook": "2.1.10",
288
- "nice-grpc": "2.1.14",
289
- "nice-grpc-common": "2.0.2",
290
286
  "oxc-parser": "0.143.0",
291
287
  "oxfmt": "0.62.0",
292
288
  "oxlint": "1.77.0",
@@ -296,19 +292,13 @@
296
292
  "typescript": "7.0.2"
297
293
  },
298
294
  "peerDependencies": {
299
- "@grpc/grpc-js": ">=1.12.6",
300
295
  "@mastra/core": ">=1.0.0",
301
296
  "@mastra/pg": ">=1.14.0",
302
297
  "@modelcontextprotocol/sdk": ">=1.0.0",
303
298
  "@tanstack/ai": ">=0.40.0",
304
- "ai": ">=5.0.0",
305
- "nice-grpc": ">=2.1.11",
306
- "nice-grpc-common": ">=2.0.2"
299
+ "ai": ">=5.0.0"
307
300
  },
308
301
  "peerDependenciesMeta": {
309
- "@grpc/grpc-js": {
310
- "optional": true
311
- },
312
302
  "@mastra/core": {
313
303
  "optional": true
314
304
  },
@@ -323,12 +313,6 @@
323
313
  },
324
314
  "ai": {
325
315
  "optional": true
326
- },
327
- "nice-grpc": {
328
- "optional": true
329
- },
330
- "nice-grpc-common": {
331
- "optional": true
332
316
  }
333
317
  },
334
318
  "engines": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-service-DDNCO1s4.js","names":["#http","#defaultLabel","#defaultSignal","#raw"],"sources":["../src/transport/errors.ts","../src/transport/http-service.ts"],"sourcesContent":["/**\n * HTTP status / network → ToolError for HttpService and AwsService.\n */\n\nimport { isError, isNumber } from 'es-toolkit'\nimport { FetchError } from 'ofetch'\n\nimport { ToolError } from '../core/errors'\nimport type { ToolErrorCode } from '../core/errors'\n\nexport type StatusThrowOptions = {\n\tallowStatuses?: readonly number[]\n\t/** When true, non-2xx does not throw. */\n\tnoThrow?: boolean\n}\n\n/** Map common HTTP status codes to stable ToolError codes. */\nexport function httpErrorCode(status: number): ToolErrorCode {\n\tif (status === 401) return 'bad_auth'\n\tif (status === 403) return 'forbidden'\n\tif (status === 404) return 'not_found'\n\tif (status === 429) return 'rate_limited'\n\tif (status === 413) return 'too_large'\n\treturn 'upstream'\n}\n\nexport function throwHttpStatus(operation: string, status: number, retryAfterMs?: number): never {\n\tconst code = httpErrorCode(status)\n\tthrow new ToolError(`${operation} failed with HTTP ${status}`, {\n\t\tcode,\n\t\tretryable: status >= 500 || status === 429,\n\t\tdetails: {\n\t\t\tstatus,\n\t\t\t...(retryAfterMs !== undefined && { retry_after_ms: retryAfterMs })\n\t\t}\n\t})\n}\n\n/** Parse Retry-After header (seconds or HTTP-date) into milliseconds when possible. */\nexport function retryAfterMsFromHeader(value: string | null): number | undefined {\n\tif (value === null || value.length === 0) return undefined\n\tconst asSeconds = Number.parseInt(value, 10)\n\tif (Number.isFinite(asSeconds) && asSeconds >= 0) return asSeconds * 1000\n\tconst asDate = Date.parse(value)\n\tif (Number.isFinite(asDate)) {\n\t\tconst delta = asDate - Date.now()\n\t\treturn delta > 0 ? delta : 0\n\t}\n\treturn undefined\n}\n\n/** Default: throw ToolError on non-2xx (404 → not_found). */\nexport function assertHttpStatusOk(\n\tlabel: string,\n\tstatus: number,\n\theaders: Headers,\n\toptions: StatusThrowOptions = {}\n): void {\n\tif (options.noThrow === true) return\n\tif (status >= 200 && status < 300) return\n\tif (options.allowStatuses && options.allowStatuses.includes(status)) return\n\tif (status === 404) {\n\t\tthrow new ToolError('Not found', { code: 'not_found', details: { status } })\n\t}\n\tthrowHttpStatus(label, status, retryAfterMsFromHeader(headers.get('retry-after')))\n}\n\n/** True if error or any nested `cause` is an AbortError (ofetch wraps abort in FetchError). */\nexport function isAbortErrorChain(error: unknown): boolean {\n\tlet current: unknown = error\n\tconst seen = new Set<unknown>()\n\twhile (current !== undefined && current !== null && !seen.has(current)) {\n\t\tseen.add(current)\n\t\tif (isError(current) && (current.name === 'AbortError' || current.name === 'TimeoutError')) {\n\t\t\treturn true\n\t\t}\n\t\tif (isError(current) && 'cause' in current) {\n\t\t\tcurrent = current.cause\n\t\t\tcontinue\n\t\t}\n\t\tbreak\n\t}\n\treturn false\n}\n\n/** Map ofetch / AbortError / unknown network failures to ToolError. */\nexport function mapTransportNetworkError(error: unknown, label: string): never {\n\tif (error instanceof ToolError) throw error\n\tif (isAbortErrorChain(error)) {\n\t\tthrow new ToolError(`${label} request was aborted`, {\n\t\t\tcode: 'timeout',\n\t\t\tretryable: true,\n\t\t\tcause: error\n\t\t})\n\t}\n\tif (error instanceof FetchError) {\n\t\tconst status = error.statusCode ?? error.response?.status\n\t\tif (isNumber(status) && Number.isFinite(status)) {\n\t\t\tconst retryAfter = retryAfterMsFromHeader(error.response?.headers.get('retry-after') ?? null)\n\t\t\tthrowHttpStatus(label, status, retryAfter)\n\t\t}\n\t\tthrow new ToolError(error.message || `${label} request failed`, {\n\t\t\tcode: 'upstream',\n\t\t\tretryable: true,\n\t\t\tcause: error\n\t\t})\n\t}\n\tthrow new ToolError(`${label} request failed`, {\n\t\tcode: 'upstream',\n\t\tretryable: true,\n\t\tcause: error\n\t})\n}\n","/**\n * Shared HTTP transport (ofetch under the hood).\n * Product clients construct this and call query/bytes/get/post/….\n */\n\nimport { createFetch } from 'ofetch'\nimport type { CreateFetchOptions, FetchOptions } from 'ofetch'\nimport { trimEnd } from 'es-toolkit'\n\nimport { ToolError } from '../core/errors'\nimport type { FetchLike } from '../core/types'\nimport { assertHttpStatusOk, mapTransportNetworkError } from './errors'\n\nexport type HttpServiceOptions = {\n\t/** Absolute origin or base path. Omit for free-form absolute URLs. */\n\tbaseURL?: string\n\t/** Default headers (Authorization, Content-Type, …). */\n\theaders?: Record<string, string>\n\t/** Default timeout ms. */\n\ttimeout?: number\n\t/**\n\t * Injectable fetch (tests via ToolContext / runTool).\n\t * Passed straight to ofetch — no preconnect wrapper.\n\t */\n\tfetch?: FetchLike\n\t/** Default abort signal. */\n\tsignal?: AbortSignal\n\t/** Prefix for ToolError messages (e.g. \"Resend\"). */\n\tlabel?: string\n}\n\n/**\n * Bodies ofetch accepts. `object` covers plain JSON payloads from tool input\n * (including empty objects); FormData/Blob/string live under BodyInit.\n */\nexport type HttpBody = BodyInit | object | null\n\nexport type HttpQueryValue = string | number | boolean | readonly (string | number | boolean)[] | undefined\n\nexport type HttpCallOptions = {\n\tquery?: Record<string, HttpQueryValue>\n\tbody?: HttpBody\n\theaders?: Record<string, string>\n\t/** Status codes returned without throwing. */\n\tallowStatuses?: readonly number[]\n\t/** When true, non-2xx is returned instead of throwing. Default false. */\n\tnoThrow?: boolean\n\ttimeout?: number\n\tsignal?: AbortSignal\n\t/** Override error label for this call. */\n\tlabel?: string\n}\n\nexport type HttpBytesOptions = HttpCallOptions & {\n\t/** Stop reading and throw `too_large` once the response exceeds this many bytes. */\n\tmaxBytes?: number\n}\n\nexport type HttpQueryResult = {\n\tstatus: number\n\tok: boolean\n\theaders: Headers\n\turl: string\n\t/** Parsed body (JSON/text per ofetch). */\n\tdata: unknown\n}\n\nexport type HttpBytesResult = {\n\tstatus: number\n\tok: boolean\n\theaders: Headers\n\turl: string\n\tbytes: Uint8Array\n}\n\ntype OfetchInstance = ReturnType<typeof createFetch>\n\n/**\n * HTTP client: query (parsed), bytes, get/post/put/patch/delete/head.\n * Non-2xx → ToolError by default.\n */\nexport class HttpService {\n\treadonly #http: OfetchInstance\n\treadonly #defaultLabel: string\n\treadonly #defaultSignal: AbortSignal | undefined\n\n\tconstructor(options: HttpServiceOptions = {}) {\n\t\tthis.#defaultLabel = options.label ?? 'HTTP'\n\t\tthis.#defaultSignal = options.signal\n\t\tthis.#http = createOfetch(options)\n\t}\n\n\t/** Shared ofetch.raw + status assert + error map. */\n\tasync #raw(method: string, path: string, options: HttpCallOptions, extra?: FetchOptions) {\n\t\tconst label = options.label ?? this.#defaultLabel\n\t\ttry {\n\t\t\tconst res = await this.#http.raw(path, {\n\t\t\t\tsignal: this.#defaultSignal ?? null,\n\t\t\t\tmethod,\n\t\t\t\t...options,\n\t\t\t\t...extra\n\t\t\t})\n\t\t\tassertHttpStatusOk(label, res.status, res.headers, options)\n\t\t\treturn { status: res.status, ok: res.ok, headers: res.headers, url: res.url, data: res._data }\n\t\t} catch (error) {\n\t\t\tmapTransportNetworkError(error, label)\n\t\t}\n\t}\n\n\t/** Parsed body (JSON/text). ofetch parses JSON responses by default. */\n\tasync query(method: string, path: string, options: HttpCallOptions = {}): Promise<HttpQueryResult> {\n\t\treturn this.#raw(method, path, options)\n\t}\n\n\t/**\n\t * Binary body. `maxBytes` switches to streaming and cancels before an\n\t * oversized response is materialized.\n\t */\n\tasync bytes(method: string, path: string, options: HttpBytesOptions = {}): Promise<HttpBytesResult> {\n\t\tconst { maxBytes, ...requestOptions } = options\n\t\tif (maxBytes !== undefined && (!Number.isSafeInteger(maxBytes) || maxBytes < 0)) {\n\t\t\tthrow new ToolError('Response byte limit must be a non-negative safe integer', { code: 'bad_input' })\n\t\t}\n\n\t\tconst res = await this.#raw(method, path, requestOptions, {\n\t\t\tresponseType: maxBytes === undefined ? 'arrayBuffer' : 'stream'\n\t\t})\n\t\tif (maxBytes === undefined) {\n\t\t\treturn {\n\t\t\t\t...res,\n\t\t\t\tbytes: new Uint8Array(res.data)\n\t\t\t}\n\t\t}\n\n\t\tconst label = options.label ?? this.#defaultLabel\n\t\ttry {\n\t\t\tconst bytes = await readBoundedBytes(res.data, res.headers, maxBytes, label)\n\t\t\treturn { ...res, bytes }\n\t\t} catch (error) {\n\t\t\tmapTransportNetworkError(error, label)\n\t\t}\n\t}\n\n\tget(path: string, options: HttpCallOptions = {}): Promise<HttpQueryResult> {\n\t\treturn this.query('GET', path, options)\n\t}\n\n\tpost(path: string, body?: HttpBody, options: HttpCallOptions = {}): Promise<HttpQueryResult> {\n\t\treturn this.query('POST', path, body === undefined ? options : { ...options, body })\n\t}\n\n\tput(path: string, body?: HttpBody, options: HttpCallOptions = {}): Promise<HttpQueryResult> {\n\t\treturn this.query('PUT', path, body === undefined ? options : { ...options, body })\n\t}\n\n\tpatch(path: string, body?: HttpBody, options: HttpCallOptions = {}): Promise<HttpQueryResult> {\n\t\treturn this.query('PATCH', path, body === undefined ? options : { ...options, body })\n\t}\n\n\tdelete(path: string, options: HttpCallOptions = {}): Promise<HttpQueryResult> {\n\t\treturn this.query('DELETE', path, options)\n\t}\n\n\thead(path: string, options: HttpCallOptions = {}): Promise<HttpQueryResult> {\n\t\treturn this.query('HEAD', path, options)\n\t}\n}\n\nfunction isReadableByteStream(value: unknown): value is ReadableStream<unknown> {\n\treturn value instanceof ReadableStream\n}\n\nfunction contentLength(headers: Headers): number | undefined {\n\tconst value = headers.get('content-length')\n\tif (value === null || !/^\\d+$/.test(value)) return undefined\n\tconst parsed = Number(value)\n\treturn Number.isSafeInteger(parsed) ? parsed : undefined\n}\n\nfunction responseTooLarge(label: string, maxBytes: number, observedBytes: number): never {\n\tthrow new ToolError(`${label} response exceeds byte limit`, {\n\t\tcode: 'too_large',\n\t\tdetails: { max_bytes: maxBytes, content_length: observedBytes }\n\t})\n}\n\nasync function readBoundedBytes(data: unknown, headers: Headers, maxBytes: number, label: string): Promise<Uint8Array> {\n\tconst declaredLength = contentLength(headers)\n\tif (declaredLength !== undefined && declaredLength > maxBytes) {\n\t\tif (isReadableByteStream(data)) {\n\t\t\ttry {\n\t\t\t\tawait data.cancel()\n\t\t\t} catch {\n\t\t\t\t// Preserve the stable too_large error.\n\t\t\t}\n\t\t}\n\t\tresponseTooLarge(label, maxBytes, declaredLength)\n\t}\n\tif (data === null || data === undefined) return new Uint8Array()\n\tif (!isReadableByteStream(data)) {\n\t\tthrow new ToolError(`${label} returned an invalid byte stream`, { code: 'upstream' })\n\t}\n\n\tconst reader = data.getReader()\n\tconst chunks: Uint8Array[] = []\n\tlet total = 0\n\ttry {\n\t\twhile (true) {\n\t\t\tconst chunk = await reader.read()\n\t\t\tif (chunk.done) break\n\t\t\tif (!(chunk.value instanceof Uint8Array)) {\n\t\t\t\tthrow new ToolError(`${label} returned an invalid byte chunk`, { code: 'upstream' })\n\t\t\t}\n\t\t\ttotal += chunk.value.byteLength\n\t\t\tif (total > maxBytes) {\n\t\t\t\ttry {\n\t\t\t\t\tawait reader.cancel()\n\t\t\t\t} catch {\n\t\t\t\t\t// Preserve the stable too_large error.\n\t\t\t\t}\n\t\t\t\tresponseTooLarge(label, maxBytes, declaredLength ?? total)\n\t\t\t}\n\t\t\tchunks.push(chunk.value)\n\t\t}\n\t} finally {\n\t\treader.releaseLock()\n\t}\n\n\tconst bytes = new Uint8Array(total)\n\tlet offset = 0\n\tfor (const chunk of chunks) {\n\t\tbytes.set(chunk, offset)\n\t\toffset += chunk.byteLength\n\t}\n\treturn bytes\n}\n\nfunction createOfetch(options: HttpServiceOptions): OfetchInstance {\n\tconst defaults: FetchOptions = {\n\t\t...options,\n\t\tretry: false,\n\t\tignoreResponseError: true\n\t}\n\tif (defaults.baseURL) {\n\t\tdefaults.baseURL = trimEnd(defaults.baseURL, '/')\n\t}\n\tconst createOptions: CreateFetchOptions = { defaults }\n\tif (options.fetch) {\n\t\tObject.assign(createOptions, { fetch: options.fetch })\n\t}\n\treturn createFetch(createOptions)\n}\n"],"mappings":";;;;;;;;AAiBA,SAAgB,cAAc,QAA+B;CAC5D,IAAI,WAAW,KAAK,OAAO;CAC3B,IAAI,WAAW,KAAK,OAAO;CAC3B,IAAI,WAAW,KAAK,OAAO;CAC3B,IAAI,WAAW,KAAK,OAAO;CAC3B,IAAI,WAAW,KAAK,OAAO;CAC3B,OAAO;AACR;AAEA,SAAgB,gBAAgB,WAAmB,QAAgB,cAA8B;CAChG,MAAM,OAAO,cAAc,MAAM;CACjC,MAAM,IAAI,UAAU,GAAG,UAAU,oBAAoB,UAAU;EAC9D;EACA,WAAW,UAAU,OAAO,WAAW;EACvC,SAAS;GACR;GACA,GAAI,iBAAiB,KAAA,KAAa,EAAE,gBAAgB,aAAa;EAClE;CACD,CAAC;AACF;;AAGA,SAAgB,uBAAuB,OAA0C;CAChF,IAAI,UAAU,QAAQ,MAAM,WAAW,GAAG,OAAO,KAAA;CACjD,MAAM,YAAY,OAAO,SAAS,OAAO,EAAE;CAC3C,IAAI,OAAO,SAAS,SAAS,KAAK,aAAa,GAAG,OAAO,YAAY;CACrE,MAAM,SAAS,KAAK,MAAM,KAAK;CAC/B,IAAI,OAAO,SAAS,MAAM,GAAG;EAC5B,MAAM,QAAQ,SAAS,KAAK,IAAI;EAChC,OAAO,QAAQ,IAAI,QAAQ;CAC5B;AAED;;AAGA,SAAgB,mBACf,OACA,QACA,SACA,UAA8B,CAAC,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