@digipair/skill-llm 0.8.24 → 0.8.25

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/index.cjs2.js CHANGED
@@ -23508,14 +23508,14 @@ function indent(str, spaces) {
23508
23508
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23509
23509
  // match is required
23510
23510
  if (!match) {
23511
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23511
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23512
23512
  v: nextMatch1
23513
23513
  };
23514
23514
  }
23515
23515
  var token = match.token, offset = match.offset;
23516
23516
  i1 += offset;
23517
23517
  if (token === " ") {
23518
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23518
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23519
23519
  }
23520
23520
  tokens1 = _to_consumable_array$w(tokens1).concat([
23521
23521
  token
@@ -23534,7 +23534,7 @@ function indent(str, spaces) {
23534
23534
  if (contextKeys.some(function(el) {
23535
23535
  return el.startsWith(name);
23536
23536
  })) {
23537
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23537
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23538
23538
  }
23539
23539
  if (dateTimeIdentifiers.some(function(el) {
23540
23540
  return el === name;
@@ -23553,9 +23553,9 @@ function indent(str, spaces) {
23553
23553
  if (dateTimeIdentifiers.some(function(el) {
23554
23554
  return el.startsWith(name);
23555
23555
  })) {
23556
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23556
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23557
23557
  }
23558
- return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23558
+ return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23559
23559
  v: nextMatch1
23560
23560
  };
23561
23561
  };
@@ -70214,11 +70214,11 @@ let LLMService = class LLMService {
70214
70214
  const zodProps = {};
70215
70215
  switch(schema.type){
70216
70216
  case 'string':
70217
- return z.string();
70217
+ return z.string().optional();
70218
70218
  case 'number':
70219
- return z.number();
70219
+ return z.number().optional();
70220
70220
  case 'boolean':
70221
- return z.boolean();
70221
+ return z.boolean().optional();
70222
70222
  case 'object':
70223
70223
  for(const prop in schema.properties){
70224
70224
  zodProps[prop] = this.jsonSchemaToZod(schema.properties[prop]);
@@ -70229,12 +70229,12 @@ let LLMService = class LLMService {
70229
70229
  var _schema_required;
70230
70230
  return z.object(zodProps).required(((_schema_required = schema.required) != null ? _schema_required : []).reduce((acc, reqProp)=>_extends({}, acc, {
70231
70231
  [reqProp]: true
70232
- }), {}));
70232
+ }), {})).optional();
70233
70233
  case 'array':
70234
70234
  if (schema.items) {
70235
- return z.array(this.jsonSchemaToZod(schema.items));
70235
+ return z.array(this.jsonSchemaToZod(schema.items)).optional();
70236
70236
  }
70237
- return z.array(z.unknown());
70237
+ return z.array(z.unknown()).optional();
70238
70238
  default:
70239
70239
  throw new Error(`Unsupported JSON Schema type: ${schema.type}`);
70240
70240
  }
package/index.esm2.js CHANGED
@@ -23488,14 +23488,14 @@ function indent(str, spaces) {
23488
23488
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23489
23489
  // match is required
23490
23490
  if (!match) {
23491
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23491
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23492
23492
  v: nextMatch1
23493
23493
  };
23494
23494
  }
23495
23495
  var token = match.token, offset = match.offset;
23496
23496
  i1 += offset;
23497
23497
  if (token === " ") {
23498
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23498
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23499
23499
  }
23500
23500
  tokens1 = _to_consumable_array$w(tokens1).concat([
23501
23501
  token
@@ -23514,7 +23514,7 @@ function indent(str, spaces) {
23514
23514
  if (contextKeys.some(function(el) {
23515
23515
  return el.startsWith(name);
23516
23516
  })) {
23517
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23517
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23518
23518
  }
23519
23519
  if (dateTimeIdentifiers.some(function(el) {
23520
23520
  return el === name;
@@ -23533,9 +23533,9 @@ function indent(str, spaces) {
23533
23533
  if (dateTimeIdentifiers.some(function(el) {
23534
23534
  return el.startsWith(name);
23535
23535
  })) {
23536
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23536
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23537
23537
  }
23538
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23538
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23539
23539
  v: nextMatch1
23540
23540
  };
23541
23541
  };
@@ -70194,11 +70194,11 @@ let LLMService = class LLMService {
70194
70194
  const zodProps = {};
70195
70195
  switch(schema.type){
70196
70196
  case 'string':
70197
- return z.string();
70197
+ return z.string().optional();
70198
70198
  case 'number':
70199
- return z.number();
70199
+ return z.number().optional();
70200
70200
  case 'boolean':
70201
- return z.boolean();
70201
+ return z.boolean().optional();
70202
70202
  case 'object':
70203
70203
  for(const prop in schema.properties){
70204
70204
  zodProps[prop] = this.jsonSchemaToZod(schema.properties[prop]);
@@ -70209,12 +70209,12 @@ let LLMService = class LLMService {
70209
70209
  var _schema_required;
70210
70210
  return z.object(zodProps).required(((_schema_required = schema.required) != null ? _schema_required : []).reduce((acc, reqProp)=>_extends({}, acc, {
70211
70211
  [reqProp]: true
70212
- }), {}));
70212
+ }), {})).optional();
70213
70213
  case 'array':
70214
70214
  if (schema.items) {
70215
- return z.array(this.jsonSchemaToZod(schema.items));
70215
+ return z.array(this.jsonSchemaToZod(schema.items)).optional();
70216
70216
  }
70217
- return z.array(z.unknown());
70217
+ return z.array(z.unknown()).optional();
70218
70218
  default:
70219
70219
  throw new Error(`Unsupported JSON Schema type: ${schema.type}`);
70220
70220
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-llm",
3
- "version": "0.8.24",
3
+ "version": "0.8.25",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"