@horizon36596/zenith-schema 0.1.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 (57) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +18 -0
  3. package/README.md +24 -0
  4. package/dist/auto.d.ts +1882 -0
  5. package/dist/auto.d.ts.map +1 -0
  6. package/dist/auto.js +236 -0
  7. package/dist/auto.js.map +1 -0
  8. package/dist/common.d.ts +76 -0
  9. package/dist/common.d.ts.map +1 -0
  10. package/dist/common.js +30 -0
  11. package/dist/common.js.map +1 -0
  12. package/dist/expr.d.ts +56 -0
  13. package/dist/expr.d.ts.map +1 -0
  14. package/dist/expr.js +245 -0
  15. package/dist/expr.js.map +1 -0
  16. package/dist/field.d.ts +719 -0
  17. package/dist/field.d.ts.map +1 -0
  18. package/dist/field.js +158 -0
  19. package/dist/field.js.map +1 -0
  20. package/dist/ids.d.ts +62 -0
  21. package/dist/ids.d.ts.map +1 -0
  22. package/dist/ids.js +79 -0
  23. package/dist/ids.js.map +1 -0
  24. package/dist/index.d.ts +17 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +17 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/jsonschema.d.ts +14 -0
  29. package/dist/jsonschema.d.ts.map +1 -0
  30. package/dist/jsonschema.js +31 -0
  31. package/dist/jsonschema.js.map +1 -0
  32. package/dist/link.d.ts +117 -0
  33. package/dist/link.d.ts.map +1 -0
  34. package/dist/link.js +58 -0
  35. package/dist/link.js.map +1 -0
  36. package/dist/migrate.d.ts +2699 -0
  37. package/dist/migrate.d.ts.map +1 -0
  38. package/dist/migrate.js +109 -0
  39. package/dist/migrate.js.map +1 -0
  40. package/dist/parse.d.ts +28 -0
  41. package/dist/parse.d.ts.map +1 -0
  42. package/dist/parse.js +46 -0
  43. package/dist/parse.js.map +1 -0
  44. package/dist/robot.d.ts +2935 -0
  45. package/dist/robot.d.ts.map +1 -0
  46. package/dist/robot.js +231 -0
  47. package/dist/robot.js.map +1 -0
  48. package/dist/waypoints.d.ts +63 -0
  49. package/dist/waypoints.d.ts.map +1 -0
  50. package/dist/waypoints.js +20 -0
  51. package/dist/waypoints.js.map +1 -0
  52. package/json/auto.json +683 -0
  53. package/json/field.json +457 -0
  54. package/json/link.json +110 -0
  55. package/json/robot.json +664 -0
  56. package/json/waypoints.json +50 -0
  57. package/package.json +65 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"robot.d.ts","sourceRoot":"","sources":["../src/robot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAI7B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQ1B,mGAAmG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEnG,CAAC;AAaH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;IAG9B,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,6oBAyBrB,CAAC;AAEX,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,+CAAgD,CAAC;AAUlF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAChD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,oFAAoF;AACpF,eAAO,MAAM,uBAAuB,KAAK,CAAC"}
