@squidcloud/client 1.0.464 → 1.0.466

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.
@@ -1,5 +1,5 @@
1
1
  import { JSONSchema } from 'json-schema-typed';
2
- import { AiAudioCreateSpeechModelName, AiAudioTranscriptionModelName, AiChatModelName, AiImageModelName, AiProviderType, AiRerankProvider, AnthropicChatModelName, GeminiChatModelName, GrokChatModelName, OpenAiAudioCreateSpeechModelName, OpenAiAudioTranscriptionModelName, OpenAiChatModelName, OpenAiCreateSpeechFormat, OpenAiImageModelName } from './ai-common.public-types';
2
+ import { AiAudioCreateSpeechModelName, AiAudioTranscriptionModelName, AiChatModelName, AiImageModelName, AiProviderType, AiRerankProvider, AnthropicChatModelName, GeminiChatModelName, GrokChatModelName, ModelIdSpec, OpenAiAudioCreateSpeechModelName, OpenAiAudioTranscriptionModelName, OpenAiChatModelName, OpenAiCreateSpeechFormat, OpenAiImageModelName } from './ai-common.public-types';
3
3
  import { AiContextMetadata, AiContextMetadataFilter, AiKnowledgeBaseContextType, AiRagType } from './ai-knowledge-base.public-types';
4
4
  import { AiFunctionId, AiFunctionIdWithContext, UserAiChatModelName } from './backend.public-types';
5
5
  import { AiAgentId, AiContextId, AiKnowledgeBaseId, AppId, IntegrationId } from './communication.public-types';
@@ -613,6 +613,19 @@ export interface AiAgent<T extends AiChatModelSelection | undefined = undefined>
613
613
  export type UpsertAgentRequest = Omit<AiAgent, 'createdAt' | 'updatedAt' | 'options'> & {
614
614
  options?: AiChatOptions;
615
615
  };
616
+ /**
617
+ * Status update title broadcast when the agent finishes producing a response,
618
+ * either successfully or with an error. Emitted exactly once per `ask` job and
619
+ * is the last status event for that job.
620
+ * @category AI
621
+ */
622
+ export declare const AGENT_STATUS_TITLE_AGENT_RESPONSE = "Agent Response";
623
+ /**
624
+ * Status update title broadcast when the agent invokes a knowledge-base
625
+ * callable. A matching invocation produces a single event with this title.
626
+ * @category AI
627
+ */
628
+ export declare const AGENT_STATUS_TITLE_ACCESSING_KB = "Accessing Knowledge Base";
616
629
  /**
617
630
  * A status message from an AI agent operation.
618
631
  * @category AI
@@ -1016,4 +1029,21 @@ export interface BuildAgentOptions {
1016
1029
  /** Whether the caller has permission to create or update integrations. Defaults to false. */
1017
1030
  canManageIntegrations?: boolean;
1018
1031
  }
1032
+ /**
1033
+ * Response containing the list of AI agents in an application.
1034
+ * @category AI
1035
+ */
1036
+ export interface ListAgentsResponse {
1037
+ /** All AI agents defined for the application. */
1038
+ agents: Array<AiAgent>;
1039
+ }
1040
+ /**
1041
+ * Response containing the list of chat models available to an application.
1042
+ * Includes both Squid-provided vendor models and any custom integration models.
1043
+ * @category AI
1044
+ */
1045
+ export interface ListChatModelsResponse {
1046
+ /** All chat models available to the application. */
1047
+ models: Array<ModelIdSpec>;
1048
+ }
1019
1049
  export {};
@@ -8,7 +8,7 @@ export declare const RERANK_PROVIDERS: readonly ["cohere", "none"];
8
8
  */
9
9
  export type AiRerankProvider = (typeof RERANK_PROVIDERS)[number];
10
10
  /** List of available AI provider types. See AiProviderType. */
11
- export declare const AI_PROVIDER_TYPES: readonly ["anthropic", "bedrock", "claude-code", "cohere", "flux", "gemini", "openai", "grok", "stability", "voyage", "mistral", "textract", "external"];
11
+ export declare const AI_PROVIDER_TYPES: readonly ["anthropic", "bedrock", "claude-code", "cohere", "flux", "gemini", "openai", "grok", "stability", "voyage", "mistral", "textract", "vertex", "external"];
12
12
  /**
13
13
  * Type of the AI provider.
14
14
  * References a single AI service, regardless of the model or other AI function it provides (like
@@ -29,7 +29,7 @@ export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5.4", "gpt-5.4-mini
29
29
  * Public Gemini chat model names (active models only).
30
30
  * @category AI
31
31
  */
