@wrongstack/runtime 0.307.1 → 0.308.1

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,6 @@
1
1
  import type { ToolRegistry } from '@wrongstack/core/registry';
2
2
  import type { ConcreteTokenSavingTier, MemoryPort, Tool, ToolDescriptionModeConfig, ToolResultRenderModeConfig } from '@wrongstack/core/types';
3
+ import { type VectorMemoryStore } from '@wrongstack/vector-memory';
3
4
  export interface CanonicalHostToolRegistrationOptions {
4
5
  registry: ToolRegistry;
5
6
  tier: ConcreteTokenSavingTier;
@@ -9,6 +10,21 @@ export interface CanonicalHostToolRegistrationOptions {
9
10
  enabled: boolean;
10
11
  store?: MemoryPort | null | undefined;
11
12
  } | undefined;
13
+ /**
14
+ * Optional vector memory store. When provided, the four
15
+ * `vector_memory_*` tools (remember/search/stats/forget) are registered
16
+ * alongside the SAGE tools under the `vector-memory` namespace. When
17
+ * omitted the registry stays unchanged from the SAGE-only surface.
18
+ *
19
+ * The vector store is independent of SAGE — its own SQLite file under
20
+ * `.wrongstack/vector-memory/`. Failures during search (e.g. the
21
+ * transformers.js backend is unavailable) are swallowed at the store
22
+ * layer and return empty results, so registration is safe even when
23
+ * the embedding model is not yet cached.
24
+ */
25
+ vectorMemory?: {
26
+ store: VectorMemoryStore;
27
+ } | undefined;
12
28
  /**
13
29
  * Opt-in `nextsteps` tool (`tools.nextsteps.enabled`). Off unless the host
14
30
  * explicitly enables it, so the default surface is unchanged and the leader
@@ -9,6 +9,7 @@ import {
9
9
  searchMemoryTool
10
10
  } from "@wrongstack/tools/memory";
11
11
  import { registerBuiltinToolTier, selectBuiltinToolsForTier } from "@wrongstack/tools/tool-tier";
12
+ import { createVectorMemoryTools } from "@wrongstack/vector-memory";
12
13
  var DIRECT_LAZY_GATEWAYS = ["tool_search", "tool_use", "tool_help"];
13
14
  function registerCanonicalHostTools(options) {
14
15
  const catalogBuiltinTools = registerBuiltinToolTier({
@@ -41,6 +42,12 @@ function registerCanonicalHostTools(options) {
41
42
  memoryBackend = "legacy";
42
43
  }
43
44
  }
45
+ if (options.vectorMemory?.store) {
46
+ options.registry.registerAllOrThrow(
47
+ createVectorMemoryTools(options.vectorMemory.store),
48
+ "vector-memory"
49
+ );
50
+ }
44
51
  if (options.nextSteps?.enabled) options.registry.register(nextStepsTool);
45
52
  for (const tool of options.coordinationTools ?? []) options.registry.register(tool);
46
53
  if (options.tier !== "off") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/runtime",
3
- "version": "0.307.1",
3
+ "version": "0.308.1",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack default runtime implementations and host-level composition helpers built on @wrongstack/core.",
6
6
  "repository": {
@@ -64,10 +64,11 @@
64
64
  "README.md"
65
65
  ],
66
66
  "dependencies": {
67
- "@wrongstack/core": "0.307.1",
68
- "@wrongstack/sage": "0.307.1",
69
- "@wrongstack/governance": "0.307.1",
70
- "@wrongstack/tools": "0.307.1"
67
+ "@wrongstack/core": "0.308.1",
68
+ "@wrongstack/vector-memory": "0.308.1",
69
+ "@wrongstack/sage": "0.308.1",
70
+ "@wrongstack/tools": "0.308.1",
71
+ "@wrongstack/governance": "0.308.1"
71
72
  },
72
73
  "devDependencies": {
73
74
  "@types/node": "^26.2.0",
@@ -79,6 +80,7 @@
79
80
  "scripts": {
80
81
  "build": "node ../../scripts/build-package.mjs",
81
82
  "typecheck": "tsc --noEmit",
83
+ "test": "vitest run --config vitest.config.ts",
82
84
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
83
85
  }
84
86
  }