@getplumb/core 0.1.6 → 0.4.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 (84) hide show
  1. package/README.md +2 -2
  2. package/dist/context-builder.d.ts +1 -7
  3. package/dist/context-builder.d.ts.map +1 -1
  4. package/dist/context-builder.js +7 -44
  5. package/dist/context-builder.js.map +1 -1
  6. package/dist/embedder.d.ts +16 -2
  7. package/dist/embedder.d.ts.map +1 -1
  8. package/dist/embedder.js +23 -4
  9. package/dist/embedder.js.map +1 -1
  10. package/dist/extraction-queue.d.ts +13 -3
  11. package/dist/extraction-queue.d.ts.map +1 -1
  12. package/dist/extraction-queue.js +21 -4
  13. package/dist/extraction-queue.js.map +1 -1
  14. package/dist/extractor.d.ts +2 -1
  15. package/dist/extractor.d.ts.map +1 -1
  16. package/dist/extractor.js +106 -7
  17. package/dist/extractor.js.map +1 -1
  18. package/dist/extractor.test.d.ts +2 -0
  19. package/dist/extractor.test.d.ts.map +1 -0
  20. package/dist/extractor.test.js +158 -0
  21. package/dist/extractor.test.js.map +1 -0
  22. package/dist/fact-search.d.ts +9 -5
  23. package/dist/fact-search.d.ts.map +1 -1
  24. package/dist/fact-search.js +25 -16
  25. package/dist/fact-search.js.map +1 -1
  26. package/dist/fact-search.test.d.ts +12 -0
  27. package/dist/fact-search.test.d.ts.map +1 -0
  28. package/dist/fact-search.test.js +117 -0
  29. package/dist/fact-search.test.js.map +1 -0
  30. package/dist/index.d.ts +6 -10
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +2 -5
  33. package/dist/index.js.map +1 -1
  34. package/dist/llm-client.d.ts +11 -2
  35. package/dist/llm-client.d.ts.map +1 -1
  36. package/dist/llm-client.js +47 -3
  37. package/dist/llm-client.js.map +1 -1
  38. package/dist/local-store.d.ts +19 -63
  39. package/dist/local-store.d.ts.map +1 -1
  40. package/dist/local-store.js +353 -262
  41. package/dist/local-store.js.map +1 -1
  42. package/dist/local-store.test.d.ts +2 -0
  43. package/dist/local-store.test.d.ts.map +1 -0
  44. package/dist/local-store.test.js +146 -0
  45. package/dist/local-store.test.js.map +1 -0
  46. package/dist/raw-log-search.d.ts +9 -5
  47. package/dist/raw-log-search.d.ts.map +1 -1
  48. package/dist/raw-log-search.js +107 -29
  49. package/dist/raw-log-search.js.map +1 -1
  50. package/dist/raw-log-search.test.d.ts +12 -0
  51. package/dist/raw-log-search.test.d.ts.map +1 -0
  52. package/dist/raw-log-search.test.js +124 -0
  53. package/dist/raw-log-search.test.js.map +1 -0
  54. package/dist/read-path.d.ts +6 -23
  55. package/dist/read-path.d.ts.map +1 -1
  56. package/dist/read-path.js +9 -48
  57. package/dist/read-path.js.map +1 -1
  58. package/dist/read-path.test.d.ts +15 -0
  59. package/dist/read-path.test.d.ts.map +1 -0
  60. package/dist/read-path.test.js +393 -0
  61. package/dist/read-path.test.js.map +1 -0
  62. package/dist/schema.d.ts +4 -13
  63. package/dist/schema.d.ts.map +1 -1
  64. package/dist/schema.js +42 -52
  65. package/dist/schema.js.map +1 -1
  66. package/dist/scorer.d.ts +0 -9
  67. package/dist/scorer.d.ts.map +1 -1
  68. package/dist/scorer.js +1 -31
  69. package/dist/scorer.js.map +1 -1
  70. package/dist/scorer.test.d.ts +10 -0
  71. package/dist/scorer.test.d.ts.map +1 -0
  72. package/dist/scorer.test.js +169 -0
  73. package/dist/scorer.test.js.map +1 -0
  74. package/dist/store.d.ts +2 -14
  75. package/dist/store.d.ts.map +1 -1
  76. package/dist/types.d.ts +0 -25
  77. package/dist/types.d.ts.map +1 -1
  78. package/dist/types.js +1 -6
  79. package/dist/types.js.map +1 -1
  80. package/dist/wasm-db.d.ts +63 -8
  81. package/dist/wasm-db.d.ts.map +1 -1
  82. package/dist/wasm-db.js +124 -31
  83. package/dist/wasm-db.js.map +1 -1
  84. package/package.json +14 -2