package/dist/robot.js ADDED
@@ -0,0 +1,231 @@
1
+ import { z } from "zod";
2
+ import { provenanceSchema, valuedNumberSchema } from "./common.js";
3
+ import { isEstimateExpression } from "./expr.js";
4
+ import { formatVersionFor, schemaIdField } from "./ids.js";
5
+ /** One footprint box. Length runs along the nose (+x in the robot frame), width across it. */
6
+ export const footprintBoxSchema = z.object({
7
+ lengthIn: z.number().positive(),
8
+ widthIn: z.number().positive(),
9
+ provenance: provenanceSchema.optional(),
10
+ });
11
+ /**
12
+ * The footprint is fully customizable per robot: the box at the start of the match, the
13
+ * box with every mechanism out, and the centre of rotation as an offset from the footprint centre.
14
+ */
15
+ export const footprintSchema = z.object({
16
+ startIn: footprintBoxSchema,
17
+ expandedIn: footprintBoxSchema,
18
+ centreOfRotationIn: z.object({
19
+ xIn: z.number(),
20
+ yIn: z.number(),
21
+ provenance: provenanceSchema.optional(),
22
+ }),
23
+ /** How tall the robot is, for the z gate on the STRUCTURE check. `robot.heightIn` wins over it. */
24
+ heightIn: valuedNumberSchema.optional(),
25
+ });
26
+ /**
27
+ * A `{ value, provenance }` number that also accepts the bare number an older file wrote, so every
28
+ * reader sees one shape. A bare number is read as `{ value }` with no provenance, which is exactly
29
+ * what it was: a number with no label (CLAUDE.md rule 4), and the next save writes the wrapper.
30
+ * It is a union with a transform rather than a preprocess so the published JSON Schema accepts both
31
+ * spellings too, and an older file does not light up red in an editor before it is re-saved.
32
+ */
33
+ const valuedOrBareNumberSchema = z
34
+ .union([valuedNumberSchema, z.number().positive()])
35
+ .transform((raw) => (typeof raw === "number" ? { value: raw } : raw));
36
+ /**
37
+ * A follower switch: a bare boolean, or `{ value, provenance }` so it can say where it came from
38
+ * like every other constant (CLAUDE.md rule 4). Both spellings are kept as written.
39
+ */
40
+ export const valuedBooleanSchema = z.union([
41
+ z.boolean(),
42
+ z.object({ value: z.boolean(), provenance: provenanceSchema.optional() }),
43
+ ]);
44
+ /**
45
+ * The Pedro follower's gains and tolerances, all optional, read by the instant sim
46
+ * (`packages/core/src/sim/params.ts`). A key left out falls back to Pedro's `ForesightConfig`
47
+ * default or a value derived from the rest of this file, as `params.ts` lists. The key names are
48
+ * the sim's; declaration order here is the canonical file order.
49
+ */
50
+ export const FOLLOWER_GAIN_KEYS = [
51
+ "forwardTranslationalPowerPerIn",
52
+ "strafeTranslationalPowerPerIn",
53
+ "headingPowerPerRad",
54
+ "headingStaticPower",
55
+ "coastPowerPerInPerS",
56
+ "coastFeedforwardPowerPerInPerS",
57
+ "brakeFeedforwardPowerPerInPerS",
58
+ "maxBrakingPower",
59
+ "headingDriveRatio",
60
+ "brakeAggression",
61
+ "brakeLinearForwardS",
62
+ "brakeQuadraticForwardS2PerIn",
63
+ "brakeLinearStrafeS",
64
+ "brakeQuadraticStrafeS2PerIn",
65
+ "headingBrakeLinearS",
66
+ "headingBrakeQuadraticS2PerRad",
67
+ "endParametricT",
68
+ "endHeadingToleranceRad",
69
+ "endTranslationalToleranceIn",
70
+ "endVelocityToleranceInPerS",
71
+ "holdTimeoutS",
72
+ "headingDeviationToleranceRad",
73
+ "translationalDeviationToleranceIn",
74
+ "minCorrectionDistanceIn",
75
+ ];
76
+ /** The two follower switches, `cosineScale` and `turnBeforeDriving`. */
77
+ export const FOLLOWER_SWITCH_KEYS = ["cosineScale", "turnBeforeDriving"];
78
+ const followerGainsShape = Object.fromEntries(FOLLOWER_GAIN_KEYS.map((key) => [key, valuedNumberSchema.optional()]));
79
+ const followerSwitchesShape = Object.fromEntries(FOLLOWER_SWITCH_KEYS.map((key) => [key, valuedBooleanSchema.optional()]));
80
+ export const followerSchema = z.object({
81
+ library: z.enum(["pedro"]),
82
+ version: z.string().min(1),
83
+ holdEnd: z.boolean(),
84
+ ...followerGainsShape,
85
+ ...followerSwitchesShape,
86
+ });
87
+ /**
88
+ * The drivetrain geometry and wheel response the instant sim's plant uses. Each key is optional;
89
+ * the sim derives a stand-in from the footprint and the kinematics when one is left out.
90
+ */
91
+ export const drivetrainSchema = z.object({
92
+ trackWidthIn: valuedNumberSchema.optional(),
93
+ wheelBaseIn: valuedNumberSchema.optional(),
94
+ wheelResponseRatePerS: valuedNumberSchema.optional(),
95
+ });
96
+ export const mouthSchema = z.object({
97
+ id: z.string().min(1),
98
+ side: z.enum(["FRONT", "BACK", "LEFT", "RIGHT"]),
99
+ offsetIn: z.object({
100
+ xIn: z.number(),
101
+ yIn: z.number(),
102
+ }),
103
+ widthIn: z.number().positive(),
104
+ depthIn: z.number().positive(),
105
+ provenance: provenanceSchema.optional(),
106
+ });
107
+ export const commandParamSchema = z.discriminatedUnion("type", [
108
+ z.object({
109
+ type: z.literal("integer"),
110
+ min: z.number().optional(),
111
+ max: z.number().optional(),
112
+ default: z.number().optional(),
113
+ }),
114
+ z.object({
115
+ type: z.literal("number"),
116
+ min: z.number().optional(),
117
+ max: z.number().optional(),
118
+ default: z.number().optional(),
119
+ }),
120
+ z.object({
121
+ type: z.literal("enum"),
122
+ values: z.array(z.string().min(1)).min(1),
123
+ default: z.string().optional(),
124
+ }),
125
+ z.object({
126
+ type: z.literal("boolean"),
127
+ default: z.boolean().optional(),
128
+ }),
129
+ z.object({
130
+ type: z.literal("string"),
131
+ default: z.string().optional(),
132
+ }),
133
+ ]);
134
+ /** One entry in the named-command registry. `name` must match a NamedCommands registration. */
135
+ export const commandSpecSchema = z.object({
136
+ name: z.string().min(1),
137
+ summary: z.string().optional(),
138
+ params: z.record(z.string(), commandParamSchema).optional(),
139
+ estimateS: z.string().refine(isEstimateExpression, {
140
+ message: 'estimateS must be an expression over the params (numbers, names, + - * /, max, min) or "unknown"',
141
+ }),
142
+ requires: z.array(z.string().min(1)).optional(),
143
+ stationary: z.boolean().optional(),
144
+ movesRobot: z.boolean().optional(),
145
+ ledger: z.record(z.string(), z.union([z.string(), z.number()])).optional(),
146
+ });
147
+ export const conditionSpecSchema = z.object({
148
+ name: z.string().min(1),
149
+ summary: z.string().optional(),
150
+ /**
151
+ * Which condition means the robot is at capacity (`"full"`) or holding nothing (`"empty"`), so
152
+ * the instant sim can answer it from the ledger. Without it the sim assumes `hopperFull` and
153
+ * `hopperEmpty`.
154
+ */
155
+ ledger: z.enum(["full", "empty"]).optional(),
156
+ });
157
+ /**
158
+ * `robot.json`: everything the planner needs to know about one robot
159
+ * (site/docs/file-format.md). Key declaration order is the canonical file order.
160
+ */
161
+ export const robotSchema = z.object({
162
+ $schema: schemaIdField("robot"),
163
+ formatVersion: formatVersionFor("robot"),
164
+ name: z.string().min(1),
165
+ frame: z.object({
166
+ forward: z.enum(["+x", "-x", "+y", "-y"]),
167
+ left: z.enum(["+x", "-x", "+y", "-y"]),
168
+ headingZero: z.enum(["+x", "+y"]),
169
+ headingPositive: z.enum(["ccw", "cw"]),
170
+ }),
171
+ footprint: footprintSchema,
172
+ /**
173
+ * Robot height, for the z-range gate on the STRUCTURE check, with the provenance every constant
174
+ * carries. It wins over `footprint.heightIn` when both are given; `robotHeightIn` in the core is
175
+ * the one reader. Defaults to 18 in when both are absent.
176
+ */
177
+ heightIn: valuedOrBareNumberSchema.optional(),
178
+ kinematics: z.object({
179
+ maxForwardVelInPerS: valuedNumberSchema,
180
+ maxStrafeVelInPerS: valuedNumberSchema,
181
+ forwardDecelInPerS2: valuedNumberSchema,
182
+ strafeDecelInPerS2: valuedNumberSchema,
183
+ accelInPerS2: valuedNumberSchema,
184
+ maxAngularVelRadPerS: valuedNumberSchema,
185
+ defaultPathSpeedFraction: valuedNumberSchema,
186
+ /** Seconds the follower spends declaring the end constraints met (`03` section 3 step 7). */
187
+ settleS: valuedNumberSchema.optional(),
188
+ /** The STRAFE_FRACTION warning threshold. `strafeFractionThreshold` is the older spelling. */
189
+ strafeFractionWarn: valuedNumberSchema.optional(),
190
+ strafeFractionThreshold: valuedNumberSchema.optional(),
191
+ sweepSpeedFraction: valuedNumberSchema.optional(),
192
+ /** What `07` writes back once a recorded run has been fitted: the estimate band, as a fraction. */
193
+ calibration: z
194
+ .object({
195
+ band: z.number().positive(),
196
+ samples: z.number().int().nonnegative().optional(),
197
+ provenance: provenanceSchema.optional(),
198
+ })
199
+ .optional(),
200
+ follower: followerSchema,
201
+ drivetrain: drivetrainSchema.optional(),
202
+ }),
203
+ mouths: z.array(mouthSchema).optional(),
204
+ capacity: z
205
+ .object({
206
+ elementKind: z.string().min(1),
207
+ max: z.number().int().nonnegative(),
208
+ provenance: provenanceSchema.optional(),
209
+ })
210
+ .optional(),
211
+ shooter: z
212
+ .object({
213
+ kind: z.string().min(1),
214
+ turretRangeRad: z
215
+ .object({
216
+ minRad: z.number(),
217
+ maxRad: z.number(),
218
+ provenance: provenanceSchema.optional(),
219
+ })
220
+ .optional(),
221
+ cadenceS: z.record(z.string(), z.union([z.number(), z.string()])).optional(),
222
+ settleS: valuedNumberSchema.optional(),
223
+ })
224
+ .passthrough()
225
+ .optional(),
226
+ commands: z.array(commandSpecSchema),
227
+ conditions: z.array(conditionSpecSchema).optional(),
228
+ });
229
+ /** The robot height the STRUCTURE z-gate assumes when `robot.json` does not say. */
230
+ export const DEFAULT_ROBOT_HEIGHT_IN = 18;
231
+ //# sourceMappingURL=robot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"robot.js","sourceRoot":"","sources":["../src/robot.ts"],"names":[],"mappings":"AAAA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AC"}
@@ -0,0 +1,63 @@
1
+ import { z } from "zod";
2
+ /** One named pose the team measured, in the canonical alliance's frame. */
3
+ export declare const waypointSchema: z.ZodObject<{
4
+ xIn: z.ZodNumber;
5
+ yIn: z.ZodNumber;
6
+ headingRad: z.ZodNumber;
7
+ provenance: z.ZodOptional<z.ZodString>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ xIn: number;
10
+ yIn: number;
11
+ headingRad: number;
12
+ provenance?: string | undefined;
13
+ }, {
14
+ xIn: number;
15
+ yIn: number;
16
+ headingRad: number;
17
+ provenance?: string | undefined;
18
+ }>;
19
+ /**
20
+ * `waypoints.json`: named poses shared across autos. Changing one changes every auto that
21
+ * references it, which is the point (site/docs/file-format.md).
22
+ */
23
+ export declare const waypointsSchema: z.ZodObject<{
24
+ $schema: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
25
+ formatVersion: z.ZodLiteral<1>;
26
+ waypoints: z.ZodRecord<z.ZodString, z.ZodObject<{
27
+ xIn: z.ZodNumber;
28
+ yIn: z.ZodNumber;
29
+ headingRad: z.ZodNumber;
30
+ provenance: z.ZodOptional<z.ZodString>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ xIn: number;
33
+ yIn: number;
34
+ headingRad: number;
35
+ provenance?: string | undefined;
36
+ }, {
37
+ xIn: number;
38
+ yIn: number;
39
+ headingRad: number;
40
+ provenance?: string | undefined;
41
+ }>>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ waypoints: Record<string, {
44
+ xIn: number;
45
+ yIn: number;
46
+ headingRad: number;
47
+ provenance?: string | undefined;
48
+ }>;
49
+ formatVersion: 1;
50
+ $schema?: string | undefined;
51
+ }, {
52
+ waypoints: Record<string, {
53
+ xIn: number;
54
+ yIn: number;
55
+ headingRad: number;
56
+ provenance?: string | undefined;
57
+ }>;
58
+ formatVersion: 1;
59
+ $schema?: string | undefined;
60
+ }>;
61
+ export type Waypoint = z.infer<typeof waypointSchema>;
62
+ export type Waypoints = z.infer<typeof waypointsSchema>;
63
+ //# sourceMappingURL=waypoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waypoints.d.ts","sourceRoot":"","sources":["../src/waypoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,2EAA2E;AAC3E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAKzB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI1B,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from "zod";
2
+ import { provenanceSchema } from "./common.js";
3
+ import { formatVersionFor, schemaIdField } from "./ids.js";
4
+ /** One named pose the team measured, in the canonical alliance's frame. */
5
+ export const waypointSchema = z.object({
6
+ xIn: z.number(),
7
+ yIn: z.number(),
8
+ headingRad: z.number(),
9
+ provenance: provenanceSchema.optional(),
10
+ });
11
+ /**
12
+ * `waypoints.json`: named poses shared across autos. Changing one changes every auto that
13
+ * references it, which is the point (site/docs/file-format.md).
14
+ */
15
+ export const waypointsSchema = z.object({
16
+ $schema: schemaIdField("waypoints"),
17
+ formatVersion: formatVersionFor("waypoints"),
18
+ waypoints: z.record(z.string().min(1), waypointSchema),
19
+ });
20
+ //# sourceMappingURL=waypoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waypoints.js","sourceRoot":"","sources":["../src/waypoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3D,2EAA2E;AAC3E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,gBAAgB,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC;IACnC,aAAa,EAAE,gBAAgB,CAAC,WAAW,CAAC;IAC5C,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC;CACvD,CAAC,CAAC"}