@adhd/sox-embedding-provider 0.5.0 → 0.5.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.
Files changed (40) hide show
  1. package/dist/embedHostConfig.d.ts +120 -0
  2. package/dist/embedHostConfig.d.ts.map +1 -0
  3. package/dist/embedHostConfig.js +180 -0
  4. package/dist/embedHostConfig.js.map +1 -0
  5. package/dist/embedHostMain.d.ts +46 -0
  6. package/dist/embedHostMain.d.ts.map +1 -0
  7. package/dist/embedHostMain.js +192 -0
  8. package/dist/embedHostMain.js.map +1 -0
  9. package/dist/errors.d.ts +25 -0
  10. package/dist/errors.d.ts.map +1 -0
  11. package/dist/errors.js +35 -0
  12. package/dist/errors.js.map +1 -0
  13. package/dist/fastembed.d.ts.map +1 -1
  14. package/dist/fastembed.js +3 -0
  15. package/dist/fastembed.js.map +1 -1
  16. package/dist/fastembedLock.d.ts +47 -0
  17. package/dist/fastembedLock.d.ts.map +1 -1
  18. package/dist/fastembedLock.js +35 -0
  19. package/dist/fastembedLock.js.map +1 -1
  20. package/dist/fastembedProcessHost.d.ts.map +1 -1
  21. package/dist/fastembedProcessHost.js +33 -12
  22. package/dist/fastembedProcessHost.js.map +1 -1
  23. package/dist/funnelClient.d.ts +97 -0
  24. package/dist/funnelClient.d.ts.map +1 -0
  25. package/dist/funnelClient.js +311 -0
  26. package/dist/funnelClient.js.map +1 -0
  27. package/dist/index.d.ts +27 -12
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +43 -39
  30. package/dist/index.js.map +1 -1
  31. package/dist/onnxStderrFilter.d.ts +79 -0
  32. package/dist/onnxStderrFilter.d.ts.map +1 -0
  33. package/dist/onnxStderrFilter.js +101 -0
  34. package/dist/onnxStderrFilter.js.map +1 -0
  35. package/dist/package.json +8 -2
  36. package/dist/sharedFastembedProcess.d.ts +70 -32
  37. package/dist/sharedFastembedProcess.d.ts.map +1 -1
  38. package/dist/sharedFastembedProcess.js +174 -52
  39. package/dist/sharedFastembedProcess.js.map +1 -1
  40. package/package.json +9 -3
