@equinor/fusion-framework-cli-plugin-ai-index 3.0.0 → 3.0.2

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.
@@ -6,4 +6,4 @@
6
6
  * via `withAiOptions`. It is registered with the CLI automatically by
7
7
  * {@link registerAiPlugin}.
8
8
  */
9
- export declare const deleteCommand: import("commander").Command;
9
+ export declare const deleteCommand: import("node_modules/commander/typings/index.js").Command;
@@ -9,4 +9,4 @@
9
9
  * ffc ai index embed "hello world"
10
10
  * ```
11
11
  */
12
- export declare const embedCommand: import("commander").Command;
12
+ export declare const embedCommand: import("node_modules/commander/typings/index.js").Command;
@@ -4,5 +4,5 @@
4
4
  * Fully-configured {@link Command} instance with all AI-specific options
5
5
  * (embedding deployment, Azure Search credentials) applied via `withAiOptions`.
6
6
  */
7
- export declare const searchCommand: import("commander").Command;
7
+ export declare const searchCommand: import("node_modules/commander/typings/index.js").Command;
8
8
  export default searchCommand;
@@ -1 +1 @@
1
- export declare const version = "3.0.0";
1
+ export declare const version = "3.0.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-cli-plugin-ai-index",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "AI indexing plugin for Fusion Framework CLI providing document embedding and chunking utilities",
5
5
  "main": "dist/esm/index.js",
6
6
  "type": "module",
@@ -52,19 +52,19 @@
52
52
  "tree-sitter": "^0.25.0",
53
53
  "tree-sitter-typescript": "^0.23.2",
54
54
  "ts-morph": "^28.0.0",
55
- "zod": "^4.3.6",
56
- "@equinor/fusion-framework-cli-plugin-ai-base": "4.0.0",
55
+ "zod": "^4.4.3",
56
+ "@equinor/fusion-framework-cli-plugin-ai-base": "4.0.1",
57
57
  "@equinor/fusion-framework-module-ai": "4.0.0",
58
58
  "@equinor/fusion-framework-module": "6.0.0",
59
59
  "@equinor/fusion-imports": "2.0.0"
60
60
  },
61
61
  "peerDependencies": {
62
- "@equinor/fusion-framework-cli": "^15.0.0"
62
+ "@equinor/fusion-framework-cli": "^15.0.2"
63
63
  },
64
64
  "devDependencies": {
65
- "typescript": "^5.9.3",
65
+ "typescript": "^6.0.3",
66
66
  "vitest": "^4.1.0",
67
- "@equinor/fusion-framework-cli": "^15.0.0"
67
+ "@equinor/fusion-framework-cli": "^15.0.2"
68
68
  },
69
69
  "scripts": {
70
70
  "build": "tsc -b",
package/src/bin/embed.ts CHANGED
@@ -175,17 +175,24 @@ const EMBED_BATCH_SIZE = 500;
175
175
  * Number of concurrent embedding API requests in flight.
176
176
  *
177
177
  * Each request now carries EMBED_BATCH_SIZE texts in a single HTTP call
178
- * (LangChain batchSize is aligned), so 2 concurrent requests already
179
- * saturate most Azure OpenAI TPM quotas.
178
+ * (LangChain batchSize is aligned), so 3 concurrent requests should
179
+ * saturate most Azure OpenAI TPM quotas without triggering rate limits.
180
180
  */
181
- const EMBED_BATCH_CONCURRENCY = 2;
181
+ const EMBED_BATCH_CONCURRENCY = 3;
182
182
 
183
183
  /**
184
184
  * Maximum time (ms) to wait before flushing a partial embedding batch.
185
- * Without this, `bufferCount` waits indefinitely for a full batch, which
186
- * starves `mergeMap` concurrency when upstream document throughput is slow.
185
+ *
186
+ * A longer window lets more documents accumulate before triggering an
187
+ * HTTP call, which drastically cuts the number of round-trips when
188
+ * upstream (metadata enrichment) feeds documents slowly.
189
+ *
190
+ * Full batches (EMBED_BATCH_SIZE) are emitted immediately regardless of
191
+ * the timer, and `bufferTime` flushes any remainder the instant the
192
+ * source stream completes — so a large value only affects mid-stream
193
+ * partial batches, not tail latency.
187
194
  */
188
- const EMBED_BUFFER_FLUSH_MS = 500;
195
+ const EMBED_BUFFER_FLUSH_MS = 10_000;
189
196
 
190
197
  /** Maximum retry attempts for transient / rate-limit errors per chunk. */
191
198
  const MAX_RETRIES = 4;
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '3.0.0';
2
+ export const version = '3.0.2';
package/tsconfig.json CHANGED
@@ -6,7 +6,9 @@
6
6
  "outDir": "dist/esm",
7
7
  "rootDir": "src",
8
8
  "declarationDir": "./dist/types",
9
- "baseUrl": "."
9
+ "paths": {
10
+ "*": ["./*"]
11
+ }
10
12
  },
11
13
  "references": [
12
14
  {