@squidcloud/client 1.0.465 → 1.0.467

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';
@@ -1029,4 +1029,21 @@ export interface BuildAgentOptions {
1029
1029
  /** Whether the caller has permission to create or update integrations. Defaults to false. */
1030
1030
  canManageIntegrations?: boolean;
1031
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
+ }
1032
1049
  export {};
@@ -39,12 +39,12 @@ export declare const GROK_CHAT_MODEL_NAMES: readonly ["grok-4", "grok-4-1-fast-r
39
39
  * Public Anthropic chat model names (active models only).
40
40
  * @category AI
41
41
  */
42
- export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-haiku-4-5-20251001", "claude-opus-4-7", "claude-sonnet-4-6"];
42
+ export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-haiku-4-5-20251001", "claude-opus-4-8", "claude-sonnet-4-6"];
43
43
  /**
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.1-pro", "gemini-3.5-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-8", "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.
@@ -37,8 +37,18 @@ export interface AiFunctionAttributes {
37
37
  export interface AiFunctionMetadata {
38
38
  /** The fully qualified name of the function (serviceName:functionName). */
39
39
  serviceFunction: ServiceFunctionName;
40
- /** Description of what the function does. */
41
- description: string;
40
+ /**
41
+ * Description of what the function does. Optional when {@link promptId} is set,
42
+ * in which case the description is resolved server-side from the prompt
43
+ * registry at the point the LLM tool definition is built.
44
+ */
45
+ description?: string;
46
+ /**
47
+ * Opaque id of a registered prompt that supplies this function's description.
48
+ * Stored verbatim (the public SDK never resolves it — that would ship the
49
+ * internal prompt registry to customers); resolution happens server-side.
50
+ */
51
+ promptId?: string;
42
52
  /** Parameters that the function accepts. */
43
53
  params: Array<AiFunctionParam>;
44
54
  /** Additional attributes for the function. */
@@ -48,3 +58,11 @@ export interface AiFunctionMetadata {
48
58
  /** Whether this function is internal and not meant for direct use. */
49
59
  internal?: boolean;
50
60
  }
61
+ /**
62
+ * Response containing the list of AI functions registered in an application.
63
+ * @category AI
64
+ */
65
+ export interface ListAiFunctionsResponse {
66
+ /** All AI functions registered for the application. */
67
+ functions: Array<AiFunctionMetadata>;
68
+ }
@@ -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
@@ -126,6 +137,33 @@ export interface AiKnowledgeBaseChatOptions {
126
137
  chunkLimit?: number;
127
138
  /** Which chat model to use when asking the question */
128
139
  chatModel?: AiChatModelSelection;
140
+ /**
141
+ * Selects how the underlying vector store generates candidates:
142
+ * - `'hybrid'` (default): fuses dense vector and keyword candidates when the backend supports it
143
+ * (Mongo Atlas uses `$rankFusion`; backends without native fusion fall back to dense-only with
144
+ * the legacy app-side keyword fallback).
145
+ * - `'vector'`: dense-only — skips native fusion even on backends that support it.
146
+ *
147
+ * Intended to let A/B evaluations compare dense-only vs hybrid retrieval on the same backend.
148
+ */
149
+ searchMode?: 'vector' | 'hybrid';
150
+ /**
151
+ * Per-pipeline weights for native hybrid fusion (Mongo `$rankFusion.combination.weights`). Only
152
+ * applies when `searchMode` is `'hybrid'` on a backend with native fusion; ignored otherwise.
153
+ * Each value must be a finite non-negative number; an omitted key defaults to `1` (the MongoDB
154
+ * default). Useful for A/B evaluating dense-vs-keyword weighting on the same backend.
155
+ */
156
+ hybridWeights?: AiHybridSearchWeights;
157
+ }
158
+ /**
159
+ * Per-pipeline weights for native hybrid fusion. Sub-keys mirror the `$rankFusion` pipeline names.
160
+ * @category AI
161
+ */
162
+ export interface AiHybridSearchWeights {
163
+ /** Weight for the dense vector sub-pipeline. Defaults to `1`. */
164
+ vector?: number;
165
+ /** Weight for the BM25 keyword sub-pipeline. Defaults to `1`. */
166
+ keyword?: number;
129
167
  }
130
168
  /**
131
169
  * @category AI
@@ -294,6 +332,23 @@ export interface AiKnowledgeBaseSearchOptions {
294
332
  chunkLimit?: number;
295
333
  /** Which chat model to use when asking the question */
296
334
  chatModel?: AiChatModelSelection;
335
+ /**
336
+ * Selects how the underlying vector store generates candidates:
337
+ * - `'hybrid'` (default): fuses dense vector and keyword candidates when the backend supports it
338
+ * (Mongo Atlas uses `$rankFusion`; backends without native fusion fall back to dense-only with
339
+ * the legacy app-side keyword fallback).
340
+ * - `'vector'`: dense-only — skips native fusion even on backends that support it.
341
+ *
342
+ * Intended to let A/B evaluations compare dense-only vs hybrid retrieval on the same backend.
343
+ */
344
+ searchMode?: 'vector' | 'hybrid';
345
+ /**
346
+ * Per-pipeline weights for native hybrid fusion (Mongo `$rankFusion.combination.weights`). Only
347
+ * applies when `searchMode` is `'hybrid'` on a backend with native fusion; ignored otherwise.
348
+ * Each value must be a finite non-negative number; an omitted key defaults to `1` (the MongoDB
349
+ * default). Useful for A/B evaluating dense-vs-keyword weighting on the same backend.
350
+ */
351
+ hybridWeights?: AiHybridSearchWeights;
297
352
  }
