datanotes 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -5
- package/dist/api/client.d.cts +37 -4
- package/dist/api/client.d.ts +37 -4
- package/dist/api/index.cjs +388 -52
- package/dist/api/index.d.cts +3 -2
- package/dist/api/index.d.ts +3 -2
- package/dist/api/index.js +388 -52
- package/dist/api/mcp.cjs +6 -3
- package/dist/api/mcp.js +6 -3
- package/dist/api/otlp.d.cts +63 -15
- package/dist/api/otlp.d.ts +63 -15
- package/dist/api/redact.d.cts +25 -0
- package/dist/api/redact.d.ts +25 -0
- package/dist/api/tokens.d.cts +5 -0
- package/dist/api/tokens.d.ts +5 -0
- package/dist/api/tracing.d.cts +107 -0
- package/dist/api/tracing.d.ts +107 -0
- package/dist/datanotes.cjs +9380 -2554
- package/dist/docs/administration/limits.md +96 -12
- package/dist/docs/administration/run-the-service.md +18 -0
- package/dist/docs/api/operations/graph_neighbors.md +4 -2
- package/dist/docs/api/operations/graph_path.md +3 -3
- package/dist/docs/api/operations/graph_traverse.md +2 -2
- package/dist/docs/api/operations/record_tool_call.md +1 -0
- package/dist/docs/api/operations/tags/queries.md +2 -2
- package/dist/docs/api.md +3 -3
- package/dist/docs/develop/concurrency.md +36 -1
- package/dist/docs/develop/http-api.md +11 -1
- package/dist/docs/develop/telemetry.md +224 -25
- package/dist/docs/guides/data-quality/check-constraints.md +10 -10
- package/dist/docs/guides/data-quality/hand-edits.md +8 -8
- package/dist/docs/guides/database-objects/bases.md +11 -11
- package/dist/docs/guides/database-objects/catalogs-and-schemas.md +10 -10
- package/dist/docs/guides/database-objects/columns.md +38 -38
- package/dist/docs/guides/database-objects/relations.md +27 -27
- package/dist/docs/guides/database-objects/tables.md +37 -101
- package/dist/docs/guides/database-objects/views.md +44 -44
- package/dist/docs/guides/history/back-up.md +12 -4
- package/dist/docs/guides/history/change-data-feed.md +34 -34
- package/dist/docs/guides/history/journal-and-undo.md +12 -12
- package/dist/docs/guides/history/restore.md +20 -20
- package/dist/docs/guides/history/table-history.md +31 -31
- package/dist/docs/guides/history/vacuum.md +1 -10
- package/dist/docs/guides/read-and-write/automatic-links.md +15 -15
- package/dist/docs/guides/read-and-write/import-notes.md +20 -20
- package/dist/docs/guides/read-and-write/joins-and-aggregates.md +7 -7
- package/dist/docs/guides/read-and-write/read-and-filter.md +10 -10
- package/dist/docs/guides/read-and-write/write-rows.md +10 -10
- package/dist/docs/guides/search/link-graph.md +95 -0
- package/dist/docs/guides/search/text.md +1 -1
- package/dist/docs/guides/security/who-did-what.md +2 -0
- package/dist/docs/reference/cli.md +10 -3
- package/dist/docs/reference/compatibility.md +33 -13
- package/dist/docs/reference/operations/queries.md +3 -3
- package/dist/docs/reference/operations.md +11 -11
- package/dist/docs/reference/settings.md +37 -25
- package/dist/docs/release-notes.md +121 -0
- package/dist/docs/start/how-it-works.md +35 -3
- package/dist/docs/start/quick-start.md +2 -0
- package/package.json +3 -2
|
@@ -314,7 +314,7 @@ Answer:
|
|
|
314
314
|
"op": "create_table",
|
|
315
315
|
"planned_texts": ["datanotes/metastore.yaml"],
|
|
316
316
|
"commits": [{ "table": "main.public.film", "version": 0, "operation": "CREATE TABLE" }],
|
|
317
|
-
"migration_id": "
|
|
317
|
+
"migration_id": "20261014T191527-create_table-create-table-main-public-film"
|
|
318
318
|
}
|
|
319
319
|
```
|
|
320
320
|
|
|
@@ -359,7 +359,7 @@ Answer (70 lines)
|
|
|
359
359
|
"path": "Films/Charade.md",
|
|
360
360
|
"set": {
|
|
361
361
|
"table": "main.public.film",
|
|
362
|
-
"id": "
|
|
362
|
+
"id": "01a13bd7-4bef-7ddf-abde-b91b57090495",
|
|
363
363
|
"director": "Stanley Donen",
|
|
364
364
|
"title": "Charade"
|
|
365
365
|
},
|
|
@@ -369,7 +369,7 @@ Answer (70 lines)
|
|
|
369
369
|
"path": "Films/His Girl Friday.md",
|
|
370
370
|
"set": {
|
|
371
371
|
"table": "main.public.film",
|
|
372
|
-
"id": "
|
|
372
|
+
"id": "01a13bd7-4bef-7b33-bb40-437e95d29b11",
|
|
373
373
|
"director": "Howard Hawks",
|
|
374
374
|
"title": "His Girl Friday"
|
|
375
375
|
},
|
|
@@ -379,7 +379,7 @@ Answer (70 lines)
|
|
|
379
379
|
"path": "Films/Metropolis.md",
|
|
380
380
|
"set": {
|
|
381
381
|
"table": "main.public.film",
|
|
382
|
-
"id": "
|
|
382
|
+
"id": "01a13bd7-4bef-78c0-9fae-baa5a384034b",
|
|
383
383
|
"director": "Fritz Lang",
|
|
384
384
|
"title": "Metropolis"
|
|
385
385
|
},
|
|
@@ -389,7 +389,7 @@ Answer (70 lines)
|
|
|
389
389
|
"path": "Films/Nosferatu.md",
|
|
390
390
|
"set": {
|
|
391
391
|
"table": "main.public.film",
|
|
392
|
-
"id": "
|
|
392
|
+
"id": "01a13bd7-4bef-7530-9686-caa5dae75ba9",
|
|
393
393
|
"director": "F. W. Murnau",
|
|
394
394
|
"title": "Nosferatu"
|
|
395
395
|
},
|
|
@@ -399,7 +399,7 @@ Answer (70 lines)
|
|
|
399
399
|
"path": "Films/The Gold Rush.md",
|
|
400
400
|
"set": {
|
|
401
401
|
"table": "main.public.film",
|
|
402
|
-
"id": "
|
|
402
|
+
"id": "01a13bd7-4bf0-76d1-acad-286dc20353ec",
|
|
403
403
|
"director": "Charlie Chaplin",
|
|
404
404
|
"title": "The Gold Rush"
|
|
405
405
|
},
|
|
@@ -458,7 +458,7 @@ Answer (73 lines)
|
|
|
458
458
|
"path": "Films/Charade.md",
|
|
459
459
|
"set": {
|
|
460
460
|
"table": "main.public.film",
|
|
461
|
-
"id": "
|
|
461
|
+
"id": "01a13bd7-4bf3-7078-b24f-c1aacdc10722",
|
|
462
462
|
"director": "Stanley Donen",
|
|
463
463
|
"title": "Charade"
|
|
464
464
|
},
|
|
@@ -468,7 +468,7 @@ Answer (73 lines)
|
|
|
468
468
|
"path": "Films/His Girl Friday.md",
|
|
469
469
|
"set": {
|
|
470
470
|
"table": "main.public.film",
|
|
471
|
-
"id": "
|
|
471
|
+
"id": "01a13bd7-4bf3-72be-9f3c-6af5c1e45507",
|
|
472
472
|
"director": "Howard Hawks",
|
|
473
473
|
"title": "His Girl Friday"
|
|
474
474
|
},
|
|
@@ -478,7 +478,7 @@ Answer (73 lines)
|
|
|
478
478
|
"path": "Films/Metropolis.md",
|
|
479
479
|
"set": {
|
|
480
480
|
"table": "main.public.film",
|
|
481
|
-
"id": "
|
|
481
|
+
"id": "01a13bd7-4bf3-7a1e-b23c-2769c0dc41d3",
|
|
482
482
|
"director": "Fritz Lang",
|
|
483
483
|
"title": "Metropolis"
|
|
484
484
|
},
|
|
@@ -488,7 +488,7 @@ Answer (73 lines)
|
|
|
488
488
|
"path": "Films/Nosferatu.md",
|
|
489
489
|
"set": {
|
|
490
490
|
"table": "main.public.film",
|
|
491
|
-
"id": "
|
|
491
|
+
"id": "01a13bd7-4bf3-7289-b3dd-65839150b89a",
|
|
492
492
|
"director": "F. W. Murnau",
|
|
493
493
|
"title": "Nosferatu"
|
|
494
494
|
},
|
|
@@ -498,7 +498,7 @@ Answer (73 lines)
|
|
|
498
498
|
"path": "Films/The Gold Rush.md",
|
|
499
499
|
"set": {
|
|
500
500
|
"table": "main.public.film",
|
|
501
|
-
"id": "
|
|
501
|
+
"id": "01a13bd7-4bf3-7795-afda-7207d19732fb",
|
|
502
502
|
"director": "Charlie Chaplin",
|
|
503
503
|
"title": "The Gold Rush"
|
|
504
504
|
},
|
|
@@ -519,7 +519,7 @@ Answer (73 lines)
|
|
|
519
519
|
}
|
|
520
520
|
],
|
|
521
521
|
"commits": [{ "table": "main.public.film", "version": 1, "operation": "ADOPT ROWS" }],
|
|
522
|
-
"migration_id": "
|
|
522
|
+
"migration_id": "20261014T191527-adopt_rows-adopt-5-notes-into-film"
|
|
523
523
|
}
|
|
524
524
|
```
|
|
525
525
|
|
|
@@ -536,7 +536,7 @@ Answer:
|
|
|
536
536
|
```markdown
|
|
537
537
|
---
|
|
538
538
|
table: main.public.film
|
|
539
|
-
id:
|
|
539
|
+
id: 01a13bd7-4bf3-7078-b24f-c1aacdc10722
|
|
540
540
|
year: 1963
|
|
541
541
|
minutes: 113
|
|
542
542
|
status: watched
|
|
@@ -623,7 +623,7 @@ Answer:
|
|
|
623
623
|
"files_created": 1,
|
|
624
624
|
"planned_creates": ["datanotes/main/public/film/Battleship Potemkin.md"],
|
|
625
625
|
"commits": [{ "table": "main.public.film", "version": 2, "operation": "WRITE" }],
|
|
626
|
-
"migration_id": "
|
|
626
|
+
"migration_id": "20261014T191527-insert_row-insert-into-film"
|
|
627
627
|
}
|
|
628
628
|
```
|
|
629
629
|
|
|
@@ -655,7 +655,7 @@ Answer:
|
|
|
655
655
|
"op": "add_column",
|
|
656
656
|
"planned_texts": ["datanotes/metastore.yaml"],
|
|
657
657
|
"commits": [{ "table": "main.public.film", "version": 4, "operation": "ADD COLUMNS" }],
|
|
658
|
-
"migration_id": "
|
|
658
|
+
"migration_id": "20261014T191529-add_column-add-column-added_by-to-film"
|
|
659
659
|
}
|
|
660
660
|
```
|
|
661
661
|
|
|
@@ -683,7 +683,7 @@ Answer:
|
|
|
683
683
|
"files_created": 1,
|
|
684
684
|
"planned_creates": ["datanotes/main/public/film/Night of the Living Dead.md"],
|
|
685
685
|
"commits": [{ "table": "main.public.film", "version": 5, "operation": "WRITE" }],
|
|
686
|
-
"migration_id": "
|
|
686
|
+
"migration_id": "20261014T191529-insert_row-insert-into-film"
|
|
687
687
|
}
|
|
688
688
|
```
|
|
689
689
|
|
|
@@ -692,7 +692,7 @@ Answer:
|
|
|
692
692
|
```markdown
|
|
693
693
|
---
|
|
694
694
|
table: main.public.film
|
|
695
|
-
id:
|
|
695
|
+
id: 01a13bd7-51ec-7ccf-ace8-a87f2b6b5d44
|
|
696
696
|
director: George A. Romero
|
|
697
697
|
minutes: 96
|
|
698
698
|
status: to watch
|
|
@@ -734,7 +734,7 @@ Answer:
|
|
|
734
734
|
```markdown
|
|
735
735
|
---
|
|
736
736
|
table: main.public.film
|
|
737
|
-
id:
|
|
737
|
+
id: 01a13bd7-547d-7d1d-93ff-6eb23257eec6
|
|
738
738
|
year: 1924
|
|
739
739
|
minutes: 45
|
|
740
740
|
status: to watch
|
|
@@ -762,7 +762,7 @@ Answer:
|
|
|
762
762
|
"op": "alter_table",
|
|
763
763
|
"planned_texts": ["datanotes/metastore.yaml"],
|
|
764
764
|
"commits": [{ "table": "main.public.film", "version": 7, "operation": "ALTER TABLE" }],
|
|
765
|
-
"migration_id": "
|
|
765
|
+
"migration_id": "20261014T191531-alter_table-alter-table-main-public-film"
|
|
766
766
|
}
|
|
767
767
|
```
|
|
768
768
|
|
|
@@ -825,7 +825,7 @@ This is the table as you inferred, corrected and extended it on this page. Its d
|
|
|
825
825
|
|
|
826
826
|
```yaml
|
|
827
827
|
# Metastore (Datanotes): catalogs, schemas, tables, columns, views.
|
|
828
|
-
id:
|
|
828
|
+
id: 01a13bd7-4bd8-7523-b02d-c287216ddcdf
|
|
829
829
|
config:
|
|
830
830
|
history: true
|
|
831
831
|
|
|
@@ -100,9 +100,9 @@ Answer:
|
|
|
100
100
|
"table": "main.public.watch",
|
|
101
101
|
"total": 3,
|
|
102
102
|
"rows": [
|
|
103
|
-
{ "date(occurred_at)": "2026-10-
|
|
104
|
-
{ "date(occurred_at)": "2026-10-
|
|
105
|
-
{ "date(occurred_at)": "2026-10-
|
|
103
|
+
{ "date(occurred_at)": "2026-10-09", "viewings": 1 },
|
|
104
|
+
{ "date(occurred_at)": "2026-10-12", "viewings": 1 },
|
|
105
|
+
{ "date(occurred_at)": "2026-10-13", "viewings": 1 }
|
|
106
106
|
]
|
|
107
107
|
}
|
|
108
108
|
```
|
|
@@ -138,10 +138,10 @@ Answer:
|
|
|
138
138
|
{
|
|
139
139
|
"path": "datanotes/main/public/film/Night of the Living Dead.md",
|
|
140
140
|
"title": "Night of the Living Dead",
|
|
141
|
-
"watched_on": "2026-10-
|
|
141
|
+
"watched_on": "2026-10-13",
|
|
142
142
|
"viewing": [
|
|
143
143
|
{
|
|
144
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
144
|
+
"path": "datanotes/main/public/watch/2026-10-13T2200.md",
|
|
145
145
|
"where": "cinema",
|
|
146
146
|
"with": "Oscar"
|
|
147
147
|
}
|
|
@@ -150,10 +150,10 @@ Answer:
|
|
|
150
150
|
{
|
|
151
151
|
"path": "datanotes/main/public/film/The Gold Rush.md",
|
|
152
152
|
"title": "The Gold Rush",
|
|
153
|
-
"watched_on": "2026-10-
|
|
153
|
+
"watched_on": "2026-10-12",
|
|
154
154
|
"viewing": [
|
|
155
155
|
{
|
|
156
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
156
|
+
"path": "datanotes/main/public/watch/2026-10-12T2030.md",
|
|
157
157
|
"where": "home",
|
|
158
158
|
"with": "my sister"
|
|
159
159
|
}
|
|
@@ -332,23 +332,23 @@ Answer:
|
|
|
332
332
|
"total": 3,
|
|
333
333
|
"rows": [
|
|
334
334
|
{
|
|
335
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
335
|
+
"path": "datanotes/main/public/watch/2026-10-09T2115.md",
|
|
336
336
|
"film": "[[Charade]]",
|
|
337
|
-
"occurred_at": "2026-10-
|
|
337
|
+
"occurred_at": "2026-10-09T21:15",
|
|
338
338
|
"where": "home",
|
|
339
339
|
"place": "my living room"
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
342
|
+
"path": "datanotes/main/public/watch/2026-10-12T2030.md",
|
|
343
343
|
"film": "[[The Gold Rush]]",
|
|
344
|
-
"occurred_at": "2026-10-
|
|
344
|
+
"occurred_at": "2026-10-12T20:30",
|
|
345
345
|
"where": "home",
|
|
346
346
|
"place": "my living room"
|
|
347
347
|
},
|
|
348
348
|
{
|
|
349
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
349
|
+
"path": "datanotes/main/public/watch/2026-10-13T2200.md",
|
|
350
350
|
"film": "[[Night of the Living Dead]]",
|
|
351
|
-
"occurred_at": "2026-10-
|
|
351
|
+
"occurred_at": "2026-10-13T22:00",
|
|
352
352
|
"where": "cinema",
|
|
353
353
|
"place": "the film club downtown"
|
|
354
354
|
}
|
|
@@ -459,12 +459,12 @@ Answer:
|
|
|
459
459
|
"total": 7,
|
|
460
460
|
"rows": [
|
|
461
461
|
{
|
|
462
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
463
|
-
"occurred_at": "2026-10-
|
|
462
|
+
"path": "datanotes/main/public/watch/2026-10-09T2115.md",
|
|
463
|
+
"occurred_at": "2026-10-09T21:15"
|
|
464
464
|
},
|
|
465
465
|
{
|
|
466
|
-
"path": "datanotes/main/public/watch/2026-10-
|
|
467
|
-
"occurred_at": "2026-10-
|
|
466
|
+
"path": "datanotes/main/public/watch/2026-10-05T2130.md",
|
|
467
|
+
"occurred_at": "2026-10-05T21:30"
|
|
468
468
|
}
|
|
469
469
|
]
|
|
470
470
|
}
|
|
@@ -31,7 +31,7 @@ Answer:
|
|
|
31
31
|
"files_created": 1,
|
|
32
32
|
"planned_creates": ["datanotes/main/public/film/Metropolis.md"],
|
|
33
33
|
"commits": [{ "table": "main.public.film", "version": 1, "operation": "WRITE" }],
|
|
34
|
-
"migration_id": "
|
|
34
|
+
"migration_id": "20261014T191515-insert_row-insert-into-film"
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
@@ -40,7 +40,7 @@ Answer:
|
|
|
40
40
|
```markdown
|
|
41
41
|
---
|
|
42
42
|
table: main.public.film
|
|
43
|
-
id:
|
|
43
|
+
id: 01a13bd7-1a3c-77a0-9b04-bdbf908dd17f
|
|
44
44
|
title: Metropolis
|
|
45
45
|
year: 1927
|
|
46
46
|
minutes: 153
|
|
@@ -103,7 +103,7 @@ Answer:
|
|
|
103
103
|
}
|
|
104
104
|
],
|
|
105
105
|
"commits": [{ "table": "main.public.film", "version": 6, "operation": "UPDATE" }],
|
|
106
|
-
"migration_id": "
|
|
106
|
+
"migration_id": "20261014T191521-update_row-update-film"
|
|
107
107
|
}
|
|
108
108
|
```
|
|
109
109
|
|
|
@@ -174,7 +174,7 @@ Answer:
|
|
|
174
174
|
}
|
|
175
175
|
],
|
|
176
176
|
"commits": [{ "table": "main.public.film", "version": 8, "operation": "UPDATE" }],
|
|
177
|
-
"migration_id": "
|
|
177
|
+
"migration_id": "20261014T191521-update_row-update-film-3",
|
|
178
178
|
"ambiguous_mentions": [
|
|
179
179
|
{
|
|
180
180
|
"path": "datanotes/main/public/film/Nosferatu.md",
|
|
@@ -193,7 +193,7 @@ Answer:
|
|
|
193
193
|
```markdown
|
|
194
194
|
---
|
|
195
195
|
table: main.public.film
|
|
196
|
-
id:
|
|
196
|
+
id: 01a13bd7-321a-76c1-9810-fe730dc54990
|
|
197
197
|
title: Nosferatu
|
|
198
198
|
year: 1922
|
|
199
199
|
status: watched
|
|
@@ -246,7 +246,7 @@ Answer:
|
|
|
246
246
|
}
|
|
247
247
|
],
|
|
248
248
|
"commits": [{ "table": "main.public.film", "version": 9, "operation": "UPDATE" }],
|
|
249
|
-
"migration_id": "
|
|
249
|
+
"migration_id": "20261014T191521-update_row-update-film-4"
|
|
250
250
|
}
|
|
251
251
|
```
|
|
252
252
|
|
|
@@ -332,7 +332,7 @@ Answer:
|
|
|
332
332
|
}
|
|
333
333
|
],
|
|
334
334
|
"commits": [{ "table": "main.public.film", "version": 10, "operation": "UPDATE" }],
|
|
335
|
-
"migration_id": "
|
|
335
|
+
"migration_id": "20261014T191521-update_rows-update-film"
|
|
336
336
|
}
|
|
337
337
|
```
|
|
338
338
|
|
|
@@ -370,7 +370,7 @@ Answer:
|
|
|
370
370
|
],
|
|
371
371
|
"planned_creates": ["datanotes/main/public/film/Battleship Potemkin.md"],
|
|
372
372
|
"commits": [{ "table": "main.public.film", "version": 11, "operation": "MERGE" }],
|
|
373
|
-
"migration_id": "
|
|
373
|
+
"migration_id": "20261014T191521-merge_rows-merge-2-rows-into-film"
|
|
374
374
|
}
|
|
375
375
|
```
|
|
376
376
|
|
|
@@ -431,7 +431,7 @@ Answer:
|
|
|
431
431
|
}
|
|
432
432
|
],
|
|
433
433
|
"commits": [{ "table": "main.public.film", "version": 12, "operation": "DELETE" }],
|
|
434
|
-
"migration_id": "
|
|
434
|
+
"migration_id": "20261014T191521-delete_rows-archive-1-rows-of-film"
|
|
435
435
|
}
|
|
436
436
|
```
|
|
437
437
|
|
|
@@ -568,6 +568,6 @@ Answer (51 lines)
|
|
|
568
568
|
{ "table": "main.public.film", "version": 22, "operation": "MOVE ROWS" },
|
|
569
569
|
{ "table": "main.public.watchlist", "version": 1, "operation": "MOVE ROWS" }
|
|
570
570
|
],
|
|
571
|
-
"migration_id": "
|
|
571
|
+
"migration_id": "20261014T191521-move_rows-move-4-rows-from-film-to-watch"
|
|
572
572
|
}
|
|
573
573
|
```
|
|
@@ -45,6 +45,101 @@ Answer:
|
|
|
45
45
|
}
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
## Read the whole graph in one call
|
|
49
|
+
|
|
50
|
+
`tables` starts from the rows of several tables at once. Name the tables, or use a pattern: `*` is every table, `main.*` every table of the `main` catalog. With `direction: "out"`, one call returns every link of every row: the whole graph, for an app that draws it. The start set holds at most 5,000 notes.
|
|
51
|
+
|
|
52
|
+
**`graph_neighbors`**
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{ "from_nodes": { "tables": ["*"] }, "direction": "out" }
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Answer (80 lines)
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"nodes": [
|
|
63
|
+
{
|
|
64
|
+
"path": "datanotes/main/public/actor/Audrey Hepburn.md",
|
|
65
|
+
"table": "main.public.actor",
|
|
66
|
+
"counts": {},
|
|
67
|
+
"edges": []
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"path": "datanotes/main/public/actor/Cary Grant.md",
|
|
71
|
+
"table": "main.public.actor",
|
|
72
|
+
"counts": {},
|
|
73
|
+
"edges": []
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"path": "datanotes/main/public/actor/Rosalind Russell.md",
|
|
77
|
+
"table": "main.public.actor",
|
|
78
|
+
"counts": {},
|
|
79
|
+
"edges": []
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"path": "datanotes/main/public/film/Charade.md",
|
|
83
|
+
"table": "main.public.film",
|
|
84
|
+
"counts": { "out:cast": 2, "out:link": 1 },
|
|
85
|
+
"edges": [
|
|
86
|
+
{
|
|
87
|
+
"path": "datanotes/main/public/actor/Cary Grant.md",
|
|
88
|
+
"table": "main.public.actor",
|
|
89
|
+
"label": "cast",
|
|
90
|
+
"direction": "out"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"path": "datanotes/main/public/actor/Audrey Hepburn.md",
|
|
94
|
+
"table": "main.public.actor",
|
|
95
|
+
"label": "cast",
|
|
96
|
+
"direction": "out"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"path": "datanotes/main/public/film/His Girl Friday.md",
|
|
100
|
+
"table": "main.public.film",
|
|
101
|
+
"label": "link",
|
|
102
|
+
"direction": "out"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"path": "datanotes/main/public/film/His Girl Friday.md",
|
|
108
|
+
"table": "main.public.film",
|
|
109
|
+
"counts": { "out:cast": 2 },
|
|
110
|
+
"edges": [
|
|
111
|
+
{
|
|
112
|
+
"path": "datanotes/main/public/actor/Cary Grant.md",
|
|
113
|
+
"table": "main.public.actor",
|
|
114
|
+
"label": "cast",
|
|
115
|
+
"direction": "out"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"path": "datanotes/main/public/actor/Rosalind Russell.md",
|
|
119
|
+
"table": "main.public.actor",
|
|
120
|
+
"label": "cast",
|
|
121
|
+
"direction": "out"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"path": "datanotes/main/public/watch/2026-09-25T2100.md",
|
|
127
|
+
"table": "main.public.watch",
|
|
128
|
+
"counts": { "out:film": 1, "out:link": 1 },
|
|
129
|
+
"edges": [
|
|
130
|
+
{
|
|
131
|
+
"path": "datanotes/main/public/film/Charade.md",
|
|
132
|
+
"table": "main.public.film",
|
|
133
|
+
"label": "film",
|
|
134
|
+
"direction": "out"
|
|
135
|
+
},
|
|
136
|
+
{ "path": "Notes/Film night.md", "label": "link", "direction": "out" }
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
48
143
|
## Walk the links from a note
|
|
49
144
|
|
|
50
145
|
`graph_traverse` follows links breadth-first, in the `direction` you choose: `out`, `in` or `both`. Here it starts from Audrey Hepburn, goes up to two steps in both directions and keeps only films. It finds Charade, the film she’s in, and His Girl Friday, which the Charade note links to. `via` shows the route to each one.
|
|
@@ -31,6 +31,8 @@ A program that serves its own Model Context Protocol (MCP) server can report its
|
|
|
31
31
|
|
|
32
32
|
Tool calls appear on the change feed as events with `kind: "tool_call"`, sent only to consumers that ask for that kind. The `call` field holds `tool`, `ok`, `served_by`, `duration_ms`, `summary` and `session`, the arguments cut at 300 characters, the value cut at 1,000, and the result’s size in `result_chars` and `result_tokens`.
|
|
33
33
|
|
|
34
|
+
A large result costs less to report when the program cuts it first. The engine answers `takes_summary: true` when it accepts a cut call. Then send the value cut at 1,000 characters, and the result’s `summary` next to it. The event is the same as for the whole call. `datanotes mcp` does this after its first report.
|
|
35
|
+
|
|
34
36
|
## Read who did what
|
|
35
37
|
|
|
36
38
|
Three operations read the record:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> The datanotes command and its options.
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
|
-
datanotes 3.
|
|
6
|
+
datanotes 3.1.0: Markdown notes as database tables, for you and your agents.
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Usage:
|
|
@@ -14,12 +14,14 @@ Usage:
|
|
|
14
14
|
datanotes store new-id --database <folder> a new database id (a copied folder gets its own store)
|
|
15
15
|
datanotes store backup --database <folder> show or set the store's git backup (--remote <url>, --off)
|
|
16
16
|
datanotes store restore --from <url> --database <folder> restore the store from its git backup
|
|
17
|
+
datanotes store convert-log --to <files|segments> --database <folder> rewrite the transaction log in that format
|
|
17
18
|
Every command takes --vault <folder> instead of --database for a vault holding the database.
|
|
18
19
|
datanotes mcp --database <folder> MCP server over stdio, on the engine running on the folder
|
|
19
20
|
(or one it starts for the session)
|
|
20
21
|
datanotes mcp --url <url> --token-file <f> MCP server over stdio, on an engine at an address
|
|
21
22
|
datanotes mcp serve [options] MCP server over Streamable HTTP at /mcp (each agent sends its token)
|
|
22
23
|
datanotes --version | --help
|
|
24
|
+
dnotes is a short name for datanotes: every command works under both names.
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
Options of serve:
|
|
@@ -49,6 +51,8 @@ Options of serve:
|
|
|
49
51
|
between two operations, then a push (or DATANOTES_STORE_BACKUP_INTERVAL_S;
|
|
50
52
|
default: the setting storeBackupIntervalSeconds, 60)
|
|
51
53
|
--log <file> append console output to a file
|
|
54
|
+
DATANOTES_INDEX_CHECK=1: check the engine's indexes against the vault
|
|
55
|
+
after every operation, and log any difference as an error (slow: debugging)
|
|
52
56
|
|
|
53
57
|
|
|
54
58
|
Options of status (the engine is found through the lock in its store, called with the owner's token):
|
|
@@ -79,7 +83,7 @@ commit and push, releases its lock and exits):
|
|
|
79
83
|
|
|
80
84
|
Options of store:
|
|
81
85
|
--database <folder> the database folder (or DATANOTES_DATABASE; --vault <folder> for a vault)
|
|
82
|
-
--json store path, store backup: the answer as JSON
|
|
86
|
+
--json store path, store backup, store convert-log: the answer as JSON
|
|
83
87
|
--remote <url> store backup: turn it on, pushing to this git repository (a first push now)
|
|
84
88
|
--ssh-command <cmd> store backup, with --remote: the store repository's core.sshCommand
|
|
85
89
|
(default: the vault repository's), e.g. C:/Windows/System32/OpenSSH/ssh.exe
|
|
@@ -90,7 +94,10 @@ Options of store:
|
|
|
90
94
|
--port <port> store restore: the HTTP port in the new settings (default 27150)
|
|
91
95
|
--force store restore: restore over a store that exists (kept aside, renamed)
|
|
92
96
|
--no-backup store restore: leave the store backup off in the new settings
|
|
93
|
-
|
|
97
|
+
--to <files|segments> store convert-log: segments (a few large files) or files (one per
|
|
98
|
+
version, what Datanotes 3.0 reads); sets transactionLogFormat
|
|
99
|
+
new-id, backup, restore and convert-log run only while no engine runs on the database, and
|
|
100
|
+
hold its store while they run: an engine started meanwhile refuses to start.
|
|
94
101
|
The data home holds one store per database: %LOCALAPPDATA%\Datanotes (Windows),
|
|
95
102
|
~/Library/Application Support/Datanotes (macOS), $XDG_DATA_HOME/datanotes or
|
|
96
103
|
~/.local/share/datanotes (Linux); DATANOTES_DATA_HOME moves it.
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
# Compatibility
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> How Datanotes numbers its versions, what counts as its public interface, and how to write clients that keep working.
|
|
4
4
|
|
|
5
|
-
Datanotes
|
|
5
|
+
Datanotes follows [semantic versioning](https://semver.org). The version number tells you what an update can change.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Versions
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
* **Major** (4.0.0): can change or remove parts of the public interface. The release notes list those changes first, with what to do.
|
|
10
|
+
* **Minor** (3.1.0): adds to the public interface without breaking what works.
|
|
11
|
+
* **Patch** (3.0.1): fixes bugs and changes nothing you rely on.
|
|
12
|
+
|
|
13
|
+
The [release notes](https://datanotes.dev/release-notes/) describe every version.
|
|
14
|
+
|
|
15
|
+
## The public interface
|
|
16
|
+
|
|
17
|
+
These parts of Datanotes follow the version rules:
|
|
10
18
|
|
|
11
19
|
* Operations, their arguments and their answer fields
|
|
12
20
|
* HTTP routes and headers
|
|
13
21
|
* Violation codes
|
|
14
|
-
*
|
|
22
|
+
* The commands the package installs (`datanotes` and `dnotes`), their options and their exit codes
|
|
15
23
|
* Environment variables and settings
|
|
16
24
|
* The words of `metastore.yaml`
|
|
17
25
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
For example, a program that calls `insert_row` with `table` and `values`, then reads `planned_creates`, works with every 3.x version. A later version can add an optional argument, a new answer field or a new operation, and the program doesn’t notice.
|
|
21
|
-
|
|
22
|
-
These cases fall outside the promise:
|
|
26
|
+
These cases fall outside them:
|
|
23
27
|
|
|
24
28
|
* **Security fixes**: a fix can change a behavior. The release notes say so.
|
|
25
29
|
* **Bugs**: Datanotes fixes behavior that contradicts the documentation.
|
|
@@ -27,6 +31,22 @@ These cases fall outside the promise:
|
|
|
27
31
|
* **Messages**: the text of refusals and hints can improve in any version.
|
|
28
32
|
* **Node.js versions**: support follows the Node.js long-term support releases.
|
|
29
33
|
|
|
34
|
+
## Downgrade to 3.0
|
|
35
|
+
|
|
36
|
+
From 3.1, the engine writes the transaction log in segments by default. Datanotes 3.0 can’t read segments, so convert the log before you downgrade:
|
|
37
|
+
|
|
38
|
+
1. Stop the engine.
|
|
39
|
+
|
|
40
|
+
2. Convert every table’s log to one file per version:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
datanotes store convert-log --to files --vault ~/notes
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
3. Install Datanotes 3.0 and start it.
|
|
47
|
+
|
|
48
|
+
The command also sets `transactionLogFormat` to `files`, so a 3.1 engine started on the store again keeps writing files. [How the engine writes the log](https://datanotes.dev/start/how-it-works/#how-the-engine-writes-the-log) describes both formats.
|
|
49
|
+
|
|
30
50
|
## Write tolerant clients
|
|
31
51
|
|
|
32
52
|
Answers can gain fields, and enums can gain values. Write your client to accept them:
|
|
@@ -56,8 +76,8 @@ const r = await db.call("insert_row", {
|
|
|
56
76
|
if (r.ok) console.log((r.value as Created).planned_creates);
|
|
57
77
|
```
|
|
58
78
|
|
|
59
|
-
## How
|
|
79
|
+
## How the tests check it
|
|
60
80
|
|
|
61
|
-
The repository keeps the
|
|
81
|
+
The repository keeps the public interface in `contract/datanotes-3.txt`. It has one line for every operation, argument, answer field, route, installed command, command option, environment variable, setting and violation code.
|
|
62
82
|
|
|
63
|
-
The test suite fails when a line goes or changes, so a
|
|
83
|
+
The test suite fails when a line goes or changes within a major version, so a breaking change cannot ship by accident. A second test checks every new name against the naming rules.
|
|
@@ -116,7 +116,7 @@ Examples: [Find notes by meaning](https://datanotes.dev/guides/search/semantic/)
|
|
|
116
116
|
|
|
117
117
|
Direct neighbours of notes: what they link to (`out`) and what links to them (`in`, backlinks), with counts per edge label. `direction`: out, in or both (default).
|
|
118
118
|
|
|
119
|
-
`from_nodes` selects the notes: `{"paths": [...]}
|
|
119
|
+
`from_nodes` selects the notes: `{"paths": [...]}`, `{"table": ..., "where": {...}}` and/or `{"tables": [...]}`: the rows of several tables, by name or pattern (`["*"]` every table, `["personal.*"]` a catalog’s). The whole vault’s graph in one call: `{"tables": ["*"]}` with direction `out` (at most 5000 start notes). Edges are labelled with their link column (`people`, `event`, …) or `link` for other links.
|
|
120
120
|
|
|
121
121
|
Examples: [Walk the link graph](https://datanotes.dev/guides/search/link-graph/).
|
|
122
122
|
|
|
@@ -130,7 +130,7 @@ Examples: [Walk the link graph](https://datanotes.dev/guides/search/link-graph/)
|
|
|
130
130
|
|
|
131
131
|
**Graph Traverse** · read-only
|
|
132
132
|
|
|
133
|
-
Breadth-first walk over links from `from_nodes` (`{"paths": [...]}
|
|
133
|
+
Breadth-first walk over links from `from_nodes` (`{"paths": [...]}`, `{"table", "where"}` and/or `{"tables": [...]}`).
|
|
134
134
|
|
|
135
135
|
* `direction`: out (default, follow links), in (follow backlinks) or both.
|
|
136
136
|
* `edges`: edge labels to follow (link columns such as `people`, `event`, or `link`).
|
|
@@ -156,7 +156,7 @@ Examples: [Walk the link graph](https://datanotes.dev/guides/search/link-graph/)
|
|
|
156
156
|
|
|
157
157
|
**Graph Path** · read-only
|
|
158
158
|
|
|
159
|
-
Shortest chain of links between two sets of notes (each `{"paths": [...]}
|
|
159
|
+
Shortest chain of links between two sets of notes (each `{"paths": [...]}`, `{"table", "where"}` and/or `{"tables": [...]}`): `found`, `length` and `path`: the steps (`from`, `label`, `direction`, `to`). `direction` both by default; `max_depth` default 6 (max 10).
|
|
160
160
|
|
|
161
161
|
Examples: [Walk the link graph](https://datanotes.dev/guides/search/link-graph/).
|
|
162
162
|
|