package/dist/wasm-db.d.ts CHANGED
@@ -1,14 +1,69 @@
1
1
  /**
2
- * WASM SQLite database wrapper.
3
- * Provides the WasmDb type for use across the codebase.
4
- * The @sqlite.org/sqlite-wasm oo1 API is used directly - this file only exports types.
2
+ * SQLite database wrapper using better-sqlite3.
3
+ *
4
+ * Replaces the previous @sqlite.org/sqlite-wasm implementation which cannot
5
+ * open real filesystem paths in a Node.js environment.
6
+ *
7
+ * Exposes a WasmDb-compatible interface so local-store.ts and schema.ts
8
+ * require no changes:
9
+ * - db.exec(sql: string)
10
+ * - db.exec({ sql, rowMode: 'object', returnValue: 'resultRows' }) → rows[]
11
+ * - db.prepare(sql) → stmt with .bind([...]), .step(), .get(colOrObj), .finalize()
12
+ * - db.selectValue(sql)
13
+ * - db.close()
5
14
  */
6
- import type SqliteWasm from '@sqlite.org/sqlite-wasm';
7
- type Sqlite3Init = typeof SqliteWasm;
8
- export type WasmDb = InstanceType<Awaited<ReturnType<Sqlite3Init>>['oo1']['DB']>;
15
+ import Database from 'better-sqlite3';
16
+ type ExecOptions = {
17
+ sql: string;
18
+ rowMode?: 'object' | 'array';
19
+ returnValue?: 'resultRows';
20
+ };
9
21
  /**
10
- * Open a WASM SQLite database.
11
- * @param path Absolute path to the database file
22
+ * Thin statement wrapper that adapts better-sqlite3's API to the wasm oo1 style
23
+ * used throughout local-store.ts, fact-search.ts, and raw-log-search.ts.
24
+ */
25
+ declare class CompatStatement {
26
+ #private;
27
+ constructor(stmt: Database.Statement);
28
+ bind(params: unknown[]): void;
29
+ /**
30
+ * Execute the statement. For SELECT statements, caches all rows for get().
31
+ * For write statements (INSERT/UPDATE/DELETE/PRAGMA writes), runs immediately.
32
+ */
33
+ step(): boolean;
34
+ /**
35
+ * Get a value from the current row.
36
+ * - get(colIndex: number) → scalar at that column index
37
+ * - get({}) → plain object with column names as keys
38
+ */
39
+ get(colOrObj: number | Record<string, unknown>): unknown;
40
+ finalize(): void;
41
+ }
42
+ /**
43
+ * Thin database wrapper adapting better-sqlite3 to the wasm oo1 API surface
44
+ * used by local-store.ts and schema.ts.
45
+ */
46
+ declare class CompatDb {
47
+ #private;
48
+ constructor(path: string);
49
+ /**
50
+ * Execute SQL.
51
+ * - exec(sql: string) — plain execution, no return value
52
+ * - exec({ sql, returnValue: 'resultRows' }) — returns array of row objects
53
+ */
54
+ exec(sqlOrOpts: string | ExecOptions): unknown[] | void;
55
+ prepare(sql: string): CompatStatement;
56
+ /**
57
+ * Execute a single-value query and return the first column of the first row.
58
+ */
59
+ selectValue(sql: string): unknown;
60
+ close(): void;
61
+ }
62
+ export type WasmDb = CompatDb;
63
+ /**
64
+ * Open a SQLite database file.
65
+ * Creates the file if it doesn't exist.
66
+ * Returns a promise for API compatibility with the previous wasm implementation.
12
67
  */
13
68
  export declare function openDb(path: string): Promise<WasmDb>;
