@typecad/cuttlefish 0.1.0-alpha.2 → 1.0.0-alpha.11
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/README.md +10 -10
- package/dist/api/board-types.d.ts +1 -1
- package/dist/api/config.d.ts +38 -2
- package/dist/api/index.d.ts +1 -1
- package/dist/api/schema/types.d.ts +15 -0
- package/dist/api/shared/async-runtime-static.d.ts +12 -1
- package/dist/api/shared/async-runtime-static.js +69 -24
- package/dist/api/shared/async-symbol-detector.d.ts +11 -0
- package/dist/api/shared/async-symbol-detector.js +140 -0
- package/dist/api/shared/async-types.d.ts +24 -0
- package/dist/api/shared/coop-scheduler.d.ts +60 -0
- package/dist/api/shared/coop-scheduler.js +149 -0
- package/dist/api/shared/display-adapter.d.ts +4 -3
- package/dist/api/shared/display-adapter.js +15 -118
- package/dist/api/shared/display-adapters/sdl.js +38 -31
- package/dist/api/shared/display-profile.d.ts +47 -25
- package/dist/api/shared/display-profile.js +31 -164
- package/dist/api/shared/framework-manifest-registry.d.ts +9 -0
- package/dist/api/shared/framework-manifest-registry.js +27 -0
- package/dist/api/shared/framework-manifest.d.ts +595 -0
- package/dist/api/shared/framework-manifest.js +193 -0
- package/dist/api/shared/glcdfont.d.ts +12 -0
- package/dist/api/shared/glcdfont.js +124 -0
- package/dist/api/shared/graphics-strategy.d.ts +37 -0
- package/dist/api/shared/hal-op-ir.d.ts +764 -1
- package/dist/api/shared/hal-op-ir.js +129 -1
- package/dist/api/shared/index.d.ts +22 -2
- package/dist/api/shared/index.js +26 -1
- package/dist/api/shared/ir-core.d.ts +4 -0
- package/dist/api/shared/ir-declarations.d.ts +6 -0
- package/dist/api/shared/native-display-op-resolver.d.ts +10 -0
- package/dist/api/shared/native-display-op-resolver.js +64 -0
- package/dist/api/shared/platform-strategy.d.ts +119 -2
- package/dist/api/shared/polyfill-helper-registry.js +18 -1
- package/dist/api/shared/promise-runtime.d.ts +1 -1
- package/dist/api/shared/promise-runtime.js +95 -13
- package/dist/api/shared/spdx-licenses.d.ts +139 -0
- package/dist/api/shared/spdx-licenses.js +385 -0
- package/dist/api/shared/toolchain-types.d.ts +17 -0
- package/dist/api/shared/types.d.ts +8 -0
- package/dist/api/shared/validate-framework-manifest.d.ts +28 -0
- package/dist/api/shared/validate-framework-manifest.js +494 -0
- package/dist/api/shared/worker-runtime-polyfill.d.ts +22 -0
- package/dist/api/shared/worker-runtime-polyfill.js +34 -0
- package/dist/api/shared/worker-runtime.d.ts +69 -0
- package/dist/api/shared/worker-runtime.js +163 -0
- package/dist/cli-utils.d.ts +1 -0
- package/dist/cli-utils.js +3 -1
- package/dist/cli.js +249 -32
- package/dist/config-loader.d.ts +7 -2
- package/dist/config-loader.js +23 -3
- package/dist/config-schema.d.ts +112 -70
- package/dist/config-schema.js +14 -0
- package/dist/contract/board-generator.d.ts +17 -0
- package/dist/contract/board-generator.js +57 -0
- package/dist/contract/contract-parser.d.ts +217 -0
- package/dist/contract/contract-parser.js +224 -0
- package/dist/contract/index.d.ts +22 -0
- package/dist/contract/index.js +68 -0
- package/dist/create/board-codegen.js +4 -4
- package/dist/create/board-generators.js +4 -5
- package/dist/create/board-spec.d.ts +72 -75
- package/dist/create/board-spec.js +0 -1
- package/dist/create/framework-catalog.d.ts +64 -0
- package/dist/create/framework-catalog.js +136 -0
- package/dist/create/index.d.ts +5 -1
- package/dist/create/index.js +3 -1
- package/dist/create/init-scaffold.d.ts +12 -3
- package/dist/create/init-scaffold.js +49 -14
- package/dist/create/init-templates.d.ts +4 -0
- package/dist/create/init-templates.js +271 -17
- package/dist/create/init-wizard.js +41 -27
- package/dist/create/install-deps.d.ts +32 -0
- package/dist/create/install-deps.js +46 -0
- package/dist/debug/preprocessor.js +178 -39
- package/dist/debug/types.d.ts +23 -0
- package/dist/diagnostics/mermaid-builder.d.ts +1 -1
- package/dist/diagnostics/mermaid-builder.js +34 -24
- package/dist/emit/compliance/arxml-writer.d.ts +11 -0
- package/dist/emit/compliance/arxml-writer.js +34 -0
- package/dist/emit/compliance/compliance-context.d.ts +57 -0
- package/dist/emit/compliance/compliance-context.js +113 -0
- package/dist/emit/compliance/deviation-ledger.d.ts +27 -0
- package/dist/emit/compliance/deviation-ledger.js +47 -0
- package/dist/emit/compliance/deviation-writer.d.ts +30 -0
- package/dist/emit/compliance/deviation-writer.js +37 -0
- package/dist/emit/compliance/index.d.ts +7 -0
- package/dist/emit/compliance/index.js +6 -0
- package/dist/emit/compliance/rule-engine.d.ts +13 -0
- package/dist/emit/compliance/rule-engine.js +101 -0
- package/dist/emit/compliance/rules.d.ts +16 -0
- package/dist/emit/compliance/rules.js +191 -0
- package/dist/emit/compliance/types.d.ts +59 -0
- package/dist/emit/compliance/types.js +8 -0
- package/dist/emit/cpp-emitter.js +4 -3
- package/dist/emit/emitters/class-emitter.js +6 -1
- package/dist/emit/emitters/emitter-context.d.ts +28 -1
- package/dist/emit/emitters/function-emitter-impl.js +153 -53
- package/dist/emit/emitters/line-appender.js +19 -0
- package/dist/emit/emitters/line-marker.d.ts +38 -0
- package/dist/emit/emitters/line-marker.js +39 -0
- package/dist/emit/emitters/output-finalizer.d.ts +6 -0
- package/dist/emit/emitters/output-finalizer.js +101 -12
- package/dist/emit/emitters/setup.d.ts +17 -0
- package/dist/emit/emitters/setup.js +372 -30
- package/dist/emit/emitters/top-level-prep.js +8 -0
- package/dist/emit/emitters/type-decl-emitter.js +28 -3
- package/dist/emit/emitters/ui-emitter.js +33 -9
- package/dist/emit/expression-renderer.d.ts +1 -1
- package/dist/emit/expression-renderer.js +91 -6
- package/dist/emit/route-hal-op.js +18 -5
- package/dist/emit/snprintf-helpers.js +15 -4
- package/dist/emit/statement-renderer.d.ts +10 -0
- package/dist/emit/statement-renderer.js +34 -5
- package/dist/emit/utils/async-state-machine.js +221 -125
- package/dist/emit/utils/hal-op-cpp-type.d.ts +6 -0
- package/dist/emit/utils/hal-op-cpp-type.js +40 -0
- package/dist/framework-package.js +2 -0
- package/dist/framework-registry.d.ts +17 -0
- package/dist/install/framework-catalog.d.ts +53 -0
- package/dist/install/framework-catalog.js +107 -0
- package/dist/install/handle-install.d.ts +35 -0
- package/dist/install/handle-install.js +177 -0
- package/dist/install/index.d.ts +4 -0
- package/dist/install/index.js +3 -0
- package/dist/ir/adc-range-validation.js +40 -26
- package/dist/ir/build-ir-state.d.ts +1 -0
- package/dist/ir/build-ir-state.js +14 -0
- package/dist/ir/build-ir.js +9 -5
- package/dist/ir/call-graph.js +16 -0
- package/dist/ir/expression-to-ir.js +207 -6
- package/dist/ir/feature-registry.js +7 -25
- package/dist/ir/function-builder.js +22 -0
- package/dist/ir/hal/hal-emitter.d.ts +5 -2
- package/dist/ir/hal/hal-emitter.js +50 -18
- package/dist/ir/hal/hal-parser.d.ts +6 -0
- package/dist/ir/hal/hal-parser.js +81 -0
- package/dist/ir/hal/hal-plugins.js +733 -1
- package/dist/ir/identifier-collector.js +35 -0
- package/dist/ir/interrupt-analysis.d.ts +5 -1
- package/dist/ir/interrupt-analysis.js +16 -19
- package/dist/ir/memory-budget-validation.js +1 -0
- package/dist/ir/network-validation.d.ts +4 -0
- package/dist/ir/network-validation.js +184 -0
- package/dist/ir/ownership-analysis.js +39 -1
- package/dist/ir/peripheral-ownership.js +5 -0
- package/dist/ir/peripheral-validation.d.ts +1 -1
- package/dist/ir/peripheral-validation.js +6 -3
- package/dist/ir/pin-alias-conflict.d.ts +1 -1
- package/dist/ir/pin-alias-conflict.js +2 -1
- package/dist/ir/pin-capability-validation.js +71 -32
- package/dist/ir/pin-mode-validation.d.ts +2 -2
- package/dist/ir/pin-mode-validation.js +54 -18
- package/dist/ir/pin-safety.d.ts +1 -1
- package/dist/ir/pin-safety.js +2 -1
- package/dist/ir/program-analysis.d.ts +81 -0
- package/dist/ir/program-analysis.js +429 -0
- package/dist/ir/pulldown-validation.d.ts +1 -1
- package/dist/ir/pulldown-validation.js +2 -1
- package/dist/ir/pwm-timer-sharing.d.ts +1 -1
- package/dist/ir/pwm-timer-sharing.js +2 -1
- package/dist/ir/render-expr.js +11 -0
- package/dist/ir/resource-analysis.js +2 -0
- package/dist/ir/timer0-pwm-timing-conflict.d.ts +1 -1
- package/dist/ir/timer0-pwm-timing-conflict.js +2 -1
- package/dist/ir/timing-validation.d.ts +6 -1
- package/dist/ir/timing-validation.js +61 -13
- package/dist/ir/transformers/call-statement.js +105 -0
- package/dist/ir/transformers/expressions.js +62 -0
- package/dist/ir/transformers/hal-call-resolver.js +21 -0
- package/dist/ir/transformers/hal-emit-helpers.js +1 -1
- package/dist/ir/transformers/namespace-methods.js +17 -12
- package/dist/ir/transformers/ui-reactive.js +2 -2
- package/dist/ir/transformers/variables.js +137 -19
- package/dist/ir/try-catch-validation.js +2 -0
- package/dist/ir/type-resolution.js +20 -2
- package/dist/ir/ui-element-auto-wire.js +7 -5
- package/dist/ir/unit-suspicion-validation.js +9 -7
- package/dist/ir/utils/map-statements.d.ts +4 -0
- package/dist/ir/utils/map-statements.js +79 -0
- package/dist/ir/validation-orchestrator.js +15 -8
- package/dist/ir/worker-analysis.d.ts +10 -0
- package/dist/ir/worker-analysis.js +261 -0
- package/dist/libdef/c-to-decl.d.ts +27 -0
- package/dist/libdef/c-to-decl.js +397 -0
- package/dist/libdef/component-decls.d.ts +2 -0
- package/dist/libdef/component-decls.js +6 -0
- package/dist/libdef/component-discovery.d.ts +43 -0
- package/dist/libdef/component-discovery.js +83 -0
- package/dist/libdef/cpp-to-decl.d.ts +9 -0
- package/dist/libdef/cpp-to-decl.js +72 -0
- package/dist/libdef/registry.js +5 -2
- package/dist/lint-cache.d.ts +59 -0
- package/dist/lint-cache.js +257 -0
- package/dist/orchestrator/graph-builder.js +14 -9
- package/dist/platform/coop-scheduler-runtime.d.ts +19 -0
- package/dist/platform/coop-scheduler-runtime.js +41 -0
- package/dist/platform/generic-strategy.d.ts +15 -3
- package/dist/platform/generic-strategy.js +49 -4
- package/dist/safety/safety-bridge.d.ts +11 -0
- package/dist/safety/safety-bridge.js +48 -0
- package/dist/safety/sidecar-bridge.d.ts +5 -0
- package/dist/safety/sidecar-bridge.js +22 -0
- package/dist/safety-hook.d.ts +79 -0
- package/dist/safety-hook.js +35 -0
- package/dist/testing.d.ts +8 -2
- package/dist/testing.js +9 -2
- package/dist/transpile.d.ts +3 -0
- package/dist/transpile.js +191 -49
- package/dist/types.d.ts +22 -3
- package/dist/ui-hook.d.ts +17 -3
- package/dist/utils/cli.js +123 -2
- package/dist/utils/fs.d.ts +13 -0
- package/dist/utils/fs.js +50 -0
- package/dist/utils/ui.js +3 -1
- package/package.json +23 -3
- package/dist/api/shared/display-adapters/eink-mono.d.ts +0 -2
- package/dist/api/shared/display-adapters/eink-mono.js +0 -53
- package/dist/api/shared/display-adapters/ssd1309.d.ts +0 -2
- package/dist/api/shared/display-adapters/ssd1309.js +0 -136
- package/dist/api/shared/display-adapters/st7796.d.ts +0 -2
- package/dist/api/shared/display-adapters/st7796.js +0 -132
- package/dist/ir/heap-array-validation.d.ts +0 -24
- package/dist/ir/heap-array-validation.js +0 -29
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const HAL_CATEGORIES: readonly ["gpio", "pwm", "adc", "dac", "interrupts", "tone", "timing", "power", "i2c", "spi", "uart", "pulse", "shift", "board", "wdt", "wifi", "http", "mqtt", "display"];
|
|
3
|
+
export type HalCategory = typeof HAL_CATEGORIES[number];
|
|
4
|
+
export declare const FrameworkManifestSchema: z.ZodObject<{
|
|
5
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
6
|
+
frameworkId: z.ZodString;
|
|
7
|
+
packageName: z.ZodString;
|
|
8
|
+
canonical: z.ZodDefault<z.ZodBoolean>;
|
|
9
|
+
displayName: z.ZodString;
|
|
10
|
+
description: z.ZodString;
|
|
11
|
+
basedOn: z.ZodOptional<z.ZodString>;
|
|
12
|
+
implementationMode: z.ZodEnum<["from-scratch", "extends-canonical", "extends-other"]>;
|
|
13
|
+
inheritsStrategyId: z.ZodOptional<z.ZodString>;
|
|
14
|
+
entrypoint: z.ZodObject<{
|
|
15
|
+
entrypointFunctionName: z.ZodString;
|
|
16
|
+
requiresLoopFunction: z.ZodBoolean;
|
|
17
|
+
sourceExtension: z.ZodEnum<["ino", "cc", "cpp", "h"]>;
|
|
18
|
+
overrideBaseName: z.ZodOptional<z.ZodString>;
|
|
19
|
+
outputSubdirectory: z.ZodOptional<z.ZodString>;
|
|
20
|
+
generateHeaderFile: z.ZodBoolean;
|
|
21
|
+
customBridgeShim: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
entrypointFunctionName: string;
|
|
24
|
+
requiresLoopFunction: boolean;
|
|
25
|
+
sourceExtension: "ino" | "cc" | "cpp" | "h";
|
|
26
|
+
generateHeaderFile: boolean;
|
|
27
|
+
overrideBaseName?: string | undefined;
|
|
28
|
+
outputSubdirectory?: string | undefined;
|
|
29
|
+
customBridgeShim?: string | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
entrypointFunctionName: string;
|
|
32
|
+
requiresLoopFunction: boolean;
|
|
33
|
+
sourceExtension: "ino" | "cc" | "cpp" | "h";
|
|
34
|
+
generateHeaderFile: boolean;
|
|
35
|
+
overrideBaseName?: string | undefined;
|
|
36
|
+
outputSubdirectory?: string | undefined;
|
|
37
|
+
customBridgeShim?: string | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
profile: z.ZodObject<{
|
|
40
|
+
targets: z.ZodArray<z.ZodString, "many">;
|
|
41
|
+
forcedIncludes: z.ZodArray<z.ZodString, "many">;
|
|
42
|
+
symbolAliases: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
targets: string[];
|
|
45
|
+
forcedIncludes: string[];
|
|
46
|
+
symbolAliases: Record<string, string>;
|
|
47
|
+
}, {
|
|
48
|
+
targets: string[];
|
|
49
|
+
forcedIncludes: string[];
|
|
50
|
+
symbolAliases: Record<string, string>;
|
|
51
|
+
}>;
|
|
52
|
+
hal: z.ZodObject<{
|
|
53
|
+
[x: string]: z.ZodObject<{
|
|
54
|
+
supported: z.ZodBoolean;
|
|
55
|
+
unsupportedReason: z.ZodOptional<z.ZodString>;
|
|
56
|
+
ops: z.ZodRecord<z.ZodString, z.ZodEnum<["supported", "stub", "unsupported", "probe-inconclusive", "polyfill"]>>;
|
|
57
|
+
partialCoverage: z.ZodDefault<z.ZodBoolean>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
supported: boolean;
|
|
60
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
61
|
+
partialCoverage: boolean;
|
|
62
|
+
unsupportedReason?: string | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
supported: boolean;
|
|
65
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
66
|
+
unsupportedReason?: string | undefined;
|
|
67
|
+
partialCoverage?: boolean | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
} & {
|
|
70
|
+
raw: z.ZodDefault<z.ZodObject<{
|
|
71
|
+
supported: z.ZodBoolean;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
supported: boolean;
|
|
74
|
+
}, {
|
|
75
|
+
supported: boolean;
|
|
76
|
+
}>>;
|
|
77
|
+
}, "strip", z.ZodObject<{
|
|
78
|
+
supported: z.ZodBoolean;
|
|
79
|
+
unsupportedReason: z.ZodOptional<z.ZodString>;
|
|
80
|
+
ops: z.ZodRecord<z.ZodString, z.ZodEnum<["supported", "stub", "unsupported", "probe-inconclusive", "polyfill"]>>;
|
|
81
|
+
partialCoverage: z.ZodDefault<z.ZodBoolean>;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
supported: boolean;
|
|
84
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
85
|
+
partialCoverage: boolean;
|
|
86
|
+
unsupportedReason?: string | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
supported: boolean;
|
|
89
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
90
|
+
unsupportedReason?: string | undefined;
|
|
91
|
+
partialCoverage?: boolean | undefined;
|
|
92
|
+
}>, z.objectOutputType<{
|
|
93
|
+
[x: string]: z.ZodObject<{
|
|
94
|
+
supported: z.ZodBoolean;
|
|
95
|
+
unsupportedReason: z.ZodOptional<z.ZodString>;
|
|
96
|
+
ops: z.ZodRecord<z.ZodString, z.ZodEnum<["supported", "stub", "unsupported", "probe-inconclusive", "polyfill"]>>;
|
|
97
|
+
partialCoverage: z.ZodDefault<z.ZodBoolean>;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
supported: boolean;
|
|
100
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
101
|
+
partialCoverage: boolean;
|
|
102
|
+
unsupportedReason?: string | undefined;
|
|
103
|
+
}, {
|
|
104
|
+
supported: boolean;
|
|
105
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
106
|
+
unsupportedReason?: string | undefined;
|
|
107
|
+
partialCoverage?: boolean | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
} & {
|
|
110
|
+
raw: z.ZodDefault<z.ZodObject<{
|
|
111
|
+
supported: z.ZodBoolean;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
supported: boolean;
|
|
114
|
+
}, {
|
|
115
|
+
supported: boolean;
|
|
116
|
+
}>>;
|
|
117
|
+
}, z.ZodObject<{
|
|
118
|
+
supported: z.ZodBoolean;
|
|
119
|
+
unsupportedReason: z.ZodOptional<z.ZodString>;
|
|
120
|
+
ops: z.ZodRecord<z.ZodString, z.ZodEnum<["supported", "stub", "unsupported", "probe-inconclusive", "polyfill"]>>;
|
|
121
|
+
partialCoverage: z.ZodDefault<z.ZodBoolean>;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
supported: boolean;
|
|
124
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
125
|
+
partialCoverage: boolean;
|
|
126
|
+
unsupportedReason?: string | undefined;
|
|
127
|
+
}, {
|
|
128
|
+
supported: boolean;
|
|
129
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
130
|
+
unsupportedReason?: string | undefined;
|
|
131
|
+
partialCoverage?: boolean | undefined;
|
|
132
|
+
}>, "strip">, z.objectInputType<{
|
|
133
|
+
[x: string]: z.ZodObject<{
|
|
134
|
+
supported: z.ZodBoolean;
|
|
135
|
+
unsupportedReason: z.ZodOptional<z.ZodString>;
|
|
136
|
+
ops: z.ZodRecord<z.ZodString, z.ZodEnum<["supported", "stub", "unsupported", "probe-inconclusive", "polyfill"]>>;
|
|
137
|
+
partialCoverage: z.ZodDefault<z.ZodBoolean>;
|
|
138
|
+
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
supported: boolean;
|
|
140
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
141
|
+
partialCoverage: boolean;
|
|
142
|
+
unsupportedReason?: string | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
supported: boolean;
|
|
145
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
146
|
+
unsupportedReason?: string | undefined;
|
|
147
|
+
partialCoverage?: boolean | undefined;
|
|
148
|
+
}>;
|
|
149
|
+
} & {
|
|
150
|
+
raw: z.ZodDefault<z.ZodObject<{
|
|
151
|
+
supported: z.ZodBoolean;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
supported: boolean;
|
|
154
|
+
}, {
|
|
155
|
+
supported: boolean;
|
|
156
|
+
}>>;
|
|
157
|
+
}, z.ZodObject<{
|
|
158
|
+
supported: z.ZodBoolean;
|
|
159
|
+
unsupportedReason: z.ZodOptional<z.ZodString>;
|
|
160
|
+
ops: z.ZodRecord<z.ZodString, z.ZodEnum<["supported", "stub", "unsupported", "probe-inconclusive", "polyfill"]>>;
|
|
161
|
+
partialCoverage: z.ZodDefault<z.ZodBoolean>;
|
|
162
|
+
}, "strip", z.ZodTypeAny, {
|
|
163
|
+
supported: boolean;
|
|
164
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
165
|
+
partialCoverage: boolean;
|
|
166
|
+
unsupportedReason?: string | undefined;
|
|
167
|
+
}, {
|
|
168
|
+
supported: boolean;
|
|
169
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
170
|
+
unsupportedReason?: string | undefined;
|
|
171
|
+
partialCoverage?: boolean | undefined;
|
|
172
|
+
}>, "strip">>;
|
|
173
|
+
polyfills: z.ZodObject<{
|
|
174
|
+
emitted: z.ZodArray<z.ZodObject<{
|
|
175
|
+
id: z.ZodString;
|
|
176
|
+
domain: z.ZodString;
|
|
177
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
178
|
+
}, "strip", z.ZodTypeAny, {
|
|
179
|
+
id: string;
|
|
180
|
+
domain: string;
|
|
181
|
+
notes?: string | undefined;
|
|
182
|
+
}, {
|
|
183
|
+
id: string;
|
|
184
|
+
domain: string;
|
|
185
|
+
notes?: string | undefined;
|
|
186
|
+
}>, "many">;
|
|
187
|
+
suppressed: z.ZodArray<z.ZodObject<{
|
|
188
|
+
id: z.ZodString;
|
|
189
|
+
reason: z.ZodString;
|
|
190
|
+
}, "strip", z.ZodTypeAny, {
|
|
191
|
+
id: string;
|
|
192
|
+
reason: string;
|
|
193
|
+
}, {
|
|
194
|
+
id: string;
|
|
195
|
+
reason: string;
|
|
196
|
+
}>, "many">;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
emitted: {
|
|
199
|
+
id: string;
|
|
200
|
+
domain: string;
|
|
201
|
+
notes?: string | undefined;
|
|
202
|
+
}[];
|
|
203
|
+
suppressed: {
|
|
204
|
+
id: string;
|
|
205
|
+
reason: string;
|
|
206
|
+
}[];
|
|
207
|
+
}, {
|
|
208
|
+
emitted: {
|
|
209
|
+
id: string;
|
|
210
|
+
domain: string;
|
|
211
|
+
notes?: string | undefined;
|
|
212
|
+
}[];
|
|
213
|
+
suppressed: {
|
|
214
|
+
id: string;
|
|
215
|
+
reason: string;
|
|
216
|
+
}[];
|
|
217
|
+
}>;
|
|
218
|
+
toolchain: z.ZodObject<{
|
|
219
|
+
backend: z.ZodString;
|
|
220
|
+
operations: z.ZodObject<{
|
|
221
|
+
prepare: z.ZodBoolean;
|
|
222
|
+
compile: z.ZodBoolean;
|
|
223
|
+
upload: z.ZodBoolean;
|
|
224
|
+
monitor: z.ZodBoolean;
|
|
225
|
+
}, "strip", z.ZodTypeAny, {
|
|
226
|
+
prepare: boolean;
|
|
227
|
+
compile: boolean;
|
|
228
|
+
upload: boolean;
|
|
229
|
+
monitor: boolean;
|
|
230
|
+
}, {
|
|
231
|
+
prepare: boolean;
|
|
232
|
+
compile: boolean;
|
|
233
|
+
upload: boolean;
|
|
234
|
+
monitor: boolean;
|
|
235
|
+
}>;
|
|
236
|
+
reexportedFrom: z.ZodOptional<z.ZodString>;
|
|
237
|
+
}, "strip", z.ZodTypeAny, {
|
|
238
|
+
backend: string;
|
|
239
|
+
operations: {
|
|
240
|
+
prepare: boolean;
|
|
241
|
+
compile: boolean;
|
|
242
|
+
upload: boolean;
|
|
243
|
+
monitor: boolean;
|
|
244
|
+
};
|
|
245
|
+
reexportedFrom?: string | undefined;
|
|
246
|
+
}, {
|
|
247
|
+
backend: string;
|
|
248
|
+
operations: {
|
|
249
|
+
prepare: boolean;
|
|
250
|
+
compile: boolean;
|
|
251
|
+
upload: boolean;
|
|
252
|
+
monitor: boolean;
|
|
253
|
+
};
|
|
254
|
+
reexportedFrom?: string | undefined;
|
|
255
|
+
}>;
|
|
256
|
+
libraryResolution: z.ZodOptional<z.ZodObject<{
|
|
257
|
+
isFrameworkLibraryImport: z.ZodBoolean;
|
|
258
|
+
getFrameworkLibraryHeaderName: z.ZodBoolean;
|
|
259
|
+
buildClassNameMap: z.ZodBoolean;
|
|
260
|
+
tryGenerateLibDecl: z.ZodBoolean;
|
|
261
|
+
reexportedFrom: z.ZodOptional<z.ZodString>;
|
|
262
|
+
}, "strip", z.ZodTypeAny, {
|
|
263
|
+
isFrameworkLibraryImport: boolean;
|
|
264
|
+
getFrameworkLibraryHeaderName: boolean;
|
|
265
|
+
buildClassNameMap: boolean;
|
|
266
|
+
tryGenerateLibDecl: boolean;
|
|
267
|
+
reexportedFrom?: string | undefined;
|
|
268
|
+
}, {
|
|
269
|
+
isFrameworkLibraryImport: boolean;
|
|
270
|
+
getFrameworkLibraryHeaderName: boolean;
|
|
271
|
+
buildClassNameMap: boolean;
|
|
272
|
+
tryGenerateLibDecl: boolean;
|
|
273
|
+
reexportedFrom?: string | undefined;
|
|
274
|
+
}>>;
|
|
275
|
+
typeEmission: z.ZodObject<{
|
|
276
|
+
normalizeCppType: z.ZodBoolean;
|
|
277
|
+
mathHeader: z.ZodEnum<["none", "<math.h>", "<Arduino.h>"]>;
|
|
278
|
+
needsStdString: z.ZodBoolean;
|
|
279
|
+
needsStdVector: z.ZodBoolean;
|
|
280
|
+
needsIostream: z.ZodBoolean;
|
|
281
|
+
needsStdFunction: z.ZodBoolean;
|
|
282
|
+
stdlibSupport: z.ZodObject<{
|
|
283
|
+
hasVector: z.ZodBoolean;
|
|
284
|
+
hasString: z.ZodBoolean;
|
|
285
|
+
hasIostream: z.ZodBoolean;
|
|
286
|
+
hasExceptions: z.ZodBoolean;
|
|
287
|
+
hasRTTI: z.ZodBoolean;
|
|
288
|
+
recommendedArrayImpl: z.ZodEnum<["std_vector", "static_array"]>;
|
|
289
|
+
recommendedStringImpl: z.ZodEnum<["std_string", "static_string"]>;
|
|
290
|
+
}, "strip", z.ZodTypeAny, {
|
|
291
|
+
hasVector: boolean;
|
|
292
|
+
hasString: boolean;
|
|
293
|
+
hasIostream: boolean;
|
|
294
|
+
hasExceptions: boolean;
|
|
295
|
+
hasRTTI: boolean;
|
|
296
|
+
recommendedArrayImpl: "std_vector" | "static_array";
|
|
297
|
+
recommendedStringImpl: "std_string" | "static_string";
|
|
298
|
+
}, {
|
|
299
|
+
hasVector: boolean;
|
|
300
|
+
hasString: boolean;
|
|
301
|
+
hasIostream: boolean;
|
|
302
|
+
hasExceptions: boolean;
|
|
303
|
+
hasRTTI: boolean;
|
|
304
|
+
recommendedArrayImpl: "std_vector" | "static_array";
|
|
305
|
+
recommendedStringImpl: "std_string" | "static_string";
|
|
306
|
+
}>;
|
|
307
|
+
}, "strip", z.ZodTypeAny, {
|
|
308
|
+
normalizeCppType: boolean;
|
|
309
|
+
mathHeader: "none" | "<math.h>" | "<Arduino.h>";
|
|
310
|
+
needsStdString: boolean;
|
|
311
|
+
needsStdVector: boolean;
|
|
312
|
+
needsIostream: boolean;
|
|
313
|
+
needsStdFunction: boolean;
|
|
314
|
+
stdlibSupport: {
|
|
315
|
+
hasVector: boolean;
|
|
316
|
+
hasString: boolean;
|
|
317
|
+
hasIostream: boolean;
|
|
318
|
+
hasExceptions: boolean;
|
|
319
|
+
hasRTTI: boolean;
|
|
320
|
+
recommendedArrayImpl: "std_vector" | "static_array";
|
|
321
|
+
recommendedStringImpl: "std_string" | "static_string";
|
|
322
|
+
};
|
|
323
|
+
}, {
|
|
324
|
+
normalizeCppType: boolean;
|
|
325
|
+
mathHeader: "none" | "<math.h>" | "<Arduino.h>";
|
|
326
|
+
needsStdString: boolean;
|
|
327
|
+
needsStdVector: boolean;
|
|
328
|
+
needsIostream: boolean;
|
|
329
|
+
needsStdFunction: boolean;
|
|
330
|
+
stdlibSupport: {
|
|
331
|
+
hasVector: boolean;
|
|
332
|
+
hasString: boolean;
|
|
333
|
+
hasIostream: boolean;
|
|
334
|
+
hasExceptions: boolean;
|
|
335
|
+
hasRTTI: boolean;
|
|
336
|
+
recommendedArrayImpl: "std_vector" | "static_array";
|
|
337
|
+
recommendedStringImpl: "std_string" | "static_string";
|
|
338
|
+
};
|
|
339
|
+
}>;
|
|
340
|
+
ambientTypes: z.ZodArray<z.ZodString, "many">;
|
|
341
|
+
conformance: z.ZodObject<{
|
|
342
|
+
hardwareTestGroups: z.ZodArray<z.ZodString, "many">;
|
|
343
|
+
halResolutionTests: z.ZodArray<z.ZodString, "many">;
|
|
344
|
+
}, "strip", z.ZodTypeAny, {
|
|
345
|
+
hardwareTestGroups: string[];
|
|
346
|
+
halResolutionTests: string[];
|
|
347
|
+
}, {
|
|
348
|
+
hardwareTestGroups: string[];
|
|
349
|
+
halResolutionTests: string[];
|
|
350
|
+
}>;
|
|
351
|
+
doctor: z.ZodOptional<z.ZodObject<{
|
|
352
|
+
available: z.ZodBoolean;
|
|
353
|
+
}, "strip", z.ZodTypeAny, {
|
|
354
|
+
available: boolean;
|
|
355
|
+
}, {
|
|
356
|
+
available: boolean;
|
|
357
|
+
}>>;
|
|
358
|
+
licenses: z.ZodOptional<z.ZodObject<{
|
|
359
|
+
available: z.ZodBoolean;
|
|
360
|
+
}, "strip", z.ZodTypeAny, {
|
|
361
|
+
available: boolean;
|
|
362
|
+
}, {
|
|
363
|
+
available: boolean;
|
|
364
|
+
}>>;
|
|
365
|
+
compat: z.ZodOptional<z.ZodObject<{
|
|
366
|
+
/** Supported Zephyr RTOS version range (framework-zephyr). */
|
|
367
|
+
zephyr: z.ZodOptional<z.ZodString>;
|
|
368
|
+
}, "strip", z.ZodTypeAny, {
|
|
369
|
+
zephyr?: string | undefined;
|
|
370
|
+
}, {
|
|
371
|
+
zephyr?: string | undefined;
|
|
372
|
+
}>>;
|
|
373
|
+
}, "strip", z.ZodTypeAny, {
|
|
374
|
+
schemaVersion: 1;
|
|
375
|
+
frameworkId: string;
|
|
376
|
+
packageName: string;
|
|
377
|
+
canonical: boolean;
|
|
378
|
+
displayName: string;
|
|
379
|
+
description: string;
|
|
380
|
+
implementationMode: "from-scratch" | "extends-canonical" | "extends-other";
|
|
381
|
+
entrypoint: {
|
|
382
|
+
entrypointFunctionName: string;
|
|
383
|
+
requiresLoopFunction: boolean;
|
|
384
|
+
sourceExtension: "ino" | "cc" | "cpp" | "h";
|
|
385
|
+
generateHeaderFile: boolean;
|
|
386
|
+
overrideBaseName?: string | undefined;
|
|
387
|
+
outputSubdirectory?: string | undefined;
|
|
388
|
+
customBridgeShim?: string | undefined;
|
|
389
|
+
};
|
|
390
|
+
profile: {
|
|
391
|
+
targets: string[];
|
|
392
|
+
forcedIncludes: string[];
|
|
393
|
+
symbolAliases: Record<string, string>;
|
|
394
|
+
};
|
|
395
|
+
hal: {
|
|
396
|
+
[x: string]: {
|
|
397
|
+
supported: boolean;
|
|
398
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
399
|
+
partialCoverage: boolean;
|
|
400
|
+
unsupportedReason?: string | undefined;
|
|
401
|
+
};
|
|
402
|
+
raw?: unknown;
|
|
403
|
+
} & {
|
|
404
|
+
[k: string]: {
|
|
405
|
+
supported: boolean;
|
|
406
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
407
|
+
partialCoverage: boolean;
|
|
408
|
+
unsupportedReason?: string | undefined;
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
polyfills: {
|
|
412
|
+
emitted: {
|
|
413
|
+
id: string;
|
|
414
|
+
domain: string;
|
|
415
|
+
notes?: string | undefined;
|
|
416
|
+
}[];
|
|
417
|
+
suppressed: {
|
|
418
|
+
id: string;
|
|
419
|
+
reason: string;
|
|
420
|
+
}[];
|
|
421
|
+
};
|
|
422
|
+
toolchain: {
|
|
423
|
+
backend: string;
|
|
424
|
+
operations: {
|
|
425
|
+
prepare: boolean;
|
|
426
|
+
compile: boolean;
|
|
427
|
+
upload: boolean;
|
|
428
|
+
monitor: boolean;
|
|
429
|
+
};
|
|
430
|
+
reexportedFrom?: string | undefined;
|
|
431
|
+
};
|
|
432
|
+
typeEmission: {
|
|
433
|
+
normalizeCppType: boolean;
|
|
434
|
+
mathHeader: "none" | "<math.h>" | "<Arduino.h>";
|
|
435
|
+
needsStdString: boolean;
|
|
436
|
+
needsStdVector: boolean;
|
|
437
|
+
needsIostream: boolean;
|
|
438
|
+
needsStdFunction: boolean;
|
|
439
|
+
stdlibSupport: {
|
|
440
|
+
hasVector: boolean;
|
|
441
|
+
hasString: boolean;
|
|
442
|
+
hasIostream: boolean;
|
|
443
|
+
hasExceptions: boolean;
|
|
444
|
+
hasRTTI: boolean;
|
|
445
|
+
recommendedArrayImpl: "std_vector" | "static_array";
|
|
446
|
+
recommendedStringImpl: "std_string" | "static_string";
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
ambientTypes: string[];
|
|
450
|
+
conformance: {
|
|
451
|
+
hardwareTestGroups: string[];
|
|
452
|
+
halResolutionTests: string[];
|
|
453
|
+
};
|
|
454
|
+
basedOn?: string | undefined;
|
|
455
|
+
inheritsStrategyId?: string | undefined;
|
|
456
|
+
libraryResolution?: {
|
|
457
|
+
isFrameworkLibraryImport: boolean;
|
|
458
|
+
getFrameworkLibraryHeaderName: boolean;
|
|
459
|
+
buildClassNameMap: boolean;
|
|
460
|
+
tryGenerateLibDecl: boolean;
|
|
461
|
+
reexportedFrom?: string | undefined;
|
|
462
|
+
} | undefined;
|
|
463
|
+
doctor?: {
|
|
464
|
+
available: boolean;
|
|
465
|
+
} | undefined;
|
|
466
|
+
licenses?: {
|
|
467
|
+
available: boolean;
|
|
468
|
+
} | undefined;
|
|
469
|
+
compat?: {
|
|
470
|
+
zephyr?: string | undefined;
|
|
471
|
+
} | undefined;
|
|
472
|
+
}, {
|
|
473
|
+
schemaVersion: 1;
|
|
474
|
+
frameworkId: string;
|
|
475
|
+
packageName: string;
|
|
476
|
+
displayName: string;
|
|
477
|
+
description: string;
|
|
478
|
+
implementationMode: "from-scratch" | "extends-canonical" | "extends-other";
|
|
479
|
+
entrypoint: {
|
|
480
|
+
entrypointFunctionName: string;
|
|
481
|
+
requiresLoopFunction: boolean;
|
|
482
|
+
sourceExtension: "ino" | "cc" | "cpp" | "h";
|
|
483
|
+
generateHeaderFile: boolean;
|
|
484
|
+
overrideBaseName?: string | undefined;
|
|
485
|
+
outputSubdirectory?: string | undefined;
|
|
486
|
+
customBridgeShim?: string | undefined;
|
|
487
|
+
};
|
|
488
|
+
profile: {
|
|
489
|
+
targets: string[];
|
|
490
|
+
forcedIncludes: string[];
|
|
491
|
+
symbolAliases: Record<string, string>;
|
|
492
|
+
};
|
|
493
|
+
hal: {
|
|
494
|
+
[x: string]: {
|
|
495
|
+
supported: boolean;
|
|
496
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
497
|
+
unsupportedReason?: string | undefined;
|
|
498
|
+
partialCoverage?: boolean | undefined;
|
|
499
|
+
};
|
|
500
|
+
raw?: unknown;
|
|
501
|
+
} & {
|
|
502
|
+
[k: string]: {
|
|
503
|
+
supported: boolean;
|
|
504
|
+
ops: Record<string, "supported" | "stub" | "unsupported" | "probe-inconclusive" | "polyfill">;
|
|
505
|
+
unsupportedReason?: string | undefined;
|
|
506
|
+
partialCoverage?: boolean | undefined;
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
polyfills: {
|
|
510
|
+
emitted: {
|
|
511
|
+
id: string;
|
|
512
|
+
domain: string;
|
|
513
|
+
notes?: string | undefined;
|
|
514
|
+
}[];
|
|
515
|
+
suppressed: {
|
|
516
|
+
id: string;
|
|
517
|
+
reason: string;
|
|
518
|
+
}[];
|
|
519
|
+
};
|
|
520
|
+
toolchain: {
|
|
521
|
+
backend: string;
|
|
522
|
+
operations: {
|
|
523
|
+
prepare: boolean;
|
|
524
|
+
compile: boolean;
|
|
525
|
+
upload: boolean;
|
|
526
|
+
monitor: boolean;
|
|
527
|
+
};
|
|
528
|
+
reexportedFrom?: string | undefined;
|
|
529
|
+
};
|
|
530
|
+
typeEmission: {
|
|
531
|
+
normalizeCppType: boolean;
|
|
532
|
+
mathHeader: "none" | "<math.h>" | "<Arduino.h>";
|
|
533
|
+
needsStdString: boolean;
|
|
534
|
+
needsStdVector: boolean;
|
|
535
|
+
needsIostream: boolean;
|
|
536
|
+
needsStdFunction: boolean;
|
|
537
|
+
stdlibSupport: {
|
|
538
|
+
hasVector: boolean;
|
|
539
|
+
hasString: boolean;
|
|
540
|
+
hasIostream: boolean;
|
|
541
|
+
hasExceptions: boolean;
|
|
542
|
+
hasRTTI: boolean;
|
|
543
|
+
recommendedArrayImpl: "std_vector" | "static_array";
|
|
544
|
+
recommendedStringImpl: "std_string" | "static_string";
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
ambientTypes: string[];
|
|
548
|
+
conformance: {
|
|
549
|
+
hardwareTestGroups: string[];
|
|
550
|
+
halResolutionTests: string[];
|
|
551
|
+
};
|
|
552
|
+
canonical?: boolean | undefined;
|
|
553
|
+
basedOn?: string | undefined;
|
|
554
|
+
inheritsStrategyId?: string | undefined;
|
|
555
|
+
libraryResolution?: {
|
|
556
|
+
isFrameworkLibraryImport: boolean;
|
|
557
|
+
getFrameworkLibraryHeaderName: boolean;
|
|
558
|
+
buildClassNameMap: boolean;
|
|
559
|
+
tryGenerateLibDecl: boolean;
|
|
560
|
+
reexportedFrom?: string | undefined;
|
|
561
|
+
} | undefined;
|
|
562
|
+
doctor?: {
|
|
563
|
+
available: boolean;
|
|
564
|
+
} | undefined;
|
|
565
|
+
licenses?: {
|
|
566
|
+
available: boolean;
|
|
567
|
+
} | undefined;
|
|
568
|
+
compat?: {
|
|
569
|
+
zephyr?: string | undefined;
|
|
570
|
+
} | undefined;
|
|
571
|
+
}>;
|
|
572
|
+
export type FrameworkManifest = z.infer<typeof FrameworkManifestSchema>;
|
|
573
|
+
/**
|
|
574
|
+
* Authoritative map of HAL op kinds that are lowered via the polyfill system
|
|
575
|
+
* rather than via `resolveHALOperation`. Keyed by op kind; value is the
|
|
576
|
+
* polyfill id that backs it.
|
|
577
|
+
*
|
|
578
|
+
* The manifest validator uses this to verify `polyfill`-declared ops: if a
|
|
579
|
+
* manifest declares `timing.set_interval: 'polyfill'`, the framework's
|
|
580
|
+
* `polyfills.emitted` list must include the polyfill id named here.
|
|
581
|
+
*
|
|
582
|
+
* Keep in sync with the transpiler's lowering routes — when a new op kind
|
|
583
|
+
* starts being routed via a polyfill instead of the HAL resolver, add it
|
|
584
|
+
* here. The set is intentionally small and stable: polyfill-routed ops are
|
|
585
|
+
* the exception, not the rule.
|
|
586
|
+
*/
|
|
587
|
+
export declare const POLYFILL_BACKED_OPS: Readonly<Record<string, string>>;
|
|
588
|
+
/**
|
|
589
|
+
* Validates and returns a FrameworkManifest. Frameworks call this from their
|
|
590
|
+
* `framework.manifest.ts` to get both static type-checking (the parameter type
|
|
591
|
+
* is the inferred FrameworkManifest) and runtime validation (zod parse).
|
|
592
|
+
* Bad manifests throw at module-load time.
|
|
593
|
+
*/
|
|
594
|
+
export declare function defineFrameworkManifest(input: unknown): FrameworkManifest;
|
|
595
|
+
export { HAL_CATEGORIES };
|