32
- export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-3-pro", "gemini-3-flash"];
32
+ export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-3.1-pro", "gemini-3.5-flash"];
33
33
  /**
34
34
  * Public Grok chat model names (active models only).
35
35
  * @category AI
@@ -44,7 +44,7 @@ export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-haiku-4-5-202
44
44
  * The supported AI model names.
45
45
  * @category AI
46
46
  */
47
- export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "claude-haiku-4-5-20251001", "claude-opus-4-7", "claude-sonnet-4-6", "gemini-3-pro", "gemini-3-flash", "grok-4", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
47
+ export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "claude-haiku-4-5-20251001", "claude-opus-4-7", "claude-sonnet-4-6", "gemini-3.1-pro", "gemini-3.5-flash", "grok-4", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
48
48
  /** Checks if the given model name is a global AI chat model name. */
49
49
  export declare function isVendorAiChatModelName(modelName: unknown): modelName is VendorAiChatModelName;
50
50
  /**
@@ -212,6 +212,8 @@ export interface ModelIdSpec {
212
212
  modelId: AiChatModelName;
213
213
  /** The integration ID if this model comes from an integration (OpenAI-compatible, Bedrock). Is undefined for Squid-provided models. */
214
214
  integrationId?: string;
215
+ /** Human-readable display name for the model (e.g. "GPT-4o"). */
216
+ displayName?: string;
215
217
  }
216
218
  /**
217
219
  * Type guard to check if a model selection is integration-based.
@@ -48,3 +48,11 @@ export interface AiFunctionMetadata {
48
48
  /** Whether this function is internal and not meant for direct use. */
49
49
  internal?: boolean;
50
50
  }
51
+ /**
52
+ * Response containing the list of AI functions registered in an application.
53
+ * @category AI
54
+ */
55
+ export interface ListAiFunctionsResponse {
56
+ /** All AI functions registered for the application. */
57
+ functions: Array<AiFunctionMetadata>;
58
+ }
@@ -2,6 +2,17 @@ import { AgentContextRequest, AiChatModelSelection, UpsertContextStatusError } f
2
2
  import { AiEmbeddingsModelSelection, AiRerankProvider } from './ai-common.public-types';
3
3
  import { AiContextId, AiKnowledgeBaseId, AppId } from './communication.public-types';
4
4
  import { DocumentExtractionMethod } from './extraction.public-types';
5
+ /**
6
+ * The set of supported vector store backends for a knowledge base. The authoritative backend for a
7
+ * given KB is persisted on its record; reads/writes route through the matching vector provider.
8
+ * @category AI
9
+ */
10
+ export declare const VECTOR_DB_TYPES: readonly ["postgres", "mongoAtlas"];
11
+ /**
12
+ * A vector store backend identifier. See {@link VECTOR_DB_TYPES}.
13
+ * @category AI
14
+ */
15
+ export type VectorDbType = (typeof VECTOR_DB_TYPES)[number];
5
16
  /**
6
17
  * Represents an AI knowledge base that can be attached to an AI agent.
7
18
  * @category AI
@@ -186,6 +197,17 @@ export interface AiKnowledgeBaseContextTextOptions extends BaseAiKnowledgeBaseCo
186
197
  */
187
198
  export interface AiKnowledgeBaseContextFileOptions extends BaseAiKnowledgeBaseContextOptions {
188
199
  }
200
+ /**
201
+ * Hint about the format of a text context payload.
202
+ *
203
+ * - `auto`: detect the format from the content (default).
204
+ * - `markdown`: treat the text as Markdown — image references will be extracted if `extractImages` is true.
205
+ * - `html`: treat the text as HTML — `<img>` tags will be extracted if `extractImages` is true.
206
+ * - `plain`: treat the text as plain text — no image extraction is performed even if `extractImages` is true.
207
+ *
208
+ * @category AI
209
+ */
210
+ export type AiKnowledgeBaseTextFormat = 'auto' | 'markdown' | 'html' | 'plain';
189
211
  /**
190
212
  * Request structure for adding text-based context to an AI agent.
191
213
  * @category AI
@@ -199,6 +221,26 @@ export interface AiKnowledgeBaseTextContextRequest extends BaseAiKnowledgeBaseCo
199
221
  title: string;
200
222
  /** The text content to add to the context. */
