@omgbase/core 0.28.0 → 0.29.2

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 (74) hide show
  1. package/README.md +7 -5
  2. package/dist/src/core/read/document.d.ts +11 -10
  3. package/dist/src/core/read/document.js +12 -11
  4. package/dist/src/core/read/nodes.d.ts +10 -10
  5. package/dist/src/core/read/nodes.js +11 -11
  6. package/dist/src/core/read/reader.d.ts +37 -24
  7. package/dist/src/core/read/reader.js +44 -31
  8. package/dist/src/graph/history.d.ts +25 -22
  9. package/dist/src/graph/history.js +17 -17
  10. package/dist/src/graph/inbound-links.d.ts +7 -7
  11. package/dist/src/graph/inbound-links.js +7 -7
  12. package/dist/src/graph/link-health.d.ts +9 -9
  13. package/dist/src/graph/link-health.js +9 -9
  14. package/dist/src/graph/links.d.ts +3 -3
  15. package/dist/src/graph/links.js +4 -4
  16. package/dist/src/mcp/arguments.d.ts +10 -3
  17. package/dist/src/mcp/arguments.js +32 -9
  18. package/dist/src/mcp/errors.d.ts +1 -1
  19. package/dist/src/mcp/graph.d.ts +22 -22
  20. package/dist/src/mcp/graph.js +54 -47
  21. package/dist/src/mcp/reference.d.ts +29 -1
  22. package/dist/src/mcp/reference.js +398 -255
  23. package/dist/src/mcp/server.d.ts +9 -0
  24. package/dist/src/mcp/server.js +170 -108
  25. package/dist/src/mutate/apply.d.ts +6 -6
  26. package/dist/src/mutate/apply.js +1 -1
  27. package/dist/src/mutate/canonical.d.ts +1 -1
  28. package/dist/src/mutate/canonical.js +2 -2
  29. package/dist/src/mutate/commit.d.ts +3 -3
  30. package/dist/src/mutate/commit.js +4 -4
  31. package/dist/src/mutate/docs.d.ts +1 -1
  32. package/dist/src/mutate/docs.js +8 -8
  33. package/dist/src/mutate/effects.d.ts +17 -17
  34. package/dist/src/mutate/effects.js +113 -113
  35. package/dist/src/mutate/macros.d.ts +5 -5
  36. package/dist/src/mutate/macros.js +1 -1
  37. package/dist/src/mutate/materialize.js +2 -2
  38. package/dist/src/mutate/ops.js +2 -2
  39. package/dist/src/mutate/opset.d.ts +7 -7
  40. package/dist/src/mutate/plan-update.js +2 -2
  41. package/dist/src/mutate/plan.d.ts +8 -8
  42. package/dist/src/mutate/plan.js +25 -25
  43. package/dist/src/mutate/select.d.ts +4 -4
  44. package/dist/src/mutate/select.js +57 -56
  45. package/dist/src/mutate/sugar.d.ts +10 -10
  46. package/dist/src/mutate/sugar.js +21 -21
  47. package/dist/src/oqx-js/context.d.ts +8 -4
  48. package/dist/src/oqx-js/context.js +206 -189
  49. package/dist/src/oqx-js/names.d.ts +28 -17
  50. package/dist/src/oqx-js/names.js +115 -78
  51. package/dist/src/oqx-js/planner.d.ts +4 -8
  52. package/dist/src/oqx-js/planner.js +6 -10
  53. package/dist/src/oqx-js/root-row.d.ts +6 -5
  54. package/dist/src/oqx-js/root-row.js +15 -16
  55. package/dist/src/oqx-js/run.d.ts +18 -17
  56. package/dist/src/oqx-js/run.js +57 -54
  57. package/dist/src/oqx-js/sql/translate.d.ts +5 -5
  58. package/dist/src/oqx-js/sql/translate.js +162 -161
  59. package/dist/src/oqx-js/store-index.d.ts +1 -1
  60. package/dist/src/oqx-js/store-index.js +28 -30
  61. package/dist/src/search/external.d.ts +10 -0
  62. package/dist/src/search/external.js +20 -2
  63. package/dist/src/search/resolve.d.ts +2 -2
  64. package/dist/src/search/resolve.js +1 -1
  65. package/dist/src/search/rrf.js +2 -2
  66. package/dist/src/search/text.d.ts +5 -5
  67. package/dist/src/search/text.js +2 -2
  68. package/dist/src/spec-versions.d.ts +7 -7
  69. package/dist/src/spec-versions.js +6 -6
  70. package/dist/src/surface-paths.d.ts +18 -17
  71. package/dist/src/surface-paths.js +23 -21
  72. package/dist/src/sync/admin.d.ts +2 -2
  73. package/dist/src/sync/admin.js +1 -1
  74. package/package.json +2 -2
