@squidcloud/client 1.0.466 → 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.
@@ -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
  /**
@@ -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. */
@@ -137,6 +137,33 @@ export interface AiKnowledgeBaseChatOptions {
137
137
  chunkLimit?: number;
138
138
  /** Which chat model to use when asking the question */
139
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;
140
167
  }
141
168
  /**
142
169
  * @category AI
@@ -305,6 +332,23 @@ export interface AiKnowledgeBaseSearchOptions {
305
332
  chunkLimit?: number;
306
333
  /** Which chat model to use when asking the question */
307
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;
308
352
  }
309
353
  /**
310
354
  * A single chunk of data returned from an AI search operation.
@@ -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.466";
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.466",
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
  },