@theokit/sdk 5.0.0-next.2 → 5.0.0-next.3

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 (52) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/{agent-Y24I5JBM.js → agent-2KJ3IGRA.js} +7 -7
  3. package/dist/{agent-Y24I5JBM.js.map → agent-2KJ3IGRA.js.map} +1 -1
  4. package/dist/{agent-GPV2JWZG.cjs → agent-V6YLX3W6.cjs} +8 -8
  5. package/dist/{agent-GPV2JWZG.cjs.map → agent-V6YLX3W6.cjs.map} +1 -1
  6. package/dist/{chunk-WFC26L6Y.js → chunk-2XRAWOZZ.js} +25 -2
  7. package/dist/chunk-2XRAWOZZ.js.map +1 -0
  8. package/dist/{chunk-2ZLVT7H3.js → chunk-CYKKYNOT.js} +3 -3
  9. package/dist/{chunk-2ZLVT7H3.js.map → chunk-CYKKYNOT.js.map} +1 -1
  10. package/dist/{chunk-WJXOICRC.js → chunk-DX4RUWOK.js} +3 -3
  11. package/dist/{chunk-WJXOICRC.js.map → chunk-DX4RUWOK.js.map} +1 -1
  12. package/dist/{chunk-VXDEKILY.cjs → chunk-GJKMSGZ7.cjs} +4 -4
  13. package/dist/{chunk-VXDEKILY.cjs.map → chunk-GJKMSGZ7.cjs.map} +1 -1
  14. package/dist/{chunk-KDR53EO7.js → chunk-GO5QW4YL.js} +5 -5
  15. package/dist/{chunk-KDR53EO7.js.map → chunk-GO5QW4YL.js.map} +1 -1
  16. package/dist/{chunk-RHZ6HP23.cjs → chunk-IU5N5224.cjs} +8 -8
  17. package/dist/{chunk-RHZ6HP23.cjs.map → chunk-IU5N5224.cjs.map} +1 -1
  18. package/dist/{chunk-UNK4HNJH.js → chunk-J2SH3PNH.js} +3 -3
  19. package/dist/{chunk-UNK4HNJH.js.map → chunk-J2SH3PNH.js.map} +1 -1
  20. package/dist/{chunk-QUAEOKDW.cjs → chunk-K6VDRJ6I.cjs} +23 -23
  21. package/dist/{chunk-QUAEOKDW.cjs.map → chunk-K6VDRJ6I.cjs.map} +1 -1
  22. package/dist/{chunk-2NE7DTOK.cjs → chunk-KBXADFBJ.cjs} +15 -15
  23. package/dist/{chunk-2NE7DTOK.cjs.map → chunk-KBXADFBJ.cjs.map} +1 -1
  24. package/dist/{chunk-ZH26RNQA.js → chunk-L4RPP6ZC.js} +3 -3
  25. package/dist/{chunk-ZH26RNQA.js.map → chunk-L4RPP6ZC.js.map} +1 -1
  26. package/dist/{chunk-LKFET5A3.cjs → chunk-LOHMT36V.cjs} +25 -2
  27. package/dist/chunk-LOHMT36V.cjs.map +1 -0
  28. package/dist/{chunk-ILGZ2ZZV.js → chunk-N6OOOYFZ.js} +3 -3
  29. package/dist/{chunk-ILGZ2ZZV.js.map → chunk-N6OOOYFZ.js.map} +1 -1
  30. package/dist/{chunk-LHSWHYF3.cjs → chunk-RXZSVNDG.cjs} +5 -5
  31. package/dist/{chunk-LHSWHYF3.cjs.map → chunk-RXZSVNDG.cjs.map} +1 -1
  32. package/dist/{chunk-V6ZY4AX6.cjs → chunk-VNDJS6I3.cjs} +8 -8
  33. package/dist/{chunk-V6ZY4AX6.cjs.map → chunk-VNDJS6I3.cjs.map} +1 -1
  34. package/dist/context/index.cjs +7 -7
  35. package/dist/context/index.js +3 -3
  36. package/dist/cron.cjs +7 -7
  37. package/dist/cron.js +6 -6
  38. package/dist/eval.cjs +6 -6
  39. package/dist/eval.js +5 -5
  40. package/dist/{index-manager-QH6OXEV5.js → index-manager-E56WW5RO.js} +5 -5
  41. package/dist/{index-manager-QH6OXEV5.js.map → index-manager-E56WW5RO.js.map} +1 -1
  42. package/dist/{index-manager-DXR2RSFI.cjs → index-manager-OL6HTYAO.cjs} +6 -6
  43. package/dist/{index-manager-DXR2RSFI.cjs.map → index-manager-OL6HTYAO.cjs.map} +1 -1
  44. package/dist/index.cjs +28 -28
  45. package/dist/index.js +10 -10
  46. package/dist/internal/memory/storage/index.cjs +31 -31
  47. package/dist/internal/memory/storage/index.js +3 -3
  48. package/dist/project.cjs +3 -3
  49. package/dist/project.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/chunk-LKFET5A3.cjs.map +0 -1
  52. package/dist/chunk-WFC26L6Y.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkLHSWHYF3_cjs = require('./chunk-LHSWHYF3.cjs');
3
+ var chunkRXZSVNDG_cjs = require('./chunk-RXZSVNDG.cjs');
4
4
  var chunkJLRLCBJ4_cjs = require('./chunk-JLRLCBJ4.cjs');
5
5
  var chunkJ7J7J2GN_cjs = require('./chunk-J7J7J2GN.cjs');
6
6
  var chunk6LHQPOMI_cjs = require('./chunk-6LHQPOMI.cjs');
@@ -51,9 +51,9 @@ function entryHash(entry) {
51
51
  ).digest("hex");
52
52
  }