201
223
  text: string;
224
+ /**
225
+ * Hint about the format of the text. If omitted (or `'auto'`), the format is sniffed from the content.
226
+ * Only `'markdown'` and `'html'` (or `'auto'` with content that looks like markdown/HTML) participate in
227
+ * image extraction when `extractImages` is true.
228
+ */
229
+ format?: AiKnowledgeBaseTextFormat;
230
+ /**
231
+ * Whether to extract images embedded in markdown/HTML text. Defaults to false.
232
+ *
233
+ * When true and the text is detected as (or declared to be) markdown/HTML, image references inside the
234
+ * text (`![alt](url)` or `<img src="...">`) are fetched, stored, and have descriptions generated
235
+ * just like images extracted from a PDF.
236
+ *
237
+ * Has no effect for plain text.
238
+ */
239
+ extractImages?: boolean;
240
+ /** Minimum width/height (in pixels) for an image to be kept. Smaller images are skipped. */
241
+ imageMinSizePixels?: number;
242
+ /** The AI model to use for generating image descriptions, if specified. */
243
+ imageExtractionModel?: AiChatModelSelection;
202
244
  /** General options for how to process the text. */
203
245
  options?: AiKnowledgeBaseContextTextOptions;
204
246
  }
@@ -386,6 +428,13 @@ export type AiEmbeddingsModelWithOptionalFields = Omit<AiKnowledgeBase, 'chatMod
386
428
  chatModel?: AiKnowledgeBase['chatModel'];
387
429
  name?: string;
388
430
  embeddingModel?: AiEmbeddingsModelSelection;
431
+ /**
432
+ * The vector store backend for this knowledge base. Optional: when omitted, newly-created KBs use
433
+ * the server's default backend (`SQUID_DEFAULT_VECTOR_DB_TYPE`, otherwise `'postgres'`). The backend
434
+ * cannot be changed once the KB exists, so on re-upsert this must either be omitted or match the
435
+ * existing value.
436
+ */
437
+ vectorDbType?: VectorDbType;
389
438
  };
390
439
  /**
391
440
  * API request for deleting an AiKnowledgeBase
@@ -429,4 +478,12 @@ export interface AiKnowledgeBaseSearchResponse {
429
478
  /** Array of result chunks from the search */
430
479
  chunks: Array<AiKnowledgeBaseSearchResultChunk>;
431
480
  }
481
+ /**
482
+ * Response containing the list of AI knowledge bases in an application.
483
+ * @category AI
484
+ */
485
+ export interface ListAiKnowledgeBasesResponse {
486
+ /** All AI knowledge bases defined for the application. */
487
+ knowledgeBases: Array<AiKnowledgeBase>;
488
+ }
432
489
  export {};
@@ -30,6 +30,11 @@ export interface ExtractDataFromDocumentOptions {
30
30
  * Defaults to false.
31
31
  */
32
32
  discardOriginalFile?: boolean;
33
+ /**
34
+ * Format hint for text-based extraction (markdown / HTML). When omitted, the format is detected from
35
+ * the content. Only consulted by extractors that handle text input.
36
+ */
37
+ textFormat?: 'auto' | 'markdown' | 'html' | 'plain';
33
38
  }
34
39
  /**
35
40
  * Request payload for extracting data from a document via URL.
@@ -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", "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", "dynamodb", "elasticsearch", "firebase_auth", "firestore", "gcs", "github", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jira_jsm", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "mysql", "newrelic", "okta", "onedrive", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce", "sap_hana", "sentry", "snowflake", "spanner", "xata", "zendesk", "servicenow_csm", "freshdesk", "mail", "slack", "mcp", "a2a", "legend", "teams", "openai_compatible", "openai_compatible_embedding", "sharepoint"];
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", "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", "dynamodb", "elasticsearch", "firebase_auth", "firestore", "gcs", "github", "google_calendar", "google_docs", "google_drive", "graphql", "hubspot", "jira", "jira_jsm", "jwt_hmac", "jwt_rsa", "kafka", "keycloak", "linear", "mariadb", "monday", "mongo", "mssql", "databricks", "mysql", "newrelic", "okta", "onedrive", "oracledb", "pinecone", "postgres", "redis", "s3", "salesforce", "sap_hana", "sentry", "snowflake", "spanner", "xata", "zendesk", "servicenow_csm", "freshdesk", "mail", "slack", "mcp", "a2a", "legend", "teams", "openai_compatible", "openai_compatible_embedding", "sharepoint", "vertex"];
4
4
  /**
5
5
  * @category Database
6
6
  */
