@camstack/addon-post-analysis 1.2.649 → 1.2.651

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.
Files changed (16) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{clip-model-registry-DLCu17dL.mjs → clip-model-registry-BWY8P-AK.mjs} +620 -7
  3. package/dist/{clip-model-registry-BweA9zEK.js → clip-model-registry-Dte3QQEt.js} +620 -7
  4. package/dist/embedding-encoder/index.js +1 -1
  5. package/dist/embedding-encoder/index.mjs +1 -1
  6. package/dist/pipeline-analytics/_stub.js +2 -2
  7. package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DFq-lnbD.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-_vVfXkDx.mjs} +2 -2
  8. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-6PIugMbv.mjs +26 -0
  9. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Bk6VlAsZ.mjs +26 -0
  10. package/dist/pipeline-analytics/{hostInit-Dog0wpFI.mjs → hostInit-A7m5uu3n.mjs} +2 -2
  11. package/dist/pipeline-analytics/index.js +148 -3
  12. package/dist/pipeline-analytics/index.mjs +148 -4
  13. package/dist/pipeline-analytics/remoteEntry.js +1 -1
  14. package/package.json +1 -1
  15. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-YDf26qsN.mjs +0 -26
  16. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DQTr4r2P.mjs +0 -26
@@ -5676,7 +5676,7 @@ var ZodIssueCode = {
5676
5676
  var ZodFirstPartyTypeKind;
5677
5677
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5678
5678
  //#endregion
5679
- //#region ../types/dist/sleep-Crlmu_tO.mjs
5679
+ //#region ../types/dist/sleep-C_u6cEAJ.mjs
5680
5680
  /**
5681
5681
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5682
5682
  * window to float samples (D455).
@@ -9109,6 +9109,7 @@ var CAP_NAMES = Object.freeze([
9109
9109
  "image-settings",
9110
9110
  "integrations",
9111
9111
  "intercom",
9112
+ "ir-transmitter",
9112
9113
  "keychain",
9113
9114
  "keychain-admin",
9114
9115
  "lawn-mower-control",
@@ -9137,6 +9138,7 @@ var CAP_NAMES = Object.freeze([
9137
9138
  "network-link",
9138
9139
  "network-quality",
9139
9140
  "node-certificates",
9141
+ "node-removal-hook",
9140
9142
  "nodes",
9141
9143
  "notification-output",
9142
9144
  "notification-rules",
@@ -9167,6 +9169,7 @@ var CAP_NAMES = Object.freeze([
9167
9169
  "recording-onboard",
9168
9170
  "recording-signal",
9169
9171
  "records",
9172
+ "remote",
9170
9173
  "running-state",
9171
9174
  "scene-monitor",
9172
9175
  "script-runner",
@@ -9190,6 +9193,7 @@ var CAP_NAMES = Object.freeze([
9190
9193
  "system",
9191
9194
  "tamper",
9192
9195
  "temperature-sensor",
9196
+ "template",
9193
9197
  "terminal-session",
9194
9198
  "toast",
9195
9199
  "training",
@@ -10130,6 +10134,11 @@ Object.freeze({
10130
10134
  "standby"
10131
10135
  ]
10132
10136
  },
10137
+ {
10138
+ "path": "stateSource",
10139
+ "valueType": "enum",
10140
+ "enumValues": ["reported", "assumed"]
10141
+ },
10133
10142
  {
10134
10143
  "path": "volumeLevel",
10135
10144
  "valueType": "number"
@@ -10356,6 +10365,11 @@ Object.freeze({
10356
10365
  "path": "batteryPower",
10357
10366
  "valueType": "number"
10358
10367
  },
10368
+ {
10369
+ "path": "powerSource",
10370
+ "valueType": "enum",
10371
+ "enumValues": ["mains", "battery"]
10372
+ },
10359
10373
  {
10360
10374
  "path": "desiccantLeftDays",
10361
10375
  "valueType": "number"
@@ -10400,6 +10414,18 @@ Object.freeze({
10400
10414
  {
10401
10415
  "path": "volume",
10402
10416
  "valueType": "number"
10417
+ },
10418
+ {
10419
+ "path": "lastFeedGrams",
10420
+ "valueType": "number"
10421
+ },
10422
+ {
10423
+ "path": "lastFeedHopper1",
10424
+ "valueType": "number"
10425
+ },
10426
+ {
10427
+ "path": "lastFeedHopper2",
10428
+ "valueType": "number"
10403
10429
  }
10404
10430
  ],
10405
10431
  "power-meter": [
@@ -10941,7 +10967,7 @@ Object.freeze({
10941
10967
  * can answer "may a rule actuate this?" without importing the schema barrel
10942
10968
  * (~144MB RSS per runner, D28).
10943
10969
  *
10944
- * Coverage: 95 device-scoped capabilities.
10970
+ * Coverage: 96 device-scoped capabilities.
10945
10971
  */
10946
10972
  var DEVICE_SCOPED_CAPS = new Set([
10947
10973
  "accessories",
@@ -10991,6 +11017,7 @@ var DEVICE_SCOPED_CAPS = new Set([
10991
11017
  "image",
10992
11018
  "image-settings",
10993
11019
  "intercom",
11020
+ "ir-transmitter",
10994
11021
  "lawn-mower-control",
10995
11022
  "lock-control",
10996
11023
  "media-player",
@@ -11084,7 +11111,7 @@ function sleep(ms) {
11084
11111
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
11085
11112
  }
11086
11113
  //#endregion
11087
- //#region ../types/dist/err-msg-DIorGYeC.mjs
11114
+ //#region ../types/dist/err-msg-BCdlR2Li.mjs
11088
11115
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
11089
11116
  DeviceType["Camera"] = "camera";
11090
11117
  DeviceType["Hub"] = "hub";
@@ -11430,6 +11457,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
11430
11457
  /** Fallback when the notifier service name doesn't match a known
11431
11458
  * pattern. */
11432
11459
  DeviceRole["GenericNotifier"] = "generic-notifier";
11460
+ /** Emits a pulse train (infrared or RF) on request — the `ir-transmitter`
11461
+ * cap. A `DeviceType.Generic` device. */
11462
+ DeviceRole["IrTransmitter"] = "ir-transmitter";
11433
11463
  return DeviceRole;
11434
11464
  }({});
11435
11465
  /**
@@ -11443,7 +11473,7 @@ function errMsg(err) {
11443
11473
  return String(err);
11444
11474
  }
11445
11475
  //#endregion
11446
- //#region ../types/dist/composition-DwA0uVW5.mjs
11476
+ //#region ../types/dist/composition-bIBW5_13.mjs
11447
11477
  /**
11448
11478
  * Deterministic SHA-256 hash of an arbitrary serialisable value. The
11449
11479
  * canonical form sorts object keys alphabetically at every depth so two
@@ -17814,9 +17844,21 @@ var AlertSeveritySchema = _enum([
17814
17844
  "error",
17815
17845
  "critical"
17816
17846
  ]);
17847
+ /**
17848
+ * An action that RUNS something instead of going somewhere: the admin UI calls
17849
+ * the addon's custom action (`addons.custom`) with exactly these fields. The
17850
+ * producer owns the meaning; the UI knows nothing about the addon or the kind.
17851
+ */
17852
+ var AlertActionInvokeSchema = object({
17853
+ addonId: string().min(1),
17854
+ action: string().min(1),
17855
+ input: record(string(), unknown()).optional()
17856
+ });
17857
+ /** An action has `href` (a link) OR `invoke` (a button that runs a custom action). */
17817
17858
  var AlertActionSchema = object({
17818
17859
  label: string(),
17819
17860
  href: string().optional(),
17861
+ invoke: AlertActionInvokeSchema.optional(),
17820
17862
  /**
17821
17863
  * How `href` is followed. Absent / `app`: an admin-ui route (client-side).
17822
17864
  * `server`: a route the HUB serves (an addon HTTP route such as an OAuth
@@ -44258,6 +44300,14 @@ var embeddingEncoderCapability = {
44258
44300
  })
44259
44301
  }
44260
44302
  };
44303
+ method(object({
44304
+ nodeId: string().min(1),
44305
+ /** Epoch ms the node was forgotten (the tombstone's `removedAt`). */
44306
+ removedAt: number()
44307
+ }), object({ counts: record(string(), number().int().nonnegative()) }), {
44308
+ kind: "mutation",
44309
+ auth: "admin"
44310
+ });
44261
44311
  /**
44262
44312
  * `device-removal-hook` — the reliable way an addon learns a device was DELETED,
44263
44313
  * so it can delete what it keeps for that device (D865).
@@ -45027,6 +45077,17 @@ var LlmProfileSchema = object({
45027
45077
  * field in its editor only when its descriptor lists it in `profileFields`. */
45028
45078
  topK: number().int().positive().optional(),
45029
45079
  maxTokens: number().int().positive().optional(),
45080
+ /** How hard the model "thinks" before it answers. Omitted = the model's own
45081
+ * default. `off` matters for structured output: a thinking model can spend
45082
+ * the whole completion on reasoning and return an empty `content`. Carried
45083
+ * only by the wires that have it — a kind offers the field in its editor
45084
+ * only when its descriptor lists it in `profileFields`. */
45085
+ reasoningEffort: _enum([
45086
+ "off",
45087
+ "low",
45088
+ "medium",
45089
+ "high"
45090
+ ]).optional(),
45030
45091
  /** Prompt context window. Advisory for cloud kinds (they enforce their own). */
45031
45092
  contextLength: number().int().positive().optional(),
45032
45093
  /** Default system prompt. A caller's `system` REPLACES it (never appends —
@@ -45065,6 +45126,7 @@ var LlmProfileFieldSchema = _enum([
45065
45126
  "topP",
45066
45127
  "topK",
45067
45128
  "maxTokens",
45129
+ "reasoningEffort",
45068
45130
  "contextLength",
45069
45131
  "systemPrompt",
45070
45132
  "timeoutMs",
@@ -61775,11 +61837,373 @@ onBrightnessChanged: { data: object({
61775
61837
  minIntervalMs: 0
61776
61838
  } } }
61777
61839
  };
61840
+ /**
61841
+ * The role vocabulary of a remote (D963): what a button MEANS, independent of
61842
+ * how it is wired. A layout template places buttons by role; a device binds a
61843
+ * role to an action; an exporter asks for a role by name. Roles are shared so
61844
+ * one layout fits every appliance and one voice command fits every binding.
61845
+ *
61846
+ * A role outside this list is `custom:<key>` — the operator's own button (a
61847
+ * SmartIR source, a channel preset). The key is a lowercase slug.
61848
+ */
61849
+ var REMOTE_KNOWN_ROLES = [
61850
+ "power",
61851
+ "power_on",
61852
+ "power_off",
61853
+ "volume_up",
61854
+ "volume_down",
61855
+ "mute",
61856
+ "channel_up",
61857
+ "channel_down",
61858
+ "up",
61859
+ "down",
61860
+ "left",
61861
+ "right",
61862
+ "ok",
61863
+ "back",
61864
+ "home",
61865
+ "menu",
61866
+ "info",
61867
+ "guide",
61868
+ "exit",
61869
+ "input",
61870
+ "play",
61871
+ "pause",
61872
+ "play_pause",
61873
+ "stop",
61874
+ "next",
61875
+ "previous",
61876
+ "fast_forward",
61877
+ "rewind",
61878
+ "digit_0",
61879
+ "digit_1",
61880
+ "digit_2",
61881
+ "digit_3",
61882
+ "digit_4",
61883
+ "digit_5",
61884
+ "digit_6",
61885
+ "digit_7",
61886
+ "digit_8",
61887
+ "digit_9"
61888
+ ];
61889
+ var CUSTOM_KEY_RE = /^[a-z0-9][a-z0-9_]{0,47}$/;
61890
+ var KNOWN_ROLES = new Set(REMOTE_KNOWN_ROLES);
61891
+ function isRemoteKnownRole(value) {
61892
+ return KNOWN_ROLES.has(value);
61893
+ }
61894
+ function isRemoteCustomKey(key) {
61895
+ return CUSTOM_KEY_RE.test(key);
61896
+ }
61897
+ /** The key of a `custom:<key>` role, or null for any other string. */
61898
+ function customKeyOfRole(role) {
61899
+ if (!role.startsWith("custom:")) return null;
61900
+ const key = role.slice(7);
61901
+ return isRemoteCustomKey(key) ? key : null;
61902
+ }
61903
+ function isRemoteRole(value) {
61904
+ return isRemoteKnownRole(value) || customKeyOfRole(value) !== null;
61905
+ }
61906
+ var RemoteRoleSchema = string().refine(isRemoteRole, { message: "a role is one of the known roles or custom:<key> (lowercase letters, digits, _)" });
61907
+ var RemoteBindingSchema = object({ action: AutomationCapStepSchema.extend({ deviceId: number().int().nonnegative() }) });
61908
+ var RemoteCustomButtonSchema = object({
61909
+ /** The slug after `custom:` in the role. */
61910
+ key: string().refine(isRemoteCustomKey, { message: "a lowercase slug" }),
61911
+ /** What the operator calls it, and what a voice command may name. */
61912
+ name: string().min(1).max(60)
61913
+ });
61914
+ var RemotePowerModeSchema = _enum(["toggle", "discrete"]);
61915
+ var RemoteConfigSchema = object({
61916
+ layoutTemplateId: string().min(1).nullable(),
61917
+ /**
61918
+ * The transmitter device new bindings and an import send through. A binding
61919
+ * names its own device, so one command may override it.
61920
+ */
61921
+ defaultTransmitterId: number().int().nonnegative().nullable().default(null),
61922
+ /** Keyed by role. A role with no entry falls back to the native cap. */
61923
+ bindings: record(string(), RemoteBindingSchema),
61924
+ customButtons: array(RemoteCustomButtonSchema).max(100),
61925
+ power: object({ mode: RemotePowerModeSchema })
61926
+ }).superRefine((config, ctx) => {
61927
+ const roles = Object.keys(config.bindings);
61928
+ if (roles.length > 200) ctx.addIssue({
61929
+ code: "custom",
61930
+ message: "too many bindings",
61931
+ path: ["bindings"]
61932
+ });
61933
+ for (const role of roles) if (!isRemoteRole(role)) ctx.addIssue({
61934
+ code: "custom",
61935
+ message: `"${role}" is not a role`,
61936
+ path: ["bindings", role]
61937
+ });
61938
+ const keys = /* @__PURE__ */ new Set();
61939
+ config.customButtons.forEach((button, index) => {
61940
+ if (keys.has(button.key)) ctx.addIssue({
61941
+ code: "custom",
61942
+ message: `custom button "${button.key}" is listed twice`,
61943
+ path: [
61944
+ "customButtons",
61945
+ index,
61946
+ "key"
61947
+ ]
61948
+ });
61949
+ keys.add(button.key);
61950
+ });
61951
+ for (const role of roles) {
61952
+ const key = customKeyOfRole(role);
61953
+ if (key !== null && !keys.has(key)) ctx.addIssue({
61954
+ code: "custom",
61955
+ message: `${role} is bound but has no entry in customButtons`,
61956
+ path: ["bindings", role]
61957
+ });
61958
+ }
61959
+ });
61960
+ object({
61961
+ power: object({
61962
+ state: _enum(["on", "off"]),
61963
+ at: number()
61964
+ }).nullable(),
61965
+ muted: object({
61966
+ value: boolean(),
61967
+ at: number()
61968
+ }).nullable()
61969
+ });
61970
+ var RemoteLayoutButtonSchema = object({
61971
+ id: string().min(1).max(40),
61972
+ /** 0-based grid position. */
61973
+ row: number().int().min(0).max(24),
61974
+ col: number().int().min(0).max(24),
61975
+ rowSpan: number().int().min(1).max(24),
61976
+ colSpan: number().int().min(1).max(24),
61977
+ icon: string().min(1).max(60).optional(),
61978
+ label: string().min(1).max(40).optional(),
61979
+ role: RemoteRoleSchema
61980
+ });
61981
+ object({
61982
+ columns: number().int().min(1).max(24),
61983
+ rows: number().int().min(1).max(24),
61984
+ buttons: array(RemoteLayoutButtonSchema).max(200)
61985
+ }).superRefine((grid, ctx) => {
61986
+ const ids = /* @__PURE__ */ new Set();
61987
+ const taken = /* @__PURE__ */ new Map();
61988
+ grid.buttons.forEach((button, index) => {
61989
+ if (ids.has(button.id)) ctx.addIssue({
61990
+ code: "custom",
61991
+ message: `button id "${button.id}" is used twice`,
61992
+ path: [
61993
+ "buttons",
61994
+ index,
61995
+ "id"
61996
+ ]
61997
+ });
61998
+ ids.add(button.id);
61999
+ if (button.row + button.rowSpan > grid.rows || button.col + button.colSpan > grid.columns) {
62000
+ ctx.addIssue({
62001
+ code: "custom",
62002
+ message: `button "${button.id}" leaves the grid`,
62003
+ path: ["buttons", index]
62004
+ });
62005
+ return;
62006
+ }
62007
+ for (let r = button.row; r < button.row + button.rowSpan; r += 1) for (let c = button.col; c < button.col + button.colSpan; c += 1) {
62008
+ const cell = `${r}:${c}`;
62009
+ const other = taken.get(cell);
62010
+ if (other !== void 0) {
62011
+ ctx.addIssue({
62012
+ code: "custom",
62013
+ message: `buttons "${other}" and "${button.id}" overlap`,
62014
+ path: ["buttons", index]
62015
+ });
62016
+ return;
62017
+ }
62018
+ taken.set(cell, button.id);
62019
+ }
62020
+ });
62021
+ });
62022
+ var RemoteBoundCommandSchema = object({
62023
+ role: RemoteRoleSchema,
62024
+ /** The operator's name for a custom button; absent for a known role. */
62025
+ label: string().optional(),
62026
+ custom: boolean()
62027
+ });
62028
+ var RemoteCommandListSchema = object({
62029
+ layoutTemplateId: string().nullable(),
62030
+ power: object({ mode: RemotePowerModeSchema }),
62031
+ /** Only the roles that are BOUND — the ones a press can reach. */
62032
+ commands: array(RemoteBoundCommandSchema)
62033
+ });
62034
+ var RemoteRefusalReasonSchema = _enum([
62035
+ "no-remote",
62036
+ "unbound-role",
62037
+ "action-failed"
62038
+ ]);
62039
+ var RemoteSendResultSchema = discriminatedUnion("status", [
62040
+ object({
62041
+ status: literal("sent"),
62042
+ /** How many times the action ran. */
62043
+ sends: number().int().min(1)
62044
+ }),
62045
+ object({
62046
+ status: literal("skipped"),
62047
+ reason: literal("already-in-state")
62048
+ }),
62049
+ object({
62050
+ status: literal("refused"),
62051
+ reason: RemoteRefusalReasonSchema,
62052
+ detail: string().optional()
62053
+ })
62054
+ ]);
62055
+ var RemoteMediaCommandSchema = _enum([
62056
+ "play",
62057
+ "pause",
62058
+ "stop",
62059
+ "next",
62060
+ "previous",
62061
+ "setMute",
62062
+ "selectSource"
62063
+ ]);
62064
+ /** A send result, or `not-routed`: the role is not bound, so the native cap answers. */
62065
+ var RemoteMediaCommandResultSchema = discriminatedUnion("status", [...RemoteSendResultSchema.options, object({ status: literal("not-routed") })]);
62066
+ var RemoteSetConfigResultSchema = discriminatedUnion("status", [object({ status: literal("saved") }), object({
62067
+ status: literal("refused"),
62068
+ reason: _enum(["unknown-template", "not-a-media-player"]),
62069
+ detail: string()
62070
+ })]);
62071
+ var deviceInput = object({ deviceId: number().int().nonnegative() });
62072
+ DeviceType.MediaPlayer;
62073
+ method(deviceInput, RemoteConfigSchema, { auth: "admin" }), method(deviceInput.extend({ config: RemoteConfigSchema }), RemoteSetConfigResultSchema, {
62074
+ kind: "mutation",
62075
+ auth: "admin"
62076
+ }), method(deviceInput, RemoteCommandListSchema, { auth: "protected" }), method(deviceInput.extend({
62077
+ role: RemoteRoleSchema,
62078
+ /** Sends in a row (volume steps). */
62079
+ repeat: number().int().min(1).max(50).default(1)
62080
+ }), RemoteSendResultSchema, {
62081
+ kind: "mutation",
62082
+ auth: "protected"
62083
+ }), method(deviceInput.extend({
62084
+ command: RemoteMediaCommandSchema,
62085
+ muted: boolean().optional(),
62086
+ source: string().optional(),
62087
+ repeat: number().int().min(1).max(50).default(1)
62088
+ }), RemoteMediaCommandResultSchema, {
62089
+ kind: "mutation",
62090
+ auth: "protected"
62091
+ });
62092
+ var TemplateKindSchema = _enum(["remote"]);
62093
+ /**
62094
+ * template — the generic store of reusable, named operator data (D963). A
62095
+ * record is `{ id, kind, name, payload }`; the kinds (today only `remote`, the
62096
+ * button grid of a remote) and the schema each payload must satisfy are
62097
+ * declared by the system in `template-kinds.ts`. Nothing here is specific to a
62098
+ * kind: the engine validates a payload against its kind's schema and, on a
62099
+ * delete, asks the kind's owner whether anything still points at the record.
62100
+ *
62101
+ * Every refusal is a typed result — a UI says "unknown kind" or names the
62102
+ * devices that still use a template, without parsing text.
62103
+ */
62104
+ var TemplateRecordSchema = object({
62105
+ id: string().min(1),
62106
+ kind: TemplateKindSchema,
62107
+ name: string().min(1).max(120),
62108
+ /** Shaped by the kind; `checkTemplatePayload(kind, payload)` reads it. */
62109
+ payload: unknown(),
62110
+ createdAt: number(),
62111
+ updatedAt: number()
62112
+ });
62113
+ var TemplateWriteResultSchema = discriminatedUnion("status", [object({
62114
+ status: literal("saved"),
62115
+ template: TemplateRecordSchema
62116
+ }), object({
62117
+ status: literal("refused"),
62118
+ reason: _enum(["invalid-payload", "not-found"]),
62119
+ detail: string()
62120
+ })]);
62121
+ /** A device still pointing at a template. */
62122
+ var TemplateUserSchema = object({
62123
+ deviceId: number().int().nonnegative(),
62124
+ name: string()
62125
+ });
62126
+ var TemplateDeleteResultSchema = discriminatedUnion("status", [
62127
+ object({ status: literal("deleted") }),
62128
+ object({ status: literal("not-found") }),
62129
+ object({
62130
+ status: literal("in-use"),
62131
+ devices: array(TemplateUserSchema).min(1)
62132
+ })
62133
+ ]);
62134
+ method(object({ kind: TemplateKindSchema.optional() }), array(TemplateRecordSchema), { auth: "protected" }), method(object({ id: string().min(1) }), TemplateRecordSchema.nullable(), { auth: "protected" }), method(object({
62135
+ kind: TemplateKindSchema,
62136
+ name: string().min(1).max(120),
62137
+ payload: unknown()
62138
+ }), TemplateWriteResultSchema, {
62139
+ kind: "mutation",
62140
+ auth: "admin"
62141
+ }), method(object({
62142
+ id: string().min(1),
62143
+ name: string().min(1).max(120).optional(),
62144
+ payload: unknown().optional()
62145
+ }), TemplateWriteResultSchema, {
62146
+ kind: "mutation",
62147
+ auth: "admin"
62148
+ }), method(object({ id: string().min(1) }), TemplateDeleteResultSchema, {
62149
+ kind: "mutation",
62150
+ auth: "admin"
62151
+ });
61778
62152
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
61779
62153
  kind: "mutation",
61780
62154
  auth: "protected"
61781
62155
  });
61782
62156
  /**
62157
+ * A pulse train in signed microseconds: mark (+) first, then space (-), strictly
62158
+ * alternating, no zeros, 2..1024 entries.
62159
+ */
62160
+ var IrTimingsSchema = array(number().int()).min(2).max(1024).superRefine((timings, ctx) => {
62161
+ timings.forEach((value, index) => {
62162
+ const expectMark = index % 2 === 0;
62163
+ if (value === 0 || value > 0 !== expectMark) ctx.addIssue({
62164
+ code: "custom",
62165
+ message: `timing ${index} must be a non-zero ${expectMark ? "mark (positive)" : "space (negative)"}`,
62166
+ path: [index]
62167
+ });
62168
+ });
62169
+ });
62170
+ /** Per-command transmit options. Every key is optional; a transmitter applies what it can. */
62171
+ var TransmitSettingsSchema = object({
62172
+ carrierHz: number().int().positive().optional(),
62173
+ dutyCyclePercent: number().int().min(1).max(100).optional(),
62174
+ repeat: number().int().min(0).max(20).optional(),
62175
+ repeatDelayMs: number().int().min(0).optional()
62176
+ });
62177
+ /** The setting keys a transmitter may declare as settable (`getInfo.settable`). */
62178
+ var TransmitSettingKeySchema = _enum([
62179
+ "carrierHz",
62180
+ "dutyCyclePercent",
62181
+ "repeat",
62182
+ "repeatDelayMs"
62183
+ ]);
62184
+ var IrMediumSchema = _enum(["ir", "rf"]);
62185
+ var IrSendResultSchema = object({
62186
+ ok: literal(true),
62187
+ /** Settings the transmitter could not apply; the train was still sent. */
62188
+ ignoredSettings: array(string())
62189
+ });
62190
+ var IrTransmitterInfoSchema = object({
62191
+ media: array(IrMediumSchema),
62192
+ settable: array(TransmitSettingKeySchema),
62193
+ maxTimings: number().int().positive()
62194
+ });
62195
+ DeviceType.Generic, method(object({
62196
+ deviceId: number().int().nonnegative(),
62197
+ timings: IrTimingsSchema,
62198
+ settings: TransmitSettingsSchema.optional()
62199
+ }), IrSendResultSchema, {
62200
+ kind: "mutation",
62201
+ auth: "protected"
62202
+ }), method(object({ deviceId: number().int().nonnegative() }), IrTransmitterInfoSchema, {
62203
+ kind: "query",
62204
+ auth: "protected"
62205
+ });
62206
+ /**
61783
62207
  * `calendar-source` — collection cap exposing per-provider calendars and
61784
62208
  * their events. Every addon that contributes calendars (Home Assistant,
61785
62209
  * a future Google Calendar addon, …) registers a provider here. The hub
@@ -66000,9 +66424,35 @@ var MediaInfoSchema = object({
66000
66424
  /** Optional cover-art / thumbnail URL. */
66001
66425
  imageUrl: string().optional()
66002
66426
  });
