@xano/xanoscript-language-server 12.14.0 → 12.16.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xano/xanoscript-language-server",
3
- "version": "12.14.0",
3
+ "version": "12.16.0",
4
4
  "description": "Language Server Protocol implementation for XanoScript",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -104,6 +104,16 @@ export function agentDeclaration($) {
104
104
  "temperature",
105
105
  "reasoning_effort",
106
106
  ],
107
+ // Azure AI Foundry. "model" is the customer's deployment name and
108
+ // "baseURL" their Foundry endpoint; both are required because the
109
+ // provider has no default endpoint to fall back on.
110
+ "azure-openai": [
111
+ "type",
112
+ "max_steps",
113
+ "model",
114
+ "temperature",
115
+ "baseURL",
116
+ ],
107
117
  xano_free: [
108
118
  "type",
109
119
  "max_steps",
@@ -147,6 +157,18 @@ export function agentDeclaration($) {
147
157
  "project",
148
158
  "compatibility",
149
159
  ],
160
+ "azure-openai": [
161
+ ...requiredFieldsPerSource["azure-openai"],
162
+ "system_prompt",
163
+ "prompt",
164
+ "messages",
165
+ "api_key",
166
+ // Optional: the runtime defaults it to "preview" for the
167
+ // /openai/v1 endpoint. Classic deployment URLs use a dated
168
+ // value such as "2024-10-21".
169
+ "api_version",
170
+ "headers",
171
+ ],
150
172
  "xano-free": [
151
173
  ...requiredFieldsPerSource["xano_free"],
152
174
  "system_prompt",
@@ -166,7 +188,13 @@ export function agentDeclaration($) {
166
188
  ARGS: [
167
189
  subParent,
168
190
  {
169
- type: ["anthropic", "google-genai", "openai", "xano-free"],
191
+ type: [
192
+ "anthropic",
193
+ "azure-openai",
194
+ "google-genai",
195
+ "openai",
196
+ "xano-free",
197
+ ],
170
198
  max_steps: "[number]",
171
199
  // prompt and message are exclusive (at least one but not both), but we'll validate that
172
200
  // after parsing
@@ -175,6 +203,7 @@ export function agentDeclaration($) {
175
203
  // all the following fields are optional because we'll validate
176
204
  // required and allowed fields per source below
177
205
  "api_key?": "[string]",
206
+ "api_version?": "[string]",
178
207
  "baseURL?": "[string]",
179
208
  "compatibility?": ["strict", "compatible", ""],
180
209
  "dynamic_retrival?": ["enabled", "disabled", ""],
@@ -0,0 +1,20 @@
1
+ import { EqualToken } from "../../lexer/control.js";
2
+ import { ActiveToken } from "../../lexer/realtime_trigger.js";
3
+ import { FalseToken, TrueToken } from "../../lexer/tokens.js";
4
+
5
+ /**
6
+ * @param {import('../base_parser.js').XanoBaseParser} $
7
+ * @returns
8
+ */
9
+ export function activeFieldAttribute($) {
10
+ return () => {
11
+ $.sectionStack.push("activeFieldAttribute");
12
+ $.CONSUME(ActiveToken); // "active"
13
+ $.CONSUME(EqualToken); // "="
14
+ $.OR([
15
+ { ALT: () => $.CONSUME(TrueToken) }, // e.g., true,
16
+ { ALT: () => $.CONSUME(FalseToken) }, // e.g., false
17
+ ]);
18
+ $.sectionStack.pop();
19
+ };
20
+ }
@@ -1,3 +1,4 @@
1
+ import { activeFieldAttribute } from "./activeFieldAttribute.js";
1
2
  import { columnDefaultValueAttribute } from "./columnDefaultValueAttribute.js";
2
3
  import { descriptionFieldAttribute } from "./descriptionFieldAttribute.js";
3
4
  import { disabledFieldAttribute } from "./disabledFieldAttribute.js";
@@ -14,6 +15,10 @@ import { visibilityFieldAttribute } from "./visibilityFieldAttribute.js";
14
15
  * @param {import('../base_parser.js').XanoBaseParser} $
15
16
  */
16
17
  export const register = ($) => {
18
+ $.activeFieldAttribute = $.RULE(
19
+ "activeFieldAttribute",
20
+ activeFieldAttribute($),
21
+ );
17
22
  $.columnDefaultValueAttribute = $.RULE(
18
23
  "columnDefaultValueAttribute",
19
24
  columnDefaultValueAttribute($),
@@ -23,6 +23,7 @@ export function channelDeclaration($) {
23
23
  let hasDescription = false;
24
24
  let hasGuid = false;
25
25
  let hasTags = false;
26
+ let hasActive = false;
26
27
 
27
28
  $.sectionStack.push("channelDeclaration");
28
29
  // Allow leading comments and newlines before the channel declaration
@@ -168,6 +169,13 @@ export function channelDeclaration($) {
168
169
  $.SUBRULE($.tagsAttribute);
169
170
  },
170
171
  },
172
+ {
173
+ GATE: () => !hasActive,
174
+ ALT: () => {
175
+ hasActive = true;
176
+ $.SUBRULE($.activeFieldAttribute);
177
+ },
178
+ },
171
179
  ]);
172
180
  });
173
181
 
@@ -5,6 +5,7 @@ import { SetToken } from "../../../lexer/redis.js";
5
5
  * key = "name"
6
6
  * data = "xano"
7
7
  * ttl = 0
8
+ * create_only = true
8
9
  * }
9
10
  * @param {import('../../base_parser.js').XanoBaseParser} $
10
11
  */
@@ -19,6 +20,7 @@ export function redisSetFn($) {
19
20
  key: "[expression]",
20
21
  data: "[expression]",
21
22
  ttl: "[expression]",
23
+ "create_only?": "[boolean]",
22
24
  "description?": "[string]",
23
25
  "disabled?": "[boolean]",
24
26
  },