@camstack/types 1.2.607 → 1.2.609
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/CHANGELOG.md +17 -0
- package/dist/addon.d.ts +1 -1
- package/dist/addon.js +3 -1
- package/dist/addon.mjs +2 -2
- package/dist/capabilities/migrations.cap.d.ts +15 -1
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +12 -0
- package/dist/capabilities/recording-archive.cap.d.ts +12 -0
- package/dist/generated/addon-cap-facts.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +138 -2
- package/dist/index.mjs +132 -3
- package/dist/interfaces/recording-config.d.ts +19 -0
- package/dist/migrations/api/migration-api.v1.schema.d.ts +15 -1
- package/dist/migrations/migration-record-edits.d.ts +57 -0
- package/dist/migrations/migration.d.ts +45 -3
- package/dist/pipeline/auto-tune/plan-schemas.d.ts +28 -0
- package/dist/records/records-access.d.ts +8 -0
- package/dist/{runtime-capabilities-DCRxheYq.js → runtime-capabilities-1FIC5jNX.js} +678 -4
- package/dist/{runtime-capabilities-C0PIVXwH.mjs → runtime-capabilities-CK6y0W5U.mjs} +667 -5
- package/package.json +1 -1
|
@@ -164,6 +164,17 @@ export declare const RecordingBandAudioSchema: z.ZodEnum<{
|
|
|
164
164
|
on: "on";
|
|
165
165
|
}>;
|
|
166
166
|
export type RecordingBandAudio = z.infer<typeof RecordingBandAudioSchema>;
|
|
167
|
+
/**
|
|
168
|
+
* A battery condition on a band: the band covers a charge level only when
|
|
169
|
+
* `min <= level < max` (half-open; a missing bound is unbounded). OPTIONAL —
|
|
170
|
+
* an absent key means "any charge", which is what every config written before
|
|
171
|
+
* it meant. A band WITH a condition is never met while the charge is unknown.
|
|
172
|
+
*/
|
|
173
|
+
export declare const RecordingBandBatterySchema: z.ZodObject<{
|
|
174
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
export type RecordingBandBattery = z.infer<typeof RecordingBandBatterySchema>;
|
|
167
178
|
export declare const RecordingBandSchema: z.ZodObject<{
|
|
168
179
|
days: z.ZodArray<z.ZodNumber>;
|
|
169
180
|
start: z.ZodString;
|
|
@@ -176,6 +187,10 @@ export declare const RecordingBandSchema: z.ZodObject<{
|
|
|
176
187
|
muted: "muted";
|
|
177
188
|
on: "on";
|
|
178
189
|
}>>;
|
|
190
|
+
battery: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
}, z.core.$strip>>;
|
|
179
194
|
triggers: z.ZodOptional<z.ZodObject<{
|
|
180
195
|
motion: z.ZodOptional<z.ZodBoolean>;
|
|
181
196
|
audioThresholdDbfs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -312,6 +327,10 @@ export declare const RecordingConfigSchema: z.ZodObject<{
|
|
|
312
327
|
muted: "muted";
|
|
313
328
|
on: "on";
|
|
314
329
|
}>>;
|
|
330
|
+
battery: z.ZodOptional<z.ZodObject<{
|
|
331
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
}, z.core.$strip>>;
|
|
315
334
|
triggers: z.ZodOptional<z.ZodObject<{
|
|
316
335
|
motion: z.ZodOptional<z.ZodBoolean>;
|
|
317
336
|
audioThresholdDbfs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -144,15 +144,29 @@ export declare const MIGRATION_API_V1_METHODS: {
|
|
|
144
144
|
precondition: z.ZodOptional<z.ZodString>;
|
|
145
145
|
}, z.core.$strip>, z.ZodObject<{
|
|
146
146
|
op: z.ZodLiteral<"upsertRecord">;
|
|
147
|
+
owner: z.ZodString;
|
|
147
148
|
kind: z.ZodString;
|
|
148
149
|
recordKey: z.ZodString;
|
|
149
|
-
|
|
150
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
at: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
value: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
150
153
|
precondition: z.ZodOptional<z.ZodString>;
|
|
151
154
|
}, z.core.$strip>, z.ZodObject<{
|
|
152
155
|
op: z.ZodLiteral<"deleteRecord">;
|
|
156
|
+
owner: z.ZodString;
|
|
153
157
|
kind: z.ZodString;
|
|
154
158
|
recordKey: z.ZodString;
|
|
155
159
|
precondition: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
161
|
+
op: z.ZodLiteral<"rekeyDevice">;
|
|
162
|
+
deviceId: z.ZodNumber;
|
|
163
|
+
addonId: z.ZodString;
|
|
164
|
+
stableId: z.ZodString;
|
|
165
|
+
precondition: z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
167
|
+
op: z.ZodLiteral<"tombstoneDevice">;
|
|
168
|
+
deviceId: z.ZodNumber;
|
|
169
|
+
precondition: z.ZodOptional<z.ZodString>;
|
|
156
170
|
}, z.core.$strip>], "op">>;
|
|
157
171
|
}, z.core.$strip>;
|
|
158
172
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builders for the record and device edits of a `plan` migration (D987 M3, planning#584).
|
|
3
|
+
*
|
|
4
|
+
* A record edit is checked by the kind's own Zod schema HERE (`parseRecordBody`, the
|
|
5
|
+
* check `ctx.records` runs before every write) and by the records engine's rules when the
|
|
6
|
+
* file applies it inside the migration's transaction — the same two layers as a normal
|
|
7
|
+
* write, and no third. A kind with secret fields is refused: its values live in the
|
|
8
|
+
* keychain, which cannot join a SQLite transaction.
|
|
9
|
+
*/
|
|
10
|
+
import type { z } from 'zod';
|
|
11
|
+
import type { DefinedRecordKind } from '../records/record-kind.js';
|
|
12
|
+
import { type MigrationEdit } from './migration.js';
|
|
13
|
+
export type UpsertRecordEdit = Extract<MigrationEdit, {
|
|
14
|
+
readonly op: 'upsertRecord';
|
|
15
|
+
}>;
|
|
16
|
+
export type DeleteRecordEdit = Extract<MigrationEdit, {
|
|
17
|
+
readonly op: 'deleteRecord';
|
|
18
|
+
}>;
|
|
19
|
+
export type RekeyDeviceEdit = Extract<MigrationEdit, {
|
|
20
|
+
readonly op: 'rekeyDevice';
|
|
21
|
+
}>;
|
|
22
|
+
export type TombstoneDeviceEdit = Extract<MigrationEdit, {
|
|
23
|
+
readonly op: 'tombstoneDevice';
|
|
24
|
+
}>;
|
|
25
|
+
/** What a plan read of a device's identity; the precondition of a re-key or a tombstone. */
|
|
26
|
+
export interface MigrationDeviceIdentity {
|
|
27
|
+
readonly addonId: string;
|
|
28
|
+
readonly stableId: string;
|
|
29
|
+
}
|
|
30
|
+
export interface RecordUpsertEditInput<S extends z.ZodType> {
|
|
31
|
+
/** The addon that owns the kind (an addon plan may name only itself). */
|
|
32
|
+
readonly owner: string;
|
|
33
|
+
readonly kind: DefinedRecordKind<S>;
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly deviceId?: number;
|
|
36
|
+
readonly at?: number;
|
|
37
|
+
readonly data: z.input<S>;
|
|
38
|
+
/** The stored body the plan read (`null`: it read no row). Omit only for a key the plan knows is new. */
|
|
39
|
+
readonly read?: Readonly<Record<string, unknown>> | null;
|
|
40
|
+
}
|
|
41
|
+
export interface RecordDeleteEditInput {
|
|
42
|
+
readonly owner: string;
|
|
43
|
+
readonly kind: Pick<DefinedRecordKind, 'name' | 'declaration'>;
|
|
44
|
+
readonly id: string;
|
|
45
|
+
/** The stored body the plan read. */
|
|
46
|
+
readonly read: Readonly<Record<string, unknown>> | null;
|
|
47
|
+
}
|
|
48
|
+
/** An `upsertRecord` edit whose body the kind's schema accepted. */
|
|
49
|
+
export declare function recordUpsertEdit<S extends z.ZodType>(input: RecordUpsertEditInput<S>): UpsertRecordEdit;
|
|
50
|
+
/** A `deleteRecord` edit. */
|
|
51
|
+
export declare function recordDeleteEdit(input: RecordDeleteEditInput): DeleteRecordEdit;
|
|
52
|
+
/** The precondition of a device edit: the identity the plan read. */
|
|
53
|
+
export declare function deviceIdentityPrecondition(identity: MigrationDeviceIdentity): string;
|
|
54
|
+
/** A `rekeyDevice` edit: same `deviceId`, new `(addonId, stableId)`. */
|
|
55
|
+
export declare function rekeyDeviceEdit(deviceId: number, read: MigrationDeviceIdentity, next: MigrationDeviceIdentity): RekeyDeviceEdit;
|
|
56
|
+
/** A `tombstoneDevice` edit (D865). */
|
|
57
|
+
export declare function tombstoneDeviceEdit(deviceId: number, read: MigrationDeviceIdentity): TombstoneDeviceEdit;
|
|
@@ -167,15 +167,29 @@ export declare const MigrationEditSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
167
167
|
precondition: z.ZodOptional<z.ZodString>;
|
|
168
168
|
}, z.core.$strip>, z.ZodObject<{
|
|
169
169
|
op: z.ZodLiteral<"upsertRecord">;
|
|
170
|
+
owner: z.ZodString;
|
|
170
171
|
kind: z.ZodString;
|
|
171
172
|
recordKey: z.ZodString;
|
|
172
|
-
|
|
173
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
at: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
value: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
173
176
|
precondition: z.ZodOptional<z.ZodString>;
|
|
174
177
|
}, z.core.$strip>, z.ZodObject<{
|
|
175
178
|
op: z.ZodLiteral<"deleteRecord">;
|
|
179
|
+
owner: z.ZodString;
|
|
176
180
|
kind: z.ZodString;
|
|
177
181
|
recordKey: z.ZodString;
|
|
178
182
|
precondition: z.ZodOptional<z.ZodString>;
|
|
183
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
184
|
+
op: z.ZodLiteral<"rekeyDevice">;
|
|
185
|
+
deviceId: z.ZodNumber;
|
|
186
|
+
addonId: z.ZodString;
|
|
187
|
+
stableId: z.ZodString;
|
|
188
|
+
precondition: z.ZodOptional<z.ZodString>;
|
|
189
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
190
|
+
op: z.ZodLiteral<"tombstoneDevice">;
|
|
191
|
+
deviceId: z.ZodNumber;
|
|
192
|
+
precondition: z.ZodOptional<z.ZodString>;
|
|
179
193
|
}, z.core.$strip>], "op">;
|
|
180
194
|
export type MigrationEdit = z.infer<typeof MigrationEditSchema>;
|
|
181
195
|
export declare const MigrationPlanSchema: z.ZodObject<{
|
|
@@ -202,15 +216,29 @@ export declare const MigrationPlanSchema: z.ZodObject<{
|
|
|
202
216
|
precondition: z.ZodOptional<z.ZodString>;
|
|
203
217
|
}, z.core.$strip>, z.ZodObject<{
|
|
204
218
|
op: z.ZodLiteral<"upsertRecord">;
|
|
219
|
+
owner: z.ZodString;
|
|
205
220
|
kind: z.ZodString;
|
|
206
221
|
recordKey: z.ZodString;
|
|
207
|
-
|
|
222
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
at: z.ZodOptional<z.ZodNumber>;
|
|
224
|
+
value: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
208
225
|
precondition: z.ZodOptional<z.ZodString>;
|
|
209
226
|
}, z.core.$strip>, z.ZodObject<{
|
|
210
227
|
op: z.ZodLiteral<"deleteRecord">;
|
|
228
|
+
owner: z.ZodString;
|
|
211
229
|
kind: z.ZodString;
|
|
212
230
|
recordKey: z.ZodString;
|
|
213
231
|
precondition: z.ZodOptional<z.ZodString>;
|
|
232
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
233
|
+
op: z.ZodLiteral<"rekeyDevice">;
|
|
234
|
+
deviceId: z.ZodNumber;
|
|
235
|
+
addonId: z.ZodString;
|
|
236
|
+
stableId: z.ZodString;
|
|
237
|
+
precondition: z.ZodOptional<z.ZodString>;
|
|
238
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
239
|
+
op: z.ZodLiteral<"tombstoneDevice">;
|
|
240
|
+
deviceId: z.ZodNumber;
|
|
241
|
+
precondition: z.ZodOptional<z.ZodString>;
|
|
214
242
|
}, z.core.$strip>], "op">>;
|
|
215
243
|
}, z.core.$strip>;
|
|
216
244
|
export type MigrationPlan = z.infer<typeof MigrationPlanSchema>;
|
|
@@ -258,15 +286,29 @@ export declare const MigrationOwnerResultSchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
258
286
|
precondition: z.ZodOptional<z.ZodString>;
|
|
259
287
|
}, z.core.$strip>, z.ZodObject<{
|
|
260
288
|
op: z.ZodLiteral<"upsertRecord">;
|
|
289
|
+
owner: z.ZodString;
|
|
261
290
|
kind: z.ZodString;
|
|
262
291
|
recordKey: z.ZodString;
|
|
263
|
-
|
|
292
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
at: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
value: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
264
295
|
precondition: z.ZodOptional<z.ZodString>;
|
|
265
296
|
}, z.core.$strip>, z.ZodObject<{
|
|
266
297
|
op: z.ZodLiteral<"deleteRecord">;
|
|
298
|
+
owner: z.ZodString;
|
|
267
299
|
kind: z.ZodString;
|
|
268
300
|
recordKey: z.ZodString;
|
|
269
301
|
precondition: z.ZodOptional<z.ZodString>;
|
|
302
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
303
|
+
op: z.ZodLiteral<"rekeyDevice">;
|
|
304
|
+
deviceId: z.ZodNumber;
|
|
305
|
+
addonId: z.ZodString;
|
|
306
|
+
stableId: z.ZodString;
|
|
307
|
+
precondition: z.ZodOptional<z.ZodString>;
|
|
308
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
309
|
+
op: z.ZodLiteral<"tombstoneDevice">;
|
|
310
|
+
deviceId: z.ZodNumber;
|
|
311
|
+
precondition: z.ZodOptional<z.ZodString>;
|
|
270
312
|
}, z.core.$strip>], "op">>;
|
|
271
313
|
}, z.core.$strip>;
|
|
272
314
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -18,6 +18,7 @@ export declare const HardwareClassIdSchema: z.ZodEnum<{
|
|
|
18
18
|
"apple-m-pro": "apple-m-pro";
|
|
19
19
|
"intel-core-ultra": "intel-core-ultra";
|
|
20
20
|
"intel-n-series": "intel-n-series";
|
|
21
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
21
22
|
unknown: "unknown";
|
|
22
23
|
}>;
|
|
23
24
|
export declare const AcceleratorKindSchema: z.ZodEnum<{
|
|
@@ -28,6 +29,7 @@ export declare const AcceleratorKindSchema: z.ZodEnum<{
|
|
|
28
29
|
coral: "coral";
|
|
29
30
|
"intel-igpu": "intel-igpu";
|
|
30
31
|
"intel-npu": "intel-npu";
|
|
32
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
31
33
|
"x86-cpu": "x86-cpu";
|
|
32
34
|
}>;
|
|
33
35
|
export declare const RecommendationReasonSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -68,6 +70,7 @@ export declare const RecommendationReasonSchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
68
70
|
"apple-m-pro": "apple-m-pro";
|
|
69
71
|
"intel-core-ultra": "intel-core-ultra";
|
|
70
72
|
"intel-n-series": "intel-n-series";
|
|
73
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
71
74
|
unknown: "unknown";
|
|
72
75
|
}>;
|
|
73
76
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -107,6 +110,7 @@ export declare const LatencySourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
107
110
|
"apple-m-pro": "apple-m-pro";
|
|
108
111
|
"intel-core-ultra": "intel-core-ultra";
|
|
109
112
|
"intel-n-series": "intel-n-series";
|
|
113
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
110
114
|
unknown: "unknown";
|
|
111
115
|
}>;
|
|
112
116
|
}, z.core.$strip>], "kind">;
|
|
@@ -130,6 +134,7 @@ export declare const DeviceModelChoiceSchema: z.ZodObject<{
|
|
|
130
134
|
"apple-m-pro": "apple-m-pro";
|
|
131
135
|
"intel-core-ultra": "intel-core-ultra";
|
|
132
136
|
"intel-n-series": "intel-n-series";
|
|
137
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
133
138
|
unknown: "unknown";
|
|
134
139
|
}>;
|
|
135
140
|
}, z.core.$strip>], "kind">>;
|
|
@@ -139,6 +144,7 @@ export declare const DeviceModelChoiceSchema: z.ZodObject<{
|
|
|
139
144
|
"apple-m-pro": "apple-m-pro";
|
|
140
145
|
"intel-core-ultra": "intel-core-ultra";
|
|
141
146
|
"intel-n-series": "intel-n-series";
|
|
147
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
142
148
|
unknown: "unknown";
|
|
143
149
|
}>>;
|
|
144
150
|
capacitySessions: z.ZodNumber;
|
|
@@ -154,6 +160,7 @@ export declare const DeviceRecommendationSchema: z.ZodObject<{
|
|
|
154
160
|
coral: "coral";
|
|
155
161
|
"intel-igpu": "intel-igpu";
|
|
156
162
|
"intel-npu": "intel-npu";
|
|
163
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
157
164
|
"x86-cpu": "x86-cpu";
|
|
158
165
|
}>>;
|
|
159
166
|
enabled: z.ZodBoolean;
|
|
@@ -177,6 +184,7 @@ export declare const DeviceRecommendationSchema: z.ZodObject<{
|
|
|
177
184
|
"apple-m-pro": "apple-m-pro";
|
|
178
185
|
"intel-core-ultra": "intel-core-ultra";
|
|
179
186
|
"intel-n-series": "intel-n-series";
|
|
187
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
180
188
|
unknown: "unknown";
|
|
181
189
|
}>;
|
|
182
190
|
}, z.core.$strip>], "kind">>;
|
|
@@ -186,6 +194,7 @@ export declare const DeviceRecommendationSchema: z.ZodObject<{
|
|
|
186
194
|
"apple-m-pro": "apple-m-pro";
|
|
187
195
|
"intel-core-ultra": "intel-core-ultra";
|
|
188
196
|
"intel-n-series": "intel-n-series";
|
|
197
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
189
198
|
unknown: "unknown";
|
|
190
199
|
}>>;
|
|
191
200
|
capacitySessions: z.ZodNumber;
|
|
@@ -232,6 +241,7 @@ export declare const DeviceRecommendationSchema: z.ZodObject<{
|
|
|
232
241
|
"apple-m-pro": "apple-m-pro";
|
|
233
242
|
"intel-core-ultra": "intel-core-ultra";
|
|
234
243
|
"intel-n-series": "intel-n-series";
|
|
244
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
235
245
|
unknown: "unknown";
|
|
236
246
|
}>;
|
|
237
247
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -259,6 +269,7 @@ export declare const NodeRecommendationSchema: z.ZodObject<{
|
|
|
259
269
|
"apple-m-pro": "apple-m-pro";
|
|
260
270
|
"intel-core-ultra": "intel-core-ultra";
|
|
261
271
|
"intel-n-series": "intel-n-series";
|
|
272
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
262
273
|
unknown: "unknown";
|
|
263
274
|
}>>;
|
|
264
275
|
cpuModel: z.ZodNullable<z.ZodString>;
|
|
@@ -274,6 +285,7 @@ export declare const NodeRecommendationSchema: z.ZodObject<{
|
|
|
274
285
|
coral: "coral";
|
|
275
286
|
"intel-igpu": "intel-igpu";
|
|
276
287
|
"intel-npu": "intel-npu";
|
|
288
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
277
289
|
"x86-cpu": "x86-cpu";
|
|
278
290
|
}>>;
|
|
279
291
|
enabled: z.ZodBoolean;
|
|
@@ -297,6 +309,7 @@ export declare const NodeRecommendationSchema: z.ZodObject<{
|
|
|
297
309
|
"apple-m-pro": "apple-m-pro";
|
|
298
310
|
"intel-core-ultra": "intel-core-ultra";
|
|
299
311
|
"intel-n-series": "intel-n-series";
|
|
312
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
300
313
|
unknown: "unknown";
|
|
301
314
|
}>;
|
|
302
315
|
}, z.core.$strip>], "kind">>;
|
|
@@ -306,6 +319,7 @@ export declare const NodeRecommendationSchema: z.ZodObject<{
|
|
|
306
319
|
"apple-m-pro": "apple-m-pro";
|
|
307
320
|
"intel-core-ultra": "intel-core-ultra";
|
|
308
321
|
"intel-n-series": "intel-n-series";
|
|
322
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
309
323
|
unknown: "unknown";
|
|
310
324
|
}>>;
|
|
311
325
|
capacitySessions: z.ZodNumber;
|
|
@@ -352,6 +366,7 @@ export declare const NodeRecommendationSchema: z.ZodObject<{
|
|
|
352
366
|
"apple-m-pro": "apple-m-pro";
|
|
353
367
|
"intel-core-ultra": "intel-core-ultra";
|
|
354
368
|
"intel-n-series": "intel-n-series";
|
|
369
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
355
370
|
unknown: "unknown";
|
|
356
371
|
}>;
|
|
357
372
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -408,6 +423,7 @@ export declare const NodeRecommendationSchema: z.ZodObject<{
|
|
|
408
423
|
"apple-m-pro": "apple-m-pro";
|
|
409
424
|
"intel-core-ultra": "intel-core-ultra";
|
|
410
425
|
"intel-n-series": "intel-n-series";
|
|
426
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
411
427
|
unknown: "unknown";
|
|
412
428
|
}>;
|
|
413
429
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -479,6 +495,7 @@ export declare const AutoTunePlanSchema: z.ZodObject<{
|
|
|
479
495
|
"apple-m-pro": "apple-m-pro";
|
|
480
496
|
"intel-core-ultra": "intel-core-ultra";
|
|
481
497
|
"intel-n-series": "intel-n-series";
|
|
498
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
482
499
|
unknown: "unknown";
|
|
483
500
|
}>>;
|
|
484
501
|
cpuModel: z.ZodNullable<z.ZodString>;
|
|
@@ -494,6 +511,7 @@ export declare const AutoTunePlanSchema: z.ZodObject<{
|
|
|
494
511
|
coral: "coral";
|
|
495
512
|
"intel-igpu": "intel-igpu";
|
|
496
513
|
"intel-npu": "intel-npu";
|
|
514
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
497
515
|
"x86-cpu": "x86-cpu";
|
|
498
516
|
}>>;
|
|
499
517
|
enabled: z.ZodBoolean;
|
|
@@ -517,6 +535,7 @@ export declare const AutoTunePlanSchema: z.ZodObject<{
|
|
|
517
535
|
"apple-m-pro": "apple-m-pro";
|
|
518
536
|
"intel-core-ultra": "intel-core-ultra";
|
|
519
537
|
"intel-n-series": "intel-n-series";
|
|
538
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
520
539
|
unknown: "unknown";
|
|
521
540
|
}>;
|
|
522
541
|
}, z.core.$strip>], "kind">>;
|
|
@@ -526,6 +545,7 @@ export declare const AutoTunePlanSchema: z.ZodObject<{
|
|
|
526
545
|
"apple-m-pro": "apple-m-pro";
|
|
527
546
|
"intel-core-ultra": "intel-core-ultra";
|
|
528
547
|
"intel-n-series": "intel-n-series";
|
|
548
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
529
549
|
unknown: "unknown";
|
|
530
550
|
}>>;
|
|
531
551
|
capacitySessions: z.ZodNumber;
|
|
@@ -572,6 +592,7 @@ export declare const AutoTunePlanSchema: z.ZodObject<{
|
|
|
572
592
|
"apple-m-pro": "apple-m-pro";
|
|
573
593
|
"intel-core-ultra": "intel-core-ultra";
|
|
574
594
|
"intel-n-series": "intel-n-series";
|
|
595
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
575
596
|
unknown: "unknown";
|
|
576
597
|
}>;
|
|
577
598
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -628,6 +649,7 @@ export declare const AutoTunePlanSchema: z.ZodObject<{
|
|
|
628
649
|
"apple-m-pro": "apple-m-pro";
|
|
629
650
|
"intel-core-ultra": "intel-core-ultra";
|
|
630
651
|
"intel-n-series": "intel-n-series";
|
|
652
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
631
653
|
unknown: "unknown";
|
|
632
654
|
}>;
|
|
633
655
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -725,6 +747,7 @@ export declare const AutoTuneApplyResultSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
725
747
|
"apple-m-pro": "apple-m-pro";
|
|
726
748
|
"intel-core-ultra": "intel-core-ultra";
|
|
727
749
|
"intel-n-series": "intel-n-series";
|
|
750
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
728
751
|
unknown: "unknown";
|
|
729
752
|
}>>;
|
|
730
753
|
cpuModel: z.ZodNullable<z.ZodString>;
|
|
@@ -740,6 +763,7 @@ export declare const AutoTuneApplyResultSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
740
763
|
coral: "coral";
|
|
741
764
|
"intel-igpu": "intel-igpu";
|
|
742
765
|
"intel-npu": "intel-npu";
|
|
766
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
743
767
|
"x86-cpu": "x86-cpu";
|
|
744
768
|
}>>;
|
|
745
769
|
enabled: z.ZodBoolean;
|
|
@@ -763,6 +787,7 @@ export declare const AutoTuneApplyResultSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
763
787
|
"apple-m-pro": "apple-m-pro";
|
|
764
788
|
"intel-core-ultra": "intel-core-ultra";
|
|
765
789
|
"intel-n-series": "intel-n-series";
|
|
790
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
766
791
|
unknown: "unknown";
|
|
767
792
|
}>;
|
|
768
793
|
}, z.core.$strip>], "kind">>;
|
|
@@ -772,6 +797,7 @@ export declare const AutoTuneApplyResultSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
772
797
|
"apple-m-pro": "apple-m-pro";
|
|
773
798
|
"intel-core-ultra": "intel-core-ultra";
|
|
774
799
|
"intel-n-series": "intel-n-series";
|
|
800
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
775
801
|
unknown: "unknown";
|
|
776
802
|
}>>;
|
|
777
803
|
capacitySessions: z.ZodNumber;
|
|
@@ -818,6 +844,7 @@ export declare const AutoTuneApplyResultSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
818
844
|
"apple-m-pro": "apple-m-pro";
|
|
819
845
|
"intel-core-ultra": "intel-core-ultra";
|
|
820
846
|
"intel-n-series": "intel-n-series";
|
|
847
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
821
848
|
unknown: "unknown";
|
|
822
849
|
}>;
|
|
823
850
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -874,6 +901,7 @@ export declare const AutoTuneApplyResultSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
874
901
|
"apple-m-pro": "apple-m-pro";
|
|
875
902
|
"intel-core-ultra": "intel-core-ultra";
|
|
876
903
|
"intel-n-series": "intel-n-series";
|
|
904
|
+
"nvidia-gpu": "nvidia-gpu";
|
|
877
905
|
unknown: "unknown";
|
|
878
906
|
}>;
|
|
879
907
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -179,5 +179,13 @@ export interface RecordsAccess {
|
|
|
179
179
|
readonly kinds?: readonly string[];
|
|
180
180
|
}): Promise<Readonly<Record<string, number>>>;
|
|
181
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* The ONE body check of a record kind: its Zod schema, and an object at the
|
|
184
|
+
* root. `ctx.records` runs it before every write; a migration edit builder
|
|
185
|
+
* (`recordUpsertEdit`) runs it too, so a plan carries a body the kind accepts.
|
|
186
|
+
* `shaped` is the body after secret leaves were turned into what the schema
|
|
187
|
+
* reads (the caller's job; a kind without secrets passes it as is).
|
|
188
|
+
*/
|
|
189
|
+
export declare function parseRecordBody(def: Pick<DefinedRecordKind, 'name' | 'schema'>, id: string, shaped: unknown): Record<string, unknown>;
|
|
182
190
|
/** Build the owner's records handle. */
|
|
183
191
|
export declare function createRecordsAccess(options: RecordsAccessOptions): RecordsAccess;
|