datanotes 3.1.0 → 3.3.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 (72) hide show
  1. package/README.md +1 -0
  2. package/SECURITY.md +12 -0
  3. package/dist/api/client.d.cts +2 -0
  4. package/dist/api/client.d.ts +2 -0
  5. package/dist/api/docs.d.cts +14 -4
  6. package/dist/api/docs.d.ts +14 -4
  7. package/dist/api/extension-files.d.cts +23 -0
  8. package/dist/api/extension-files.d.ts +23 -0
  9. package/dist/api/extension-host.d.cts +108 -0
  10. package/dist/api/extension-host.d.ts +108 -0
  11. package/dist/api/extension-manifest.d.cts +154 -0
  12. package/dist/api/extension-manifest.d.ts +154 -0
  13. package/dist/api/extension-plan.d.cts +174 -0
  14. package/dist/api/extension-plan.d.ts +174 -0
  15. package/dist/api/extension-record.d.cts +65 -0
  16. package/dist/api/extension-record.d.ts +65 -0
  17. package/dist/api/extension-sdk.d.cts +65 -0
  18. package/dist/api/extension-sdk.d.ts +65 -0
  19. package/dist/api/extensions.cjs +18472 -0
  20. package/dist/api/extensions.d.cts +11 -0
  21. package/dist/api/extensions.d.ts +11 -0
  22. package/dist/api/extensions.js +18409 -0
  23. package/dist/api/index.cjs +675 -503
  24. package/dist/api/index.js +675 -503
  25. package/dist/api/mcp.cjs +203 -13
  26. package/dist/api/mcp.js +203 -13
  27. package/dist/datanotes.cjs +7903 -4667
  28. package/dist/docs/administration/extensions.md +213 -0
  29. package/dist/docs/api/operations/add_column.md +1 -0
  30. package/dist/docs/api/operations/add_constraint.md +2 -0
  31. package/dist/docs/api/operations/alter_column.md +1 -1
  32. package/dist/docs/api/operations/alter_table.md +3 -2
  33. package/dist/docs/api/operations/check_table.md +1 -1
  34. package/dist/docs/api/operations/create_table.md +3 -1
  35. package/dist/docs/api/operations/describe_table.md +1 -1
  36. package/dist/docs/api/operations/extensions_delete.md +29 -0
  37. package/dist/docs/api/operations/extensions_list.md +20 -0
  38. package/dist/docs/api/operations/extensions_record.md +44 -0
  39. package/dist/docs/api/operations/insert_row.md +2 -2
  40. package/dist/docs/api/operations/tags/extensions.md +9 -0
  41. package/dist/docs/api/operations/tags/rows-dml.md +1 -1
  42. package/dist/docs/api.md +10 -2
  43. package/dist/docs/develop/write-an-extension.md +369 -0
  44. package/dist/docs/guides/data-quality/check-constraints.md +14 -13
  45. package/dist/docs/guides/data-quality/hand-edits.md +10 -10
  46. package/dist/docs/guides/database-objects/bases.md +11 -11
  47. package/dist/docs/guides/database-objects/catalogs-and-schemas.md +16 -10
  48. package/dist/docs/guides/database-objects/columns.md +38 -38
  49. package/dist/docs/guides/database-objects/relations.md +173 -36
  50. package/dist/docs/guides/database-objects/tables.md +80 -35
  51. package/dist/docs/guides/database-objects/views.md +44 -44
  52. package/dist/docs/guides/history/change-data-feed.md +34 -34
  53. package/dist/docs/guides/history/journal-and-undo.md +12 -12
  54. package/dist/docs/guides/history/restore.md +20 -20
  55. package/dist/docs/guides/history/table-history.md +31 -31
  56. package/dist/docs/guides/read-and-write/automatic-links.md +15 -15
  57. package/dist/docs/guides/read-and-write/import-notes.md +21 -21
  58. package/dist/docs/guides/read-and-write/joins-and-aggregates.md +7 -7
  59. package/dist/docs/guides/read-and-write/read-and-filter.md +10 -10
  60. package/dist/docs/guides/read-and-write/write-rows.md +10 -10
  61. package/dist/docs/guides/search/text.md +1 -1
  62. package/dist/docs/guides/security/security-model.md +12 -0
  63. package/dist/docs/reference/cli.md +32 -1
  64. package/dist/docs/reference/errors.md +1 -1
  65. package/dist/docs/reference/glossary.md +8 -0
  66. package/dist/docs/reference/operations/auxiliary.md +2 -2
  67. package/dist/docs/reference/operations/rows.md +1 -1
  68. package/dist/docs/reference/operations/schema.md +15 -11
  69. package/dist/docs/reference/operations.md +28 -28
  70. package/dist/docs/release-notes.md +57 -0
  71. package/dist/docs/start/connect-agents.md +11 -0
  72. package/package.json +11 -1
