@saltcorn/sql 0.5.2 → 0.5.3

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.
Files changed (2) hide show
  1. package/agent-skill.js +10 -0
  2. package/package.json +1 -1
package/agent-skill.js CHANGED
@@ -95,6 +95,7 @@ class SQLQuerySkill {
95
95
  label: "Tool name",
96
96
  type: "String",
97
97
  showIf: { mode: "Tool" },
98
+ class: "validate-identifier",
98
99
  },
99
100
  {
100
101
  name: "tool_description",
@@ -133,6 +134,13 @@ class SQLQuerySkill {
133
134
  required: true,
134
135
  attributes: { options: ["string", "number", "integer", "boolean"] },
135
136
  },
137
+ {
138
+ name: "options",
139
+ label: "Options",
140
+ type: "String",
141
+ sublabel: "Optional. Comma-separated list of values",
142
+ showIf: { argtype: "string" },
143
+ },
136
144
  ],
137
145
  }),
138
146
  {
@@ -168,6 +176,8 @@ class SQLQuerySkill {
168
176
  description: arg.description,
169
177
  type: arg.argtype,
170
178
  };
179
+ if (arg.options && arg.argtype === "string")
180
+ properties[arg.name].enum = arg.options.split(",").map((s) => s.trim());
171
181
  });
172
182
  return {
173
183
  type: "function",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/sql",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Actions and views based on SQL",
5
5
  "main": "index.js",
6
6
  "dependencies": {