298
353
  /**
299
354
  * A single chunk of data returned from an AI search operation.
@@ -417,6 +472,13 @@ export type AiEmbeddingsModelWithOptionalFields = Omit<AiKnowledgeBase, 'chatMod
417
472
  chatModel?: AiKnowledgeBase['chatModel'];
418
473
  name?: string;
419
474
  embeddingModel?: AiEmbeddingsModelSelection;
475
+ /**
476
+ * The vector store backend for this knowledge base. Optional: when omitted, newly-created KBs use
477
+ * the server's default backend (`SQUID_DEFAULT_VECTOR_DB_TYPE`, otherwise `'postgres'`). The backend
478
+ * cannot be changed once the KB exists, so on re-upsert this must either be omitted or match the
479
+ * existing value.
480
+ */
481
+ vectorDbType?: VectorDbType;
420
482
  };
421
483
  /**
422
484
  * API request for deleting an AiKnowledgeBase
@@ -460,4 +522,12 @@ export interface AiKnowledgeBaseSearchResponse {
460
522
  /** Array of result chunks from the search */
461
523
  chunks: Array<AiKnowledgeBaseSearchResultChunk>;
462
524
  }
525
+ /**
526
+ * Response containing the list of AI knowledge bases in an application.
527
+ * @category AI
528
+ */
529
+ export interface ListAiKnowledgeBasesResponse {
530
+ /** All AI knowledge bases defined for the application. */
531
+ knowledgeBases: Array<AiKnowledgeBase>;
532
+ }
463
533
  export {};
@@ -63,10 +63,18 @@ export interface GraphQLConnectionOptions {
63
63
  }
64
64
  /** A mapping of field names to their corresponding injection field definitions. */
65
65
  export type ApiInjectionSchema = Record<FieldName, ApiInjectionField>;
66
- /** Options for discovering APIs via an OpenAPI specification. */
66
+ /**
67
+ * Options for discovering APIs via an OpenAPI specification. Supply either a URL
68
+ * to fetch the document from, or the raw document content directly.
69
+ */
67
70
  export interface OpenApiDiscoveryOptions {
68
71
  /** The URL of the OpenAPI specification document. */
69
- openApiSpecUrl: string;
72
+ openApiSpecUrl?: string;
73
+ /**
74
+ * The raw OpenAPI specification document (JSON or YAML), used to discover the
75
+ * schema directly when the spec is provided as content rather than a URL.
76
+ */
77
+ openApiSpecContent?: string;
70
78
  }
71
79
  /** Represents the structure of an API endpoint, including its path, method, schemas, and metadata. */
72
80
  export interface ApiEndpoint {
@@ -47,9 +47,21 @@ export type TopLevelPropertySchema = PropertySchema & {
47
47
  */
48
48
  hidden?: boolean;
49
49
  };
50
+ /**
51
+ * Milestoning kind on a Legend/PURE class. Drives `.all()` arity and the date
52
+ * arguments required when navigating to the class's properties:
53
+ * - `business-temporal` → `.all(businessDate)`, `$x.prop(businessDate)`
54
+ * - `processing-temporal` → `.all(processingDate)`, `$x.prop(processingDate)`
55
+ * - `bitemporal` → `.all(processingDate, businessDate)`, `$x.prop(processingDate, businessDate)`
56
+ * Legend integrations populate this when discovering the schema so downstream consumers
57
+ * (AI query generation, validation) know whether dates are required.
58
+ */
59
+ export type MilestoningKind = 'business-temporal' | 'processing-temporal' | 'bitemporal';
50
60
  /** Schema for a full collection, allowing partial property definitions with extended metadata. */
51
61
  export type CollectionSchema = Omit<ConvertDeep<JSONSchema>, 'properties'> & {
52
62
  properties?: Record<string, TopLevelPropertySchema>;
63
+ /** Legend/PURE only: milestoning stereotype on the class, if any. */
64
+ milestoning?: MilestoningKind;
53
65
  };
54
66
  /**
55
67
  * API-boundary view of {@link CollectionSchema} for use in OpenAPI-exposed
@@ -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.465";
5
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.467";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.465",
3
+ "version": "1.0.467",
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,6 @@
39
39
  "license": "ISC",
40
40
  "dependencies": {
41
41
  "json-schema-typed": "^8.0.1",
42
- "lz4js": "^0.2.0",
43
42
  "ws": "^8.21.0"
44
43
  },
45
44
  "optionalDependencies": {
@@ -50,6 +49,8 @@
50
49
  "rxjs": ">=7.5.7 <8.0.0"
51
50
  },
52
51
  "devDependencies": {
52
+ "typedoc": "^0.28.10",
53
+ "typedoc-plugin-markdown": "^4.8.1",
53
54
  "@supercharge/promise-pool": "^3.2.0",
54
55
  "@webpack-cli/generators": "^3.0.7",
55
56
  "copy-webpack-plugin": "^14.0.0",
@@ -58,8 +59,6 @@
58
59
  "otrie": "^1.2.2",
59
60
  "tsconfig-paths-webpack-plugin": "^4.1.0",
60
61
  "tscpaths": "^0.0.9",
61
- "typedoc": "^0.28.10",
62
- "typedoc-plugin-markdown": "^4.8.1",
63
62
  "webpack": "^5.106.2",
64
63
  "webpack-cli": "^5.1.4"
65
64
  },