@@ -98,7 +98,7 @@ Answer:
98
98
  "files_created": 1,
99
99
  "planned_creates": ["datanotes/main/public/film/Charade.md"],
100
100
  "commits": [{ "table": "main.public.film", "version": 2, "operation": "WRITE" }],
101
- "migration_id": "20261014T191527-insert_row-insert-into-film-2",
101
+ "migration_id": "20261020T173837-insert_row-insert-into-film-2",
102
102
  "links_added": [
103
103
  {
104
104
  "path": "datanotes/main/public/film/Charade.md",
@@ -127,7 +127,7 @@ Answer:
127
127
  ```markdown
128
128
  ---
129
129
  table: main.public.film
130
- id: 01a13bd7-4a17-7131-b737-fb23d7e81b2b
130
+ id: 01a15a64-cc30-746d-8d56-2e96073a7f92
131
131
  title: Charade
132
132
  year: 1963
133
133
  ---
@@ -169,7 +169,7 @@ Answer:
169
169
  }
170
170
  ],
171
171
  "commits": [{ "table": "main.public.film", "version": 3, "operation": "UPDATE" }],
172
- "migration_id": "20261014T191527-update_row-update-film",
172
+ "migration_id": "20261020T173837-update_row-update-film",
173
173
  "links_added": [
174
174
  {
175
175
  "path": "datanotes/main/public/film/Charade.md",
@@ -186,7 +186,7 @@ Answer:
186
186
  ```markdown
187
187
  ---
188
188
  table: main.public.film
189
- id: 01a13bd7-4a17-7131-b737-fb23d7e81b2b
189
+ id: 01a15a64-cc30-746d-8d56-2e96073a7f92
190
190
  title: Charade
191
191
  year: 1963
192
192
  ---
@@ -229,7 +229,7 @@ Answer:
229
229
  }
230
230
  ],
231
231
  "commits": [{ "table": "main.public.film", "version": 4, "operation": "UPDATE" }],
232
- "migration_id": "20261014T191527-update_row-update-film-2",
232
+ "migration_id": "20261020T173837-update_row-update-film-2",
233
233
  "links_added": [
234
234
  {
235
235
  "path": "datanotes/main/public/film/Notorious.md",
@@ -287,7 +287,7 @@ Answer:
287
287
  }
288
288
  ],
289
289
  "commits": [{ "table": "main.public.film", "version": 5, "operation": "UPDATE" }],
290
- "migration_id": "20261014T191527-update_row-update-film-3",
290
+ "migration_id": "20261020T173837-update_row-update-film-3",
291
291
  "links_added": [
292
292
  {
293
293
  "path": "datanotes/main/public/film/Notorious.md",
@@ -310,7 +310,7 @@ Answer:
310
310
  ```markdown
311
311
  ---
312
312
  table: main.public.film
313
- id: 01a13bd7-4a11-7df7-bc89-ce5f25be27d3
313
+ id: 01a15a64-cc27-7889-830d-3f2630d43bc6
314
314
  title: Notorious
315
315
  year: 1946
316
316
  ---
@@ -373,7 +373,7 @@ Answer:
373
373
  "files_created": 1,
374
374
  "planned_creates": ["datanotes/main/public/film/Persona.md"],
375
375
  "commits": [{ "table": "main.public.film", "version": 6, "operation": "WRITE" }],
376
- "migration_id": "20261014T191527-insert_row-insert-into-film-3",
376
+ "migration_id": "20261020T173837-insert_row-insert-into-film-3",
377
377
  "links_added": [
378
378
  {
379
379
  "path": "datanotes/main/public/film/Persona.md",
@@ -390,7 +390,7 @@ Answer:
390
390
  ```markdown
391
391
  ---
392
392
  table: main.public.film
393
- id: 01a13bd7-4a3b-797e-b0a9-020b91e12ca1
393
+ id: 01a15a64-cc67-77ea-a705-b2b8b3274155
394
394
  title: Persona
395
395
  year: 1966
396
396
  ---
@@ -472,7 +472,7 @@ Answer:
472
472
  }
473
473
  ],
