datanotes 3.3.0 → 3.4.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/SECURITY.md +5 -3
- package/dist/api/extensions.cjs +1345 -21
- package/dist/api/extensions.js +1345 -21
- package/dist/api/index.cjs +1345 -21
- package/dist/api/index.js +1345 -21
- package/dist/api/mcp.cjs +1345 -21
- package/dist/api/mcp.js +1345 -21
- package/dist/datanotes.cjs +2927 -609
- package/dist/docs/administration/extensions.md +2 -2
- package/dist/docs/api/operations/add_column.md +1 -0
- package/dist/docs/api/operations/alter_table.md +4 -3
- 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/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/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 +30 -10
- package/dist/docs/guides/database-objects/columns.md +243 -40
- package/dist/docs/guides/database-objects/relations.md +28 -28
- package/dist/docs/guides/database-objects/tables.md +167 -43
- 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 +20 -20
- package/dist/docs/guides/read-and-write/joins-and-aggregates.md +7 -7
- package/dist/docs/guides/read-and-write/read-and-filter.md +10 -10
- package/dist/docs/guides/read-and-write/write-rows.md +10 -10
- package/dist/docs/guides/search/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 +121 -8
- package/dist/docs/reference/cli.md +1 -1
- package/dist/docs/reference/glossary.md +1 -1
- package/dist/docs/reference/operations/auxiliary.md +3 -3
- package/dist/docs/reference/operations/queries.md +16 -0
- package/dist/docs/reference/operations/rows.md +1 -1
- package/dist/docs/reference/operations/schema.md +5 -5
- package/dist/docs/reference/operations.md +6 -5
- package/dist/docs/release-notes.md +59 -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
|
|