@takeshape/cli 11.88.5 → 11.89.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.
Files changed (2) hide show
  1. package/dist/index.js +22 -8
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -205131,7 +205131,7 @@ var engines = {
205131
205131
  };
205132
205132
  var package_default = {
205133
205133
  name: "@takeshape/cli",
205134
- version: "11.88.5",
205134
+ version: "11.89.0",
205135
205135
  description: "TakeShape CLI",
205136
205136
  homepage: "https://www.takeshape.io",
205137
205137
  repository: {
@@ -220893,6 +220893,9 @@ var experimental_default = {
220893
220893
  title: "Tool JSON",
220894
220894
  type: "object",
220895
220895
  properties: {
220896
+ name: {
220897
+ type: "string"
220898
+ },
220896
220899
  ref: {
220897
220900
  type: "string"
220898
220901
  },
@@ -220909,7 +220912,7 @@ var experimental_default = {
220909
220912
  type: "string"
220910
220913
  }
220911
220914
  },
220912
- required: ["ref"],
220915
+ required: ["name", "ref"],
220913
220916
  additionalProperties: false
220914
220917
  },
220915
220918
  toolArg: {
@@ -221381,6 +221384,9 @@ var experimental_default = {
221381
221384
  title: "AgentToolConfig",
221382
221385
  type: "object",
221383
221386
  properties: {
221387
+ name: {
221388
+ type: "string"
221389
+ },
221384
221390
  ref: {
221385
221391
  type: "string"
221386
221392
  },
@@ -221397,7 +221403,7 @@ var experimental_default = {
221397
221403
  type: "string"
221398
221404
  }
221399
221405
  },
221400
- required: ["ref"],
221406
+ required: ["name", "ref"],
221401
221407
  additionalProperties: false
221402
221408
  },
221403
221409
  agentToolConfigArg: {
@@ -376952,11 +376958,6 @@ function isReferenceableShape(shape) {
376952
376958
  return Boolean(shape.loaders?.get);
376953
376959
  }
376954
376960
 
376955
- // ../schema/dist/util/ai-tools.js
376956
- function getToolRef(tool) {
376957
- return typeof tool === "string" ? tool : tool.ref;
376958
- }
376959
-
376960
376961
  // ../schema/dist/util/merge.js
376961
376962
  var import_lodash = __toESM(require_lodash3(), 1);
376962
376963
  var import_difference = __toESM(require_difference(), 1);
@@ -377297,6 +377298,9 @@ function propertyRefItemToPath(getNamespace2, item2) {
377297
377298
  }
377298
377299
  return ["shapes", applyNamespace(namespace, shapeName), "schema", "properties", propertyName];
377299
377300
  }
377301
+ function getToolRef(tool) {
377302
+ return typeof tool === "string" ? tool : tool.ref;
377303
+ }
377300
377304
 
377301
377305
  // ../schema/dist/schema-util.js
377302
377306
  var import_curry2 = __toESM(require_curry2(), 1);
@@ -382706,6 +382710,13 @@ function checkShapeNames(shapes) {
382706
382710
  message: `Shape.name "${shape.name}" must match key "${name}".`
382707
382711
  }));
382708
382712
  }
382713
+ function checkToolNames(tools) {
382714
+ return Object.entries(tools).filter(([name, tool]) => name !== tool.name).map(([name, tool]) => ({
382715
+ path: ["ai-experimental", "tools", name, "name"],
382716
+ type: "conflict",
382717
+ message: `Tool.name "${tool.name}" must match key "${name}".`
382718
+ }));
382719
+ }
382709
382720
  function checkWorkflowStepNames(workflows) {
382710
382721
  return Object.entries(workflows).flatMap(([name, workflow]) => {
382711
382722
  const items = workflow.steps.map((step, i2) => ({
@@ -383597,6 +383608,9 @@ function formatValidationResult(context, errors, schema5) {
383597
383608
  function validateSyntax(context, schema5) {
383598
383609
  let errors = [];
383599
383610
  errors = errors.concat(checkShapeNames(schema5.shapes)).concat(checkShapeIds(schema5.shapes)).concat(validateWorkflows(schema5)).concat(validateLocalQueryConfigs(schema5)).concat(validateLocalRefs(schema5)).concat(validateLocalShapeJoins(schema5)).concat(validateDirectives(schema5)).concat(validateLocales(schema5)).concat(checkWorkflowStepNames(schema5.workflows)).concat(checkWorkflowStepKeys(schema5.workflows)).concat(validateOneOfs(schema5)).concat(validateIndexedShapes(context, schema5)).concat(validateInterfaces(schema5)).concat(validateInterfaceImplementations(schema5)).concat(validateAgents(schema5)).concat(validateGuards(context, schema5));
383611
+ if (schema5["ai-experimental"]?.tools) {
383612
+ errors = errors.concat(checkToolNames(schema5["ai-experimental"]?.tools ?? {}));
383613
+ }
383600
383614
  return formatValidationResult(context, errors, schema5);
383601
383615
  }
383602
383616
  async function validateReferences(context, schema5) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/cli",
3
- "version": "11.88.5",
3
+ "version": "11.89.0",
4
4
  "description": "TakeShape CLI",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {
@@ -70,11 +70,11 @@
70
70
  "stream-to-promise": "^2.2.0",
71
71
  "tmp": "^0.0.33",
72
72
  "unzipper": "^0.10.11",
73
- "@takeshape/branches": "11.88.5",
74
- "@takeshape/ssg": "11.88.5",
75
- "@takeshape/schema": "11.88.5",
76
- "@takeshape/streams": "11.88.5",
77
- "@takeshape/util": "11.88.5"
73
+ "@takeshape/schema": "11.89.0",
74
+ "@takeshape/branches": "11.89.0",
75
+ "@takeshape/ssg": "11.89.0",
76
+ "@takeshape/util": "11.89.0",
77
+ "@takeshape/streams": "11.89.0"
78
78
  },
79
79
  "engines": {
80
80
  "node": ">=20"