@takeshape/schema 11.105.0 → 11.106.1

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 (89) hide show
  1. package/dist/agents.d.ts +4 -4
  2. package/dist/agents.js +4 -4
  3. package/dist/migration/index.d.ts +1 -0
  4. package/dist/migration/index.js +3 -1
  5. package/dist/migration/to/v3.57.0.d.ts +4 -0
  6. package/dist/migration/to/v3.57.0.js +18 -0
  7. package/dist/migration/types.d.ts +7 -4
  8. package/dist/migration/types.js +3 -3
  9. package/dist/project-schema/index.d.ts +4 -1
  10. package/dist/project-schema/index.js +2 -1
  11. package/dist/project-schema/latest.d.ts +452 -260
  12. package/dist/project-schema/migrate.js +4 -1
  13. package/dist/project-schema/v3.57.0.d.ts +2597 -0
  14. package/dist/project-schema/v3.57.0.js +7 -0
  15. package/dist/refs.js +2 -2
  16. package/dist/schema-util.d.ts +2 -2
  17. package/dist/schemas/index.d.ts +2 -2
  18. package/dist/schemas/index.js +5 -3
  19. package/dist/schemas/project-schema/{experimental.json → experimental-2025-07.json} +1 -2
  20. package/dist/schemas/project-schema/latest.d.ts +180 -0
  21. package/dist/schemas/project-schema/latest.js +11 -0
  22. package/dist/schemas/project-schema/latest.json +1292 -12
  23. package/dist/schemas/project-schema/v3.48.0.json +2 -2
  24. package/dist/schemas/project-schema/v3.49.0.json +2 -2
  25. package/dist/schemas/project-schema/v3.50.0.json +3 -3
  26. package/dist/schemas/project-schema/v3.51.0.json +3 -3
  27. package/dist/schemas/project-schema/v3.52.0.json +3 -3
  28. package/dist/schemas/project-schema/v3.53.0.json +3 -3
  29. package/dist/schemas/project-schema/v3.54.0.json +3 -3
  30. package/dist/schemas/project-schema/v3.55.0.json +3 -3
  31. package/dist/schemas/project-schema/v3.56.0.json +7 -7
  32. package/dist/schemas/project-schema/v3.57.0.json +4810 -0
  33. package/dist/schemas/project-schema.json +3 -0
  34. package/dist/util/mcp.d.ts +1 -1
  35. package/dist/util/mcp.js +2 -2
  36. package/dist/validate/validate.d.ts +2 -1
  37. package/dist/validate/validate.js +15 -13
  38. package/examples/latest/agent-schema.json +174 -176
  39. package/examples/latest/all-fields-shapes-inline.json +1 -1
  40. package/examples/latest/all-fields-shapes.json +1 -1
  41. package/examples/latest/betzino.json +1 -1
  42. package/examples/latest/blog-schema.json +1 -1
  43. package/examples/latest/brewery-schema.json +1 -1
  44. package/examples/latest/clear-cache-schema.json +1 -1
  45. package/examples/latest/complex-project-schema.json +1 -1
  46. package/examples/latest/complex-schema.json +1 -1
  47. package/examples/latest/edit-schema.json +1 -1
  48. package/examples/latest/fabric-ecommerce.json +1 -1
  49. package/examples/latest/frank-and-fred-schema.json +1 -1
  50. package/examples/latest/klirr-schema.json +1 -1
  51. package/examples/latest/layers/rick-and-morty-layer.json +1 -1
  52. package/examples/latest/layers/shopify-layer-2023-01.json +1 -1
  53. package/examples/latest/layers/shopify-storefront-2023-04.json +1 -1
  54. package/examples/latest/layers/wordpress-2024-01.json +1 -1
  55. package/examples/latest/massive-schema.json +1 -1
  56. package/examples/latest/mill-components-schema.json +1 -1
  57. package/examples/latest/nested-shape-arrays.json +1 -1
  58. package/examples/latest/one-earth.json +1 -1
  59. package/examples/latest/pet-oneof-array.json +1 -1
  60. package/examples/latest/post-schema.json +1 -1
  61. package/examples/latest/pruned-shopify-product-schema.json +1 -1
  62. package/examples/latest/rag-example.json +1 -1
  63. package/examples/latest/real-world-schema.json +1 -1
  64. package/examples/latest/recursive-repeater-schema.json +1 -1
  65. package/examples/latest/recursive-schema.json +1 -1
  66. package/examples/latest/rick-and-morty-ast.json +1 -1
  67. package/examples/latest/rick-and-morty-graphql.json +1 -1
  68. package/examples/latest/rick-and-morty-rest.json +1 -1
  69. package/examples/latest/rick-and-morty-user-schema.json +1 -1
  70. package/examples/latest/rick-and-morty-with-indexing.json +1 -1
  71. package/examples/latest/schema-where-filter.json +1 -1
  72. package/examples/latest/schema-with-repeater-draftjs.json +1 -1
  73. package/examples/latest/schema-with-rick-and-morty.json +1 -1
  74. package/examples/latest/shape-books-v3_2_0.json +1 -1
  75. package/examples/latest/shape-books.json +1 -1
  76. package/examples/latest/shape-editor-schema-edited.json +1 -1
  77. package/examples/latest/shape-editor-schema-initial.json +1 -1
  78. package/examples/latest/shapedb-crud-every-prop-type.json +1 -1
  79. package/examples/latest/shopify-lookbook.json +1 -1
  80. package/examples/latest/shopify-product-2022-07.json +1 -1
  81. package/examples/latest/shopify-product-2023-04.json +1 -1
  82. package/examples/latest/shopify-store-with-widget.json +1 -1
  83. package/examples/latest/stripe-product-runtime-schema.json +1 -1
  84. package/examples/latest/stripe-starter-resolved.json +1 -1
  85. package/examples/latest/user-schema-no-required.json +1 -1
  86. package/examples/latest/user-schema-with-defaults.json +1 -1
  87. package/examples/latest/valvoline-ai-demo.json +1 -1
  88. package/examples/latest/vector-search-schema.json +1 -1
  89. package/package.json +27 -28