@@ -8,7 +8,7 @@ export declare const DATA_INTEGRATION_TYPES: readonly ["bigquery", "built_in_db"
8
8
  /**
9
9
  * @category Auth
10
10
  */
11
- export declare const AUTH_INTEGRATION_TYPES: readonly ["auth0", "jwt_rsa", "jwt_hmac", "cognito", "okta", "keycloak", "descope", "firebase_auth"];
11
+ export declare const AUTH_INTEGRATION_TYPES: readonly ["auth0", "jwt_rsa", "jwt_hmac", "cognito", "okta", "keycloak", "descope", "firebase_auth", "azure-entra-external-id"];
12
12
  /** Supported integration types for GraphQL-based services. */
13
13
  export declare const GRAPHQL_INTEGRATION_TYPES: readonly ["graphql"];
14
14
  /** Supported integration types for HTTP-based services. */
@@ -51,4 +51,26 @@ export type TopLevelPropertySchema = PropertySchema & {
51
51
  export type CollectionSchema = Omit<ConvertDeep<JSONSchema>, 'properties'> & {
52
52
  properties?: Record<string, TopLevelPropertySchema>;
53
53
  };
54
+ /**
55
+ * API-boundary view of {@link CollectionSchema} for use in OpenAPI-exposed
56
+ * controllers. Decouples the public REST surface from `json-schema-typed`'s
57
+ * recursive generic, which tsoa's type resolver cannot walk.
58
+ *
59
+ * The on-the-wire payload is the same as {@link CollectionSchema} — this type
60
+ * just describes it as an opaque JSON object for the generated OpenAPI spec
61
+ * (which is also what tsoa 5.x emitted for {@link CollectionSchema}: a bare
62
+ * `object` with no properties).
63
+ */
64
+ export interface CollectionSchemaApi {
65
+ /** JSON Schema `type` keyword (e.g. "object"). */
66
+ type?: string;
67
+ /** Map of property names to their schemas. */
68
+ properties?: Record<string, unknown>;
69
+ /** Names of required properties. */
70
+ required?: string[];
71
+ /** Human-readable description of the collection. */
72
+ description?: string;
73
+ /** Additional JSON Schema / Squid-specific fields are preserved as-is. */
74
+ [key: string]: unknown;
75
+ }
54
76
  export {};
@@ -2,4 +2,4 @@
2
2
  * The current version of the SquidCloud client package.
3
3
  * @category Platform
4
4
  */
5
- export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.464";
5
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.466";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.464",
3
+ "version": "1.0.466",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -39,7 +39,8 @@
39
39
  "license": "ISC",
40
40
  "dependencies": {
41
41
  "json-schema-typed": "^8.0.1",
42
- "ws": "^8.20.0"
42
+ "lz4js": "^0.2.0",
43
+ "ws": "^8.21.0"
43
44
  },
44
45
  "optionalDependencies": {
45
46
  "bufferutil": "^4.0.8",
@@ -49,8 +50,6 @@
49
50
  "rxjs": ">=7.5.7 <8.0.0"
50
51
  },
51
52
  "devDependencies": {
52
- "typedoc": "^0.28.10",
53
- "typedoc-plugin-markdown": "^4.8.1",
54
53
  "@supercharge/promise-pool": "^3.2.0",
55
54
  "@webpack-cli/generators": "^3.0.7",
56
55
  "copy-webpack-plugin": "^14.0.0",
@@ -59,6 +58,8 @@
59
58
  "otrie": "^1.2.2",
60
59
  "tsconfig-paths-webpack-plugin": "^4.1.0",
61
60
  "tscpaths": "^0.0.9",
61
+ "typedoc": "^0.28.10",
62
+ "typedoc-plugin-markdown": "^4.8.1",
62
63
  "webpack": "^5.106.2",
63
64
  "webpack-cli": "^5.1.4"
64
65
  },