@squidcloud/twilio-client 1.0.510 → 1.0.511

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.
@@ -461,7 +461,8 @@ export interface AiModelRoutingStep {
461
461
  }
462
462
  /**
463
463
  * Gives the answering model a tool that consults a stronger model mid-turn. The turn stays on its own model, so its
464
- * prompt cache survives, and the advisor gets only what the answering model passes it.
464
+ * prompt cache survives, and the advisor gets only what the answering model passes it. Models rarely consult it
465
+ * unprompted: name in the agent's instructions when they should.
465
466
  * @category AI
466
467
  */
467
468
  export interface AiAdvisorOptions {
@@ -548,6 +549,8 @@ export interface BackupModelOptions {
548
549
  export interface AiAnswerValidationOptions {
549
550
  /** Judge model; defaults to the model that produced the initial answer. */
550
551
  model?: AiChatModelSelection;
552
+ /** The effort the judge runs at; defaults to the model's own. A vendor model runs at the nearest level it accepts. */
553
+ reasoningEffort?: AiReasoningEffort;
551
554
  /** Additional acceptance criteria for the judge. */
552
555
  instructions?: string;
553
556
  /** Maximum answer attempts, including the initial answer. Defaults to 2; accepts 1–5. */
@@ -564,7 +567,10 @@ export interface AiAnswerValidationResult {
564
567
  }
565
568
  /** Shared options for agent chat requests. @category AI */
566
569
  export interface BaseAiChatOptions {
567
- /** Enables validation for non-CLI models; an empty object uses defaults. Judge read-only behavior is instruction-based. */
570
+ /**
571
+ * Enables validation for non-CLI models; an empty object uses defaults. Judge read-only behavior is instruction-based.
572
+ * Conversation memory keeps the answer only when it passes validation.
573
+ */
568
574
  validation?: AiAnswerValidationOptions;
569
575
  /**
570
576
  * The maximum number of input tokens that Squid can use when making the request to the AI model.
@@ -627,35 +633,48 @@ export interface BaseAiChatOptions {
627
633
  /** Whether to response in a "smooth typing" way, beneficial when the chat result is displayed in a UI. Default to true. */
628
634
  smoothTyping?: boolean;
629
635
  /**
630
- * Global context passed to the agent and all AI functions of the agent. A request's value also reaches the AI
631
- * functions of its connected agents, merged over each one's stored `agentContext`. Its keys are caller input and
632
- * win over stored ones: only the root agent's `@secureAiAgent` rules can vet them, and none run for a public agent.
636
+ * Global context passed to the agent and all AI functions of the agent. A request's value replaces the stored one
637
+ * and also reaches the AI functions of its connected agents, merged over each one's stored `agentContext`. On a
638
+ * public agent, whose `@secureAiAgent` rules do not run, only a request made with the app API key sets it.
633
639
  */
634
640
  agentContext?: Record<string, unknown>;
635
641
  /**
636
642
  * Functions to expose to the AI.
637
643
  * Either a function name or a name with an extra function context passed only to this function.
638
644
  * The parameter values must be valid serializable JSON values.
639
- * Overrides the stored value.
645
+ * Overrides the stored value; on a public agent, only on a request made with the app API key.
640
646
  */
641
647
  functions?: Array<AiFunctionId | AiFunctionIdWithContext>;
642
648
  /** Instructions to include with the prompt. */
643
649
  instructions?: string;
644
650
  /** A set of filters that will limit the context the AI can access.
651
+ * On a public agent, a caller without the app API key can narrow the stored filter with it, not widen it.
645
652
  * @deprecated use `contextMetadataFilterForKnowledgeBase` instead.
646
653
  */
647
654
  contextMetadataFilter?: AiContextMetadataFilter;
648
- /** A set of filters that will limit the context the AI can access. */
655
+ /**
656
+ * A set of filters that will limit the context the AI can access.
657
+ * On a public agent, a caller without the app API key can narrow the stored filters with it, not widen them.
658
+ */
649
659
  contextMetadataFilterForKnowledgeBase?: Record<AiKnowledgeBaseId, AiContextMetadataFilter>;
650
660
  /** The options to use for the response in voice. */
651
661
  voiceOptions?: AiAudioCreateSpeechOptions;
652
662
  /** A stronger model the answering model can consult mid-turn. Overrides the stored value. */
653
663
  advisor?: AiAdvisorOptions;
654
- /** List of connected AI agents can be called by the current agent. Overrides the stored value. */
664
+ /**
665
+ * Connected AI agents the current agent can call. Overrides the stored value; on a public agent, only on a request
666
+ * made with the app API key.
667
+ */
655
668
  connectedAgents?: Array<AiConnectedAgentMetadata>;
656
- /** List of connected AI agents can be called by the current agent. Overrides the stored value. */
669
+ /**
670
+ * Connected integrations the current agent can call. Overrides the stored value; on a public agent, only on a
671
+ * request made with the app API key.
672
+ */
657
673
  connectedIntegrations?: Array<AiConnectedIntegrationMetadata>;
658
- /** List of connected AiKnowlegeBases that can be called by the current agent */
674
+ /**
675
+ * List of connected AiKnowlegeBases that can be called by the current agent.
676
+ * On a public agent, a caller without the app API key can narrow the stored list with it, not widen it.
677
+ */
659
678
  connectedKnowledgeBases?: Array<AiConnectedKnowledgeBaseMetadata>;
660
679
  /** Current budget for nested or recursive AI chat calls per single prompt. */
661
680
  quotas?: AiChatPromptQuotas;
@@ -673,6 +692,8 @@ export interface BaseAiChatOptions {
673
692
  * a value passed with a chat request is ignored, so a caller cannot switch off its own screening.
674
693
  */
675
694
  pii?: AiPiiOptions;
695
+ /** Runtime security policies. Only the stored agent's configuration is honored. */
696
+ security?: AiAgentSecurityOptions;
676
697
  /** The LLM model to use. Can be a vendor model name (string) or an integration-based model (object). */
677
698
  model?: AiChatModelSelection;
678
699
  /**
@@ -761,6 +782,7 @@ export interface BaseAiChatOptions {
761
782
  * Enables a code interpreter for executing Python code.
762
783
  * - 'none': Code interpreter is disabled (default).
763
784
  * - 'llm': The model runs Python in Squid's sandbox through a tool call. Requires a model that supports tool calling.
785
+ * On a public agent this is honored only on a request made with the app API key; otherwise the stored value applies.
764
786
  */
765
787
  useCodeInterpreter?: 'none' | 'llm';
766
788
  /**
@@ -999,7 +1021,10 @@ export interface AiAgent<T extends AiChatModelSelection | undefined = undefined>
999
1021
  updatedAt: Date;
1000
1022
  /** An optional description of the agent's purpose or capabilities. */
1001
1023
  description?: string;
1002
- /** Indicates whether the agent is publicly accessible; defaults to false. */
1024
+ /**
1025
+ * Indicates whether the agent is publicly accessible; defaults to false. A caller of a public agent without the
1026
+ * app API key can narrow its stored knowledge bases and metadata filters per request, not widen them.
1027
+ */
1003
1028
  isPublic?: boolean;
1004
1029
  /** Enables audit logging for the agent's activities if true; defaults to false. */
1005
1030
  auditLog?: boolean;
@@ -1399,38 +1424,56 @@ export type GuardrailsOptions = {
1399
1424
  * @category AI
1400
1425
  */
1401
1426
  export type AiPiiEntityType = 'email' | 'phoneNumber' | 'creditCard' | 'ssn' | 'iban' | 'passport';
1427
+ /** Text boundaries inspected by an agent's runtime security policy. @category AI */
1428
+ export type AiSecurityScope = 'input' | 'context' | 'output' | 'toolArguments';
1429
+ /** Settings shared by independently configurable security classifiers. @category AI */
1430
+ export interface AiSecurityClassifierOptions {
1431
+ /** Model override. Omitted, the detector uses its deployment-wide platform role. */
1432
+ model?: AiChatModelSelection;
1433
+ /** Reasoning effort of the classifier; omitted, uses the model's default. */
1434
+ reasoningEffort?: AiReasoningEffort;
1435
+ /** Screening timeout in milliseconds, from 1000 to 300000. Defaults to 60000. */
1436
+ timeoutMs?: number;
1437
+ /** Additional detection rules, expressed in plain language. */
1438
+ customRules?: Array<string>;
1439
+ }
1440
+ /** Detects instruction overrides in user input and retrieved text. @category AI */
1441
+ export interface AiPromptInjectionOptions extends AiSecurityClassifierOptions {
1442
+ /** Defaults to off. Monitor warns without blocking; block refuses detected attacks. */
1443
+ onDetect: 'off' | 'monitor' | 'block';
1444
+ /** Defaults to both input and context, including tool results and conversation history. */
1445
+ scopes?: Array<'input' | 'context'>;
1446
+ }
1447
+ /** Prompt injection protection inherited by delegated agents. @category AI */
1448
+ export interface AiAgentSecurityOptions {
1449
+ /** Uses the platform's chat.promptInjection role unless a model override is supplied. */
1450
+ promptInjection?: AiPromptInjectionOptions;
1451
+ }
1402
1452
  /** Entity kinds screened when {@link AiPiiOptions.entities} is omitted. */
1403
1453
  export declare const DEFAULT_PII_ENTITY_TYPES: ReadonlyArray<AiPiiEntityType>;
1404
1454
  /** Model that screens prompts unless overridden. Small and fast: it runs on every prompt. */
1405
1455
  export declare const DEFAULT_PII_CLASSIFIER_MODEL = "gpt-6-luna";
1406
- /**
1407
- * Rejects a prompt before it reaches the agent's model when it carries PII, so the prompt is never
1408
- * sent to the model provider, never answered, and never written to chat memory.
1409
- *
1410
- * Screening is one {@link classifierModel} call per prompt, covering {@link entities} and
1411
- * {@link customRules} together. Because a model does the reading rather than a pattern, a value is
1412
- * judged by what the prompt says it is, and app-specific identifiers can be described in plain
1413
- * language instead of expressed as a format.
1414
- *
1415
- * This is the inverse of {@link GuardrailsOptions.disablePii}, which asks the agent's own model not
1416
- * to *emit* PII in its answer.
1417
- * @category AI
1418
- */
1456
+ /** Inspects selected boundaries for sensitive data. Legacy reject settings screen input only. @category AI */
1419
1457
  export type AiPiiOptions = {
1420
- /** `reject` refuses a prompt carrying PII; `off` (default) disables screening entirely. */
1421
- onDetect: 'off' | 'reject';
1458
+ /** Reject blocks detected data; monitor warns; redact replaces values. Defaults to off. */
1459
+ onDetect: 'off' | 'reject' | 'monitor' | 'redact';
1422
1460
  /** Entity kinds to screen for. Defaults to {@link DEFAULT_PII_ENTITY_TYPES}. */
1423
- entities?: Array<AiPiiEntityType>;
1461
+ entities?: Array<AiPiiEntityType | 'secret'>;
1424
1462
  /** App-specific PII in plain language, e.g. `'internal case numbers like CASE-12345'`. */
1425
1463
  customRules?: Array<string>;
1426
1464
  /**
1427
- * Model performing the screening. Defaults to {@link DEFAULT_PII_CLASSIFIER_MODEL}, or the app's best
1428
- * available model when that one is unavailable. Each attempt is bounded at a minute, so an override has
1429
- * to answer within it.
1465
+ * Classifier override. Null restores the default model. Runtime inspection uses chat.pii;
1466
+ * legacy input rejection retains its existing classifier selection.
1430
1467
  */
1431
- classifierModel?: AiChatModelSelection;
1468
+ classifierModel?: AiChatModelSelection | null;
1432
1469
  /** Literal values that never count as PII, e.g. a shared support address. */
1433
1470
  allowList?: Array<string>;
1471
+ /** Text boundaries to inspect. Defaults to input. Explicit scopes enable runtime inspection. */
1472
+ scopes?: Array<AiSecurityScope>;
1473
+ /** Effort for runtime inspection; omitted, uses the model's default. */
1474
+ reasoningEffort?: AiReasoningEffort;
1475
+ /** Runtime screening timeout, 1000 to 300000 milliseconds. Defaults to 60000. */
1476
+ timeoutMs?: number;
1434
1477
  };
1435
1478
  /**
1436
1479
  * Outcome of screening one prompt. On a detection the prompt is replaced by {@link redactedPrompt}
@@ -51,7 +51,7 @@ export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-
51
51
  * Public Gemini chat model names (active models only).
52
52
  * @category AI
53
53
  */
54
- export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-4-argon", "gemini-3.8-flash", "gemini-3.5-flash-lite"];
54
+ export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-4-carbon", "gemini-4-argon", "gemini-4-hydrogen", "gemini-3.8-flash", "gemini-3.5-flash-lite"];
55
55
  /**
56
56
  * Public Grok chat model names (active models only).
57
57
  * @category AI
@@ -61,12 +61,12 @@ export declare const GROK_CHAT_MODEL_NAMES: readonly ["grok-4.6", "grok-4-1-fast
61
61
  * Public Anthropic chat model names (active models only).
62
62
  * @category AI
63
63
  */
64
- export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-fable-5-1", "claude-haiku-5-5", "claude-opus-5-5", "claude-sonnet-5-5"];
64
+ export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-fable-5-2", "claude-haiku-5-5", "claude-opus-5-5", "claude-sonnet-5-5"];
65
65
  /**
66
66
  * The supported AI model names.
67
67
  * @category AI
68
68
  */
69
- export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-luna", "gpt-6-astra", "gpt-6-luna", "gpt-6.1-sol", "gpt-6.1-terra", "claude-fable-5-1", "claude-haiku-5-5", "claude-opus-5-5", "claude-sonnet-5-5", "gemini-4-argon", "gemini-3.8-flash", "gemini-3.5-flash-lite", "grok-4.6", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
69
+ export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-luna", "gpt-6-astra", "gpt-6-luna", "gpt-6.1-sol", "gpt-6.1-terra", "claude-fable-5-2", "claude-haiku-5-5", "claude-opus-5-5", "claude-sonnet-5-5", "gemini-4-carbon", "gemini-4-argon", "gemini-4-hydrogen", "gemini-3.8-flash", "gemini-3.5-flash-lite", "grok-4.6", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
70
70
  /** Checks if the given model name is a global AI chat model name. */
71
71
  export declare function isVendorAiChatModelName(modelName: unknown): modelName is VendorAiChatModelName;
72
72
  /**
@@ -1,6 +1,6 @@
1
1
  import { AiChatModelSelection, AiReasoningEffort, ContextImageFailure, UpsertContextErrorCode, UpsertContextStatusError } from './ai-agent.public-types';
2
2
  import { AiEmbeddingsModelSelection, AiRerankProvider } from './ai-common.public-types';
3
- import { AiContextId, AiKnowledgeBaseId, AppId } from './communication.public-types';
3
+ import { AiContextId, AiKnowledgeBaseId, AppId, IntegrationId } from './communication.public-types';
4
4
  import { DocumentExtractionMethod } from './extraction.public-types';
5
5
  import { MetadataAndFilter, MetadataFieldFilter, MetadataOrFilter, MetadataSimpleFilter, MetadataValue, MetadataValueArray } from './metadata-filter.public-types';
6
6
  /**
@@ -55,13 +55,107 @@ export interface AiKnowledgeBase {
55
55
  */
56
56
  contextualIngestUsage?: KnowledgeBaseGraphUsage;
57
57
  /**
58
- * Per-caller access control over retrieval. Omitted ⇒ `'none'`: stored scopes are ignored and every
59
- * caller sees every chunk.
58
+ * Per-caller access control over retrieval. Omitted ⇒ `'none'`: stored scopes are ignored, and only
59
+ * API-key callers may call `search` or `downloadContext` on the knowledge base.
60
60
  */
61
61
  accessControl?: AiKnowledgeBaseAccessControl;
62
+ /**
63
+ * Binds the knowledge base to content that lives outside Squid. Such a knowledge base is read-only: its
64
+ * content cannot be upserted or deleted, and searches run against the source. It is set by the
65
+ * `azure_ai_search` integration whose `knowledgeBaseId` names the knowledge base, never by an upsert.
66
+ */
67
+ externalSource?: AiKnowledgeBaseExternalSource;
62
68
  /** The timestamp the knowledge base was last updated */
63
69
  updatedAt: Date;
64
70
  }
71
+ /**
72
+ * Maps the fields of an Azure AI Search index to the roles Squid reads them in.
73
+ * @category AI
74
+ */
75
+ export interface AzureAiSearchFieldRoles {
76
+ /** The key field of the index. */
77
+ key: string;
78
+ /** The parent document key of a chunked index (index projections). Absent when each record is a whole document. */
79
+ parentKey?: string;
80
+ /** The field holding the document title. */
81
+ title?: string;
82
+ /** The retrievable text fields that make up a record's content, in reading order. */
83
+ content: Array<string>;
84
+ /** The field holding a link to the source document. */
85
+ url?: string;
86
+ /** A filterable, sortable timestamp field. Enables incremental sync of the entity graph. */
87
+ lastModified?: string;
88
+ /** Filterable or facetable fields exposed as knowledge base metadata and facet candidates. */
89
+ metadata: Array<string>;
90
+ /** Vector fields that have a vectorizer, so a vector search can send text and let the index embed it. */
91
+ vector?: Array<string>;
92
+ /** The metadata and security fields that hold a collection of values; filters on them match any element. */
93
+ collections?: Array<string>;
94
+ }
95
+ /**
96
+ * The document-level security models of an Azure AI Search index. See {@link AzureAiSearchSecurity}.
97
+ * @category AI
98
+ */
99
+ export declare const AZURE_AI_SEARCH_SECURITY_MODES: readonly ["none", "filter", "nativeAcl"];
100
+ /**
101
+ * How Squid restricts a search of an Azure AI Search index to what its caller may read.
102
+ *
103
+ * - `'none'`: the index has no document-level security.
104
+ * - `'filter'`: the index has a security field. The caller's values come from the knowledge base's
105
+ * `accessControl.scopeResolver`; a record is visible when the field holds one of them or one of `publicValues`.
106
+ * - `'nativeAcl'`: the index enforces its own ACLs. The caller's Entra token is supplied per request in
107
+ * `integrationAccessTokens` under the integration's id; a search without it fails. Search works as the
108
+ * caller, but Squid's own reads see only the records every user may read, so the knowledge base has no
109
+ * facet concepts and its index card is written from the index definition alone.
110
+ *
111
+ * @category AI
112
+ */
113
+ export type AzureAiSearchSecurity = {
114
+ /** The index has no document-level security. */
115
+ mode: 'none';
116
+ } | {
117
+ /** The index is filtered on a security field. */
118
+ mode: 'filter';
119
+ /** The filterable security field: a string, or a collection of strings. */
120
+ field: string;
121
+ /** Values of the security field that mark a record as visible to every caller. */
122
+ publicValues?: Array<string>;
123
+ } | {
124
+ /** The index enforces native ACLs with the caller's Entra token. */
125
+ mode: 'nativeAcl';
126
+ };
127
+ /**
128
+ * Marks a knowledge base whose content lives in a customer-owned Azure AI Search index. Squid queries the
129
+ * index with the access the integration grants and never modifies it.
130
+ * @category AI
131
+ */
132
+ export interface AiKnowledgeBaseAzureAiSearchSource {
133
+ /** The kind of external source. */
134
+ type: 'azureAiSearch';
135
+ /** The `azure_ai_search` integration that holds the connection to the search service. */
136
+ integrationId: IntegrationId;
137
+ /** The name of the index. */
138
+ indexName: string;
139
+ /** Which index fields Squid reads, and as what. */
140
+ fieldRoles: AzureAiSearchFieldRoles;
141
+ /** How searches are restricted to what the caller may read. */
142
+ security: AzureAiSearchSecurity;
143
+ /**
144
+ * The semantic configuration that hybrid searches rank with. Semantic ranking is billed to the owner of the
145
+ * search service. Omitted ⇒ no semantic ranking.
146
+ */
147
+ semanticConfiguration?: string;
148
+ /**
149
+ * Minutes between the sync scans that keep the entity graph in step with the index. Only used while
150
+ * `graphRag.enabled` is set. Defaults to 60.
151
+ */
152
+ syncIntervalMinutes?: number;
153
+ }
154
+ /**
155
+ * Where the content of an external, read-only knowledge base lives.
156
+ * @category AI
157
+ */
158
+ export type AiKnowledgeBaseExternalSource = AiKnowledgeBaseAzureAiSearchSource;
65
159
  /**
66
160
  * The access-control modes a knowledge base can be in. See {@link AiKnowledgeBaseAccessControl}.
67
161
  * @category AI
@@ -90,7 +184,10 @@ export type AiKnowledgeBaseAccessControlMode = (typeof AI_KB_ACCESS_CONTROL_MODE
90
184
  * @category AI
91
185
  */
92
186
  export interface AiKnowledgeBaseAccessControl {
93
- /** `'none'` (the default) ignores stored scopes entirely; `'enforced'` intersects them per caller. */
187
+ /**
188
+ * `'none'` (the default) ignores stored scopes and admits only API-key callers to `search` and
189
+ * `downloadContext`; `'enforced'` intersects scopes per caller.
190
+ */
94
191
  mode: AiKnowledgeBaseAccessControlMode;
95
192
  /**
96
193
  * The backend function that resolves a caller into the access scopes they hold, as
@@ -1970,8 +2067,13 @@ export interface QueryKnowledgeBaseGraphResponse {
1970
2067
  tree?: KnowledgeBaseGraphQuerySubtreeNode;
1971
2068
  /** `docsUnder`: documents in the resolved node's closure (capped by `limit`). */
1972
2069
  documents?: Array<KnowledgeBaseGraphQueryDoc>;
1973
- /** `docsUnder`: the full closure size (compare with `documents.length` for truncation). */
2070
+ /**
2071
+ * `docsUnder`: the full closure size (compare with `documents.length` for truncation). Absent when the
2072
+ * knowledge base is bound to a chunked external index, which can count chunks only: see `totalChunks`.
2073
+ */
1974
2074
  totalDocs?: number;
2075
+ /** `docsUnder` on a chunked external index: the chunks under the node, of which `documents` lists the first. */
2076
+ totalChunks?: number;
1975
2077
  /** `conceptsOf`: the document's concept memberships. */
1976
2078
  concepts?: KnowledgeBaseGraphQueryConcepts;
1977
2079
  /** `neighborhood`: the entity subgraph around the resolved entity. */
@@ -2528,6 +2630,31 @@ export interface BulkIngestionSubscribeRequest {
2528
2630
  /** The id of the bulk-ingestion job to subscribe to. */
2529
2631
  jobId: string;
2530
2632
  }
2633
+ /**
2634
+ * Why bulk ingestion cannot stage contexts into a knowledge base: `BULK_INGESTION_DISABLED` when this
2635
+ * deployment cannot run bulk ingestion at all, `BULK_INGESTION_UNSUPPORTED_EMBEDDING_MODEL` when only this
2636
+ * knowledge base's embedding model rules it out.
2637
+ * @category AI
2638
+ */
2639
+ export type BulkIngestionUnavailableReason = 'BULK_INGESTION_DISABLED' | 'BULK_INGESTION_UNSUPPORTED_EMBEDDING_MODEL';
2640
+ /**
2641
+ * Request structure for checking whether bulk ingestion can stage contexts into a knowledge base.
2642
+ * @category AI
2643
+ */
2644
+ export interface BulkIngestionAvailabilityRequest {
2645
+ /** The id of the knowledge base to check. */
2646
+ knowledgeBaseId: AiKnowledgeBaseId;
2647
+ }
2648
+ /**
2649
+ * Response saying whether bulk ingestion can stage contexts into the requested knowledge base.
2650
+ * @category AI
2651
+ */
2652
+ export interface BulkIngestionAvailabilityResponse {
2653
+ /** Whether a bulk upsert into this knowledge base would be admitted. */
2654
+ available: boolean;
2655
+ /** Set when `available` is false. */
2656
+ unavailableReason?: BulkIngestionUnavailableReason;
2657
+ }
2531
2658
  /**
2532
2659
  * Request structure for minting presigned upload URLs for direct-to-storage bulk ingestion: the caller
2533
2660
  * PUTs each file's bytes straight to storage, then references it in {@link BulkIngestionContext} via
@@ -2562,3 +2689,145 @@ export interface BulkIngestionCreateUploadUrlsResponse {
2562
2689
  stagedObjectKey: string;
2563
2690
  }>;
2564
2691
  }
2692
+ /**
2693
+ * The sizes a synthetic-data run of a knowledge base comes in.
2694
+ * @category AI
2695
+ */
2696
+ export declare const AI_KNOWLEDGE_BASE_SYNTHETIC_DATA_SIZES: readonly ["S", "M", "L", "XL"];
2697
+ /**
2698
+ * How many documents a synthetic-data run writes: S 10, M 25, L 100, XL 500.
2699
+ * @category AI
2700
+ */
2701
+ export type AiKnowledgeBaseSyntheticDataSize = (typeof AI_KNOWLEDGE_BASE_SYNTHETIC_DATA_SIZES)[number];
2702
+ /**
2703
+ * What a synthetic-data run of a knowledge base writes.
2704
+ * @category AI
2705
+ */
2706
+ export interface AiKnowledgeBaseSyntheticDataOptions {
2707
+ /** What the documents should be about and look like. */
2708
+ prompt?: string;
2709
+ /** How many documents to write. */
2710
+ size: AiKnowledgeBaseSyntheticDataSize;
2711
+ }
2712
+ /**
2713
+ * The state of a synthetic-data run of a knowledge base.
2714
+ * @category AI
2715
+ */
2716
+ export type AiKnowledgeBaseSyntheticDataStatus = 'running' | 'completed' | 'cancelled' | 'failed';
2717
+ /**
2718
+ * The step a synthetic-data run of a knowledge base is at: reading the knowledge base and planning,
2719
+ * writing documents, or done.
2720
+ * @category AI
2721
+ */
2722
+ export type AiKnowledgeBaseSyntheticDataPhase = 'planning' | 'writing' | 'done';
2723
+ /**
2724
+ * A synthetic-data run of a knowledge base, which adds fictional documents to it in a dev environment.
2725
+ * @category AI
2726
+ */
2727
+ export interface AiKnowledgeBaseSyntheticDataRun {
2728
+ /** The knowledge base the run writes to. */
2729
+ knowledgeBaseId: AiKnowledgeBaseId;
2730
+ /** The id of the background job of the run. */
2731
+ jobId: string;
2732
+ /** The state of the run. */
2733
+ status: AiKnowledgeBaseSyntheticDataStatus;
2734
+ /** The step the run is at. */
2735
+ phase: AiKnowledgeBaseSyntheticDataPhase;
2736
+ /** What the run was asked to write. */
2737
+ options: AiKnowledgeBaseSyntheticDataOptions;
2738
+ /** The documents the run planned to write. */
2739
+ plannedDocuments: number;
2740
+ /** The ids of the documents the run added to the knowledge base. */
2741
+ contextIds: Array<AiContextId>;
2742
+ /** The documents written and left out, by the run's own checks or by the knowledge base. */
2743
+ rejectedDocuments: number;
2744
+ /** Why the latest of the rejected documents was left out. */
2745
+ lastRejection?: string;
2746
+ /** When the run started, in epoch milliseconds. */
2747
+ startedAt: number;
2748
+ /** When the run ended, in epoch milliseconds. */
2749
+ endedAt?: number;
2750
+ /** Why the run failed. */
2751
+ error?: string;
2752
+ }
2753
+ /**
2754
+ * The tiers of the semantic layer over an external source: 1 is the index catalog and facet concepts, 2 the
2755
+ * entity graph.
2756
+ * @category AI
2757
+ */
2758
+ export type KnowledgeBaseExternalSourceTier = 1 | 2;
2759
+ /**
2760
+ * One thing a tier of the semantic layer needs from an external source.
2761
+ * @category AI
2762
+ */
2763
+ export interface KnowledgeBaseExternalSourcePrerequisite {
2764
+ /** A stable identifier of the prerequisite. */
2765
+ id: KnowledgeBaseExternalSourcePrerequisiteId;
2766
+ /** The lowest tier that needs it. */
2767
+ tier: KnowledgeBaseExternalSourceTier;
2768
+ /** Whether the index provides it: `'unknown'` when the integration may not read what answers that. */
2769
+ status: 'met' | 'unmet' | 'unknown';
2770
+ /** True when the tier cannot run without it; false when the tier runs degraded. */
2771
+ required: boolean;
2772
+ /** What was found, and what it means for the tier. */
2773
+ message: string;
2774
+ }
2775
+ /**
2776
+ * The prerequisites the binding of an external source reports.
2777
+ * @category AI
2778
+ */
2779
+ export type KnowledgeBaseExternalSourcePrerequisiteId = 'definitionReadable' | 'documentSecurityKnown' | 'contentRetrievable' | 'vectorizer' | 'keyFilterableSortable' | 'withinScanLimit' | 'timestampField' | 'noDocumentSecurity';
2780
+ /**
2781
+ * Request structure for reading the state of an external knowledge base's semantic layer.
2782
+ * @category AI
2783
+ */
2784
+ export interface GetKnowledgeBaseExternalSourceStatusRequest {
2785
+ /** The id of the AiKnowledgeBase. */
2786
+ knowledgeBaseId: AiKnowledgeBaseId;
2787
+ }
2788
+ /**
2789
+ * Response structure for the state of an external knowledge base's semantic layer.
2790
+ * @category AI
2791
+ */
2792
+ export interface GetKnowledgeBaseExternalSourceStatusResponse {
2793
+ /** What each tier needs from the index, and whether it provides it, as the integration's latest save found. */
2794
+ prerequisites: Array<KnowledgeBaseExternalSourcePrerequisite>;
2795
+ /** The description of the index and its mapped fields that agents see. */
2796
+ indexCard?: string;
2797
+ /** When the index card and the facet concepts were last rebuilt, in epoch milliseconds. */
2798
+ catalogRefreshedAt?: number;
2799
+ /** Why the latest catalog refresh failed. */
2800
+ catalogError?: string;
2801
+ /** The state of the sync that keeps the entity graph in step with the index; absent without an entity graph. */
2802
+ sync?: KnowledgeBaseExternalSourceSyncStatus;
2803
+ }
2804
+ /**
2805
+ * The state of the sync between an external index and the entity graph built over it.
2806
+ * @category AI
2807
+ */
2808
+ export interface KnowledgeBaseExternalSourceSyncStatus {
2809
+ /** Documents the ledger tracks. */
2810
+ documents: number;
2811
+ /** When the latest scan of the index completed, in epoch milliseconds. */
2812
+ lastScanCompletedAt?: number;
2813
+ /** When a scan is running: when it started, in epoch milliseconds. */
2814
+ scanStartedAt?: number;
2815
+ /** When the next scan is due, in epoch milliseconds. */
2816
+ nextScanAt?: number;
2817
+ /** Documents the latest completed scan found added or changed. */
2818
+ lastScanUpserted?: number;
2819
+ /** Documents the latest completed scan pruned. */
2820
+ lastScanDeleted?: number;
2821
+ /** Whether scans read only changed records (the index has a timestamp field) or compare every record. */
2822
+ incremental: boolean;
2823
+ /** Why the latest scan failed. */
2824
+ error?: string;
2825
+ }
2826
+ /**
2827
+ * Request structure for refreshing an external knowledge base's semantic layer now.
2828
+ * @category AI
2829
+ */
2830
+ export interface RefreshKnowledgeBaseExternalSourceRequest {
2831
+ /** The id of the AiKnowledgeBase. */
2832
+ knowledgeBaseId: AiKnowledgeBaseId;
2833
+ }
@@ -1,6 +1,6 @@
1
1
  import { IntegrationId } from './communication.public-types';
2
2
  /** List of all integration types supported by Squid. */
3
- export declare const INTEGRATION_TYPES: readonly ["active_directory", "ai_agents", "ai_chatbot", "algolia", "alloydb", "api", "auth0", "bedrock", "azure_blob", "azure_cosmosdb", "azure_postgresql", "azure_sql", "bigquery", "bitbucket", "built_in_azure_blob", "built_in_db", "built_in_gcs", "built_in_queue", "built_in_s3", "cassandra", "clickhouse", "cloudsql", "cockroach", "cognito", "connected_knowledgebases", "confluence", "confluent", "datadog", "db2", "descope", "documentdb", "azure-entra-external-id", "azure-entra-id", "dynamodb", "elasticsearch", "firebase_auth", "firestore", "gcs", "generic_site_ingester", "github", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jira_jsm", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "databricks_genie", "mysql", "newrelic", "okta", "onedrive", "outlook", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce", "salesforce_db", "sap_hana", "sentry", "snowflake", "spanner", "xata", "zendesk", "servicenow_csm", "freshdesk", "mail", "slack", "twilio", "elevenlabs", "openai_voice", "mcp", "a2a", "legend", "teams", "openai_compatible", "openai_compatible_embedding", "bedrock_embedding", "sharepoint", "vertex"];
3
+ export declare const INTEGRATION_TYPES: readonly ["active_directory", "ai_agents", "ai_chatbot", "algolia", "alloydb", "api", "auth0", "bedrock", "azure_blob", "azure_cosmosdb", "azure_postgresql", "azure_sql", "bigquery", "bitbucket", "built_in_azure_blob", "built_in_db", "built_in_gcs", "built_in_queue", "built_in_s3", "cassandra", "clickhouse", "cloudsql", "cockroach", "cognito", "connected_knowledgebases", "confluence", "confluent", "datadog", "db2", "descope", "documentdb", "azure-entra-external-id", "azure-entra-id", "dynamodb", "elasticsearch", "firebase_auth", "firestore", "gcs", "generic_site_ingester", "github", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jira_jsm", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "databricks_genie", "azure_ai_search", "mysql", "newrelic", "okta", "onedrive", "outlook", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce", "salesforce_db", "sap_hana", "sentry", "snowflake", "spanner", "xata", "zendesk", "servicenow_csm", "freshdesk", "mail", "slack", "twilio", "elevenlabs", "openai_voice", "mcp", "a2a", "legend", "teams", "openai_compatible", "openai_compatible_embedding", "bedrock_embedding", "sharepoint", "vertex"];
4
4
  /**
5
5
  * @category Database
6
6
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/twilio-client",
3
- "version": "1.0.510",
3
+ "version": "1.0.511",
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.510"
20
+ "@squidcloud/client": "^1.0.511"
21
21
  },
22
22
  "engines": {
23
23
  "node": ">=20.0.0"