@@ -0,0 +1,7 @@
1
+ /* tslint:disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+ export {};
package/dist/refs.js CHANGED
@@ -522,7 +522,7 @@ export function getAllPropertyRefs(projectSchema) {
522
522
  (Array.isArray(resolverName) ? resolverName.some((name) => name === parent.name) : parent.name === resolverName));
523
523
  };
524
524
  const parentIsGenerateState = (path) => {
525
- if (path[0] !== 'ai-experimental' || path[path.length - 2] !== 'execution') {
525
+ if (path[0] !== 'agents' || path[path.length - 2] !== 'execution') {
526
526
  return false;
527
527
  }
528
528
  const parent = get(projectSchema, path.slice(0, -1));
@@ -547,7 +547,7 @@ export function getAllPropertyRefs(projectSchema) {
547
547
  pushRef(getToolRef(tool));
548
548
  }
549
549
  }
550
- else if (isRecord(value) && path[0] === 'ai-experimental') {
550
+ else if (isRecord(value) && (path[0] === 'agents' || path[0] === 'mcp')) {
551
551
  for (const tool of Object.values(value)) {
552
552
  pushRef(tool.ref);
553
553
  }
@@ -133,7 +133,7 @@ export type RefPredicate = (ref: RefItemWithPath) => boolean;
133
133
  * Walk through a `ProjectSchemaJSON` and collect all the `ref`s.
134
134
  */
135
135
  export declare function getAllRefsInShapes(projectSchema: ServicesShapesContext, predicate?: RefPredicate): RefItemWithPath[];
