datanotes 3.3.1 → 3.4.1
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/SECURITY.md +5 -3
- package/dist/api/extensions.cjs +141 -5
- package/dist/api/extensions.js +141 -5
- package/dist/api/index.cjs +141 -5
- package/dist/api/index.js +141 -5
- package/dist/api/mcp.cjs +141 -5
- package/dist/api/mcp.js +141 -5
- package/dist/datanotes.cjs +3646 -2403
- package/dist/docs/administration/extensions.md +2 -2
- package/dist/docs/api/operations/add_column.md +1 -0
- package/dist/docs/api/operations/check_table.md +1 -0
- package/dist/docs/api/operations/create_table.md +1 -0
- package/dist/docs/api/operations/describe_database.md +2 -0
- package/dist/docs/api/operations/describe_history.md +1 -0
- package/dist/docs/api/operations/describe_semantic_index.md +1 -0
- package/dist/docs/api/operations/describe_table.md +1 -0
- package/dist/docs/api/operations/graph_neighbors.md +1 -0
- package/dist/docs/api/operations/graph_path.md +1 -0
- package/dist/docs/api/operations/graph_traverse.md +1 -0
- package/dist/docs/api/operations/identify_session.md +1 -0
- package/dist/docs/api/operations/infer_table.md +1 -0
- package/dist/docs/api/operations/list_changes.md +1 -0
- package/dist/docs/api/operations/list_folder.md +1 -0
- package/dist/docs/api/operations/list_link_targets.md +1 -0
- package/dist/docs/api/operations/list_migrations.md +1 -0
- package/dist/docs/api/operations/list_tables.md +2 -0
- package/dist/docs/api/operations/list_webhooks.md +1 -0
- package/dist/docs/api/operations/read_note.md +1 -0
- package/dist/docs/api/operations/record_tool_call.md +1 -0
- package/dist/docs/api/operations/search.md +39 -0
- package/dist/docs/api/operations/search_notes.md +1 -0
- package/dist/docs/api/operations/select_rows.md +1 -0
- package/dist/docs/api/operations/semantic_search.md +1 -0
- package/dist/docs/api/operations/table_changes.md +1 -0
- package/dist/docs/api/operations/tags/queries.md +1 -0
- package/dist/docs/api/operations/tags/tokens.md +1 -1
- package/dist/docs/api/operations/tokens_create.md +1 -0
- package/dist/docs/api/operations/tokens_update.md +2 -1
- package/dist/docs/api.md +5 -4
- package/dist/docs/develop/build-an-app.md +2 -1
- package/dist/docs/develop/change-feed-and-webhooks.md +1 -1
- package/dist/docs/develop/http-api.md +1 -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 +241 -38
- package/dist/docs/guides/database-objects/relations.md +28 -28
- package/dist/docs/guides/database-objects/tables.md +26 -26
- package/dist/docs/guides/database-objects/views.md +19 -19
- 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 +20 -20
- package/dist/docs/guides/read-and-write/write-rows.md +10 -10
- package/dist/docs/guides/search/hybrid.md +162 -0
- package/dist/docs/guides/search/text.md +1 -1
- package/dist/docs/guides/security/security-model.md +5 -3
- package/dist/docs/guides/security/tokens.md +134 -8
- package/dist/docs/guides/security/who-did-what.md +8 -0
- package/dist/docs/reference/cli.md +1 -1
- package/dist/docs/reference/glossary.md +1 -1
- package/dist/docs/reference/operations/auxiliary.md +2 -2
- package/dist/docs/reference/operations/queries.md +16 -0
- package/dist/docs/reference/operations/schema.md +2 -2
- package/dist/docs/reference/operations.md +2 -1
- package/dist/docs/release-notes.md +58 -0
- package/dist/docs/start/connect-agents.md +10 -3
- package/package.json +1 -1
package/SECURITY.md
CHANGED
|
@@ -58,13 +58,15 @@ The owner token is `httpServerToken` in the settings file. It can do everything:
|
|
|
58
58
|
|
|
59
59
|
The owner creates a named token with `POST /datanotes/tokens/create/`, and the engine stores only its hash, in `tokens.json` in its store, outside the vault. A named token has these permissions:
|
|
60
60
|
|
|
61
|
-
- **Read**:
|
|
61
|
+
- **Read**: only the tables in its `read` patterns; without `read`, every table
|
|
62
62
|
- **Write rows**: only the tables in its `write` patterns
|
|
63
63
|
- **Change the schema**: only with `ddl`
|
|
64
64
|
- **Maintain**: with `maintain`, it may also undo, restore, vacuum, configure the database and rebuild the semantic index; use it for an agent’s own token
|
|
65
65
|
|
|
66
66
|
A named token can’t create webhooks, manage tokens or read the engine’s status, and without `maintain` it can’t undo.
|
|
67
67
|
|
|
68
|
+
With `read` patterns, a token reads only the tables they match. It never reads the notes outside tables. Listings, search, the graph and the change feed leave out the rest. A query that names another table gets 403. A token always reads what it writes, and a token with `ddl` or `maintain` reads every table. Listings hide the other tables’ names. A refusal repeats a name the caller gave, so a guessed name isn’t secret. [Limit what a token can read](https://datanotes.dev/guides/security/tokens/#limit-what-a-token-can-read) lists the rules and the known gaps.
|
|
69
|
+
|
|
68
70
|
### Extensions
|
|
69
71
|
|
|
70
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.
|
|
@@ -75,7 +77,7 @@ An extension adds tables and Model Context Protocol (MCP) tools from a git repos
|
|
|
75
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.
|
|
76
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.
|
|
77
79
|
|
|
78
|
-
Known limits: extension code is not isolated from the MCP server's process.
|
|
80
|
+
Known limits: extension code is not isolated from the MCP server's process. The installer gives its token no `read`, so it reads every table. The owner may limit it with `read` patterns that cover the tables it writes. Migrations are declarative and run no code. [Install extensions](https://datanotes.dev/administration/extensions/) has the details.
|
|
79
81
|
|
|
80
82
|
### Who made each write
|
|
81
83
|
|
|
@@ -103,7 +105,7 @@ An agent reads your notes, and a note can hold text written to manipulate it: a
|
|
|
103
105
|
|
|
104
106
|
Limit what each agent can do:
|
|
105
107
|
|
|
106
|
-
- **Give it a named token**: grant only the tables it writes, and leave out `ddl` and `maintain` unless it needs them
|
|
108
|
+
- **Give it a named token**: grant only the tables it reads and writes, and leave out `ddl` and `maintain` unless it needs them
|
|
107
109
|
- **Give it only the tools it needs**: start the MCP server with `datanotes mcp --profile`, `--tools` or `--except`
|
|
108
110
|
- **Keep the webhook tools off**: they’re off by default, because a webhook sends change events to any URL
|
|
109
111
|
|
package/dist/api/extensions.cjs
CHANGED
|
@@ -299,7 +299,7 @@ var OPERATIONS = [
|
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
301
|
"name": "list_tables",
|
|
302
|
-
"description": "List every table: `name`, `catalog`, `schema`, `qualified` (`personal.metrics.mood` \u2014 use it\nwherever a table is expected; `metrics.mood` or `mood` also work when unambiguous), `path` and,\nwhen declared, `description`, `aliases` (other words for what it records) and `tags`. Tables are\ndefined in `metastore.yaml` (catalog \u2192 schema \u2192 table): read it freely, but it is read-only for\nagents and changes only through the schema operations (create_table, add_column, \u2026). Returns `{tables, views}`: `views` lists the stored views (same fields, no\npath): select them like tables. `system.information_schema` is read with `select_rows`.\n\nCall this first to find the table for what the user reports (match their words against\nname, description and aliases), and before creating tables or columns so you reuse existing\nones instead of creating duplicates.",
|
|
302
|
+
"description": "List every table: `name`, `catalog`, `schema`, `qualified` (`personal.metrics.mood` \u2014 use it\nwherever a table is expected; `metrics.mood` or `mood` also work when unambiguous), `path` and,\nwhen declared, `description`, `aliases` (other words for what it records) and `tags`. Tables are\ndefined in `metastore.yaml` (catalog \u2192 schema \u2192 table): read it freely, but it is read-only for\nagents and changes only through the schema operations (create_table, add_column, \u2026). Returns `{tables, views}`: `views` lists the stored views (same fields, no\npath): select them like tables. `system.information_schema` is read with `select_rows`.\nA token with `read` patterns sees only the tables and views it may read.\n\nCall this first to find the table for what the user reports (match their words against\nname, description and aliases), and before creating tables or columns so you reuse existing\nones instead of creating duplicates.",
|
|
303
303
|
"inputSchema": {
|
|
304
304
|
"additionalProperties": false,
|
|
305
305
|
"properties": {},
|
|
@@ -564,7 +564,7 @@ var OPERATIONS = [
|
|
|
564
564
|
},
|
|
565
565
|
"generated": {
|
|
566
566
|
"type": "string",
|
|
567
|
-
"description":
|
|
567
|
+
"description": 'Expression of a generated column: a column, `date(col)\xB1N`, a template like `{name} {surname}`, `link(<template>)`, or an aggregate of a json list of objects like `count(feeds, side = "left")` or `sum(feeds.min)`.'
|
|
568
568
|
},
|
|
569
569
|
"dense": {
|
|
570
570
|
"type": "boolean",
|
|
@@ -685,7 +685,7 @@ var OPERATIONS = [
|
|
|
685
685
|
},
|
|
686
686
|
{
|
|
687
687
|
"name": "create_table",
|
|
688
|
-
"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).\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).',
|
|
688
|
+
"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).',
|
|
689
689
|
"inputSchema": {
|
|
690
690
|
"additionalProperties": false,
|
|
691
691
|
"properties": {
|
|
@@ -1779,7 +1779,7 @@ var OPERATIONS = [
|
|
|
1779
1779
|
},
|
|
1780
1780
|
{
|
|
1781
1781
|
"name": "add_column",
|
|
1782
|
-
"description": 'Add a typed column. Sparse by default (written only on rows that have a value \u2014 use for\nmetrics, e.g. `{"name": "metric_mood", "type": "integer", "min": 1, "max": 5, "label":\n"Mood", "aliases": ["mood"], "description": "Mood of the day, 1 = bad, 5 = great"}`).\n`description` is required: what the column holds, for the agents and people who read the schema\n(the engine writes it for `identity` "uuid" / "created" columns).\n`dense: true` in the spec adds it to every row with its `default`. Call `describe_table` first: never add\na column whose meaning an existing column (name/label/aliases/description) already covers.\nColumn names are permanent identifiers; only `rename_column` 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).\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.\nAcyclic links: `acyclic: true` on a link (or list of links) to the table itself refuses every write that closes a cycle, on either side of an `inverse`; refused while existing rows form one (they are listed).\n\nThe schema changes only through operations like this one: never edit metastore.yaml by hand (no validation, no undo).',
|
|
1782
|
+
"description": 'Add a typed column. Sparse by default (written only on rows that have a value \u2014 use for\nmetrics, e.g. `{"name": "metric_mood", "type": "integer", "min": 1, "max": 5, "label":\n"Mood", "aliases": ["mood"], "description": "Mood of the day, 1 = bad, 5 = great"}`).\n`description` is required: what the column holds, for the agents and people who read the schema\n(the engine writes it for `identity` "uuid" / "created" columns).\n`dense: true` in the spec adds it to every row with its `default`. Call `describe_table` first: never add\na column whose meaning an existing column (name/label/aliases/description) already covers.\nColumn names are permanent identifiers; only `rename_column` 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.\nAcyclic links: `acyclic: true` on a link (or list of links) to the table itself refuses every write that closes a cycle, on either side of an `inverse`; refused while existing rows form one (they are listed).\n\nThe schema changes only through operations like this one: never edit metastore.yaml by hand (no validation, no undo).',
|
|
1783
1783
|
"inputSchema": {
|
|
1784
1784
|
"additionalProperties": false,
|
|
1785
1785
|
"properties": {
|
|
@@ -5178,7 +5178,7 @@ var OPERATIONS = [
|
|
|
5178
5178
|
},
|
|
5179
5179
|
{
|
|
5180
5180
|
"name": "describe_database",
|
|
5181
|
-
"description": "Describe the database: its folder (`root`), `metastore` (`metastore.yaml`: read it freely,\nbut it is read-only for agents and changes only through the schema operations), configuration\n(default catalog and schema, row partition and file-name formats, archive folder, time zone,\nhistory, automatic links),\njournal folder, `bases` (shared column sets and the tables using them), `catalogs` \u2192 `schemas` \u2192 `tables` (with `row_count`, `tags`, and `unreadable_count` when some rows' front matter cannot be read) and `views`;\ncatalogs and schemas show their `comment` (set with `comment_on`). A table or base defined before\ndescriptions were required has `missing_descriptions`: what lacks one, for alter_table / alter_column\n(define_base for a base) to fill, so every table and column says what it holds.",
|
|
5181
|
+
"description": "Describe the database: its folder (`root`), `metastore` (`metastore.yaml`: read it freely,\nbut it is read-only for agents and changes only through the schema operations), configuration\n(default catalog and schema, row partition and file-name formats, archive folder, time zone,\nhistory, automatic links),\njournal folder, `bases` (shared column sets and the tables using them), `catalogs` \u2192 `schemas` \u2192 `tables` (with `row_count`, `tags`, and `unreadable_count` when some rows' front matter cannot be read) and `views`;\ncatalogs and schemas show their `comment` (set with `comment_on`). A table or base defined before\ndescriptions were required has `missing_descriptions`: what lacks one, for alter_table / alter_column\n(define_base for a base) to fill, so every table and column says what it holds.\nA token with `read` patterns sees only the tables, views and bases it may read.",
|
|
5182
5182
|
"inputSchema": {
|
|
5183
5183
|
"additionalProperties": false,
|
|
5184
5184
|
"properties": {},
|
|
@@ -11742,6 +11742,141 @@ var OPERATIONS = [
|
|
|
11742
11742
|
]
|
|
11743
11743
|
}
|
|
11744
11744
|
},
|
|
11745
|
+
{
|
|
11746
|
+
"name": "search",
|
|
11747
|
+
"description": "Search the notes by their words and, when semantic search is on, by their meaning:\n`{query, results: [{path, table?, score, heading, snippet, matched_by}], meaning}`, one result per\nnote, best first. It always works: with semantic search off it ranks by words alone (BM25:\nrare words count more; a word in the note's name or properties counts more), with it on it fuses\nboth rankings (Reciprocal Rank Fusion), so a note found only by its words or only by its meaning\nis still there. `matched_by` says which (`words`, `meaning`); `meaning` is `on`, `off` or `failed`\n(the embedding provider failed: words only, `meaning_error` says why). Query syntax as search_docs:\n`\"a phrase\"` and `+word` must appear, `-word` must not (both rankings); words in any language,\ncase and accents ignored, no stemming. Filters: `tables` (qualified or short names), `folder`,\n`min_score` (the meaning ranking's cosine floor). `limit`: default 10, max 100. Then read_note /\nselect_rows for the details.",
|
|
11748
|
+
"inputSchema": {
|
|
11749
|
+
"additionalProperties": false,
|
|
11750
|
+
"properties": {
|
|
11751
|
+
"query": {
|
|
11752
|
+
"type": "string"
|
|
11753
|
+
},
|
|
11754
|
+
"limit": {
|
|
11755
|
+
"default": 10,
|
|
11756
|
+
"type": "integer"
|
|
11757
|
+
},
|
|
11758
|
+
"tables": {
|
|
11759
|
+
"anyOf": [
|
|
11760
|
+
{
|
|
11761
|
+
"items": {
|
|
11762
|
+
"type": "string"
|
|
11763
|
+
},
|
|
11764
|
+
"type": "array"
|
|
11765
|
+
},
|
|
11766
|
+
{
|
|
11767
|
+
"type": "null"
|
|
11768
|
+
}
|
|
11769
|
+
],
|
|
11770
|
+
"default": null
|
|
11771
|
+
},
|
|
11772
|
+
"folder": {
|
|
11773
|
+
"anyOf": [
|
|
11774
|
+
{
|
|
11775
|
+
"type": "string"
|
|
11776
|
+
},
|
|
11777
|
+
{
|
|
11778
|
+
"type": "null"
|
|
11779
|
+
}
|
|
11780
|
+
],
|
|
11781
|
+
"default": null
|
|
11782
|
+
},
|
|
11783
|
+
"min_score": {
|
|
11784
|
+
"anyOf": [
|
|
11785
|
+
{
|
|
11786
|
+
"type": "number"
|
|
11787
|
+
},
|
|
11788
|
+
{
|
|
11789
|
+
"type": "null"
|
|
11790
|
+
}
|
|
11791
|
+
],
|
|
11792
|
+
"default": null
|
|
11793
|
+
}
|
|
11794
|
+
},
|
|
11795
|
+
"required": [
|
|
11796
|
+
"query"
|
|
11797
|
+
],
|
|
11798
|
+
"type": "object"
|
|
11799
|
+
},
|
|
11800
|
+
"annotations": {
|
|
11801
|
+
"title": "Search",
|
|
11802
|
+
"readOnlyHint": true,
|
|
11803
|
+
"destructiveHint": false,
|
|
11804
|
+
"idempotentHint": true,
|
|
11805
|
+
"openWorldHint": false
|
|
11806
|
+
},
|
|
11807
|
+
"responseSchema": {
|
|
11808
|
+
"type": "object",
|
|
11809
|
+
"properties": {
|
|
11810
|
+
"query": {
|
|
11811
|
+
"type": "string"
|
|
11812
|
+
},
|
|
11813
|
+
"results": {
|
|
11814
|
+
"type": "array",
|
|
11815
|
+
"items": {
|
|
11816
|
+
"type": "object",
|
|
11817
|
+
"properties": {
|
|
11818
|
+
"path": {
|
|
11819
|
+
"type": "string"
|
|
11820
|
+
},
|
|
11821
|
+
"table": {
|
|
11822
|
+
"type": "string",
|
|
11823
|
+
"description": "Qualified table of a row note."
|
|
11824
|
+
},
|
|
11825
|
+
"score": {
|
|
11826
|
+
"type": "number",
|
|
11827
|
+
"description": "BM25 when ranked by words alone; the Reciprocal Rank Fusion score when fused."
|
|
11828
|
+
},
|
|
11829
|
+
"heading": {
|
|
11830
|
+
"type": "string",
|
|
11831
|
+
"description": "Heading above the match (empty before the first heading)."
|
|
11832
|
+
},
|
|
11833
|
+
"snippet": {
|
|
11834
|
+
"type": "string",
|
|
11835
|
+
"description": "About 200 characters around the first match, or the best passage by meaning."
|
|
11836
|
+
},
|
|
11837
|
+
"matched_by": {
|
|
11838
|
+
"type": "array",
|
|
11839
|
+
"items": {
|
|
11840
|
+
"type": "string",
|
|
11841
|
+
"enum": [
|
|
11842
|
+
"words",
|
|
11843
|
+
"meaning"
|
|
11844
|
+
]
|
|
11845
|
+
},
|
|
11846
|
+
"description": "The rankings the note is in."
|
|
11847
|
+
}
|
|
11848
|
+
},
|
|
11849
|
+
"required": [
|
|
11850
|
+
"path",
|
|
11851
|
+
"score",
|
|
11852
|
+
"heading",
|
|
11853
|
+
"snippet",
|
|
11854
|
+
"matched_by"
|
|
11855
|
+
]
|
|
11856
|
+
},
|
|
11857
|
+
"description": "One result per note, best first."
|
|
11858
|
+
},
|
|
11859
|
+
"meaning": {
|
|
11860
|
+
"type": "string",
|
|
11861
|
+
"enum": [
|
|
11862
|
+
"on",
|
|
11863
|
+
"off",
|
|
11864
|
+
"failed"
|
|
11865
|
+
],
|
|
11866
|
+
"description": "on: words and meaning fused; off: semantic search is off, words only; failed: the embedding provider failed, words only."
|
|
11867
|
+
},
|
|
11868
|
+
"meaning_error": {
|
|
11869
|
+
"type": "string",
|
|
11870
|
+
"description": "Why the meaning ranking failed (with meaning: failed)."
|
|
11871
|
+
}
|
|
11872
|
+
},
|
|
11873
|
+
"required": [
|
|
11874
|
+
"query",
|
|
11875
|
+
"results",
|
|
11876
|
+
"meaning"
|
|
11877
|
+
]
|
|
11878
|
+
}
|
|
11879
|
+
},
|
|
11745
11880
|
{
|
|
11746
11881
|
"name": "describe_semantic_index",
|
|
11747
11882
|
"description": "The semantic search index: `enabled`, `provider`, `model`, `files`, `passages`, `pending`,\n`running`, `last_sync`, `last_error`. sync_semantic_index brings it up to date.",
|
|
@@ -17867,6 +18002,7 @@ var OPERATION_KIND = {
|
|
|
17867
18002
|
list_folder: "queries",
|
|
17868
18003
|
search_notes: "queries",
|
|
17869
18004
|
semantic_search: "queries",
|
|
18005
|
+
search: "queries",
|
|
17870
18006
|
graph_neighbors: "queries",
|
|
17871
18007
|
graph_traverse: "queries",
|
|
17872
18008
|
graph_path: "queries",
|
package/dist/api/extensions.js
CHANGED
|
@@ -238,7 +238,7 @@ var OPERATIONS = [
|
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
"name": "list_tables",
|
|
241
|
-
"description": "List every table: `name`, `catalog`, `schema`, `qualified` (`personal.metrics.mood` \u2014 use it\nwherever a table is expected; `metrics.mood` or `mood` also work when unambiguous), `path` and,\nwhen declared, `description`, `aliases` (other words for what it records) and `tags`. Tables are\ndefined in `metastore.yaml` (catalog \u2192 schema \u2192 table): read it freely, but it is read-only for\nagents and changes only through the schema operations (create_table, add_column, \u2026). Returns `{tables, views}`: `views` lists the stored views (same fields, no\npath): select them like tables. `system.information_schema` is read with `select_rows`.\n\nCall this first to find the table for what the user reports (match their words against\nname, description and aliases), and before creating tables or columns so you reuse existing\nones instead of creating duplicates.",
|
|
241
|
+
"description": "List every table: `name`, `catalog`, `schema`, `qualified` (`personal.metrics.mood` \u2014 use it\nwherever a table is expected; `metrics.mood` or `mood` also work when unambiguous), `path` and,\nwhen declared, `description`, `aliases` (other words for what it records) and `tags`. Tables are\ndefined in `metastore.yaml` (catalog \u2192 schema \u2192 table): read it freely, but it is read-only for\nagents and changes only through the schema operations (create_table, add_column, \u2026). Returns `{tables, views}`: `views` lists the stored views (same fields, no\npath): select them like tables. `system.information_schema` is read with `select_rows`.\nA token with `read` patterns sees only the tables and views it may read.\n\nCall this first to find the table for what the user reports (match their words against\nname, description and aliases), and before creating tables or columns so you reuse existing\nones instead of creating duplicates.",
|
|
242
242
|
"inputSchema": {
|
|
243
243
|
"additionalProperties": false,
|
|
244
244
|
"properties": {},
|
|
@@ -503,7 +503,7 @@ var OPERATIONS = [
|
|
|
503
503
|
},
|
|
504
504
|
"generated": {
|
|
505
505
|
"type": "string",
|
|
506
|
-
"description":
|
|
506
|
+
"description": 'Expression of a generated column: a column, `date(col)\xB1N`, a template like `{name} {surname}`, `link(<template>)`, or an aggregate of a json list of objects like `count(feeds, side = "left")` or `sum(feeds.min)`.'
|
|
507
507
|
},
|
|
508
508
|
"dense": {
|
|
509
509
|
"type": "boolean",
|
|
@@ -624,7 +624,7 @@ var OPERATIONS = [
|
|
|
624
624
|
},
|
|
625
625
|
{
|
|
626
626
|
"name": "create_table",
|
|
627
|
-
"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).\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).',
|
|
627
|
+
"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).',
|
|
628
628
|
"inputSchema": {
|
|
629
629
|
"additionalProperties": false,
|
|
630
630
|
"properties": {
|
|
@@ -1718,7 +1718,7 @@ var OPERATIONS = [
|
|
|
1718
1718
|
},
|
|
1719
1719
|
{
|
|
1720
1720
|
"name": "add_column",
|
|
1721
|
-
"description": 'Add a typed column. Sparse by default (written only on rows that have a value \u2014 use for\nmetrics, e.g. `{"name": "metric_mood", "type": "integer", "min": 1, "max": 5, "label":\n"Mood", "aliases": ["mood"], "description": "Mood of the day, 1 = bad, 5 = great"}`).\n`description` is required: what the column holds, for the agents and people who read the schema\n(the engine writes it for `identity` "uuid" / "created" columns).\n`dense: true` in the spec adds it to every row with its `default`. Call `describe_table` first: never add\na column whose meaning an existing column (name/label/aliases/description) already covers.\nColumn names are permanent identifiers; only `rename_column` 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).\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.\nAcyclic links: `acyclic: true` on a link (or list of links) to the table itself refuses every write that closes a cycle, on either side of an `inverse`; refused while existing rows form one (they are listed).\n\nThe schema changes only through operations like this one: never edit metastore.yaml by hand (no validation, no undo).',
|
|
1721
|
+
"description": 'Add a typed column. Sparse by default (written only on rows that have a value \u2014 use for\nmetrics, e.g. `{"name": "metric_mood", "type": "integer", "min": 1, "max": 5, "label":\n"Mood", "aliases": ["mood"], "description": "Mood of the day, 1 = bad, 5 = great"}`).\n`description` is required: what the column holds, for the agents and people who read the schema\n(the engine writes it for `identity` "uuid" / "created" columns).\n`dense: true` in the spec adds it to every row with its `default`. Call `describe_table` first: never add\na column whose meaning an existing column (name/label/aliases/description) already covers.\nColumn names are permanent identifiers; only `rename_column` 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.\nAcyclic links: `acyclic: true` on a link (or list of links) to the table itself refuses every write that closes a cycle, on either side of an `inverse`; refused while existing rows form one (they are listed).\n\nThe schema changes only through operations like this one: never edit metastore.yaml by hand (no validation, no undo).',
|
|
1722
1722
|
"inputSchema": {
|
|
1723
1723
|
"additionalProperties": false,
|
|
1724
1724
|
"properties": {
|
|
@@ -5117,7 +5117,7 @@ var OPERATIONS = [
|
|
|
5117
5117
|
},
|
|
5118
5118
|
{
|
|
5119
5119
|
"name": "describe_database",
|
|
5120
|
-
"description": "Describe the database: its folder (`root`), `metastore` (`metastore.yaml`: read it freely,\nbut it is read-only for agents and changes only through the schema operations), configuration\n(default catalog and schema, row partition and file-name formats, archive folder, time zone,\nhistory, automatic links),\njournal folder, `bases` (shared column sets and the tables using them), `catalogs` \u2192 `schemas` \u2192 `tables` (with `row_count`, `tags`, and `unreadable_count` when some rows' front matter cannot be read) and `views`;\ncatalogs and schemas show their `comment` (set with `comment_on`). A table or base defined before\ndescriptions were required has `missing_descriptions`: what lacks one, for alter_table / alter_column\n(define_base for a base) to fill, so every table and column says what it holds.",
|
|
5120
|
+
"description": "Describe the database: its folder (`root`), `metastore` (`metastore.yaml`: read it freely,\nbut it is read-only for agents and changes only through the schema operations), configuration\n(default catalog and schema, row partition and file-name formats, archive folder, time zone,\nhistory, automatic links),\njournal folder, `bases` (shared column sets and the tables using them), `catalogs` \u2192 `schemas` \u2192 `tables` (with `row_count`, `tags`, and `unreadable_count` when some rows' front matter cannot be read) and `views`;\ncatalogs and schemas show their `comment` (set with `comment_on`). A table or base defined before\ndescriptions were required has `missing_descriptions`: what lacks one, for alter_table / alter_column\n(define_base for a base) to fill, so every table and column says what it holds.\nA token with `read` patterns sees only the tables, views and bases it may read.",
|
|
5121
5121
|
"inputSchema": {
|
|
5122
5122
|
"additionalProperties": false,
|
|
5123
5123
|
"properties": {},
|
|
@@ -11681,6 +11681,141 @@ var OPERATIONS = [
|
|
|
11681
11681
|
]
|
|
11682
11682
|
}
|
|
11683
11683
|
},
|
|
11684
|
+
{
|
|
11685
|
+
"name": "search",
|
|
11686
|
+
"description": "Search the notes by their words and, when semantic search is on, by their meaning:\n`{query, results: [{path, table?, score, heading, snippet, matched_by}], meaning}`, one result per\nnote, best first. It always works: with semantic search off it ranks by words alone (BM25:\nrare words count more; a word in the note's name or properties counts more), with it on it fuses\nboth rankings (Reciprocal Rank Fusion), so a note found only by its words or only by its meaning\nis still there. `matched_by` says which (`words`, `meaning`); `meaning` is `on`, `off` or `failed`\n(the embedding provider failed: words only, `meaning_error` says why). Query syntax as search_docs:\n`\"a phrase\"` and `+word` must appear, `-word` must not (both rankings); words in any language,\ncase and accents ignored, no stemming. Filters: `tables` (qualified or short names), `folder`,\n`min_score` (the meaning ranking's cosine floor). `limit`: default 10, max 100. Then read_note /\nselect_rows for the details.",
|
|
11687
|
+
"inputSchema": {
|
|
11688
|
+
"additionalProperties": false,
|
|
11689
|
+
"properties": {
|
|
11690
|
+
"query": {
|
|
11691
|
+
"type": "string"
|
|
11692
|
+
},
|
|
11693
|
+
"limit": {
|
|
11694
|
+
"default": 10,
|
|
11695
|
+
"type": "integer"
|
|
11696
|
+
},
|
|
11697
|
+
"tables": {
|
|
11698
|
+
"anyOf": [
|
|
11699
|
+
{
|
|
11700
|
+
"items": {
|
|
11701
|
+
"type": "string"
|
|
11702
|
+
},
|
|
11703
|
+
"type": "array"
|
|
11704
|
+
},
|
|
11705
|
+
{
|
|
11706
|
+
"type": "null"
|
|
11707
|
+
}
|
|
11708
|
+
],
|
|
11709
|
+
"default": null
|
|
11710
|
+
},
|
|
11711
|
+
"folder": {
|
|
11712
|
+
"anyOf": [
|
|
11713
|
+
{
|
|
11714
|
+
"type": "string"
|
|
11715
|
+
},
|
|
11716
|
+
{
|
|
11717
|
+
"type": "null"
|
|
11718
|
+
}
|
|
11719
|
+
],
|
|
11720
|
+
"default": null
|
|
11721
|
+
},
|
|
11722
|
+
"min_score": {
|
|
11723
|
+
"anyOf": [
|
|
11724
|
+
{
|
|
11725
|
+
"type": "number"
|
|
11726
|
+
},
|
|
11727
|
+
{
|
|
11728
|
+
"type": "null"
|
|
11729
|
+
}
|
|
11730
|
+
],
|
|
11731
|
+
"default": null
|
|
11732
|
+
}
|
|
11733
|
+
},
|
|
11734
|
+
"required": [
|
|
11735
|
+
"query"
|
|
11736
|
+
],
|
|
11737
|
+
"type": "object"
|
|
11738
|
+
},
|
|
11739
|
+
"annotations": {
|
|
11740
|
+
"title": "Search",
|
|
11741
|
+
"readOnlyHint": true,
|
|
11742
|
+
"destructiveHint": false,
|
|
11743
|
+
"idempotentHint": true,
|
|
11744
|
+
"openWorldHint": false
|
|
11745
|
+
},
|
|
11746
|
+
"responseSchema": {
|
|
11747
|
+
"type": "object",
|
|
11748
|
+
"properties": {
|
|
11749
|
+
"query": {
|
|
11750
|
+
"type": "string"
|
|
11751
|
+
},
|
|
11752
|
+
"results": {
|
|
11753
|
+
"type": "array",
|
|
11754
|
+
"items": {
|
|
11755
|
+
"type": "object",
|
|
11756
|
+
"properties": {
|
|
11757
|
+
"path": {
|
|
11758
|
+
"type": "string"
|
|
11759
|
+
},
|
|
11760
|
+
"table": {
|
|
11761
|
+
"type": "string",
|
|
11762
|
+
"description": "Qualified table of a row note."
|
|
11763
|
+
},
|
|
11764
|
+
"score": {
|
|
11765
|
+
"type": "number",
|
|
11766
|
+
"description": "BM25 when ranked by words alone; the Reciprocal Rank Fusion score when fused."
|
|
11767
|
+
},
|
|
11768
|
+
"heading": {
|
|
11769
|
+
"type": "string",
|
|
11770
|
+
"description": "Heading above the match (empty before the first heading)."
|
|
11771
|
+
},
|
|
11772
|
+
"snippet": {
|
|
11773
|
+
"type": "string",
|
|
11774
|
+
"description": "About 200 characters around the first match, or the best passage by meaning."
|
|
11775
|
+
},
|
|
11776
|
+
"matched_by": {
|
|
11777
|
+
"type": "array",
|
|
11778
|
+
"items": {
|
|
11779
|
+
"type": "string",
|
|
11780
|
+
"enum": [
|
|
11781
|
+
"words",
|
|
11782
|
+
"meaning"
|
|
11783
|
+
]
|
|
11784
|
+
},
|
|
11785
|
+
"description": "The rankings the note is in."
|
|
11786
|
+
}
|
|
11787
|
+
},
|
|
11788
|
+
"required": [
|
|
11789
|
+
"path",
|
|
11790
|
+
"score",
|
|
11791
|
+
"heading",
|
|
11792
|
+
"snippet",
|
|
11793
|
+
"matched_by"
|
|
11794
|
+
]
|
|
11795
|
+
},
|
|
11796
|
+
"description": "One result per note, best first."
|
|
11797
|
+
},
|
|
11798
|
+
"meaning": {
|
|
11799
|
+
"type": "string",
|
|
11800
|
+
"enum": [
|
|
11801
|
+
"on",
|
|
11802
|
+
"off",
|
|
11803
|
+
"failed"
|
|
11804
|
+
],
|
|
11805
|
+
"description": "on: words and meaning fused; off: semantic search is off, words only; failed: the embedding provider failed, words only."
|
|
11806
|
+
},
|
|
11807
|
+
"meaning_error": {
|
|
11808
|
+
"type": "string",
|
|
11809
|
+
"description": "Why the meaning ranking failed (with meaning: failed)."
|
|
11810
|
+
}
|
|
11811
|
+
},
|
|
11812
|
+
"required": [
|
|
11813
|
+
"query",
|
|
11814
|
+
"results",
|
|
11815
|
+
"meaning"
|
|
11816
|
+
]
|
|
11817
|
+
}
|
|
11818
|
+
},
|
|
11684
11819
|
{
|
|
11685
11820
|
"name": "describe_semantic_index",
|
|
11686
11821
|
"description": "The semantic search index: `enabled`, `provider`, `model`, `files`, `passages`, `pending`,\n`running`, `last_sync`, `last_error`. sync_semantic_index brings it up to date.",
|
|
@@ -17806,6 +17941,7 @@ var OPERATION_KIND = {
|
|
|
17806
17941
|
list_folder: "queries",
|
|
17807
17942
|
search_notes: "queries",
|
|
17808
17943
|
semantic_search: "queries",
|
|
17944
|
+
search: "queries",
|
|
17809
17945
|
graph_neighbors: "queries",
|
|
17810
17946
|
graph_traverse: "queries",
|
|
17811
17947
|
graph_path: "queries",
|