474
474
  "commits": [{ "table": "main.public.film", "version": 7, "operation": "UPDATE" }],
475
- "migration_id": "20261014T191527-update_row-update-film-4",
475
+ "migration_id": "20261020T173837-update_row-update-film-4",
476
476
  "links_added": [
477
477
  {
478
478
  "path": "datanotes/main/public/film/Persona.md",
@@ -489,7 +489,7 @@ Answer:
489
489
  ```markdown
490
490
  ---
491
491
  table: main.public.film
492
- id: 01a13bd7-4a3b-797e-b0a9-020b91e12ca1
492
+ id: 01a15a64-cc67-77ea-a705-b2b8b3274155
493
493
  title: Persona
494
494
  year: 1966
495
495
  ---
@@ -505,7 +505,7 @@ We watched it at [[2026-10-09T2100|Swedish night]].
505
505
 
506
506
  ```yaml
507
507
  # Metastore (Datanotes): catalogs, schemas, tables, columns, views.
508
- id: 01a13bd7-4553-7877-bbf1-25ceb6bb6d1a
508
+ id: 01a15a64-cbfe-7566-a13b-1628b83a1a00
509
509
  config:
510
510
  history: true
511
511
 
@@ -620,7 +620,7 @@ Answer:
620
620
  "files_created": 1,
621
621
  "planned_creates": ["datanotes/main/public/film/His Girl Friday.md"],
622
622
  "commits": [{ "table": "main.public.film", "version": 8, "operation": "WRITE" }],
623
- "migration_id": "20261014T191527-insert_row-insert-into-film-4"
623
+ "migration_id": "20261020T173837-insert_row-insert-into-film-4"
624
624
  }
625
625
  ```
626
626
 
@@ -629,7 +629,7 @@ Answer:
629
629
  ```markdown
630
630
  ---
631
631
  table: main.public.film
632
- id: 01a13bd7-4a5d-79ee-b163-e15d61052c55
632
+ id: 01a15a64-cc94-72c6-a7d7-7f669c1d1869
633
633
  title: His Girl Friday
634
634
  year: 1940
635
635
  ---
@@ -663,7 +663,7 @@ Answer:
663
663
 
664
664
  ```yaml
665
665
  # Metastore (Datanotes): catalogs, schemas, tables, columns, views.
666
- id: 01a13bd7-4553-7877-bbf1-25ceb6bb6d1a
666
+ id: 01a15a64-cbfe-7566-a13b-1628b83a1a00
667
667
  config:
668
668
  history: true
669
669
  autolink: false
@@ -236,7 +236,7 @@ Refused:
236
236
 
237
237
  ```text
238
238
  pass "time_column" or "filename" (e.g. "{name}") so rows get file names
239
- Hint: Check the arguments of create_table: name (string, required), description (string), columns (list of objects, required), catalog (string), schema (string), time_column (string), filename (string), partition (string), exclude (list of strings), archive (string), aliases (list of strings), history (boolean), autolink_target (boolean), row_template (string), fields (object), tags (object), dry_run (boolean).
239
+ Hint: Check the arguments of create_table: name (string, required), description (string), columns (list of objects, required), catalog (string), schema (string), time_column (string), filename (string), partition (string), exclude (list of strings), archive (string), aliases (list of strings), history (boolean), autolink_target (boolean), row_template (string), instructions (string), fields (object), tags (object), dry_run (boolean).
240
240
  Docs: https://datanotes.dev/reference/operations/schema.md#create_table (offline: read_docs("reference/operations/schema#create_table"))
241
241
  ```
242
242
 
@@ -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": "20261014T191527-create_table-create-table-main-public-film"
317
+ "migration_id": "20261020T173838-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": "01a13bd7-4bef-7ddf-abde-b91b57090495",
362
+ "id": "01a15a64-ce9f-7560-9add-1459237106c3",
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": "01a13bd7-4bef-7b33-bb40-437e95d29b11",
372
+ "id": "01a15a64-ce9f-7172-abbb-020e612ede56",
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": "01a13bd7-4bef-78c0-9fae-baa5a384034b",
382
+ "id": "01a15a64-ce9f-7b50-990c-aa26f69b3ab6",
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": "01a13bd7-4bef-7530-9686-caa5dae75ba9",
392
+ "id": "01a15a64-ce9f-7541-8429-fc436df30866",
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": "01a13bd7-4bf0-76d1-acad-286dc20353ec",
402
+ "id": "01a15a64-ce9f-7cf2-8129-a75fb2745cc9",
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": "01a13bd7-4bf3-7078-b24f-c1aacdc10722",
461
+ "id": "01a15a64-cea3-7bf1-ada5-aeb2d9dbb4fd",
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": "01a13bd7-4bf3-72be-9f3c-6af5c1e45507",
471
+ "id": "01a15a64-cea3-777e-b51d-cfb871067faf",
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": "01a13bd7-4bf3-7a1e-b23c-2769c0dc41d3",
481
+ "id": "01a15a64-cea3-776e-b81b-389706767aa1",
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": "01a13bd7-4bf3-7289-b3dd-65839150b89a",
491
+ "id": "01a15a64-cea3-7299-a73b-bb2b9eec0177",
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": "01a13bd7-4bf3-7795-afda-7207d19732fb",
501
+ "id": "01a15a64-cea4-7624-b9be-0e6c6aeb6dfc",
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": "20261014T191527-adopt_rows-adopt-5-notes-into-film"
522
+ "migration_id": "20261020T173838-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: 01a13bd7-4bf3-7078-b24f-c1aacdc10722
539
+ id: 01a15a64-cea3-7bf1-ada5-aeb2d9dbb4fd
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": "20261014T191527-insert_row-insert-into-film"
626
+ "migration_id": "20261020T173838-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": "20261014T191529-add_column-add-column-added_by-to-film"
658
+ "migration_id": "20261020T173839-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": "20261014T191529-insert_row-insert-into-film"
686
+ "migration_id": "20261020T173839-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: 01a13bd7-51ec-7ccf-ace8-a87f2b6b5d44
695
+ id: 01a15a64-d4a9-7905-af13-90c8506569c9
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: 01a13bd7-547d-7d1d-93ff-6eb23257eec6
737
+ id: 01a15a64-d731-7eff-804e-4148716ec5c3
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": "20261014T191531-alter_table-alter-table-main-public-film"
765
+ "migration_id": "20261020T173842-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: 01a13bd7-4bd8-7523-b02d-c287216ddcdf
828
+ id: 01a15a64-ce85-731f-bfea-eb573328eb39
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-09", "viewings": 1 },
104
- { "date(occurred_at)": "2026-10-12", "viewings": 1 },
105
- { "date(occurred_at)": "2026-10-13", "viewings": 1 }
103
+ { "date(occurred_at)": "2026-10-15", "viewings": 1 },
104
+ { "date(occurred_at)": "2026-10-18", "viewings": 1 },
105
+ { "date(occurred_at)": "2026-10-19", "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-13",
141
+ "watched_on": "2026-10-19",
142
142
  "viewing": [
143
143
  {
144
- "path": "datanotes/main/public/watch/2026-10-13T2200.md",
144
+ "path": "datanotes/main/public/watch/2026-10-19T2200.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-12",
153
+ "watched_on": "2026-10-18",
154
154
  "viewing": [
155
155
  {
156
- "path": "datanotes/main/public/watch/2026-10-12T2030.md",
156
+ "path": "datanotes/main/public/watch/2026-10-18T2030.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-09T2115.md",
335
+ "path": "datanotes/main/public/watch/2026-10-15T2115.md",
336
336
  "film": "[[Charade]]",
337
- "occurred_at": "2026-10-09T21:15",
337
+ "occurred_at": "2026-10-15T21:15",
338
338
  "where": "home",
339
339
  "place": "my living room"
340
340
  },
341
341
  {
342
- "path": "datanotes/main/public/watch/2026-10-12T2030.md",
342
+ "path": "datanotes/main/public/watch/2026-10-18T2030.md",
343
343
  "film": "[[The Gold Rush]]",
344
- "occurred_at": "2026-10-12T20:30",
344
+ "occurred_at": "2026-10-18T20:30",
345
345
  "where": "home",
346
346
  "place": "my living room"
347
347
  },
348
348
  {
349
- "path": "datanotes/main/public/watch/2026-10-13T2200.md",
349
+ "path": "datanotes/main/public/watch/2026-10-19T2200.md",
350
350
  "film": "[[Night of the Living Dead]]",
351
- "occurred_at": "2026-10-13T22:00",
351
+ "occurred_at": "2026-10-19T22: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-09T2115.md",
463
- "occurred_at": "2026-10-09T21:15"
462
+ "path": "datanotes/main/public/watch/2026-10-15T2115.md",
463
+ "occurred_at": "2026-10-15T21:15"
464
464
  },
465
465
  {
466
- "path": "datanotes/main/public/watch/2026-10-05T2130.md",
467
- "occurred_at": "2026-10-05T21:30"
466
+ "path": "datanotes/main/public/watch/2026-10-11T2130.md",
467
+ "occurred_at": "2026-10-11T21: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": "20261014T191515-insert_row-insert-into-film"
34
+ "migration_id": "20261020T173828-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: 01a13bd7-1a3c-77a0-9b04-bdbf908dd17f
43
+ id: 01a15a64-a8b5-7df3-aef8-9d133af2ff28
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": "20261014T191521-update_row-update-film"
106
+ "migration_id": "20261020T173832-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": "20261014T191521-update_row-update-film-3",
177
+ "migration_id": "20261020T173833-update_row-update-film-2",
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: 01a13bd7-321a-76c1-9810-fe730dc54990
196
+ id: 01a15a64-b97e-7825-b690-1c0bdc44583e
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": "20261014T191521-update_row-update-film-4"
249
+ "migration_id": "20261020T173833-update_row-update-film-3"
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": "20261014T191521-update_rows-update-film"
335
+ "migration_id": "20261020T173833-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": "20261014T191521-merge_rows-merge-2-rows-into-film"
373
+ "migration_id": "20261020T173833-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": "20261014T191521-delete_rows-archive-1-rows-of-film"
434
+ "migration_id": "20261020T173833-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": "20261014T191521-move_rows-move-4-rows-from-film-to-watch"
571
+ "migration_id": "20261020T173833-move_rows-move-4-rows-from-film-to-watch"
572
572
  }
573
573
  ```
@@ -87,7 +87,7 @@ Answer (62 lines)
87
87
  {
88
88
  "start": 81,
89
89
  "end": 86,
90
- "context": "-afa4-921743d3b309\nname: Cary Grant\n---\n\n"
90
+ "context": "-ad6c-b8dee1b7285e\nname: Cary Grant\n---\n\n"
91
91
  }
92
92
  ]