136
- export declare function getRefsInAgents(context: Pick<ProjectSchemaJSON, 'services' | 'ai-experimental'>, predicate?: RefPredicate): RefItemWithPath[];
136
+ export declare function getRefsInAgents(context: Pick<ProjectSchemaJSON, 'services' | 'agents'>, predicate?: RefPredicate): RefItemWithPath[];
137
137
  /**
138
138
  * Get all refs
139
139
  */
@@ -146,7 +146,7 @@ export declare function getAllRefsInQueries(projectSchema: Pick<ProjectSchemaJSO
146
146
  * Get all refs in a ProjectSchemaJSON
147
147
  * @param predicate return true to include the ref in
148
148
  */
149
- export declare function getAllRefs(projectSchema: Pick<ProjectSchemaJSON, 'queries' | 'mutations' | 'shapes' | 'services' | 'ai-experimental'>, predicate?: RefPredicate): RefItemWithPath[];
149
+ export declare function getAllRefs(projectSchema: Pick<ProjectSchemaJSON, 'queries' | 'mutations' | 'shapes' | 'services' | 'agents'>, predicate?: RefPredicate): RefItemWithPath[];
150
150
  /**
151
151
  * Get all valid refs in a ProjectSchemaJSON
152
152
  * @param predicate return true to include the ref in
@@ -1,4 +1,4 @@
1
- export declare const CURRENT_SCHEMA_VERSION = "3.56.0";
1
+ export declare const CURRENT_SCHEMA_VERSION = "3.57.0";
2
2
  export { default as anyProjectSchema } from './project-schema.json';
3
- export { default as latestSchemaJson } from './project-schema/v3.56.0.json';
3
+ export { default as latestSchemaJson } from './project-schema/v3.57.0.json';
4
4
  export declare const allProjectSchemas: any[];
@@ -1,8 +1,8 @@
1
1
  // This file is generated by "pnpm json2ts"
2
- export const CURRENT_SCHEMA_VERSION = '3.56.0';
2
+ export const CURRENT_SCHEMA_VERSION = '3.57.0';
3
3
  export { default as anyProjectSchema } from './project-schema.json' with { type: 'json' };
4
- export { default as latestSchemaJson } from './project-schema/v3.56.0.json' with { type: 'json' };
5
- import experimentalSchemaJson from './project-schema/experimental.json' with { type: 'json' };
4
+ export { default as latestSchemaJson } from './project-schema/v3.57.0.json' with { type: 'json' };
5
+ import experimentalSchemaJson from './project-schema/experimental-2025-07.json' with { type: 'json' };
6
6
  import metaSchemaV1_0_0 from './project-schema/meta-schema-v1.0.0.json' with { type: 'json' };
7
7
  import projectSchemaV1_0_0 from './project-schema/v1.0.0.json' with { type: 'json' };
8
8
  import metaSchemaV3_0_0 from './project-schema/meta-schema-v3.0.0.json' with { type: 'json' };
@@ -80,6 +80,7 @@ import projectSchemaV3_53_0 from './project-schema/v3.53.0.json' with { type: 'j
80
80
  import projectSchemaV3_54_0 from './project-schema/v3.54.0.json' with { type: 'json' };
81
81
  import projectSchemaV3_55_0 from './project-schema/v3.55.0.json' with { type: 'json' };
82
82
  import projectSchemaV3_56_0 from './project-schema/v3.56.0.json' with { type: 'json' };
83
+ import projectSchemaV3_57_0 from './project-schema/v3.57.0.json' with { type: 'json' };
83
84
  import projectSchemaV4_0_0 from './project-schema/v4.0.0.json' with { type: 'json' };
84
85
  export const allProjectSchemas = [
85
86
  experimentalSchemaJson,
@@ -160,5 +161,6 @@ export const allProjectSchemas = [
160
161
  projectSchemaV3_54_0,
161
162
  projectSchemaV3_55_0,
162
163
  projectSchemaV3_56_0,
164
+ projectSchemaV3_57_0,
163
165
  projectSchemaV4_0_0
164
166
  ];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://schema.takeshape.io/project-schema/experimental#",
3
+ "$id": "https://schema.takeshape.io/project-schema/experimental-2025-07#",
4
4
  "definitions": {
5
5
  "agent": {
6
6
  "title": "Agent JSON",
@@ -696,7 +696,6 @@
696
696
  "required": ["type", "service", "model", "input"],
697
697
  "additionalProperties": false
698
698
  },
699
-
700
699
  "agentTransition": {
701
700
  "title": "Agent Transition",
702
701
  "description": "These steps are evaluated in order until a destination is found.",
@@ -0,0 +1,180 @@
1
+ export declare function getAgentSchema(): {
2
+ definitions: {
3
+ [x: string]: import("json-schema").JSONSchema7Definition;
4
+ };
5
+ minimum?: number | undefined | undefined;
6
+ maximum?: number | undefined | undefined;
7
+ exclusiveMinimum?: number | undefined | undefined;
8
+ exclusiveMaximum?: number | undefined | undefined;
9
+ multipleOf?: number | undefined | undefined;
10
+ format?: string | undefined | undefined;
11
+ allOf?: import("json-schema").JSONSchema7Definition[] | undefined | undefined;
12
+ anyOf?: import("json-schema").JSONSchema7Definition[] | undefined | undefined;
13
+ oneOf?: import("json-schema").JSONSchema7Definition[] | undefined | undefined;
14
+ if?: import("json-schema").JSONSchema7Definition | undefined;
15
+ then?: import("json-schema").JSONSchema7Definition | undefined;
16
+ else?: import("json-schema").JSONSchema7Definition | undefined;
17
+ not?: import("json-schema").JSONSchema7Definition | undefined;
18
+ $id?: string | undefined | undefined;
19
+ $ref?: string | undefined | undefined;
20
+ $defs?: {
21
+ [key: string]: import("json-schema").JSONSchema7Definition;
22
+ } | undefined | undefined;
23
+ $schema?: string | undefined;
24
+ $comment?: string | undefined | undefined;
25
+ type: "object";
26
+ enum?: import("json-schema").JSONSchema7Type[] | undefined | undefined;
27
+ const?: import("json-schema").JSONSchema7Type | undefined;
28
+ maxLength?: number | undefined | undefined;
29
+ minLength?: number | undefined | undefined;
30
+ pattern?: string | undefined | undefined;
31
+ items?: import("json-schema").JSONSchema7Definition | import("json-schema").JSONSchema7Definition[] | undefined;
32
+ additionalItems?: import("json-schema").JSONSchema7Definition | undefined;
33
+ maxItems?: number | undefined | undefined;
34
+ minItems?: number | undefined | undefined;
35
+ uniqueItems?: boolean | undefined | undefined;
36
+ contains?: import("json-schema").JSONSchema7Definition | undefined;
37
+ maxProperties?: number | undefined | undefined;
38
+ minProperties?: number | undefined | undefined;
39
+ required?: string[] | undefined | undefined;
40
+ patternProperties?: {
41
+ [key: string]: import("json-schema").JSONSchema7Definition;
42
+ } | undefined | undefined;
43
+ additionalProperties?: import("json-schema").JSONSchema7Definition | undefined;
44
+ dependencies?: {
45
+ [key: string]: import("json-schema").JSONSchema7Definition | string[];
46
+ } | undefined | undefined;
47
+ propertyNames?: import("json-schema").JSONSchema7Definition | undefined;
48
+ contentMediaType?: string | undefined | undefined;
49
+ contentEncoding?: string | undefined | undefined;
50
+ title?: string | undefined | undefined;
51
+ description?: string | undefined | undefined;
52
+ default?: import("json-schema").JSONSchema7Type | undefined;
53
+ readOnly?: boolean | undefined | undefined;
54
+ writeOnly?: boolean | undefined | undefined;
55
+ examples?: import("json-schema").JSONSchema7Type | undefined;
56
+ discriminator?: {
57
+ propertyName: string;
58
+ } | undefined;
59
+ properties: Exclude<import("json-schema").JSONSchema7["properties"], undefined>;
60
+ };
61
+ export declare function getGuardSchema(): {
62
+ definitions: {
63
+ [x: string]: import("json-schema").JSONSchema7Definition;
64
+ };
65
+ minimum?: number | undefined | undefined;
66
+ maximum?: number | undefined | undefined;
67
+ exclusiveMinimum?: number | undefined | undefined;
68
+ exclusiveMaximum?: number | undefined | undefined;
69
+ multipleOf?: number | undefined | undefined;
70
+ format?: string | undefined | undefined;
71
+ allOf?: import("json-schema").JSONSchema7Definition[] | undefined | undefined;
72
+ anyOf?: import("json-schema").JSONSchema7Definition[] | undefined | undefined;
73
+ oneOf?: import("json-schema").JSONSchema7Definition[] | undefined | undefined;
74
+ if?: import("json-schema").JSONSchema7Definition | undefined;
75
+ then?: import("json-schema").JSONSchema7Definition | undefined;
76
+ else?: import("json-schema").JSONSchema7Definition | undefined;
77
+ not?: import("json-schema").JSONSchema7Definition | undefined;
78
+ $id?: string | undefined | undefined;
79
+ $ref?: string | undefined | undefined;
80
+ $defs?: {
81
+ [key: string]: import("json-schema").JSONSchema7Definition;
82
+ } | undefined | undefined;
83
+ $schema?: string | undefined;
84
+ $comment?: string | undefined | undefined;
85
+ type: "object";
86
+ enum?: import("json-schema").JSONSchema7Type[] | undefined | undefined;
87
+ const?: import("json-schema").JSONSchema7Type | undefined;
88
+ maxLength?: number | undefined | undefined;
89
+ minLength?: number | undefined | undefined;
90
+ pattern?: string | undefined | undefined;
91
+ items?: import("json-schema").JSONSchema7Definition | import("json-schema").JSONSchema7Definition[] | undefined;
92
+ additionalItems?: import("json-schema").JSONSchema7Definition | undefined;
93
+ maxItems?: number | undefined | undefined;
94
+ minItems?: number | undefined | undefined;
95
+ uniqueItems?: boolean | undefined | undefined;
96
+ contains?: import("json-schema").JSONSchema7Definition | undefined;
97
+ maxProperties?: number | undefined | undefined;
98
+ minProperties?: number | undefined | undefined;
99
+ required?: string[] | undefined | undefined;
100
+ patternProperties?: {
101
+ [key: string]: import("json-schema").JSONSchema7Definition;
102
+ } | undefined | undefined;
103
+ additionalProperties?: import("json-schema").JSONSchema7Definition | undefined;
104
+ dependencies?: {
105
+ [key: string]: import("json-schema").JSONSchema7Definition | string[];
106
+ } | undefined | undefined;
107
+ propertyNames?: import("json-schema").JSONSchema7Definition | undefined;
108
+ contentMediaType?: string | undefined | undefined;
109
+ contentEncoding?: string | undefined | undefined;
110
+ title?: string | undefined | undefined;
111
+ description?: string | undefined | undefined;
112
+ default?: import("json-schema").JSONSchema7Type | undefined;
113
+ readOnly?: boolean | undefined | undefined;
114
+ writeOnly?: boolean | undefined | undefined;
115
+ examples?: import("json-schema").JSONSchema7Type | undefined;
116
+ discriminator?: {
117
+ propertyName: string;
118
+ } | undefined;
119
+ properties: Exclude<import("json-schema").JSONSchema7["properties"], undefined>;
120
+ };
121
+ export declare function getToolSchema(): {
122
+ definitions: {
123
+ [x: string]: import("json-schema").JSONSchema7Definition;
124
+ };
125
+ minimum?: number | undefined | undefined;
126
+ maximum?: number | undefined | undefined;
127
+ exclusiveMinimum?: number | undefined | undefined;
128
+ exclusiveMaximum?: number | undefined | undefined;
129
+ multipleOf?: number | undefined | undefined;
130
+ format?: string | undefined | undefined;
131
+ allOf?: import("json-schema").JSONSchema7Definition[] | undefined | undefined;
132
+ anyOf?: import("json-schema").JSONSchema7Definition[] | undefined | undefined;
133
+ oneOf?: import("json-schema").JSONSchema7Definition[] | undefined | undefined;
134
+ if?: import("json-schema").JSONSchema7Definition | undefined;
135
+ then?: import("json-schema").JSONSchema7Definition | undefined;
136
+ else?: import("json-schema").JSONSchema7Definition | undefined;
137
+ not?: import("json-schema").JSONSchema7Definition | undefined;
138
+ $id?: string | undefined | undefined;
139
+ $ref?: string | undefined | undefined;
140
+ $defs?: {
141
+ [key: string]: import("json-schema").JSONSchema7Definition;
142
+ } | undefined | undefined;
143
+ $schema?: string | undefined;
144
+ $comment?: string | undefined | undefined;
145
+ type: "object";
146
+ enum?: import("json-schema").JSONSchema7Type[] | undefined | undefined;
147
+ const?: import("json-schema").JSONSchema7Type | undefined;
148
+ maxLength?: number | undefined | undefined;
149
+ minLength?: number | undefined | undefined;
150
+ pattern?: string | undefined | undefined;
151
+ items?: import("json-schema").JSONSchema7Definition | import("json-schema").JSONSchema7Definition[] | undefined;
152
+ additionalItems?: import("json-schema").JSONSchema7Definition | undefined;
153
+ maxItems?: number | undefined | undefined;
154
+ minItems?: number | undefined | undefined;
155
+ uniqueItems?: boolean | undefined | undefined;
156
+ contains?: import("json-schema").JSONSchema7Definition | undefined;
157
+ maxProperties?: number | undefined | undefined;
158
+ minProperties?: number | undefined | undefined;
159
+ required?: string[] | undefined | undefined;
160
+ patternProperties?: {
161
+ [key: string]: import("json-schema").JSONSchema7Definition;
162
+ } | undefined | undefined;
163
+ additionalProperties?: import("json-schema").JSONSchema7Definition | undefined;
164
+ dependencies?: {
165
+ [key: string]: import("json-schema").JSONSchema7Definition | string[];
166
+ } | undefined | undefined;
167
+ propertyNames?: import("json-schema").JSONSchema7Definition | undefined;
168
+ contentMediaType?: string | undefined | undefined;
169
+ contentEncoding?: string | undefined | undefined;
170
+ title?: string | undefined | undefined;
171
+ description?: string | undefined | undefined;
172
+ default?: import("json-schema").JSONSchema7Type | undefined;
173
+ readOnly?: boolean | undefined | undefined;
174
+ writeOnly?: boolean | undefined | undefined;
175
+ examples?: import("json-schema").JSONSchema7Type | undefined;
176
+ discriminator?: {
177
+ propertyName: string;
178
+ } | undefined;
179
+ properties: Exclude<import("json-schema").JSONSchema7["properties"], undefined>;
180
+ };
@@ -0,0 +1,11 @@
1
+ import { promoteObjectSchema } from '@takeshape/json-schema/utils';
2
+ import latestProjectSchema from './latest.json';
3
+ export function getAgentSchema() {
4
+ return promoteObjectSchema(latestProjectSchema, '#/definitions/agent');
5
+ }
6
+ export function getGuardSchema() {
7
+ return promoteObjectSchema(latestProjectSchema, '#/definitions/guard');
8
+ }
9
+ export function getToolSchema() {
10
+ return promoteObjectSchema(latestProjectSchema, '#/definitions/tool');
11
+ }