datanotes 3.2.0 → 3.3.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/README.md +1 -0
- package/SECURITY.md +12 -0
- package/dist/api/client.d.cts +2 -0
- package/dist/api/client.d.ts +2 -0
- package/dist/api/docs.d.cts +14 -4
- package/dist/api/docs.d.ts +14 -4
- package/dist/api/extension-files.d.cts +23 -0
- package/dist/api/extension-files.d.ts +23 -0
- package/dist/api/extension-host.d.cts +108 -0
- package/dist/api/extension-host.d.ts +108 -0
- package/dist/api/extension-manifest.d.cts +154 -0
- package/dist/api/extension-manifest.d.ts +154 -0
- package/dist/api/extension-plan.d.cts +174 -0
- package/dist/api/extension-plan.d.ts +174 -0
- package/dist/api/extension-record.d.cts +65 -0
- package/dist/api/extension-record.d.ts +65 -0
- package/dist/api/extension-sdk.d.cts +65 -0
- package/dist/api/extension-sdk.d.ts +65 -0
- package/dist/api/extensions.cjs +19660 -0
- package/dist/api/extensions.d.cts +11 -0
- package/dist/api/extensions.d.ts +11 -0
- package/dist/api/extensions.js +19597 -0
- package/dist/api/index.cjs +1568 -375
- package/dist/api/index.js +1568 -375
- package/dist/api/mcp.cjs +1238 -27
- package/dist/api/mcp.js +1238 -27
- package/dist/datanotes.cjs +8365 -4335
- package/dist/docs/administration/extensions.md +213 -0
- package/dist/docs/api/operations/alter_table.md +4 -3
- package/dist/docs/api/operations/extensions_delete.md +29 -0
- package/dist/docs/api/operations/extensions_list.md +20 -0
- package/dist/docs/api/operations/extensions_record.md +44 -0
- package/dist/docs/api/operations/tags/extensions.md +9 -0
- package/dist/docs/api.md +9 -1
- package/dist/docs/develop/write-an-extension.md +369 -0
- 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 +38 -38
- 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/text.md +1 -1
- package/dist/docs/guides/security/security-model.md +12 -0
- package/dist/docs/reference/cli.md +32 -1
- package/dist/docs/reference/glossary.md +8 -0
- package/dist/docs/reference/operations/auxiliary.md +1 -1
- package/dist/docs/reference/operations/rows.md +1 -1
- package/dist/docs/reference/operations/schema.md +3 -3
- package/dist/docs/reference/operations.md +4 -4
- package/dist/docs/release-notes.md +49 -0
- package/dist/docs/start/connect-agents.md +11 -0
- package/package.json +11 -1
package/dist/api/index.cjs
CHANGED
|
@@ -1239,6 +1239,50 @@ var OPERATIONS = [
|
|
|
1239
1239
|
]
|
|
1240
1240
|
},
|
|
1241
1241
|
"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."
|
|
1242
|
+
},
|
|
1243
|
+
"schema_references": {
|
|
1244
|
+
"type": "array",
|
|
1245
|
+
"items": {
|
|
1246
|
+
"title": "SchemaReference",
|
|
1247
|
+
"type": "object",
|
|
1248
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
1249
|
+
"properties": {
|
|
1250
|
+
"table": {
|
|
1251
|
+
"type": "string",
|
|
1252
|
+
"description": "The table whose column names it (full name)."
|
|
1253
|
+
},
|
|
1254
|
+
"base": {
|
|
1255
|
+
"type": "string",
|
|
1256
|
+
"description": "The base whose column names it."
|
|
1257
|
+
},
|
|
1258
|
+
"view": {
|
|
1259
|
+
"type": "string",
|
|
1260
|
+
"description": "The view whose query names it (full name)."
|
|
1261
|
+
},
|
|
1262
|
+
"column": {
|
|
1263
|
+
"type": "string",
|
|
1264
|
+
"description": "The column of the table or base."
|
|
1265
|
+
},
|
|
1266
|
+
"key": {
|
|
1267
|
+
"type": "string",
|
|
1268
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
1269
|
+
},
|
|
1270
|
+
"from": {
|
|
1271
|
+
"type": "string",
|
|
1272
|
+
"description": "The name as written before."
|
|
1273
|
+
},
|
|
1274
|
+
"to": {
|
|
1275
|
+
"type": "string",
|
|
1276
|
+
"description": "The name written in its place."
|
|
1277
|
+
}
|
|
1278
|
+
},
|
|
1279
|
+
"required": [
|
|
1280
|
+
"key",
|
|
1281
|
+
"from",
|
|
1282
|
+
"to"
|
|
1283
|
+
]
|
|
1284
|
+
},
|
|
1285
|
+
"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."
|
|
1242
1286
|
}
|
|
1243
1287
|
},
|
|
1244
1288
|
"required": [
|
|
@@ -1652,6 +1696,50 @@ var OPERATIONS = [
|
|
|
1652
1696
|
]
|
|
1653
1697
|
},
|
|
1654
1698
|
"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."
|
|
1699
|
+
},
|
|
1700
|
+
"schema_references": {
|
|
1701
|
+
"type": "array",
|
|
1702
|
+
"items": {
|
|
1703
|
+
"title": "SchemaReference",
|
|
1704
|
+
"type": "object",
|
|
1705
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
1706
|
+
"properties": {
|
|
1707
|
+
"table": {
|
|
1708
|
+
"type": "string",
|
|
1709
|
+
"description": "The table whose column names it (full name)."
|
|
1710
|
+
},
|
|
1711
|
+
"base": {
|
|
1712
|
+
"type": "string",
|
|
1713
|
+
"description": "The base whose column names it."
|
|
1714
|
+
},
|
|
1715
|
+
"view": {
|
|
1716
|
+
"type": "string",
|
|
1717
|
+
"description": "The view whose query names it (full name)."
|
|
1718
|
+
},
|
|
1719
|
+
"column": {
|
|
1720
|
+
"type": "string",
|
|
1721
|
+
"description": "The column of the table or base."
|
|
1722
|
+
},
|
|
1723
|
+
"key": {
|
|
1724
|
+
"type": "string",
|
|
1725
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
1726
|
+
},
|
|
1727
|
+
"from": {
|
|
1728
|
+
"type": "string",
|
|
1729
|
+
"description": "The name as written before."
|
|
1730
|
+
},
|
|
1731
|
+
"to": {
|
|
1732
|
+
"type": "string",
|
|
1733
|
+
"description": "The name written in its place."
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1736
|
+
"required": [
|
|
1737
|
+
"key",
|
|
1738
|
+
"from",
|
|
1739
|
+
"to"
|
|
1740
|
+
]
|
|
1741
|
+
},
|
|
1742
|
+
"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."
|
|
1655
1743
|
}
|
|
1656
1744
|
},
|
|
1657
1745
|
"required": [
|
|
@@ -2056,6 +2144,50 @@ var OPERATIONS = [
|
|
|
2056
2144
|
]
|
|
2057
2145
|
},
|
|
2058
2146
|
"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."
|
|
2147
|
+
},
|
|
2148
|
+
"schema_references": {
|
|
2149
|
+
"type": "array",
|
|
2150
|
+
"items": {
|
|
2151
|
+
"title": "SchemaReference",
|
|
2152
|
+
"type": "object",
|
|
2153
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
2154
|
+
"properties": {
|
|
2155
|
+
"table": {
|
|
2156
|
+
"type": "string",
|
|
2157
|
+
"description": "The table whose column names it (full name)."
|
|
2158
|
+
},
|
|
2159
|
+
"base": {
|
|
2160
|
+
"type": "string",
|
|
2161
|
+
"description": "The base whose column names it."
|
|
2162
|
+
},
|
|
2163
|
+
"view": {
|
|
2164
|
+
"type": "string",
|
|
2165
|
+
"description": "The view whose query names it (full name)."
|
|
2166
|
+
},
|
|
2167
|
+
"column": {
|
|
2168
|
+
"type": "string",
|
|
2169
|
+
"description": "The column of the table or base."
|
|
2170
|
+
},
|
|
2171
|
+
"key": {
|
|
2172
|
+
"type": "string",
|
|
2173
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
2174
|
+
},
|
|
2175
|
+
"from": {
|
|
2176
|
+
"type": "string",
|
|
2177
|
+
"description": "The name as written before."
|
|
2178
|
+
},
|
|
2179
|
+
"to": {
|
|
2180
|
+
"type": "string",
|
|
2181
|
+
"description": "The name written in its place."
|
|
2182
|
+
}
|
|
2183
|
+
},
|
|
2184
|
+
"required": [
|
|
2185
|
+
"key",
|
|
2186
|
+
"from",
|
|
2187
|
+
"to"
|
|
2188
|
+
]
|
|
2189
|
+
},
|
|
2190
|
+
"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."
|
|
2059
2191
|
}
|
|
2060
2192
|
},
|
|
2061
2193
|
"required": [
|
|
@@ -2462,6 +2594,50 @@ var OPERATIONS = [
|
|
|
2462
2594
|
]
|
|
2463
2595
|
},
|
|
2464
2596
|
"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."
|
|
2597
|
+
},
|
|
2598
|
+
"schema_references": {
|
|
2599
|
+
"type": "array",
|
|
2600
|
+
"items": {
|
|
2601
|
+
"title": "SchemaReference",
|
|
2602
|
+
"type": "object",
|
|
2603
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
2604
|
+
"properties": {
|
|
2605
|
+
"table": {
|
|
2606
|
+
"type": "string",
|
|
2607
|
+
"description": "The table whose column names it (full name)."
|
|
2608
|
+
},
|
|
2609
|
+
"base": {
|
|
2610
|
+
"type": "string",
|
|
2611
|
+
"description": "The base whose column names it."
|
|
2612
|
+
},
|
|
2613
|
+
"view": {
|
|
2614
|
+
"type": "string",
|
|
2615
|
+
"description": "The view whose query names it (full name)."
|
|
2616
|
+
},
|
|
2617
|
+
"column": {
|
|
2618
|
+
"type": "string",
|
|
2619
|
+
"description": "The column of the table or base."
|
|
2620
|
+
},
|
|
2621
|
+
"key": {
|
|
2622
|
+
"type": "string",
|
|
2623
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
2624
|
+
},
|
|
2625
|
+
"from": {
|
|
2626
|
+
"type": "string",
|
|
2627
|
+
"description": "The name as written before."
|
|
2628
|
+
},
|
|
2629
|
+
"to": {
|
|
2630
|
+
"type": "string",
|
|
2631
|
+
"description": "The name written in its place."
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
"required": [
|
|
2635
|
+
"key",
|
|
2636
|
+
"from",
|
|
2637
|
+
"to"
|
|
2638
|
+
]
|
|
2639
|
+
},
|
|
2640
|
+
"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."
|
|
2465
2641
|
}
|
|
2466
2642
|
},
|
|
2467
2643
|
"required": [
|
|
@@ -2865,6 +3041,50 @@ var OPERATIONS = [
|
|
|
2865
3041
|
]
|
|
2866
3042
|
},
|
|
2867
3043
|
"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."
|
|
3044
|
+
},
|
|
3045
|
+
"schema_references": {
|
|
3046
|
+
"type": "array",
|
|
3047
|
+
"items": {
|
|
3048
|
+
"title": "SchemaReference",
|
|
3049
|
+
"type": "object",
|
|
3050
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
3051
|
+
"properties": {
|
|
3052
|
+
"table": {
|
|
3053
|
+
"type": "string",
|
|
3054
|
+
"description": "The table whose column names it (full name)."
|
|
3055
|
+
},
|
|
3056
|
+
"base": {
|
|
3057
|
+
"type": "string",
|
|
3058
|
+
"description": "The base whose column names it."
|
|
3059
|
+
},
|
|
3060
|
+
"view": {
|
|
3061
|
+
"type": "string",
|
|
3062
|
+
"description": "The view whose query names it (full name)."
|
|
3063
|
+
},
|
|
3064
|
+
"column": {
|
|
3065
|
+
"type": "string",
|
|
3066
|
+
"description": "The column of the table or base."
|
|
3067
|
+
},
|
|
3068
|
+
"key": {
|
|
3069
|
+
"type": "string",
|
|
3070
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
3071
|
+
},
|
|
3072
|
+
"from": {
|
|
3073
|
+
"type": "string",
|
|
3074
|
+
"description": "The name as written before."
|
|
3075
|
+
},
|
|
3076
|
+
"to": {
|
|
3077
|
+
"type": "string",
|
|
3078
|
+
"description": "The name written in its place."
|
|
3079
|
+
}
|
|
3080
|
+
},
|
|
3081
|
+
"required": [
|
|
3082
|
+
"key",
|
|
3083
|
+
"from",
|
|
3084
|
+
"to"
|
|
3085
|
+
]
|
|
3086
|
+
},
|
|
3087
|
+
"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."
|
|
2868
3088
|
}
|
|
2869
3089
|
},
|
|
2870
3090
|
"required": [
|
|
@@ -3273,6 +3493,50 @@ var OPERATIONS = [
|
|
|
3273
3493
|
]
|
|
3274
3494
|
},
|
|
3275
3495
|
"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."
|
|
3496
|
+
},
|
|
3497
|
+
"schema_references": {
|
|
3498
|
+
"type": "array",
|
|
3499
|
+
"items": {
|
|
3500
|
+
"title": "SchemaReference",
|
|
3501
|
+
"type": "object",
|
|
3502
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
3503
|
+
"properties": {
|
|
3504
|
+
"table": {
|
|
3505
|
+
"type": "string",
|
|
3506
|
+
"description": "The table whose column names it (full name)."
|
|
3507
|
+
},
|
|
3508
|
+
"base": {
|
|
3509
|
+
"type": "string",
|
|
3510
|
+
"description": "The base whose column names it."
|
|
3511
|
+
},
|
|
3512
|
+
"view": {
|
|
3513
|
+
"type": "string",
|
|
3514
|
+
"description": "The view whose query names it (full name)."
|
|
3515
|
+
},
|
|
3516
|
+
"column": {
|
|
3517
|
+
"type": "string",
|
|
3518
|
+
"description": "The column of the table or base."
|
|
3519
|
+
},
|
|
3520
|
+
"key": {
|
|
3521
|
+
"type": "string",
|
|
3522
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
3523
|
+
},
|
|
3524
|
+
"from": {
|
|
3525
|
+
"type": "string",
|
|
3526
|
+
"description": "The name as written before."
|
|
3527
|
+
},
|
|
3528
|
+
"to": {
|
|
3529
|
+
"type": "string",
|
|
3530
|
+
"description": "The name written in its place."
|
|
3531
|
+
}
|
|
3532
|
+
},
|
|
3533
|
+
"required": [
|
|
3534
|
+
"key",
|
|
3535
|
+
"from",
|
|
3536
|
+
"to"
|
|
3537
|
+
]
|
|
3538
|
+
},
|
|
3539
|
+
"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."
|
|
3276
3540
|
}
|
|
3277
3541
|
},
|
|
3278
3542
|
"required": [
|
|
@@ -3297,7 +3561,7 @@ var OPERATIONS = [
|
|
|
3297
3561
|
},
|
|
3298
3562
|
{
|
|
3299
3563
|
"name": "alter_table",
|
|
3300
|
-
"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
|
|
3564
|
+
"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).',
|
|
3301
3565
|
"inputSchema": {
|
|
3302
3566
|
"additionalProperties": false,
|
|
3303
3567
|
"properties": {
|
|
@@ -3878,6 +4142,50 @@ var OPERATIONS = [
|
|
|
3878
4142
|
]
|
|
3879
4143
|
},
|
|
3880
4144
|
"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."
|
|
4145
|
+
},
|
|
4146
|
+
"schema_references": {
|
|
4147
|
+
"type": "array",
|
|
4148
|
+
"items": {
|
|
4149
|
+
"title": "SchemaReference",
|
|
4150
|
+
"type": "object",
|
|
4151
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
4152
|
+
"properties": {
|
|
4153
|
+
"table": {
|
|
4154
|
+
"type": "string",
|
|
4155
|
+
"description": "The table whose column names it (full name)."
|
|
4156
|
+
},
|
|
4157
|
+
"base": {
|
|
4158
|
+
"type": "string",
|
|
4159
|
+
"description": "The base whose column names it."
|
|
4160
|
+
},
|
|
4161
|
+
"view": {
|
|
4162
|
+
"type": "string",
|
|
4163
|
+
"description": "The view whose query names it (full name)."
|
|
4164
|
+
},
|
|
4165
|
+
"column": {
|
|
4166
|
+
"type": "string",
|
|
4167
|
+
"description": "The column of the table or base."
|
|
4168
|
+
},
|
|
4169
|
+
"key": {
|
|
4170
|
+
"type": "string",
|
|
4171
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
4172
|
+
},
|
|
4173
|
+
"from": {
|
|
4174
|
+
"type": "string",
|
|
4175
|
+
"description": "The name as written before."
|
|
4176
|
+
},
|
|
4177
|
+
"to": {
|
|
4178
|
+
"type": "string",
|
|
4179
|
+
"description": "The name written in its place."
|
|
4180
|
+
}
|
|
4181
|
+
},
|
|
4182
|
+
"required": [
|
|
4183
|
+
"key",
|
|
4184
|
+
"from",
|
|
4185
|
+
"to"
|
|
4186
|
+
]
|
|
4187
|
+
},
|
|
4188
|
+
"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."
|
|
3881
4189
|
}
|
|
3882
4190
|
},
|
|
3883
4191
|
"required": [
|
|
@@ -4338,6 +4646,50 @@ var OPERATIONS = [
|
|
|
4338
4646
|
]
|
|
4339
4647
|
},
|
|
4340
4648
|
"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."
|
|
4649
|
+
},
|
|
4650
|
+
"schema_references": {
|
|
4651
|
+
"type": "array",
|
|
4652
|
+
"items": {
|
|
4653
|
+
"title": "SchemaReference",
|
|
4654
|
+
"type": "object",
|
|
4655
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
4656
|
+
"properties": {
|
|
4657
|
+
"table": {
|
|
4658
|
+
"type": "string",
|
|
4659
|
+
"description": "The table whose column names it (full name)."
|
|
4660
|
+
},
|
|
4661
|
+
"base": {
|
|
4662
|
+
"type": "string",
|
|
4663
|
+
"description": "The base whose column names it."
|
|
4664
|
+
},
|
|
4665
|
+
"view": {
|
|
4666
|
+
"type": "string",
|
|
4667
|
+
"description": "The view whose query names it (full name)."
|
|
4668
|
+
},
|
|
4669
|
+
"column": {
|
|
4670
|
+
"type": "string",
|
|
4671
|
+
"description": "The column of the table or base."
|
|
4672
|
+
},
|
|
4673
|
+
"key": {
|
|
4674
|
+
"type": "string",
|
|
4675
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
4676
|
+
},
|
|
4677
|
+
"from": {
|
|
4678
|
+
"type": "string",
|
|
4679
|
+
"description": "The name as written before."
|
|
4680
|
+
},
|
|
4681
|
+
"to": {
|
|
4682
|
+
"type": "string",
|
|
4683
|
+
"description": "The name written in its place."
|
|
4684
|
+
}
|
|
4685
|
+
},
|
|
4686
|
+
"required": [
|
|
4687
|
+
"key",
|
|
4688
|
+
"from",
|
|
4689
|
+
"to"
|
|
4690
|
+
]
|
|
4691
|
+
},
|
|
4692
|
+
"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."
|
|
4341
4693
|
}
|
|
4342
4694
|
},
|
|
4343
4695
|
"required": [
|
|
@@ -4743,6 +5095,50 @@ var OPERATIONS = [
|
|
|
4743
5095
|
]
|
|
4744
5096
|
},
|
|
4745
5097
|
"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."
|
|
5098
|
+
},
|
|
5099
|
+
"schema_references": {
|
|
5100
|
+
"type": "array",
|
|
5101
|
+
"items": {
|
|
5102
|
+
"title": "SchemaReference",
|
|
5103
|
+
"type": "object",
|
|
5104
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
5105
|
+
"properties": {
|
|
5106
|
+
"table": {
|
|
5107
|
+
"type": "string",
|
|
5108
|
+
"description": "The table whose column names it (full name)."
|
|
5109
|
+
},
|
|
5110
|
+
"base": {
|
|
5111
|
+
"type": "string",
|
|
5112
|
+
"description": "The base whose column names it."
|
|
5113
|
+
},
|
|
5114
|
+
"view": {
|
|
5115
|
+
"type": "string",
|
|
5116
|
+
"description": "The view whose query names it (full name)."
|
|
5117
|
+
},
|
|
5118
|
+
"column": {
|
|
5119
|
+
"type": "string",
|
|
5120
|
+
"description": "The column of the table or base."
|
|
5121
|
+
},
|
|
5122
|
+
"key": {
|
|
5123
|
+
"type": "string",
|
|
5124
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
5125
|
+
},
|
|
5126
|
+
"from": {
|
|
5127
|
+
"type": "string",
|
|
5128
|
+
"description": "The name as written before."
|
|
5129
|
+
},
|
|
5130
|
+
"to": {
|
|
5131
|
+
"type": "string",
|
|
5132
|
+
"description": "The name written in its place."
|
|
5133
|
+
}
|
|
5134
|
+
},
|
|
5135
|
+
"required": [
|
|
5136
|
+
"key",
|
|
5137
|
+
"from",
|
|
5138
|
+
"to"
|
|
5139
|
+
]
|
|
5140
|
+
},
|
|
5141
|
+
"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."
|
|
4746
5142
|
}
|
|
4747
5143
|
},
|
|
4748
5144
|
"required": [
|
|
@@ -5809,10 +6205,54 @@ var OPERATIONS = [
|
|
|
5809
6205
|
]
|
|
5810
6206
|
},
|
|
5811
6207
|
"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."
|
|
5812
|
-
}
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
6208
|
+
},
|
|
6209
|
+
"schema_references": {
|
|
6210
|
+
"type": "array",
|
|
6211
|
+
"items": {
|
|
6212
|
+
"title": "SchemaReference",
|
|
6213
|
+
"type": "object",
|
|
6214
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
6215
|
+
"properties": {
|
|
6216
|
+
"table": {
|
|
6217
|
+
"type": "string",
|
|
6218
|
+
"description": "The table whose column names it (full name)."
|
|
6219
|
+
},
|
|
6220
|
+
"base": {
|
|
6221
|
+
"type": "string",
|
|
6222
|
+
"description": "The base whose column names it."
|
|
6223
|
+
},
|
|
6224
|
+
"view": {
|
|
6225
|
+
"type": "string",
|
|
6226
|
+
"description": "The view whose query names it (full name)."
|
|
6227
|
+
},
|
|
6228
|
+
"column": {
|
|
6229
|
+
"type": "string",
|
|
6230
|
+
"description": "The column of the table or base."
|
|
6231
|
+
},
|
|
6232
|
+
"key": {
|
|
6233
|
+
"type": "string",
|
|
6234
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
6235
|
+
},
|
|
6236
|
+
"from": {
|
|
6237
|
+
"type": "string",
|
|
6238
|
+
"description": "The name as written before."
|
|
6239
|
+
},
|
|
6240
|
+
"to": {
|
|
6241
|
+
"type": "string",
|
|
6242
|
+
"description": "The name written in its place."
|
|
6243
|
+
}
|
|
6244
|
+
},
|
|
6245
|
+
"required": [
|
|
6246
|
+
"key",
|
|
6247
|
+
"from",
|
|
6248
|
+
"to"
|
|
6249
|
+
]
|
|
6250
|
+
},
|
|
6251
|
+
"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."
|
|
6252
|
+
}
|
|
6253
|
+
},
|
|
6254
|
+
"required": [
|
|
6255
|
+
"ok",
|
|
5816
6256
|
"op",
|
|
5817
6257
|
"dry_run",
|
|
5818
6258
|
"notes_changed",
|
|
@@ -6219,6 +6659,50 @@ var OPERATIONS = [
|
|
|
6219
6659
|
]
|
|
6220
6660
|
},
|
|
6221
6661
|
"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."
|
|
6662
|
+
},
|
|
6663
|
+
"schema_references": {
|
|
6664
|
+
"type": "array",
|
|
6665
|
+
"items": {
|
|
6666
|
+
"title": "SchemaReference",
|
|
6667
|
+
"type": "object",
|
|
6668
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
6669
|
+
"properties": {
|
|
6670
|
+
"table": {
|
|
6671
|
+
"type": "string",
|
|
6672
|
+
"description": "The table whose column names it (full name)."
|
|
6673
|
+
},
|
|
6674
|
+
"base": {
|
|
6675
|
+
"type": "string",
|
|
6676
|
+
"description": "The base whose column names it."
|
|
6677
|
+
},
|
|
6678
|
+
"view": {
|
|
6679
|
+
"type": "string",
|
|
6680
|
+
"description": "The view whose query names it (full name)."
|
|
6681
|
+
},
|
|
6682
|
+
"column": {
|
|
6683
|
+
"type": "string",
|
|
6684
|
+
"description": "The column of the table or base."
|
|
6685
|
+
},
|
|
6686
|
+
"key": {
|
|
6687
|
+
"type": "string",
|
|
6688
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
6689
|
+
},
|
|
6690
|
+
"from": {
|
|
6691
|
+
"type": "string",
|
|
6692
|
+
"description": "The name as written before."
|
|
6693
|
+
},
|
|
6694
|
+
"to": {
|
|
6695
|
+
"type": "string",
|
|
6696
|
+
"description": "The name written in its place."
|
|
6697
|
+
}
|
|
6698
|
+
},
|
|
6699
|
+
"required": [
|
|
6700
|
+
"key",
|
|
6701
|
+
"from",
|
|
6702
|
+
"to"
|
|
6703
|
+
]
|
|
6704
|
+
},
|
|
6705
|
+
"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."
|
|
6222
6706
|
}
|
|
6223
6707
|
},
|
|
6224
6708
|
"required": [
|
|
@@ -6657,6 +7141,50 @@ var OPERATIONS = [
|
|
|
6657
7141
|
]
|
|
6658
7142
|
},
|
|
6659
7143
|
"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."
|
|
7144
|
+
},
|
|
7145
|
+
"schema_references": {
|
|
7146
|
+
"type": "array",
|
|
7147
|
+
"items": {
|
|
7148
|
+
"title": "SchemaReference",
|
|
7149
|
+
"type": "object",
|
|
7150
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
7151
|
+
"properties": {
|
|
7152
|
+
"table": {
|
|
7153
|
+
"type": "string",
|
|
7154
|
+
"description": "The table whose column names it (full name)."
|
|
7155
|
+
},
|
|
7156
|
+
"base": {
|
|
7157
|
+
"type": "string",
|
|
7158
|
+
"description": "The base whose column names it."
|
|
7159
|
+
},
|
|
7160
|
+
"view": {
|
|
7161
|
+
"type": "string",
|
|
7162
|
+
"description": "The view whose query names it (full name)."
|
|
7163
|
+
},
|
|
7164
|
+
"column": {
|
|
7165
|
+
"type": "string",
|
|
7166
|
+
"description": "The column of the table or base."
|
|
7167
|
+
},
|
|
7168
|
+
"key": {
|
|
7169
|
+
"type": "string",
|
|
7170
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
7171
|
+
},
|
|
7172
|
+
"from": {
|
|
7173
|
+
"type": "string",
|
|
7174
|
+
"description": "The name as written before."
|
|
7175
|
+
},
|
|
7176
|
+
"to": {
|
|
7177
|
+
"type": "string",
|
|
7178
|
+
"description": "The name written in its place."
|
|
7179
|
+
}
|
|
7180
|
+
},
|
|
7181
|
+
"required": [
|
|
7182
|
+
"key",
|
|
7183
|
+
"from",
|
|
7184
|
+
"to"
|
|
7185
|
+
]
|
|
7186
|
+
},
|
|
7187
|
+
"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."
|
|
6660
7188
|
}
|
|
6661
7189
|
},
|
|
6662
7190
|
"required": [
|
|
@@ -7099,6 +7627,50 @@ var OPERATIONS = [
|
|
|
7099
7627
|
]
|
|
7100
7628
|
},
|
|
7101
7629
|
"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."
|
|
7630
|
+
},
|
|
7631
|
+
"schema_references": {
|
|
7632
|
+
"type": "array",
|
|
7633
|
+
"items": {
|
|
7634
|
+
"title": "SchemaReference",
|
|
7635
|
+
"type": "object",
|
|
7636
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
7637
|
+
"properties": {
|
|
7638
|
+
"table": {
|
|
7639
|
+
"type": "string",
|
|
7640
|
+
"description": "The table whose column names it (full name)."
|
|
7641
|
+
},
|
|
7642
|
+
"base": {
|
|
7643
|
+
"type": "string",
|
|
7644
|
+
"description": "The base whose column names it."
|
|
7645
|
+
},
|
|
7646
|
+
"view": {
|
|
7647
|
+
"type": "string",
|
|
7648
|
+
"description": "The view whose query names it (full name)."
|
|
7649
|
+
},
|
|
7650
|
+
"column": {
|
|
7651
|
+
"type": "string",
|
|
7652
|
+
"description": "The column of the table or base."
|
|
7653
|
+
},
|
|
7654
|
+
"key": {
|
|
7655
|
+
"type": "string",
|
|
7656
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
7657
|
+
},
|
|
7658
|
+
"from": {
|
|
7659
|
+
"type": "string",
|
|
7660
|
+
"description": "The name as written before."
|
|
7661
|
+
},
|
|
7662
|
+
"to": {
|
|
7663
|
+
"type": "string",
|
|
7664
|
+
"description": "The name written in its place."
|
|
7665
|
+
}
|
|
7666
|
+
},
|
|
7667
|
+
"required": [
|
|
7668
|
+
"key",
|
|
7669
|
+
"from",
|
|
7670
|
+
"to"
|
|
7671
|
+
]
|
|
7672
|
+
},
|
|
7673
|
+
"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."
|
|
7102
7674
|
}
|
|
7103
7675
|
},
|
|
7104
7676
|
"required": [
|
|
@@ -7616,6 +8188,50 @@ var OPERATIONS = [
|
|
|
7616
8188
|
]
|
|
7617
8189
|
},
|
|
7618
8190
|
"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."
|
|
8191
|
+
},
|
|
8192
|
+
"schema_references": {
|
|
8193
|
+
"type": "array",
|
|
8194
|
+
"items": {
|
|
8195
|
+
"title": "SchemaReference",
|
|
8196
|
+
"type": "object",
|
|
8197
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
8198
|
+
"properties": {
|
|
8199
|
+
"table": {
|
|
8200
|
+
"type": "string",
|
|
8201
|
+
"description": "The table whose column names it (full name)."
|
|
8202
|
+
},
|
|
8203
|
+
"base": {
|
|
8204
|
+
"type": "string",
|
|
8205
|
+
"description": "The base whose column names it."
|
|
8206
|
+
},
|
|
8207
|
+
"view": {
|
|
8208
|
+
"type": "string",
|
|
8209
|
+
"description": "The view whose query names it (full name)."
|
|
8210
|
+
},
|
|
8211
|
+
"column": {
|
|
8212
|
+
"type": "string",
|
|
8213
|
+
"description": "The column of the table or base."
|
|
8214
|
+
},
|
|
8215
|
+
"key": {
|
|
8216
|
+
"type": "string",
|
|
8217
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
8218
|
+
},
|
|
8219
|
+
"from": {
|
|
8220
|
+
"type": "string",
|
|
8221
|
+
"description": "The name as written before."
|
|
8222
|
+
},
|
|
8223
|
+
"to": {
|
|
8224
|
+
"type": "string",
|
|
8225
|
+
"description": "The name written in its place."
|
|
8226
|
+
}
|
|
8227
|
+
},
|
|
8228
|
+
"required": [
|
|
8229
|
+
"key",
|
|
8230
|
+
"from",
|
|
8231
|
+
"to"
|
|
8232
|
+
]
|
|
8233
|
+
},
|
|
8234
|
+
"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."
|
|
7619
8235
|
}
|
|
7620
8236
|
},
|
|
7621
8237
|
"required": [
|
|
@@ -8051,6 +8667,50 @@ var OPERATIONS = [
|
|
|
8051
8667
|
]
|
|
8052
8668
|
},
|
|
8053
8669
|
"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."
|
|
8670
|
+
},
|
|
8671
|
+
"schema_references": {
|
|
8672
|
+
"type": "array",
|
|
8673
|
+
"items": {
|
|
8674
|
+
"title": "SchemaReference",
|
|
8675
|
+
"type": "object",
|
|
8676
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
8677
|
+
"properties": {
|
|
8678
|
+
"table": {
|
|
8679
|
+
"type": "string",
|
|
8680
|
+
"description": "The table whose column names it (full name)."
|
|
8681
|
+
},
|
|
8682
|
+
"base": {
|
|
8683
|
+
"type": "string",
|
|
8684
|
+
"description": "The base whose column names it."
|
|
8685
|
+
},
|
|
8686
|
+
"view": {
|
|
8687
|
+
"type": "string",
|
|
8688
|
+
"description": "The view whose query names it (full name)."
|
|
8689
|
+
},
|
|
8690
|
+
"column": {
|
|
8691
|
+
"type": "string",
|
|
8692
|
+
"description": "The column of the table or base."
|
|
8693
|
+
},
|
|
8694
|
+
"key": {
|
|
8695
|
+
"type": "string",
|
|
8696
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
8697
|
+
},
|
|
8698
|
+
"from": {
|
|
8699
|
+
"type": "string",
|
|
8700
|
+
"description": "The name as written before."
|
|
8701
|
+
},
|
|
8702
|
+
"to": {
|
|
8703
|
+
"type": "string",
|
|
8704
|
+
"description": "The name written in its place."
|
|
8705
|
+
}
|
|
8706
|
+
},
|
|
8707
|
+
"required": [
|
|
8708
|
+
"key",
|
|
8709
|
+
"from",
|
|
8710
|
+
"to"
|
|
8711
|
+
]
|
|
8712
|
+
},
|
|
8713
|
+
"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."
|
|
8054
8714
|
}
|
|
8055
8715
|
},
|
|
8056
8716
|
"required": [
|
|
@@ -8503,6 +9163,50 @@ var OPERATIONS = [
|
|
|
8503
9163
|
]
|
|
8504
9164
|
},
|
|
8505
9165
|
"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."
|
|
9166
|
+
},
|
|
9167
|
+
"schema_references": {
|
|
9168
|
+
"type": "array",
|
|
9169
|
+
"items": {
|
|
9170
|
+
"title": "SchemaReference",
|
|
9171
|
+
"type": "object",
|
|
9172
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
9173
|
+
"properties": {
|
|
9174
|
+
"table": {
|
|
9175
|
+
"type": "string",
|
|
9176
|
+
"description": "The table whose column names it (full name)."
|
|
9177
|
+
},
|
|
9178
|
+
"base": {
|
|
9179
|
+
"type": "string",
|
|
9180
|
+
"description": "The base whose column names it."
|
|
9181
|
+
},
|
|
9182
|
+
"view": {
|
|
9183
|
+
"type": "string",
|
|
9184
|
+
"description": "The view whose query names it (full name)."
|
|
9185
|
+
},
|
|
9186
|
+
"column": {
|
|
9187
|
+
"type": "string",
|
|
9188
|
+
"description": "The column of the table or base."
|
|
9189
|
+
},
|
|
9190
|
+
"key": {
|
|
9191
|
+
"type": "string",
|
|
9192
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
9193
|
+
},
|
|
9194
|
+
"from": {
|
|
9195
|
+
"type": "string",
|
|
9196
|
+
"description": "The name as written before."
|
|
9197
|
+
},
|
|
9198
|
+
"to": {
|
|
9199
|
+
"type": "string",
|
|
9200
|
+
"description": "The name written in its place."
|
|
9201
|
+
}
|
|
9202
|
+
},
|
|
9203
|
+
"required": [
|
|
9204
|
+
"key",
|
|
9205
|
+
"from",
|
|
9206
|
+
"to"
|
|
9207
|
+
]
|
|
9208
|
+
},
|
|
9209
|
+
"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."
|
|
8506
9210
|
}
|
|
8507
9211
|
},
|
|
8508
9212
|
"required": [
|
|
@@ -8967,6 +9671,50 @@ var OPERATIONS = [
|
|
|
8967
9671
|
]
|
|
8968
9672
|
},
|
|
8969
9673
|
"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."
|
|
9674
|
+
},
|
|
9675
|
+
"schema_references": {
|
|
9676
|
+
"type": "array",
|
|
9677
|
+
"items": {
|
|
9678
|
+
"title": "SchemaReference",
|
|
9679
|
+
"type": "object",
|
|
9680
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
9681
|
+
"properties": {
|
|
9682
|
+
"table": {
|
|
9683
|
+
"type": "string",
|
|
9684
|
+
"description": "The table whose column names it (full name)."
|
|
9685
|
+
},
|
|
9686
|
+
"base": {
|
|
9687
|
+
"type": "string",
|
|
9688
|
+
"description": "The base whose column names it."
|
|
9689
|
+
},
|
|
9690
|
+
"view": {
|
|
9691
|
+
"type": "string",
|
|
9692
|
+
"description": "The view whose query names it (full name)."
|
|
9693
|
+
},
|
|
9694
|
+
"column": {
|
|
9695
|
+
"type": "string",
|
|
9696
|
+
"description": "The column of the table or base."
|
|
9697
|
+
},
|
|
9698
|
+
"key": {
|
|
9699
|
+
"type": "string",
|
|
9700
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
9701
|
+
},
|
|
9702
|
+
"from": {
|
|
9703
|
+
"type": "string",
|
|
9704
|
+
"description": "The name as written before."
|
|
9705
|
+
},
|
|
9706
|
+
"to": {
|
|
9707
|
+
"type": "string",
|
|
9708
|
+
"description": "The name written in its place."
|
|
9709
|
+
}
|
|
9710
|
+
},
|
|
9711
|
+
"required": [
|
|
9712
|
+
"key",
|
|
9713
|
+
"from",
|
|
9714
|
+
"to"
|
|
9715
|
+
]
|
|
9716
|
+
},
|
|
9717
|
+
"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."
|
|
8970
9718
|
}
|
|
8971
9719
|
},
|
|
8972
9720
|
"required": [
|
|
@@ -10049,6 +10797,50 @@ var OPERATIONS = [
|
|
|
10049
10797
|
]
|
|
10050
10798
|
},
|
|
10051
10799
|
"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."
|
|
10800
|
+
},
|
|
10801
|
+
"schema_references": {
|
|
10802
|
+
"type": "array",
|
|
10803
|
+
"items": {
|
|
10804
|
+
"title": "SchemaReference",
|
|
10805
|
+
"type": "object",
|
|
10806
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
10807
|
+
"properties": {
|
|
10808
|
+
"table": {
|
|
10809
|
+
"type": "string",
|
|
10810
|
+
"description": "The table whose column names it (full name)."
|
|
10811
|
+
},
|
|
10812
|
+
"base": {
|
|
10813
|
+
"type": "string",
|
|
10814
|
+
"description": "The base whose column names it."
|
|
10815
|
+
},
|
|
10816
|
+
"view": {
|
|
10817
|
+
"type": "string",
|
|
10818
|
+
"description": "The view whose query names it (full name)."
|
|
10819
|
+
},
|
|
10820
|
+
"column": {
|
|
10821
|
+
"type": "string",
|
|
10822
|
+
"description": "The column of the table or base."
|
|
10823
|
+
},
|
|
10824
|
+
"key": {
|
|
10825
|
+
"type": "string",
|
|
10826
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
10827
|
+
},
|
|
10828
|
+
"from": {
|
|
10829
|
+
"type": "string",
|
|
10830
|
+
"description": "The name as written before."
|
|
10831
|
+
},
|
|
10832
|
+
"to": {
|
|
10833
|
+
"type": "string",
|
|
10834
|
+
"description": "The name written in its place."
|
|
10835
|
+
}
|
|
10836
|
+
},
|
|
10837
|
+
"required": [
|
|
10838
|
+
"key",
|
|
10839
|
+
"from",
|
|
10840
|
+
"to"
|
|
10841
|
+
]
|
|
10842
|
+
},
|
|
10843
|
+
"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."
|
|
10052
10844
|
}
|
|
10053
10845
|
},
|
|
10054
10846
|
"required": [
|
|
@@ -10496,6 +11288,50 @@ var OPERATIONS = [
|
|
|
10496
11288
|
]
|
|
10497
11289
|
},
|
|
10498
11290
|
"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."
|
|
11291
|
+
},
|
|
11292
|
+
"schema_references": {
|
|
11293
|
+
"type": "array",
|
|
11294
|
+
"items": {
|
|
11295
|
+
"title": "SchemaReference",
|
|
11296
|
+
"type": "object",
|
|
11297
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
11298
|
+
"properties": {
|
|
11299
|
+
"table": {
|
|
11300
|
+
"type": "string",
|
|
11301
|
+
"description": "The table whose column names it (full name)."
|
|
11302
|
+
},
|
|
11303
|
+
"base": {
|
|
11304
|
+
"type": "string",
|
|
11305
|
+
"description": "The base whose column names it."
|
|
11306
|
+
},
|
|
11307
|
+
"view": {
|
|
11308
|
+
"type": "string",
|
|
11309
|
+
"description": "The view whose query names it (full name)."
|
|
11310
|
+
},
|
|
11311
|
+
"column": {
|
|
11312
|
+
"type": "string",
|
|
11313
|
+
"description": "The column of the table or base."
|
|
11314
|
+
},
|
|
11315
|
+
"key": {
|
|
11316
|
+
"type": "string",
|
|
11317
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
11318
|
+
},
|
|
11319
|
+
"from": {
|
|
11320
|
+
"type": "string",
|
|
11321
|
+
"description": "The name as written before."
|
|
11322
|
+
},
|
|
11323
|
+
"to": {
|
|
11324
|
+
"type": "string",
|
|
11325
|
+
"description": "The name written in its place."
|
|
11326
|
+
}
|
|
11327
|
+
},
|
|
11328
|
+
"required": [
|
|
11329
|
+
"key",
|
|
11330
|
+
"from",
|
|
11331
|
+
"to"
|
|
11332
|
+
]
|
|
11333
|
+
},
|
|
11334
|
+
"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."
|
|
10499
11335
|
}
|
|
10500
11336
|
},
|
|
10501
11337
|
"required": [
|
|
@@ -11583,6 +12419,50 @@ var OPERATIONS = [
|
|
|
11583
12419
|
]
|
|
11584
12420
|
},
|
|
11585
12421
|
"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."
|
|
12422
|
+
},
|
|
12423
|
+
"schema_references": {
|
|
12424
|
+
"type": "array",
|
|
12425
|
+
"items": {
|
|
12426
|
+
"title": "SchemaReference",
|
|
12427
|
+
"type": "object",
|
|
12428
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
12429
|
+
"properties": {
|
|
12430
|
+
"table": {
|
|
12431
|
+
"type": "string",
|
|
12432
|
+
"description": "The table whose column names it (full name)."
|
|
12433
|
+
},
|
|
12434
|
+
"base": {
|
|
12435
|
+
"type": "string",
|
|
12436
|
+
"description": "The base whose column names it."
|
|
12437
|
+
},
|
|
12438
|
+
"view": {
|
|
12439
|
+
"type": "string",
|
|
12440
|
+
"description": "The view whose query names it (full name)."
|
|
12441
|
+
},
|
|
12442
|
+
"column": {
|
|
12443
|
+
"type": "string",
|
|
12444
|
+
"description": "The column of the table or base."
|
|
12445
|
+
},
|
|
12446
|
+
"key": {
|
|
12447
|
+
"type": "string",
|
|
12448
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
12449
|
+
},
|
|
12450
|
+
"from": {
|
|
12451
|
+
"type": "string",
|
|
12452
|
+
"description": "The name as written before."
|
|
12453
|
+
},
|
|
12454
|
+
"to": {
|
|
12455
|
+
"type": "string",
|
|
12456
|
+
"description": "The name written in its place."
|
|
12457
|
+
}
|
|
12458
|
+
},
|
|
12459
|
+
"required": [
|
|
12460
|
+
"key",
|
|
12461
|
+
"from",
|
|
12462
|
+
"to"
|
|
12463
|
+
]
|
|
12464
|
+
},
|
|
12465
|
+
"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."
|
|
11586
12466
|
}
|
|
11587
12467
|
},
|
|
11588
12468
|
"required": [
|
|
@@ -13024,6 +13904,50 @@ var OPERATIONS = [
|
|
|
13024
13904
|
]
|
|
13025
13905
|
},
|
|
13026
13906
|
"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."
|
|
13907
|
+
},
|
|
13908
|
+
"schema_references": {
|
|
13909
|
+
"type": "array",
|
|
13910
|
+
"items": {
|
|
13911
|
+
"title": "SchemaReference",
|
|
13912
|
+
"type": "object",
|
|
13913
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
13914
|
+
"properties": {
|
|
13915
|
+
"table": {
|
|
13916
|
+
"type": "string",
|
|
13917
|
+
"description": "The table whose column names it (full name)."
|
|
13918
|
+
},
|
|
13919
|
+
"base": {
|
|
13920
|
+
"type": "string",
|
|
13921
|
+
"description": "The base whose column names it."
|
|
13922
|
+
},
|
|
13923
|
+
"view": {
|
|
13924
|
+
"type": "string",
|
|
13925
|
+
"description": "The view whose query names it (full name)."
|
|
13926
|
+
},
|
|
13927
|
+
"column": {
|
|
13928
|
+
"type": "string",
|
|
13929
|
+
"description": "The column of the table or base."
|
|
13930
|
+
},
|
|
13931
|
+
"key": {
|
|
13932
|
+
"type": "string",
|
|
13933
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
13934
|
+
},
|
|
13935
|
+
"from": {
|
|
13936
|
+
"type": "string",
|
|
13937
|
+
"description": "The name as written before."
|
|
13938
|
+
},
|
|
13939
|
+
"to": {
|
|
13940
|
+
"type": "string",
|
|
13941
|
+
"description": "The name written in its place."
|
|
13942
|
+
}
|
|
13943
|
+
},
|
|
13944
|
+
"required": [
|
|
13945
|
+
"key",
|
|
13946
|
+
"from",
|
|
13947
|
+
"to"
|
|
13948
|
+
]
|
|
13949
|
+
},
|
|
13950
|
+
"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."
|
|
13027
13951
|
}
|
|
13028
13952
|
},
|
|
13029
13953
|
"required": [
|
|
@@ -14044,6 +14968,50 @@ var OPERATIONS = [
|
|
|
14044
14968
|
]
|
|
14045
14969
|
},
|
|
14046
14970
|
"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."
|
|
14971
|
+
},
|
|
14972
|
+
"schema_references": {
|
|
14973
|
+
"type": "array",
|
|
14974
|
+
"items": {
|
|
14975
|
+
"title": "SchemaReference",
|
|
14976
|
+
"type": "object",
|
|
14977
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
14978
|
+
"properties": {
|
|
14979
|
+
"table": {
|
|
14980
|
+
"type": "string",
|
|
14981
|
+
"description": "The table whose column names it (full name)."
|
|
14982
|
+
},
|
|
14983
|
+
"base": {
|
|
14984
|
+
"type": "string",
|
|
14985
|
+
"description": "The base whose column names it."
|
|
14986
|
+
},
|
|
14987
|
+
"view": {
|
|
14988
|
+
"type": "string",
|
|
14989
|
+
"description": "The view whose query names it (full name)."
|
|
14990
|
+
},
|
|
14991
|
+
"column": {
|
|
14992
|
+
"type": "string",
|
|
14993
|
+
"description": "The column of the table or base."
|
|
14994
|
+
},
|
|
14995
|
+
"key": {
|
|
14996
|
+
"type": "string",
|
|
14997
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
14998
|
+
},
|
|
14999
|
+
"from": {
|
|
15000
|
+
"type": "string",
|
|
15001
|
+
"description": "The name as written before."
|
|
15002
|
+
},
|
|
15003
|
+
"to": {
|
|
15004
|
+
"type": "string",
|
|
15005
|
+
"description": "The name written in its place."
|
|
15006
|
+
}
|
|
15007
|
+
},
|
|
15008
|
+
"required": [
|
|
15009
|
+
"key",
|
|
15010
|
+
"from",
|
|
15011
|
+
"to"
|
|
15012
|
+
]
|
|
15013
|
+
},
|
|
15014
|
+
"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."
|
|
14047
15015
|
}
|
|
14048
15016
|
},
|
|
14049
15017
|
"required": [
|
|
@@ -14446,6 +15414,50 @@ var OPERATIONS = [
|
|
|
14446
15414
|
]
|
|
14447
15415
|
},
|
|
14448
15416
|
"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."
|
|
15417
|
+
},
|
|
15418
|
+
"schema_references": {
|
|
15419
|
+
"type": "array",
|
|
15420
|
+
"items": {
|
|
15421
|
+
"title": "SchemaReference",
|
|
15422
|
+
"type": "object",
|
|
15423
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
15424
|
+
"properties": {
|
|
15425
|
+
"table": {
|
|
15426
|
+
"type": "string",
|
|
15427
|
+
"description": "The table whose column names it (full name)."
|
|
15428
|
+
},
|
|
15429
|
+
"base": {
|
|
15430
|
+
"type": "string",
|
|
15431
|
+
"description": "The base whose column names it."
|
|
15432
|
+
},
|
|
15433
|
+
"view": {
|
|
15434
|
+
"type": "string",
|
|
15435
|
+
"description": "The view whose query names it (full name)."
|
|
15436
|
+
},
|
|
15437
|
+
"column": {
|
|
15438
|
+
"type": "string",
|
|
15439
|
+
"description": "The column of the table or base."
|
|
15440
|
+
},
|
|
15441
|
+
"key": {
|
|
15442
|
+
"type": "string",
|
|
15443
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
15444
|
+
},
|
|
15445
|
+
"from": {
|
|
15446
|
+
"type": "string",
|
|
15447
|
+
"description": "The name as written before."
|
|
15448
|
+
},
|
|
15449
|
+
"to": {
|
|
15450
|
+
"type": "string",
|
|
15451
|
+
"description": "The name written in its place."
|
|
15452
|
+
}
|
|
15453
|
+
},
|
|
15454
|
+
"required": [
|
|
15455
|
+
"key",
|
|
15456
|
+
"from",
|
|
15457
|
+
"to"
|
|
15458
|
+
]
|
|
15459
|
+
},
|
|
15460
|
+
"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."
|
|
14449
15461
|
}
|
|
14450
15462
|
},
|
|
14451
15463
|
"required": [
|
|
@@ -14915,6 +15927,50 @@ var OPERATIONS = [
|
|
|
14915
15927
|
]
|
|
14916
15928
|
},
|
|
14917
15929
|
"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."
|
|
15930
|
+
},
|
|
15931
|
+
"schema_references": {
|
|
15932
|
+
"type": "array",
|
|
15933
|
+
"items": {
|
|
15934
|
+
"title": "SchemaReference",
|
|
15935
|
+
"type": "object",
|
|
15936
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
15937
|
+
"properties": {
|
|
15938
|
+
"table": {
|
|
15939
|
+
"type": "string",
|
|
15940
|
+
"description": "The table whose column names it (full name)."
|
|
15941
|
+
},
|
|
15942
|
+
"base": {
|
|
15943
|
+
"type": "string",
|
|
15944
|
+
"description": "The base whose column names it."
|
|
15945
|
+
},
|
|
15946
|
+
"view": {
|
|
15947
|
+
"type": "string",
|
|
15948
|
+
"description": "The view whose query names it (full name)."
|
|
15949
|
+
},
|
|
15950
|
+
"column": {
|
|
15951
|
+
"type": "string",
|
|
15952
|
+
"description": "The column of the table or base."
|
|
15953
|
+
},
|
|
15954
|
+
"key": {
|
|
15955
|
+
"type": "string",
|
|
15956
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
15957
|
+
},
|
|
15958
|
+
"from": {
|
|
15959
|
+
"type": "string",
|
|
15960
|
+
"description": "The name as written before."
|
|
15961
|
+
},
|
|
15962
|
+
"to": {
|
|
15963
|
+
"type": "string",
|
|
15964
|
+
"description": "The name written in its place."
|
|
15965
|
+
}
|
|
15966
|
+
},
|
|
15967
|
+
"required": [
|
|
15968
|
+
"key",
|
|
15969
|
+
"from",
|
|
15970
|
+
"to"
|
|
15971
|
+
]
|
|
15972
|
+
},
|
|
15973
|
+
"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."
|
|
14918
15974
|
}
|
|
14919
15975
|
},
|
|
14920
15976
|
"required": [
|
|
@@ -15313,6 +16369,50 @@ var OPERATIONS = [
|
|
|
15313
16369
|
]
|
|
15314
16370
|
},
|
|
15315
16371
|
"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."
|
|
16372
|
+
},
|
|
16373
|
+
"schema_references": {
|
|
16374
|
+
"type": "array",
|
|
16375
|
+
"items": {
|
|
16376
|
+
"title": "SchemaReference",
|
|
16377
|
+
"type": "object",
|
|
16378
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
16379
|
+
"properties": {
|
|
16380
|
+
"table": {
|
|
16381
|
+
"type": "string",
|
|
16382
|
+
"description": "The table whose column names it (full name)."
|
|
16383
|
+
},
|
|
16384
|
+
"base": {
|
|
16385
|
+
"type": "string",
|
|
16386
|
+
"description": "The base whose column names it."
|
|
16387
|
+
},
|
|
16388
|
+
"view": {
|
|
16389
|
+
"type": "string",
|
|
16390
|
+
"description": "The view whose query names it (full name)."
|
|
16391
|
+
},
|
|
16392
|
+
"column": {
|
|
16393
|
+
"type": "string",
|
|
16394
|
+
"description": "The column of the table or base."
|
|
16395
|
+
},
|
|
16396
|
+
"key": {
|
|
16397
|
+
"type": "string",
|
|
16398
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
16399
|
+
},
|
|
16400
|
+
"from": {
|
|
16401
|
+
"type": "string",
|
|
16402
|
+
"description": "The name as written before."
|
|
16403
|
+
},
|
|
16404
|
+
"to": {
|
|
16405
|
+
"type": "string",
|
|
16406
|
+
"description": "The name written in its place."
|
|
16407
|
+
}
|
|
16408
|
+
},
|
|
16409
|
+
"required": [
|
|
16410
|
+
"key",
|
|
16411
|
+
"from",
|
|
16412
|
+
"to"
|
|
16413
|
+
]
|
|
16414
|
+
},
|
|
16415
|
+
"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."
|
|
15316
16416
|
}
|
|
15317
16417
|
},
|
|
15318
16418
|
"required": [
|
|
@@ -15742,6 +16842,50 @@ var OPERATIONS = [
|
|
|
15742
16842
|
]
|
|
15743
16843
|
},
|
|
15744
16844
|
"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."
|
|
16845
|
+
},
|
|
16846
|
+
"schema_references": {
|
|
16847
|
+
"type": "array",
|
|
16848
|
+
"items": {
|
|
16849
|
+
"title": "SchemaReference",
|
|
16850
|
+
"type": "object",
|
|
16851
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
16852
|
+
"properties": {
|
|
16853
|
+
"table": {
|
|
16854
|
+
"type": "string",
|
|
16855
|
+
"description": "The table whose column names it (full name)."
|
|
16856
|
+
},
|
|
16857
|
+
"base": {
|
|
16858
|
+
"type": "string",
|
|
16859
|
+
"description": "The base whose column names it."
|
|
16860
|
+
},
|
|
16861
|
+
"view": {
|
|
16862
|
+
"type": "string",
|
|
16863
|
+
"description": "The view whose query names it (full name)."
|
|
16864
|
+
},
|
|
16865
|
+
"column": {
|
|
16866
|
+
"type": "string",
|
|
16867
|
+
"description": "The column of the table or base."
|
|
16868
|
+
},
|
|
16869
|
+
"key": {
|
|
16870
|
+
"type": "string",
|
|
16871
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
16872
|
+
},
|
|
16873
|
+
"from": {
|
|
16874
|
+
"type": "string",
|
|
16875
|
+
"description": "The name as written before."
|
|
16876
|
+
},
|
|
16877
|
+
"to": {
|
|
16878
|
+
"type": "string",
|
|
16879
|
+
"description": "The name written in its place."
|
|
16880
|
+
}
|
|
16881
|
+
},
|
|
16882
|
+
"required": [
|
|
16883
|
+
"key",
|
|
16884
|
+
"from",
|
|
16885
|
+
"to"
|
|
16886
|
+
]
|
|
16887
|
+
},
|
|
16888
|
+
"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."
|
|
15745
16889
|
}
|
|
15746
16890
|
},
|
|
15747
16891
|
"required": [
|
|
@@ -16158,6 +17302,50 @@ var OPERATIONS = [
|
|
|
16158
17302
|
]
|
|
16159
17303
|
},
|
|
16160
17304
|
"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."
|
|
17305
|
+
},
|
|
17306
|
+
"schema_references": {
|
|
17307
|
+
"type": "array",
|
|
17308
|
+
"items": {
|
|
17309
|
+
"title": "SchemaReference",
|
|
17310
|
+
"type": "object",
|
|
17311
|
+
"description": "A name of the moved table in another definition, rewritten to the new name.",
|
|
17312
|
+
"properties": {
|
|
17313
|
+
"table": {
|
|
17314
|
+
"type": "string",
|
|
17315
|
+
"description": "The table whose column names it (full name)."
|
|
17316
|
+
},
|
|
17317
|
+
"base": {
|
|
17318
|
+
"type": "string",
|
|
17319
|
+
"description": "The base whose column names it."
|
|
17320
|
+
},
|
|
17321
|
+
"view": {
|
|
17322
|
+
"type": "string",
|
|
17323
|
+
"description": "The view whose query names it (full name)."
|
|
17324
|
+
},
|
|
17325
|
+
"column": {
|
|
17326
|
+
"type": "string",
|
|
17327
|
+
"description": "The column of the table or base."
|
|
17328
|
+
},
|
|
17329
|
+
"key": {
|
|
17330
|
+
"type": "string",
|
|
17331
|
+
"description": "Where the name is: ref or vocabulary of the column, or table, union[N].table or join.table of the view's query."
|
|
17332
|
+
},
|
|
17333
|
+
"from": {
|
|
17334
|
+
"type": "string",
|
|
17335
|
+
"description": "The name as written before."
|
|
17336
|
+
},
|
|
17337
|
+
"to": {
|
|
17338
|
+
"type": "string",
|
|
17339
|
+
"description": "The name written in its place."
|
|
17340
|
+
}
|
|
17341
|
+
},
|
|
17342
|
+
"required": [
|
|
17343
|
+
"key",
|
|
17344
|
+
"from",
|
|
17345
|
+
"to"
|
|
17346
|
+
]
|
|
17347
|
+
},
|
|
17348
|
+
"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."
|
|
16161
17349
|
}
|
|
16162
17350
|
},
|
|
16163
17351
|
"required": [
|
|
@@ -16927,130 +18115,402 @@ function classOf(cp) {
|
|
|
16927
18115
|
return k;
|
|
16928
18116
|
}
|
|
16929
18117
|
|
|
16930
|
-
// src/api/
|
|
16931
|
-
var
|
|
16932
|
-
var
|
|
16933
|
-
var
|
|
16934
|
-
function
|
|
16935
|
-
|
|
16936
|
-
if (
|
|
16937
|
-
|
|
16938
|
-
|
|
18118
|
+
// src/api/tracing.ts
|
|
18119
|
+
var TRACEPARENT_HEADER = "traceparent";
|
|
18120
|
+
var TRACESTATE_HEADER = "tracestate";
|
|
18121
|
+
var TRACEPARENT = /^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;
|
|
18122
|
+
function parseTraceparent(traceparent, tracestate) {
|
|
18123
|
+
const m = TRACEPARENT.exec((typeof traceparent === "string" ? traceparent : "").trim().toLowerCase());
|
|
18124
|
+
if (!m) return null;
|
|
18125
|
+
const [, version, traceId, spanId, flags, rest] = m;
|
|
18126
|
+
if (version === "ff" || version === "00" && rest !== void 0) return null;
|
|
18127
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(spanId)) return null;
|
|
18128
|
+
const state = (typeof tracestate === "string" ? tracestate : "").trim();
|
|
18129
|
+
return { traceId, spanId, sampled: (parseInt(flags, 16) & 1) === 1, ...state ? { traceState: state.slice(0, 512) } : {} };
|
|
16939
18130
|
}
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
const res = await fetch(url, { method: "POST", headers, body });
|
|
16943
|
-
if (!res.ok) throw new Error(`OTLP HTTP ${res.status}`);
|
|
16944
|
-
};
|
|
16945
|
-
function unixNano(ms) {
|
|
16946
|
-
const whole = Math.floor(ms);
|
|
16947
|
-
const frac = Math.round((ms - whole) * 1e6);
|
|
16948
|
-
return (BigInt(whole) * BigInt(1e6) + BigInt(frac)).toString();
|
|
18131
|
+
function formatTraceparent(ctx) {
|
|
18132
|
+
return `00-${ctx.traceId}-${ctx.spanId}-${ctx.sampled ? "01" : "00"}`;
|
|
16949
18133
|
}
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16954
|
-
|
|
16955
|
-
|
|
16956
|
-
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
|
|
16960
|
-
|
|
16961
|
-
|
|
16962
|
-
|
|
16963
|
-
|
|
16964
|
-
|
|
16965
|
-
|
|
16966
|
-
|
|
16967
|
-
|
|
16968
|
-
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
|
|
16972
|
-
this.
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
this.
|
|
18134
|
+
function traceHeaders(ctx) {
|
|
18135
|
+
return { [TRACEPARENT_HEADER]: formatTraceparent(ctx), ...ctx.traceState ? { [TRACESTATE_HEADER]: ctx.traceState } : {} };
|
|
18136
|
+
}
|
|
18137
|
+
function randomHex(bytes) {
|
|
18138
|
+
const b = new Uint8Array(bytes);
|
|
18139
|
+
const c = globalThis.crypto;
|
|
18140
|
+
if (c?.getRandomValues) c.getRandomValues(b);
|
|
18141
|
+
else for (let i = 0; i < bytes; i++) b[i] = Math.floor(Math.random() * 256);
|
|
18142
|
+
const hex = Array.from(b, (x) => x.toString(16).padStart(2, "0")).join("");
|
|
18143
|
+
return /^0+$/.test(hex) ? randomHex(bytes) : hex;
|
|
18144
|
+
}
|
|
18145
|
+
var newTraceId = () => randomHex(16);
|
|
18146
|
+
var newSpanId = () => randomHex(8);
|
|
18147
|
+
var perf = globalThis.performance;
|
|
18148
|
+
var defaultNow = perf ? () => perf.timeOrigin + perf.now() : () => Date.now();
|
|
18149
|
+
var TraceSpan = class {
|
|
18150
|
+
constructor(tracer, name, kind, parent, recording, attributes) {
|
|
18151
|
+
this.tracer = tracer;
|
|
18152
|
+
this.name = name;
|
|
18153
|
+
this.kind = kind;
|
|
18154
|
+
this.parent = parent;
|
|
18155
|
+
this.recording = recording;
|
|
18156
|
+
this.attributes = {};
|
|
18157
|
+
this.events = [];
|
|
18158
|
+
this.status = { code: "unset" };
|
|
18159
|
+
this.ended = false;
|
|
18160
|
+
this.context = {
|
|
18161
|
+
traceId: parent?.traceId ?? newTraceId(),
|
|
18162
|
+
spanId: newSpanId(),
|
|
18163
|
+
sampled: recording,
|
|
18164
|
+
...parent?.traceState ? { traceState: parent.traceState } : {}
|
|
18165
|
+
};
|
|
18166
|
+
this.startMs = tracer.now();
|
|
18167
|
+
this.setAttributes(attributes);
|
|
16976
18168
|
}
|
|
16977
|
-
|
|
16978
|
-
|
|
16979
|
-
this.varint(v);
|
|
18169
|
+
setAttribute(key, value) {
|
|
18170
|
+
if (value !== void 0 && value !== null) this.attributes[key] = value;
|
|
16980
18171
|
return this;
|
|
16981
18172
|
}
|
|
16982
|
-
|
|
16983
|
-
this.
|
|
16984
|
-
for (let i = 0; i < 4; i++) this.parts.push(v >>> 8 * i & 255);
|
|
18173
|
+
setAttributes(attributes) {
|
|
18174
|
+
for (const k in attributes) this.setAttribute(k, attributes[k]);
|
|
16985
18175
|
return this;
|
|
16986
18176
|
}
|
|
16987
|
-
|
|
16988
|
-
this.
|
|
16989
|
-
for (let i = 0; i < 8; i++) this.parts.push(Number(v >> BigInt(8 * i) & BigInt(255)));
|
|
18177
|
+
addEvent(name, attributes = {}) {
|
|
18178
|
+
this.events.push({ name, timeMs: this.tracer.now(), attributes });
|
|
16990
18179
|
return this;
|
|
16991
18180
|
}
|
|
16992
|
-
|
|
16993
|
-
|
|
16994
|
-
const
|
|
16995
|
-
|
|
16996
|
-
|
|
16997
|
-
|
|
18181
|
+
/** An `exception` event, `error.type` and status ERROR. */
|
|
18182
|
+
recordException(e) {
|
|
18183
|
+
const type = e instanceof Error ? e.name : typeof e;
|
|
18184
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
18185
|
+
this.addEvent("exception", { "exception.type": type, "exception.message": message, ...e instanceof Error && e.stack ? { "exception.stacktrace": e.stack.slice(0, 8192) } : {} });
|
|
18186
|
+
if (!("error.type" in this.attributes)) this.attributes["error.type"] = type;
|
|
18187
|
+
return this.setStatus("error", message);
|
|
16998
18188
|
}
|
|
16999
|
-
|
|
17000
|
-
this.
|
|
17001
|
-
this.
|
|
17002
|
-
for (const x of data) this.parts.push(x);
|
|
18189
|
+
setStatus(code, message) {
|
|
18190
|
+
if (this.status.code === "error" && code !== "error") return this;
|
|
18191
|
+
this.status = code === "error" && message ? { code, message } : { code };
|
|
17003
18192
|
return this;
|
|
17004
18193
|
}
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
|
|
18194
|
+
end() {
|
|
18195
|
+
if (this.ended) return;
|
|
18196
|
+
this.ended = true;
|
|
18197
|
+
if (!this.recording) return;
|
|
18198
|
+
this.tracer.send({
|
|
18199
|
+
traceId: this.context.traceId,
|
|
18200
|
+
spanId: this.context.spanId,
|
|
18201
|
+
...this.parent ? { parentSpanId: this.parent.spanId } : {},
|
|
18202
|
+
...this.context.traceState ? { traceState: this.context.traceState } : {},
|
|
18203
|
+
name: this.name,
|
|
18204
|
+
kind: this.kind,
|
|
18205
|
+
startMs: this.startMs,
|
|
18206
|
+
endMs: this.tracer.now(),
|
|
18207
|
+
attributes: this.attributes,
|
|
18208
|
+
events: this.events,
|
|
18209
|
+
status: this.status
|
|
18210
|
+
});
|
|
17010
18211
|
}
|
|
17011
|
-
|
|
17012
|
-
|
|
18212
|
+
};
|
|
18213
|
+
var Tracer = class {
|
|
18214
|
+
constructor(o) {
|
|
18215
|
+
this.o = o;
|
|
18216
|
+
this.now = o.now ?? defaultNow;
|
|
17013
18217
|
}
|
|
17014
|
-
|
|
17015
|
-
|
|
18218
|
+
/** A new span: a child of `parent` (a context or a `traceparent` header), or a new trace. */
|
|
18219
|
+
startSpan(name, opts = {}) {
|
|
18220
|
+
const parent = typeof opts.parent === "string" ? parseTraceparent(opts.parent) : opts.parent ?? null;
|
|
18221
|
+
const ratio = this.o.sampleRatio ?? 1;
|
|
18222
|
+
const span = new TraceSpan(this, name, opts.kind ?? "internal", parent, true, opts.attributes ?? {});
|
|
18223
|
+
const recording = parent ? parent.sampled : ratio >= 1 || ratio > 0 && parseInt(span.context.traceId.slice(-13), 16) / 2 ** 52 < ratio;
|
|
18224
|
+
return recording ? span : new TraceSpan(this, name, opts.kind ?? "internal", parent ?? { ...span.context, sampled: false }, false, {});
|
|
17016
18225
|
}
|
|
17017
|
-
|
|
17018
|
-
|
|
18226
|
+
/** @internal */
|
|
18227
|
+
send(span) {
|
|
18228
|
+
try {
|
|
18229
|
+
this.o.export([span]);
|
|
18230
|
+
} catch {
|
|
18231
|
+
}
|
|
17019
18232
|
}
|
|
17020
18233
|
};
|
|
17021
|
-
|
|
17022
|
-
|
|
17023
|
-
|
|
17024
|
-
|
|
18234
|
+
|
|
18235
|
+
// src/api/client.ts
|
|
18236
|
+
var ACTOR_HEADER = "X-Datanotes-Actor";
|
|
18237
|
+
var UNREACHABLE = {
|
|
18238
|
+
hint: "Start the engine (datanotes serve --database <folder>) or check its address; datanotes status --database <folder> shows whether it runs and where.",
|
|
18239
|
+
docs: `${DOCS_BASE}/start/connect-agents.md#how-the-mcp-server-reaches-the-engine`
|
|
18240
|
+
};
|
|
18241
|
+
var AUTH = {
|
|
18242
|
+
hint: "Send the engine's owner token (httpServerToken in settings.json in the engine's store: datanotes store path shows where) or a named token the owner made with POST /datanotes/tokens/create/, as Authorization: Bearer <token>.",
|
|
18243
|
+
docs: `${DOCS_BASE}/develop/http-api.md#authenticate-your-requests`
|
|
18244
|
+
};
|
|
18245
|
+
var DatanotesError = class extends Error {
|
|
18246
|
+
/** `unreachable`: the engine did not answer; `auth`: the token was refused. */
|
|
18247
|
+
constructor(message, kind = "http", status = 0, guidance = kind === "unreachable" ? UNREACHABLE : kind === "auth" ? AUTH : null) {
|
|
18248
|
+
super(guidedText(message, guidance));
|
|
18249
|
+
this.kind = kind;
|
|
18250
|
+
this.status = status;
|
|
18251
|
+
this.name = "DatanotesError";
|
|
18252
|
+
if (guidance) {
|
|
18253
|
+
this.hint = guidance.hint;
|
|
18254
|
+
this.docs = guidance.docs;
|
|
18255
|
+
}
|
|
18256
|
+
}
|
|
18257
|
+
};
|
|
18258
|
+
var fetchTransport = async (req) => {
|
|
18259
|
+
const res = await fetch(req.url, { method: req.method, headers: req.headers, ...req.body !== void 0 ? { body: req.body } : {} });
|
|
18260
|
+
return { status: res.status, text: await res.text() };
|
|
18261
|
+
};
|
|
18262
|
+
function isEngineAnswer(json) {
|
|
18263
|
+
if (json === null || typeof json !== "object" || Array.isArray(json)) return false;
|
|
18264
|
+
const o = json;
|
|
18265
|
+
return typeof o.ok === "boolean" || typeof o.error === "string";
|
|
17025
18266
|
}
|
|
17026
|
-
function
|
|
17027
|
-
|
|
17028
|
-
|
|
17029
|
-
|
|
18267
|
+
function clientSpan(tracer, method, url, parent) {
|
|
18268
|
+
let target;
|
|
18269
|
+
try {
|
|
18270
|
+
target = new URL(url);
|
|
18271
|
+
} catch {
|
|
18272
|
+
target = null;
|
|
17030
18273
|
}
|
|
17031
|
-
return
|
|
18274
|
+
return tracer.startSpan(target ? `${method} ${target.pathname}` : method, {
|
|
18275
|
+
kind: "client",
|
|
18276
|
+
parent,
|
|
18277
|
+
attributes: {
|
|
18278
|
+
"http.request.method": method,
|
|
18279
|
+
"url.full": target ? `${target.protocol}//${target.host}${target.pathname}` : void 0,
|
|
18280
|
+
"server.address": target?.hostname,
|
|
18281
|
+
"server.port": target ? Number(target.port || (target.protocol === "https:" ? 443 : 80)) : void 0
|
|
18282
|
+
}
|
|
18283
|
+
});
|
|
17032
18284
|
}
|
|
17033
|
-
|
|
17034
|
-
|
|
18285
|
+
function parse(text) {
|
|
18286
|
+
try {
|
|
18287
|
+
return text.trim() ? JSON.parse(text) : void 0;
|
|
18288
|
+
} catch {
|
|
18289
|
+
return void 0;
|
|
18290
|
+
}
|
|
18291
|
+
}
|
|
18292
|
+
function trimTrailingSlashes(s) {
|
|
18293
|
+
let end = s.length;
|
|
18294
|
+
while (end > 0 && s.charCodeAt(end - 1) === 47) end--;
|
|
18295
|
+
return end === s.length ? s : s.slice(0, end);
|
|
18296
|
+
}
|
|
18297
|
+
var DatanotesClient = class {
|
|
18298
|
+
constructor(o) {
|
|
17035
18299
|
this.o = o;
|
|
17036
|
-
this.
|
|
17037
|
-
this.
|
|
17038
|
-
this.buffer = [];
|
|
17039
|
-
this.inflight = Promise.resolve();
|
|
17040
|
-
this.timer = null;
|
|
17041
|
-
/** Items sent, and items lost because the collector did not take them (or the buffer was full). */
|
|
17042
|
-
this.sent = 0;
|
|
17043
|
-
this.dropped = 0;
|
|
17044
|
-
const every = o.flushMs ?? 5e3;
|
|
17045
|
-
if (every > 0) {
|
|
17046
|
-
this.timer = setInterval(() => void this.flush(), every);
|
|
17047
|
-
this.timer.unref?.();
|
|
17048
|
-
}
|
|
18300
|
+
this.url = trimTrailingSlashes(o.url);
|
|
18301
|
+
this.send = o.transport ?? fetchTransport;
|
|
17049
18302
|
}
|
|
17050
|
-
|
|
17051
|
-
|
|
17052
|
-
|
|
17053
|
-
|
|
18303
|
+
/** The parent of a request: the call's own `trace`, else the client's. */
|
|
18304
|
+
parentOf(trace) {
|
|
18305
|
+
const given = trace ?? (typeof this.o.trace === "function" ? this.o.trace() : this.o.trace);
|
|
18306
|
+
return typeof given === "string" ? parseTraceparent(given) : given ?? null;
|
|
18307
|
+
}
|
|
18308
|
+
/**
|
|
18309
|
+
* Send a request; the answer's status, its JSON (when it is JSON) and its text. `trace`: the
|
|
18310
|
+
* trace this request continues (over the client's `trace` option).
|
|
18311
|
+
*/
|
|
18312
|
+
async request(method, path, body, opts = {}) {
|
|
18313
|
+
if (!this.url) throw new DatanotesError("engine address not set", "unreachable");
|
|
18314
|
+
if (!this.o.token) throw new DatanotesError("token not set", "auth");
|
|
18315
|
+
const actor = opts.actor ?? this.o.actor;
|
|
18316
|
+
const parent = this.parentOf(opts.trace);
|
|
18317
|
+
const span = this.o.tracer ? clientSpan(this.o.tracer, method, `${this.url}${path}`, parent) : void 0;
|
|
18318
|
+
const sent = span?.context ?? parent;
|
|
18319
|
+
let res;
|
|
18320
|
+
try {
|
|
18321
|
+
res = await this.send({
|
|
18322
|
+
url: `${this.url}${path}`,
|
|
18323
|
+
method,
|
|
18324
|
+
headers: {
|
|
18325
|
+
Authorization: `Bearer ${this.o.token}`,
|
|
18326
|
+
...body !== void 0 ? { "Content-Type": "application/json" } : {},
|
|
18327
|
+
...opts.accept ? { Accept: opts.accept } : {},
|
|
18328
|
+
...actor && Object.keys(actor).length ? { [ACTOR_HEADER]: JSON.stringify(actor) } : {},
|
|
18329
|
+
...sent ? traceHeaders(sent) : {}
|
|
18330
|
+
},
|
|
18331
|
+
...body !== void 0 ? { body: JSON.stringify(body) } : {}
|
|
18332
|
+
});
|
|
18333
|
+
} catch (e) {
|
|
18334
|
+
span?.recordException(e);
|
|
18335
|
+
span?.end();
|
|
18336
|
+
throw new DatanotesError(`engine unreachable at ${this.url}: ${e instanceof Error ? e.message : String(e)}`, "unreachable");
|
|
18337
|
+
}
|
|
18338
|
+
span?.setAttribute("http.response.status_code", res.status);
|
|
18339
|
+
if (res.status >= 400) span?.setAttribute("error.type", String(res.status));
|
|
18340
|
+
if (res.status >= 500) span?.setStatus("error", `HTTP ${res.status}`);
|
|
18341
|
+
span?.end();
|
|
18342
|
+
if (res.status === 401) throw new DatanotesError("token refused by the engine", "auth", 401);
|
|
18343
|
+
const json = parse(res.text);
|
|
18344
|
+
const unreachable = res.status === 0 || res.status === 502 || res.status === 504 || res.status === 503 && !isEngineAnswer(json);
|
|
18345
|
+
if (unreachable) throw new DatanotesError(`engine unreachable at ${this.url} (HTTP ${res.status})`, "unreachable", res.status);
|
|
18346
|
+
return { status: res.status, json, text: res.text };
|
|
18347
|
+
}
|
|
18348
|
+
/** `POST /datanotes/<route>` and its JSON answer; throws on an error status. */
|
|
18349
|
+
async post(route, body = {}, actor) {
|
|
18350
|
+
const r = await this.request("POST", `/datanotes${route}`, body, actor ? { actor } : {});
|
|
18351
|
+
if (r.status >= 400) throw Object.assign(new DatanotesError(resultOf(r.status, r.json, r.text).value, "http", r.status), guidanceIn(r.json));
|
|
18352
|
+
return r.json;
|
|
18353
|
+
}
|
|
18354
|
+
/**
|
|
18355
|
+
* Run an operation of the catalogue (`select_rows`, `insert_row`, …) with an agent's arguments.
|
|
18356
|
+
* Arguments the operation does not take, or of the wrong type, are refused before anything is sent,
|
|
18357
|
+
* with the same message the engine gives.
|
|
18358
|
+
*/
|
|
18359
|
+
async call(name, args = {}, actor, options = {}) {
|
|
18360
|
+
let req;
|
|
18361
|
+
try {
|
|
18362
|
+
req = operationRequest(name, args);
|
|
18363
|
+
} catch (e) {
|
|
18364
|
+
if (e instanceof OperationInputError) return { ok: false, value: e.message };
|
|
18365
|
+
throw e;
|
|
18366
|
+
}
|
|
18367
|
+
const problem = checkArguments(name, args);
|
|
18368
|
+
if (problem) return { ok: false, value: guidedText(problem.message, problem) };
|
|
18369
|
+
const r = await this.request(req.method, req.path, req.body, { ...actor ? { actor } : {}, ...options.trace ? { trace: options.trace } : {} });
|
|
18370
|
+
return resultOf(r.status, r.json, r.text);
|
|
18371
|
+
}
|
|
18372
|
+
/** True when the engine answers `GET /` (no token needed). */
|
|
18373
|
+
async ping() {
|
|
18374
|
+
try {
|
|
18375
|
+
const r = await this.send({ url: `${this.url}/`, method: "GET", headers: {} });
|
|
18376
|
+
return r.status === 200;
|
|
18377
|
+
} catch {
|
|
18378
|
+
return false;
|
|
18379
|
+
}
|
|
18380
|
+
}
|
|
18381
|
+
/**
|
|
18382
|
+
* Record an agent's tool call in the change feed (what MCP servers report). Answers what the
|
|
18383
|
+
* engine said: `takes_summary` when it records a `value` sent cut with its `summary`.
|
|
18384
|
+
*/
|
|
18385
|
+
async recordToolCall(call, actor) {
|
|
18386
|
+
return this.post("/tool-calls/record/", call, actor);
|
|
18387
|
+
}
|
|
18388
|
+
};
|
|
18389
|
+
|
|
18390
|
+
// src/api/otlp.ts
|
|
18391
|
+
var SEVERITY_NUMBER = { DEBUG: 5, INFO: 9, WARN: 13, ERROR: 17 };
|
|
18392
|
+
var SPAN_KIND = { internal: 1, server: 2, client: 3, producer: 4, consumer: 5 };
|
|
18393
|
+
var STATUS_CODE = { unset: 0, ok: 1, error: 2 };
|
|
18394
|
+
function attr(key, v) {
|
|
18395
|
+
if (v === void 0 || v === null) return null;
|
|
18396
|
+
if (typeof v === "boolean") return { key, value: { boolValue: v } };
|
|
18397
|
+
if (typeof v === "number") return Number.isInteger(v) ? { key, value: { intValue: String(v) } } : { key, value: { doubleValue: v } };
|
|
18398
|
+
return { key, value: { stringValue: v } };
|
|
18399
|
+
}
|
|
18400
|
+
var attrs = (a) => Object.entries(a).map(([k, v]) => attr(k, v)).filter((x) => x !== null);
|
|
18401
|
+
var fetchSend = async (url, body, headers) => {
|
|
18402
|
+
const res = await fetch(url, { method: "POST", headers, body });
|
|
18403
|
+
if (!res.ok) throw new Error(`OTLP HTTP ${res.status}`);
|
|
18404
|
+
};
|
|
18405
|
+
function unixNano(ms) {
|
|
18406
|
+
const whole = Math.floor(ms);
|
|
18407
|
+
const frac = Math.round((ms - whole) * 1e6);
|
|
18408
|
+
return (BigInt(whole) * BigInt(1e6) + BigInt(frac)).toString();
|
|
18409
|
+
}
|
|
18410
|
+
var Pb = class {
|
|
18411
|
+
constructor() {
|
|
18412
|
+
this.parts = [];
|
|
18413
|
+
}
|
|
18414
|
+
varint(v) {
|
|
18415
|
+
if (typeof v === "number" && v >= 0 && v < 2 ** 31) {
|
|
18416
|
+
let x2 = v;
|
|
18417
|
+
while (x2 >= 128) {
|
|
18418
|
+
this.parts.push(x2 & 127 | 128);
|
|
18419
|
+
x2 >>>= 7;
|
|
18420
|
+
}
|
|
18421
|
+
this.parts.push(x2);
|
|
18422
|
+
return;
|
|
18423
|
+
}
|
|
18424
|
+
let x = BigInt.asUintN(64, BigInt(v));
|
|
18425
|
+
const b128 = BigInt(128);
|
|
18426
|
+
const low7 = BigInt(127);
|
|
18427
|
+
const seven = BigInt(7);
|
|
18428
|
+
while (x >= b128) {
|
|
18429
|
+
this.parts.push(Number(x & low7) | 128);
|
|
18430
|
+
x >>= seven;
|
|
18431
|
+
}
|
|
18432
|
+
this.parts.push(Number(x));
|
|
18433
|
+
}
|
|
18434
|
+
tag(field, wire) {
|
|
18435
|
+
this.varint(field << 3 | wire);
|
|
18436
|
+
}
|
|
18437
|
+
uint(field, v) {
|
|
18438
|
+
this.tag(field, 0);
|
|
18439
|
+
this.varint(v);
|
|
18440
|
+
return this;
|
|
18441
|
+
}
|
|
18442
|
+
fixed32(field, v) {
|
|
18443
|
+
this.tag(field, 5);
|
|
18444
|
+
for (let i = 0; i < 4; i++) this.parts.push(v >>> 8 * i & 255);
|
|
18445
|
+
return this;
|
|
18446
|
+
}
|
|
18447
|
+
fixed64(field, v) {
|
|
18448
|
+
this.tag(field, 1);
|
|
18449
|
+
for (let i = 0; i < 8; i++) this.parts.push(Number(v >> BigInt(8 * i) & BigInt(255)));
|
|
18450
|
+
return this;
|
|
18451
|
+
}
|
|
18452
|
+
double(field, v) {
|
|
18453
|
+
this.tag(field, 1);
|
|
18454
|
+
const b = new DataView(new ArrayBuffer(8));
|
|
18455
|
+
b.setFloat64(0, v, true);
|
|
18456
|
+
for (let i = 0; i < 8; i++) this.parts.push(b.getUint8(i));
|
|
18457
|
+
return this;
|
|
18458
|
+
}
|
|
18459
|
+
bytes(field, data) {
|
|
18460
|
+
this.tag(field, 2);
|
|
18461
|
+
this.varint(data.length);
|
|
18462
|
+
for (const x of data) this.parts.push(x);
|
|
18463
|
+
return this;
|
|
18464
|
+
}
|
|
18465
|
+
/** An id given in hex (trace and span ids), as bytes. */
|
|
18466
|
+
hex(field, hex) {
|
|
18467
|
+
const out = [];
|
|
18468
|
+
for (let i = 0; i < hex.length; i += 2) out.push(parseInt(hex.slice(i, i + 2), 16));
|
|
18469
|
+
return this.bytes(field, out);
|
|
18470
|
+
}
|
|
18471
|
+
string(field, s) {
|
|
18472
|
+
return this.bytes(field, new TextEncoder().encode(s));
|
|
18473
|
+
}
|
|
18474
|
+
message(field, m) {
|
|
18475
|
+
return this.bytes(field, m.finish());
|
|
18476
|
+
}
|
|
18477
|
+
finish() {
|
|
18478
|
+
return Uint8Array.from(this.parts);
|
|
18479
|
+
}
|
|
18480
|
+
};
|
|
18481
|
+
function pbValue(v) {
|
|
18482
|
+
if (typeof v === "string") return new Pb().string(1, v);
|
|
18483
|
+
if (typeof v === "boolean") return new Pb().uint(2, v ? 1 : 0);
|
|
18484
|
+
return Number.isInteger(v) ? new Pb().uint(3, BigInt(v)) : new Pb().double(4, v);
|
|
18485
|
+
}
|
|
18486
|
+
function pbAttrs(m, field, a) {
|
|
18487
|
+
for (const [k, v] of Object.entries(a)) {
|
|
18488
|
+
if (v === void 0 || v === null) continue;
|
|
18489
|
+
m.message(field, new Pb().string(1, k).message(2, pbValue(v)));
|
|
18490
|
+
}
|
|
18491
|
+
return m;
|
|
18492
|
+
}
|
|
18493
|
+
var OtlpBatcher = class {
|
|
18494
|
+
constructor(o, path, maxBatch) {
|
|
18495
|
+
this.o = o;
|
|
18496
|
+
this.path = path;
|
|
18497
|
+
this.maxBatch = maxBatch;
|
|
18498
|
+
this.buffer = [];
|
|
18499
|
+
this.inflight = Promise.resolve();
|
|
18500
|
+
this.timer = null;
|
|
18501
|
+
/** Items sent, and items lost because the collector did not take them (or the buffer was full). */
|
|
18502
|
+
this.sent = 0;
|
|
18503
|
+
this.dropped = 0;
|
|
18504
|
+
const every = o.flushMs ?? 5e3;
|
|
18505
|
+
if (every > 0) {
|
|
18506
|
+
this.timer = setInterval(() => void this.flush(), every);
|
|
18507
|
+
this.timer.unref?.();
|
|
18508
|
+
}
|
|
18509
|
+
}
|
|
18510
|
+
push(items) {
|
|
18511
|
+
const room = this.maxBatch * 8 - this.buffer.length;
|
|
18512
|
+
if (room < items.length) this.dropped += items.length - Math.max(room, 0);
|
|
18513
|
+
for (let i = 0; i < Math.min(items.length, Math.max(room, 0)); i++) this.buffer.push(items[i]);
|
|
17054
18514
|
if (this.buffer.length >= this.maxBatch) void this.flush();
|
|
17055
18515
|
}
|
|
17056
18516
|
resource() {
|
|
@@ -17060,7 +18520,7 @@ var OtlpBatcher = class {
|
|
|
17060
18520
|
flush() {
|
|
17061
18521
|
if (this.buffer.length === 0) return this.inflight;
|
|
17062
18522
|
const send = this.o.send ?? fetchSend;
|
|
17063
|
-
const url = `${this.o.endpoint
|
|
18523
|
+
const url = `${trimTrailingSlashes(this.o.endpoint)}${this.path}`;
|
|
17064
18524
|
const protobuf = (this.o.protocol ?? "http/protobuf") === "http/protobuf";
|
|
17065
18525
|
const headers = { "Content-Type": protobuf ? "application/x-protobuf" : "application/json", ...this.o.headers ?? {} };
|
|
17066
18526
|
while (this.buffer.length > 0) {
|
|
@@ -17252,270 +18712,3 @@ function otlpProtocol(v) {
|
|
|
17252
18712
|
const p = (v ?? "").trim().toLowerCase();
|
|
17253
18713
|
return p === "http/protobuf" || p === "http/json" ? p : void 0;
|
|
17254
18714
|
}
|
|
17255
|
-
|
|
17256
|
-
// src/api/tracing.ts
|
|
17257
|
-
var TRACEPARENT_HEADER = "traceparent";
|
|
17258
|
-
var TRACESTATE_HEADER = "tracestate";
|
|
17259
|
-
var TRACEPARENT = /^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;
|
|
17260
|
-
function parseTraceparent(traceparent, tracestate) {
|
|
17261
|
-
const m = TRACEPARENT.exec((typeof traceparent === "string" ? traceparent : "").trim().toLowerCase());
|
|
17262
|
-
if (!m) return null;
|
|
17263
|
-
const [, version, traceId, spanId, flags, rest] = m;
|
|
17264
|
-
if (version === "ff" || version === "00" && rest !== void 0) return null;
|
|
17265
|
-
if (/^0+$/.test(traceId) || /^0+$/.test(spanId)) return null;
|
|
17266
|
-
const state = (typeof tracestate === "string" ? tracestate : "").trim();
|
|
17267
|
-
return { traceId, spanId, sampled: (parseInt(flags, 16) & 1) === 1, ...state ? { traceState: state.slice(0, 512) } : {} };
|
|
17268
|
-
}
|
|
17269
|
-
function formatTraceparent(ctx) {
|
|
17270
|
-
return `00-${ctx.traceId}-${ctx.spanId}-${ctx.sampled ? "01" : "00"}`;
|
|
17271
|
-
}
|
|
17272
|
-
function traceHeaders(ctx) {
|
|
17273
|
-
return { [TRACEPARENT_HEADER]: formatTraceparent(ctx), ...ctx.traceState ? { [TRACESTATE_HEADER]: ctx.traceState } : {} };
|
|
17274
|
-
}
|
|
17275
|
-
function randomHex(bytes) {
|
|
17276
|
-
const b = new Uint8Array(bytes);
|
|
17277
|
-
const c = globalThis.crypto;
|
|
17278
|
-
if (c?.getRandomValues) c.getRandomValues(b);
|
|
17279
|
-
else for (let i = 0; i < bytes; i++) b[i] = Math.floor(Math.random() * 256);
|
|
17280
|
-
const hex = Array.from(b, (x) => x.toString(16).padStart(2, "0")).join("");
|
|
17281
|
-
return /^0+$/.test(hex) ? randomHex(bytes) : hex;
|
|
17282
|
-
}
|
|
17283
|
-
var newTraceId = () => randomHex(16);
|
|
17284
|
-
var newSpanId = () => randomHex(8);
|
|
17285
|
-
var perf = globalThis.performance;
|
|
17286
|
-
var defaultNow = perf ? () => perf.timeOrigin + perf.now() : () => Date.now();
|
|
17287
|
-
var TraceSpan = class {
|
|
17288
|
-
constructor(tracer, name, kind, parent, recording, attributes) {
|
|
17289
|
-
this.tracer = tracer;
|
|
17290
|
-
this.name = name;
|
|
17291
|
-
this.kind = kind;
|
|
17292
|
-
this.parent = parent;
|
|
17293
|
-
this.recording = recording;
|
|
17294
|
-
this.attributes = {};
|
|
17295
|
-
this.events = [];
|
|
17296
|
-
this.status = { code: "unset" };
|
|
17297
|
-
this.ended = false;
|
|
17298
|
-
this.context = {
|
|
17299
|
-
traceId: parent?.traceId ?? newTraceId(),
|
|
17300
|
-
spanId: newSpanId(),
|
|
17301
|
-
sampled: recording,
|
|
17302
|
-
...parent?.traceState ? { traceState: parent.traceState } : {}
|
|
17303
|
-
};
|
|
17304
|
-
this.startMs = tracer.now();
|
|
17305
|
-
this.setAttributes(attributes);
|
|
17306
|
-
}
|
|
17307
|
-
setAttribute(key, value) {
|
|
17308
|
-
if (value !== void 0 && value !== null) this.attributes[key] = value;
|
|
17309
|
-
return this;
|
|
17310
|
-
}
|
|
17311
|
-
setAttributes(attributes) {
|
|
17312
|
-
for (const k in attributes) this.setAttribute(k, attributes[k]);
|
|
17313
|
-
return this;
|
|
17314
|
-
}
|
|
17315
|
-
addEvent(name, attributes = {}) {
|
|
17316
|
-
this.events.push({ name, timeMs: this.tracer.now(), attributes });
|
|
17317
|
-
return this;
|
|
17318
|
-
}
|
|
17319
|
-
/** An `exception` event, `error.type` and status ERROR. */
|
|
17320
|
-
recordException(e) {
|
|
17321
|
-
const type = e instanceof Error ? e.name : typeof e;
|
|
17322
|
-
const message = e instanceof Error ? e.message : String(e);
|
|
17323
|
-
this.addEvent("exception", { "exception.type": type, "exception.message": message, ...e instanceof Error && e.stack ? { "exception.stacktrace": e.stack.slice(0, 8192) } : {} });
|
|
17324
|
-
if (!("error.type" in this.attributes)) this.attributes["error.type"] = type;
|
|
17325
|
-
return this.setStatus("error", message);
|
|
17326
|
-
}
|
|
17327
|
-
setStatus(code, message) {
|
|
17328
|
-
if (this.status.code === "error" && code !== "error") return this;
|
|
17329
|
-
this.status = code === "error" && message ? { code, message } : { code };
|
|
17330
|
-
return this;
|
|
17331
|
-
}
|
|
17332
|
-
end() {
|
|
17333
|
-
if (this.ended) return;
|
|
17334
|
-
this.ended = true;
|
|
17335
|
-
if (!this.recording) return;
|
|
17336
|
-
this.tracer.send({
|
|
17337
|
-
traceId: this.context.traceId,
|
|
17338
|
-
spanId: this.context.spanId,
|
|
17339
|
-
...this.parent ? { parentSpanId: this.parent.spanId } : {},
|
|
17340
|
-
...this.context.traceState ? { traceState: this.context.traceState } : {},
|
|
17341
|
-
name: this.name,
|
|
17342
|
-
kind: this.kind,
|
|
17343
|
-
startMs: this.startMs,
|
|
17344
|
-
endMs: this.tracer.now(),
|
|
17345
|
-
attributes: this.attributes,
|
|
17346
|
-
events: this.events,
|
|
17347
|
-
status: this.status
|
|
17348
|
-
});
|
|
17349
|
-
}
|
|
17350
|
-
};
|
|
17351
|
-
var Tracer = class {
|
|
17352
|
-
constructor(o) {
|
|
17353
|
-
this.o = o;
|
|
17354
|
-
this.now = o.now ?? defaultNow;
|
|
17355
|
-
}
|
|
17356
|
-
/** A new span: a child of `parent` (a context or a `traceparent` header), or a new trace. */
|
|
17357
|
-
startSpan(name, opts = {}) {
|
|
17358
|
-
const parent = typeof opts.parent === "string" ? parseTraceparent(opts.parent) : opts.parent ?? null;
|
|
17359
|
-
const ratio = this.o.sampleRatio ?? 1;
|
|
17360
|
-
const span = new TraceSpan(this, name, opts.kind ?? "internal", parent, true, opts.attributes ?? {});
|
|
17361
|
-
const recording = parent ? parent.sampled : ratio >= 1 || ratio > 0 && parseInt(span.context.traceId.slice(-13), 16) / 2 ** 52 < ratio;
|
|
17362
|
-
return recording ? span : new TraceSpan(this, name, opts.kind ?? "internal", parent ?? { ...span.context, sampled: false }, false, {});
|
|
17363
|
-
}
|
|
17364
|
-
/** @internal */
|
|
17365
|
-
send(span) {
|
|
17366
|
-
try {
|
|
17367
|
-
this.o.export([span]);
|
|
17368
|
-
} catch {
|
|
17369
|
-
}
|
|
17370
|
-
}
|
|
17371
|
-
};
|
|
17372
|
-
|
|
17373
|
-
// src/api/client.ts
|
|
17374
|
-
var ACTOR_HEADER = "X-Datanotes-Actor";
|
|
17375
|
-
var UNREACHABLE = {
|
|
17376
|
-
hint: "Start the engine (datanotes serve --database <folder>) or check its address; datanotes status --database <folder> shows whether it runs and where.",
|
|
17377
|
-
docs: `${DOCS_BASE}/start/connect-agents.md#how-the-mcp-server-reaches-the-engine`
|
|
17378
|
-
};
|
|
17379
|
-
var AUTH = {
|
|
17380
|
-
hint: "Send the engine's owner token (httpServerToken in settings.json in the engine's store: datanotes store path shows where) or a named token the owner made with POST /datanotes/tokens/create/, as Authorization: Bearer <token>.",
|
|
17381
|
-
docs: `${DOCS_BASE}/develop/http-api.md#authenticate-your-requests`
|
|
17382
|
-
};
|
|
17383
|
-
var DatanotesError = class extends Error {
|
|
17384
|
-
/** `unreachable`: the engine did not answer; `auth`: the token was refused. */
|
|
17385
|
-
constructor(message, kind = "http", status = 0, guidance = kind === "unreachable" ? UNREACHABLE : kind === "auth" ? AUTH : null) {
|
|
17386
|
-
super(guidedText(message, guidance));
|
|
17387
|
-
this.kind = kind;
|
|
17388
|
-
this.status = status;
|
|
17389
|
-
this.name = "DatanotesError";
|
|
17390
|
-
if (guidance) {
|
|
17391
|
-
this.hint = guidance.hint;
|
|
17392
|
-
this.docs = guidance.docs;
|
|
17393
|
-
}
|
|
17394
|
-
}
|
|
17395
|
-
};
|
|
17396
|
-
var fetchTransport = async (req) => {
|
|
17397
|
-
const res = await fetch(req.url, { method: req.method, headers: req.headers, ...req.body !== void 0 ? { body: req.body } : {} });
|
|
17398
|
-
return { status: res.status, text: await res.text() };
|
|
17399
|
-
};
|
|
17400
|
-
function isEngineAnswer(json) {
|
|
17401
|
-
if (json === null || typeof json !== "object" || Array.isArray(json)) return false;
|
|
17402
|
-
const o = json;
|
|
17403
|
-
return typeof o.ok === "boolean" || typeof o.error === "string";
|
|
17404
|
-
}
|
|
17405
|
-
function clientSpan(tracer, method, url, parent) {
|
|
17406
|
-
let target;
|
|
17407
|
-
try {
|
|
17408
|
-
target = new URL(url);
|
|
17409
|
-
} catch {
|
|
17410
|
-
target = null;
|
|
17411
|
-
}
|
|
17412
|
-
return tracer.startSpan(target ? `${method} ${target.pathname}` : method, {
|
|
17413
|
-
kind: "client",
|
|
17414
|
-
parent,
|
|
17415
|
-
attributes: {
|
|
17416
|
-
"http.request.method": method,
|
|
17417
|
-
"url.full": target ? `${target.protocol}//${target.host}${target.pathname}` : void 0,
|
|
17418
|
-
"server.address": target?.hostname,
|
|
17419
|
-
"server.port": target ? Number(target.port || (target.protocol === "https:" ? 443 : 80)) : void 0
|
|
17420
|
-
}
|
|
17421
|
-
});
|
|
17422
|
-
}
|
|
17423
|
-
function parse(text) {
|
|
17424
|
-
try {
|
|
17425
|
-
return text.trim() ? JSON.parse(text) : void 0;
|
|
17426
|
-
} catch {
|
|
17427
|
-
return void 0;
|
|
17428
|
-
}
|
|
17429
|
-
}
|
|
17430
|
-
var DatanotesClient = class {
|
|
17431
|
-
constructor(o) {
|
|
17432
|
-
this.o = o;
|
|
17433
|
-
this.url = o.url.replace(/\/+$/, "");
|
|
17434
|
-
this.send = o.transport ?? fetchTransport;
|
|
17435
|
-
}
|
|
17436
|
-
/** The parent of a request: the call's own `trace`, else the client's. */
|
|
17437
|
-
parentOf(trace) {
|
|
17438
|
-
const given = trace ?? (typeof this.o.trace === "function" ? this.o.trace() : this.o.trace);
|
|
17439
|
-
return typeof given === "string" ? parseTraceparent(given) : given ?? null;
|
|
17440
|
-
}
|
|
17441
|
-
/**
|
|
17442
|
-
* Send a request; the answer's status, its JSON (when it is JSON) and its text. `trace`: the
|
|
17443
|
-
* trace this request continues (over the client's `trace` option).
|
|
17444
|
-
*/
|
|
17445
|
-
async request(method, path, body, opts = {}) {
|
|
17446
|
-
if (!this.url) throw new DatanotesError("engine address not set", "unreachable");
|
|
17447
|
-
if (!this.o.token) throw new DatanotesError("token not set", "auth");
|
|
17448
|
-
const actor = opts.actor ?? this.o.actor;
|
|
17449
|
-
const parent = this.parentOf(opts.trace);
|
|
17450
|
-
const span = this.o.tracer ? clientSpan(this.o.tracer, method, `${this.url}${path}`, parent) : void 0;
|
|
17451
|
-
const sent = span?.context ?? parent;
|
|
17452
|
-
let res;
|
|
17453
|
-
try {
|
|
17454
|
-
res = await this.send({
|
|
17455
|
-
url: `${this.url}${path}`,
|
|
17456
|
-
method,
|
|
17457
|
-
headers: {
|
|
17458
|
-
Authorization: `Bearer ${this.o.token}`,
|
|
17459
|
-
...body !== void 0 ? { "Content-Type": "application/json" } : {},
|
|
17460
|
-
...opts.accept ? { Accept: opts.accept } : {},
|
|
17461
|
-
...actor && Object.keys(actor).length ? { [ACTOR_HEADER]: JSON.stringify(actor) } : {},
|
|
17462
|
-
...sent ? traceHeaders(sent) : {}
|
|
17463
|
-
},
|
|
17464
|
-
...body !== void 0 ? { body: JSON.stringify(body) } : {}
|
|
17465
|
-
});
|
|
17466
|
-
} catch (e) {
|
|
17467
|
-
span?.recordException(e);
|
|
17468
|
-
span?.end();
|
|
17469
|
-
throw new DatanotesError(`engine unreachable at ${this.url}: ${e instanceof Error ? e.message : String(e)}`, "unreachable");
|
|
17470
|
-
}
|
|
17471
|
-
span?.setAttribute("http.response.status_code", res.status);
|
|
17472
|
-
if (res.status >= 400) span?.setAttribute("error.type", String(res.status));
|
|
17473
|
-
if (res.status >= 500) span?.setStatus("error", `HTTP ${res.status}`);
|
|
17474
|
-
span?.end();
|
|
17475
|
-
if (res.status === 401) throw new DatanotesError("token refused by the engine", "auth", 401);
|
|
17476
|
-
const json = parse(res.text);
|
|
17477
|
-
const unreachable = res.status === 0 || res.status === 502 || res.status === 504 || res.status === 503 && !isEngineAnswer(json);
|
|
17478
|
-
if (unreachable) throw new DatanotesError(`engine unreachable at ${this.url} (HTTP ${res.status})`, "unreachable", res.status);
|
|
17479
|
-
return { status: res.status, json, text: res.text };
|
|
17480
|
-
}
|
|
17481
|
-
/** `POST /datanotes/<route>` and its JSON answer; throws on an error status. */
|
|
17482
|
-
async post(route, body = {}, actor) {
|
|
17483
|
-
const r = await this.request("POST", `/datanotes${route}`, body, actor ? { actor } : {});
|
|
17484
|
-
if (r.status >= 400) throw Object.assign(new DatanotesError(resultOf(r.status, r.json, r.text).value, "http", r.status), guidanceIn(r.json));
|
|
17485
|
-
return r.json;
|
|
17486
|
-
}
|
|
17487
|
-
/**
|
|
17488
|
-
* Run an operation of the catalogue (`select_rows`, `insert_row`, …) with an agent's arguments.
|
|
17489
|
-
* Arguments the operation does not take, or of the wrong type, are refused before anything is sent,
|
|
17490
|
-
* with the same message the engine gives.
|
|
17491
|
-
*/
|
|
17492
|
-
async call(name, args = {}, actor, options = {}) {
|
|
17493
|
-
let req;
|
|
17494
|
-
try {
|
|
17495
|
-
req = operationRequest(name, args);
|
|
17496
|
-
} catch (e) {
|
|
17497
|
-
if (e instanceof OperationInputError) return { ok: false, value: e.message };
|
|
17498
|
-
throw e;
|
|
17499
|
-
}
|
|
17500
|
-
const problem = checkArguments(name, args);
|
|
17501
|
-
if (problem) return { ok: false, value: guidedText(problem.message, problem) };
|
|
17502
|
-
const r = await this.request(req.method, req.path, req.body, { ...actor ? { actor } : {}, ...options.trace ? { trace: options.trace } : {} });
|
|
17503
|
-
return resultOf(r.status, r.json, r.text);
|
|
17504
|
-
}
|
|
17505
|
-
/** True when the engine answers `GET /` (no token needed). */
|
|
17506
|
-
async ping() {
|
|
17507
|
-
try {
|
|
17508
|
-
const r = await this.send({ url: `${this.url}/`, method: "GET", headers: {} });
|
|
17509
|
-
return r.status === 200;
|
|
17510
|
-
} catch {
|
|
17511
|
-
return false;
|
|
17512
|
-
}
|
|
17513
|
-
}
|
|
17514
|
-
/**
|
|
17515
|
-
* Record an agent's tool call in the change feed (what MCP servers report). Answers what the
|
|
17516
|
-
* engine said: `takes_summary` when it records a `value` sent cut with its `summary`.
|
|
17517
|
-
*/
|
|
17518
|
-
async recordToolCall(call, actor) {
|
|
17519
|
-
return this.post("/tool-calls/record/", call, actor);
|
|
17520
|
-
}
|
|
17521
|
-
};
|