53
53
  async function readAllSqliteFacts(root) {
54
- const dbPath = chunkLHSWHYF3_cjs.defaultIndexPath(root);
54
+ const dbPath = chunkRXZSVNDG_cjs.defaultIndexPath(root);
55
55
  if (!fs.existsSync(dbPath)) return [];
56
- const db = await chunkLHSWHYF3_cjs.openMemoryDb({ filePath: dbPath });
56
+ const db = await chunkRXZSVNDG_cjs.openMemoryDb({ filePath: dbPath });
57
57
  try {
58
58
  const stmt = db.prepare("SELECT id, path, source, start_line, end_line, text FROM chunks");
59
59
  const rows = stmt.all();
@@ -82,8 +82,8 @@ function assertUsableBatchSize(batchSize) {
82
82
  async function migrateSqliteToLance(opts) {
83
83
  assertUsableBatchSize(opts.batchSize);
84
84
  const cwd = opts.cwd;
85
- const memoryRoot = chunkLHSWHYF3_cjs.resolveMemoryRoot(cwd, { directory: opts.directory });
86
- const finalPath = chunkLHSWHYF3_cjs.lanceStoragePath(memoryRoot);
85
+ const memoryRoot = chunkRXZSVNDG_cjs.resolveMemoryRoot(cwd, { directory: opts.directory });
86
+ const finalPath = chunkRXZSVNDG_cjs.lanceStoragePath(memoryRoot);
87
87
  const newPath = path.join(memoryRoot, "lance-new");
88
88
  const rawLog = opts.logger ?? ((m) => console.log(m));
89
89
  const log = (m) => rawLog(chunk6LHQPOMI_cjs.redactSecrets(m));
@@ -127,7 +127,7 @@ async function migrateSqliteToLance(opts) {
127
127
  };
128
128
  fs.mkdirSync(newPath, { recursive: true });
129
129
  log(`Writing Lance index to ${newPath} ...`);
130
- const lance = await chunkLHSWHYF3_cjs.LanceIndex.open({
130
+ const lance = await chunkRXZSVNDG_cjs.LanceIndex.open({
131
131
  cwd,
132
132
  embedding: placeholderEmbedding,
133
133
  storagePath: newPath
@@ -207,5 +207,5 @@ exports.entryHash = entryHash;
207
207
  exports.migrateSqliteToLance = migrateSqliteToLance;
208
208
  exports.readAllSqliteFacts = readAllSqliteFacts;
209
209
  exports.renderDiaryEntry = renderDiaryEntry;
210
- //# sourceMappingURL=chunk-V6ZY4AX6.cjs.map
211
- //# sourceMappingURL=chunk-V6ZY4AX6.cjs.map
210
+ //# sourceMappingURL=chunk-VNDJS6I3.cjs.map
211
+ //# sourceMappingURL=chunk-VNDJS6I3.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/internal/memory/dreaming/diary.ts","../src/internal/memory/migrate-sqlite-to-lance.ts"],"names":["join","readFile","replaceFileAtomic","createHash","defaultIndexPath","existsSync","openMemoryDb","ConfigurationError","resolveMemoryRoot","lanceStoragePath","redactSecrets","rmSync","mkdirSync","LanceIndex","renameSync"],"mappings":";;;;;;;;;;;AA6BO,SAAS,UAAU,IAAA,EAA0B;AAClD,EAAA,OAAOA,SAAA,CAAK,MAAM,gBAAgB,CAAA;AACpC;AAOO,SAAS,iBAAiB,KAAA,EAA2B;AAC1D,EAAA,MAAM,QAAQ,IAAI,IAAA,CAAK,KAAA,CAAM,WAAW,EAAE,WAAA,EAAY;AACtD,EAAA,MAAM,OAAO,SAAA,CAAU,KAAK,CAAA,CAAE,KAAA,CAAM,GAAG,CAAC,CAAA;AACxC,EAAA,OAAO;AAAA,IACL,MAAM,KAAK,CAAA,CAAA;AAAA,IACX,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AA;AAAA,MACX,iBAAA;AAAA,MACA,SAAA,EAAW,SAAA;AAAA,MACX,SAAA,EAAW;AAAA,KACb;AAAA,EACF;AAGA,EAAAG,aAAA,CAAW,SAAS,SAAS,CAAA;AAC7B,EAAA,GAAA,CAAI,CAAA,uBAAA,EAA0B,SAAS,CAAA,CAAA,CAAG,CAAA;AAC1C,EAAA,OAAO;AAAA,IACL,aAAa,WAAA,CAAY,MAAA;AAAA,IACzB,UAAA,EAAY,UAAA;AAAA,IACZ,SAAA,EAAW,IAAA;AAAA,IACX,iBAAA;AAAA,IACA,SAAA,EAAW,SAAA;AAAA,IACX,SAAA,EAAW;AAAA,GACb;AACF","file":"chunk-V6ZY4AX6.cjs","sourcesContent":["import { createHash } from \"node:crypto\";\nimport { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { replaceFileAtomic } from \"../../persistence/atomic-write.js\";\nimport type { MemoryRoot } from \"../storage/memory-root.js\";\n\n/**\n * Dream-diary append (ADR D7).\n *\n * Diary lives at `.theokit/memory/dream-diary.md` and grows with one entry\n * per sweep. Each entry is content-hashed so the same input produces the\n * same entry — idempotency contract.\n *\n * Writes go through `replaceFileAtomic` (EC-3 of edge-case review) so a\n * crash mid-write can never leave a half-written diary.\n *\n * Shared with `@theokit/sdk-memory`; see the memory-store barrel.\n */\n\nexport interface DiaryEntry {\n timestampMs: number;\n factsBefore: number;\n factsAfter: number;\n duplicatesRemoved: number;\n clustersCreated: number;\n notesWritten: number;\n}\n\n/** `<memory root>/dream-diary.md`. Takes the RESOLVED ROOT — see `storage/memory-root.ts` (#463). */\nexport function diaryPath(root: MemoryRoot): string {\n return join(root, \"dream-diary.md\");\n}\n\n/**\n * One diary entry as the markdown that gets appended: a timestamp heading, the short entry hash,\n * and the counts the sweep produced. The hash is what makes a re-run recognisable as the same\n * sweep rather than a new one.\n */\nexport function renderDiaryEntry(entry: DiaryEntry): string {\n const stamp = new Date(entry.timestampMs).toISOString();\n const hash = entryHash(entry).slice(0, 8);\n return [\n `## ${stamp}`,\n \"\",\n `- entry-hash: ${hash}`,\n `- facts before: ${entry.factsBefore}`,\n `- facts after: ${entry.factsAfter}`,\n `- duplicates removed: ${entry.duplicatesRemoved}`,\n `- clusters created: ${entry.clustersCreated}`,\n `- notes written: ${entry.notesWritten}`,\n \"\",\n ].join(\"\\n\");\n}\n\n/**\n * Append one sweep's entry to `<memory root>/dream-diary.md`, creating the file with its header\n * when this is the first sweep. The diary is a human-readable record of what dreaming changed —\n * consolidations are otherwise invisible, because they alter the notes rather than announce\n * themselves.\n */\nexport async function appendDiaryEntry(root: MemoryRoot, entry: DiaryEntry): Promise<void> {\n const path = diaryPath(root);\n let raw = \"\";\n try {\n raw = await readFile(path, \"utf8\");\n } catch {\n raw = \"# Dream Diary\\n\\n\";\n }\n const next = `${raw.endsWith(\"\\n\") ? raw : `${raw}\\n`}${renderDiaryEntry(entry)}`;\n await replaceFileAtomic(path, next);\n}\n\n/**\n * A stable hash of one entry's counts, so two sweeps that did the same work read as the same work.\n * Rendered truncated in the entry; the full value is what callers compare.\n */\nexport function entryHash(entry: DiaryEntry): string {\n return createHash(\"sha256\")\n .update(\n [\n entry.factsBefore,\n entry.factsAfter,\n entry.duplicatesRemoved,\n entry.clustersCreated,\n entry.notesWritten,\n ].join(\"|\"),\n )\n .digest(\"hex\");\n}\n","import { existsSync, mkdirSync, renameSync, rmSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nimport { ConfigurationError } from \"../../errors.js\";\nimport { redactSecrets } from \"../security/index.js\";\nimport { defaultIndexPath, openMemoryDb } from \"./index-db.js\";\nimport { LanceIndex, lanceStoragePath } from \"./lance-index.js\";\nimport { type MemoryRoot, resolveMemoryRoot } from \"./storage/memory-root.js\";\n\n/**\n * Migrate Memory.index from SQLite to LanceDB (ADR D44).\n *\n * EC-3 MUST FIX: validation uses NFC unicode normalization on both sides.\n *\n * Shared with `@theokit/sdk-memory` through the memory-store barrel (#463).\n */\n\nexport interface MigrateOptions {\n cwd: string;\n /**\n * Absolute path (or `~/`-prefixed) of the memory root to migrate, when the agent that wrote it\n * set `memory.directory`. Defaults to `<cwd>/.theokit/memory` (#463).\n */\n directory?: string;\n dryRun?: boolean;\n batchSize?: number;\n /** Inject for tests; defaults to console.log. */\n logger?: (msg: string) => void;\n}\n\nexport interface MigrateResult {\n countSqlite: number;\n countLance: number;\n /** Set when validation succeeded (or dryRun); false on validation failure. */\n validated: boolean;\n /** Per-fact compare results (size = sample count, up to 10). */\n sampleComparisons: ReadonlyArray<{ id: string; match: boolean }>;\n /** Lance storage location (final, after migration). */\n lancePath: string;\n /** Was the migration committed (false for dry-run). */\n committed: boolean;\n}\n\n/**\n * One row of the SQLite memory index, as the Lance migration reads it: the chunk plus the tenant\n * columns the target table needs. Shared with `@theokit/sdk-memory`, which migrates the same table.\n */\nexport interface SqliteFactRow {\n id: string;\n path: string;\n source: \"memory\" | \"sessions\" | \"wiki\";\n start_line: number;\n end_line: number;\n text: string;\n namespace?: string | null;\n scope?: string | null;\n user_id?: string | null;\n}\n\n/**\n * Read all facts from the SQLite memory index. Returns empty array if the\n * SQLite db file does not exist (workspace never used Memory).\n *\n * Shared with `@theokit/sdk-memory` through the memory-store barrel, so it carries no visibility\n * tag — naming that tag in this block would delete the function below it (#463).\n */\nexport async function readAllSqliteFacts(root: MemoryRoot): Promise<SqliteFactRow[]> {\n const dbPath = defaultIndexPath(root);\n if (!existsSync(dbPath)) return [];\n const db = await openMemoryDb({ filePath: dbPath });\n try {\n // SQLite schema: chunks table holds the facts. Schema may vary; we\n // probe column existence and fall back to safe defaults.\n const stmt = db.prepare(\"SELECT id, path, source, start_line, end_line, text FROM chunks\");\n const rows = stmt.all() as Array<{\n id: string;\n path: string;\n source: \"memory\" | \"sessions\" | \"wiki\";\n start_line: number;\n end_line: number;\n text: string;\n }>;\n return rows.map((r) => ({\n ...r,\n namespace: \"default\",\n scope: \"agent\",\n user_id: \"default\",\n }));\n } finally {\n db.close();\n }\n}\n\n/**\n * Compare two strings via NFC normalization (EC-3 MUST FIX). Required\n * because SQLite/Lance native bindings can normalize unicode differently\n * (NFC vs NFD), producing false negatives on facts with accents/emojis.\n *\n * @internal\n */\nfunction nfcEqual(a: string, b: string): boolean {\n return a.normalize(\"NFC\") === b.normalize(\"NFC\");\n}\n\n/**\n * Refuse a `batchSize` the loop below cannot make progress with, before anything is migrated.\n *\n * The loop is `for (let i = 0; i < facts.length; i += batchSize)`, so the three ways this goes wrong\n * are all silent and all different:\n *\n * - 0 or negative: `i` never advances past the guard. The migration SPINS FOREVER, calling\n * `addFacts([])` and writing a \"Migrated x/y\" line every iteration — a hang with unbounded output,\n * which is the worst shape a failure can take because it looks like work.\n * - NaN (`Number(\"abc\")`): `i += NaN` makes the guard false on the first check, zero facts move, and\n * the caller is told \"Validation FAILED. SQLite preserved.\" A typo in an argument is reported as a\n * migration failure.\n * - a fraction: `slice` truncates and the loop still terminates, but the batch boundaries stop\n * matching the number the caller asked for.\n *\n * Validated HERE rather than only in the CLI that motivated the finding, because the CLI is a wrapper\n * over this function and a programmatic caller reaches it with no wrapper at all.\n *\n * @internal\n */\nfunction assertUsableBatchSize(batchSize: number | undefined): void {\n if (batchSize === undefined) return;\n if (!Number.isInteger(batchSize) || batchSize < 1) {\n throw new ConfigurationError(\n `migrateSqliteToLance: batchSize must be a whole number of at least 1; received ${String(batchSize)}.`,\n { code: \"invalid_batch_size\" },\n );\n }\n}\n\n/**\n * Run the migration. Writes Lance to `<cwd>/.theokit/memory/lance-new/`\n * first, validates round-trip, then renames to `lance/` on success.\n * SQLite db is preserved (CLI prompts user to delete).\n *\n * @internal\n */\n\n// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: migration is a single transaction (read → write → validate → commit-or-rollback); splitting harms atomicity reasoning.\nexport async function migrateSqliteToLance(opts: MigrateOptions): Promise<MigrateResult> {\n assertUsableBatchSize(opts.batchSize);\n const cwd = opts.cwd;\n // One resolution, reused by every path this migration touches (#463).\n const memoryRoot = resolveMemoryRoot(cwd, { directory: opts.directory });\n const finalPath = lanceStoragePath(memoryRoot);\n const newPath = join(memoryRoot, \"lance-new\");\n // T1.4 (ADR D68): wrap logger so any fact text containing secrets is\n // masked before reaching the destination (console or user-supplied sink).\n // Caller-supplied loggers cannot bypass — by design (D70).\n const rawLog = opts.logger ?? ((m: string) => console.log(m));\n const log = (m: string) => rawLog(redactSecrets(m));\n\n // EC: destination exists → typed error.\n if (existsSync(finalPath)) {\n throw new ConfigurationError(\n `Destination already exists: ${finalPath}. Remove it manually (\\`rm -rf ${finalPath}\\`) and re-run.`,\n { code: \"migration_destination_exists\" },\n );\n }\n if (existsSync(newPath)) {\n // Leftover from a previous failed/interrupted migration. Safe to delete.\n log(`Removing stale ${newPath} from a previous run...`);\n rmSync(newPath, { recursive: true, force: true });\n }\n\n log(`Reading SQLite facts from ${cwd}/.theokit/memory/index.sqlite ...`);\n const sqliteFacts = await readAllSqliteFacts(memoryRoot);\n log(`SQLite has ${sqliteFacts.length} facts.`);\n if (sqliteFacts.length === 0) {\n return {\n countSqlite: 0,\n countLance: 0,\n validated: true,\n sampleComparisons: [],\n lancePath: finalPath,\n committed: false,\n };\n }\n\n // Reuse the embedding runtime configured in the workspace? For v1.2 we\n // require the caller to pass embedding explicitly via env. The migration\n // path is documented as: \"set OPENAI_API_KEY (or similar) before running.\"\n // Here we ship a placeholder embedder that uses a deterministic\n // content-hash — sufficient for migration validation; consumers should\n // re-embed on first real query after migration if needed.\n const placeholderEmbedding = {\n id: \"migration-placeholder\",\n model: \"deterministic-hash\",\n dimension: 8,\n embed: async (texts: ReadonlyArray<string>) => {\n // Simple deterministic hash → 8-dim vector (migration validation only).\n return texts.map((t) => {\n const arr = new Array(8).fill(0);\n for (let i = 0; i < t.length; i += 1) {\n arr[i % 8] += t.charCodeAt(i);\n }\n return arr.map((x) => x / 1000);\n });\n },\n stats: () => ({ cacheHits: 0, cacheMisses: 0, httpCalls: 0, retries: 0 }),\n };\n\n mkdirSync(newPath, { recursive: true });\n log(`Writing Lance index to ${newPath} ...`);\n\n const lance = await LanceIndex.open({\n cwd,\n embedding: placeholderEmbedding,\n storagePath: newPath,\n });\n\n const batchSize = opts.batchSize ?? 100;\n for (let i = 0; i < sqliteFacts.length; i += batchSize) {\n const batch = sqliteFacts.slice(i, i + batchSize).map((f) => ({\n id: f.id,\n text: f.text,\n source: f.source,\n namespace: f.namespace ?? \"default\",\n scope: f.scope ?? \"agent\",\n user_id: f.user_id ?? \"default\",\n timestamp: 0,\n }));\n await lance.addFacts(batch);\n log(` Migrated ${Math.min(i + batchSize, sqliteFacts.length)}/${sqliteFacts.length}`);\n }\n\n // Validation: count + sample compare (10 random) with NFC normalization.\n const lanceCount = await lance.countFacts(\"default\");\n log(`Lance has ${lanceCount} facts (expected ${sqliteFacts.length}).`);\n\n const sampleSize = Math.min(10, sqliteFacts.length);\n const sampleComparisons: { id: string; match: boolean }[] = [];\n for (let i = 0; i < sampleSize; i += 1) {\n const sqliteFact = sqliteFacts[Math.floor((i * sqliteFacts.length) / sampleSize)];\n if (sqliteFact === undefined) continue;\n // Search Lance for this fact's text — best-effort round-trip.\n const hits = await lance.search(sqliteFact.text, {\n namespace: sqliteFact.namespace ?? \"default\",\n limit: 1,\n });\n // EC-3: compare with NFC normalization.\n const hit = hits[0];\n const match = hit !== undefined && nfcEqual(hit.text, sqliteFact.text);\n sampleComparisons.push({ id: sqliteFact.id, match });\n }\n\n const allMatch = sampleComparisons.every((c) => c.match);\n const countMatch = lanceCount === sqliteFacts.length;\n const validated = allMatch && countMatch;\n\n await lance.close();\n\n if (opts.dryRun === true) {\n log(\"Dry-run mode — discarding Lance staging dir.\");\n rmSync(newPath, { recursive: true, force: true });\n return {\n countSqlite: sqliteFacts.length,\n countLance: lanceCount,\n validated,\n sampleComparisons,\n lancePath: finalPath,\n committed: false,\n };\n }\n\n if (!validated) {\n log(\"Validation FAILED — leaving SQLite intact, removing Lance staging dir.\");\n rmSync(newPath, { recursive: true, force: true });\n return {\n countSqlite: sqliteFacts.length,\n countLance: lanceCount,\n validated: false,\n sampleComparisons,\n lancePath: finalPath,\n committed: false,\n };\n }\n\n // Atomic commit via rename.\n renameSync(newPath, finalPath);\n log(`Migration committed to ${finalPath}.`);\n return {\n countSqlite: sqliteFacts.length,\n countLance: lanceCount,\n validated: true,\n sampleComparisons,\n lancePath: finalPath,\n committed: true,\n };\n}\n"]}
1
+ {"version":3,"sources":["../src/internal/memory/dreaming/diary.ts","../src/internal/memory/migrate-sqlite-to-lance.ts"],"names":["join","readFile","replaceFileAtomic","createHash","defaultIndexPath","existsSync","openMemoryDb","ConfigurationError","resolveMemoryRoot","lanceStoragePath","redactSecrets","rmSync","mkdirSync","LanceIndex","renameSync"],"mappings":";;;;;;;;;;;AA6BO,SAAS,UAAU,IAAA,EAA0B;AAClD,EAAA,OAAOA,SAAA,CAAK,MAAM,gBAAgB,CAAA;AACpC;AAOO,SAAS,iBAAiB,KAAA,EAA2B;AAC1D,EAAA,MAAM,QAAQ,IAAI,IAAA,CAAK,KAAA,CAAM,WAAW,EAAE,WAAA,EAAY;AACtD,EAAA,MAAM,OAAO,SAAA,CAAU,KAAK,CAAA,CAAE,KAAA,CAAM,GAAG,CAAC,CAAA;AACxC,EAAA,OAAO;AAAA,IACL,MAAM,KAAK,CAAA,CAAA;AAAA,IACX,EAAA;AAAA,IACA,iBAAiB,IAAI,CAAA,CAAA;AAAA,IACrB,CAAA,gBAAA,EAAmB,MAAM,WAAW,CAAA,CAAA;AAAA,IACpC,CAAA,eAAA,EAAkB,MAAM,UAAU,CAAA,CAAA;AAAA,IAClC,CAAA,sBAAA,EAAyB,MAAM,iBAAiB,CAAA,CAAA;AAAA,IAChD,CAAA,oBAAA,EAAuB,MAAM,eAAe,CAAA,CAAA;AAAA,IAC5C,CAAA,iBAAA,EAAoB,MAAM,YAAY,CAAA,CAAA;AAAA,IACtC;AAAA,GACF,CAAE,KAAK,IAAI,CAAA;AACb;AAQA,eAAsB,gBAAA,CAAiB,MAAkB,KAAA,EAAkC;AACzF,EA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","sourcesContent":["import { createHash } from \"node:crypto\";\nimport { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { replaceFileAtomic } from \"../../persistence/atomic-write.js\";\nimport type { MemoryRoot } from \"../storage/memory-root.js\";\n\n/**\n * Dream-diary append (ADR D7).\n *\n * Diary lives at `.theokit/memory/dream-diary.md` and grows with one entry\n * per sweep. Each entry is content-hashed so the same input produces the\n * same entry — idempotency contract.\n *\n * Writes go through `replaceFileAtomic` (EC-3 of edge-case review) so a\n * crash mid-write can never leave a half-written diary.\n *\n * Shared with `@theokit/sdk-memory`; see the memory-store barrel.\n */\n\nexport interface DiaryEntry {\n timestampMs: number;\n factsBefore: number;\n factsAfter: number;\n duplicatesRemoved: number;\n clustersCreated: number;\n notesWritten: number;\n}\n\n/** `<memory root>/dream-diary.md`. Takes the RESOLVED ROOT — see `storage/memory-root.ts` (#463). */\nexport function diaryPath(root: MemoryRoot): string {\n return join(root, \"dream-diary.md\");\n}\n\n/**\n * One diary entry as the markdown that gets appended: a timestamp heading, the short entry hash,\n * and the counts the sweep produced. The hash is what makes a re-run recognisable as the same\n * sweep rather than a new one.\n */\nexport function renderDiaryEntry(entry: DiaryEntry): string {\n const stamp = new Date(entry.timestampMs).toISOString();\n const hash = entryHash(entry).slice(0, 8);\n return [\n `## ${stamp}`,\n \"\",\n `- entry-hash: ${hash}`,\n `- facts before: ${entry.factsBefore}`,\n `- facts after: ${entry.factsAfter}`,\n `- duplicates removed: ${entry.duplicatesRemoved}`,\n `- clusters created: ${entry.clustersCreated}`,\n `- notes written: ${entry.notesWritten}`,\n \"\",\n ].join(\"\\n\");\n}\n\n/**\n * Append one sweep's entry to `<memory root>/dream-diary.md`, creating the file with its header\n * when this is the first sweep. The diary is a human-readable record of what dreaming changed —\n * consolidations are otherwise invisible, because they alter the notes rather than announce\n * themselves.\n */\nexport async function appendDiaryEntry(root: MemoryRoot, entry: DiaryEntry): Promise<void> {\n const path = diaryPath(root);\n let raw = \"\";\n try {\n raw = await readFile(path, \"utf8\");\n } catch {\n raw = \"# Dream Diary\\n\\n\";\n }\n const next = `${raw.endsWith(\"\\n\") ? raw : `${raw}\\n`}${renderDiaryEntry(entry)}`;\n await replaceFileAtomic(path, next);\n}\n\n/**\n * A stable hash of one entry's counts, so two sweeps that did the same work read as the same work.\n * Rendered truncated in the entry; the full value is what callers compare.\n */\nexport function entryHash(entry: DiaryEntry): string {\n return createHash(\"sha256\")\n .update(\n [\n entry.factsBefore,\n entry.factsAfter,\n entry.duplicatesRemoved,\n entry.clustersCreated,\n entry.notesWritten,\n ].join(\"|\"),\n )\n .digest(\"hex\");\n}\n","import { existsSync, mkdirSync, renameSync, rmSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nimport { ConfigurationError } from \"../../errors.js\";\nimport { redactSecrets } from \"../security/index.js\";\nimport { defaultIndexPath, openMemoryDb } from \"./index-db.js\";\nimport { LanceIndex, lanceStoragePath } from \"./lance-index.js\";\nimport { type MemoryRoot, resolveMemoryRoot } from \"./storage/memory-root.js\";\n\n/**\n * Migrate Memory.index from SQLite to LanceDB (ADR D44).\n *\n * EC-3 MUST FIX: validation uses NFC unicode normalization on both sides.\n *\n * Shared with `@theokit/sdk-memory` through the memory-store barrel (#463).\n */\n\nexport interface MigrateOptions {\n cwd: string;\n /**\n * Absolute path (or `~/`-prefixed) of the memory root to migrate, when the agent that wrote it\n * set `memory.directory`. Defaults to `<cwd>/.theokit/memory` (#463).\n */\n directory?: string;\n dryRun?: boolean;\n batchSize?: number;\n /** Inject for tests; defaults to console.log. */\n logger?: (msg: string) => void;\n}\n\nexport interface MigrateResult {\n countSqlite: number;\n countLance: number;\n /** Set when validation succeeded (or dryRun); false on validation failure. */\n validated: boolean;\n /** Per-fact compare results (size = sample count, up to 10). */\n sampleComparisons: ReadonlyArray<{ id: string; match: boolean }>;\n /** Lance storage location (final, after migration). */\n lancePath: string;\n /** Was the migration committed (false for dry-run). */\n committed: boolean;\n}\n\n/**\n * One row of the SQLite memory index, as the Lance migration reads it: the chunk plus the tenant\n * columns the target table needs. Shared with `@theokit/sdk-memory`, which migrates the same table.\n */\nexport interface SqliteFactRow {\n id: string;\n path: string;\n source: \"memory\" | \"sessions\" | \"wiki\";\n start_line: number;\n end_line: number;\n text: string;\n namespace?: string | null;\n scope?: string | null;\n user_id?: string | null;\n}\n\n/**\n * Read all facts from the SQLite memory index. Returns empty array if the\n * SQLite db file does not exist (workspace never used Memory).\n *\n * Shared with `@theokit/sdk-memory` through the memory-store barrel, so it carries no visibility\n * tag — naming that tag in this block would delete the function below it (#463).\n */\nexport async function readAllSqliteFacts(root: MemoryRoot): Promise<SqliteFactRow[]> {\n const dbPath = defaultIndexPath(root);\n if (!existsSync(dbPath)) return [];\n const db = await openMemoryDb({ filePath: dbPath });\n try {\n // SQLite schema: chunks table holds the facts. Schema may vary; we\n // probe column existence and fall back to safe defaults.\n const stmt = db.prepare(\"SELECT id, path, source, start_line, end_line, text FROM chunks\");\n const rows = stmt.all() as Array<{\n id: string;\n path: string;\n source: \"memory\" | \"sessions\" | \"wiki\";\n start_line: number;\n end_line: number;\n text: string;\n }>;\n return rows.map((r) => ({\n ...r,\n namespace: \"default\",\n scope: \"agent\",\n user_id: \"default\",\n }));\n } finally {\n db.close();\n }\n}\n\n/**\n * Compare two strings via NFC normalization (EC-3 MUST FIX). Required\n * because SQLite/Lance native bindings can normalize unicode differently\n * (NFC vs NFD), producing false negatives on facts with accents/emojis.\n *\n * @internal\n */\nfunction nfcEqual(a: string, b: string): boolean {\n return a.normalize(\"NFC\") === b.normalize(\"NFC\");\n}\n\n/**\n * Refuse a `batchSize` the loop below cannot make progress with, before anything is migrated.\n *\n * The loop is `for (let i = 0; i < facts.length; i += batchSize)`, so the three ways this goes wrong\n * are all silent and all different:\n *\n * - 0 or negative: `i` never advances past the guard. The migration SPINS FOREVER, calling\n * `addFacts([])` and writing a \"Migrated x/y\" line every iteration — a hang with unbounded output,\n * which is the worst shape a failure can take because it looks like work.\n * - NaN (`Number(\"abc\")`): `i += NaN` makes the guard false on the first check, zero facts move, and\n * the caller is told \"Validation FAILED. SQLite preserved.\" A typo in an argument is reported as a\n * migration failure.\n * - a fraction: `slice` truncates and the loop still terminates, but the batch boundaries stop\n * matching the number the caller asked for.\n *\n * Validated HERE rather than only in the CLI that motivated the finding, because the CLI is a wrapper\n * over this function and a programmatic caller reaches it with no wrapper at all.\n *\n * @internal\n */\nfunction assertUsableBatchSize(batchSize: number | undefined): void {\n if (batchSize === undefined) return;\n if (!Number.isInteger(batchSize) || batchSize < 1) {\n throw new ConfigurationError(\n `migrateSqliteToLance: batchSize must be a whole number of at least 1; received ${String(batchSize)}.`,\n { code: \"invalid_batch_size\" },\n );\n }\n}\n\n/**\n * Run the migration. Writes Lance to `<cwd>/.theokit/memory/lance-new/`\n * first, validates round-trip, then renames to `lance/` on success.\n * SQLite db is preserved (CLI prompts user to delete).\n *\n * @internal\n */\n\n// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: migration is a single transaction (read → write → validate → commit-or-rollback); splitting harms atomicity reasoning.\nexport async function migrateSqliteToLance(opts: MigrateOptions): Promise<MigrateResult> {\n assertUsableBatchSize(opts.batchSize);\n const cwd = opts.cwd;\n // One resolution, reused by every path this migration touches (#463).\n const memoryRoot = resolveMemoryRoot(cwd, { directory: opts.directory });\n const finalPath = lanceStoragePath(memoryRoot);\n const newPath = join(memoryRoot, \"lance-new\");\n // T1.4 (ADR D68): wrap logger so any fact text containing secrets is\n // masked before reaching the destination (console or user-supplied sink).\n // Caller-supplied loggers cannot bypass — by design (D70).\n const rawLog = opts.logger ?? ((m: string) => console.log(m));\n const log = (m: string) => rawLog(redactSecrets(m));\n\n // EC: destination exists → typed error.\n if (existsSync(finalPath)) {\n throw new ConfigurationError(\n `Destination already exists: ${finalPath}. Remove it manually (\\`rm -rf ${finalPath}\\`) and re-run.`,\n { code: \"migration_destination_exists\" },\n );\n }\n if (existsSync(newPath)) {\n // Leftover from a previous failed/interrupted migration. Safe to delete.\n log(`Removing stale ${newPath} from a previous run...`);\n rmSync(newPath, { recursive: true, force: true });\n }\n\n log(`Reading SQLite facts from ${cwd}/.theokit/memory/index.sqlite ...`);\n const sqliteFacts = await readAllSqliteFacts(memoryRoot);\n log(`SQLite has ${sqliteFacts.length} facts.`);\n if (sqliteFacts.length === 0) {\n return {\n countSqlite: 0,\n countLance: 0,\n validated: true,\n sampleComparisons: [],\n lancePath: finalPath,\n committed: false,\n };\n }\n\n // Reuse the embedding runtime configured in the workspace? For v1.2 we\n // require the caller to pass embedding explicitly via env. The migration\n // path is documented as: \"set OPENAI_API_KEY (or similar) before running.\"\n // Here we ship a placeholder embedder that uses a deterministic\n // content-hash — sufficient for migration validation; consumers should\n // re-embed on first real query after migration if needed.\n const placeholderEmbedding = {\n id: \"migration-placeholder\",\n model: \"deterministic-hash\",\n dimension: 8,\n embed: async (texts: ReadonlyArray<string>) => {\n // Simple deterministic hash → 8-dim vector (migration validation only).\n return texts.map((t) => {\n const arr = new Array(8).fill(0);\n for (let i = 0; i < t.length; i += 1) {\n arr[i % 8] += t.charCodeAt(i);\n }\n return arr.map((x) => x / 1000);\n });\n },\n stats: () => ({ cacheHits: 0, cacheMisses: 0, httpCalls: 0, retries: 0 }),\n };\n\n mkdirSync(newPath, { recursive: true });\n log(`Writing Lance index to ${newPath} ...`);\n\n const lance = await LanceIndex.open({\n cwd,\n embedding: placeholderEmbedding,\n storagePath: newPath,\n });\n\n const batchSize = opts.batchSize ?? 100;\n for (let i = 0; i < sqliteFacts.length; i += batchSize) {\n const batch = sqliteFacts.slice(i, i + batchSize).map((f) => ({\n id: f.id,\n text: f.text,\n source: f.source,\n namespace: f.namespace ?? \"default\",\n scope: f.scope ?? \"agent\",\n user_id: f.user_id ?? \"default\",\n timestamp: 0,\n }));\n await lance.addFacts(batch);\n log(` Migrated ${Math.min(i + batchSize, sqliteFacts.length)}/${sqliteFacts.length}`);\n }\n\n // Validation: count + sample compare (10 random) with NFC normalization.\n const lanceCount = await lance.countFacts(\"default\");\n log(`Lance has ${lanceCount} facts (expected ${sqliteFacts.length}).`);\n\n const sampleSize = Math.min(10, sqliteFacts.length);\n const sampleComparisons: { id: string; match: boolean }[] = [];\n for (let i = 0; i < sampleSize; i += 1) {\n const sqliteFact = sqliteFacts[Math.floor((i * sqliteFacts.length) / sampleSize)];\n if (sqliteFact === undefined) continue;\n // Search Lance for this fact's text — best-effort round-trip.\n const hits = await lance.search(sqliteFact.text, {\n namespace: sqliteFact.namespace ?? \"default\",\n limit: 1,\n });\n // EC-3: compare with NFC normalization.\n const hit = hits[0];\n const match = hit !== undefined && nfcEqual(hit.text, sqliteFact.text);\n sampleComparisons.push({ id: sqliteFact.id, match });\n }\n\n const allMatch = sampleComparisons.every((c) => c.match);\n const countMatch = lanceCount === sqliteFacts.length;\n const validated = allMatch && countMatch;\n\n await lance.close();\n\n if (opts.dryRun === true) {\n log(\"Dry-run mode — discarding Lance staging dir.\");\n rmSync(newPath, { recursive: true, force: true });\n return {\n countSqlite: sqliteFacts.length,\n countLance: lanceCount,\n validated,\n sampleComparisons,\n lancePath: finalPath,\n committed: false,\n };\n }\n\n if (!validated) {\n log(\"Validation FAILED — leaving SQLite intact, removing Lance staging dir.\");\n rmSync(newPath, { recursive: true, force: true });\n return {\n countSqlite: sqliteFacts.length,\n countLance: lanceCount,\n validated: false,\n sampleComparisons,\n lancePath: finalPath,\n committed: false,\n };\n }\n\n // Atomic commit via rename.\n renameSync(newPath, finalPath);\n log(`Migration committed to ${finalPath}.`);\n return {\n countSqlite: sqliteFacts.length,\n countLance: lanceCount,\n validated: true,\n sampleComparisons,\n lancePath: finalPath,\n committed: true,\n };\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkRHZ6HP23_cjs = require('../chunk-RHZ6HP23.cjs');
3
+ var chunkIU5N5224_cjs = require('../chunk-IU5N5224.cjs');
4
4
  require('../chunk-KRD3GQAA.cjs');
5
- var chunkLKFET5A3_cjs = require('../chunk-LKFET5A3.cjs');
5
+ var chunkLOHMT36V_cjs = require('../chunk-LOHMT36V.cjs');
6
6
  require('../chunk-SA6K24NB.cjs');
7
7
 
8
8
  // src/context/index.ts
@@ -13,24 +13,24 @@ function resolveContextImports(content, basePath, options) {
13
13
  maxBytesPerFile: options.maxBytesPerFile,
14
14
  projectRoot: options.projectRoot
15
15
  };
16
- return chunkRHZ6HP23_cjs.resolveImports(content, basePath, internalOptions);
16
+ return chunkIU5N5224_cjs.resolveImports(content, basePath, internalOptions);
17
17
  }
18
18
 
19
19
  Object.defineProperty(exports, "parseRules", {
20
20
  enumerable: true,
21
- get: function () { return chunkRHZ6HP23_cjs.parseRules; }
21
+ get: function () { return chunkIU5N5224_cjs.parseRules; }
22
22
  });
23
23
  Object.defineProperty(exports, "runDiscovery", {
24
24
  enumerable: true,
25
- get: function () { return chunkRHZ6HP23_cjs.runDiscovery; }
25
+ get: function () { return chunkIU5N5224_cjs.runDiscovery; }
26
26
  });
27
27
  Object.defineProperty(exports, "shouldActivateRule", {
28
28
  enumerable: true,
29
- get: function () { return chunkRHZ6HP23_cjs.shouldActivateRule; }
29
+ get: function () { return chunkIU5N5224_cjs.shouldActivateRule; }
30
30
  });
31
31
  Object.defineProperty(exports, "DEFAULT_DISCOVERY_SPECS", {
32
32
  enumerable: true,
33
- get: function () { return chunkLKFET5A3_cjs.DEFAULT_DISCOVERY_SPECS; }
33
+ get: function () { return chunkLOHMT36V_cjs.DEFAULT_DISCOVERY_SPECS; }
34
34
  });
35
35
  exports.resolveContextImports = resolveContextImports;
36
36
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
- import { resolveImports } from '../chunk-ILGZ2ZZV.js';
2
- export { parseRules, runDiscovery, shouldActivateRule } from '../chunk-ILGZ2ZZV.js';
1
+ import { resolveImports } from '../chunk-N6OOOYFZ.js';
2
+ export { parseRules, runDiscovery, shouldActivateRule } from '../chunk-N6OOOYFZ.js';
3
3
  import '../chunk-KVNWIAO4.js';
4
- export { DEFAULT_DISCOVERY_SPECS } from '../chunk-WFC26L6Y.js';
4
+ export { DEFAULT_DISCOVERY_SPECS } from '../chunk-2XRAWOZZ.js';
5
5
  import '../chunk-UKMBRMGT.js';
6
6
 
7
7
  // src/context/index.ts
package/dist/cron.cjs CHANGED
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkVXDEKILY_cjs = require('./chunk-VXDEKILY.cjs');
4
- require('./chunk-QUAEOKDW.cjs');
3
+ var chunkGJKMSGZ7_cjs = require('./chunk-GJKMSGZ7.cjs');
4
+ require('./chunk-K6VDRJ6I.cjs');
5
5
  require('./chunk-KVSAY6NZ.cjs');
6
6
  require('./chunk-Y2KYR2ED.cjs');
7
7
  require('./chunk-BUUUWQMB.cjs');
8
- require('./chunk-2NE7DTOK.cjs');
8
+ require('./chunk-KBXADFBJ.cjs');
9
9
  require('./chunk-H6YM3PV6.cjs');
10
10
  require('./chunk-BV2MWEMV.cjs');
11
11
  require('./chunk-D6POWE7E.cjs');
12
12
  require('./chunk-GHX4P3V2.cjs');
13
13
  require('./chunk-TMKTSYDS.cjs');
14
- require('./chunk-LHSWHYF3.cjs');
14
+ require('./chunk-RXZSVNDG.cjs');
15
15
  require('./chunk-7FDKWDA2.cjs');
16
16
  require('./chunk-2HPNT6HH.cjs');
17
17
  require('./chunk-FUSDYC2B.cjs');
@@ -20,7 +20,7 @@ require('./chunk-24SYBZPL.cjs');
20
20
  require('./chunk-QOGNZMHD.cjs');
21
21
  require('./chunk-YIFFF23U.cjs');
22
22
  require('./chunk-2ZPEDVLM.cjs');
23
- require('./chunk-RHZ6HP23.cjs');
23
+ require('./chunk-IU5N5224.cjs');
24
24
  require('./chunk-KRD3GQAA.cjs');
25
25
  require('./chunk-RQMCOFAI.cjs');
26
26
  require('./chunk-MUUQ2WFJ.cjs');
@@ -30,7 +30,7 @@ require('./chunk-FRITRLZQ.cjs');
30
30
  require('./chunk-QME6FDFG.cjs');
31
31
  require('./chunk-NINIJCHU.cjs');
32
32
  require('./chunk-UGRS7ZA7.cjs');
33
- require('./chunk-LKFET5A3.cjs');
33
+ require('./chunk-LOHMT36V.cjs');
34
34
  require('./chunk-IJ7M6GOG.cjs');
35
35
  require('./chunk-7A6535RA.cjs');
36
36
  require('./chunk-SA6K24NB.cjs');
@@ -62,7 +62,7 @@ require('./chunk-6LHQPOMI.cjs');
62
62
 
63
63
  Object.defineProperty(exports, "Cron", {
64
64
  enumerable: true,
65
- get: function () { return chunkVXDEKILY_cjs.Cron; }
65
+ get: function () { return chunkGJKMSGZ7_cjs.Cron; }
66
66
  });
67
67
  //# sourceMappingURL=cron.cjs.map
68
68
  //# sourceMappingURL=cron.cjs.map
package/dist/cron.js CHANGED
@@ -1,15 +1,15 @@
1
- export { Cron } from './chunk-ZH26RNQA.js';
2
- import './chunk-KDR53EO7.js';
1
+ export { Cron } from './chunk-L4RPP6ZC.js';
2
+ import './chunk-GO5QW4YL.js';
3
3
  import './chunk-K2VMFZQ5.js';
4
4
  import './chunk-AWINL3ZC.js';
5
5
  import './chunk-K2BQQ445.js';
6
- import './chunk-2ZLVT7H3.js';
6
+ import './chunk-CYKKYNOT.js';
7
7
  import './chunk-XJZEBGXD.js';
8
8
  import './chunk-2SFBB54R.js';
9
9
  import './chunk-55GB6JYQ.js';
10
10
  import './chunk-H73MEMQB.js';
11
11
  import './chunk-OR6XIWLB.js';
12
- import './chunk-UNK4HNJH.js';
12
+ import './chunk-J2SH3PNH.js';
13
13
  import './chunk-AAEZSPTC.js';
14
14
  import './chunk-K3NH62DG.js';
15
15
  import './chunk-UBR5PWD7.js';
@@ -18,7 +18,7 @@ import './chunk-XB4GI5RZ.js';
18
18
  import './chunk-24MGQDK3.js';
19
19
  import './chunk-2WXHA33T.js';
20
20
  import './chunk-HKCKOAIO.js';
21
- import './chunk-ILGZ2ZZV.js';
21
+ import './chunk-N6OOOYFZ.js';
22
22
  import './chunk-KVNWIAO4.js';
23
23
  import './chunk-SVQIW5RJ.js';
24
24
  import './chunk-FD2UT76F.js';
@@ -28,7 +28,7 @@ import './chunk-NAF4L3T6.js';
28
28
  import './chunk-6WAKKTBO.js';
29
29
  import './chunk-6X6ID4MO.js';
30
30
  import './chunk-XDANGA2C.js';
31
- import './chunk-WFC26L6Y.js';
31
+ import './chunk-2XRAWOZZ.js';
32
32
  import './chunk-SAGRF4IB.js';
33
33
  import './chunk-EH6XD3FY.js';
34
34
  import './chunk-UKMBRMGT.js';
package/dist/eval.cjs CHANGED
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkUADQJBHR_cjs = require('./chunk-UADQJBHR.cjs');
4
- var chunkQUAEOKDW_cjs = require('./chunk-QUAEOKDW.cjs');
4
+ var chunkK6VDRJ6I_cjs = require('./chunk-K6VDRJ6I.cjs');
5
5
  require('./chunk-KVSAY6NZ.cjs');
6
6
  require('./chunk-Y2KYR2ED.cjs');
7
7
  var chunkBUUUWQMB_cjs = require('./chunk-BUUUWQMB.cjs');
8
- require('./chunk-2NE7DTOK.cjs');
8
+ require('./chunk-KBXADFBJ.cjs');
9
9
  require('./chunk-H6YM3PV6.cjs');
10
10
  require('./chunk-BV2MWEMV.cjs');
11
11
  require('./chunk-D6POWE7E.cjs');
12
12
  require('./chunk-GHX4P3V2.cjs');
13
13
  require('./chunk-TMKTSYDS.cjs');
14
- require('./chunk-LHSWHYF3.cjs');
14
+ require('./chunk-RXZSVNDG.cjs');
15
15
  require('./chunk-7FDKWDA2.cjs');
16
16
  require('./chunk-2HPNT6HH.cjs');
17
17
  require('./chunk-FUSDYC2B.cjs');
@@ -20,7 +20,7 @@ require('./chunk-24SYBZPL.cjs');
20
20
  require('./chunk-QOGNZMHD.cjs');
21
21
  require('./chunk-YIFFF23U.cjs');
22
22
  require('./chunk-2ZPEDVLM.cjs');
23
- require('./chunk-RHZ6HP23.cjs');
23
+ require('./chunk-IU5N5224.cjs');
24
24
  require('./chunk-KRD3GQAA.cjs');
25
25
  require('./chunk-RQMCOFAI.cjs');
26
26
  require('./chunk-MUUQ2WFJ.cjs');
@@ -30,7 +30,7 @@ require('./chunk-FRITRLZQ.cjs');
30
30
  require('./chunk-QME6FDFG.cjs');
31
31
  var chunkNINIJCHU_cjs = require('./chunk-NINIJCHU.cjs');
32
32
  require('./chunk-UGRS7ZA7.cjs');
33
- require('./chunk-LKFET5A3.cjs');
33
+ require('./chunk-LOHMT36V.cjs');
34
34
  require('./chunk-IJ7M6GOG.cjs');
35
35
  require('./chunk-7A6535RA.cjs');
36
36
  require('./chunk-SA6K24NB.cjs');
@@ -780,7 +780,7 @@ function makeDefaultEmbedder(opts) {
780
780
  let runtime;
781
781
  return (texts) => {
782
782
  if (runtime === void 0) {
783
- runtime = chunkQUAEOKDW_cjs.openRouterMemoryEmbeddingProviderAdapter.create(embedderCreateOptions(opts));
783
+ runtime = chunkK6VDRJ6I_cjs.openRouterMemoryEmbeddingProviderAdapter.create(embedderCreateOptions(opts));
784
784
  }
785
785
  return runtime.then((rt) => rt.embed(texts));
786
786
  };
package/dist/eval.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { shellEscapePosix, LocalSandbox } from './chunk-O6USDERH.js';
2
- import { openRouterMemoryEmbeddingProviderAdapter } from './chunk-KDR53EO7.js';
2
+ import { openRouterMemoryEmbeddingProviderAdapter } from './chunk-GO5QW4YL.js';
3
3
  import './chunk-K2VMFZQ5.js';
4
4
  import './chunk-AWINL3ZC.js';
5
5
  import { getTracer } from './chunk-K2BQQ445.js';
6
- import './chunk-2ZLVT7H3.js';
6
+ import './chunk-CYKKYNOT.js';
7
7
  import './chunk-XJZEBGXD.js';
8
8
  import './chunk-2SFBB54R.js';
9
9
  import './chunk-55GB6JYQ.js';
10
10
  import './chunk-H73MEMQB.js';
11
11
  import './chunk-OR6XIWLB.js';
12
- import './chunk-UNK4HNJH.js';
12
+ import './chunk-J2SH3PNH.js';
13
13
  import './chunk-AAEZSPTC.js';
14
14
  import './chunk-K3NH62DG.js';
15
15
  import './chunk-UBR5PWD7.js';
@@ -18,7 +18,7 @@ import './chunk-XB4GI5RZ.js';
18
18
  import './chunk-24MGQDK3.js';
19
19
  import './chunk-2WXHA33T.js';
20
20
  import './chunk-HKCKOAIO.js';
21
- import './chunk-ILGZ2ZZV.js';
21
+ import './chunk-N6OOOYFZ.js';
22
22
  import './chunk-KVNWIAO4.js';
23
23
  import './chunk-SVQIW5RJ.js';
24
24
  import './chunk-FD2UT76F.js';
@@ -28,7 +28,7 @@ import './chunk-NAF4L3T6.js';
28
28
  import './chunk-6WAKKTBO.js';
29
29
  import { getAgentFacade } from './chunk-6X6ID4MO.js';
30
30
  import './chunk-XDANGA2C.js';
31
- import './chunk-WFC26L6Y.js';
31
+ import './chunk-2XRAWOZZ.js';
32
32
  import './chunk-SAGRF4IB.js';
33
33
  import './chunk-EH6XD3FY.js';
34
34
  import './chunk-UKMBRMGT.js';
@@ -1,9 +1,9 @@
1
- export { IndexManager } from './chunk-2ZLVT7H3.js';
1
+ export { IndexManager } from './chunk-CYKKYNOT.js';
2
2
  import './chunk-H73MEMQB.js';
3
- import './chunk-UNK4HNJH.js';
3
+ import './chunk-J2SH3PNH.js';
4
4
  import './chunk-KVNWIAO4.js';
5
5
  import './chunk-FD2UT76F.js';
6
- import './chunk-WFC26L6Y.js';
6
+ import './chunk-2XRAWOZZ.js';
7
7
  import './chunk-EH6XD3FY.js';
8
8
  import './chunk-UKMBRMGT.js';
9
9
  import './chunk-JOFVLOFY.js';
@@ -13,5 +13,5 @@ import './chunk-Q5EWJPRY.js';
13
13
  import './chunk-3JHIFQ4I.js';
14
14
  import './chunk-ALUN2B4W.js';
15
15
  import './chunk-CZJ6Q7CW.js';
16
- //# sourceMappingURL=index-manager-QH6OXEV5.js.map
17
- //# sourceMappingURL=index-manager-QH6OXEV5.js.map
16
+ //# sourceMappingURL=index-manager-E56WW5RO.js.map
17
+ //# sourceMappingURL=index-manager-E56WW5RO.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index-manager-QH6OXEV5.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index-manager-E56WW5RO.js"}
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunk2NE7DTOK_cjs = require('./chunk-2NE7DTOK.cjs');
3
+ var chunkKBXADFBJ_cjs = require('./chunk-KBXADFBJ.cjs');
4
4
  require('./chunk-GHX4P3V2.cjs');
5
- require('./chunk-LHSWHYF3.cjs');
5
+ require('./chunk-RXZSVNDG.cjs');
6
6
  require('./chunk-KRD3GQAA.cjs');
7
7
  require('./chunk-MUUQ2WFJ.cjs');
8
- require('./chunk-LKFET5A3.cjs');
8
+ require('./chunk-LOHMT36V.cjs');
9
9
  require('./chunk-7A6535RA.cjs');
10
10
  require('./chunk-SA6K24NB.cjs');
11
11
  require('./chunk-GZV6AVRL.cjs');
@@ -20,7 +20,7 @@ require('./chunk-6LHQPOMI.cjs');
20
20
 
21
21
  Object.defineProperty(exports, "IndexManager", {
22
22
  enumerable: true,
23
- get: function () { return chunk2NE7DTOK_cjs.IndexManager; }
23
+ get: function () { return chunkKBXADFBJ_cjs.IndexManager; }
24
24
  });
25
- //# sourceMappingURL=index-manager-DXR2RSFI.cjs.map
26
- //# sourceMappingURL=index-manager-DXR2RSFI.cjs.map
25
+ //# sourceMappingURL=index-manager-OL6HTYAO.cjs.map
26
+ //# sourceMappingURL=index-manager-OL6HTYAO.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index-manager-DXR2RSFI.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index-manager-OL6HTYAO.cjs"}
package/dist/index.cjs CHANGED
@@ -3,24 +3,24 @@
3
3
  var chunkTFG5IBZS_cjs = require('./chunk-TFG5IBZS.cjs');
4
4
  var chunkOBA6YK2R_cjs = require('./chunk-OBA6YK2R.cjs');
5
5
  var chunkDRL7URI4_cjs = require('./chunk-DRL7URI4.cjs');
6
- var chunkV6ZY4AX6_cjs = require('./chunk-V6ZY4AX6.cjs');
6
+ var chunkVNDJS6I3_cjs = require('./chunk-VNDJS6I3.cjs');
7
7
  var chunkQWD4RDZ3_cjs = require('./chunk-QWD4RDZ3.cjs');
8
8
  require('./chunk-7JJ3A6AT.cjs');
9
9
  var chunk4HS6FFGL_cjs = require('./chunk-4HS6FFGL.cjs');
10
10
  require('./chunk-4A3SKJ53.cjs');
11
11
  require('./chunk-VTYY7XL5.cjs');
12
- var chunkVXDEKILY_cjs = require('./chunk-VXDEKILY.cjs');
13
- var chunkQUAEOKDW_cjs = require('./chunk-QUAEOKDW.cjs');
12
+ var chunkGJKMSGZ7_cjs = require('./chunk-GJKMSGZ7.cjs');
13
+ var chunkK6VDRJ6I_cjs = require('./chunk-K6VDRJ6I.cjs');
14
14
  var chunkKVSAY6NZ_cjs = require('./chunk-KVSAY6NZ.cjs');
15
15
  require('./chunk-Y2KYR2ED.cjs');
16
16
  require('./chunk-BUUUWQMB.cjs');
17
- require('./chunk-2NE7DTOK.cjs');
17
+ require('./chunk-KBXADFBJ.cjs');
18
18
  require('./chunk-H6YM3PV6.cjs');
19
19
  require('./chunk-BV2MWEMV.cjs');
20
20
  require('./chunk-D6POWE7E.cjs');
21
21
  require('./chunk-GHX4P3V2.cjs');
22
22
  require('./chunk-TMKTSYDS.cjs');
23
- var chunkLHSWHYF3_cjs = require('./chunk-LHSWHYF3.cjs');
23
+ var chunkRXZSVNDG_cjs = require('./chunk-RXZSVNDG.cjs');
24
24
  require('./chunk-7FDKWDA2.cjs');
25
25
  var chunk2HPNT6HH_cjs = require('./chunk-2HPNT6HH.cjs');
26
26
  require('./chunk-FUSDYC2B.cjs');
@@ -29,7 +29,7 @@ require('./chunk-24SYBZPL.cjs');
29
29
  require('./chunk-QOGNZMHD.cjs');
30
30
  require('./chunk-YIFFF23U.cjs');
31
31
  require('./chunk-2ZPEDVLM.cjs');
32
- require('./chunk-RHZ6HP23.cjs');
32
+ require('./chunk-IU5N5224.cjs');
33
33
  require('./chunk-KRD3GQAA.cjs');
34
34
  require('./chunk-RQMCOFAI.cjs');
35
35
  require('./chunk-MUUQ2WFJ.cjs');
@@ -39,7 +39,7 @@ require('./chunk-FRITRLZQ.cjs');
39
39
  require('./chunk-QME6FDFG.cjs');
40
40
  require('./chunk-NINIJCHU.cjs');
41
41
  require('./chunk-UGRS7ZA7.cjs');
42
- require('./chunk-LKFET5A3.cjs');
42
+ require('./chunk-LOHMT36V.cjs');
43
43
  require('./chunk-IJ7M6GOG.cjs');
44
44
  require('./chunk-7A6535RA.cjs');
45
45
  require('./chunk-SA6K24NB.cjs');
@@ -74,8 +74,8 @@ var path = require('path');
74
74
  // src/agent-factory.ts
75
75
  function createAgentFactory(common) {
76
76
  return {
77
- forSession: (agentId, overrides) => chunkQUAEOKDW_cjs.Agent.create(mergeAgentOptions(common, overrides, agentId)),
78
- getOrCreate: (agentId, overrides) => chunkQUAEOKDW_cjs.Agent.getOrCreate(agentId, mergeAgentOptions(common, overrides, agentId))
77
+ forSession: (agentId, overrides) => chunkK6VDRJ6I_cjs.Agent.create(mergeAgentOptions(common, overrides, agentId)),
78
+ getOrCreate: (agentId, overrides) => chunkK6VDRJ6I_cjs.Agent.getOrCreate(agentId, mergeAgentOptions(common, overrides, agentId))
79
79
  };
80
80
  }
81
81
  function mergeAgentOptions(common, overrides, agentId) {
@@ -1178,8 +1178,8 @@ async function runInner(options) {
1178
1178
  const now = options.now ?? Date.now;
1179
1179
  const timestampMs = now();
1180
1180
  try {
1181
- const root = options.memoryRoot ?? chunkLHSWHYF3_cjs.resolveMemoryRoot(options.cwd);
1182
- const facts = await chunkLHSWHYF3_cjs.readFactsFromMarkdown(
1181
+ const root = options.memoryRoot ?? chunkRXZSVNDG_cjs.resolveMemoryRoot(options.cwd);
1182
+ const facts = await chunkRXZSVNDG_cjs.readFactsFromMarkdown(
1183
1183
  options.cwd,
1184
1184
  options.memoryRoot ? { directory: options.memoryRoot } : void 0
1185
1185
  );
@@ -1198,7 +1198,7 @@ async function runInner(options) {
1198
1198
  notesWritten,
1199
1199
  diaryEntryHash: void 0
1200
1200
  };
1201
- await chunkV6ZY4AX6_cjs.appendDiaryEntry(root, {
1201
+ await chunkVNDJS6I3_cjs.appendDiaryEntry(root, {
1202
1202
  timestampMs,
1203
1203
  factsBefore: result.factsBefore,
1204
1204
  factsAfter: result.factsAfter,
@@ -1292,8 +1292,8 @@ var Memory = {
1292
1292
  openArgs.embedding = await resolveEmbedding(opts.embedding, peer.MEMORY_EMBEDDING_ADAPTERS);
1293
1293
  return await peer.IndexManager.open(openArgs);
1294
1294
  }
1295
- const { IndexManager } = await import('./index-manager-DXR2RSFI.cjs');
1296
- openArgs.embedding = await resolveEmbedding(opts.embedding, chunkQUAEOKDW_cjs.MEMORY_EMBEDDING_ADAPTERS);
1295
+ const { IndexManager } = await import('./index-manager-OL6HTYAO.cjs');
1296
+ openArgs.embedding = await resolveEmbedding(opts.embedding, chunkK6VDRJ6I_cjs.MEMORY_EMBEDDING_ADAPTERS);
1297
1297
  return await IndexManager.open(openArgs);
1298
1298
  },
1299
1299
  /**
@@ -1304,7 +1304,7 @@ var Memory = {
1304
1304
  */
1305
1305
  async runDreamingSweep(opts) {
1306
1306
  const peer = await tryLoadSdkMemoryPeer();
1307
- const catalog = peer !== null ? peer.MEMORY_EMBEDDING_ADAPTERS : chunkQUAEOKDW_cjs.MEMORY_EMBEDDING_ADAPTERS;
1307
+ const catalog = peer !== null ? peer.MEMORY_EMBEDDING_ADAPTERS : chunkK6VDRJ6I_cjs.MEMORY_EMBEDDING_ADAPTERS;
1308
1308
  const sweepArgs = await buildDreamingSweepArgs(opts, catalog);
1309
1309
  const result = peer !== null ? (
1310
1310
  // biome-ignore lint/suspicious/noExplicitAny: peer is dynamically loaded — structural compat ensured by sdk-memory
@@ -1338,7 +1338,7 @@ async function buildDreamingSweepArgs(opts, catalog) {
1338
1338
  const runtime = await resolveEmbedding(opts.embedding, catalog);
1339
1339
  return {
1340
1340
  cwd: opts.cwd,
1341
- memoryRoot: chunkLHSWHYF3_cjs.resolveMemoryRoot(opts.cwd, { directory: opts.directory }),
1341
+ memoryRoot: chunkRXZSVNDG_cjs.resolveMemoryRoot(opts.cwd, { directory: opts.directory }),
1342
1342
  embedding: runtime,
1343
1343
  ...opts.dedupThreshold !== void 0 ? { dedupThreshold: opts.dedupThreshold } : {},
1344
1344
  ...opts.clusterThreshold !== void 0 ? { clusterThreshold: opts.clusterThreshold } : {}
@@ -1377,7 +1377,7 @@ async function migrateSqliteToLance2(options) {
1377
1377
  if (peer !== null) {
1378
1378
  return peer.migrateSqliteToLance(options);
1379
1379
  }
1380
- return chunkV6ZY4AX6_cjs.migrateSqliteToLance(options);
1380
+ return chunkVNDJS6I3_cjs.migrateSqliteToLance(options);
1381
1381
  }
1382
1382
 
1383
1383
  // src/permission-engine.ts
@@ -1738,7 +1738,7 @@ function isBuiltAgent(m) {
1738
1738
  return typeof m.send === "function";
1739
1739
  }
1740
1740
  async function materialize(def, index) {
1741
- const { Agent: Agent2 } = await import('./agent-GPV2JWZG.cjs');
1741
+ const { Agent: Agent2 } = await import('./agent-V6YLX3W6.cjs');
1742
1742
  return Agent2.create({
1743
1743
  // `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
1744
1744
  // here means "declare nothing and let the default apply" — forwarding the literal would create
@@ -1880,7 +1880,7 @@ var FIXTURE_USER = {
1880
1880
  };
1881
1881
  var FIXTURE_MODELS = [
1882
1882
  {
1883
- id: chunkQUAEOKDW_cjs.DEFAULT_AGENTIC_MODEL_ID,
1883
+ id: chunkK6VDRJ6I_cjs.DEFAULT_AGENTIC_MODEL_ID,
1884
1884
  name: "Gemini 2.0 Flash",
1885
1885
  displayName: "Gemini 2.0 Flash",
1886
1886
  parameters: [
@@ -2083,7 +2083,7 @@ var Theokit = class {
2083
2083
  envVars: p.envVars
2084
2084
  }));
2085
2085
  },
2086
- embeddingAdapters: () => Object.entries(chunkQUAEOKDW_cjs.MEMORY_EMBEDDING_ADAPTERS).map(([id, adapter]) => ({
2086
+ embeddingAdapters: () => Object.entries(chunkK6VDRJ6I_cjs.MEMORY_EMBEDDING_ADAPTERS).map(([id, adapter]) => ({
2087
2087
  id,
2088
2088
  transport: adapter.transport,
2089
2089
  defaultModel: adapter.defaultModel
@@ -2302,35 +2302,35 @@ Object.defineProperty(exports, "fn", {
2302
2302
  });
2303
2303
  Object.defineProperty(exports, "Cron", {
2304
2304
  enumerable: true,
2305
- get: function () { return chunkVXDEKILY_cjs.Cron; }
2305
+ get: function () { return chunkGJKMSGZ7_cjs.Cron; }
2306
2306
  });
2307
2307
  Object.defineProperty(exports, "Agent", {
2308
2308
  enumerable: true,
2309
- get: function () { return chunkQUAEOKDW_cjs.Agent; }
2309
+ get: function () { return chunkK6VDRJ6I_cjs.Agent; }
2310
2310
  });
2311
2311
  Object.defineProperty(exports, "AgentBuilder", {
2312
2312
  enumerable: true,
2313
- get: function () { return chunkQUAEOKDW_cjs.AgentBuilder; }
2313
+ get: function () { return chunkK6VDRJ6I_cjs.AgentBuilder; }
2314
2314
  });
2315
2315
  Object.defineProperty(exports, "Tool", {
2316
2316
  enumerable: true,
2317
- get: function () { return chunkQUAEOKDW_cjs.Tool; }
2317
+ get: function () { return chunkK6VDRJ6I_cjs.Tool; }
2318
2318
  });
2319
2319
  Object.defineProperty(exports, "ToolError", {
2320
2320
  enumerable: true,
2321
- get: function () { return chunkQUAEOKDW_cjs.ToolError; }
2321
+ get: function () { return chunkK6VDRJ6I_cjs.ToolError; }
2322
2322
  });
2323
2323
  Object.defineProperty(exports, "UsageAccumulator", {
2324
2324
  enumerable: true,
2325
- get: function () { return chunkQUAEOKDW_cjs.UsageAccumulator; }
2325
+ get: function () { return chunkK6VDRJ6I_cjs.UsageAccumulator; }
2326
2326
  });
2327
2327
  Object.defineProperty(exports, "computeCost", {
2328
2328
  enumerable: true,
2329
- get: function () { return chunkQUAEOKDW_cjs.computeCost; }
2329
+ get: function () { return chunkK6VDRJ6I_cjs.computeCost; }
2330
2330
  });
2331
2331
  Object.defineProperty(exports, "getPricingEntry", {
2332
2332
  enumerable: true,
2333
- get: function () { return chunkQUAEOKDW_cjs.getPricingEntry; }
2333
+ get: function () { return chunkK6VDRJ6I_cjs.getPricingEntry; }
2334
2334
  });
2335
2335
  Object.defineProperty(exports, "emitRunEvent", {
2336
2336
  enumerable: true,