@squidcloud/twilio-client 1.0.504 → 1.0.505
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/dist/index.js +1 -1
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +24 -10
- package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +2 -2
- package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +9 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";const
|
|
1
|
+
(()=>{"use strict";const t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}};let e={};t.r(e),t.d(e,{SMS_EVENT_TYPE:()=>i,SquidTwilioClient:()=>r,VOICE_ENGINES:()=>o,VOICE_MODES:()=>n});const i="twilio-sms-event",n=["relay","gather"],o=["twilio","elevenlabs","openai"];class r{constructor(t,e){this.squid=t,this.integrationId=e}async sendSms(t){return this.squid.executeFunction("sendSms",{...t,integrationId:this.integrationId})}async placeCall(t){return this.squid.executeFunction("placeCall",{...t,integrationId:this.integrationId})}async getCallTranscript(t){return this.squid.executeFunction("getCallTranscript",{...t,integrationId:this.integrationId})}async listPhoneNumbers(){return this.squid.executeFunction("twilioListPhoneNumbers",{integrationId:this.integrationId})}async provisionAgent(t){return this.squid.executeFunction("twilioProvisionAgent",{...t,integrationId:this.integrationId})}async createCustomerVoiceToken(t){return this.squid.executeFunction("twilioCreateCustomerVoiceToken",{...t,integrationId:this.integrationId})}async getCustomerVoiceCall(t){return this.squid.executeFunction("twilioGetCustomerVoiceCall",{...t,integrationId:this.integrationId})}async setHumanHandoff(t){return this.squid.executeFunction("twilioSetHumanHandoff",{...t,integrationId:this.integrationId})}}const s=exports;for(var a in e)s[a]=e[a];e.__esModule&&Object.defineProperty(s,"__esModule",{value:!0})})();
|
|
@@ -432,6 +432,13 @@ export interface AiModelRoutingOptions {
|
|
|
432
432
|
models: VendorAiChatModelName[];
|
|
433
433
|
/** The vendor model that makes the choice. */
|
|
434
434
|
routingModel: VendorAiChatModelName;
|
|
435
|
+
/**
|
|
436
|
+
* How to choose, in plain language: the routing model follows it over its default rule, which
|
|
437
|
+
* takes the cheapest candidate that can answer well. Up to 2000 characters. The routing model
|
|
438
|
+
* sees each candidate's price, context window and benchmark measurements, so an instruction can
|
|
439
|
+
* refer to them ("never pay more than $0.01 per answer", "prefer the model measured on coding").
|
|
440
|
+
*/
|
|
441
|
+
instructions?: string;
|
|
435
442
|
}
|
|
436
443
|
/**
|
|
437
444
|
* The model of an `ask` or `chat` request: a concrete model, or a set of models a routing model chooses from.
|
|
@@ -460,8 +467,15 @@ export type AiChatRequestOptions = Omit<AllAiAgentChatOptions, 'model'> & {
|
|
|
460
467
|
export interface AiModelRoutingResult {
|
|
461
468
|
/** The model the routing model chose and the request was sent to. A `backupModel` may still have served it. */
|
|
462
469
|
model: VendorAiChatModelName;
|
|
470
|
+
/**
|
|
471
|
+
* The reasoning effort the chosen model ran at: the routing model's own pick, or the request's or
|
|
472
|
+
* agent's effort resolved to a level the model accepts when one was set. Undefined is the model's default.
|
|
473
|
+
*/
|
|
474
|
+
reasoningEffort?: AiReasoningEffort;
|
|
463
475
|
/** The model that made the choice. */
|
|
464
476
|
routingModel: VendorAiChatModelName;
|
|
477
|
+
/** The routing model's one-line justification of the choice. */
|
|
478
|
+
reason: string;
|
|
465
479
|
/** Input tokens the routing call consumed. */
|
|
466
480
|
inputTokens: number;
|
|
467
481
|
/** Output tokens the routing call generated. */
|
|
@@ -517,8 +531,8 @@ export interface BaseAiChatOptions {
|
|
|
517
531
|
*/
|
|
518
532
|
maxTokens?: number;
|
|
519
533
|
/**
|
|
520
|
-
* The maximum number of tokens the model should output.
|
|
521
|
-
*
|
|
534
|
+
* The maximum number of tokens the model should output. Can be used to control the output verbosity.
|
|
535
|
+
* For a model from an AI connector, the model's configured max output tokens is the ceiling.
|
|
522
536
|
*/
|
|
523
537
|
maxOutputTokens?: number;
|
|
524
538
|
/** The context ID to use for the request. If not provided, the agent's default context will be used. */
|
|
@@ -701,17 +715,16 @@ export interface BaseAiChatOptions {
|
|
|
701
715
|
*/
|
|
702
716
|
verbosity?: AiVerbosityLevel;
|
|
703
717
|
/**
|
|
704
|
-
*
|
|
718
|
+
* Enables a code interpreter for executing Python code.
|
|
705
719
|
* - 'none': Code interpreter is disabled (default).
|
|
706
|
-
* - 'llm':
|
|
707
|
-
*
|
|
708
|
-
* Note: Only supported by OpenAI, Anthropic and Gemini models. Ignored for other providers.
|
|
720
|
+
* - 'llm': The model runs Python in Squid's sandbox through a tool call. Requires a model that supports tool calling.
|
|
709
721
|
*/
|
|
710
722
|
useCodeInterpreter?: 'none' | 'llm';
|
|
711
723
|
/**
|
|
712
724
|
* File IDs to include in the chat context.
|
|
713
725
|
* These are IDs returned from the AI provider's Files API after uploading files.
|
|
714
|
-
* Files are attached to the conversation and can be read/analyzed by the AI.
|
|
726
|
+
* Files are attached to the conversation and can be read/analyzed by the AI. With `useCodeInterpreter: 'llm'`,
|
|
727
|
+
* the files are given to the code interpreter instead.
|
|
715
728
|
*/
|
|
716
729
|
fileIds?: string[];
|
|
717
730
|
/**
|
|
@@ -1161,11 +1174,12 @@ export interface UpsertContextStatusSuccess extends BaseUpsertContextStatus {
|
|
|
1161
1174
|
}
|
|
1162
1175
|
/**
|
|
1163
1176
|
* Names an upsert failure; `DUPLICATE_CONTENT` identifies existing content when contextId is omitted.
|
|
1164
|
-
* `CONTENT_IN_FLIGHT`, `
|
|
1165
|
-
* `SOURCE_UNREACHABLE` may succeed on retry. Document faults carry `retryable: false`
|
|
1177
|
+
* `CONTENT_IN_FLIGHT`, `EMBEDDED_CHILDREN_NOT_RECONCILED`, `EMBEDDING_FAILED`, `EXTRACTION_TIMED_OUT`,
|
|
1178
|
+
* `PROVIDER_ACCESS_DENIED`, and `SOURCE_UNREACHABLE` may succeed on retry. Document faults carry `retryable: false`
|
|
1179
|
+
* because the same bytes fail again.
|
|
1166
1180
|
* @category AI
|
|
1167
1181
|
*/
|
|
1168
|
-
export type UpsertContextErrorCode = 'CONTENT_IN_FLIGHT' | 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'EMBEDDING_FAILED' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
|
|
1182
|
+
export type UpsertContextErrorCode = 'CONTENT_IN_FLIGHT' | 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'EMBEDDED_CHILDREN_NOT_RECONCILED' | 'EMBEDDING_FAILED' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
|
|
1169
1183
|
/**
|
|
1170
1184
|
* The existing context a `DUPLICATE_CONTENT` rejection points at — where the byte-identical original
|
|
1171
1185
|
* already lives.
|
|
@@ -38,8 +38,8 @@ export type AiFileProviderType = (typeof AI_FILE_PROVIDER_TYPES)[number];
|
|
|
38
38
|
*/
|
|
39
39
|
export declare function isFileCapableProviderType(type: AiProviderType): type is AiFileProviderType;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
41
|
+
* Providers with a vendor-hosted code interpreter; unused by Squid.
|
|
42
|
+
* @deprecated The code interpreter runs in Squid's sandbox and works with any model that supports tool calling.
|
|
43
43
|
*/
|
|
44
44
|
export declare const AI_CODE_INTERPRETER_PROVIDER_TYPES: readonly ["openai", "anthropic", "gemini"];
|
|
45
45
|
/**
|
|
@@ -704,6 +704,12 @@ export declare const BULK_INGESTION_MAX_MULTIPART_FILE_BYTES: number;
|
|
|
704
704
|
* @category AI
|
|
705
705
|
*/
|
|
706
706
|
export declare const MAX_UPLOAD_FILE_BYTES: number;
|
|
707
|
+
/**
|
|
708
|
+
* Largest OneNote section (`.one`) a knowledge base ingests, on either lane. A section carries its attachments,
|
|
709
|
+
* each indexed as a context of its own, so it may exceed {@link MAX_UPLOAD_FILE_BYTES}.
|
|
710
|
+
* @category AI
|
|
711
|
+
*/
|
|
712
|
+
export declare const MAX_ONENOTE_SECTION_BYTES: number;
|
|
707
713
|
/**
|
|
708
714
|
* @category AI
|
|
709
715
|
*/
|
|
@@ -2094,7 +2100,8 @@ export interface BulkIngestionJobStatusCounts {
|
|
|
2094
2100
|
/**
|
|
2095
2101
|
* Machine-readable class of a bulk-ingestion file failure, for outcomes to treat differently from real
|
|
2096
2102
|
* failures. Terminal — reported with `retryable: false` — are `'CONTENT_TOO_LARGE'` (past the per-context
|
|
2097
|
-
* ceiling), `'ENCRYPTED_DOCUMENT'`, `'
|
|
2103
|
+
* ceiling), `'ENCRYPTED_DOCUMENT'`, `'EXTRACTION_ABANDONED'` (each worker that took the file up died before
|
|
2104
|
+
* finishing it), `'IMAGE_OVER_PROVIDER_LIMIT'` (the OCR provider refuses an image in the
|
|
2098
2105
|
* document as too large, even with the pages that draw it redrawn smaller), `'NO_EMBEDDABLE_CONTENT'`,
|
|
2099
2106
|
* `'SOURCE_OVER_PROVIDER_LIMIT'` (the bytes exceed what the extraction provider accepts),
|
|
2100
2107
|
* `'UNREADABLE_DOCUMENT'` (a PDF or Office file whose bytes cannot be opened as one), `'UNREADABLE_WORKBOOK'`
|
|
@@ -2108,7 +2115,7 @@ export interface BulkIngestionJobStatusCounts {
|
|
|
2108
2115
|
* alone exceeds the ceiling fails this way in every job.
|
|
2109
2116
|
* @category AI
|
|
2110
2117
|
*/
|
|
2111
|
-
export type BulkIngestionFileErrorCode = 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'JOB_FULL' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
|
|
2118
|
+
export type BulkIngestionFileErrorCode = 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_ABANDONED' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'JOB_FULL' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
|
|
2112
2119
|
/**
|
|
2113
2120
|
* Per-file/per-context status within a bulk-ingestion job, so a caller can see which file finished,
|
|
2114
2121
|
* which is still processing, and why a file failed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/twilio-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.505",
|
|
4
4
|
"description": "Squid Twilio Client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/connectors/twilio/twilio-client/src/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"author": "",
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@squidcloud/client": "^1.0.
|
|
20
|
+
"@squidcloud/client": "^1.0.505"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20.0.0"
|