93
93
  },
@@ -67,6 +67,18 @@ The owner creates a named token with `POST /datanotes/tokens/create/`, and the e
67
67
 
68
68
  A named token can’t create webhooks, manage tokens or read the engine’s status, and without `maintain` it can’t undo.
69
69
 
70
+ ### Extensions
71
+
72
+ An extension adds tables and Model Context Protocol (MCP) tools from a git repository. Its code is trusted code that runs inside the MCP server’s process, not in a sandbox. Install only extensions you trust, and read the plan first.
73
+
74
+ * **Pinned code**: the installer takes a version tag or a full commit id, and refuses a branch. It fetches the tag itself, even when a branch has the same name. It records the commit and the SHA-256 hashes of the manifest and the entry file. The server refuses cached code that differs.
75
+ * **No install scripts**: the installer runs no script, no build and no `npm install`. The entry file may import only Node built-ins. The installer reads the imports in the file. Code that builds a module name at run time escapes this check.
76
+ * **One token for each extension**: `ext-<name>` writes only the tables the manifest lists. It cannot change the schema or undo. The installer changes the schema with the owner’s token, after you confirm the plan.
77
+ * **An invoker check**: before a tool that writes runs, the server checks the calling agent’s token. That token must be able to write the tool’s tables. A read-only client cannot write through an extension.
78
+ * **The secret stays on one machine**: the token file sits under the data home with mode 0600. The registry in the engine’s store holds no secret.
79
+
80
+ Known limits: extension code is not isolated from the MCP server’s process. Its token reads every table until read patterns ship. Migrations are declarative and run no code. [Install extensions](https://datanotes.dev/administration/extensions/) has the details.
81
+
70
82
  ### Who made each write
71
83
 
72
84
  The engine journals every write with its actor. The client sends the agent’s name, model and session, so they’re self-reported. The server sets the credential, `auth` (`owner`, or the named token’s name), and no client can claim another one.
@@ -3,7 +3,7 @@
3
3
  > The datanotes command and its options.
4
4
 
5
5
  ```text
6
- datanotes 3.1.0: Markdown notes as database tables, for you and your agents.
6
+ datanotes 3.3.0: Markdown notes as database tables, for you and your agents.
7
7
 
8
8
 
9
9
  Usage:
@@ -15,6 +15,11 @@ Usage:
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
17
  datanotes store convert-log --to <files|segments> --database <folder> rewrite the transaction log in that format
18
+ datanotes extension install <source> --database <folder> install an extension: plan, confirm, write
19
+ (a git URL with #<tag>, owner/repo@<tag>, or a folder)
20
+ datanotes extension update | rollback | remove <name> --database <folder> change an installed one
21
+ datanotes extension list --database <folder> the installed extensions
22
+ datanotes extension check <folder> check an extension's repository (for its authors)
18
23
  Every command takes --vault <folder> instead of --database for a vault holding the database.
19
24
  datanotes mcp --database <folder> MCP server over stdio, on the engine running on the folder
20
25
  (or one it starts for the session)
@@ -103,6 +108,27 @@ Options of store:
103
108
  ~/.local/share/datanotes (Linux); DATANOTES_DATA_HOME moves it.
104
109
 
105
110
 
111
+ Options of extension (every command but check works through the engine running on the database):
112
+ --database <folder> the database folder (or DATANOTES_DATABASE; --vault <folder> for a vault)
113
+ --store <folder> the engine's store, when serve was given one (or DATANOTES_STORE)
114
+ --settings <file> settings file with the owner's token (or DATANOTES_SETTINGS;
115
+ default settings.json in the store)
116
+ --url <url> an engine at an address (or DATANOTES_URL), with
117
+ --token-file <file> a file holding the owner's token (or DATANOTES_TOKEN_FILE)
118
+ --map <list> install, update: role=catalog.schema.table or role.column=column
119
+ --create <roles> install, update: create these tables the extension depends on
120
+ --add <list> install, update: add these role.column columns to matched tables
121
+ --catalog <name> install: the catalog of the tables and views it creates
122
+ --schema <name> install: the schema of the tables and views it creates
123
+ --to <ref> update: the version tag or commit to move to (default: the newest tag)
124
+ --from <source> update: another source, such as the folder you develop in
125
+ --dry-run install, update: print the plan and write nothing
126
+ --yes write without asking (only once the user approved the plan)
127
+ --json print one JSON object (the plan or the result) and never ask
128
+ Lists (--map, --create, --add) are comma-separated. Exit codes: 0 done; 1 error; 2 the plan has
129
+ problems (nothing written); 3 confirmation needed (run again with --yes once the user approved)
130
+
131
+
106
132
  Options of mcp (stdio):
107
133
  --database <folder> the database folder (or DATANOTES_DATABASE); acts with the owner's token,
108
134
  and stops the engine it started when the client closes
@@ -128,6 +154,11 @@ Tools of mcp (both modes; default: every tool except create_webhook and delete_w
128
154
  (or DATANOTES_MCP_OWNER_TOOLS=1)
129
155
 
130
156
 
157
+ Extensions of mcp (both modes): the tools of the extensions installed in the database (datanotes
158
+ extension install) come after the engine's tools; --profile read keeps only their read-only tools
159
+ --no-extensions offer no extension tools (or DATANOTES_MCP_EXTENSIONS=0)
160
+
161
+
131
162
  Logs of mcp (both modes):
132
163
  --otlp-endpoint <url> export logs over OTLP/HTTP, e.g. http://127.0.0.1:4318 (or the standard
133
164
  OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, OTEL_SERVICE_NAME)
@@ -67,6 +67,6 @@ A write the engine refuses lists its violations, each with a `code`; `check_tabl
67
67
  | `unknown_column` | Write only the table’s columns: describe_table lists them. To keep a new front matter key, add_column first. | [Describe a table before writing to it](https://datanotes.dev/guides/database-objects/tables/#describe-a-table-before-writing-to-it) |
68
68
  | `check` | The row breaks a CHECK constraint of the table (named in the message, with its rule): change the values so the rule holds. describe_table lists the table’s constraints. | [Enforce rules with CHECK constraints](https://datanotes.dev/guides/data-quality/check-constraints/#enforce-rules-with-check-constraints) |
69
69
  | `generated` | A generated column is computed by the engine: do not write it; recompute_columns sets it again. | [Recompute generated columns after a hand edit](https://datanotes.dev/guides/data-quality/hand-edits/#recompute-generated-columns-after-a-hand-edit) |
70
- | `cycle` | A row cannot be its own ancestor: point the hierarchy column to a row that is not below this one. | [Build a tree of rows with a parent link](https://datanotes.dev/guides/database-objects/relations/#build-a-tree-of-rows-with-a-parent-link) |
70
+ | `cycle` | A row cannot be its own ancestor in a hierarchy column, nor depend on itself through an acyclic column: the message shows the path. Point the column to a row that is not on that path. | [Build a tree of rows with a parent link](https://datanotes.dev/guides/database-objects/relations/#build-a-tree-of-rows-with-a-parent-link) |
71
71
  | `inverse` | Both sides of a two-way link must agree: write one side, or run align_relations to repair them. | [Repair two-way links with `align_relations`](https://datanotes.dev/guides/database-objects/relations/#repair-two-way-links-with-align_relations) |
72
72
  | `unreadable` | The note’s front matter is not valid YAML (the message quotes the parser), so every read leaves the row out: open the note and fix the YAML, such as a quote or bracket left open or a line without `key: value`. read_note shows its text. | [Find rows whose front matter can’t be read](https://datanotes.dev/guides/data-quality/hand-edits/#find-rows-whose-front-matter-cant-be-read) |
@@ -64,6 +64,10 @@ A UUID at the top of `metastore.yaml`, as `id`, that names the database. The eng
64
64
 
65
65
  The process that runs a vault as a database, `datanotes serve`. It checks and journals every write and serves the HTTP API. See [Run the engine as a service](https://datanotes.dev/administration/run-the-service/).
66
66
 
67
+ ## Extension
68
+
69
+ A git repository that adds tables, views, bases, MCP tools and docs to a database. `datanotes extension install` pins and installs it. See [Install extensions](https://datanotes.dev/administration/extensions/).
70
+
67
71
  ## Front matter
68
72
 
69
73
  The YAML block at the top of a note, between two `---` lines. Each key of a row’s front matter holds the value of one column. See [How it works](https://datanotes.dev/start/how-it-works/).
@@ -112,6 +116,10 @@ A call the engine runs, such as `create_table`, `insert_row` or `select_rows`. E
112
116
 
113
117
  The token that can do everything, generated at the engine’s first start and kept in its settings file. See [Tokens and permissions](https://datanotes.dev/guides/security/tokens/).
114
118
 
119
+ ## Role (extension)
120
+
121
+ The short name an extension’s manifest gives a table, such as `book`. The installer binds each role to a table of your database. See [Declare the tables](https://datanotes.dev/develop/write-an-extension/#declare-the-tables).
122
+
115
123
  ## Row
116
124
 
117
125
  A note whose front matter key `table` names a table, wherever it lives in the vault. Its front matter keys are the row’s columns. Each row has an `id` that never changes. See [Tables](https://datanotes.dev/guides/database-objects/tables/).
@@ -20,7 +20,7 @@ Examples: [Tables](https://datanotes.dev/guides/database-objects/tables/), [View
20
20
 
21
21
  **Describe Table** · read-only
22
22
 
23
- Describe a table (`catalog.schema.table` or a shorter unambiguous name): `qualified`, `name`, `catalog`, `schema`, `description`, `aliases`, `layout` (`folder`, `row_folder`: the folder pattern of new rows, `archive`), `options` (`partition`, `filename`, `archive`, `exclude`), typed `columns` with label/aliases/description and the dense flag, `untyped_fields`, `row_count`, and when set: `tags`, `bases` (the bases it inherits from, in order), `constraints` (its CHECKs, name → where), `row_template`, `history`, `autolink_target`, `fields` (their values).
23
+ Describe a table (`catalog.schema.table` or a shorter unambiguous name): `qualified`, `name`, `catalog`, `schema`, `description`, `aliases`, `layout` (`folder`, `row_folder`: the folder pattern of new rows, `archive`), `options` (`partition`, `filename`, `archive`, `exclude`), typed `columns` with label/aliases/description and the dense flag, `untyped_fields`, `row_count`, and when set: `tags`, `bases` (the bases it inherits from, in order), `constraints` (its CHECKs, name → where), `constraint_hints` (their own hints, name → hint), `instructions` (how to fill a row: follow them before you write one), `row_template`, `history`, `autolink_target`, `fields` (their values).
24
24
 
25
25
  Before adding a column (e.g. a new metric), read `columns` and match your concept against `name`, `label`, `aliases` and `description`; reuse an existing column when it means the same.
26
26
 
@@ -66,7 +66,7 @@ Examples: [Catalogs, schemas and the database](https://datanotes.dev/guides/data
66
66
 
67
67
  **Check Table** · read-only
68
68
 
69
- Validate every row against the table (required, types, ranges, enums, links, unknown columns, CHECK constraints, those that follow links included, filtered link targets (ref_where / ref_by), stale generated/identity values, missing inverse links, front matter that cannot be read: code `unreadable`, with no column, for a note whose `table` line names the table but whose YAML is broken, which every other read leaves out). A CHECK violation has code `check` and the CHECK’s name as `constraint` (every other code names its `column`), as in the `violations` of list_changes. Use it to find rows edited by hand that break the schema. Without `table`, every table is checked: each row then names its `table`, `tables_checked` counts the tables checked, and a table that cannot be checked is listed in `errors` ({table, error}) while the others are. The rows with violations are paged: `limit` (default 500, at most 5000) from `offset`; `total` counts them all. (Hand edits are also checked as they happen: see `violations` in list_changes.)
69
+ Validate every row against the table (required, types, ranges, enums, links, unknown columns, CHECK constraints, those that follow links included, filtered link targets (ref_where / ref_by), stale generated/identity values, missing inverse links, cycles of hierarchy and acyclic columns, front matter that cannot be read: code `unreadable`, with no column, for a note whose `table` line names the table but whose YAML is broken, which every other read leaves out). A CHECK violation has code `check` and the CHECK’s name as `constraint` (every other code names its `column`), as in the `violations` of list_changes. Use it to find rows edited by hand that break the schema. Without `table`, every table is checked: each row then names its `table`, `tables_checked` counts the tables checked, and a table that cannot be checked is listed in `errors` ({table, error}) while the others are. The rows with violations are paged: `limit` (default 500, at most 5000) from `offset`; `total` counts them all. (Hand edits are also checked as they happen: see `violations` in list_changes.)
70
70
 
71
71
  Examples: [Relations and hierarchies](https://datanotes.dev/guides/database-objects/relations/), [Hand edits](https://datanotes.dev/guides/data-quality/hand-edits/), [Find rows that break the schema](https://datanotes.dev/guides/data-quality/check-table/).
72
72