66427
+ /**
66428
+ * Where `state`, `volumeLevel`, `isMuted` and `source` come from. `reported`:
66429
+ * the device said so. `assumed`: the driver has no feedback (infrared) and
66430
+ * tracks what it last SENT; it moves only after a send was accepted, and a
66431
+ * human at the real remote makes it wrong. A UI shows an assumed value as a
66432
+ * guess, never as a reading.
66433
+ */
66434
+ var MediaPlayerStateSourceSchema = _enum(["reported", "assumed"]);
66435
+ /** The fields of a media-player status a driver can only guess. */
66436
+ var MediaPlayerAssumedFieldSchema = _enum([
66437
+ "state",
66438
+ "volumeLevel",
66439
+ "isMuted",
66440
+ "source"
66441
+ ]);
66003
66442
  var MediaPlayerStatusSchema = object({
66004
66443
  /** Playback lifecycle state. */
66005
66444
  state: MediaPlayerStateSchema,
66445
+ /**
66446
+ * Whether the state fields are readings or the driver's own bookkeeping.
66447
+ * A slice written before this field existed parses as `reported`.
66448
+ */
66449
+ stateSource: MediaPlayerStateSourceSchema.default("reported"),
66450
+ /**
66451
+ * Which fields are the driver's own guess. `stateSource` is `assumed` when
66452
+ * this is not empty; a field not listed here is a reading even then (power
66453
+ * from a running-state source, mute guessed from the last send).
66454
+ */
66455
+ assumedFields: array(MediaPlayerAssumedFieldSchema).default([]),
66006
66456
  /** Volume as 0..100 inclusive. Null when the device has no volume
66007
66457
  * surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
66008
66458
  volumeLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -67955,9 +68405,14 @@ var PetFeederStatusSchema = object({
67955
68405
  * (`device_class: problem`, on = low). True when the tank reports empty,
67956
68406
  * or, on a dual-hopper model, when EITHER hopper is empty. */
67957
68407
  lowFood: boolean(),
67958
- /** Battery charge 0..100 (%). Null on mains-powered models or when the
67959
- * device has no battery reading. */
68408
+ /** Battery charge 0..100 (%). On a feeder running on `mains` this is the
68409
+ * BACKUP battery's charge, not the power source. Null when the device has
68410
+ * no battery reading. */
67960
68411
  batteryPower: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
68412
+ /** What the feeder is powered from right now: `mains` (plugged in, the
68413
+ * battery is only a backup) or `battery`. Null when the device does not
68414
+ * report it. */
68415
+ powerSource: _enum(["mains", "battery"]).nullable(),
67961
68416
  /**
67962
68417
  * Desiccant life remaining, stored in seconds (duration base, D944).
67963
68418
  * Providers convert from the days the feeder reports. Null when the
@@ -67985,6 +68440,14 @@ var PetFeederStatusSchema = object({
67985
68440
  feedSound: boolean(),
67986
68441
  /** Speaker / prompt volume level (device-scaled integer). */
67987
68442
  volume: number().meta(readingMeta("none")),
68443
+ /** Portion (grams) of the last manual feed sent from a single-hopper
68444
+ * stepper — the default the next manual feed starts from. Persisted per
68445
+ * device by the provider; null until a manual feed has been sent. */
68446
+ lastFeedGrams: gramsPortion.nullable(),
68447
+ /** Hopper-1 portion of the last manual feed (dual-hopper); null until sent. */
68448
+ lastFeedHopper1: gramsPortion.nullable(),
68449
+ /** Hopper-2 portion of the last manual feed (dual-hopper); null until sent. */
68450
+ lastFeedHopper2: gramsPortion.nullable(),
67988
68451
  /** Ms epoch when the slice was last refreshed from the cloud. */
67989
68452
  lastFetchedAt: number()
67990
68453
  });
