@horizon36596/zenith-seasons 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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Horizon (FTC 36596)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,18 @@
1
+ Zenith
2
+ Copyright (c) 2026 Horizon (FTC 36596)
3
+
4
+ Zenith is licensed under the MIT License; see LICENSE.
5
+
6
+ Third-party assets
7
+
8
+ - BIOBUZZ field images (apps/web/public/fields/biobuzz/*.webp) by Team Juice 16236, from the r/FTC
9
+ post "BIOBUZZ custom field images (MeepMeep compatible)". Used with the credit the author asks for.
10
+
11
+ Bundled fonts
12
+
13
+ The following fonts are bundled in apps/web/public/fonts/. Each is licensed under the SIL Open Font
14
+ License, Version 1.1. The full licence text ships next to each font file.
15
+
16
+ - Jost, licensed under the SIL Open Font License 1.1 (jost-OFL.txt).
17
+ - IBM Plex Sans, licensed under the SIL Open Font License 1.1 (ibm-plex-sans-OFL.txt).
18
+ - JetBrains Mono, licensed under the SIL Open Font License 1.1 (jetbrains-mono-OFL.txt).
package/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # @horizon36596/zenith-seasons
2
+
3
+ The season registry of [Zenith](https://libraries.horizon36596.org/zenith/), the FTC autonomous
4
+ planner by Horizon (FTC 36596). It turns a field file into the season rules the feasibility checks
5
+ run against, so the editor, the CLI and the MCP server always agree on which season a project is.
6
+
7
+ ```
8
+ npm install @horizon36596/zenith-seasons
9
+ ```
10
+
11
+ ```ts
12
+ import { resolveSeason } from "@horizon36596/zenith-seasons";
13
+
14
+ const { rules, warnings } = resolveSeason(field);
15
+ ```
16
+
17
+ A field that names no known season gets no season rules and a warning, never an error. Seasons
18
+ bundled today: BIOBUZZ ([`@horizon36596/zenith-season-biobuzz`](https://www.npmjs.com/package/@horizon36596/zenith-season-biobuzz)).
19
+
20
+ Documentation: https://libraries.horizon36596.org/zenith/. Licence: MIT.
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @horizon36596/zenith-seasons: the one place that turns a `field.json` into the `SeasonRules` the core runs
3
+ * against, so the editor, the CLI and the MCP server never disagree about which season a project is.
4
+ *
5
+ * A season package implements `SeasonRules` and knows nothing about this registry; this package
6
+ * knows the registry and nothing about a season's rules. Adding a season is one entry below plus a
7
+ * dependency, and every consumer picks it up.
8
+ */
9
+ import { type SeasonRules } from "@horizon36596/zenith-core";
10
+ import type { Field } from "@horizon36596/zenith-schema";
11
+ /** One season the registry knows, as the open dialog and `zenith init` list them. */
12
+ export interface SeasonInfo {
13
+ /** The `rules.plugin` value in `field.json` that selects it. */
14
+ readonly plugin: string;
15
+ /** The `season` value in `field.json`, which selects it too when `rules.plugin` is absent. */
16
+ readonly season: string;
17
+ /** What a human calls it. */
18
+ readonly label: string;
19
+ }
20
+ /**
21
+ * What `field.json` resolved to. `known` is false when the file names a plugin this build does not
22
+ * carry: the rules are then `noSeasonRules`, the routine still plans and estimates, and every
23
+ * season-dependent check and ledger row is simply absent. `warnings` says so in full sentences; it
24
+ * is returned rather than logged, because core's callers include a pure CLI and an MCP server whose
25
+ * stdout is a protocol.
26
+ */
27
+ export interface SeasonResolution {
28
+ readonly rules: SeasonRules;
29
+ readonly known: boolean;
30
+ /** The plugin name the field file asked for, or null when it names none. */
31
+ readonly plugin: string | null;
32
+ readonly warnings: readonly string[];
33
+ }
34
+ /** Every season this build carries, for a picker or a `--help` listing. */
35
+ export declare const listSeasons: () => SeasonInfo[];
36
+ /** The rules for a field file, with everything the caller needs to explain a miss. */
37
+ export declare function resolveSeason(field: Field): SeasonResolution;
38
+ /** The rules for a field file. The common case, when the caller has nothing to say about a miss. */
39
+ export declare const seasonFor: (field: Field) => SeasonRules;
40
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD,qFAAqF;AACrF,MAAM,WAAW,UAAU;IACzB,gEAAgE;IAChE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8FAA8F;IAC9F,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6BAA6B;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAeD,2EAA2E;AAC3E,eAAO,MAAM,WAAW,QAAO,UAAU,EACiC,CAAC;AAW3E,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,gBAAgB,CAoB5D;AAED,oGAAoG;AACpG,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,KAAG,WAAyC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @horizon36596/zenith-seasons: the one place that turns a `field.json` into the `SeasonRules` the core runs
3
+ * against, so the editor, the CLI and the MCP server never disagree about which season a project is.
4
+ *
5
+ * A season package implements `SeasonRules` and knows nothing about this registry; this package
6
+ * knows the registry and nothing about a season's rules. Adding a season is one entry below plus a
7
+ * dependency, and every consumer picks it up.
8
+ */
9
+ import { noSeasonRules } from "@horizon36596/zenith-core";
10
+ import { loadSeason as loadBiobuzz, seasonId as biobuzzSeasonId } from "@horizon36596/zenith-season-biobuzz";
11
+ const REGISTRY = [
12
+ {
13
+ plugin: "season-biobuzz",
14
+ season: biobuzzSeasonId,
15
+ label: "BIOBUZZ presented by RTX (FTC 2026-27)",
16
+ load: loadBiobuzz,
17
+ },
18
+ ];
19
+ /** Every season this build carries, for a picker or a `--help` listing. */
20
+ export const listSeasons = () => REGISTRY.map(({ plugin, season, label }) => ({ plugin, season, label }));
21
+ /** The registration a field file selects, by `rules.plugin` first and by `season` second. */
22
+ function find(field) {
23
+ const plugin = field.rules?.plugin;
24
+ if (typeof plugin === "string" && plugin !== "") {
25
+ return REGISTRY.find((entry) => entry.plugin === plugin) ?? null;
26
+ }
27
+ return REGISTRY.find((entry) => entry.season === field.season) ?? null;
28
+ }
29
+ /** The rules for a field file, with everything the caller needs to explain a miss. */
30
+ export function resolveSeason(field) {
31
+ const plugin = field.rules?.plugin ?? null;
32
+ const found = find(field);
33
+ if (found !== null) {
34
+ return { rules: found.load(field), known: true, plugin: found.plugin, warnings: [] };
35
+ }
36
+ const named = plugin === null
37
+ ? `The field file "${field.name}" names no season plugin`
38
+ : `The field file "${field.name}" names the season plugin "${plugin}", which this build does not carry`;
39
+ return {
40
+ rules: noSeasonRules,
41
+ known: false,
42
+ plugin,
43
+ warnings: [
44
+ `${named}, so the season checks and the ledger are inert. Known plugins: ${REGISTRY.map((entry) => entry.plugin).join(", ")}.`,
45
+ ],
46
+ };
47
+ }
48
+ /** The rules for a field file. The common case, when the caller has nothing to say about a miss. */
49
+ export const seasonFor = (field) => resolveSeason(field).rules;
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,aAAa,EAAoB,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAgC7G,MAAM,QAAQ,GAA4B;IACxC;QACE,MAAM,EAAE,gBAAgB;QACxB,MAAM,EAAE,eAAe;QACvB,KAAK,EAAE,wCAAwC;QAC/C,IAAI,EAAE,WAAW;KAClB;CACF,CAAC;AAEF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,WAAW,GAAG,GAAiB,EAAE,CAC5C,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AAE3E,6FAA6F;AAC7F,SAAS,IAAI,CAAC,KAAY;IACxB,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC;IACnC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,EAAE,EAAE,CAAC;QAChD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CA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4
+ "description": "The Zenith season registry: turns a field file into the season rules the checks run against.",
5
+ "keywords": [
6
+ "ftc",
7
+ "first-tech-challenge",
8
+ "robotics",
9
+ "autonomous",
10
+ "zenith",
11
+ "season"
12
+ ],
13
+ "homepage": "https://libraries.horizon36596.org/zenith/",
14
+ "bugs": {
15
+ "url": "https://github.com/Horizon-36596/zenith/issues"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/Horizon-36596/zenith.git",
20
+ "directory": "packages/seasons"
21
+ },
22
+ "license": "MIT",
23
+ "author": "Horizon (FTC 36596)",
24
+ "type": "module",
25
+ "main": "./dist/index.js",
26
+ "types": "./dist/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "default": "./dist/index.js"
31
+ }
32
+ },
33
+ "files": [
34
+ "dist",
35
+ "!dist/**/*.test.*",
36
+ "!dist/**/*.qa.test.*",
37
+ "!dist/**/testSupport.*",
38
+ "!dist/**/*.tsbuildinfo",
39
+ "!dist/testing",
40
+ "!dist/**/testing.*",
41
+ "README.md",
42
+ "LICENSE",
43
+ "NOTICE"
44
+ ],
45
+ "engines": {
46
+ "node": ">=22"
47
+ },
48
+ "publishConfig": {
49
+ "access": "public",
50
+ "provenance": true
51
+ },
52
+ "dependencies": {
53
+ "@horizon36596/zenith-schema": "0.1.1",
54
+ "@horizon36596/zenith-season-biobuzz": "0.1.1",
55
+ "@horizon36596/zenith-core": "0.1.1"
56
+ },
57
+ "scripts": {}
58
+ }