@@ -0,0 +1,101 @@
1
+ /**
2
+ * (BUG-EMBED-ONNX-COREML-STDERR-NOISE-001) Filters the ONNX Runtime CoreML
3
+ * graph-partitioning warning out of the fastembed child's inherited stderr,
4
+ * while forwarding every other byte through verbatim, unbuffered, and in
5
+ * order.
6
+ *
7
+ * ── Why this exists ─────────────────────────────────────────────────────────
8
+ *
9
+ * `sharedFastembedProcess.ts` forks `fastembedProcessHost.ts` with
10
+ * `resolveExecutionProviders()` returning `['coreml', 'cpu']` on darwin
11
+ * (`fastembedProcessHost.ts`). bge-base's `word_embeddings` tensor is shaped
12
+ * `{30522,768}`, and CoreML's execution provider cannot host any input
13
+ * dimension over 16384 — so onnxruntime's native CoreML EP logs, at EVERY
14
+ * model load:
15
+ *
16
+ * [W:onnxruntime:, helper.cc:83 IsInputSupported] CoreML does not support
17
+ * input dim > 16384. Input:embeddings.word_embeddings.weight,
18
+ * shape: {30522,768}
19
+ *
20
+ * This is emitted by the native onnxruntime addon straight to the process's
21
+ * real stderr fd (not through any JS logger this package controls), and
22
+ * `sharedFastembedProcess.ts` forks the child with
23
+ * `stdio: ['ignore', 'inherit', 'inherit', 'ipc']` — so it lands on every
24
+ * `adhd-backlog` (or any other consumer) invocation's terminal, on every
25
+ * single command, even though the node in question simply falls back to CPU
26
+ * silently and nothing is actually wrong.
27
+ *
28
+ * ── Why this is a stderr *filter*, not a log-severity option ────────────────
29
+ *
30
+ * onnxruntime-node's `InferenceSession.SessionOptions` DOES expose a
31
+ * `logSeverityLevel` (0=Verbose…4=Fatal) that would suppress Warning-level
32
+ * messages at the source — a cleaner fix, if it were reachable. It is not:
33
+ * `fastembed@2.1.0`'s `FlagEmbedding.init()` (`fastembed.js`'s
34
+ * `ort.InferenceSession.create(modelPath, { executionProviders,
35
+ * graphOptimizationLevel: "all" })`) hardcodes its own `SessionOptions`
36
+ * literal with no passthrough for caller options, and `fastembed`'s public
37
+ * `InitOptions` type has no `sessionOptions`/`logSeverityLevel` field either
38
+ * (verified against the installed `fastembed@2.1.0` and
39
+ * `onnxruntime-node@1.21.0` packages — not assumed). Filtering the child's
40
+ * stderr byte stream is therefore the only lever this package can pull.
41
+ *
42
+ * ── Why this must NOT become "throw away all child stderr" ──────────────────
43
+ *
44
+ * `fastembedProcessHost.ts`'s BL-331 lock check intentionally
45
+ * `console.error`s a loud, greppable line when a competing fastembed host is
46
+ * detected (so an otherwise-unattributable embed-latency regression has a
47
+ * visible correlate), and
48
+ * `resolveExecutionProviders()` intentionally `console.error`s when
49
+ * `SOX_EMBED_EXECUTION_PROVIDER` forces a non-default provider. A blanket
50
+ * "pipe stderr, discard everything" fix would silently destroy both of those
51
+ * — reintroducing exactly the silent-failure class BL-331 exists to prevent.
52
+ * So this filter matches ONLY the known-benign CoreML dim-limit warning text
53
+ * and passes every other line — including genuine errors and both lines
54
+ * above — straight through unmodified.
55
+ */
56
+ const BENIGN_CORE_ML_WARNING_SUBSTRING = 'CoreML does not support input dim > 16384';
57
+ /**
58
+ * True if `line` is the known-benign ONNX Runtime CoreML dim-limit warning
59
+ * (see module doc comment). This is a plain substring match — deliberately
60
+ * narrow (not a broad `onnxruntime`/`[W:` pattern) so this filter can never
61
+ * swallow an unrelated onnxruntime warning or error that happens to share the
62
+ * `[W:onnxruntime:...]` prefix format.
63
+ */
64
+ export function isBenignOnnxCoreMlWarning(line) {
65
+ return line.includes(BENIGN_CORE_ML_WARNING_SUBSTRING);
66
+ }
67
+ /**
68
+ * Attach a line-buffering filter to a child process's stderr `Readable`,
69
+ * dropping only lines matching {@link isBenignOnnxCoreMlWarning} and writing
70
+ * every other line through to `dest` (defaults to `process.stderr`)
71
+ * unbuffered, verbatim (original line content, `\n`-terminated), and in the
72
+ * order it was received.
73
+ *
74
+ * Chunk boundaries never line up with `\n` boundaries in a real pipe, so
75
+ * this buffers a trailing partial line across `data` events instead of
76
+ * filtering mid-line: `source` is split on `\n` as chunks arrive, each
77
+ * complete line is tested and (if not benign) written immediately, and any
78
+ * remaining partial line is flushed on `end` (also filtered, so a benign
79
+ * warning that happens to be the final unterminated write is still caught).
80
+ */
81
+ export function attachOnnxStderrFilter(source, dest = process.stderr) {
82
+ let buffer = '';
83
+ source.on('data', (chunk) => {
84
+ buffer += chunk.toString('utf8');
85
+ let idx;
86
+ while ((idx = buffer.indexOf('\n')) !== -1) {
87
+ const line = buffer.slice(0, idx);
88
+ buffer = buffer.slice(idx + 1);
89
+ if (!isBenignOnnxCoreMlWarning(line)) {
90
+ dest.write(`${line}\n`);
91
+ }
92
+ }
93
+ });
94
+ source.on('end', () => {
95
+ if (buffer.length > 0 && !isBenignOnnxCoreMlWarning(buffer)) {
96
+ dest.write(buffer);
97
+ }
98
+ buffer = '';
99
+ });
100
+ }
101
+ //# sourceMappingURL=onnxStderrFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onnxStderrFilter.js","sourceRoot":"","sources":["../src/onnxStderrFilter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,MAAM,gCAAgC,GAAG,2CAA2C,CAAC;AAErF;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,IAAY;IACpD,OAAO,IAAI,CAAC,QAAQ,CAAC,gCAAgC,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAA6B,EAC7B,OAA8B,OAAO,CAAC,MAAM;IAE5C,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAsB,EAAE,EAAE;QAC3C,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,GAAW,CAAC;QAChB,OAAO,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAC3C,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YAClC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;YAC/B,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,EAAE,CAAC;gBACrC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;QACpB,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5D,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACrB,CAAC;QACD,MAAM,GAAG,EAAE,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhd/sox-embedding-provider",
3
- "version": "0.4.1",
3
+ "version": "0.5.2",
4
4
  "description": "Pluggable text→vector embedding provider — generic EmbeddingProvider interface, config-driven model resolution, async batch-first API (AsyncIterable). Default: fastembed (local ONNX, >=3 model dims proven). Loud-fail: createEmbeddingProvider() throws ResolutionError if config is invalid or model cannot load — no silent downgrade.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -18,12 +18,17 @@
