@fuzeelogik/myflo 1.0.2 → 1.1.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.
@@ -1,4 +1,4 @@
1
- // AgentDB-backed memory adapter. Wraps @myflo/memory's UnifiedMemoryService
1
+ // AgentDB-backed memory adapter. Wraps @fuzeelogik/myflo-memory's UnifiedMemoryService
2
2
  // + SqlJsBackend to expose the same API as memory-store.js's JSONL backend:
3
3
  // storeEntry, searchEntries, listEntries, getEntry, deleteEntry,
4
4
  // listNamespaces, namespaceStats
@@ -21,12 +21,12 @@ let _backend = null;
21
21
  async function locateSqlJsWasm() {
22
22
  // sql.js ships its WASM as a file. By default it tries to fetch from
23
23
  // sql.js.org which fails offline. Point it at the bundled file.
24
- // sql.js is a transitive dep of @myflo/memory, so we resolve via that
24
+ // sql.js is a transitive dep of @fuzeelogik/myflo-memory, so we resolve via that
25
25
  // package's location (createRequire from the memory module URL).
26
26
  const { createRequire } = await import('node:module');
27
27
  try {
28
- // Resolve @myflo/memory's package.json to find its location
29
- const memoryPkgUrl = import.meta.resolve('@myflo/memory/package.json');
28
+ // Resolve @fuzeelogik/myflo-memory's package.json to find its location
29
+ const memoryPkgUrl = import.meta.resolve('@fuzeelogik/myflo-memory/package.json');
30
30
  const req = createRequire(memoryPkgUrl);
31
31
  const sqlJsMain = req.resolve('sql.js');
32
32
  return sqlJsMain.replace(/sql-wasm\.js$/, 'sql-wasm.wasm');
@@ -39,18 +39,17 @@ async function getBackend() {
39
39
  if (_backend) return _backend;
40
40
  if (!existsSync(FLO_HOME)) await mkdir(FLO_HOME, { recursive: true });
41
41
  // Dynamic import keeps the heavy module out of the load path for the JSONL
42
- // codepath. @myflo/memory is not yet published to npm — the agentdb backend
43
- // only works when myflo is run from the monorepo (pnpm workspace resolves
44
- // the package locally). For standalone `npx @fuzeelogik/myflo` installs,
45
- // stick with the default jsonl backend.
42
+ // codepath. @fuzeelogik/myflo-memory is an optionalDependency npm installs
43
+ // it by default but doesn't fail the install if e.g. better-sqlite3 native
44
+ // compile fails. If it's missing entirely, fall back gracefully.
46
45
  let SqlJsBackend;
47
46
  try {
48
- ({ SqlJsBackend } = await import('@myflo/memory'));
47
+ ({ SqlJsBackend } = await import('@fuzeelogik/myflo-memory'));
49
48
  } catch (err) {
50
49
  throw new Error(
51
- `agentdb backend requires @myflo/memory, which is not yet published to npm. ` +
52
- `It currently resolves only inside the myflo monorepo. ` +
53
- `Stick with the default jsonl backend (unset FLO_MEMORY_BACKEND). ` +
50
+ `agentdb backend requires @fuzeelogik/myflo-memory to be installed. ` +
51
+ `Install it: npm install @fuzeelogik/myflo-memory. ` +
52
+ `Or stick with the default jsonl backend (unset FLO_MEMORY_BACKEND). ` +
54
53
  `Underlying error: ${err.message}`
55
54
  );
56
55
  }
@@ -71,7 +70,7 @@ function newId() {
71
70
  return `${Date.now()}-${randomBytes(3).toString('hex')}`;
72
71
  }
73
72
 
74
- // Map flo-shape entry to @myflo/memory MemoryEntry. SqlJsBackend binds every
73
+ // Map flo-shape entry to @fuzeelogik/myflo-memory MemoryEntry. SqlJsBackend binds every
75
74
  // field via positional ?-params, so undefined is fatal — we provide every
76
75
  // expected field with a sensible default.
77
76
  function toBackendEntry({ namespace = 'default', key, value, tags = [], metadata = {} }) {
@@ -1,7 +1,7 @@
1
1
  // Memory store with two backends:
2
2
  // - jsonl (default) — file-backed JSONL per namespace under ~/.flo/memory/<ns>.jsonl
3
3
  // Pure JS, no native deps, BM25 ranking. Zero install cost.
4
- // - agentdb — SQLite-backed via @myflo/memory's SqlJsBackend. FTS5
4
+ // - agentdb — SQLite-backed via @fuzeelogik/myflo-memory's SqlJsBackend. FTS5
5
5
  // keyword search, optional vector embeddings, scales further.
6
6
  //
7
7
  // Select via FLO_MEMORY_BACKEND env var or { backend } option on each call.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzeelogik/myflo",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "myflo — local-first developer workbench. CLI + MCP server + Next.js dashboard. Forked from ruflo for the runtime substrate; flo CLI on top is ours.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -14,8 +14,8 @@
14
14
  "README.md"
15
15
  ],
16
16
  "dependencies": {},
17
- "devDependencies": {
18
- "@myflo/memory": "workspace:*"
17
+ "optionalDependencies": {
18
+ "@fuzeelogik/myflo-memory": "^1.0.0"
19
19
  },
20
20
  "engines": {
21
21
  "node": ">=20.0.0"