@xano/xanoscript-language-server 12.23.0 → 12.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lexer/tokens.js CHANGED
@@ -295,7 +295,7 @@ export const HistoryToken = createTokenByName("history", {
295
295
  categories: [Identifier], // could also be an identifier
296
296
  });
297
297
 
298
- // `mesh0 = {logging, statements}` on objects and containers.
298
+ // `mesh0 = {logging}` on objects and containers.
299
299
  export const Mesh0Token = createTokenByName("mesh0", {
300
300
  longer_alt: Identifier,
301
301
  categories: [Identifier], // could also be an identifier
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xano/xanoscript-language-server",
3
- "version": "12.23.0",
3
+ "version": "12.24.0",
4
4
  "description": "Language Server Protocol implementation for XanoScript, the language of Xano backends",
5
5
  "keywords": [
6
6
  "xano",
@@ -57,7 +57,7 @@ export function branchDeclaration($) {
57
57
  "prompt?": historyValues,
58
58
  "resource?": historyValues,
59
59
  },
60
- // Strict whitelist of run types, each `{logging, statements}`.
60
+ // Strict whitelist of run types, each `{logging}`.
61
61
  // The platform writes only the types that differ from the
62
62
  // default, and no block at all when none do.
63
63
  "mesh0?": {
@@ -2,26 +2,25 @@ import { EqualToken } from "../../lexer/control.js";
2
2
  import { Mesh0Token } from "../../lexer/tokens.js";
3
3
 
4
4
  /**
5
- * The value set of one mesh0 setting, `{logging, statements}`, shared by the
5
+ * The value set of one mesh0 setting, `{logging}`, shared by the
6
6
  * object/container `mesh0 = {...}` clause and each run type of a branch
7
7
  * document's `mesh0` block (`branch_parser.js`).
8
8
  *
9
9
  * Mirrors the platform's mesh0 settings: `logging` is the trace detail
10
- * (`"inherit"` defers to the next level), `statements` the per-run statement
11
- * span cap. Unlimited is written `"all"`, as `history` writes it; the platform
12
- * stores it as `-1`. Both keys are optional, and a missing one inherits.
10
+ * (`"inherit"` defers to the next level) and is required. The per-run
11
+ * statement span cap is not a mesh0 key; the platform takes it from the
12
+ * request-history `history` setting, so a `statements` key is invalid.
13
13
  */
14
14
  export const MESH0_SETTING_SCHEMA = {
15
- "logging?": ["inherit", "minimal", "light", "full"],
16
- "statements?": [100, 1000, 10000, "all"],
15
+ logging: ["inherit", "minimal", "light", "full"],
17
16
  };
18
17
 
19
18
  /**
20
- * Parses the `mesh0 = {logging: "light", statements: 1000}` setting of an
21
- * object (query, function, task, tool, middleware, trigger, prompt, resource)
22
- * or a container (api_group, mcp_server, channel, realtime_server). It sits
23
- * beside `history`. A container presents the same two keys; the platform maps
24
- * them to its type-prefixed fields (`query_logging`, `tool_statements`, ...).
19
+ * Parses the `mesh0 = {logging: "light"}` setting of an object (query,
20
+ * function, task, tool, middleware, trigger, prompt, resource) or a container
21
+ * (api_group, mcp_server, channel, realtime_server). It sits beside
22
+ * `history`. A container presents the same key; the platform maps it to its
23
+ * type-prefixed field (`query_logging`, `tool_logging`, ...).
25
24
  *
26
25
  * @param {import('../base_parser.js').XanoBaseParser} $
27
26
  */
@@ -31,19 +30,8 @@ export function mesh0Clause($) {
31
30
  const parent = $.CONSUME(Mesh0Token); // "mesh0"
32
31
  $.CONSUME(EqualToken); // "="
33
32
 
34
- const captured = {};
35
33
  $.SUBRULE($.schemaParseObjectFn, {
36
- ARGS: [parent, MESH0_SETTING_SCHEMA, captured],
37
- });
38
-
39
- // Both keys are optional, but an empty setting says nothing.
40
- $.ACTION(() => {
41
- if (Object.keys(captured).length === 0) {
42
- $.addMissingError(
43
- parent,
44
- "{} requires at least one of: logging, statements",
45
- );
46
- }
34
+ ARGS: [parent, MESH0_SETTING_SCHEMA],
47
35
  });
48
36
 
49
37
  $.sectionStack.pop();