18
18
  "types": "./dist/index.d.ts",
19
19
  "default": "./dist/index.js"
20
20
  },
21
+ "./embed-host": {
22
+ "types": "./dist/embedHostMain.d.ts",
23
+ "default": "./dist/embedHostMain.js"
24
+ },
21
25
  "./package.json": "./package.json"
22
26
  },
23
27
  "files": [
24
28
  "dist"
25
29
  ],
26
30
  "dependencies": {
31
+ "@adhd/sox-service-proxy": "workspace:^",
27
32
  "@adhd/sox-telemetry": "workspace:^",
28
33
  "@huggingface/transformers": "^4.2.0",
29
34
  "fastembed": "^2.1.0"
@@ -34,7 +39,8 @@
34
39
  "sidecars": [
35
40
  "src/embedWorker.ts",
36
41
  "src/fastembedProcessHost.ts",
37
- "src/sharedOnnxWorker.ts"
42
+ "src/sharedOnnxWorker.ts",
43
+ "src/embedHostMain.ts"
38
44
  ],
39
45
  "sidecarExternals": [
40
46
  "fastembed",
@@ -28,10 +28,18 @@ export declare function __resetCompetingHostCacheForTests(): void;
28
28
  * `competing_host_pid` telemetry field would read as permanently "contended"
29
29
  * for every pooled request, which is exactly the false-positive noise BL-331's
30
30
  * own postmortem warns against trusting.
31
+ *
32
+ * (BL-432) `ownService`, when supplied, does the same for SERVICE identity: a
33
+ * lock entry whose `service` equals our own is the sequential-CLI false
34
+ * positive (our own service's earlier/second host), not cross-service
35
+ * contention, and is suppressed. Requires BOTH sides to carry a real identity —
36
+ * `ownService === undefined` or an unlabelled/old lock keeps the original
37
+ * behaviour. The returned `service` is `null` when the lock carries none.
31
38
  */
32
- export declare function detectCompetingFastembedHost(ownPid: number | undefined, ownPoolGroup?: string): {
39
+ export declare function detectCompetingFastembedHost(ownPid: number | undefined, ownPoolGroup?: string, ownService?: string): {
33
40
  pid: number;
34
41
  startedAt: string;
42
+ service: string | null;
35
43
  } | null;
36
44
  /**
37
45
  * (BUG-MEMORY-EMBED-HEAD-OF-LINE-BLOCKING-001) The structural shape both
@@ -224,9 +232,14 @@ export declare class SharedFastembedProcessClient implements SharedFastembedClie
224
232
  * `queue_depth` > 0 alongside a `response_ms` that scales with it) is
225
233
  * distinguishable from "the child itself was slow on a solo request"
226
234
  * (`queue_depth` === 0 with a large `response_ms`).
227
- * 3. `competing_host_pid` present only when a second, still-live
228
- * `fastembedProcessHost` process is detected (BL-331's advisory lock),
229
- * since that changes embed latency 25-50x independent of queueing.
235
+ * 3. `competing_host_pid` (+ `competing_host_service`, BL-432) present
236
+ * only when a second, still-live `fastembedProcessHost` process belonging
237
+ * to a DIFFERENT service is detected (BL-331's advisory lock). A second
238
+ * host is associated (UNPROVEN hypothesis) with a 25-50x latency class
239
+ * independent of queueing; this field records its presence, it does not
240
+ * assert causation. A same-service lock (the sequential-CLI false
241
+ * positive) is suppressed, so this field means genuine cross-service
242
+ * co-residence.
230
243
  *
231
244
  * BL-576: `signal`, when supplied, is an external cancellation source —
232
245
  * e.g. `operation-guard.ts`'s `withOperationDeadline` abort controller, so
@@ -503,6 +516,40 @@ export declare class AdaptiveFastembedProcessPool implements SharedFastembedClie
503
516
  request<T = Record<string, unknown>>(payload: Record<string, unknown>, timeoutMs?: number, signal?: AbortSignal): Promise<T>;
504
517
  terminate(): Promise<void>;
505
518
  }
519
+ /**
520
+ * The concrete shape {@link getPrivateFastembedProcess} returns: a
521
+ * `SharedFastembedClient` that also exposes `pendingCount`. The extra member is
522
+ * a SUBTYPE of the public interface (whose shape is deliberately unchanged) —
523
+ * only the host process, which must know when in-flight work has drained before
524
+ * it can reap itself, depends on it.
525
+ */
526
+ export type PrivateFastembedProcess = SharedFastembedClient & {
527
+ readonly pendingCount: number;
528
+ };
529
+ /**
530
+ * The PRIVATE (un-funneled) pool — the OLD body of `getSharedFastembedProcess()`,
531
+ * unchanged.
532
+ *
533
+ * This is the ONLY place a fastembed child process is forked inside a process
534
+ * that is NOT the shared host. It is used by:
535
+ * - the shared host itself (`embedHostMain.ts`) — which is the funnel's
536
+ * compute backend and must never call {@link getSharedFastembedProcess}
537
+ * (that would recurse into the funnel);
538
+ * - the `'private'` host-selection posture (CI/diagnostics).
539
+ *
540
+ * (BL-575) Two shapes, chosen by whether `SOX_EMBED_POOL_SIZE` is set:
541
+ * - PINNED (`resolveFastembedPoolPin()` non-null): a FIXED `FastembedProcessPool`.
542
+ * - DEFAULT: an `AdaptiveFastembedProcessPool` starting at `minSize: 1` and
543
+ * growing toward `resolveFastembedPoolCeiling()` only under sustained demand.
544
+ */
545
+ export declare function getPrivateFastembedProcess(): PrivateFastembedProcess;
546
+ /**
547
+ * Terminate and clear the private pool so the next {@link getPrivateFastembedProcess}
548
+ * forks a genuinely fresh child. This backs the host's `embedding.reset` method
549
+ * (used by memory-core's heal via `resetSharedFastembedHost()`), recovering a
550
+ * wedged private child WITHOUT killing the host process or its socket.
551
+ */
552
+ export declare function resetPrivateFastembedProcess(): Promise<void>;
506
553
  /**
507
554
  * Process-wide singleton accessor — the ONLY sanctioned place a fastembed
508
555
  * child process is forked anywhere in `@adhd/sox-embedding-provider`
@@ -510,27 +557,12 @@ export declare class AdaptiveFastembedProcessPool implements SharedFastembedClie
510
557
  * function instead of constructing its own `worker_threads.Worker` or
511
558
  * `child_process`.
512
559
  *
513
- * (BL-575) Two shapes, chosen by whether `SOX_EMBED_POOL_SIZE` is set:
514
- *
515
- * - PINNED (`resolveFastembedPoolPin()` returns non-null): a FIXED
516
- * `FastembedProcessPool` at exactly that size, no adaptation — an
517
- * operator who set this has already judged their model's footprint and
518
- * the box's headroom; adaptive sizing would second-guess that judgement.
519
- * - DEFAULT (no override): an `AdaptiveFastembedProcessPool` starting at
520
- * `minSize: 1` (the topology real measurement shows wins below ~20
521
- * concurrency) and growing toward `resolveFastembedPoolCeiling()` (the
522
- * SAME ceiling `FastembedProcessPool` used to apply unconditionally)
523
- * only under sustained demand — see that class's doc comment for the
524
- * full measurement and hysteresis policy (BUG-MEMORY-EMBED-HEAD-OF-LINE-
525
- * BLOCKING-001's original qdepth-11+ production regime is exactly the
526
- * sustained-demand case this still grows to meet; the difference is it
527
- * no longer pays that pool's cost on every LOWER-concurrency request
528
- * too).
529
- *
530
- * Every existing caller keeps working unchanged either way — both classes
531
- * implement the same `SharedFastembedClient` shape (`request()`/
532
- * `terminate()`/`started`). Setting `SOX_EMBED_POOL_SIZE=1` recovers the
533
- * exact pre-BL-575 (and pre-pool) single-child topology.
560
+ * (SPEC-EMBEDDING-FUNNEL.md) Host-aware: the funnel lives entirely inside this
561
+ * package, so consumers need no call-site change.
562
+ * - `host: 'shared'` (default): a `FunneledFastembedClient` that lazily dials
563
+ * or spawns the one peer-spawned, self-reaping host.
564
+ * - `host: 'private'` (typed config, ADR-0013): the pre-funnel per-process
565
+ * pool {@link getPrivateFastembedProcess}.
534
566
  */
535
567
  export declare function getSharedFastembedProcess(): SharedFastembedClient;
536
568
  /**
@@ -538,7 +570,7 @@ export declare function getSharedFastembedProcess(): SharedFastembedClient;
538
570
  * fresh shared-process lifecycle (e.g. after deliberately crashing/
539
571
  * terminating it). Does NOT terminate any existing process itself — call
540
572
  * `.terminate()` on the previous instance first if a clean shutdown is
541
- * needed.
573
+ * needed. Clears BOTH the public accessor and the private pool reference.
542
574
  */
543
575
  export declare function __resetSharedFastembedProcessForTests(): void;
544
576
  /**
@@ -551,13 +583,19 @@ export declare function __resetSharedFastembedProcessForTests(): void;
551
583
  * shared host down and re-forking from scratch, rather than waiting for the
552
584
  * dead child to be reaped.
553
585
  *
586
+ * Funnel-aware: under `host: 'shared'` the singleton is a
587
+ * `FunneledFastembedClient`, whose `terminate()` is a NO-OP by design (a
588
+ * consumer must never kill the peer-shared host). Instead we route to
589
+ * `resetSharedFastembedHost()`, which asks the host to tear down and re-fork
590
+ * its PRIVATE pool — recovering the same wedged state without killing a host
591
+ * other consumers are using. Under `host: 'private'` the old terminate path is
592
+ * unchanged.
593
+ *
554
594
  * Unlike `__resetSharedFastembedProcessForTests` (test-only, does NOT
555
- * terminate), this TERMINATES the existing singleton first killing the child
556
- * process(es) via the normal `terminate()` shutdown sequence (BL-405's clean
557
- * `__shutdown` message, `kill()` fallback) and only then drops the singleton
558
- * reference. Safe to call when no singleton has ever been constructed (no-op).
559
- * Any in-flight request is rejected with the standard termination error, which
560
- * the heal loop surfaces as a row failure — never a hang.
595
+ * terminate), this TERMINATES the existing private singleton first and only then
596
+ * drops the reference. Safe to call when no singleton has ever been constructed
597
+ * (no-op). Any in-flight request is rejected with the standard termination
598
+ * error, which the heal loop surfaces as a row failure never a hang.
561
599
  */
562
600
  export declare function resetSharedFastembedProcess(): Promise<void>;
563
601
  //# sourceMappingURL=sharedFastembedProc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