wingbot 3.76.2 → 3.76.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.
@@ -0,0 +1,11 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npx mocha:*)",
5
+ "Bash(npx tsc *)",
6
+ "Bash(npm test *)",
7
+ "Bash(node -e \"const p = require\\('./bot/plugins/BTMLLM'\\); console.log\\('factory type:', typeof p\\); console.log\\('factory name:', p.name\\);\")",
8
+ "Bash(grep -n \"prompt\\\\`\\\\|tagged\\\\|render\\\\|compile\\\\|hbs\" /Users/ondrejveres/Wingbot/wingbot-llm/src/prompt.js)"
9
+ ]
10
+ }
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.76.2",
3
+ "version": "3.76.3",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
package/src/LLMType.js CHANGED
@@ -249,6 +249,13 @@ class LLMType {
249
249
  const childSchema = child.toJSON();
250
250
  if (!child._required) {
251
251
  childSchema.type = [childSchema.type, 'null'];
252
+ // A nullable enum must also list null among its allowed
253
+ // values — otherwise null satisfies `type` but fails `enum`
254
+ // and is effectively disallowed, forcing the model to pick
255
+ // a value for an optional field.
256
+ if (Array.isArray(childSchema.enum) && !childSchema.enum.includes(null)) {
257
+ childSchema.enum = [...childSchema.enum, null];
258
+ }
252
259
  }
253
260
  properties[key] = childSchema;
254
261
  required.push(key);