14
69
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"wasm-db.d.ts","sourceRoot":"","sources":["../src/wasm-db.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AACtD,KAAK,WAAW,GAAG,OAAO,UAAU,CAAC;AAarC,MAAM,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAEjF;;;GAGG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAK1D"}
1
+ {"version":3,"file":"wasm-db.d.ts","sourceRoot":"","sources":["../src/wasm-db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF;;;GAGG;AACH,cAAM,eAAe;;gBAOP,IAAI,EAAE,QAAQ,CAAC,SAAS;IAIpC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI;IAI7B;;;OAGG;IACH,IAAI,IAAI,OAAO;IAqBf;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO;IAgBxD,QAAQ,IAAI,IAAI;CAMjB;AAED;;;GAGG;AACH,cAAM,QAAQ;;gBAGA,IAAI,EAAE,MAAM;IAIxB;;;;OAIG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,GAAG,OAAO,EAAE,GAAG,IAAI;IAYvD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe;IAKrC;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAKjC,KAAK,IAAI,IAAI;CAGd;AAED,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC;AAE9B;;;;GAIG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE1D"}
package/dist/wasm-db.js CHANGED
@@ -1,39 +1,132 @@
1
1
  /**
2
- * WASM SQLite database wrapper.
3
- * Provides the WasmDb type for use across the codebase.
4
- * The @sqlite.org/sqlite-wasm oo1 API is used directly - this file only exports types.
2
+ * SQLite database wrapper using better-sqlite3.
3
+ *
4
+ * Replaces the previous @sqlite.org/sqlite-wasm implementation which cannot
5
+ * open real filesystem paths in a Node.js environment.
6
+ *
7
+ * Exposes a WasmDb-compatible interface so local-store.ts and schema.ts
8
+ * require no changes:
9
+ * - db.exec(sql: string)
10
+ * - db.exec({ sql, rowMode: 'object', returnValue: 'resultRows' }) → rows[]
11
+ * - db.prepare(sql) → stmt with .bind([...]), .step(), .get(colOrObj), .finalize()
12
+ * - db.selectValue(sql)
13
+ * - db.close()
5
14
  */
6
- import { createRequire } from 'node:module';
7
- import { fileURLToPath } from 'node:url';
8
- import { dirname, join } from 'node:path';
9
- // Load sqlite3-node.mjs using require to bypass package.json exports restriction
10
- const __filename = fileURLToPath(import.meta.url);
11
- const __dirname = dirname(__filename);
12
- const require = createRequire(import.meta.url);
13
- // Find node_modules path by resolving the package directory
14
- // We need to use a file that IS exported (sqlite3.wasm) to find the package root
15
- const wasmFilePath = require.resolve('@sqlite.org/sqlite-wasm/sqlite3.wasm');
16
- // wasmFilePath = /node_modules/@sqlite.org/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.wasm
17
- // Go up from jswasm/ to sqlite-wasm/ to package root (3 levels up)
18
- const packageDir = dirname(dirname(dirname(wasmFilePath)));
19
- const sqlite3NodePath = join(packageDir, 'sqlite-wasm', 'jswasm', 'sqlite3-node.mjs');
20
- // Global WASM module singleton (initialized once per process)
21
- let wasmModule = null;
22
- async function initWasmModule() {
23
- if (!wasmModule) {
24
- const { default: sqlite3Init } = await import(sqlite3NodePath);
25
- wasmModule = await sqlite3Init();
26
- }
27
- return wasmModule;
15
+ import Database from 'better-sqlite3';
16
+ /**
17
+ * Thin statement wrapper that adapts better-sqlite3's API to the wasm oo1 style
18
+ * used throughout local-store.ts, fact-search.ts, and raw-log-search.ts.
19
+ */
20
+ class CompatStatement {
21
+ #stmt;
22
+ #params = [];
23
+ #rows = null;
24
+ #rowIndex = 0;
25
+ #columnNames = [];
26
+ constructor(stmt) {
27
+ this.#stmt = stmt;
28
+ }
29
+ bind(params) {
30
+ this.#params = params;
31
+ }
32
+ /**
33
+ * Execute the statement. For SELECT statements, caches all rows for get().
34
+ * For write statements (INSERT/UPDATE/DELETE/PRAGMA writes), runs immediately.
35
+ */
36
+ step() {
37
+ if (this.#stmt.reader) {
38
+ // SELECT — cache all rows on first call
39
+ if (this.#rows === null) {
40
+ const raw = this.#stmt.raw(true).all(...this.#params);
41
+ this.#rows = raw;
42
+ this.#rowIndex = 0;
43
+ this.#columnNames = this.#stmt.columns().map((c) => c.name);
44
+ }
45
+ if (this.#rowIndex < this.#rows.length) {
46
+ this.#rowIndex++;
47
+ return true;
48
+ }
49
+ return false;
50
+ }
51
+ else {
52
+ // Write statement
53
+ this.#stmt.run(...this.#params);
54
+ return false;
55
+ }
56
+ }
57
+ /**
58
+ * Get a value from the current row.
59
+ * - get(colIndex: number) → scalar at that column index
60
+ * - get({}) → plain object with column names as keys
61
+ */
62
+ get(colOrObj) {
63
+ if (this.#rows === null || this.#rowIndex === 0)
64
+ return null;
65
+ const row = this.#rows[this.#rowIndex - 1];
66
+ if (row === undefined)
67
+ return null;
68
+ if (typeof colOrObj === 'number') {
69
+ return row[colOrObj];
70
+ }
71
+ // Object form — zip column names with row values
72
+ const obj = {};
73
+ for (let i = 0; i < this.#columnNames.length; i++) {
74
+ obj[this.#columnNames[i]] = row[i];
75
+ }
76
+ return obj;
77
+ }
78
+ finalize() {
79
+ // better-sqlite3 statements don't need explicit finalization
80
+ this.#rows = null;
81
+ this.#rowIndex = 0;
82
+ this.#params = [];
83
+ }
84
+ }
85
+ /**
86
+ * Thin database wrapper adapting better-sqlite3 to the wasm oo1 API surface
87
+ * used by local-store.ts and schema.ts.
88
+ */
89
+ class CompatDb {
90
+ #db;
91
+ constructor(path) {
92
+ this.#db = new Database(path);
93
+ }
94
+ /**
95
+ * Execute SQL.
96
+ * - exec(sql: string) — plain execution, no return value
97
+ * - exec({ sql, returnValue: 'resultRows' }) — returns array of row objects
98
+ */
99
+ exec(sqlOrOpts) {
100
+ if (typeof sqlOrOpts === 'string') {
101
+ this.#db.exec(sqlOrOpts);
102
+ return;
103
+ }
104
+ // Object form — run as query and return rows
105
+ const { sql } = sqlOrOpts;
106
+ const rows = this.#db.prepare(sql).all();
107
+ return rows;
108
+ }
109
+ prepare(sql) {
110
+ const stmt = this.#db.prepare(sql);
111
+ return new CompatStatement(stmt);
112
+ }
113
+ /**
114
+ * Execute a single-value query and return the first column of the first row.
115
+ */
116
+ selectValue(sql) {
117
+ const row = this.#db.prepare(sql).raw(true).get();
118
+ return row ? row[0] : null;
119
+ }
120
+ close() {
121
+ this.#db.close();
122
+ }
28
123
  }
29
124
  /**
30
- * Open a WASM SQLite database.
31
- * @param path Absolute path to the database file
125
+ * Open a SQLite database file.
126
+ * Creates the file if it doesn't exist.
127
+ * Returns a promise for API compatibility with the previous wasm implementation.
32
128
  */
33
129
  export async function openDb(path) {
34
- const sqlite3 = await initWasmModule();
35
- // 'ct' flags: create if not exists, throw on error
36
- const db = new sqlite3.oo1.DB(path, 'ct');
37
- return db;
130
+ return new CompatDb(path);
38
131
  }
39
132
  //# sourceMappingURL=wasm-db.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wasm-db.js","sourceRoot":"","sources":["../src/wasm-db.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,iFAAiF;AACjF,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,4DAA4D;AAC5D,iFAAiF;AACjF,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;AAC7E,uFAAuF;AACvF,mEAAmE;AACnE,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAC3D,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC;AAMtF,8DAA8D;AAC9D,IAAI,UAAU,GAA4C,IAAI,CAAC;AAE/D,KAAK,UAAU,cAAc;IAC3B,IAAI,CAAC,UAAU,EAAE,C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,IAAY;IACvC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,15 @@
1
1
  {
2
2
  "name": "@getplumb/core",
3
- "version": "0.1.6",
3
+ "version": "0.4.0",
4
4
  "description": "Plumb memory engine — storage abstraction, types, and local SQLite driver",
5
5
  "license": "MIT",
6
+ "author": "Clay Waters <hello@plumb.run>",
7
+ "homepage": "https://plumb.run",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/getplumb/plumb",
11
+ "directory": "packages/core"
12
+ },
6
13
  "type": "module",
7
14
  "main": "./dist/index.js",
8
15
  "types": "./dist/index.d.ts",
@@ -14,6 +21,9 @@
14
21
  "publishConfig": {
15
22
  "access": "public"
16
23
  },
24
+ "engines": {
25
+ "node": ">=18"
26
+ },
17
27
  "exports": {
18
28
  ".": {
19
29
  "import": "./dist/index.js",
@@ -25,14 +35,16 @@
25
35
  "test": "node --import tsx/esm --test src/**/*.test.ts",
26
36
  "lint": "echo \"No lint yet\" && exit 0",
27
37
  "clean": "rm -rf dist *.tsbuildinfo",
28
- "prepublishOnly": "npm run build"
38
+ "prepublishOnly": "pnpm build"
29
39
  },
30
40
  "devDependencies": {
41
+ "@types/better-sqlite3": "^7.6.13",
31
42
  "tsx": "^4.0.0",
32
43
  "typescript": "^5.4.0"
33
44
  },
34
45
  "dependencies": {
35
46
  "@sqlite.org/sqlite-wasm": "3.47.2-build1",
47
+ "better-sqlite3": "^12.6.2",
36
48
  "openai": "^4.80.0"
37
49
  },
38
50
  "optionalDependencies": {