datanotes 3.4.2 → 3.5.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 -1
- package/dist/api/extensions.cjs +1088 -5
- package/dist/api/extensions.js +1088 -5
- package/dist/api/index.cjs +1088 -5
- package/dist/api/index.js +1088 -5
- package/dist/api/mcp.cjs +1088 -5
- package/dist/api/mcp.js +1088 -5
- package/dist/datanotes.cjs +4408 -1618
- package/dist/docs/administration/git-sync.md +17 -0
- package/dist/docs/administration/limits.md +29 -0
- package/dist/docs/administration/use-with-obsidian.md +12 -0
- package/dist/docs/api/operations/alter_table.md +6 -1
- package/dist/docs/api/operations/create_table.md +5 -0
- package/dist/docs/api/operations/describe_table.md +1 -1
- package/dist/docs/api/operations/pack_rows.md +45 -0
- package/dist/docs/api/operations/tags/auxiliary.md +2 -0
- package/dist/docs/api/operations/unpack_rows.md +40 -0
- package/dist/docs/api.md +3 -1
- 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 +41 -41
- package/dist/docs/guides/database-objects/packs.md +563 -0
- package/dist/docs/guides/database-objects/relations.md +28 -28
- package/dist/docs/guides/database-objects/tables.md +28 -28
- package/dist/docs/guides/database-objects/views.md +44 -44
- 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/read-and-write/automatic-links.md +15 -15
- package/dist/docs/guides/read-and-write/import-notes.md +21 -21
- 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/text.md +1 -1
- package/dist/docs/reference/cli.md +3 -1
- package/dist/docs/reference/operations/auxiliary.md +30 -1
- package/dist/docs/reference/operations/queries.md +1 -1
- package/dist/docs/reference/operations/rows.md +3 -3
- package/dist/docs/reference/operations/schema.md +8 -4
- package/dist/docs/reference/operations.md +55 -53
- package/dist/docs/reference/settings.md +1 -0
- package/dist/docs/release-notes.md +29 -0
- package/package.json +1 -1
package/dist/api/index.js
CHANGED
|
@@ -330,7 +330,7 @@ var OPERATIONS = [
|
|
|
330
330
|
},
|
|
331
331
|
{
|
|
332
332
|
"name": "describe_table",
|
|
333
|
-
"description": "Describe a table (`catalog.schema.table` or a shorter unambiguous name): `qualified`, `name`,\n`catalog`, `schema`, `description`, `aliases`, `layout` (`folder`, `row_folder`: the folder pattern\nof new rows, `archive`), `options` (`partition`, `filename`, `archive`, `exclude`), typed `columns`\nwith label/aliases/description and the dense flag, `untyped_fields`, `row_count`, and when set:\n`tags`, `bases` (the bases it inherits from, in order), `constraints` (its CHECKs, name \u2192 where), `constraint_hints` (their own hints, name \u2192 hint), `instructions` (how to fill a row: follow them before you write one), `row_template`, `history`,\n`autolink_target`, `fields` (their values).\n\nBefore adding a column (e.g. a new metric), read `columns` and match your concept against\n`name`, `label`, `aliases` and `description`; reuse an existing column when it means the same.\n\n`missing_descriptions` (`{table, columns}`), present only when something has no description (a table\ndefined before descriptions were required), names what lacks one: write them with alter_table\n`description` and alter_column `changes.description`, asking the user when the meaning is unclear.",
|
|
333
|
+
"description": "Describe a table (`catalog.schema.table` or a shorter unambiguous name): `qualified`, `name`,\n`catalog`, `schema`, `description`, `aliases`, `layout` (`folder`, `row_folder`: the folder pattern\nof new rows, `archive`), `options` (`partition`, `filename`, `archive`, `exclude`, `pack`, `pack_after_days`), typed `columns`\nwith label/aliases/description and the dense flag, `untyped_fields`, `row_count`, and when set:\n`tags`, `bases` (the bases it inherits from, in order), `constraints` (its CHECKs, name \u2192 where), `constraint_hints` (their own hints, name \u2192 hint), `instructions` (how to fill a row: follow them before you write one), `row_template`, `history`,\n`autolink_target`, `fields` (their values).\n\nBefore adding a column (e.g. a new metric), read `columns` and match your concept against\n`name`, `label`, `aliases` and `description`; reuse an existing column when it means the same.\n\n`missing_descriptions` (`{table, columns}`), present only when something has no description (a table\ndefined before descriptions were required), names what lacks one: write them with alter_table\n`description` and alter_column `changes.description`, asking the user when the meaning is unclear.",
|
|
334
334
|
"inputSchema": {
|
|
335
335
|
"additionalProperties": false,
|
|
336
336
|
"properties": {
|
|
@@ -399,7 +399,7 @@ var OPERATIONS = [
|
|
|
399
399
|
},
|
|
400
400
|
"options": {
|
|
401
401
|
"type": "object",
|
|
402
|
-
"description": "The table options set on it: partition, filename, archive, exclude.",
|
|
402
|
+
"description": "The table options set on it: partition, filename, archive, exclude, pack, pack_after_days.",
|
|
403
403
|
"additionalProperties": true
|
|
404
404
|
},
|
|
405
405
|
"columns": {
|
|
@@ -610,7 +610,7 @@ var OPERATIONS = [
|
|
|
610
610
|
},
|
|
611
611
|
{
|
|
612
612
|
"name": "create_table",
|
|
613
|
-
"description": 'Create a table: `name`, in `catalog` and `schema` (default: the database\'s defaults); the definition\ngoes in metastore.yaml, the rows in `<root>/<catalog>/<schema>/<name>/`. Names: lowercase letters,\ndigits, `_` (no dots: pass the catalog and the schema as their own arguments).\n- `description` (required): what a row of the table records. Every column needs its own `description`\n too, what it holds: the table is refused otherwise, with every missing one listed. Descriptions are how\n agents and people understand the schema, so write them for a reader who never saw the notes. The\n engine writes those of `id` and of `identity` "uuid" / "created" columns.\n- `columns`: specs like `{"name": "kind", "type": "enum", "values": ["a","b"], "required": true,\n "description": "What kind of entry the row is"}`.\n Types: string, integer, number, boolean, date, datetime, enum, link, list (+ `items`), json.\n Attributes: required, default (`"{now}"`/`"{today}"`), min, max, step, values, `ordered` (enum in\n order: filters/avg use the position), ref (link target, full `catalog.schema.table` or "self"),\n unique, label, description, aliases, `generated` (e.g. `"date(occurred_at)"`, `"{name} {surname}"`),\n `identity` ("filename" | "created"), `vocabulary` (allowed values = names of another table\'s rows),\n `hierarchy: true` (one parent link to its own table), `acyclic: true` (links to rows of its own table that never loop back, such as tasks blocked by tasks; with `inverse`, the rule holds on both sides), `dense` (written on every row),\n `inverse` on a link column: the column of the `ref` table that links back (`friends` \u2194\n `friends`, `children` \u2194 `parents`, `partner` \u2194 `partner`); writes keep both sides in step.\n- `time_column`: rows named by that date/datetime; otherwise `filename` (e.g. `"{name}"`).\n- The table\'s options, as alter_table names them: `aliases` (how agents find it, with the\n description), `partition`, `exclude`, `archive`, `history` (keep its versions; default: the\n database\'s setting), `autolink_target` (true / false: may automatic links link its rows? default:\n yes, unless its rows are named by a date or a time, as with `time_column`).\n- `row_template`: markdown body of new rows. Shared columns come from bases: `set_table_bases`.\n- `instructions`: how to fill a row, for agents (Markdown); describe_table returns them.\n- `tags`: key/value labels of the table, strings (`{"domain": "health"}`); list_tables and\n describe_table return them, alter_table changes them.\nEnum columns: `values` and, for each, its meaning in `value_descriptions` (`{"stated": "the user said it", \u2026}`): describe_table shows them and a refused value lists them.\nGenerated link columns: `generated: "link({occurred_at:YYYY-MM-DD})"` with `ref` = the days table links each row to the row of `ref` named by the template (its folder read from the schema; the target may not exist yet).\nGenerated aggregates of a json column holding a list of objects (integer or number columns; avg: number): `count(feeds)`, `count(feeds.min)` (the items with a min), `sum(feeds.min)`, `avg(\u2026)`, `min(\u2026)`, `max(\u2026)`, with an optional filter on one field: `count(feeds, side = "left")`, `sum(feeds.min, min > 0)` (=, !=, <, <=, >, >=; "text", a number, true or false). Recomputed on every write; no list: count and sum 0, avg/min/max empty; a field that is not a number: empty.\nFiltered link targets (link columns): `ref_where` (a `where` every target must match) and `ref_by` (a column of the row picks the target level: `{"column": "kind", "levels": ["area", "project", "workstream"]}` or `{"column": "kind", "map": {"area": null, "project": ["area"]}}`; null = top level, no link; `target_column` when the target names it differently: an enum target column must have every value the map allows, a string one takes any value). A link to no row of the table, or to the row itself, is refused too. Existing rows that break them refuse the change; `list_link_targets` lists the valid targets of a row.\n\nThe schema changes only through operations like this one: never edit metastore.yaml by hand (no validation, no undo).',
|
|
613
|
+
"description": 'Create a table: `name`, in `catalog` and `schema` (default: the database\'s defaults); the definition\ngoes in metastore.yaml, the rows in `<root>/<catalog>/<schema>/<name>/`. Names: lowercase letters,\ndigits, `_` (no dots: pass the catalog and the schema as their own arguments).\n- `description` (required): what a row of the table records. Every column needs its own `description`\n too, what it holds: the table is refused otherwise, with every missing one listed. Descriptions are how\n agents and people understand the schema, so write them for a reader who never saw the notes. The\n engine writes those of `id` and of `identity` "uuid" / "created" columns.\n- `columns`: specs like `{"name": "kind", "type": "enum", "values": ["a","b"], "required": true,\n "description": "What kind of entry the row is"}`.\n Types: string, integer, number, boolean, date, datetime, enum, link, list (+ `items`), json.\n Attributes: required, default (`"{now}"`/`"{today}"`), min, max, step, values, `ordered` (enum in\n order: filters/avg use the position), ref (link target, full `catalog.schema.table` or "self"),\n unique, label, description, aliases, `generated` (e.g. `"date(occurred_at)"`, `"{name} {surname}"`),\n `identity` ("filename" | "created"), `vocabulary` (allowed values = names of another table\'s rows),\n `hierarchy: true` (one parent link to its own table), `acyclic: true` (links to rows of its own table that never loop back, such as tasks blocked by tasks; with `inverse`, the rule holds on both sides), `dense` (written on every row),\n `inverse` on a link column: the column of the `ref` table that links back (`friends` \u2194\n `friends`, `children` \u2194 `parents`, `partner` \u2194 `partner`); writes keep both sides in step.\n- `time_column`: rows named by that date/datetime; otherwise `filename` (e.g. `"{name}"`).\n- The table\'s options, as alter_table names them: `aliases` (how agents find it, with the\n description), `partition`, `exclude`, `archive`, `history` (keep its versions; default: the\n database\'s setting), `autolink_target` (true / false: may automatic links link its rows? default:\n yes, unless its rows are named by a date or a time, as with `time_column`).\n `pack` (a template of a date column, such as `"{occurred_at:YYYY-MM}"`: once a period is over, one note\n holds its rows, `##` section by section; select_rows still gives one row each) and `pack_after_days` (default 7):\n see pack_rows.\n- `row_template`: markdown body of new rows. Shared columns come from bases: `set_table_bases`.\n- `instructions`: how to fill a row, for agents (Markdown); describe_table returns them.\n- `tags`: key/value labels of the table, strings (`{"domain": "health"}`); list_tables and\n describe_table return them, alter_table changes them.\nEnum columns: `values` and, for each, its meaning in `value_descriptions` (`{"stated": "the user said it", \u2026}`): describe_table shows them and a refused value lists them.\nGenerated link columns: `generated: "link({occurred_at:YYYY-MM-DD})"` with `ref` = the days table links each row to the row of `ref` named by the template (its folder read from the schema; the target may not exist yet).\nGenerated aggregates of a json column holding a list of objects (integer or number columns; avg: number): `count(feeds)`, `count(feeds.min)` (the items with a min), `sum(feeds.min)`, `avg(\u2026)`, `min(\u2026)`, `max(\u2026)`, with an optional filter on one field: `count(feeds, side = "left")`, `sum(feeds.min, min > 0)` (=, !=, <, <=, >, >=; "text", a number, true or false). Recomputed on every write; no list: count and sum 0, avg/min/max empty; a field that is not a number: empty.\nFiltered link targets (link columns): `ref_where` (a `where` every target must match) and `ref_by` (a column of the row picks the target level: `{"column": "kind", "levels": ["area", "project", "workstream"]}` or `{"column": "kind", "map": {"area": null, "project": ["area"]}}`; null = top level, no link; `target_column` when the target names it differently: an enum target column must have every value the map allows, a string one takes any value). A link to no row of the table, or to the row itself, is refused too. Existing rows that break them refuse the change; `list_link_targets` lists the valid targets of a row.\n\nThe schema changes only through operations like this one: never edit metastore.yaml by hand (no validation, no undo).',
|
|
614
614
|
"inputSchema": {
|
|
615
615
|
"additionalProperties": false,
|
|
616
616
|
"properties": {
|
|
@@ -693,6 +693,31 @@ var OPERATIONS = [
|
|
|
693
693
|
"default": null,
|
|
694
694
|
"description": 'Sub-folder pattern of the rows, e.g. "{occurred_at:YYYY/MM}"; "" = flat.'
|
|
695
695
|
},
|
|
696
|
+
"pack": {
|
|
697
|
+
"anyOf": [
|
|
698
|
+
{
|
|
699
|
+
"type": "string"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"type": "null"
|
|
703
|
+
}
|
|
704
|
+
],
|
|
705
|
+
"default": null,
|
|
706
|
+
"description": 'Packs of rows: a template of a date column, the period of each pack, e.g. "{occurred_at:YYYY-MM}": once a month is over, one note holds its rows (pack_rows, or the engine on its own). Needs the engine service.'
|
|
707
|
+
},
|
|
708
|
+
"pack_after_days": {
|
|
709
|
+
"anyOf": [
|
|
710
|
+
{
|
|
711
|
+
"type": "integer",
|
|
712
|
+
"minimum": 0
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"type": "null"
|
|
716
|
+
}
|
|
717
|
+
],
|
|
718
|
+
"default": null,
|
|
719
|
+
"description": "Days after the end of a period before its rows go into a pack (default 7)."
|
|
720
|
+
},
|
|
696
721
|
"exclude": {
|
|
697
722
|
"anyOf": [
|
|
698
723
|
{
|
|
@@ -3501,7 +3526,7 @@ var OPERATIONS = [
|
|
|
3501
3526
|
},
|
|
3502
3527
|
{
|
|
3503
3528
|
"name": "alter_table",
|
|
3504
|
-
"description": 'Alter a table: move it (`catalog`, `schema`), rename it (`name`), change\n`partition` / `filename` patterns, `description` (changes, never goes: "" is refused), `aliases`,\n`exclude` folders, `row_template`\n("" removes it), `instructions` (how to fill a row, for agents; "" removes them), `history` (true | false | "default"), `autolink_target`\n(true | false | "default": may automatic links link its rows? default: yes, unless its rows are named by\na date or a time) or `tags` (key/value\nlabels merged into the table\'s, e.g. `{"domain": "health"}`; a `null` value removes that tag;\n`clear_tags: true` removes every tag first, so with `tags` the table keeps exactly those),\n`archive` (folder name inside the table folder) or `fields` (untyped fields, name \u2192 default; a\n`null` value removes one). Rows, archive and transaction log follow; links are updated; renamed\nrows keep their old name in `aliases`. A change of metadata only (tags, description, aliases,\nhistory, autolink_target, row_template, instructions, fields) rewrites the table entry alone: no row is moved or rewritten. Refused\nwhen a row cannot fill a pattern. Renaming or moving the table rewrites what names it in other\ndefinitions: the `ref` and `vocabulary` of the columns of other tables and bases (lists of links\nincluded) and the tables of views (`table`, `union[].table`, `join.table`); `schema_references`\nlists them. CHECKs and `ref_where` / `ref_by` that read it through a link follow the new `ref`. Use `dry_run` to see `planned_moves`; undo with undo_migration.\n\nThe schema changes only through operations like this one: never edit metastore.yaml by hand (no validation, no undo).',
|
|
3529
|
+
"description": 'Alter a table: move it (`catalog`, `schema`), rename it (`name`), change\n`partition` / `filename` patterns, `description` (changes, never goes: "" is refused), `aliases`,\n`exclude` folders, `row_template`\n("" removes it), `instructions` (how to fill a row, for agents; "" removes them), `history` (true | false | "default"), `autolink_target`\n(true | false | "default": may automatic links link its rows? default: yes, unless its rows are named by\na date or a time) or `tags` (key/value\nlabels merged into the table\'s, e.g. `{"domain": "health"}`; a `null` value removes that tag;\n`clear_tags: true` removes every tag first, so with `tags` the table keeps exactly those),\n`archive` (folder name inside the table folder) or `fields` (untyped fields, name \u2192 default; a\n`null` value removes one). Rows, archive and transaction log follow; links are updated; renamed\nrows keep their old name in `aliases`. A change of metadata only (tags, description, aliases,\nhistory, autolink_target, row_template, instructions, fields, pack_after_days) rewrites the table entry alone: no row is moved or rewritten.\n`pack` sets the period of the table\'s packs of rows (`"{occurred_at:YYYY-MM}"`; "" removes it), `pack_after_days` the days\nafter a period\'s end before its rows go into a pack ("default": 7). While rows are in packs, changing `pack`,\n`partition`, `filename` or the table\'s name is refused: unpack_rows first. Refused\nwhen a row cannot fill a pattern. Renaming or moving the table rewrites what names it in other\ndefinitions: the `ref` and `vocabulary` of the columns of other tables and bases (lists of links\nincluded) and the tables of views (`table`, `union[].table`, `join.table`); `schema_references`\nlists them. CHECKs and `ref_where` / `ref_by` that read it through a link follow the new `ref`. Use `dry_run` to see `planned_moves`; undo with undo_migration.\n\nThe schema changes only through operations like this one: never edit metastore.yaml by hand (no validation, no undo).',
|
|
3505
3530
|
"inputSchema": {
|
|
3506
3531
|
"additionalProperties": false,
|
|
3507
3532
|
"properties": {
|
|
@@ -3552,6 +3577,37 @@ var OPERATIONS = [
|
|
|
3552
3577
|
],
|
|
3553
3578
|
"default": null
|
|
3554
3579
|
},
|
|
3580
|
+
"pack": {
|
|
3581
|
+
"anyOf": [
|
|
3582
|
+
{
|
|
3583
|
+
"type": "string"
|
|
3584
|
+
},
|
|
3585
|
+
{
|
|
3586
|
+
"type": "null"
|
|
3587
|
+
}
|
|
3588
|
+
],
|
|
3589
|
+
"default": null,
|
|
3590
|
+
"description": 'Packs of rows: a template of a date column, e.g. "{occurred_at:YYYY-MM}"; "" removes it (only while no row is in a pack).'
|
|
3591
|
+
},
|
|
3592
|
+
"pack_after_days": {
|
|
3593
|
+
"anyOf": [
|
|
3594
|
+
{
|
|
3595
|
+
"type": "integer",
|
|
3596
|
+
"minimum": 0
|
|
3597
|
+
},
|
|
3598
|
+
{
|
|
3599
|
+
"type": "string",
|
|
3600
|
+
"enum": [
|
|
3601
|
+
"default"
|
|
3602
|
+
]
|
|
3603
|
+
},
|
|
3604
|
+
{
|
|
3605
|
+
"type": "null"
|
|
3606
|
+
}
|
|
3607
|
+
],
|
|
3608
|
+
"default": null,
|
|
3609
|
+
"description": 'Days after the end of a period before its rows go into a pack, or "default" (7).'
|
|
3610
|
+
},
|
|
3555
3611
|
"filename": {
|
|
3556
3612
|
"anyOf": [
|
|
3557
3613
|
{
|
|
@@ -17443,6 +17499,1031 @@ var OPERATIONS = [
|
|
|
17443
17499
|
]
|
|
17444
17500
|
}
|
|
17445
17501
|
},
|
|
17502
|
+
{
|
|
17503
|
+
"name": "pack_rows",
|
|
17504
|
+
"description": "Put the rows of a table's closed periods into packs: one note per period (`<table> <key>.md` in the\ntable's folder), a `##` section per row, `key:: value` lines for its values. The table needs a `pack`\noption (create_table / alter_table, e.g. `\"{occurred_at:YYYY-MM}\"`). A period is closed\n`pack_after_days` days after it ends (default 7); `key` packs only that period.\nNothing changes for the engine and its readers: select_rows, links, the graph and the change feed\nstill see each row at its path, with its values, text and file_modified (no change event, no new\nversion). Links from other notes to a packed row become `[[pack#row]]`, which Obsidian follows too.\nA row stays a note of its own (`excluded`, with the reason) when it changed in the last 24 hours, has a\n`#` or `##` heading in its text, is not at the path its values give, or its note is not in the form\nthe engine writes. The engine also packs on its own once a day (setting `autoPack`). Needs the engine\nservice. Journaled: undo_migration takes the rows out again. Use `dry_run` to see `packs` first.",
|
|
17505
|
+
"inputSchema": {
|
|
17506
|
+
"additionalProperties": false,
|
|
17507
|
+
"properties": {
|
|
17508
|
+
"table": {
|
|
17509
|
+
"type": "string"
|
|
17510
|
+
},
|
|
17511
|
+
"key": {
|
|
17512
|
+
"anyOf": [
|
|
17513
|
+
{
|
|
17514
|
+
"type": "string"
|
|
17515
|
+
},
|
|
17516
|
+
{
|
|
17517
|
+
"type": "null"
|
|
17518
|
+
}
|
|
17519
|
+
],
|
|
17520
|
+
"default": null,
|
|
17521
|
+
"description": 'Only the period of this key (e.g. "2026-10"); every closed period when absent.'
|
|
17522
|
+
},
|
|
17523
|
+
"dry_run": {
|
|
17524
|
+
"default": false,
|
|
17525
|
+
"type": "boolean"
|
|
17526
|
+
}
|
|
17527
|
+
},
|
|
17528
|
+
"required": [
|
|
17529
|
+
"table"
|
|
17530
|
+
],
|
|
17531
|
+
"type": "object"
|
|
17532
|
+
},
|
|
17533
|
+
"annotations": {
|
|
17534
|
+
"title": "Pack Rows",
|
|
17535
|
+
"readOnlyHint": false,
|
|
17536
|
+
"destructiveHint": true,
|
|
17537
|
+
"idempotentHint": true,
|
|
17538
|
+
"openWorldHint": false
|
|
17539
|
+
},
|
|
17540
|
+
"responseSchema": {
|
|
17541
|
+
"title": "PackRowsResult",
|
|
17542
|
+
"type": "object",
|
|
17543
|
+
"description": "Result of a write operation. A refusal (ok false) is answered with HTTP 422, a failed write with 500, so a 2xx body has ok true.",
|
|
17544
|
+
"properties": {
|
|
17545
|
+
"ok": {
|
|
17546
|
+
"type": "boolean",
|
|
17547
|
+
"description": "True when the operation was applied (or, on a dry run, would be)."
|
|
17548
|
+
},
|
|
17549
|
+
"op": {
|
|
17550
|
+
"type": "string",
|
|
17551
|
+
"description": "The operation, by the name it was called with (e.g. insert_row, create_table, recompute_columns)."
|
|
17552
|
+
},
|
|
17553
|
+
"dry_run": {
|
|
17554
|
+
"type": "boolean",
|
|
17555
|
+
"description": "True when nothing was written (preview)."
|
|
17556
|
+
},
|
|
17557
|
+
"migration_id": {
|
|
17558
|
+
"type": "string",
|
|
17559
|
+
"description": "Journal id of the applied operation: pass it to undo_migration. Absent on a dry run."
|
|
17560
|
+
},
|
|
17561
|
+
"notes_changed": {
|
|
17562
|
+
"type": "integer",
|
|
17563
|
+
"description": "Notes whose front matter or body were written."
|
|
17564
|
+
},
|
|
17565
|
+
"files_created": {
|
|
17566
|
+
"type": "integer",
|
|
17567
|
+
"description": "Files created."
|
|
17568
|
+
},
|
|
17569
|
+
"files_moved": {
|
|
17570
|
+
"type": "integer",
|
|
17571
|
+
"description": "Files moved or renamed."
|
|
17572
|
+
},
|
|
17573
|
+
"files_deleted": {
|
|
17574
|
+
"type": "integer",
|
|
17575
|
+
"description": "Files deleted or archived."
|
|
17576
|
+
},
|
|
17577
|
+
"references_updated": {
|
|
17578
|
+
"type": "integer",
|
|
17579
|
+
"description": "Links rewritten in other notes."
|
|
17580
|
+
},
|
|
17581
|
+
"conflicts": {
|
|
17582
|
+
"type": "array",
|
|
17583
|
+
"items": {
|
|
17584
|
+
"type": "object",
|
|
17585
|
+
"properties": {
|
|
17586
|
+
"path": {
|
|
17587
|
+
"type": "string",
|
|
17588
|
+
"description": "Note or file path."
|
|
17589
|
+
},
|
|
17590
|
+
"message": {
|
|
17591
|
+
"type": "string",
|
|
17592
|
+
"description": "Why the operation cannot proceed."
|
|
17593
|
+
}
|
|
17594
|
+
},
|
|
17595
|
+
"required": [
|
|
17596
|
+
"path",
|
|
17597
|
+
"message"
|
|
17598
|
+
]
|
|
17599
|
+
},
|
|
17600
|
+
"description": "Reasons the operation was refused (empty on success)."
|
|
17601
|
+
},
|
|
17602
|
+
"violations": {
|
|
17603
|
+
"type": "array",
|
|
17604
|
+
"items": {
|
|
17605
|
+
"title": "RowViolations",
|
|
17606
|
+
"type": "object",
|
|
17607
|
+
"description": "The violations of one row.",
|
|
17608
|
+
"properties": {
|
|
17609
|
+
"path": {
|
|
17610
|
+
"type": "string",
|
|
17611
|
+
"description": "Row note path."
|
|
17612
|
+
},
|
|
17613
|
+
"violations": {
|
|
17614
|
+
"type": "array",
|
|
17615
|
+
"items": {
|
|
17616
|
+
"title": "Violation",
|
|
17617
|
+
"type": "object",
|
|
17618
|
+
"properties": {
|
|
17619
|
+
"column": {
|
|
17620
|
+
"type": "string",
|
|
17621
|
+
"description": "The column the violation is about (every code but check and unreadable)."
|
|
17622
|
+
},
|
|
17623
|
+
"index": {
|
|
17624
|
+
"type": "integer",
|
|
17625
|
+
"description": "The item of a list column that breaks the rule, from 0."
|
|
17626
|
+
},
|
|
17627
|
+
"constraint": {
|
|
17628
|
+
"type": "string",
|
|
17629
|
+
"description": "The CHECK's name (code check)."
|
|
17630
|
+
},
|
|
17631
|
+
"hint": {
|
|
17632
|
+
"type": "string",
|
|
17633
|
+
"description": "The CHECK's own hint (code check), when the constraint has one: how to fix the row."
|
|
17634
|
+
},
|
|
17635
|
+
"code": {
|
|
17636
|
+
"type": "string",
|
|
17637
|
+
"enum": [
|
|
17638
|
+
"required",
|
|
17639
|
+
"inverse",
|
|
17640
|
+
"type",
|
|
17641
|
+
"min",
|
|
17642
|
+
"max",
|
|
17643
|
+
"step",
|
|
17644
|
+
"enum",
|
|
17645
|
+
"broken_link",
|
|
17646
|
+
"ref",
|
|
17647
|
+
"unique",
|
|
17648
|
+
"unknown_column",
|
|
17649
|
+
"check",
|
|
17650
|
+
"generated",
|
|
17651
|
+
"cycle",
|
|
17652
|
+
"vocabulary",
|
|
17653
|
+
"unreadable"
|
|
17654
|
+
],
|
|
17655
|
+
"description": "Kind of violation."
|
|
17656
|
+
},
|
|
17657
|
+
"message": {
|
|
17658
|
+
"type": "string",
|
|
17659
|
+
"description": "Agent-readable explanation."
|
|
17660
|
+
},
|
|
17661
|
+
"value": {
|
|
17662
|
+
"description": "The offending value, when there is one."
|
|
17663
|
+
}
|
|
17664
|
+
},
|
|
17665
|
+
"required": [
|
|
17666
|
+
"code",
|
|
17667
|
+
"message"
|
|
17668
|
+
]
|
|
17669
|
+
},
|
|
17670
|
+
"description": "What is wrong with this row."
|
|
17671
|
+
}
|
|
17672
|
+
},
|
|
17673
|
+
"required": [
|
|
17674
|
+
"path",
|
|
17675
|
+
"violations"
|
|
17676
|
+
]
|
|
17677
|
+
},
|
|
17678
|
+
"description": "Rows that would break the table's rules (empty on success)."
|
|
17679
|
+
},
|
|
17680
|
+
"failed": {
|
|
17681
|
+
"type": "array",
|
|
17682
|
+
"items": {
|
|
17683
|
+
"type": "object",
|
|
17684
|
+
"properties": {
|
|
17685
|
+
"path": {
|
|
17686
|
+
"type": "string",
|
|
17687
|
+
"description": "Vault path."
|
|
17688
|
+
},
|
|
17689
|
+
"error": {
|
|
17690
|
+
"type": "string",
|
|
17691
|
+
"description": "What went wrong."
|
|
17692
|
+
}
|
|
17693
|
+
},
|
|
17694
|
+
"required": [
|
|
17695
|
+
"path",
|
|
17696
|
+
"error"
|
|
17697
|
+
]
|
|
17698
|
+
},
|
|
17699
|
+
"description": "Files that could not be written (empty on success)."
|
|
17700
|
+
},
|
|
17701
|
+
"rolled_back": {
|
|
17702
|
+
"type": "boolean",
|
|
17703
|
+
"description": "Set when a write failed partway (`failed`): true when the engine put back what it had written, so nothing is left written; false when that rollback failed too (`failed` names the files left, and undo_migration on `migration_id` retries it)."
|
|
17704
|
+
},
|
|
17705
|
+
"planned_edits": {
|
|
17706
|
+
"type": "array",
|
|
17707
|
+
"items": {
|
|
17708
|
+
"type": "object",
|
|
17709
|
+
"properties": {
|
|
17710
|
+
"path": {
|
|
17711
|
+
"type": "string",
|
|
17712
|
+
"description": "Note path."
|
|
17713
|
+
},
|
|
17714
|
+
"set": {
|
|
17715
|
+
"type": "object",
|
|
17716
|
+
"description": "Front matter keys set, with their new values.",
|
|
17717
|
+
"additionalProperties": true
|
|
17718
|
+
},
|
|
17719
|
+
"remove": {
|
|
17720
|
+
"type": "array",
|
|
17721
|
+
"items": {
|
|
17722
|
+
"type": "string"
|
|
17723
|
+
},
|
|
17724
|
+
"description": "Front matter keys removed."
|
|
17725
|
+
},
|
|
17726
|
+
"body": {
|
|
17727
|
+
"type": "boolean",
|
|
17728
|
+
"description": "True when the note body changes too."
|
|
17729
|
+
}
|
|
17730
|
+
},
|
|
17731
|
+
"required": [
|
|
17732
|
+
"path",
|
|
17733
|
+
"set",
|
|
17734
|
+
"remove"
|
|
17735
|
+
]
|
|
17736
|
+
},
|
|
17737
|
+
"description": "Front matter edits per note (planned, or made)."
|
|
17738
|
+
},
|
|
17739
|
+
"planned_creates": {
|
|
17740
|
+
"type": "array",
|
|
17741
|
+
"items": {
|
|
17742
|
+
"type": "string"
|
|
17743
|
+
},
|
|
17744
|
+
"description": "Paths of notes created."
|
|
17745
|
+
},
|
|
17746
|
+
"planned_moves": {
|
|
17747
|
+
"type": "array",
|
|
17748
|
+
"items": {
|
|
17749
|
+
"type": "object",
|
|
17750
|
+
"properties": {
|
|
17751
|
+
"from": {
|
|
17752
|
+
"type": "string"
|
|
17753
|
+
},
|
|
17754
|
+
"to": {
|
|
17755
|
+
"type": "string"
|
|
17756
|
+
}
|
|
17757
|
+
},
|
|
17758
|
+
"required": [
|
|
17759
|
+
"from",
|
|
17760
|
+
"to"
|
|
17761
|
+
]
|
|
17762
|
+
},
|
|
17763
|
+
"description": "Files moved: from \u2192 to."
|
|
17764
|
+
},
|
|
17765
|
+
"planned_deletes": {
|
|
17766
|
+
"type": "array",
|
|
17767
|
+
"items": {
|
|
17768
|
+
"type": "string"
|
|
17769
|
+
},
|
|
17770
|
+
"description": "Paths deleted (or archived)."
|
|
17771
|
+
},
|
|
17772
|
+
"planned_texts": {
|
|
17773
|
+
"type": "array",
|
|
17774
|
+
"items": {
|
|
17775
|
+
"type": "string"
|
|
17776
|
+
},
|
|
17777
|
+
"description": "Files rewritten whole, e.g. metastore.yaml for DDL."
|
|
17778
|
+
},
|
|
17779
|
+
"commits": {
|
|
17780
|
+
"type": "array",
|
|
17781
|
+
"items": {
|
|
17782
|
+
"type": "object",
|
|
17783
|
+
"properties": {
|
|
17784
|
+
"table": {
|
|
17785
|
+
"type": "string",
|
|
17786
|
+
"description": "Qualified table."
|
|
17787
|
+
},
|
|
17788
|
+
"version": {
|
|
17789
|
+
"type": "integer",
|
|
17790
|
+
"description": "New log version."
|
|
17791
|
+
},
|
|
17792
|
+
"operation": {
|
|
17793
|
+
"type": "string",
|
|
17794
|
+
"description": "Log operation, e.g. WRITE."
|
|
17795
|
+
}
|
|
17796
|
+
},
|
|
17797
|
+
"required": [
|
|
17798
|
+
"table",
|
|
17799
|
+
"version",
|
|
17800
|
+
"operation"
|
|
17801
|
+
]
|
|
17802
|
+
},
|
|
17803
|
+
"description": "Transaction-log commits written (tables with history on)."
|
|
17804
|
+
},
|
|
17805
|
+
"links_added": {
|
|
17806
|
+
"type": "array",
|
|
17807
|
+
"items": {
|
|
17808
|
+
"title": "LinkAdded",
|
|
17809
|
+
"type": "object",
|
|
17810
|
+
"description": "A link the write added in place of a mention.",
|
|
17811
|
+
"properties": {
|
|
17812
|
+
"path": {
|
|
17813
|
+
"type": "string",
|
|
17814
|
+
"description": "The note the link was written into."
|
|
17815
|
+
},
|
|
17816
|
+
"text": {
|
|
17817
|
+
"type": "string",
|
|
17818
|
+
"description": "The mention, as written."
|
|
17819
|
+
},
|
|
17820
|
+
"target": {
|
|
17821
|
+
"type": "string",
|
|
17822
|
+
"description": "Vault path of the note it links."
|
|
17823
|
+
},
|
|
17824
|
+
"link": {
|
|
17825
|
+
"type": "string",
|
|
17826
|
+
"description": "The link written in place of the mention."
|
|
17827
|
+
}
|
|
17828
|
+
},
|
|
17829
|
+
"required": [
|
|
17830
|
+
"path",
|
|
17831
|
+
"text",
|
|
17832
|
+
"target",
|
|
17833
|
+
"link"
|
|
17834
|
+
]
|
|
17835
|
+
},
|
|
17836
|
+
"description": "Links the write added to the text it wrote: the notes the text mentions by name (automatic links). Present when there is one."
|
|
17837
|
+
},
|
|
17838
|
+
"ambiguous_mentions": {
|
|
17839
|
+
"type": "array",
|
|
17840
|
+
"items": {
|
|
17841
|
+
"title": "LinkAmbiguous",
|
|
17842
|
+
"type": "object",
|
|
17843
|
+
"description": "A mention left as text: more than one note could be meant.",
|
|
17844
|
+
"properties": {
|
|
17845
|
+
"path": {
|
|
17846
|
+
"type": "string",
|
|
17847
|
+
"description": "The note the mention is in."
|
|
17848
|
+
},
|
|
17849
|
+
"text": {
|
|
17850
|
+
"type": "string",
|
|
17851
|
+
"description": "The mention, as written."
|
|
17852
|
+
},
|
|
17853
|
+
"reason": {
|
|
17854
|
+
"type": "string",
|
|
17855
|
+
"enum": [
|
|
17856
|
+
"same_name",
|
|
17857
|
+
"adjacent",
|
|
17858
|
+
"overlap",
|
|
17859
|
+
"part_of_name",
|
|
17860
|
+
"sentence_start"
|
|
17861
|
+
],
|
|
17862
|
+
"description": "same_name: several notes have this name; adjacent: names of different notes side by side, which may be one name; overlap: names of notes overlap; part_of_name: a capitalized word next to it suggests a longer name; sentence_start: a one-word name at the start of a sentence, a line, a list item or a label, where its capital says nothing."
|
|
17863
|
+
},
|
|
17864
|
+
"candidates": {
|
|
17865
|
+
"type": "array",
|
|
17866
|
+
"items": {
|
|
17867
|
+
"type": "string"
|
|
17868
|
+
},
|
|
17869
|
+
"description": "Vault paths of the notes it may name."
|
|
17870
|
+
},
|
|
17871
|
+
"context": {
|
|
17872
|
+
"type": "string",
|
|
17873
|
+
"description": "The line around the mention."
|
|
17874
|
+
},
|
|
17875
|
+
"hint": {
|
|
17876
|
+
"type": "string",
|
|
17877
|
+
"description": "What to do: read the candidates, then link the right one with update_row and autolink: false, or leave the text."
|
|
17878
|
+
}
|
|
17879
|
+
},
|
|
17880
|
+
"required": [
|
|
17881
|
+
"path",
|
|
17882
|
+
"text",
|
|
17883
|
+
"reason",
|
|
17884
|
+
"candidates",
|
|
17885
|
+
"context",
|
|
17886
|
+
"hint"
|
|
17887
|
+
]
|
|
17888
|
+
},
|
|
17889
|
+
"description": "Mentions left as text because the engine is not sure which note they name. Present when there is one: read the candidates and the context, then link the right one with update_row and autolink: false, or leave the text."
|
|
17890
|
+
},
|
|
17891
|
+
"schema_references": {
|
|
17892
|
+
"type": "array",
|
|
17893
|
+
"items": {
|
|
17894
|
+
"title": "SchemaReference",
|
|
17895
|
+
"type": "object",
|
|
17896
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
17897
|
+
"properties": {
|
|
17898
|
+
"table": {
|
|
17899
|
+
"type": "string",
|
|
17900
|
+
"description": "The table whose column names it (full name)."
|
|
17901
|
+
},
|
|
17902
|
+
"base": {
|
|
17903
|
+
"type": "string",
|
|
17904
|
+
"description": "The base whose column names it."
|
|
17905
|
+
},
|
|
17906
|
+
"view": {
|
|
17907
|
+
"type": "string",
|
|
17908
|
+
"description": "The view whose query names it (full name)."
|
|
17909
|
+
},
|
|
17910
|
+
"column": {
|
|
17911
|
+
"type": "string",
|
|
17912
|
+
"description": "The column of the table or base."
|
|
17913
|
+
},
|
|
17914
|
+
"key": {
|
|
17915
|
+
"type": "string",
|
|
17916
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
17917
|
+
},
|
|
17918
|
+
"from": {
|
|
17919
|
+
"type": "string",
|
|
17920
|
+
"description": "The name as written before."
|
|
17921
|
+
},
|
|
17922
|
+
"to": {
|
|
17923
|
+
"type": "string",
|
|
17924
|
+
"description": "The name written in its place."
|
|
17925
|
+
}
|
|
17926
|
+
},
|
|
17927
|
+
"required": [
|
|
17928
|
+
"key",
|
|
17929
|
+
"from",
|
|
17930
|
+
"to"
|
|
17931
|
+
]
|
|
17932
|
+
},
|
|
17933
|
+
"description": "alter_table that moves or renames a table: the references to it in other definitions that it rewrites (on a dry run, would rewrite): the ref and vocabulary of the columns of other tables and of bases, and the tables the views' queries read. Present when there is one."
|
|
17934
|
+
},
|
|
17935
|
+
"packs": {
|
|
17936
|
+
"type": "array",
|
|
17937
|
+
"description": "The packs written (or, on a dry run, to write): each pack's file, its key and the rows that go in or come out.",
|
|
17938
|
+
"items": {
|
|
17939
|
+
"type": "object",
|
|
17940
|
+
"properties": {
|
|
17941
|
+
"pack": {
|
|
17942
|
+
"type": "string",
|
|
17943
|
+
"description": "The pack's file."
|
|
17944
|
+
},
|
|
17945
|
+
"key": {
|
|
17946
|
+
"type": "string",
|
|
17947
|
+
"description": "The period of its rows, as the table's pack option writes it."
|
|
17948
|
+
},
|
|
17949
|
+
"rows": {
|
|
17950
|
+
"type": "array",
|
|
17951
|
+
"items": {
|
|
17952
|
+
"type": "string"
|
|
17953
|
+
},
|
|
17954
|
+
"description": "The rows' paths (each keeps its path in a pack)."
|
|
17955
|
+
}
|
|
17956
|
+
},
|
|
17957
|
+
"required": [
|
|
17958
|
+
"pack",
|
|
17959
|
+
"key",
|
|
17960
|
+
"rows"
|
|
17961
|
+
]
|
|
17962
|
+
}
|
|
17963
|
+
},
|
|
17964
|
+
"excluded": {
|
|
17965
|
+
"type": "array",
|
|
17966
|
+
"description": "pack_rows: rows of closed periods that stay notes of their own, with the reason (changed in the last 24 hours, a # or ## heading in their text, not where their values put them, another YAML style).",
|
|
17967
|
+
"items": {
|
|
17968
|
+
"type": "object",
|
|
17969
|
+
"properties": {
|
|
17970
|
+
"path": {
|
|
17971
|
+
"type": "string"
|
|
17972
|
+
},
|
|
17973
|
+
"reason": {
|
|
17974
|
+
"type": "string"
|
|
17975
|
+
}
|
|
17976
|
+
},
|
|
17977
|
+
"required": [
|
|
17978
|
+
"path",
|
|
17979
|
+
"reason"
|
|
17980
|
+
]
|
|
17981
|
+
}
|
|
17982
|
+
},
|
|
17983
|
+
"open_rows": {
|
|
17984
|
+
"type": "integer",
|
|
17985
|
+
"description": "pack_rows: rows whose period is not over yet (or ended less than pack_after_days ago): not listed."
|
|
17986
|
+
}
|
|
17987
|
+
},
|
|
17988
|
+
"required": [
|
|
17989
|
+
"ok",
|
|
17990
|
+
"op",
|
|
17991
|
+
"dry_run",
|
|
17992
|
+
"notes_changed",
|
|
17993
|
+
"files_created",
|
|
17994
|
+
"files_moved",
|
|
17995
|
+
"files_deleted",
|
|
17996
|
+
"references_updated",
|
|
17997
|
+
"conflicts",
|
|
17998
|
+
"violations",
|
|
17999
|
+
"failed",
|
|
18000
|
+
"planned_edits",
|
|
18001
|
+
"planned_creates",
|
|
18002
|
+
"planned_moves",
|
|
18003
|
+
"planned_deletes",
|
|
18004
|
+
"planned_texts"
|
|
18005
|
+
]
|
|
18006
|
+
}
|
|
18007
|
+
},
|
|
18008
|
+
{
|
|
18009
|
+
"name": "unpack_rows",
|
|
18010
|
+
"description": "Take rows out of their packs as notes of their own, at their paths, with the text and the modification\ntime they had (the opposite of pack_rows): every pack of the table, the pack of `key`, or only the\nrows `where` matches (as select_rows filters). A pack left without rows goes. Links `[[pack#row]]`\nfrom other notes become links to the notes. Needed before alter_table changes the table's `pack`,\n`partition`, `filename` or name. Silent for the rows, journaled (undo_migration packs them again).",
|
|
18011
|
+
"inputSchema": {
|
|
18012
|
+
"additionalProperties": false,
|
|
18013
|
+
"properties": {
|
|
18014
|
+
"table": {
|
|
18015
|
+
"type": "string"
|
|
18016
|
+
},
|
|
18017
|
+
"key": {
|
|
18018
|
+
"anyOf": [
|
|
18019
|
+
{
|
|
18020
|
+
"type": "string"
|
|
18021
|
+
},
|
|
18022
|
+
{
|
|
18023
|
+
"type": "null"
|
|
18024
|
+
}
|
|
18025
|
+
],
|
|
18026
|
+
"default": null,
|
|
18027
|
+
"description": 'Only the pack of this key (e.g. "2026-10").'
|
|
18028
|
+
},
|
|
18029
|
+
"where": {
|
|
18030
|
+
"anyOf": [
|
|
18031
|
+
{
|
|
18032
|
+
"additionalProperties": true,
|
|
18033
|
+
"type": "object"
|
|
18034
|
+
},
|
|
18035
|
+
{
|
|
18036
|
+
"type": "null"
|
|
18037
|
+
}
|
|
18038
|
+
],
|
|
18039
|
+
"default": null,
|
|
18040
|
+
"description": "Only the rows that match, as select_rows' where."
|
|
18041
|
+
},
|
|
18042
|
+
"dry_run": {
|
|
18043
|
+
"default": false,
|
|
18044
|
+
"type": "boolean"
|
|
18045
|
+
}
|
|
18046
|
+
},
|
|
18047
|
+
"required": [
|
|
18048
|
+
"table"
|
|
18049
|
+
],
|
|
18050
|
+
"type": "object"
|
|
18051
|
+
},
|
|
18052
|
+
"annotations": {
|
|
18053
|
+
"title": "Unpack Rows",
|
|
18054
|
+
"readOnlyHint": false,
|
|
18055
|
+
"destructiveHint": true,
|
|
18056
|
+
"idempotentHint": true,
|
|
18057
|
+
"openWorldHint": false
|
|
18058
|
+
},
|
|
18059
|
+
"responseSchema": {
|
|
18060
|
+
"title": "PackRowsResult",
|
|
18061
|
+
"type": "object",
|
|
18062
|
+
"description": "Result of a write operation. A refusal (ok false) is answered with HTTP 422, a failed write with 500, so a 2xx body has ok true.",
|
|
18063
|
+
"properties": {
|
|
18064
|
+
"ok": {
|
|
18065
|
+
"type": "boolean",
|
|
18066
|
+
"description": "True when the operation was applied (or, on a dry run, would be)."
|
|
18067
|
+
},
|
|
18068
|
+
"op": {
|
|
18069
|
+
"type": "string",
|
|
18070
|
+
"description": "The operation, by the name it was called with (e.g. insert_row, create_table, recompute_columns)."
|
|
18071
|
+
},
|
|
18072
|
+
"dry_run": {
|
|
18073
|
+
"type": "boolean",
|
|
18074
|
+
"description": "True when nothing was written (preview)."
|
|
18075
|
+
},
|
|
18076
|
+
"migration_id": {
|
|
18077
|
+
"type": "string",
|
|
18078
|
+
"description": "Journal id of the applied operation: pass it to undo_migration. Absent on a dry run."
|
|
18079
|
+
},
|
|
18080
|
+
"notes_changed": {
|
|
18081
|
+
"type": "integer",
|
|
18082
|
+
"description": "Notes whose front matter or body were written."
|
|
18083
|
+
},
|
|
18084
|
+
"files_created": {
|
|
18085
|
+
"type": "integer",
|
|
18086
|
+
"description": "Files created."
|
|
18087
|
+
},
|
|
18088
|
+
"files_moved": {
|
|
18089
|
+
"type": "integer",
|
|
18090
|
+
"description": "Files moved or renamed."
|
|
18091
|
+
},
|
|
18092
|
+
"files_deleted": {
|
|
18093
|
+
"type": "integer",
|
|
18094
|
+
"description": "Files deleted or archived."
|
|
18095
|
+
},
|
|
18096
|
+
"references_updated": {
|
|
18097
|
+
"type": "integer",
|
|
18098
|
+
"description": "Links rewritten in other notes."
|
|
18099
|
+
},
|
|
18100
|
+
"conflicts": {
|
|
18101
|
+
"type": "array",
|
|
18102
|
+
"items": {
|
|
18103
|
+
"type": "object",
|
|
18104
|
+
"properties": {
|
|
18105
|
+
"path": {
|
|
18106
|
+
"type": "string",
|
|
18107
|
+
"description": "Note or file path."
|
|
18108
|
+
},
|
|
18109
|
+
"message": {
|
|
18110
|
+
"type": "string",
|
|
18111
|
+
"description": "Why the operation cannot proceed."
|
|
18112
|
+
}
|
|
18113
|
+
},
|
|
18114
|
+
"required": [
|
|
18115
|
+
"path",
|
|
18116
|
+
"message"
|
|
18117
|
+
]
|
|
18118
|
+
},
|
|
18119
|
+
"description": "Reasons the operation was refused (empty on success)."
|
|
18120
|
+
},
|
|
18121
|
+
"violations": {
|
|
18122
|
+
"type": "array",
|
|
18123
|
+
"items": {
|
|
18124
|
+
"title": "RowViolations",
|
|
18125
|
+
"type": "object",
|
|
18126
|
+
"description": "The violations of one row.",
|
|
18127
|
+
"properties": {
|
|
18128
|
+
"path": {
|
|
18129
|
+
"type": "string",
|
|
18130
|
+
"description": "Row note path."
|
|
18131
|
+
},
|
|
18132
|
+
"violations": {
|
|
18133
|
+
"type": "array",
|
|
18134
|
+
"items": {
|
|
18135
|
+
"title": "Violation",
|
|
18136
|
+
"type": "object",
|
|
18137
|
+
"properties": {
|
|
18138
|
+
"column": {
|
|
18139
|
+
"type": "string",
|
|
18140
|
+
"description": "The column the violation is about (every code but check and unreadable)."
|
|
18141
|
+
},
|
|
18142
|
+
"index": {
|
|
18143
|
+
"type": "integer",
|
|
18144
|
+
"description": "The item of a list column that breaks the rule, from 0."
|
|
18145
|
+
},
|
|
18146
|
+
"constraint": {
|
|
18147
|
+
"type": "string",
|
|
18148
|
+
"description": "The CHECK's name (code check)."
|
|
18149
|
+
},
|
|
18150
|
+
"hint": {
|
|
18151
|
+
"type": "string",
|
|
18152
|
+
"description": "The CHECK's own hint (code check), when the constraint has one: how to fix the row."
|
|
18153
|
+
},
|
|
18154
|
+
"code": {
|
|
18155
|
+
"type": "string",
|
|
18156
|
+
"enum": [
|
|
18157
|
+
"required",
|
|
18158
|
+
"inverse",
|
|
18159
|
+
"type",
|
|
18160
|
+
"min",
|
|
18161
|
+
"max",
|
|
18162
|
+
"step",
|
|
18163
|
+
"enum",
|
|
18164
|
+
"broken_link",
|
|
18165
|
+
"ref",
|
|
18166
|
+
"unique",
|
|
18167
|
+
"unknown_column",
|
|
18168
|
+
"check",
|
|
18169
|
+
"generated",
|
|
18170
|
+
"cycle",
|
|
18171
|
+
"vocabulary",
|
|
18172
|
+
"unreadable"
|
|
18173
|
+
],
|
|
18174
|
+
"description": "Kind of violation."
|
|
18175
|
+
},
|
|
18176
|
+
"message": {
|
|
18177
|
+
"type": "string",
|
|
18178
|
+
"description": "Agent-readable explanation."
|
|
18179
|
+
},
|
|
18180
|
+
"value": {
|
|
18181
|
+
"description": "The offending value, when there is one."
|
|
18182
|
+
}
|
|
18183
|
+
},
|
|
18184
|
+
"required": [
|
|
18185
|
+
"code",
|
|
18186
|
+
"message"
|
|
18187
|
+
]
|
|
18188
|
+
},
|
|
18189
|
+
"description": "What is wrong with this row."
|
|
18190
|
+
}
|
|
18191
|
+
},
|
|
18192
|
+
"required": [
|
|
18193
|
+
"path",
|
|
18194
|
+
"violations"
|
|
18195
|
+
]
|
|
18196
|
+
},
|
|
18197
|
+
"description": "Rows that would break the table's rules (empty on success)."
|
|
18198
|
+
},
|
|
18199
|
+
"failed": {
|
|
18200
|
+
"type": "array",
|
|
18201
|
+
"items": {
|
|
18202
|
+
"type": "object",
|
|
18203
|
+
"properties": {
|
|
18204
|
+
"path": {
|
|
18205
|
+
"type": "string",
|
|
18206
|
+
"description": "Vault path."
|
|
18207
|
+
},
|
|
18208
|
+
"error": {
|
|
18209
|
+
"type": "string",
|
|
18210
|
+
"description": "What went wrong."
|
|
18211
|
+
}
|
|
18212
|
+
},
|
|
18213
|
+
"required": [
|
|
18214
|
+
"path",
|
|
18215
|
+
"error"
|
|
18216
|
+
]
|
|
18217
|
+
},
|
|
18218
|
+
"description": "Files that could not be written (empty on success)."
|
|
18219
|
+
},
|
|
18220
|
+
"rolled_back": {
|
|
18221
|
+
"type": "boolean",
|
|
18222
|
+
"description": "Set when a write failed partway (`failed`): true when the engine put back what it had written, so nothing is left written; false when that rollback failed too (`failed` names the files left, and undo_migration on `migration_id` retries it)."
|
|
18223
|
+
},
|
|
18224
|
+
"planned_edits": {
|
|
18225
|
+
"type": "array",
|
|
18226
|
+
"items": {
|
|
18227
|
+
"type": "object",
|
|
18228
|
+
"properties": {
|
|
18229
|
+
"path": {
|
|
18230
|
+
"type": "string",
|
|
18231
|
+
"description": "Note path."
|
|
18232
|
+
},
|
|
18233
|
+
"set": {
|
|
18234
|
+
"type": "object",
|
|
18235
|
+
"description": "Front matter keys set, with their new values.",
|
|
18236
|
+
"additionalProperties": true
|
|
18237
|
+
},
|
|
18238
|
+
"remove": {
|
|
18239
|
+
"type": "array",
|
|
18240
|
+
"items": {
|
|
18241
|
+
"type": "string"
|
|
18242
|
+
},
|
|
18243
|
+
"description": "Front matter keys removed."
|
|
18244
|
+
},
|
|
18245
|
+
"body": {
|
|
18246
|
+
"type": "boolean",
|
|
18247
|
+
"description": "True when the note body changes too."
|
|
18248
|
+
}
|
|
18249
|
+
},
|
|
18250
|
+
"required": [
|
|
18251
|
+
"path",
|
|
18252
|
+
"set",
|
|
18253
|
+
"remove"
|
|
18254
|
+
]
|
|
18255
|
+
},
|
|
18256
|
+
"description": "Front matter edits per note (planned, or made)."
|
|
18257
|
+
},
|
|
18258
|
+
"planned_creates": {
|
|
18259
|
+
"type": "array",
|
|
18260
|
+
"items": {
|
|
18261
|
+
"type": "string"
|
|
18262
|
+
},
|
|
18263
|
+
"description": "Paths of notes created."
|
|
18264
|
+
},
|
|
18265
|
+
"planned_moves": {
|
|
18266
|
+
"type": "array",
|
|
18267
|
+
"items": {
|
|
18268
|
+
"type": "object",
|
|
18269
|
+
"properties": {
|
|
18270
|
+
"from": {
|
|
18271
|
+
"type": "string"
|
|
18272
|
+
},
|
|
18273
|
+
"to": {
|
|
18274
|
+
"type": "string"
|
|
18275
|
+
}
|
|
18276
|
+
},
|
|
18277
|
+
"required": [
|
|
18278
|
+
"from",
|
|
18279
|
+
"to"
|
|
18280
|
+
]
|
|
18281
|
+
},
|
|
18282
|
+
"description": "Files moved: from \u2192 to."
|
|
18283
|
+
},
|
|
18284
|
+
"planned_deletes": {
|
|
18285
|
+
"type": "array",
|
|
18286
|
+
"items": {
|
|
18287
|
+
"type": "string"
|
|
18288
|
+
},
|
|
18289
|
+
"description": "Paths deleted (or archived)."
|
|
18290
|
+
},
|
|
18291
|
+
"planned_texts": {
|
|
18292
|
+
"type": "array",
|
|
18293
|
+
"items": {
|
|
18294
|
+
"type": "string"
|
|
18295
|
+
},
|
|
18296
|
+
"description": "Files rewritten whole, e.g. metastore.yaml for DDL."
|
|
18297
|
+
},
|
|
18298
|
+
"commits": {
|
|
18299
|
+
"type": "array",
|
|
18300
|
+
"items": {
|
|
18301
|
+
"type": "object",
|
|
18302
|
+
"properties": {
|
|
18303
|
+
"table": {
|
|
18304
|
+
"type": "string",
|
|
18305
|
+
"description": "Qualified table."
|
|
18306
|
+
},
|
|
18307
|
+
"version": {
|
|
18308
|
+
"type": "integer",
|
|
18309
|
+
"description": "New log version."
|
|
18310
|
+
},
|
|
18311
|
+
"operation": {
|
|
18312
|
+
"type": "string",
|
|
18313
|
+
"description": "Log operation, e.g. WRITE."
|
|
18314
|
+
}
|
|
18315
|
+
},
|
|
18316
|
+
"required": [
|
|
18317
|
+
"table",
|
|
18318
|
+
"version",
|
|
18319
|
+
"operation"
|
|
18320
|
+
]
|
|
18321
|
+
},
|
|
18322
|
+
"description": "Transaction-log commits written (tables with history on)."
|
|
18323
|
+
},
|
|
18324
|
+
"links_added": {
|
|
18325
|
+
"type": "array",
|
|
18326
|
+
"items": {
|
|
18327
|
+
"title": "LinkAdded",
|
|
18328
|
+
"type": "object",
|
|
18329
|
+
"description": "A link the write added in place of a mention.",
|
|
18330
|
+
"properties": {
|
|
18331
|
+
"path": {
|
|
18332
|
+
"type": "string",
|
|
18333
|
+
"description": "The note the link was written into."
|
|
18334
|
+
},
|
|
18335
|
+
"text": {
|
|
18336
|
+
"type": "string",
|
|
18337
|
+
"description": "The mention, as written."
|
|
18338
|
+
},
|
|
18339
|
+
"target": {
|
|
18340
|
+
"type": "string",
|
|
18341
|
+
"description": "Vault path of the note it links."
|
|
18342
|
+
},
|
|
18343
|
+
"link": {
|
|
18344
|
+
"type": "string",
|
|
18345
|
+
"description": "The link written in place of the mention."
|
|
18346
|
+
}
|
|
18347
|
+
},
|
|
18348
|
+
"required": [
|
|
18349
|
+
"path",
|
|
18350
|
+
"text",
|
|
18351
|
+
"target",
|
|
18352
|
+
"link"
|
|
18353
|
+
]
|
|
18354
|
+
},
|
|
18355
|
+
"description": "Links the write added to the text it wrote: the notes the text mentions by name (automatic links). Present when there is one."
|
|
18356
|
+
},
|
|
18357
|
+
"ambiguous_mentions": {
|
|
18358
|
+
"type": "array",
|
|
18359
|
+
"items": {
|
|
18360
|
+
"title": "LinkAmbiguous",
|
|
18361
|
+
"type": "object",
|
|
18362
|
+
"description": "A mention left as text: more than one note could be meant.",
|
|
18363
|
+
"properties": {
|
|
18364
|
+
"path": {
|
|
18365
|
+
"type": "string",
|
|
18366
|
+
"description": "The note the mention is in."
|
|
18367
|
+
},
|
|
18368
|
+
"text": {
|
|
18369
|
+
"type": "string",
|
|
18370
|
+
"description": "The mention, as written."
|
|
18371
|
+
},
|
|
18372
|
+
"reason": {
|
|
18373
|
+
"type": "string",
|
|
18374
|
+
"enum": [
|
|
18375
|
+
"same_name",
|
|
18376
|
+
"adjacent",
|
|
18377
|
+
"overlap",
|
|
18378
|
+
"part_of_name",
|
|
18379
|
+
"sentence_start"
|
|
18380
|
+
],
|
|
18381
|
+
"description": "same_name: several notes have this name; adjacent: names of different notes side by side, which may be one name; overlap: names of notes overlap; part_of_name: a capitalized word next to it suggests a longer name; sentence_start: a one-word name at the start of a sentence, a line, a list item or a label, where its capital says nothing."
|
|
18382
|
+
},
|
|
18383
|
+
"candidates": {
|
|
18384
|
+
"type": "array",
|
|
18385
|
+
"items": {
|
|
18386
|
+
"type": "string"
|
|
18387
|
+
},
|
|
18388
|
+
"description": "Vault paths of the notes it may name."
|
|
18389
|
+
},
|
|
18390
|
+
"context": {
|
|
18391
|
+
"type": "string",
|
|
18392
|
+
"description": "The line around the mention."
|
|
18393
|
+
},
|
|
18394
|
+
"hint": {
|
|
18395
|
+
"type": "string",
|
|
18396
|
+
"description": "What to do: read the candidates, then link the right one with update_row and autolink: false, or leave the text."
|
|
18397
|
+
}
|
|
18398
|
+
},
|
|
18399
|
+
"required": [
|
|
18400
|
+
"path",
|
|
18401
|
+
"text",
|
|
18402
|
+
"reason",
|
|
18403
|
+
"candidates",
|
|
18404
|
+
"context",
|
|
18405
|
+
"hint"
|
|
18406
|
+
]
|
|
18407
|
+
},
|
|
18408
|
+
"description": "Mentions left as text because the engine is not sure which note they name. Present when there is one: read the candidates and the context, then link the right one with update_row and autolink: false, or leave the text."
|
|
18409
|
+
},
|
|
18410
|
+
"schema_references": {
|
|
18411
|
+
"type": "array",
|
|
18412
|
+
"items": {
|
|
18413
|
+
"title": "SchemaReference",
|
|
18414
|
+
"type": "object",
|
|
18415
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
18416
|
+
"properties": {
|
|
18417
|
+
"table": {
|
|
18418
|
+
"type": "string",
|
|
18419
|
+
"description": "The table whose column names it (full name)."
|
|
18420
|
+
},
|
|
18421
|
+
"base": {
|
|
18422
|
+
"type": "string",
|
|
18423
|
+
"description": "The base whose column names it."
|
|
18424
|
+
},
|
|
18425
|
+
"view": {
|
|
18426
|
+
"type": "string",
|
|
18427
|
+
"description": "The view whose query names it (full name)."
|
|
18428
|
+
},
|
|
18429
|
+
"column": {
|
|
18430
|
+
"type": "string",
|
|
18431
|
+
"description": "The column of the table or base."
|
|
18432
|
+
},
|
|
18433
|
+
"key": {
|
|
18434
|
+
"type": "string",
|
|
18435
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
18436
|
+
},
|
|
18437
|
+
"from": {
|
|
18438
|
+
"type": "string",
|
|
18439
|
+
"description": "The name as written before."
|
|
18440
|
+
},
|
|
18441
|
+
"to": {
|
|
18442
|
+
"type": "string",
|
|
18443
|
+
"description": "The name written in its place."
|
|
18444
|
+
}
|
|
18445
|
+
},
|
|
18446
|
+
"required": [
|
|
18447
|
+
"key",
|
|
18448
|
+
"from",
|
|
18449
|
+
"to"
|
|
18450
|
+
]
|
|
18451
|
+
},
|
|
18452
|
+
"description": "alter_table that moves or renames a table: the references to it in other definitions that it rewrites (on a dry run, would rewrite): the ref and vocabulary of the columns of other tables and of bases, and the tables the views' queries read. Present when there is one."
|
|
18453
|
+
},
|
|
18454
|
+
"packs": {
|
|
18455
|
+
"type": "array",
|
|
18456
|
+
"description": "The packs written (or, on a dry run, to write): each pack's file, its key and the rows that go in or come out.",
|
|
18457
|
+
"items": {
|
|
18458
|
+
"type": "object",
|
|
18459
|
+
"properties": {
|
|
18460
|
+
"pack": {
|
|
18461
|
+
"type": "string",
|
|
18462
|
+
"description": "The pack's file."
|
|
18463
|
+
},
|
|
18464
|
+
"key": {
|
|
18465
|
+
"type": "string",
|
|
18466
|
+
"description": "The period of its rows, as the table's pack option writes it."
|
|
18467
|
+
},
|
|
18468
|
+
"rows": {
|
|
18469
|
+
"type": "array",
|
|
18470
|
+
"items": {
|
|
18471
|
+
"type": "string"
|
|
18472
|
+
},
|
|
18473
|
+
"description": "The rows' paths (each keeps its path in a pack)."
|
|
18474
|
+
}
|
|
18475
|
+
},
|
|
18476
|
+
"required": [
|
|
18477
|
+
"pack",
|
|
18478
|
+
"key",
|
|
18479
|
+
"rows"
|
|
18480
|
+
]
|
|
18481
|
+
}
|
|
18482
|
+
},
|
|
18483
|
+
"excluded": {
|
|
18484
|
+
"type": "array",
|
|
18485
|
+
"description": "pack_rows: rows of closed periods that stay notes of their own, with the reason (changed in the last 24 hours, a # or ## heading in their text, not where their values put them, another YAML style).",
|
|
18486
|
+
"items": {
|
|
18487
|
+
"type": "object",
|
|
18488
|
+
"properties": {
|
|
18489
|
+
"path": {
|
|
18490
|
+
"type": "string"
|
|
18491
|
+
},
|
|
18492
|
+
"reason": {
|
|
18493
|
+
"type": "string"
|
|
18494
|
+
}
|
|
18495
|
+
},
|
|
18496
|
+
"required": [
|
|
18497
|
+
"path",
|
|
18498
|
+
"reason"
|
|
18499
|
+
]
|
|
18500
|
+
}
|
|
18501
|
+
},
|
|
18502
|
+
"open_rows": {
|
|
18503
|
+
"type": "integer",
|
|
18504
|
+
"description": "pack_rows: rows whose period is not over yet (or ended less than pack_after_days ago): not listed."
|
|
18505
|
+
}
|
|
18506
|
+
},
|
|
18507
|
+
"required": [
|
|
18508
|
+
"ok",
|
|
18509
|
+
"op",
|
|
18510
|
+
"dry_run",
|
|
18511
|
+
"notes_changed",
|
|
18512
|
+
"files_created",
|
|
18513
|
+
"files_moved",
|
|
18514
|
+
"files_deleted",
|
|
18515
|
+
"references_updated",
|
|
18516
|
+
"conflicts",
|
|
18517
|
+
"violations",
|
|
18518
|
+
"failed",
|
|
18519
|
+
"planned_edits",
|
|
18520
|
+
"planned_creates",
|
|
18521
|
+
"planned_moves",
|
|
18522
|
+
"planned_deletes",
|
|
18523
|
+
"planned_texts"
|
|
18524
|
+
]
|
|
18525
|
+
}
|
|
18526
|
+
},
|
|
17446
18527
|
{
|
|
17447
18528
|
"name": "graph_neighbors",
|
|
17448
18529
|
"description": 'Direct neighbours of notes: what they link to (`out`) and what links to them (`in`,\nbacklinks), with counts per edge label. `direction`: out, in or both (default).\n\n`from_nodes` selects the notes: `{"paths": [...]}`, `{"table": ..., "where": {...}}` and/or\n`{"tables": [...]}`: the rows of several tables, by name or pattern (`["*"]` every table, `["personal.*"]` a\ncatalog\'s). The whole vault\'s graph in one call: `{"tables": ["*"]}` with direction `out` (at most 5000\nstart notes). Edges are labelled with their link column (`people`, `event`, \u2026) or `link` for other links.',
|
|
@@ -17949,7 +19030,9 @@ var OPERATION_KIND = {
|
|
|
17949
19030
|
check_table: "auxiliary",
|
|
17950
19031
|
infer_table: "auxiliary",
|
|
17951
19032
|
describe_semantic_index: "auxiliary",
|
|
17952
|
-
sync_semantic_index: "auxiliary"
|
|
19033
|
+
sync_semantic_index: "auxiliary",
|
|
19034
|
+
pack_rows: "auxiliary",
|
|
19035
|
+
unpack_rows: "auxiliary"
|
|
17953
19036
|
};
|
|
17954
19037
|
|
|
17955
19038
|
// src/api/guidance.ts
|