@@ -11,6 +11,16 @@ export interface ExternalProvider {
11
11
  * failure. Callers must call close() when done.
12
12
  */
13
13
  export declare function createExternalProvider(settings: EmbeddingSettings): Promise<ExternalProvider | null>;
14
+ /**
15
+ * The hint appended to a spawn failure when the command names a JavaScript file
16
+ * (`.js`/`.mjs`/`.cjs`) and the OS refused it with EACCES or ENOENT: a built
17
+ * `bin.js` carries a `#!/usr/bin/env node` shebang but not always the executable
18
+ * bit, and the engine spawns the provider directly, so the fix is to run it through
19
+ * node. Empty for any other command or error. The Rust twin
20
+ * (`crates/omgbase-search/src/external.rs`, `spawn_hint`) emits the same text
21
+ * byte for byte; the tests of both pin it.
22
+ */
23
+ export declare function spawnHint(provider: string, code: string | undefined): string;
14
24
  /**
15
25
  * The environment a stdio embedder is spawned with: our own env, with the
16
26
  * repo's explicit `embedding.model` / `dim` / `maxInputTokens` settings laid over
@@ -70,7 +70,7 @@ async function connectStdio(settings) {
70
70
  child = spawn(cmd, args, { stdio: ["pipe", "pipe", "pipe"], env: embedderEnv(settings) });
71
71
  }
72
72
  catch (err) {
73
- throw new Error(`embedding command '${settings.provider}' failed to spawn: ${err.message}`);
73
+ throw new Error(`embedding command '${settings.provider}' failed to spawn: ${err.message}${spawnHint(settings.provider, err.code)}`);
74
74
  }
75
75
  child.stderr.pipe(process.stderr);
76
76
  // Don't let a still-running embedder keep our own event loop alive on exit.
@@ -78,7 +78,7 @@ async function connectStdio(settings) {
78
78
  const rl = createInterface({ input: child.stdout });
79
79
  const lines = lineQueue(rl);
80
80
  const spawnFailed = new Promise((_, reject) => {
81
- child.once("error", (err) => reject(new Error(`embedding command '${cmd}' failed to spawn: ${err.message}`)));
81
+ child.once("error", (err) => reject(new Error(`embedding command '${cmd}' failed to spawn: ${err.message}${spawnHint(settings.provider, err.code)}`)));
82
82
  child.once("exit", (code) => reject(new Error(`embedding command '${cmd}' exited early (code ${code ?? "?"})`)));
83
83
  });
84
84
  // The race consumers below observe this rejection; guard the reference itself
@@ -153,6 +153,24 @@ async function connectStdio(settings) {
153
153
  };
154
154
  return { provider, close };
155
155
  }
156
+ /**
157
+ * The hint appended to a spawn failure when the command names a JavaScript file
158
+ * (`.js`/`.mjs`/`.cjs`) and the OS refused it with EACCES or ENOENT: a built
159
+ * `bin.js` carries a `#!/usr/bin/env node` shebang but not always the executable
160
+ * bit, and the engine spawns the provider directly, so the fix is to run it through
161
+ * node. Empty for any other command or error. The Rust twin
162
+ * (`crates/omgbase-search/src/external.rs`, `spawn_hint`) emits the same text
163
+ * byte for byte; the tests of both pin it.
164
+ */
165
+ export function spawnHint(provider, code) {
166
+ const spec = provider.trim();
167
+ const cmd = spec.split(/\s+/)[0] ?? "";
168
+ if (!/\.[cm]?js$/i.test(cmd))
169
+ return "";
170
+ if (code !== "EACCES" && code !== "ENOENT")
171
+ return "";
172
+ return ` Hint: the command names a JavaScript file; run it through node — set embedding.provider to \`node ${spec}\` — or give the file the executable bit`;
173
+ }
156
174
  /**
157
175
  * The environment a stdio embedder is spawned with: our own env, with the
158
176
  * repo's explicit `embedding.model` / `dim` / `maxInputTokens` settings laid over
@@ -1,8 +1,8 @@
1
1
  import type { Store } from "../core/store/store.js";
2
- /** A resolve hit (spec/search §4): the block's `id` (spec/surface §1.2, 3.0),
2
+ /** A resolve hit (spec/search §4): the block's `_id` (spec/surface §1.2, 5.0),
3
3
  * its `locator`, a `preview` and the fusion `evidence`. */
4
4
  export interface ResolveHit {
5
- id: string;
5
+ _id: string;
6
6
  locator: string;
7
7
  preview: string;
8
8
  evidence: unknown;
@@ -18,6 +18,6 @@ export function resolve(store, input) {
18
18
  if (input.vector)
19
19
  hi.vector = input.vector;
20
20
  const hits = hybridSearch(store, hi);
21
- return hits.map((h) => ({ id: h.blockId, locator: locatorFor(store, h.blockId), preview: previewFor(store, h.blockId), evidence: h.evidence }));
21
+ return hits.map((h) => ({ _id: h.blockId, locator: locatorFor(store, h.blockId), preview: previewFor(store, h.blockId), evidence: h.evidence }));
22
22
  }
23
23
  //# sourceMappingURL=resolve.js.map
@@ -43,8 +43,8 @@ export function hybridSearch(store, input) {
43
43
  const ftsRanks = new Map();
44
44
  if (input.text) {
45
45
  textSearch(store, input.repoId, input.text, { limit: 200 }).hits.forEach((h, i) => {
46
- if (!ftsRanks.has(h.id))
47
- ftsRanks.set(h.id, i + 1);
46
+ if (!ftsRanks.has(h._id))
47
+ ftsRanks.set(h._id, i + 1);
48
48
  });
49
49
  }
50
50
  const vecRanks = new Map();
@@ -1,10 +1,10 @@
1
1
  import type { Store } from "../core/store/store.js";
2
2
  export interface TextHit {
3
- id: string;
4
- doc_id: string;
5
- path: string;
6
- type: string;
7
- text: string;
3
+ _id: string;
4
+ _doc_id: string;
5
+ _path: string;
6
+ _type: string;
7
+ _text: string;
8
8
  score: number;
9
9
  }
10
10
  export interface TextSearchResult {
@@ -5,8 +5,8 @@ export function textSearch(store, repoId, queryStr, opts = {}) {
5
5
  if (match === "")
6
6
  return { hits: [], truncated: false };
7
7
  const rows = store.db
8
- .prepare(`SELECT b.block_id AS "id", b.doc_id AS doc_id, d.path AS "path", b.type AS type,
9
- b.text AS text, bm25(blocks_fts) AS score
8
+ .prepare(`SELECT b.block_id AS "_id", b.doc_id AS _doc_id, d.path AS "_path", b.type AS _type,
9
+ b.text AS _text, bm25(blocks_fts) AS score
10
10
  FROM blocks_fts
11
11
  JOIN blocks b ON b.rowid = blocks_fts.rowid
12
12
  JOIN docs d ON d.doc_id = b.doc_id
@@ -1,14 +1,14 @@
1
1
  export declare const SPEC_VERSIONS: {
2
- readonly oqx: "0.25";
2
+ readonly oqx: "0.26";
3
3
  readonly format: "0.2";
4
4
  readonly reconcile: "2.3";
5
5
  readonly store: "16.0";
6
6
  readonly properties: "1.2";
7
- readonly graph: "1.1";
8
- readonly search: "2.0";
9
- readonly mutate: "3.6";
10
- readonly sync: "2.2";
11
- readonly surface: "4.11";
12
- readonly cli: "4.6";
7
+ readonly graph: "2.0";
8
+ readonly search: "3.0";
9
+ readonly mutate: "4.0";
10
+ readonly sync: "3.0";
11
+ readonly surface: "5.1";
12
+ readonly cli: "5.0";
13
13
  };
14
14
  export type SpecName = keyof typeof SPEC_VERSIONS;
@@ -15,11 +15,11 @@ export const SPEC_VERSIONS = {
15
15
  reconcile: "2.3",
16
16
  store: "16.0",
17
17
  properties: "1.2",
18
- graph: "1.1",
19
- search: "2.0",
20
- mutate: "3.6",
21
- sync: "2.2",
22
- surface: "4.11",
23
- cli: "4.6",
18
+ graph: "2.0",
19
+ search: "3.0",
20
+ mutate: "4.0",
21
+ sync: "3.0",
22
+ surface: "5.1",
23
+ cli: "5.0",
24
24
  };
25
25
  //# sourceMappingURL=spec-versions.js.map
@@ -6,40 +6,41 @@ import type { ObserveResult, ObserveDeleteResult } from "./sync/observe.js";
6
6
  import type { SweepResult } from "./sync/freshness.js";
7
7
  import type { TextSearchResult } from "./search/text.js";
8
8
  import type { ResolveHit } from "./search/resolve.js";
9
- /** `spec/mutate` §4's kernel result (the library's `apply`; no tool returns it since 4.0): `revisions[].path` and the dry-run `diffs` keys. */
9
+ /** `spec/mutate` §4's kernel result (the library's `apply`; no tool returns it since 4.0): `revisions[]._path` and the dry-run `diffs` keys. */
10
10
  export declare function surfaceApplyResult<T extends ApplyResult>(res: T): T;
11
11
  /** An inbound link on the wire (`docs_move.dangling[]`, `omg mv`): a link row
12
- * under the `links` target's names (spec/surface §1.2) — `doc_id`, `path`
13
- * (rooted), `block_id`, `target` (as authored), `anchor`, `field?`. */
12
+ * under the `links` target's names (spec/surface §1.2, 5.0) — `_doc_id`,
13
+ * `_path` (rooted), `_block_id`, `target` (as authored; a role), `_anchor`,
14
+ * `_field?`. */
14
15
  export interface SurfaceInboundLink {
15
- doc_id: string;
16
- path: string;
17
- block_id: string | null;
16
+ _doc_id: string;
17
+ _path: string;
18
+ _block_id: string | null;
18
19
  target: string;
19
- anchor: string | null;
20
- field?: string;
20
+ _anchor: string | null;
21
+ _field?: string;
21
22
  }
22
23
  export declare function surfaceInboundLink(l: InboundLink): SurfaceInboundLink;
23
- /** An observe outcome on the wire (spec/surface §4, 3.0): `spec/store` §5's
24
+ /** An observe outcome on the wire (spec/surface §4, 5.0): `spec/store` §5's
24
25
  * `{ docId, path, … }` (unchanged there) renamed to the document's row
25
- * attributes `id`/`path`, the path rooted. */
26
+ * attributes `_id`/`_path`, the path rooted. */
26
27
  export type SurfaceObserveResult<T extends {
27
28
  docId: string | null;
28
29
  path: string;
29
30
  }> = Omit<T, "docId" | "path"> & {
30
- id: T["docId"];
31
- path: string;
31
+ _id: T["docId"];
32
+ _path: string;
32
33
  };
33
34
  /** `observe` / `observe_many` outcomes. */
34
35
  export declare function surfaceObserveResult<T extends ObserveResult>(res: T): SurfaceObserveResult<T>;
35
36
  /** `observe_delete`. */
36
37
  export declare function surfaceObserveDeleteResult(res: ObserveDeleteResult): SurfaceObserveResult<ObserveDeleteResult>;
37
- /** `blocks_search` hits (`path` rooted). */
38
+ /** `blocks_search` hits (`_path` rooted). */
38
39
  export declare function surfaceTextSearch(res: TextSearchResult): TextSearchResult;
39
40
  /** `resolve` hits: the locator is `<path>#<type>[<ordinal>]`; its path half is
40
41
  * rooted (a locator without `#` names no path and is left alone). */
41
42
  export declare function surfaceResolveHits(hits: ResolveHit[]): ResolveHit[];
42
- /** `links_retarget` / `links_repair` hits (`path` is the block's document). */
43
+ /** `links_retarget` / `links_repair` hits (`_path` is the block's document). */
43
44
  export declare function surfaceRetargetHits(hits: RetargetHit[]): RetargetHit[];
44
45
  /**
45
46
  * A Plan on the wire (spec/surface §4, 3.1): the executable core — `effects`,
@@ -47,11 +48,11 @@ export declare function surfaceRetargetHits(hits: RetargetHit[]): RetargetHit[];
47
48
  * storage form, because `plan_id` digests exactly those bytes and the client
48
49
  * hands the object back to `execute` (spec/mutate §11.5; the one result the
49
50
  * path rule exempts, like `dangling[].target`). Only the un-digested `preview`
50
- * is rooted: its `revisions[].path`, `diffs` keys and `retarget[].hits[].path`
51
- * (3.0; `identity` is keyed by document id and carries no path).
51
+ * is rooted: its `revisions[]._path`, `diffs` keys and `retarget[].hits[]._path`
52
+ * (`identity` is keyed by document id and carries no path).
52
53
  */
53
54
  export declare function surfacePlan(plan: Plan): Plan;
54
- /** A Receipt on the wire: `revisions[].path` rooted (the same shape as an apply revision). */
55
+ /** A Receipt on the wire: `revisions[]._path` rooted (the same shape as an apply revision). */
55
56
  export declare function surfaceReceipt(receipt: Receipt): Receipt;
56
57
  /** `omg sync`'s one-shot sweep: the ingested / suppressed / deleted / conflicted paths. */
57
58
  export declare function surfaceSweepResult(res: SweepResult): SweepResult;
@@ -8,41 +8,43 @@
8
8
  // `spec/sync`'s sweep — keep their storage-form paths in the library (their
9
9
  // own fixtures pin them) and are re-shaped HERE.
10
10
  //
11
- // Row names (spec/surface §1.2, 3.0): a result that renders a document, block
12
- // or edge row spells it the way the query binding does — `id`, `path`,
13
- // `hash`, `raw`, `updated_at`, plain `doc_id`/`block_id` foreign keys. The
14
- // shapes other specs own under their own names — `spec/store`'s observe
15
- // outcome, a move's dangling inbound links — are re-shaped HERE too
16
- // (`SurfaceObserveResult`, `surfaceInboundLink`, …).
11
+ // Row names (spec/surface §1.2, 5.0 "underscore = engine"): a result that
12
+ // renders a document, block or link row spells it the way the query binding
13
+ // does — `_id`, `_path`, `_hash`, `_raw`, `_updated_at`, the foreign keys
14
+ // `_doc_id`/`_block_id`; a key naming a ROLE (`rev`, `target`, `locator`,
15
+ // `commitId`, `oldRaw`/`newRaw`) keeps its name. The shapes other specs own
16
+ // under their own names — `spec/store`'s observe outcome, a move's dangling
17
+ // inbound links — are re-shaped HERE too (`SurfaceObserveResult`,
18
+ // `surfaceInboundLink`, …).
17
19
  //
18
20
  // Both the MCP server and the `omg` verbs call these, so the two clients
19
21
  // cannot drift. Each function returns a new value; the input is not mutated.
20
22
  import { referencePath, referenceKeyed } from "./core/paths.js";
21
- /** `spec/mutate` §4's kernel result (the library's `apply`; no tool returns it since 4.0): `revisions[].path` and the dry-run `diffs` keys. */
23
+ /** `spec/mutate` §4's kernel result (the library's `apply`; no tool returns it since 4.0): `revisions[]._path` and the dry-run `diffs` keys. */
22
24
  export function surfaceApplyResult(res) {
23
25
  return {
24
26
  ...res,
25
- revisions: res.revisions.map((r) => ({ ...r, path: referencePath(r.path) })),
27
+ revisions: res.revisions.map((r) => ({ ...r, _path: referencePath(r._path) })),
26
28
  ...(res.diffs ? { diffs: referenceKeyed(res.diffs) } : {}),
27
29
  };
28
30
  }
29
31
  export function surfaceInboundLink(l) {
30
- const { path, ...rest } = l;
31
- return { doc_id: rest.doc_id, path: referencePath(path), block_id: rest.block_id, target: rest.target, anchor: rest.anchor, ...(rest.field !== undefined ? { field: rest.field } : {}) };
32
+ const { _path, ...rest } = l;
33
+ return { _doc_id: rest._doc_id, _path: referencePath(_path), _block_id: rest._block_id, target: rest.target, _anchor: rest._anchor, ...(rest._field !== undefined ? { _field: rest._field } : {}) };
32
34
  }
33
35
  /** `observe` / `observe_many` outcomes. */
34
36
  export function surfaceObserveResult(res) {
35
37
  const { docId, path, ...rest } = res;
36
- return { id: docId, path: referencePath(path), ...rest };
38
+ return { _id: docId, _path: referencePath(path), ...rest };
37
39
  }
38
40
  /** `observe_delete`. */
39
41
  export function surfaceObserveDeleteResult(res) {
40
42
  const { docId, path, ...rest } = res;
41
- return { id: docId, path: referencePath(path), ...rest };
43
+ return { _id: docId, _path: referencePath(path), ...rest };
42
44
  }
43
- /** `blocks_search` hits (`path` rooted). */
45
+ /** `blocks_search` hits (`_path` rooted). */
44
46
  export function surfaceTextSearch(res) {
45
- return { ...res, hits: res.hits.map((h) => ({ ...h, path: referencePath(h.path) })) };
47
+ return { ...res, hits: res.hits.map((h) => ({ ...h, _path: referencePath(h._path) })) };
46
48
  }
47
49
  /** `resolve` hits: the locator is `<path>#<type>[<ordinal>]`; its path half is
48
50
  * rooted (a locator without `#` names no path and is left alone). */
@@ -52,9 +54,9 @@ export function surfaceResolveHits(hits) {
52
54
  return i < 0 ? h : { ...h, locator: referencePath(h.locator.slice(0, i)) + h.locator.slice(i) };
53
55
  });
54
56
  }
55
- /** `links_retarget` / `links_repair` hits (`path` is the block's document). */
57
+ /** `links_retarget` / `links_repair` hits (`_path` is the block's document). */
56
58
  export function surfaceRetargetHits(hits) {
57
- return hits.map((h) => ({ ...h, path: referencePath(h.path) }));
59
+ return hits.map((h) => ({ ...h, _path: referencePath(h._path) }));
58
60
  }
59
61
  /**
60
62
  * A Plan on the wire (spec/surface §4, 3.1): the executable core — `effects`,
@@ -62,8 +64,8 @@ export function surfaceRetargetHits(hits) {
62
64
  * storage form, because `plan_id` digests exactly those bytes and the client
63
65
  * hands the object back to `execute` (spec/mutate §11.5; the one result the
64
66
  * path rule exempts, like `dangling[].target`). Only the un-digested `preview`
65
- * is rooted: its `revisions[].path`, `diffs` keys and `retarget[].hits[].path`
66
- * (3.0; `identity` is keyed by document id and carries no path).
67
+ * is rooted: its `revisions[]._path`, `diffs` keys and `retarget[].hits[]._path`
68
+ * (`identity` is keyed by document id and carries no path).
67
69
  */
68
70
  export function surfacePlan(plan) {
69
71
  if (!plan.preview)
@@ -72,15 +74,15 @@ export function surfacePlan(plan) {
72
74
  ...plan,
73
75
  preview: {
74
76
  ...plan.preview,
75
- revisions: plan.preview.revisions.map((r) => ({ ...r, path: referencePath(r.path) })),
77
+ revisions: plan.preview.revisions.map((r) => ({ ...r, _path: referencePath(r._path) })),
76
78
  diffs: referenceKeyed(plan.preview.diffs),
77
79
  ...(plan.preview.retarget !== undefined ? { retarget: plan.preview.retarget.map((r) => ({ ...r, hits: surfaceRetargetHits(r.hits) })) } : {}),
78
80
  },
79
81
  };
80
82
  }
81
- /** A Receipt on the wire: `revisions[].path` rooted (the same shape as an apply revision). */
83
+ /** A Receipt on the wire: `revisions[]._path` rooted (the same shape as an apply revision). */
82
84
  export function surfaceReceipt(receipt) {
83
- return { ...receipt, revisions: receipt.revisions.map((r) => ({ ...r, path: referencePath(r.path) })) };
85
+ return { ...receipt, revisions: receipt.revisions.map((r) => ({ ...r, _path: referencePath(r._path) })) };
84
86
  }
85
87
  /** `omg sync`'s one-shot sweep: the ingested / suppressed / deleted / conflicted paths. */
86
88
  export function surfaceSweepResult(res) {
@@ -10,8 +10,8 @@ export interface DiskStatus extends DiskDrift {
10
10
  checked: boolean;
11
11
  }
12
12
  export interface RepoStatus {
13
- /** the repository's own id (spec/surface §1.2, 3.0: every row names its identity `id`) */
14
- id: string;
13
+ /** the repository's own id (spec/surface §1.2, 5.0: the root row's `_id`) */
14
+ _id: string;
15
15
  slug: string;
16
16
  rootPath: string;
17
17
  docs: number;
@@ -18,7 +18,7 @@ export function reposStatus(store, repoId, rootPath) {
18
18
  ? { ...detectDiskDrift(store, repoId, rootPath), checked: true }
19
19
  : { changed: 0, deleted: 0, untracked: 0, checked: false };
20
20
  return {
21
- id: repoId,
21
+ _id: repoId,
22
22
  slug: repo?.slug ?? "",
23
23
  rootPath: rootPath ?? "",
24
24
  docs: count("SELECT count(*) c FROM docs WHERE repo_id = ? AND deleted_commit IS NULL"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omgbase/core",
3
- "version": "0.28.0",
3
+ "version": "0.29.2",
4
4
  "description": "Open Markdown Graph Base — embedded engine",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@modelcontextprotocol/sdk": "^1.30.0",
58
- "@omgbase/oqx": "^0.25.0",
58
+ "@omgbase/oqx": "^0.26.0",
59
59
  "better-sqlite3": "^13.0.3",
60
60
  "mdast-util-from-markdown": "^2.0.2",
61
61
  "mdast-util-frontmatter": "^2.0.1",