@theokit/sdk-memory 0.2.2 → 0.3.0

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 (53) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/index.cjs +248 -308
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +4 -0
  5. package/dist/index.d.ts +4 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +232 -301
  8. package/dist/index.js.map +1 -1
  9. package/dist/internal/active-memory/active-memory-cache.d.ts +1 -1
  10. package/dist/internal/active-memory/active-memory.d.ts +2 -2
  11. package/dist/internal/active-memory/composite-scorer.d.ts +1 -1
  12. package/dist/internal/active-memory/query-analyzer.d.ts +1 -1
  13. package/dist/internal/adapter-catalog.d.ts +21 -52
  14. package/dist/internal/adapter-catalog.d.ts.map +1 -1
  15. package/dist/internal/circuit-breaker.d.ts +1 -1
  16. package/dist/internal/dreaming/dreaming-run.d.ts +1 -1
  17. package/dist/internal/embedding/azure-openai-embedding.d.ts +21 -0
  18. package/dist/internal/embedding/azure-openai-embedding.d.ts.map +1 -0
  19. package/dist/internal/embedding/batch-encoder.d.ts +1 -1
  20. package/dist/internal/embedding/cohere-embedding.d.ts +14 -0
  21. package/dist/internal/embedding/cohere-embedding.d.ts.map +1 -0
  22. package/dist/internal/embedding/deepinfra-embedding.d.ts +2 -9
  23. package/dist/internal/embedding/deepinfra-embedding.d.ts.map +1 -1
  24. package/dist/internal/embedding/embedding-adapter.d.ts +5 -5
  25. package/dist/internal/embedding/embedding-adapter.d.ts.map +1 -1
  26. package/dist/internal/embedding/gemini-embedding.d.ts +18 -0
  27. package/dist/internal/embedding/gemini-embedding.d.ts.map +1 -0
  28. package/dist/internal/embedding/jina-embedding.d.ts +13 -0
  29. package/dist/internal/embedding/jina-embedding.d.ts.map +1 -0
  30. package/dist/internal/embedding/mistral-embedding.d.ts +3 -10
  31. package/dist/internal/embedding/mistral-embedding.d.ts.map +1 -1
  32. package/dist/internal/embedding/ollama-embedding.d.ts +3 -10
  33. package/dist/internal/embedding/ollama-embedding.d.ts.map +1 -1
  34. package/dist/internal/embedding/openai-compatible.d.ts +24 -23
  35. package/dist/internal/embedding/openai-compatible.d.ts.map +1 -1
  36. package/dist/internal/embedding/openai-embedding.d.ts +2 -9
  37. package/dist/internal/embedding/openai-embedding.d.ts.map +1 -1
  38. package/dist/internal/embedding/openrouter-embedding.d.ts +2 -9
  39. package/dist/internal/embedding/openrouter-embedding.d.ts.map +1 -1
  40. package/dist/internal/embedding/voyage-embedding.d.ts +2 -9
  41. package/dist/internal/embedding/voyage-embedding.d.ts.map +1 -1
  42. package/dist/internal/index/index-schema.d.ts +0 -5
  43. package/dist/internal/index/index-schema.d.ts.map +1 -1
  44. package/dist/internal/index/vec-index.d.ts +1 -1
  45. package/dist/internal/memory-scope.d.ts +1 -1
  46. package/dist/internal/memory-types.d.ts +4 -4
  47. package/dist/internal/store/chunk-markdown.d.ts +2 -2
  48. package/dist/internal/store/reader.d.ts +1 -1
  49. package/dist/internal/store/wiki-loader.d.ts +1 -1
  50. package/dist/internal/tools.d.ts +2 -2
  51. package/package.json +5 -5
  52. package/dist/internal/embedding/embedding-cache.d.ts +0 -16
  53. package/dist/internal/embedding/embedding-cache.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,56 @@
1
1
  # Changelog — @theokit/sdk-memory
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a4a9920: `@theokit/sdk-memory` now uses the SDK's embedding runtime instead of its own copy (theokit#160).
8
+
9
+ The two packages each carried a full copy of `createOpenAiCompatibleRuntime`, and the satellite's
10
+ catalog replaces the SDK's at runtime when installed — so the copy that ran was not the copy most
11
+ people read. That duplication is what produced the two-month adapter gap fixed in theokit#128, and
12
+ every fix since had to be applied to both files by hand.
13
+
14
+ There is now one implementation, imported from `@theokit/sdk/internal/memory-adapters` — a
15
+ semver-exempt sub-path in the same family as `internal/persistence` and `internal/security`, which
16
+ exist for exactly this reason.
17
+
18
+ **Behaviour change for `@theokit/sdk-memory` consumers:** embedding batches now run with bounded
19
+ parallelism instead of serially, and the embedding cache is process-wide instead of per-adapter.
20
+ Both are what the SDK already did; the satellite had silently missed both improvements.
21
+
22
+ - 0308f9f: `@theokit/sdk-memory` now serves every embedding provider the SDK advertises (theokit#128).
23
+
24
+ `azure-openai`, `cohere`, `jina` and `gemini` landed in the SDK core catalog in June 2026 and the
25
+ satellite never picked them up. That was not cosmetic drift: when `@theokit/sdk-memory` is
26
+ installed, its catalog _replaces_ core's in the routing path, while `Theokit.inspect.embeddingAdapters()`
27
+ kept listing all ten — so asking for one of the four got an "unknown provider" error from a provider
28
+ the SDK itself had just advertised. A cross-package test now fails the build if core ever advertises
29
+ a provider the peer cannot serve.
30
+
31
+ Also fixes the Azure OpenAI endpoint in both packages. Azure addresses the deployment in the URL
32
+ path (`/openai/deployments/{deployment}/embeddings`), and the placeholder was never substituted —
33
+ every Azure embedding request went to a URL containing the literal text `{model}` and could only 404. Providers with a static path are unaffected.
34
+
35
+ - 0bd082f: Three advertised embedding providers now actually work (theokit#159).
36
+
37
+ `azure-openai`, `cohere` and `gemini` were in the catalog and rejected on every call. The shared
38
+ runtime spoke exactly one wire — `Authorization: Bearer`, a `{ model, input }` body, a
39
+ `{ data: [{ embedding }] }` response — and none of the three speak it:
40
+
41
+ - **Azure** authenticates an API key with the `api-key` header (`Bearer` carries an Entra ID token,
42
+ not the key from `AZURE_OPENAI_API_KEY`), and the deployment is already in the URL path, so
43
+ `model` does not belong in the body.
44
+ - **Cohere**'s `/v2/embed` names the payload `texts`, requires `input_type`, and answers
45
+ `{ embeddings: { float } }`.
46
+ - **Gemini**'s OpenAI-compatible surface is at `/v1beta/openai/embeddings`, not `/v1/embeddings`.
47
+
48
+ The runtime gained three optional per-provider hooks — auth headers, request body, response reader —
49
+ whose defaults are exactly the previous behaviour, so the seven providers that were already correct
50
+ are untouched. Each divergence is asserted by a test that records the real request.
51
+
52
+ Advertising a provider that cannot work is worse than not advertising it; that is what this closes.
53
+
3
54
  ## 0.2.2
4
55
 
5
56
  ### Patch Changes