@seanhogg/builderforce-memory 2026.6.18 → 2026.6.20
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.
- package/README.md +27 -27
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @seanhogg/builderforce-memory
|
|
2
2
|
|
|
3
3
|
> **JavaScript-native AI runtime** — SSM execution + Transformer orchestration + online distillation + persistent agent memory.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@seanhogg/builderforce-memory)
|
|
6
6
|
[](./LICENSE)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
`@seanhogg/builderforce-memory` is the **runtime layer** of BuilderForce Agent Memory — a complete, self-contained AI runtime built directly on top of [`@seanhogg/builderforce-memory-engine`](https://www.npmjs.com/package/@seanhogg/builderforce-memory-engine). It includes the full session layer (previously `@seanhogg/mambakit`) as an internal layer, so you only need one package. *(Formerly published as `@seanhogg/ssmjs`.)*
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
## Overview
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`@seanhogg/builderforce-memory` is a JavaScript-native AI runtime that combines local SSM (State Space Model) inference with optional transformer bridge escalation, persistent semantic memory, and online distillation — all without leaving the browser or Node.js process.
|
|
15
15
|
|
|
16
16
|
The layered stack:
|
|
17
17
|
|
|
18
18
|
```
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
@seanhogg/builderforce-memory-engine → WebGPU kernels (WGSL, Mamba-1/2/3 SSM math)
|
|
20
|
+
@seanhogg/builderforce-memory → Session layer + Runtime orchestration (this package)
|
|
21
21
|
├── src/session/ MambaSession, tokenizer, persistence
|
|
22
22
|
├── src/runtime/ SSMRuntime, routing
|
|
23
23
|
├── src/memory/ MemoryStore
|
|
@@ -25,7 +25,7 @@ SSM.js → Session layer + Runtime orchestration (this package)
|
|
|
25
25
|
└── src/distillation/ DistillationEngine
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
| Capability |
|
|
28
|
+
| Capability | @seanhogg/builderforce-memory |
|
|
29
29
|
|------------------------------|--------|
|
|
30
30
|
| Simple session API | ✅ |
|
|
31
31
|
| WebGPU execution | ✅ |
|
|
@@ -41,16 +41,16 @@ SSM.js → Session layer + Runtime orchestration (this package)
|
|
|
41
41
|
## Installation
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
npm install @seanhogg/
|
|
44
|
+
npm install @seanhogg/builderforce-memory
|
|
45
45
|
# or
|
|
46
|
-
pnpm add @seanhogg/
|
|
46
|
+
pnpm add @seanhogg/builderforce-memory
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
`@seanhogg/
|
|
50
|
-
`@seanhogg/
|
|
49
|
+
`@seanhogg/builderforce-memory` includes the full session layer (previously `@seanhogg/mambakit`).
|
|
50
|
+
`@seanhogg/builderforce-memory-engine` is a peer dependency — install it alongside:
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
npm install @seanhogg/
|
|
53
|
+
npm install @seanhogg/builderforce-memory @seanhogg/builderforce-memory-engine
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
### Node.js requirements
|
|
@@ -71,7 +71,7 @@ npm install @webgpu/node fake-indexeddb
|
|
|
71
71
|
### Browser
|
|
72
72
|
|
|
73
73
|
```ts
|
|
74
|
-
import { SSM, AnthropicBridge, SSMAgent, MemoryStore } from '@seanhogg/
|
|
74
|
+
import { SSM, AnthropicBridge, SSMAgent, MemoryStore } from '@seanhogg/builderforce-memory';
|
|
75
75
|
|
|
76
76
|
const runtime = await SSM.create({
|
|
77
77
|
session: { modelSize: 'small', mambaVersion: 'mamba2' },
|
|
@@ -96,7 +96,7 @@ runtime.destroy();
|
|
|
96
96
|
```ts
|
|
97
97
|
import { create as createGPU } from '@webgpu/node';
|
|
98
98
|
import { IDBFactory } from 'fake-indexeddb';
|
|
99
|
-
import { SSM, MemoryStore, SSMAgent } from '@seanhogg/
|
|
99
|
+
import { SSM, MemoryStore, SSMAgent } from '@seanhogg/builderforce-memory';
|
|
100
100
|
|
|
101
101
|
const gpuAdapter = await createGPU().requestAdapter({ powerPreference: 'high-performance' });
|
|
102
102
|
const idbFactory = new IDBFactory();
|
|
@@ -126,7 +126,7 @@ await agent.destroy(); // persists history, releases GPU
|
|
|
126
126
|
By default, `MambaSession` uses the built-in Qwen2.5-Coder BPE tokenizer. You can override this by passing any object that satisfies the `Tokenizer` interface:
|
|
127
127
|
|
|
128
128
|
```ts
|
|
129
|
-
import type { Tokenizer } from '@seanhogg/
|
|
129
|
+
import type { Tokenizer } from '@seanhogg/builderforce-memory';
|
|
130
130
|
|
|
131
131
|
const myTokenizer: Tokenizer = {
|
|
132
132
|
encode(text: string): number[] { /* your encode implementation */ return []; },
|
|
@@ -156,7 +156,7 @@ Use cases:
|
|
|
156
156
|
### Basic usage
|
|
157
157
|
|
|
158
158
|
```ts
|
|
159
|
-
import { MemoryStore } from '@seanhogg/
|
|
159
|
+
import { MemoryStore } from '@seanhogg/builderforce-memory';
|
|
160
160
|
|
|
161
161
|
const memory = new MemoryStore({
|
|
162
162
|
dbName : 'my-app',
|
|
@@ -277,7 +277,7 @@ const log = runtime.getRoutingAuditLog();
|
|
|
277
277
|
Teach the local SSM using a transformer teacher — runs entirely in the browser or Node.js.
|
|
278
278
|
|
|
279
279
|
```ts
|
|
280
|
-
import { DistillationEngine } from '@seanhogg/
|
|
280
|
+
import { DistillationEngine } from '@seanhogg/builderforce-memory';
|
|
281
281
|
|
|
282
282
|
const distiller = new DistillationEngine(runtime, claude);
|
|
283
283
|
|
|
@@ -326,7 +326,7 @@ The log is bounded to the last 200 entries.
|
|
|
326
326
|
High-level orchestration: conversation history, routing, memory injection, and lifecycle.
|
|
327
327
|
|
|
328
328
|
```ts
|
|
329
|
-
import { SSMAgent, MemoryStore } from '@seanhogg/
|
|
329
|
+
import { SSMAgent, MemoryStore } from '@seanhogg/builderforce-memory';
|
|
330
330
|
|
|
331
331
|
const memory = new MemoryStore();
|
|
332
332
|
const agent = new SSMAgent({
|
|
@@ -377,12 +377,12 @@ Facts retrieved from `MemoryStore` are sorted by `importance` descending before
|
|
|
377
377
|
|
|
378
378
|
## Migration from MambaKit
|
|
379
379
|
|
|
380
|
-
`@seanhogg/mambakit` has been consolidated into this package. `MambaSession` and all related types are now exported directly from `@seanhogg/
|
|
380
|
+
`@seanhogg/mambakit` has been consolidated into this package. `MambaSession` and all related types are now exported directly from `@seanhogg/builderforce-memory`.
|
|
381
381
|
|
|
382
382
|
**Before:**
|
|
383
383
|
|
|
384
384
|
```bash
|
|
385
|
-
npm install @seanhogg/mambakit @seanhogg/
|
|
385
|
+
npm install @seanhogg/mambakit @seanhogg/builderforce-memory
|
|
386
386
|
```
|
|
387
387
|
|
|
388
388
|
```ts
|
|
@@ -393,12 +393,12 @@ import type { MambaSessionOptions, Tokenizer } from '@seanhogg/mambakit';
|
|
|
393
393
|
**After:**
|
|
394
394
|
|
|
395
395
|
```bash
|
|
396
|
-
npm install @seanhogg/
|
|
396
|
+
npm install @seanhogg/builderforce-memory
|
|
397
397
|
```
|
|
398
398
|
|
|
399
399
|
```ts
|
|
400
|
-
import { MambaSession, SessionError } from '@seanhogg/
|
|
401
|
-
import type { MambaSessionOptions, Tokenizer } from '@seanhogg/
|
|
400
|
+
import { MambaSession, SessionError } from '@seanhogg/builderforce-memory';
|
|
401
|
+
import type { MambaSessionOptions, Tokenizer } from '@seanhogg/builderforce-memory';
|
|
402
402
|
```
|
|
403
403
|
|
|
404
404
|
All types are re-exported unchanged — `MambaSessionOptions`, `CompleteOptions`, `AdaptOptions`,
|
|
@@ -410,7 +410,7 @@ No logic changes are required, only the import path.
|
|
|
410
410
|
|
|
411
411
|
## BuilderForce Agents Integration
|
|
412
412
|
|
|
413
|
-
|
|
413
|
+
@seanhogg/builderforce-memory serves as the **hippocampus** layer of [BuilderForce Agents](https://builderforce.ai)'s gateway — a persistent semantic memory and local inference engine running alongside the frontier LLM (Claude/GPT) cortex.
|
|
414
414
|
|
|
415
415
|
The `SsmMemoryService` class in BuilderForce Agents's `src/infra/ssm-memory-service.ts` wraps an `SSMRuntime` + `SSMAgent` + `MemoryStore` triplet:
|
|
416
416
|
|
|
@@ -510,7 +510,7 @@ Releases GPU device and all buffers.
|
|
|
510
510
|
## Error Handling
|
|
511
511
|
|
|
512
512
|
```ts
|
|
513
|
-
import { SSMError, SessionError } from '@seanhogg/
|
|
513
|
+
import { SSMError, SessionError } from '@seanhogg/builderforce-memory';
|
|
514
514
|
|
|
515
515
|
try {
|
|
516
516
|
const runtime = await SSM.create({ session: { modelSize: 'nano' } });
|
|
@@ -565,9 +565,9 @@ src/
|
|
|
565
565
|
|
|
566
566
|
## Professional Platform
|
|
567
567
|
|
|
568
|
-
|
|
568
|
+
**@seanhogg/builderforce-memory patterns are the architectural foundation of [Builderforce.ai](https://builderforce.ai)'s Agent Runtime.**
|
|
569
569
|
|
|
570
|
-
|
|
|
570
|
+
| @seanhogg/builderforce-memory concept | Builderforce.ai equivalent |
|
|
571
571
|
|---|---|
|
|
572
572
|
| `SSMRuntime` | `AgentRuntime` (browser-native, ties to IDE project) |
|
|
573
573
|
| `DistillationEngine` | LLM-assisted dataset generation → in-browser LoRA training |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seanhogg/builderforce-memory",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.20",
|
|
4
4
|
"description": "BuilderForce Agent Memory — runtime layer. SSM execution, Transformer orchestration, online distillation, and persistent agent memory for BuilderForce.ai agents.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://github.com/SeanHogg/builderforce-memory/tree/main/packages/memory#readme",
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@seanhogg/builderforce-memory-engine": "^2026.6.
|
|
52
|
+
"@seanhogg/builderforce-memory-engine": "^2026.6.20"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@jest/globals": "^29.7.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"jest": "^29.7.0",
|
|
63
63
|
"ts-jest": "^29.2.0",
|
|
64
64
|
"typescript": "^5.0.0",
|
|
65
|
-
"@seanhogg/builderforce-memory-engine": "2026.6.
|
|
65
|
+
"@seanhogg/builderforce-memory-engine": "2026.6.20"
|
|
66
66
|
},
|
|
67
67
|
"jest": {
|
|
68
68
|
"preset": "ts-jest/presets/default-esm",
|