@camstack/types 1.2.581 → 1.2.583
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 +12 -0
- package/dist/addon.js +3 -2
- package/dist/addon.mjs +3 -2
- package/dist/capabilities/device-history.cap.d.ts +80 -0
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +120 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts +2 -0
- package/dist/capabilities/schemas/orchestrator-metrics.d.ts +2 -0
- package/dist/client.js +3 -1
- package/dist/client.mjs +3 -1
- package/dist/generated/addon-api.d.ts +14 -0
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +196 -1
- package/dist/index.mjs +185 -2
- package/dist/interfaces/api-shared.d.ts +2 -0
- package/dist/pipeline/health-digest/schemas.d.ts +258 -0
- package/dist/{sleep-BURDyp_n.js → sleep-Coq9CYAH.js} +2 -1
- package/dist/{sleep-C9EWTQr9.mjs → sleep-DnhxKL99.mjs} +2 -1
- 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_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-Coq9CYAH.js");
|
|
3
3
|
const require_event_category = require("./event-category-d9kiqCqC.js");
|
|
4
4
|
const require_composed_stable_id = require("./composed-stable-id-C3NfRTj8.js");
|
|
5
5
|
const require_implemented_methods = require("./implemented-methods-C7ScGvEz.js");
|
|
@@ -58926,6 +58926,34 @@ var OrphanListSchema = zod.z.object({
|
|
|
58926
58926
|
/** More orphans exist than {@link DEVICE_HISTORY_ORPHAN_LIST_MAX}. */
|
|
58927
58927
|
truncated: zod.z.boolean()
|
|
58928
58928
|
});
|
|
58929
|
+
var DeviceHistoryRangeDeleteRefusalSchema = zod.z.enum([
|
|
58930
|
+
"invalid-range",
|
|
58931
|
+
"range-too-large",
|
|
58932
|
+
"series-not-found",
|
|
58933
|
+
"not-a-point-series"
|
|
58934
|
+
]);
|
|
58935
|
+
var RollupRowsSchema = zod.z.object({
|
|
58936
|
+
"5m": zod.z.number().int(),
|
|
58937
|
+
"1h": zod.z.number().int(),
|
|
58938
|
+
"1d": zod.z.number().int()
|
|
58939
|
+
});
|
|
58940
|
+
/**
|
|
58941
|
+
* What a time-range delete did, or WOULD do (`dryRun`). `rows` is what was
|
|
58942
|
+
* removed: raw points inside the range, and the rollup rows covering it (those
|
|
58943
|
+
* are removed and rebuilt from what remains, so a gap leaves no stale value).
|
|
58944
|
+
* `rewritten` is how many rollup rows were rebuilt from the remaining points;
|
|
58945
|
+
* `null` on a dry run, which cannot know before it has deleted.
|
|
58946
|
+
*/
|
|
58947
|
+
var RangeDeleteResultSchema = zod.z.discriminatedUnion("ok", [zod.z.object({
|
|
58948
|
+
ok: zod.z.literal(true),
|
|
58949
|
+
dryRun: zod.z.boolean(),
|
|
58950
|
+
seriesId: zod.z.number().int(),
|
|
58951
|
+
rows: TierRowsSchema,
|
|
58952
|
+
rewritten: RollupRowsSchema.nullable()
|
|
58953
|
+
}), zod.z.object({
|
|
58954
|
+
ok: zod.z.literal(false),
|
|
58955
|
+
reason: DeviceHistoryRangeDeleteRefusalSchema
|
|
58956
|
+
})]);
|
|
58929
58957
|
var DeviceHistoryStatusSchema = zod.z.object({
|
|
58930
58958
|
startedAt: zod.z.number(),
|
|
58931
58959
|
/** The store is declared, series loaded and the first reconcile has answered. */
|
|
@@ -59084,6 +59112,27 @@ var deviceHistoryCapability = {
|
|
|
59084
59112
|
deleteOrphanSeries: require_sleep.method(zod.z.object({ seriesIds: zod.z.array(zod.z.number().int()).min(1).max(50) }), zod.z.object({ results: zod.z.array(OrphanDeleteEntrySchema).readonly() }), {
|
|
59085
59113
|
kind: "mutation",
|
|
59086
59114
|
auth: "admin"
|
|
59115
|
+
}),
|
|
59116
|
+
/**
|
|
59117
|
+
* Delete the points of ONE device series with a timestamp in
|
|
59118
|
+
* `[fromMs, toMs]` (both inclusive, `fromMs < toMs`) — for a spurious
|
|
59119
|
+
* reading an operator has judged wrong. The rollup rows covering the
|
|
59120
|
+
* range (and the bucket that held the deleted value forward) are removed
|
|
59121
|
+
* and rebuilt from the points that remain. `dryRun: true` deletes nothing
|
|
59122
|
+
* and returns the counts a real run would remove. Only a series fed by
|
|
59123
|
+
* points has a range to delete; a bucket-fed series is refused
|
|
59124
|
+
* `not-a-point-series`. `scope` is the series' scope ('' for most).
|
|
59125
|
+
*/
|
|
59126
|
+
deleteSeriesRange: require_sleep.method(zod.z.object({
|
|
59127
|
+
deviceId: zod.z.number().int(),
|
|
59128
|
+
key: zod.z.string().min(1),
|
|
59129
|
+
scope: zod.z.string(),
|
|
59130
|
+
fromMs: zod.z.number().int().nonnegative(),
|
|
59131
|
+
toMs: zod.z.number().int().nonnegative(),
|
|
59132
|
+
dryRun: zod.z.boolean()
|
|
59133
|
+
}), RangeDeleteResultSchema, {
|
|
59134
|
+
kind: "mutation",
|
|
59135
|
+
auth: "admin"
|
|
59087
59136
|
})
|
|
59088
59137
|
},
|
|
59089
59138
|
vocabulary: { notOperatorFacing: "recorded history of device state — read by charts, not actuated" }
|
|
@@ -76096,6 +76145,12 @@ var CameraMetricsSchema = zod.z.object({
|
|
|
76096
76145
|
queueDepth: zod.z.number(),
|
|
76097
76146
|
avgInferenceTimeMs: zod.z.number(),
|
|
76098
76147
|
droppedFrames: zod.z.number(),
|
|
76148
|
+
/**
|
|
76149
|
+
* Native crops this runner could not produce for the camera (the caller was
|
|
76150
|
+
* handed nothing), cumulative since attach. Additive: a runner that predates
|
|
76151
|
+
* it omits the field, which a reader treats as unknown, never zero.
|
|
76152
|
+
*/
|
|
76153
|
+
nativeCropMisses: zod.z.number().optional(),
|
|
76099
76154
|
phase: zod.z.enum([
|
|
76100
76155
|
"idle",
|
|
76101
76156
|
"watching",
|
|
@@ -85720,6 +85775,103 @@ var EffectiveSharesSchema = zod.z.object({
|
|
|
85720
85775
|
deviceWeights: zod.z.record(zod.z.string(), zod.z.record(zod.z.string(), zod.z.number()))
|
|
85721
85776
|
});
|
|
85722
85777
|
//#endregion
|
|
85778
|
+
//#region src/pipeline/health-digest/schemas.ts
|
|
85779
|
+
/**
|
|
85780
|
+
* Health digest (planning#572) — findings an operator can act on, built every
|
|
85781
|
+
* few minutes from state the orchestrator already holds in memory. A finding is
|
|
85782
|
+
* `{ severity, subject, what, evidence, action }`; a number that could not be
|
|
85783
|
+
* read is `null`, never `0` (D393).
|
|
85784
|
+
*/
|
|
85785
|
+
var HEALTH_FINDING_KINDS = [
|
|
85786
|
+
"motion-without-detections",
|
|
85787
|
+
"detections-under-floor",
|
|
85788
|
+
"inference-too-slow",
|
|
85789
|
+
"frames-shed",
|
|
85790
|
+
"inference-device-unusable"
|
|
85791
|
+
];
|
|
85792
|
+
var HealthFindingKindSchema = zod.z.enum(HEALTH_FINDING_KINDS);
|
|
85793
|
+
var HealthSeveritySchema = zod.z.enum([
|
|
85794
|
+
"info",
|
|
85795
|
+
"warning",
|
|
85796
|
+
"critical"
|
|
85797
|
+
]);
|
|
85798
|
+
var HealthSubjectSchema = zod.z.discriminatedUnion("type", [
|
|
85799
|
+
zod.z.object({
|
|
85800
|
+
type: zod.z.literal("camera"),
|
|
85801
|
+
deviceId: zod.z.number()
|
|
85802
|
+
}),
|
|
85803
|
+
zod.z.object({
|
|
85804
|
+
type: zod.z.literal("node"),
|
|
85805
|
+
nodeId: zod.z.string()
|
|
85806
|
+
}),
|
|
85807
|
+
zod.z.object({
|
|
85808
|
+
type: zod.z.literal("inference-device"),
|
|
85809
|
+
nodeId: zod.z.string(),
|
|
85810
|
+
deviceKey: zod.z.string()
|
|
85811
|
+
})
|
|
85812
|
+
]);
|
|
85813
|
+
var HealthFindingSchema = zod.z.object({
|
|
85814
|
+
/** Stable across ticks for the same condition on the same subject. */
|
|
85815
|
+
id: zod.z.string(),
|
|
85816
|
+
kind: HealthFindingKindSchema,
|
|
85817
|
+
severity: HealthSeveritySchema,
|
|
85818
|
+
subject: HealthSubjectSchema,
|
|
85819
|
+
what: zod.z.string(),
|
|
85820
|
+
/** The numbers behind the sentence; `null` = the value could not be read. */
|
|
85821
|
+
evidence: zod.z.record(zod.z.string(), zod.z.number().nullable()),
|
|
85822
|
+
action: zod.z.string()
|
|
85823
|
+
});
|
|
85824
|
+
/** One in-memory source the tick read, and whether it answered. */
|
|
85825
|
+
var HealthSourceStatusSchema = zod.z.object({
|
|
85826
|
+
source: zod.z.string(),
|
|
85827
|
+
/** Entries read; `null` = the read failed. */
|
|
85828
|
+
entries: zod.z.number().nullable()
|
|
85829
|
+
});
|
|
85830
|
+
var HealthNodeSummarySchema = zod.z.object({
|
|
85831
|
+
nodeId: zod.z.string(),
|
|
85832
|
+
sessionsNow: zod.z.number(),
|
|
85833
|
+
/** `deviceKey` of every inference device the balancer excludes on this node. */
|
|
85834
|
+
unusableDevices: zod.z.array(zod.z.string()).readonly(),
|
|
85835
|
+
devices: zod.z.array(zod.z.object({
|
|
85836
|
+
deviceKey: zod.z.string(),
|
|
85837
|
+
sessionsNow: zod.z.number(),
|
|
85838
|
+
usable: zod.z.boolean()
|
|
85839
|
+
})).readonly()
|
|
85840
|
+
});
|
|
85841
|
+
/**
|
|
85842
|
+
* Per-camera runner-side signals, as per-tick deltas of the runner's cumulative
|
|
85843
|
+
* counters. A camera is listed only when at least one signal is known and
|
|
85844
|
+
* non-zero; `null` = the runner did not report it (unknown, never zero).
|
|
85845
|
+
*/
|
|
85846
|
+
var HealthCameraRunnerSignalsSchema = zod.z.object({
|
|
85847
|
+
deviceId: zod.z.number(),
|
|
85848
|
+
/** Native crops the runner failed to produce since the previous tick. */
|
|
85849
|
+
nativeCropMissesSincePreviousTick: zod.z.number().nullable()
|
|
85850
|
+
});
|
|
85851
|
+
var HealthDigestSchema = zod.z.object({
|
|
85852
|
+
generatedAt: zod.z.number(),
|
|
85853
|
+
/** Wall time the tick took to build this digest. */
|
|
85854
|
+
tickMs: zod.z.number(),
|
|
85855
|
+
/** Cameras known to the digest; `null` when a camera source failed to read (the union would be incomplete). */
|
|
85856
|
+
camerasSeen: zod.z.number().nullable(),
|
|
85857
|
+
findings: zod.z.array(HealthFindingSchema).readonly(),
|
|
85858
|
+
/** Runner-side per-camera deltas worth a look; see {@link HealthCameraRunnerSignalsSchema}. */
|
|
85859
|
+
cameraSignals: zod.z.array(HealthCameraRunnerSignalsSchema).readonly(),
|
|
85860
|
+
nodes: zod.z.array(HealthNodeSummarySchema).readonly(),
|
|
85861
|
+
sources: zod.z.array(HealthSourceStatusSchema).readonly(),
|
|
85862
|
+
/** Signals the digest does not cover yet, and why — never computed by scanning. */
|
|
85863
|
+
notCovered: zod.z.array(zod.z.string()).readonly()
|
|
85864
|
+
});
|
|
85865
|
+
var HealthDigestInputSchema = zod.z.object({
|
|
85866
|
+
/** Newest first; 1 = the latest digest. */
|
|
85867
|
+
history: zod.z.number().int().min(1).max(24).default(1) });
|
|
85868
|
+
var HealthDigestAnswerSchema = zod.z.object({
|
|
85869
|
+
/** Null until the first tick has run. */
|
|
85870
|
+
latest: HealthDigestSchema.nullable(),
|
|
85871
|
+
/** Older digests, newest first, when `history` > 1. */
|
|
85872
|
+
previous: zod.z.array(HealthDigestSchema).readonly()
|
|
85873
|
+
});
|
|
85874
|
+
//#endregion
|
|
85723
85875
|
//#region src/capabilities/pipeline-orchestrator.cap.ts
|
|
85724
85876
|
var CameraPipelineConfigSchema = zod.z.object({
|
|
85725
85877
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
@@ -86703,6 +86855,16 @@ var pipelineOrchestratorCapability = {
|
|
|
86703
86855
|
*/
|
|
86704
86856
|
getPlacementStats: require_sleep.method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }),
|
|
86705
86857
|
/**
|
|
86858
|
+
* Health digest (planning#572) — findings an operator can act on, built
|
|
86859
|
+
* every 5 minutes from state the orchestrator already holds in memory
|
|
86860
|
+
* (no log scan, no database read): motion that never becomes a detection,
|
|
86861
|
+
* candidates all under the class floor, inference slower than the fps it
|
|
86862
|
+
* must allow, shed frames, unusable inference devices. `latest` is null
|
|
86863
|
+
* until the first tick; `previous` holds older digests when `history` > 1.
|
|
86864
|
+
* In memory on the hub — a restart starts empty.
|
|
86865
|
+
*/
|
|
86866
|
+
getHealthDigest: require_sleep.method(HealthDigestInputSchema, HealthDigestAnswerSchema, { auth: "admin" }),
|
|
86867
|
+
/**
|
|
86706
86868
|
* Load balancing (D748, D755) — shares proportional to each node's
|
|
86707
86869
|
* capacity in parallel sessions: from the latency table at the models
|
|
86708
86870
|
* Auto tune picks (`hardware`), or from node benchmark results
|
|
@@ -119975,6 +120137,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
119975
120137
|
access: "delete",
|
|
119976
120138
|
role: "admin"
|
|
119977
120139
|
},
|
|
120140
|
+
"deviceHistory.deleteSeriesRange": {
|
|
120141
|
+
capName: "device-history",
|
|
120142
|
+
capScope: "system",
|
|
120143
|
+
addonId: null,
|
|
120144
|
+
access: "delete",
|
|
120145
|
+
role: "admin"
|
|
120146
|
+
},
|
|
119978
120147
|
"deviceHistory.getDeviceEnabled": {
|
|
119979
120148
|
capName: "device-history",
|
|
119980
120149
|
capScope: "system",
|
|
@@ -124791,6 +124960,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
124791
124960
|
access: "view",
|
|
124792
124961
|
role: "admin"
|
|
124793
124962
|
},
|
|
124963
|
+
"pipelineOrchestrator.getHealthDigest": {
|
|
124964
|
+
capName: "pipeline-orchestrator",
|
|
124965
|
+
capScope: "system",
|
|
124966
|
+
addonId: null,
|
|
124967
|
+
access: "view",
|
|
124968
|
+
role: "admin"
|
|
124969
|
+
},
|
|
124794
124970
|
"pipelineOrchestrator.getIngestOwner": {
|
|
124795
124971
|
capName: "pipeline-orchestrator",
|
|
124796
124972
|
capScope: "system",
|
|
@@ -131395,6 +131571,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
131395
131571
|
form: "single",
|
|
131396
131572
|
optional: false
|
|
131397
131573
|
}],
|
|
131574
|
+
"deviceHistory.deleteSeriesRange": [{
|
|
131575
|
+
name: "deviceId",
|
|
131576
|
+
form: "single",
|
|
131577
|
+
optional: false
|
|
131578
|
+
}],
|
|
131398
131579
|
"deviceHistory.getDeviceEnabled": [{
|
|
131399
131580
|
name: "deviceId",
|
|
131400
131581
|
form: "single",
|
|
@@ -134081,6 +134262,7 @@ var SYSTEM_SCOPE_DEVICE_METHODS = [
|
|
|
134081
134262
|
"deviceExport.applyDeviceSettingsPatch",
|
|
134082
134263
|
"deviceExport.getDeviceLiveContribution",
|
|
134083
134264
|
"deviceExport.getDeviceSettingsContribution",
|
|
134265
|
+
"deviceHistory.deleteSeriesRange",
|
|
134084
134266
|
"deviceHistory.getDeviceEnabled",
|
|
134085
134267
|
"deviceHistory.listSeries",
|
|
134086
134268
|
"deviceHistory.query",
|
|
@@ -135828,6 +136010,7 @@ function createSystemProxy(api) {
|
|
|
135828
136010
|
applyAutoTune: (input) => dispatch("pipelineOrchestrator", "applyAutoTune", "mutation", input),
|
|
135829
136011
|
setLoadBalancingShares: (input) => dispatch("pipelineOrchestrator", "setLoadBalancingShares", "mutation", input),
|
|
135830
136012
|
getPlacementStats: (input) => dispatch("pipelineOrchestrator", "getPlacementStats", "query", input),
|
|
136013
|
+
getHealthDigest: (input) => dispatch("pipelineOrchestrator", "getHealthDigest", "query", input),
|
|
135831
136014
|
suggestShares: (input) => dispatch("pipelineOrchestrator", "suggestShares", "query", input),
|
|
135832
136015
|
getEffectiveShares: (input) => dispatch("pipelineOrchestrator", "getEffectiveShares", "query", input),
|
|
135833
136016
|
setShareSource: (input) => dispatch("pipelineOrchestrator", "setShareSource", "mutation", input),
|
|
@@ -149054,6 +149237,7 @@ exports.DeviceHistoryKindSchema = DeviceHistoryKindSchema;
|
|
|
149054
149237
|
exports.DeviceHistoryOrphanDeleteRefusalSchema = DeviceHistoryOrphanDeleteRefusalSchema;
|
|
149055
149238
|
exports.DeviceHistoryOrphanReasonSchema = DeviceHistoryOrphanReasonSchema;
|
|
149056
149239
|
exports.DeviceHistoryProducerKindSchema = DeviceHistoryProducerKindSchema;
|
|
149240
|
+
exports.DeviceHistoryRangeDeleteRefusalSchema = DeviceHistoryRangeDeleteRefusalSchema;
|
|
149057
149241
|
exports.DeviceHistoryRefusalReasonSchema = DeviceHistoryRefusalReasonSchema;
|
|
149058
149242
|
exports.DeviceHistoryResolutionSchema = DeviceHistoryResolutionSchema;
|
|
149059
149243
|
exports.DeviceHistoryStatusSchema = DeviceHistoryStatusSchema;
|
|
@@ -149340,6 +149524,7 @@ exports.HAP_AUDIO_BASE = HAP_AUDIO_BASE;
|
|
|
149340
149524
|
exports.HAP_AUDIO_BITRATE_KBPS = HAP_AUDIO_BITRATE_KBPS;
|
|
149341
149525
|
exports.HAP_AUDIO_VBV_KBITS = HAP_AUDIO_VBV_KBITS;
|
|
149342
149526
|
exports.HAP_KEYFRAME_INTERVAL_SEC = HAP_KEYFRAME_INTERVAL_SEC;
|
|
149527
|
+
exports.HEALTH_FINDING_KINDS = HEALTH_FINDING_KINDS;
|
|
149343
149528
|
exports.HEAT_PUMP_CIRCUIT_KINDS = HEAT_PUMP_CIRCUIT_KINDS;
|
|
149344
149529
|
exports.HERO_ANIMATIONS = HERO_ANIMATIONS;
|
|
149345
149530
|
exports.HERO_BACKGROUNDS = HERO_BACKGROUNDS;
|
|
@@ -149385,7 +149570,17 @@ exports.HUB_MDNS_TXT_KEYS = HUB_MDNS_TXT_KEYS;
|
|
|
149385
149570
|
exports.HUB_VIEWER_MOUNT = HUB_VIEWER_MOUNT;
|
|
149386
149571
|
exports.HWACCEL_OPTIONS = HWACCEL_OPTIONS;
|
|
149387
149572
|
exports.HardwareClassIdSchema = HardwareClassIdSchema;
|
|
149573
|
+
exports.HealthCameraRunnerSignalsSchema = HealthCameraRunnerSignalsSchema;
|
|
149574
|
+
exports.HealthDigestAnswerSchema = HealthDigestAnswerSchema;
|
|
149575
|
+
exports.HealthDigestInputSchema = HealthDigestInputSchema;
|
|
149576
|
+
exports.HealthDigestSchema = HealthDigestSchema;
|
|
149577
|
+
exports.HealthFindingKindSchema = HealthFindingKindSchema;
|
|
149578
|
+
exports.HealthFindingSchema = HealthFindingSchema;
|
|
149579
|
+
exports.HealthNodeSummarySchema = HealthNodeSummarySchema;
|
|
149580
|
+
exports.HealthSeveritySchema = HealthSeveritySchema;
|
|
149581
|
+
exports.HealthSourceStatusSchema = HealthSourceStatusSchema;
|
|
149388
149582
|
exports.HealthStatusSchema = HealthStatusSchema;
|
|
149583
|
+
exports.HealthSubjectSchema = HealthSubjectSchema;
|
|
149389
149584
|
exports.HeatPumpCircuitKindSchema = HeatPumpCircuitKindSchema;
|
|
149390
149585
|
exports.HeatPumpCircuitSchema = HeatPumpCircuitSchema;
|
|
149391
149586
|
exports.HeatPumpEnergySchema = HeatPumpEnergySchema;
|