@@ -74107,9 +74570,17 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
74107
74570
  kind: "mutation",
74108
74571
  auth: "admin"
74109
74572
  });
74573
+ discriminatedUnion("kind", [object({
74574
+ kind: literal("raw"),
74575
+ timings: array(number().int()),
74576
+ settings: TransmitSettingsSchema.optional()
74577
+ }), object({
74578
+ kind: literal("pronto"),
74579
+ code: string()
74580
+ })]);
74110
74581
  DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
74111
74582
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
74112
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
74583
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
74113
74584
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
74114
74585
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
74115
74586
  new Set(CAP_NAMES);
@@ -78832,6 +79303,20 @@ Object.freeze({
78832
79303
  access: "create",
78833
79304
  role: "viewer"
78834
79305
  },
79306
+ "irTransmitter.getInfo": {
79307
+ capName: "ir-transmitter",
79308
+ capScope: "device",
79309
+ addonId: null,
79310
+ access: "view",
79311
+ role: "viewer"
79312
+ },
79313
+ "irTransmitter.send": {
79314
+ capName: "ir-transmitter",
79315
+ capScope: "device",
79316
+ addonId: null,
79317
+ access: "create",
79318
+ role: "viewer"
79319
+ },
78835
79320
  "keychain.delete": {
78836
79321
  capName: "keychain",
78837
79322
  capScope: "system",
@@ -80064,6 +80549,13 @@ Object.freeze({
80064
80549
  access: "create",
80065
80550
  role: "admin"
80066
80551
  },
80552
+ "nodeRemovalHook.onNodeRemoved": {
80553
+ capName: "node-removal-hook",
80554
+ capScope: "system",
80555
+ addonId: null,
80556
+ access: "create",
80557
+ role: "admin"
80558
+ },
80067
80559
  "nodes.clusterAddonStatus": {
80068
80560
  capName: "nodes",
80069
80561
  capScope: "system",
@@ -82955,6 +83447,41 @@ Object.freeze({
82955
83447
  access: "create",
82956
83448
  role: "admin"
82957
83449
  },
83450
+ "remote.getConfig": {
83451
+ capName: "remote",
83452
+ capScope: "system",
83453
+ addonId: null,
83454
+ access: "view",
83455
+ role: "admin"
83456
+ },
83457
+ "remote.listCommands": {
83458
+ capName: "remote",
83459
+ capScope: "system",
83460
+ addonId: null,
83461
+ access: "view",
83462
+ role: "admin"
83463
+ },
83464
+ "remote.sendCommand": {
83465
+ capName: "remote",
83466
+ capScope: "system",
83467
+ addonId: null,
83468
+ access: "create",
83469
+ role: "admin"
83470
+ },
83471
+ "remote.sendMediaCommand": {
83472
+ capName: "remote",
83473
+ capScope: "system",
83474
+ addonId: null,
83475
+ access: "create",
83476
+ role: "admin"
83477
+ },
83478
+ "remote.setConfig": {
83479
+ capName: "remote",
83480
+ capScope: "system",
83481
+ addonId: null,
83482
+ access: "create",
83483
+ role: "admin"
83484
+ },
82958
83485
  "runningState.getStatus": {
82959
83486
  capName: "running-state",
82960
83487
  capScope: "device",
@@ -84145,6 +84672,41 @@ Object.freeze({
84145
84672
  access: "view",
84146
84673
  role: "viewer"
84147
84674
  },
84675
+ "template.create": {
84676
+ capName: "template",
84677
+ capScope: "system",
84678
+ addonId: null,
84679
+ access: "create",
84680
+ role: "admin"
84681
+ },
84682
+ "template.delete": {
84683
+ capName: "template",
84684
+ capScope: "system",
84685
+ addonId: null,
84686
+ access: "delete",
84687
+ role: "admin"
84688
+ },
84689
+ "template.get": {
84690
+ capName: "template",
84691
+ capScope: "system",
84692
+ addonId: null,
84693
+ access: "view",
84694
+ role: "admin"
84695
+ },
84696
+ "template.list": {
84697
+ capName: "template",
84698
+ capScope: "system",
84699
+ addonId: null,
84700
+ access: "view",
84701
+ role: "admin"
84702
+ },
84703
+ "template.update": {
84704
+ capName: "template",
84705
+ capScope: "system",
84706
+ addonId: null,
84707
+ access: "create",
84708
+ role: "admin"
84709
+ },
84148
84710
  "terminalSession.adoptLegacyMonitor": {
84149
84711
  capName: "terminal-session",
84150
84712
  capScope: "system",
@@ -86455,6 +87017,11 @@ var ACTUATOR_CAP_VOCABULARY = {
86455
87017
  icon: "circle-dot"
86456
87018
  }]
86457
87019
  },
87020
+ "ir-transmitter": {
87021
+ scope: "device",
87022
+ noun: t("IR / RF transmitter", "Trasmettitore IR / RF"),
87023
+ notOperatorFacing: { send: "a raw pulse train is not something an operator composes in an automation; the remote that owns the command table sends it" }
87024
+ },
86458
87025
  control: {
86459
87026
  scope: "device",
86460
87027
  noun: t("Control", "Controllo"),
@@ -88932,6 +89499,7 @@ var SYSTEM_CAP_VOCABULARY = {
88932
89499
  "device-manager": system("the device registry itself — rename, move and remove are administration"),
88933
89500
  "device-provider": system(INTERNAL),
88934
89501
  "device-removal-hook": system(INTERNAL),
89502
+ "node-removal-hook": system(INTERNAL),
88935
89503
  "device-state": system("the runtime-state mirror every trigger already reads through"),
88936
89504
  "display-palette": system("the cluster display palette — one colour table for every client, not a device action"),
88937
89505
  "embedding-encoder": system(ML),
@@ -88971,6 +89539,7 @@ var SYSTEM_CAP_VOCABULARY = {
88971
89539
  "recording-archive": system(STORAGE),
88972
89540
  "recording-export": system("recording exports — requested from the timeline, not an automation step"),
88973
89541
  records: system(INTERNAL),
89542
+ remote: system("the per-device remote setup — authored in the Customize remote editor, sent through the remote UI"),
88974
89543
  "server-management": system(CLUSTER),
88975
89544
  "settings-store": system(INTERNAL),
88976
89545
  "smtp-provider": system(INTERNAL),
@@ -88983,6 +89552,7 @@ var SYSTEM_CAP_VOCABULARY = {
88983
89552
  "storage-provider": system(STORAGE),
88984
89553
  "stream-broker": system(PIPELINE),
88985
89554
  system: system(CLUSTER),
89555
+ template: system("operator-authored templates — edited in their own editor, never actuated"),
88986
89556
  "terminal-session": system(CLUSTER),
88987
89557
  toast: system(UI_PLUMBING),
88988
89558
  training: system(ML),
@@ -90174,6 +90744,16 @@ Object.freeze({
90174
90744
  form: "single",
90175
90745
  optional: false
90176
90746
  }],
90747
+ "irTransmitter.getInfo": [{
90748
+ name: "deviceId",
90749
+ form: "single",
90750
+ optional: false
90751
+ }],
90752
+ "irTransmitter.send": [{
90753
+ name: "deviceId",
90754
+ form: "single",
90755
+ optional: false
90756
+ }],
90177
90757
  "keychain.deleteDeviceScope": [{
90178
90758
  name: "deviceId",
90179
90759
  form: "single",
@@ -91399,6 +91979,31 @@ Object.freeze({
91399
91979
  form: "single",
91400
91980
  optional: true
91401
91981
  }],
91982
+ "remote.getConfig": [{
91983
+ name: "deviceId",
91984
+ form: "single",
91985
+ optional: false
91986
+ }],
91987
+ "remote.listCommands": [{
91988
+ name: "deviceId",
91989
+ form: "single",
91990
+ optional: false
91991
+ }],
91992
+ "remote.sendCommand": [{
91993
+ name: "deviceId",
91994
+ form: "single",
91995
+ optional: false
91996
+ }],
91997
+ "remote.sendMediaCommand": [{
91998
+ name: "deviceId",
91999
+ form: "single",
92000
+ optional: false
92001
+ }],
92002
+ "remote.setConfig": [{
92003
+ name: "deviceId",
92004
+ form: "single",
92005
+ optional: false
92006
+ }],
91402
92007
  "runningState.getStatus": [{
91403
92008
  name: "deviceId",
91404
92009
  form: "single",
@@ -96768,6 +97373,14 @@ function armRemovalReconcile(opts) {
96768
97373
  timer.unref?.();
96769
97374
  return () => clearInterval(timer);
96770
97375
  }
97376
+ object({
97377
+ manufacturer: string().optional(),
97378
+ supportedModels: array(string()).optional(),
97379
+ supportedController: string().optional(),
97380
+ commandsEncoding: string(),
97381
+ delay: number().nonnegative().optional(),
97382
+ commands: record(string(), unknown())
97383
+ });
96771
97384
  //#endregion
96772
97385
  //#region src/pipeline-analytics/cluster-model-pin.ts
96773
97386
  /**