@camstack/types 1.2.608 → 1.2.610
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/heat-pump-status.cap.d.ts +9 -0
- package/dist/capabilities/migrations.cap.d.ts +15 -1
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +12 -0
- package/dist/generated/addon-cap-facts.d.ts +6 -0
- package/dist/generated/customize-catalog.d.ts +54 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +210 -3
- package/dist/index.mjs +205 -4
- 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
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_runtime_capabilities = require("./runtime-capabilities-
|
|
2
|
+
const require_runtime_capabilities = require("./runtime-capabilities-1FIC5jNX.js");
|
|
3
3
|
const require_event_category = require("./event-category-CMA0-jGW.js");
|
|
4
4
|
const require_composed_stable_id = require("./composed-stable-id-DkF5-kuf.js");
|
|
5
5
|
const require_implemented_methods = require("./implemented-methods-BHN-Utsb.js");
|
|
@@ -4172,16 +4172,32 @@ var MigrationEditSchema = zod.z.discriminatedUnion("op", [
|
|
|
4172
4172
|
}),
|
|
4173
4173
|
zod.z.object({
|
|
4174
4174
|
op: zod.z.literal("upsertRecord"),
|
|
4175
|
+
owner: zod.z.string().min(1),
|
|
4175
4176
|
kind: zod.z.string().min(1),
|
|
4176
4177
|
recordKey: zod.z.string().min(1),
|
|
4177
|
-
|
|
4178
|
+
deviceId: zod.z.number().int().positive().optional(),
|
|
4179
|
+
at: zod.z.number().int().nonnegative().optional(),
|
|
4180
|
+
value: zod.z.record(zod.z.string(), zod.z.unknown()),
|
|
4178
4181
|
precondition: PreconditionSchema
|
|
4179
4182
|
}),
|
|
4180
4183
|
zod.z.object({
|
|
4181
4184
|
op: zod.z.literal("deleteRecord"),
|
|
4185
|
+
owner: zod.z.string().min(1),
|
|
4182
4186
|
kind: zod.z.string().min(1),
|
|
4183
4187
|
recordKey: zod.z.string().min(1),
|
|
4184
4188
|
precondition: PreconditionSchema
|
|
4189
|
+
}),
|
|
4190
|
+
zod.z.object({
|
|
4191
|
+
op: zod.z.literal("rekeyDevice"),
|
|
4192
|
+
deviceId: zod.z.number().int().positive(),
|
|
4193
|
+
addonId: zod.z.string().min(1),
|
|
4194
|
+
stableId: zod.z.string().min(1),
|
|
4195
|
+
precondition: PreconditionSchema
|
|
4196
|
+
}),
|
|
4197
|
+
zod.z.object({
|
|
4198
|
+
op: zod.z.literal("tombstoneDevice"),
|
|
4199
|
+
deviceId: zod.z.number().int().positive(),
|
|
4200
|
+
precondition: PreconditionSchema
|
|
4185
4201
|
})
|
|
4186
4202
|
]);
|
|
4187
4203
|
var MigrationPlanSchema = zod.z.object({ edits: zod.z.array(MigrationEditSchema) });
|
|
@@ -4295,6 +4311,62 @@ var MigrationOwnerStepSchema = zod.z.object({
|
|
|
4295
4311
|
state: zod.z.union([zod.z.literal("pending"), MigrationStatusSchema])
|
|
4296
4312
|
});
|
|
4297
4313
|
//#endregion
|
|
4314
|
+
//#region src/migrations/migration-record-edits.ts
|
|
4315
|
+
function refuseSecrets(kind) {
|
|
4316
|
+
if (kind.declaration.secretPaths.length > 0) throw new require_runtime_capabilities.InvalidRecordError(`${kind.name}: a kind with secret fields cannot be written by a migration plan (the keychain is outside its transaction); use a procedure`);
|
|
4317
|
+
}
|
|
4318
|
+
/** An `upsertRecord` edit whose body the kind's schema accepted. */
|
|
4319
|
+
function recordUpsertEdit(input) {
|
|
4320
|
+
refuseSecrets(input.kind);
|
|
4321
|
+
const value = require_runtime_capabilities.parseRecordBody(input.kind, input.id, input.data);
|
|
4322
|
+
return {
|
|
4323
|
+
op: "upsertRecord",
|
|
4324
|
+
owner: input.owner,
|
|
4325
|
+
kind: input.kind.name,
|
|
4326
|
+
recordKey: input.id,
|
|
4327
|
+
...input.deviceId === void 0 ? {} : { deviceId: input.deviceId },
|
|
4328
|
+
...input.at === void 0 ? {} : { at: input.at },
|
|
4329
|
+
value,
|
|
4330
|
+
...input.read === void 0 ? {} : { precondition: preconditionOf(input.read) }
|
|
4331
|
+
};
|
|
4332
|
+
}
|
|
4333
|
+
/** A `deleteRecord` edit. */
|
|
4334
|
+
function recordDeleteEdit(input) {
|
|
4335
|
+
refuseSecrets(input.kind);
|
|
4336
|
+
return {
|
|
4337
|
+
op: "deleteRecord",
|
|
4338
|
+
owner: input.owner,
|
|
4339
|
+
kind: input.kind.name,
|
|
4340
|
+
recordKey: input.id,
|
|
4341
|
+
precondition: preconditionOf(input.read)
|
|
4342
|
+
};
|
|
4343
|
+
}
|
|
4344
|
+
/** The precondition of a device edit: the identity the plan read. */
|
|
4345
|
+
function deviceIdentityPrecondition(identity) {
|
|
4346
|
+
return preconditionOf({
|
|
4347
|
+
addonId: identity.addonId,
|
|
4348
|
+
stableId: identity.stableId
|
|
4349
|
+
});
|
|
4350
|
+
}
|
|
4351
|
+
/** A `rekeyDevice` edit: same `deviceId`, new `(addonId, stableId)`. */
|
|
4352
|
+
function rekeyDeviceEdit(deviceId, read, next) {
|
|
4353
|
+
return {
|
|
4354
|
+
op: "rekeyDevice",
|
|
4355
|
+
deviceId,
|
|
4356
|
+
addonId: next.addonId,
|
|
4357
|
+
stableId: next.stableId,
|
|
4358
|
+
precondition: deviceIdentityPrecondition(read)
|
|
4359
|
+
};
|
|
4360
|
+
}
|
|
4361
|
+
/** A `tombstoneDevice` edit (D865). */
|
|
4362
|
+
function tombstoneDeviceEdit(deviceId, read) {
|
|
4363
|
+
return {
|
|
4364
|
+
op: "tombstoneDevice",
|
|
4365
|
+
deviceId,
|
|
4366
|
+
precondition: deviceIdentityPrecondition(read)
|
|
4367
|
+
};
|
|
4368
|
+
}
|
|
4369
|
+
//#endregion
|
|
4298
4370
|
//#region src/migrations/flatten-nested-records.ts
|
|
4299
4371
|
function isPlain(value) {
|
|
4300
4372
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -49177,7 +49249,7 @@ var mediaPlayerCapability = {
|
|
|
49177
49249
|
//#region src/generated/customize-catalog.ts
|
|
49178
49250
|
/**
|
|
49179
49251
|
* Customize catalog, projected from every `*.cap.ts` `customize` block.
|
|
49180
|
-
*
|
|
49252
|
+
* 14 caps. Field keys are `runtimeState` paths. No Zod.
|
|
49181
49253
|
*/
|
|
49182
49254
|
var CAP_CUSTOMIZE_CATALOG = {
|
|
49183
49255
|
"battery": {
|
|
@@ -49711,6 +49783,51 @@ var CAP_CUSTOMIZE_CATALOG = {
|
|
|
49711
49783
|
advancedExpression: false
|
|
49712
49784
|
}]
|
|
49713
49785
|
},
|
|
49786
|
+
"heat-pump-status": {
|
|
49787
|
+
version: 1,
|
|
49788
|
+
targets: [{
|
|
49789
|
+
id: "electrical-power",
|
|
49790
|
+
cardinality: "scalar",
|
|
49791
|
+
deviceTypes: [require_composed_stable_id.DeviceType.HeatPump],
|
|
49792
|
+
apply: "replace",
|
|
49793
|
+
vocabularyCap: "heat-pump-status",
|
|
49794
|
+
sources: [{
|
|
49795
|
+
kind: "numeric",
|
|
49796
|
+
requiredUnit: "W",
|
|
49797
|
+
transformKinds: ["identity"],
|
|
49798
|
+
transforms: [{ kind: "identity" }]
|
|
49799
|
+
}],
|
|
49800
|
+
sourceReport: { status: "assignment-status" },
|
|
49801
|
+
advancedExpression: false,
|
|
49802
|
+
path: "power.electricalW",
|
|
49803
|
+
valueKind: "number",
|
|
49804
|
+
nullable: true
|
|
49805
|
+
}, {
|
|
49806
|
+
id: "electrical-energy",
|
|
49807
|
+
cardinality: "scalar",
|
|
49808
|
+
deviceTypes: [require_composed_stable_id.DeviceType.HeatPump],
|
|
49809
|
+
apply: "replace",
|
|
49810
|
+
vocabularyCap: "heat-pump-status",
|
|
49811
|
+
sources: [{
|
|
49812
|
+
kind: "numeric",
|
|
49813
|
+
requiredUnit: "kWh",
|
|
49814
|
+
transformKinds: ["identity"],
|
|
49815
|
+
transforms: [{ kind: "identity" }]
|
|
49816
|
+
}],
|
|
49817
|
+
sourceReport: { status: "assignment-status" },
|
|
49818
|
+
advancedExpression: false,
|
|
49819
|
+
path: "energy.electricalKwh",
|
|
49820
|
+
valueKind: "number",
|
|
49821
|
+
nullable: true
|
|
49822
|
+
}],
|
|
49823
|
+
overridable: [{
|
|
49824
|
+
path: "power.electricalW",
|
|
49825
|
+
by: "electrical-power"
|
|
49826
|
+
}, {
|
|
49827
|
+
path: "energy.electricalKwh",
|
|
49828
|
+
by: "electrical-energy"
|
|
49829
|
+
}]
|
|
49830
|
+
},
|
|
49714
49831
|
"lock-control": {
|
|
49715
49832
|
version: 1,
|
|
49716
49833
|
targets: [{
|
|
@@ -64907,6 +65024,43 @@ function heatPumpInstantCop(power) {
|
|
|
64907
65024
|
if (thermalW === null || electricalW === null || electricalW <= 0) return null;
|
|
64908
65025
|
return thermalW / electricalW;
|
|
64909
65026
|
}
|
|
65027
|
+
var HEAT_PUMP_CUSTOMIZE_DEVICE_TYPES = [require_composed_stable_id.DeviceType.HeatPump];
|
|
65028
|
+
/** One electrical reading the operator may take from a device they pick, unit checked. */
|
|
65029
|
+
function electricalTarget(id, path, unit) {
|
|
65030
|
+
return {
|
|
65031
|
+
id,
|
|
65032
|
+
cardinality: "scalar",
|
|
65033
|
+
vocabulary: { cap: "heat-pump-status" },
|
|
65034
|
+
deviceTypes: HEAT_PUMP_CUSTOMIZE_DEVICE_TYPES,
|
|
65035
|
+
apply: "replace",
|
|
65036
|
+
path,
|
|
65037
|
+
sources: [{
|
|
65038
|
+
kind: "numeric",
|
|
65039
|
+
requiredUnit: unit,
|
|
65040
|
+
transforms: [{ kind: "identity" }]
|
|
65041
|
+
}],
|
|
65042
|
+
sourceReport: { status: "assignment-status" }
|
|
65043
|
+
};
|
|
65044
|
+
}
|
|
65045
|
+
var HEAT_PUMP_TARGETS = [electricalTarget("electrical-power", "power.electricalW", "W"), electricalTarget("electrical-energy", "energy.electricalKwh", "kWh")];
|
|
65046
|
+
/**
|
|
65047
|
+
* Customize (D984, #476): a gateway that reports no instantaneous electrical
|
|
65048
|
+
* power (the cloud ones) or whose energy meter the operator trusts less than a
|
|
65049
|
+
* dedicated one lets the OPERATOR pick a device for `power.electricalW` and
|
|
65050
|
+
* `energy.electricalKwh` — a `replace` over a field listed in `overridable`,
|
|
65051
|
+
* nothing else. The replaced value IS the cap field, so the instant COP, the
|
|
65052
|
+
* hero pills and the history use it; nothing is linked by itself (D356), the
|
|
65053
|
+
* unit is checked, and a source that does not answer releases the field back to
|
|
65054
|
+
* the native reading (never a 0, D393).
|
|
65055
|
+
*/
|
|
65056
|
+
var heatPumpStatusCustomize = {
|
|
65057
|
+
version: 1,
|
|
65058
|
+
overridable: HEAT_PUMP_TARGETS.map((target) => ({
|
|
65059
|
+
path: target.path,
|
|
65060
|
+
by: target.id
|
|
65061
|
+
})),
|
|
65062
|
+
targets: HEAT_PUMP_TARGETS
|
|
65063
|
+
};
|
|
64910
65064
|
var heatPumpStatusCapability = {
|
|
64911
65065
|
name: "heat-pump-status",
|
|
64912
65066
|
scope: "device",
|
|
@@ -64925,6 +65079,7 @@ var heatPumpStatusCapability = {
|
|
|
64925
65079
|
* (the series are recorded). See `RuntimeStateDurability`.
|
|
64926
65080
|
*/
|
|
64927
65081
|
durability: "session",
|
|
65082
|
+
customize: heatPumpStatusCustomize,
|
|
64928
65083
|
/**
|
|
64929
65084
|
* History (D850, D917): `circuits[]` is a keyed array — one series per circuit and
|
|
64930
65085
|
* field, named by the circuit's label. The mode is a state (D896); the energy
|
|
@@ -86808,6 +86963,7 @@ var HardwareClassIdSchema = zod.z.enum([
|
|
|
86808
86963
|
"apple-m-base",
|
|
86809
86964
|
"apple-m-pro",
|
|
86810
86965
|
"amd-phoenix",
|
|
86966
|
+
"nvidia-gpu",
|
|
86811
86967
|
"unknown"
|
|
86812
86968
|
]);
|
|
86813
86969
|
var AcceleratorKindSchema = zod.z.enum([
|
|
@@ -86815,6 +86971,7 @@ var AcceleratorKindSchema = zod.z.enum([
|
|
|
86815
86971
|
"intel-igpu",
|
|
86816
86972
|
"amd-igpu",
|
|
86817
86973
|
"amd-npu",
|
|
86974
|
+
"nvidia-gpu",
|
|
86818
86975
|
"x86-cpu",
|
|
86819
86976
|
"arm-cpu",
|
|
86820
86977
|
"apple-ane",
|
|
@@ -89365,6 +89522,38 @@ var DETECTOR_PERF = {
|
|
|
89365
89522
|
measured: true
|
|
89366
89523
|
} }
|
|
89367
89524
|
},
|
|
89525
|
+
"nvidia-gpu": { "nvidia-gpu": {
|
|
89526
|
+
"yolov9t-320": {
|
|
89527
|
+
p50Ms: 12,
|
|
89528
|
+
fps: 83,
|
|
89529
|
+
measured: false
|
|
89530
|
+
},
|
|
89531
|
+
"yolov9t-640": {
|
|
89532
|
+
p50Ms: 16,
|
|
89533
|
+
fps: 62,
|
|
89534
|
+
measured: false
|
|
89535
|
+
},
|
|
89536
|
+
"yolov9s-320": {
|
|
89537
|
+
p50Ms: 13,
|
|
89538
|
+
fps: 77,
|
|
89539
|
+
measured: false
|
|
89540
|
+
},
|
|
89541
|
+
"yolov9s-640": {
|
|
89542
|
+
p50Ms: 20,
|
|
89543
|
+
fps: 50,
|
|
89544
|
+
measured: false
|
|
89545
|
+
},
|
|
89546
|
+
"yolov9m-320": {
|
|
89547
|
+
p50Ms: 16,
|
|
89548
|
+
fps: 62,
|
|
89549
|
+
measured: false
|
|
89550
|
+
},
|
|
89551
|
+
"yolov9m-640": {
|
|
89552
|
+
p50Ms: 32,
|
|
89553
|
+
fps: 31,
|
|
89554
|
+
measured: false
|
|
89555
|
+
}
|
|
89556
|
+
} },
|
|
89368
89557
|
"apple-m-pro": {
|
|
89369
89558
|
"apple-ane": {
|
|
89370
89559
|
"yolov9t-320": {
|
|
@@ -89680,6 +89869,13 @@ function scaleColumn(column, ratio, estimatedFrom) {
|
|
|
89680
89869
|
function resolveLatencyColumn(input) {
|
|
89681
89870
|
const perf = input.perf ?? DETECTOR_PERF;
|
|
89682
89871
|
const references = input.references ?? REFERENCE_COMPUTE;
|
|
89872
|
+
if (input.accelerator === "nvidia-gpu") {
|
|
89873
|
+
const card = classColumn(perf, "nvidia-gpu", "nvidia-gpu");
|
|
89874
|
+
return card === void 0 ? null : {
|
|
89875
|
+
column: card,
|
|
89876
|
+
estimatedFrom: null
|
|
89877
|
+
};
|
|
89878
|
+
}
|
|
89683
89879
|
const measured = classColumn(perf, input.hardwareClass, input.accelerator);
|
|
89684
89880
|
if (measured !== void 0 && input.hardwareClass !== "intel-n-series") return {
|
|
89685
89881
|
column: measured,
|
|
@@ -146329,6 +146525,10 @@ function classifyInferenceHardware(hw) {
|
|
|
146329
146525
|
hardwareClass: "amd-phoenix",
|
|
146330
146526
|
cpuModel
|
|
146331
146527
|
};
|
|
146528
|
+
if (hw.nvidia?.usable === true) return {
|
|
146529
|
+
hardwareClass: "nvidia-gpu",
|
|
146530
|
+
cpuModel
|
|
146531
|
+
};
|
|
146332
146532
|
return {
|
|
146333
146533
|
hardwareClass: "unknown",
|
|
146334
146534
|
cpuModel
|
|
@@ -146346,6 +146546,7 @@ function acceleratorKindOf(deviceKey, hw) {
|
|
|
146346
146546
|
if (backend === "openvino" && device === "npu") return "intel-npu";
|
|
146347
146547
|
if (backend === "openvino" && device === "gpu") return "intel-igpu";
|
|
146348
146548
|
if (backend === "onnx" && device === "webgpu") return "amd-igpu";
|
|
146549
|
+
if (backend === "cuda" || backend === "onnx" && device === "cuda") return "nvidia-gpu";
|
|
146349
146550
|
if (backend === "vitisai" && device === "npu") return "amd-npu";
|
|
146350
146551
|
if (backend === "cpu" || device === "cpu") return hw.arch === "arm64" ? "arm-cpu" : "x86-cpu";
|
|
146351
146552
|
return null;
|
|
@@ -154722,6 +154923,7 @@ exports.deviceExportStatusInstanceOf = statusInstanceOf;
|
|
|
154722
154923
|
exports.deviceExtensionCapability = deviceExtensionCapability;
|
|
154723
154924
|
exports.deviceHistoryCapability = deviceHistoryCapability;
|
|
154724
154925
|
exports.deviceIconKey = deviceIconKey;
|
|
154926
|
+
exports.deviceIdentityPrecondition = deviceIdentityPrecondition;
|
|
154725
154927
|
exports.deviceManagerCapability = deviceManagerCapability;
|
|
154726
154928
|
exports.deviceMatchesProfile = deviceMatchesProfile;
|
|
154727
154929
|
exports.deviceOffersActions = deviceOffersActions;
|
|
@@ -155330,6 +155532,7 @@ exports.parseOauthLandingFragment = parseOauthLandingFragment;
|
|
|
155330
155532
|
exports.parseOccupancyScope = parseOccupancyScope;
|
|
155331
155533
|
exports.parseProcStatus = parseProcStatus;
|
|
155332
155534
|
exports.parseProfileBrokerId = require_runtime_capabilities.parseProfileBrokerId;
|
|
155535
|
+
exports.parseRecordBody = require_runtime_capabilities.parseRecordBody;
|
|
155333
155536
|
exports.parseRetrainRevisionConflict = parseRetrainRevisionConflict;
|
|
155334
155537
|
exports.parseRuleSection = parseRuleSection;
|
|
155335
155538
|
exports.parseSecretPath = require_runtime_capabilities.parseSecretPath;
|
|
@@ -155456,11 +155659,13 @@ exports.reconcileBlockDevices = reconcileBlockDevices;
|
|
|
155456
155659
|
exports.reconcileRemovedDevices = reconcileRemovedDevices;
|
|
155457
155660
|
exports.reconcileReportedFeatures = reconcileReportedFeatures;
|
|
155458
155661
|
exports.recordArrayItemPath = require_runtime_capabilities.recordArrayItemPath;
|
|
155662
|
+
exports.recordDeleteEdit = recordDeleteEdit;
|
|
155459
155663
|
exports.recordEntriesCapability = recordEntriesCapability;
|
|
155460
155664
|
exports.recordInstanceSwitch = require_runtime_capabilities.recordInstanceSwitch;
|
|
155461
155665
|
exports.recordRegistrySwitch = require_runtime_capabilities.recordRegistrySwitch;
|
|
155462
155666
|
exports.recordSecretCollection = require_runtime_capabilities.recordSecretCollection;
|
|
155463
155667
|
exports.recordSecretRef = require_runtime_capabilities.recordSecretRef;
|
|
155668
|
+
exports.recordUpsertEdit = recordUpsertEdit;
|
|
155464
155669
|
exports.recordingArchiveCapability = recordingArchiveCapability;
|
|
155465
155670
|
exports.recordingCapability = recordingCapability;
|
|
155466
155671
|
exports.recordingExportCapability = recordingExportCapability;
|
|
@@ -155480,6 +155685,7 @@ exports.registerPowerSwitch = registerPowerSwitch;
|
|
|
155480
155685
|
exports.registrySwitchPortsOver = require_runtime_capabilities.registrySwitchPortsOver;
|
|
155481
155686
|
exports.registrySwitchToBodyId = require_runtime_capabilities.registrySwitchToBodyId;
|
|
155482
155687
|
exports.registrySwitchToBodyMigration = require_runtime_capabilities.registrySwitchToBodyMigration;
|
|
155688
|
+
exports.rekeyDeviceEdit = rekeyDeviceEdit;
|
|
155483
155689
|
exports.remapCropDetections = remapCropDetections;
|
|
155484
155690
|
exports.remoteCapability = remoteCapability;
|
|
155485
155691
|
exports.remoteLayoutComponentsCapability = remoteLayoutComponentsCapability;
|
|
@@ -155830,6 +156036,7 @@ exports.toTimings = toTimings;
|
|
|
155830
156036
|
exports.toastCapability = toastCapability;
|
|
155831
156037
|
exports.toggleAudioLabel = toggleAudioLabel;
|
|
155832
156038
|
exports.tokenize = require_implemented_methods.tokenize;
|
|
156039
|
+
exports.tombstoneDeviceEdit = tombstoneDeviceEdit;
|
|
155833
156040
|
exports.trainingCapability = trainingCapability;
|
|
155834
156041
|
exports.trainingProviderCapability = trainingProviderCapability;
|
|
155835
156042
|
exports.transcodeBody = transcodeBody;
|