@camstack/addon-export-hap 1.2.152 → 1.2.154

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.
@@ -5419,7 +5419,7 @@ var ZodIssueCode = {
5419
5419
  var ZodFirstPartyTypeKind;
5420
5420
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5421
5421
  //#endregion
5422
- //#region ../types/dist/sleep-BNeXenvr.mjs
5422
+ //#region ../types/dist/sleep-B0JG7-_F.mjs
5423
5423
  /**
5424
5424
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5425
5425
  * window to float samples (D455).
@@ -15793,6 +15793,10 @@ var DeviceInfoSchema = object({
15793
15793
  isCamera: boolean(),
15794
15794
  /** Current config values — serializable snapshot */
15795
15795
  config: record(string(), unknown()),
15796
+ /** Paths inside `config` the device's schema declares secret (D783) —
15797
+ * what the non-admin redaction withholds. Paths, never values. Absent
15798
+ * when the owning runner has not reported them. */
15799
+ secretConfigPaths: array(string()).optional(),
15796
15800
  /** Hardware + identity blob (manufacturer / model / firmware / sn /
15797
15801
  * uid / mac / …). Populated by drivers; editable via setMetadata. */
15798
15802
  metadata: record(string(), unknown()).nullable().optional(),
@@ -15998,7 +16002,13 @@ var DeviceRegisterPayloadSchema = object({
15998
16002
  * call (workers re-register on init), so probe-driven updates
15999
16003
  * (e.g. PTZ flag flipping after the abilities probe) propagate. */
16000
16004
  features: array(string()).optional(),
16001
- config: record(string(), unknown())
16005
+ config: record(string(), unknown()),
16006
+ /** Config paths the device's own schema DECLARES secret
16007
+ * (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
16008
+ * `connection.password`). Re-published on every register; the non-admin
16009
+ * redaction withholds them at any depth (D783). Optional: an older runner
16010
+ * omits it and the keyword backstop applies. */
16011
+ secretConfigPaths: array(string()).optional()
16002
16012
  });
16003
16013
  var DeviceRemovePayloadSchema = object({ deviceId: number() });
16004
16014
  var DevicePersistConfigPayloadSchema = object({
@@ -17657,7 +17667,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
17657
17667
  icon: string().optional(),
17658
17668
  /** Addon-owned HTTP route the button navigates to (GET). */
17659
17669
  startUrl: string(),
17660
- stage: LoginStageEnum
17670
+ stage: LoginStageEnum,
17671
+ /**
17672
+ * The provider names an external identity a signed-in user can link to
17673
+ * their own account (D782): `auth.listLinkableProviders` /
17674
+ * `beginExternalLink` offer exactly the redirect methods that set this,
17675
+ * whatever their id. Absent / false — a login button only (magic-link).
17676
+ */
17677
+ linkable: boolean().optional()
17661
17678
  }),
17662
17679
  object({
17663
17680
  kind: literal("widget"),
@@ -23054,7 +23071,13 @@ var RetrainFrameSchema = object({
23054
23071
  sizeBytes: number().int(),
23055
23072
  width: number().int(),
23056
23073
  height: number().int(),
23057
- copiedAt: number()
23074
+ copiedAt: number(),
23075
+ /** When the CAMERA captured the frame. Absent on a copy taken before D785. */
23076
+ capturedAt: number().optional(),
23077
+ /** The operator's "every subject in this frame is boxed". Detector
23078
+ * evaluation keeps only complete frames: an unboxed subject would count as
23079
+ * a false positive. */
23080
+ complete: boolean()
23058
23081
  });
23059
23082
  /** Why a copy-on-select could not be honoured — named, never a silent skip. */
23060
23083
  var RetrainCopyRefusalSchema = _enum([
@@ -23075,6 +23098,51 @@ var RetrainFrameListSchema = object({
23075
23098
  /** What the page pre-selects — the native key frame when one survives. */
23076
23099
  autoPickMediaId: number().int().optional()
23077
23100
  });
23101
+ /**
23102
+ * Which frames an annotated export carries. Every field narrows; an empty
23103
+ * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
23104
+ * list owned by whoever trains (the training orchestrator), so `frameIds` is
23105
+ * the primitive a version export uses; `batchId` re-selects what an earlier
23106
+ * export carried (`exportedInBatch`).
23107
+ */
23108
+ var RetrainExportFilterSchema = object({
23109
+ deviceIds: array(number()).optional(),
23110
+ frameIds: array(string()).max(2e4).optional(),
23111
+ batchId: string().optional(),
23112
+ /** Only frames the operator marked complete (all subjects boxed). */
23113
+ completeOnly: boolean().optional()
23114
+ });
23115
+ /**
23116
+ * `frames`: the full frame copies, boxes in `annotations.json`.
23117
+ * `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
23118
+ * convention — the classifier layout.
23119
+ */
23120
+ var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
23121
+ /**
23122
+ * Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
23123
+ * the archive, sent chunk by chunk. Covers a presigned PUT and a provider
23124
+ * addon's data-plane upload route alike. Headers are sent verbatim and never
23125
+ * logged.
23126
+ */
23127
+ var RetrainArchiveTargetSchema = object({
23128
+ kind: literal("http"),
23129
+ method: _enum(["PUT", "POST"]),
23130
+ url: string().url(),
23131
+ headers: record(string(), string()).optional()
23132
+ });
23133
+ var RetrainArchiveResultSchema = object({
23134
+ batchId: string(),
23135
+ frames: number().int(),
23136
+ crops: number().int(),
23137
+ annotations: number().int(),
23138
+ /** Frames planned but not shipped (unreadable copy, path too long). */
23139
+ missing: number().int(),
23140
+ bytes: number().int(),
23141
+ /** sha256 of the exact bytes sent. */
23142
+ sha256: string(),
23143
+ /** The target's HTTP status. */
23144
+ status: number().int()
23145
+ });
23078
23146
  /** What the operator asked the assist to look for. */
23079
23147
  var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
23080
23148
  kind: literal("package"),
@@ -23869,9 +23937,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
23869
23937
  }), RetrainTransitionResultSchema, {
23870
23938
  kind: "mutation",
23871
23939
  auth: "admin"
23872
- }), method(object({ deviceIds: array(number()).optional() }), object({ url: string() }), {
23940
+ }), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
23873
23941
  kind: "query",
23874
23942
  auth: "admin"
23943
+ }), method(object({
23944
+ deviceId: number(),
23945
+ trackId: string(),
23946
+ frameId: string(),
23947
+ complete: boolean()
23948
+ }), RetrainFrameSchema, {
23949
+ kind: "mutation",
23950
+ auth: "admin"
23951
+ }), method(object({
23952
+ filter: RetrainExportFilterSchema,
23953
+ layout: RetrainExportLayoutSchema,
23954
+ target: RetrainArchiveTargetSchema
23955
+ }), RetrainArchiveResultSchema, {
23956
+ kind: "mutation",
23957
+ auth: "admin",
23958
+ timeoutMs: 60 * 6e4
23875
23959
  }), method(object({
23876
23960
  /** Which of the three event tables owns the row. */
23877
23961
  ownerType: EventOwnerTypeSchema,
@@ -27161,7 +27245,19 @@ var SsoBridgeClaimsSchema = object({
27161
27245
  * editing a descriptor must not retroactively extend or shorten a link the
27162
27246
  * operator already consented to.
27163
27247
  */
27164
- refreshTtl: union([number().int().positive(), literal("never")]).optional()
27248
+ refreshTtl: union([number().int().positive(), literal("never")]).optional(),
27249
+ /**
27250
+ * Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
27251
+ * that was started from a signed-in user's "Link" button: the finish then
27252
+ * links this identity to the intent's user instead of signing anyone in.
27253
+ * The handle carries no user id — the hub resolves it, single-use.
27254
+ */
27255
+ linkIntent: string().optional(),
27256
+ /**
27257
+ * Verified `iss` of the id_token behind an OIDC login bridge (D782). A
27258
+ * subject is unique only per issuer, so a link is bound to it.
27259
+ */
27260
+ issuer: string().optional()
27165
27261
  });
27166
27262
  method(object({
27167
27263
  claims: SsoBridgeClaimsSchema,
@@ -29260,7 +29356,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
29260
29356
  * field their hints were silently stripped by the schema and the
29261
29357
  * adaptive ladder started blind on the client's display size.
29262
29358
  */
29263
- hints: webrtcClientHintsSchema.optional()
29359
+ hints: webrtcClientHintsSchema.optional(),
29360
+ /**
29361
+ * Talk-back (D771): relay the PEER's audio to the device's speaker
29362
+ * through the `intercom` cap's push-talk triple. When `true` and the
29363
+ * offer lets the peer send audio, the answer's audio is `sendrecv`
29364
+ * and every inbound frame goes to `intercom.pushTalkAudio` for this
29365
+ * `deviceId`; absent/false answers `sendonly`, as for every viewer.
29366
+ *
29367
+ * TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
29368
+ * with `intercom`, when the linked user may control that camera. The
29369
+ * hub STRIPS it from every request-bound call (a browser), exactly as
29370
+ * it overwrites `relayOnly` — a viewer's talk permission is the
29371
+ * intercom cap's own surface (share tokens gate it there), and this
29372
+ * flag must not become a second door to the camera's speaker.
29373
+ */
29374
+ talkback: boolean().optional()
29264
29375
  }), object({
29265
29376
  sessionId: string(),
29266
29377
  sdpAnswer: string()
@@ -29562,6 +29673,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
29562
29673
  var RestartAddonResultSchema = unknown();
29563
29674
  var InstallPackageResultSchema = unknown();
29564
29675
  var ReloadPackagesResultSchema = unknown();
29676
+ /**
29677
+ * What an uninstall did on ONE node.
29678
+ * - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
29679
+ * - `not-installed` — the node did not have it (nothing to do).
29680
+ * - `refused` — protected / bootstrap package; nothing touched.
29681
+ * - `failed` — attempted and did not complete; `error` says why.
29682
+ * - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
29683
+ * back-fill never returns the package, and the stale-addon sweep removes the
29684
+ * copy when the node registers again (only once the hub no longer has it).
29685
+ */
29686
+ var UninstallNodeOutcomeSchema = _enum([
29687
+ "uninstalled",
29688
+ "not-installed",
29689
+ "refused",
29690
+ "failed",
29691
+ "pending-reconnect"
29692
+ ]);
29693
+ var UninstallNodeResultSchema = object({
29694
+ nodeId: string(),
29695
+ outcome: UninstallNodeOutcomeSchema,
29696
+ error: string().optional(),
29697
+ addonIds: array(string()).readonly(),
29698
+ runnersStopped: array(string()).readonly(),
29699
+ warnings: array(string()).readonly()
29700
+ });
29701
+ var UninstallPackageResultSchema = object({
29702
+ /** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
29703
+ success: boolean(),
29704
+ packageName: string(),
29705
+ results: array(UninstallNodeResultSchema).readonly()
29706
+ });
29707
+ /**
29708
+ * `unreachable` lists online agents whose status read FAILED — absence from
29709
+ * `installations` is only "not installed" for a node that answered (D315).
29710
+ */
29711
+ var PackageInstallationsSchema = object({
29712
+ installations: array(object({
29713
+ packageName: string(),
29714
+ nodeId: string(),
29715
+ nodeName: string(),
29716
+ isHub: boolean(),
29717
+ isOnline: boolean(),
29718
+ version: string().nullable(),
29719
+ addonIds: array(string()).readonly(),
29720
+ source: _enum(["live", "recorded"]),
29721
+ /** The hub installs this package too. `false` on an agent row = an orphan. */
29722
+ onHub: boolean()
29723
+ })).readonly(),
29724
+ unreachable: array(object({
29725
+ nodeId: string(),
29726
+ error: string()
29727
+ })).readonly()
29728
+ });
29565
29729
  var BulkUpdateItemStatusSchema = _enum([
29566
29730
  "queued",
29567
29731
  "updating",
@@ -29644,10 +29808,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
29644
29808
  }), method(object({ packageName: string() }), InstallPackageResultSchema, {
29645
29809
  kind: "mutation",
29646
29810
  auth: "admin"
29647
- }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({ packageName: string() }), unknown(), {
29811
+ }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
29812
+ packageName: string().min(1),
29813
+ nodeId: string().optional(),
29814
+ everywhere: boolean().optional()
29815
+ }), UninstallPackageResultSchema, {
29648
29816
  kind: "mutation",
29649
29817
  auth: "admin"
29650
- }), method(_void(), ReloadPackagesResultSchema, {
29818
+ }), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
29651
29819
  kind: "mutation",
29652
29820
  auth: "admin"
29653
29821
  }), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
@@ -37308,6 +37476,32 @@ var TotpStatusSchema = object({
37308
37476
  /** Null when no row exists OR the row is still pending confirmation. */
37309
37477
  confirmedAt: number().nullable()
37310
37478
  });
37479
+ /**
37480
+ * user-management — singleton capability for user accounts, API keys,
37481
+ * and scoped tokens.
37482
+ *
37483
+ * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
37484
+ * — the subset check on `setUserScopes` / `createScopedToken` is moot
37485
+ * because non-admins never reach these. If/when we open non-admin
37486
+ * delegation, structural caller-scope subset check goes inside the
37487
+ * provider.
37488
+ */
37489
+ var ExternalIdentitySchema = object({
37490
+ /** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
37491
+ provider: string(),
37492
+ /** The IdP's stable subject (`sub`) for this account. */
37493
+ subject: string(),
37494
+ /** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
37495
+ issuer: string(),
37496
+ userId: string(),
37497
+ /** What the IdP called the account at link time (username / email) — display only. */
37498
+ label: string().optional(),
37499
+ linkedAt: number()
37500
+ });
37501
+ var ExternalIdentityKeySchema = object({
37502
+ provider: string().min(1),
37503
+ subject: string().min(1)
37504
+ });
37311
37505
  method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
37312
37506
  kind: "mutation",
37313
37507
  auth: "admin",
@@ -37421,7 +37615,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
37421
37615
  userId: string(),
37422
37616
  username: string(),
37423
37617
  scopes: array(TokenScopeSchema)
37424
- }).nullable(), { access: "view" }), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
37618
+ }).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
37619
+ userId: string(),
37620
+ issuer: string()
37621
+ }).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
37622
+ userId: string(),
37623
+ issuer: string().min(1),
37624
+ label: string().optional()
37625
+ }), object({ success: literal(true) }), {
37626
+ kind: "mutation",
37627
+ auth: "admin",
37628
+ access: "create"
37629
+ }), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
37630
+ kind: "mutation",
37631
+ auth: "admin",
37632
+ access: "delete"
37633
+ }), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
37425
37634
  kind: "mutation",
37426
37635
  auth: "admin",
37427
37636
  access: "delete"
@@ -37997,6 +38206,12 @@ Object.freeze({
37997
38206
  addonId: null,
37998
38207
  access: "view"
37999
38208
  },
38209
+ "addons.listInstallations": {
38210
+ capName: "addons",
38211
+ capScope: "system",
38212
+ addonId: null,
38213
+ access: "view"
38214
+ },
38000
38215
  "addons.listJobs": {
38001
38216
  capName: "addons",
38002
38217
  capScope: "system",
@@ -42221,6 +42436,12 @@ Object.freeze({
42221
42436
  addonId: null,
42222
42437
  access: "create"
42223
42438
  },
42439
+ "pipelineAnalytics.setRetrainFrameComplete": {
42440
+ capName: "pipeline-analytics",
42441
+ capScope: "device",
42442
+ addonId: null,
42443
+ access: "create"
42444
+ },
42224
42445
  "pipelineAnalytics.setTrackFlags": {
42225
42446
  capName: "pipeline-analytics",
42226
42447
  capScope: "device",
@@ -42257,6 +42478,12 @@ Object.freeze({
42257
42478
  addonId: null,
42258
42479
  access: "delete"
42259
42480
  },
42481
+ "pipelineAnalytics.writeRetrainArchive": {
42482
+ capName: "pipeline-analytics",
42483
+ capScope: "device",
42484
+ addonId: null,
42485
+ access: "create"
42486
+ },
42260
42487
  "pipelineExecutor.cacheFrameInPool": {
42261
42488
  capName: "pipeline-executor",
42262
42489
  capScope: "system",
@@ -44609,18 +44836,36 @@ Object.freeze({
44609
44836
  addonId: null,
44610
44837
  access: "delete"
44611
44838
  },
44839
+ "userManagement.findUserByExternalIdentity": {
44840
+ capName: "user-management",
44841
+ capScope: "system",
44842
+ addonId: null,
44843
+ access: "view"
44844
+ },
44612
44845
  "userManagement.getTotpStatus": {
44613
44846
  capName: "user-management",
44614
44847
  capScope: "system",
44615
44848
  addonId: null,
44616
44849
  access: "view"
44617
44850
  },
44851
+ "userManagement.linkExternalIdentity": {
44852
+ capName: "user-management",
44853
+ capScope: "system",
44854
+ addonId: null,
44855
+ access: "create"
44856
+ },
44618
44857
  "userManagement.listApiKeys": {
44619
44858
  capName: "user-management",
44620
44859
  capScope: "system",
44621
44860
  addonId: null,
44622
44861
  access: "view"
44623
44862
  },
44863
+ "userManagement.listExternalIdentities": {
44864
+ capName: "user-management",
44865
+ capScope: "system",
44866
+ addonId: null,
44867
+ access: "view"
44868
+ },
44624
44869
  "userManagement.listOauthSessions": {
44625
44870
  capName: "user-management",
44626
44871
  capScope: "system",
@@ -44699,6 +44944,12 @@ Object.freeze({
44699
44944
  addonId: null,
44700
44945
  access: "create"
44701
44946
  },
44947
+ "userManagement.unlinkExternalIdentity": {
44948
+ capName: "user-management",
44949
+ capScope: "system",
44950
+ addonId: null,
44951
+ access: "delete"
44952
+ },
44702
44953
  "userManagement.updateUser": {
44703
44954
  capName: "user-management",
44704
44955
  capScope: "system",
@@ -48038,6 +48289,11 @@ Object.freeze({
48038
48289
  form: "single",
48039
48290
  optional: false
48040
48291
  }],
48292
+ "pipelineAnalytics.setRetrainFrameComplete": [{
48293
+ name: "deviceId",
48294
+ form: "single",
48295
+ optional: false
48296
+ }],
48041
48297
  "pipelineAnalytics.setTrackFlags": [{
48042
48298
  name: "deviceId",
48043
48299
  form: "single",
@@ -117108,6 +117364,7 @@ var ExportHapAddon = class extends BaseAddon {
117108
117364
  this.field({
117109
117365
  type: "text",
117110
117366
  key: "fixedPin",
117367
+ secret: true,
117111
117368
  label: "Fixed setup code (XXX-XX-XXX)",
117112
117369
  description: "Optional. Leave blank to use the auto-generated code persisted on first boot. Useful for CI replay.",
117113
117370
  default: DEFAULT_CONFIG.fixedPin,
@@ -5409,7 +5409,7 @@ var ZodIssueCode = {
5409
5409
  var ZodFirstPartyTypeKind;
5410
5410
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5411
5411
  //#endregion
5412
- //#region ../types/dist/sleep-BNeXenvr.mjs
5412
+ //#region ../types/dist/sleep-B0JG7-_F.mjs
5413
5413
  /**
5414
5414
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5415
5415
  * window to float samples (D455).
@@ -15783,6 +15783,10 @@ var DeviceInfoSchema = object({
15783
15783
  isCamera: boolean(),
15784
15784
  /** Current config values — serializable snapshot */
15785
15785
  config: record(string(), unknown()),
15786
+ /** Paths inside `config` the device's schema declares secret (D783) —
15787
+ * what the non-admin redaction withholds. Paths, never values. Absent
15788
+ * when the owning runner has not reported them. */
15789
+ secretConfigPaths: array(string()).optional(),
15786
15790
  /** Hardware + identity blob (manufacturer / model / firmware / sn /
15787
15791
  * uid / mac / …). Populated by drivers; editable via setMetadata. */
15788
15792
  metadata: record(string(), unknown()).nullable().optional(),
@@ -15988,7 +15992,13 @@ var DeviceRegisterPayloadSchema = object({
15988
15992
  * call (workers re-register on init), so probe-driven updates
15989
15993
  * (e.g. PTZ flag flipping after the abilities probe) propagate. */
15990
15994
  features: array(string()).optional(),
15991
- config: record(string(), unknown())
15995
+ config: record(string(), unknown()),
15996
+ /** Config paths the device's own schema DECLARES secret
15997
+ * (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
15998
+ * `connection.password`). Re-published on every register; the non-admin
15999
+ * redaction withholds them at any depth (D783). Optional: an older runner
16000
+ * omits it and the keyword backstop applies. */
16001
+ secretConfigPaths: array(string()).optional()
15992
16002
  });
15993
16003
  var DeviceRemovePayloadSchema = object({ deviceId: number() });
15994
16004
  var DevicePersistConfigPayloadSchema = object({
@@ -17647,7 +17657,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
17647
17657
  icon: string().optional(),
17648
17658
  /** Addon-owned HTTP route the button navigates to (GET). */
17649
17659
  startUrl: string(),
17650
- stage: LoginStageEnum
17660
+ stage: LoginStageEnum,
17661
+ /**
17662
+ * The provider names an external identity a signed-in user can link to
17663
+ * their own account (D782): `auth.listLinkableProviders` /
17664
+ * `beginExternalLink` offer exactly the redirect methods that set this,
17665
+ * whatever their id. Absent / false — a login button only (magic-link).
17666
+ */
17667
+ linkable: boolean().optional()
17651
17668
  }),
17652
17669
  object({
17653
17670
  kind: literal("widget"),
@@ -23044,7 +23061,13 @@ var RetrainFrameSchema = object({
23044
23061
  sizeBytes: number().int(),
23045
23062
  width: number().int(),
23046
23063
  height: number().int(),
23047
- copiedAt: number()
23064
+ copiedAt: number(),
23065
+ /** When the CAMERA captured the frame. Absent on a copy taken before D785. */
23066
+ capturedAt: number().optional(),
23067
+ /** The operator's "every subject in this frame is boxed". Detector
23068
+ * evaluation keeps only complete frames: an unboxed subject would count as
23069
+ * a false positive. */
23070
+ complete: boolean()
23048
23071
  });
23049
23072
  /** Why a copy-on-select could not be honoured — named, never a silent skip. */
23050
23073
  var RetrainCopyRefusalSchema = _enum([
@@ -23065,6 +23088,51 @@ var RetrainFrameListSchema = object({
23065
23088
  /** What the page pre-selects — the native key frame when one survives. */
23066
23089
  autoPickMediaId: number().int().optional()
23067
23090
  });
23091
+ /**
23092
+ * Which frames an annotated export carries. Every field narrows; an empty
23093
+ * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
23094
+ * list owned by whoever trains (the training orchestrator), so `frameIds` is
23095
+ * the primitive a version export uses; `batchId` re-selects what an earlier
23096
+ * export carried (`exportedInBatch`).
23097
+ */
23098
+ var RetrainExportFilterSchema = object({
23099
+ deviceIds: array(number()).optional(),
23100
+ frameIds: array(string()).max(2e4).optional(),
23101
+ batchId: string().optional(),
23102
+ /** Only frames the operator marked complete (all subjects boxed). */
23103
+ completeOnly: boolean().optional()
23104
+ });
23105
+ /**
23106
+ * `frames`: the full frame copies, boxes in `annotations.json`.
23107
+ * `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
23108
+ * convention — the classifier layout.
23109
+ */
23110
+ var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
23111
+ /**
23112
+ * Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
23113
+ * the archive, sent chunk by chunk. Covers a presigned PUT and a provider
23114
+ * addon's data-plane upload route alike. Headers are sent verbatim and never
23115
+ * logged.
23116
+ */
23117
+ var RetrainArchiveTargetSchema = object({
23118
+ kind: literal("http"),
23119
+ method: _enum(["PUT", "POST"]),
23120
+ url: string().url(),
23121
+ headers: record(string(), string()).optional()
23122
+ });
23123
+ var RetrainArchiveResultSchema = object({
23124
+ batchId: string(),
23125
+ frames: number().int(),
23126
+ crops: number().int(),
23127
+ annotations: number().int(),
23128
+ /** Frames planned but not shipped (unreadable copy, path too long). */
23129
+ missing: number().int(),
23130
+ bytes: number().int(),
23131
+ /** sha256 of the exact bytes sent. */
23132
+ sha256: string(),
23133
+ /** The target's HTTP status. */
23134
+ status: number().int()
23135
+ });
23068
23136
  /** What the operator asked the assist to look for. */
23069
23137
  var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
23070
23138
  kind: literal("package"),
@@ -23859,9 +23927,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
23859
23927
  }), RetrainTransitionResultSchema, {
23860
23928
  kind: "mutation",
23861
23929
  auth: "admin"
23862
- }), method(object({ deviceIds: array(number()).optional() }), object({ url: string() }), {
23930
+ }), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
23863
23931
  kind: "query",
23864
23932
  auth: "admin"
23933
+ }), method(object({
23934
+ deviceId: number(),
23935
+ trackId: string(),
23936
+ frameId: string(),
23937
+ complete: boolean()
23938
+ }), RetrainFrameSchema, {
23939
+ kind: "mutation",
23940
+ auth: "admin"
23941
+ }), method(object({
23942
+ filter: RetrainExportFilterSchema,
23943
+ layout: RetrainExportLayoutSchema,
23944
+ target: RetrainArchiveTargetSchema
23945
+ }), RetrainArchiveResultSchema, {
23946
+ kind: "mutation",
23947
+ auth: "admin",
23948
+ timeoutMs: 60 * 6e4
23865
23949
  }), method(object({
23866
23950
  /** Which of the three event tables owns the row. */
23867
23951
  ownerType: EventOwnerTypeSchema,
@@ -27151,7 +27235,19 @@ var SsoBridgeClaimsSchema = object({
27151
27235
  * editing a descriptor must not retroactively extend or shorten a link the
27152
27236
  * operator already consented to.
27153
27237
  */
27154
- refreshTtl: union([number().int().positive(), literal("never")]).optional()
27238
+ refreshTtl: union([number().int().positive(), literal("never")]).optional(),
27239
+ /**
27240
+ * Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
27241
+ * that was started from a signed-in user's "Link" button: the finish then
27242
+ * links this identity to the intent's user instead of signing anyone in.
27243
+ * The handle carries no user id — the hub resolves it, single-use.
27244
+ */
27245
+ linkIntent: string().optional(),
27246
+ /**
27247
+ * Verified `iss` of the id_token behind an OIDC login bridge (D782). A
27248
+ * subject is unique only per issuer, so a link is bound to it.
27249
+ */
27250
+ issuer: string().optional()
27155
27251
  });
27156
27252
  method(object({
27157
27253
  claims: SsoBridgeClaimsSchema,
@@ -29250,7 +29346,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
29250
29346
  * field their hints were silently stripped by the schema and the
29251
29347
  * adaptive ladder started blind on the client's display size.
29252
29348
  */
29253
- hints: webrtcClientHintsSchema.optional()
29349
+ hints: webrtcClientHintsSchema.optional(),
29350
+ /**
29351
+ * Talk-back (D771): relay the PEER's audio to the device's speaker
29352
+ * through the `intercom` cap's push-talk triple. When `true` and the
29353
+ * offer lets the peer send audio, the answer's audio is `sendrecv`
29354
+ * and every inbound frame goes to `intercom.pushTalkAudio` for this
29355
+ * `deviceId`; absent/false answers `sendonly`, as for every viewer.
29356
+ *
29357
+ * TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
29358
+ * with `intercom`, when the linked user may control that camera. The
29359
+ * hub STRIPS it from every request-bound call (a browser), exactly as
29360
+ * it overwrites `relayOnly` — a viewer's talk permission is the
29361
+ * intercom cap's own surface (share tokens gate it there), and this
29362
+ * flag must not become a second door to the camera's speaker.
29363
+ */
29364
+ talkback: boolean().optional()
29254
29365
  }), object({
29255
29366
  sessionId: string(),
29256
29367
  sdpAnswer: string()
@@ -29552,6 +29663,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
29552
29663
  var RestartAddonResultSchema = unknown();
29553
29664
  var InstallPackageResultSchema = unknown();
29554
29665
  var ReloadPackagesResultSchema = unknown();
29666
+ /**
29667
+ * What an uninstall did on ONE node.
29668
+ * - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
29669
+ * - `not-installed` — the node did not have it (nothing to do).
29670
+ * - `refused` — protected / bootstrap package; nothing touched.
29671
+ * - `failed` — attempted and did not complete; `error` says why.
29672
+ * - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
29673
+ * back-fill never returns the package, and the stale-addon sweep removes the
29674
+ * copy when the node registers again (only once the hub no longer has it).
29675
+ */
29676
+ var UninstallNodeOutcomeSchema = _enum([
29677
+ "uninstalled",
29678
+ "not-installed",
29679
+ "refused",
29680
+ "failed",
29681
+ "pending-reconnect"
29682
+ ]);
29683
+ var UninstallNodeResultSchema = object({
29684
+ nodeId: string(),
29685
+ outcome: UninstallNodeOutcomeSchema,
29686
+ error: string().optional(),
29687
+ addonIds: array(string()).readonly(),
29688
+ runnersStopped: array(string()).readonly(),
29689
+ warnings: array(string()).readonly()
29690
+ });
29691
+ var UninstallPackageResultSchema = object({
29692
+ /** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
29693
+ success: boolean(),
29694
+ packageName: string(),
29695
+ results: array(UninstallNodeResultSchema).readonly()
29696
+ });
29697
+ /**
29698
+ * `unreachable` lists online agents whose status read FAILED — absence from
29699
+ * `installations` is only "not installed" for a node that answered (D315).
29700
+ */
29701
+ var PackageInstallationsSchema = object({
29702
+ installations: array(object({
29703
+ packageName: string(),
29704
+ nodeId: string(),
29705
+ nodeName: string(),
29706
+ isHub: boolean(),
29707
+ isOnline: boolean(),
29708
+ version: string().nullable(),
29709
+ addonIds: array(string()).readonly(),
29710
+ source: _enum(["live", "recorded"]),
29711
+ /** The hub installs this package too. `false` on an agent row = an orphan. */
29712
+ onHub: boolean()
29713
+ })).readonly(),
29714
+ unreachable: array(object({
29715
+ nodeId: string(),
29716
+ error: string()
29717
+ })).readonly()
29718
+ });
29555
29719
  var BulkUpdateItemStatusSchema = _enum([
29556
29720
  "queued",
29557
29721
  "updating",
@@ -29634,10 +29798,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
29634
29798
  }), method(object({ packageName: string() }), InstallPackageResultSchema, {
29635
29799
  kind: "mutation",
29636
29800
  auth: "admin"
29637
- }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({ packageName: string() }), unknown(), {
29801
+ }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
29802
+ packageName: string().min(1),
29803
+ nodeId: string().optional(),
29804
+ everywhere: boolean().optional()
29805
+ }), UninstallPackageResultSchema, {
29638
29806
  kind: "mutation",
29639
29807
  auth: "admin"
29640
- }), method(_void(), ReloadPackagesResultSchema, {
29808
+ }), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
29641
29809
  kind: "mutation",
29642
29810
  auth: "admin"
29643
29811
  }), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
@@ -37298,6 +37466,32 @@ var TotpStatusSchema = object({
37298
37466
  /** Null when no row exists OR the row is still pending confirmation. */
37299
37467
  confirmedAt: number().nullable()
37300
37468
  });
37469
+ /**
37470
+ * user-management — singleton capability for user accounts, API keys,
37471
+ * and scoped tokens.
37472
+ *
37473
+ * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
37474
+ * — the subset check on `setUserScopes` / `createScopedToken` is moot
37475
+ * because non-admins never reach these. If/when we open non-admin
37476
+ * delegation, structural caller-scope subset check goes inside the
37477
+ * provider.
37478
+ */
37479
+ var ExternalIdentitySchema = object({
37480
+ /** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
37481
+ provider: string(),
37482
+ /** The IdP's stable subject (`sub`) for this account. */
37483
+ subject: string(),
37484
+ /** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
37485
+ issuer: string(),
37486
+ userId: string(),
37487
+ /** What the IdP called the account at link time (username / email) — display only. */
37488
+ label: string().optional(),
37489
+ linkedAt: number()
37490
+ });
37491
+ var ExternalIdentityKeySchema = object({
37492
+ provider: string().min(1),
37493
+ subject: string().min(1)
37494
+ });
37301
37495
  method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
37302
37496
  kind: "mutation",
37303
37497
  auth: "admin",
@@ -37411,7 +37605,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
37411
37605
  userId: string(),
37412
37606
  username: string(),
37413
37607
  scopes: array(TokenScopeSchema)
37414
- }).nullable(), { access: "view" }), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
37608
+ }).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
37609
+ userId: string(),
37610
+ issuer: string()
37611
+ }).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
37612
+ userId: string(),
37613
+ issuer: string().min(1),
37614
+ label: string().optional()
37615
+ }), object({ success: literal(true) }), {
37616
+ kind: "mutation",
37617
+ auth: "admin",
37618
+ access: "create"
37619
+ }), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
37620
+ kind: "mutation",
37621
+ auth: "admin",
37622
+ access: "delete"
37623
+ }), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
37415
37624
  kind: "mutation",
37416
37625
  auth: "admin",
37417
37626
  access: "delete"
@@ -37987,6 +38196,12 @@ Object.freeze({
37987
38196
  addonId: null,
37988
38197
  access: "view"
37989
38198
  },
38199
+ "addons.listInstallations": {
38200
+ capName: "addons",
38201
+ capScope: "system",
38202
+ addonId: null,
38203
+ access: "view"
38204
+ },
37990
38205
  "addons.listJobs": {
37991
38206
  capName: "addons",
37992
38207
  capScope: "system",
@@ -42211,6 +42426,12 @@ Object.freeze({
42211
42426
  addonId: null,
42212
42427
  access: "create"
42213
42428
  },
42429
+ "pipelineAnalytics.setRetrainFrameComplete": {
42430
+ capName: "pipeline-analytics",
42431
+ capScope: "device",
42432
+ addonId: null,
42433
+ access: "create"
42434
+ },
42214
42435
  "pipelineAnalytics.setTrackFlags": {
42215
42436
  capName: "pipeline-analytics",
42216
42437
  capScope: "device",
@@ -42247,6 +42468,12 @@ Object.freeze({
42247
42468
  addonId: null,
42248
42469
  access: "delete"
42249
42470
  },
42471
+ "pipelineAnalytics.writeRetrainArchive": {
42472
+ capName: "pipeline-analytics",
42473
+ capScope: "device",
42474
+ addonId: null,
42475
+ access: "create"
42476
+ },
42250
42477
  "pipelineExecutor.cacheFrameInPool": {
42251
42478
  capName: "pipeline-executor",
42252
42479
  capScope: "system",
@@ -44599,18 +44826,36 @@ Object.freeze({
44599
44826
  addonId: null,
44600
44827
  access: "delete"
44601
44828
  },
44829
+ "userManagement.findUserByExternalIdentity": {
44830
+ capName: "user-management",
44831
+ capScope: "system",
44832
+ addonId: null,
44833
+ access: "view"
44834
+ },
44602
44835
  "userManagement.getTotpStatus": {
44603
44836
  capName: "user-management",
44604
44837
  capScope: "system",
44605
44838
  addonId: null,
44606
44839
  access: "view"
44607
44840
  },
44841
+ "userManagement.linkExternalIdentity": {
44842
+ capName: "user-management",
44843
+ capScope: "system",
44844
+ addonId: null,
44845
+ access: "create"
44846
+ },
44608
44847
  "userManagement.listApiKeys": {
44609
44848
  capName: "user-management",
44610
44849
  capScope: "system",
44611
44850
  addonId: null,
44612
44851
  access: "view"
44613
44852
  },
44853
+ "userManagement.listExternalIdentities": {
44854
+ capName: "user-management",
44855
+ capScope: "system",
44856
+ addonId: null,
44857
+ access: "view"
44858
+ },
44614
44859
  "userManagement.listOauthSessions": {
44615
44860
  capName: "user-management",
44616
44861
  capScope: "system",
@@ -44689,6 +44934,12 @@ Object.freeze({
44689
44934
  addonId: null,
44690
44935
  access: "create"
44691
44936
  },
44937
+ "userManagement.unlinkExternalIdentity": {
44938
+ capName: "user-management",
44939
+ capScope: "system",
44940
+ addonId: null,
44941
+ access: "delete"
44942
+ },
44692
44943
  "userManagement.updateUser": {
44693
44944
  capName: "user-management",
44694
44945
  capScope: "system",
@@ -48028,6 +48279,11 @@ Object.freeze({
48028
48279
  form: "single",
48029
48280
  optional: false
48030
48281
  }],
48282
+ "pipelineAnalytics.setRetrainFrameComplete": [{
48283
+ name: "deviceId",
48284
+ form: "single",
48285
+ optional: false
48286
+ }],
48031
48287
  "pipelineAnalytics.setTrackFlags": [{
48032
48288
  name: "deviceId",
48033
48289
  form: "single",
@@ -117098,6 +117354,7 @@ var ExportHapAddon = class extends BaseAddon {
117098
117354
  this.field({
117099
117355
  type: "text",
117100
117356
  key: "fixedPin",
117357
+ secret: true,
117101
117358
  label: "Fixed setup code (XXX-XX-XXX)",
117102
117359
  description: "Optional. Leave blank to use the auto-generated code persisted on first boot. Useful for CI replay.",
117103
117360
  default: DEFAULT_CONFIG.fixedPin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.2.152",
3
+ "version": "1.2.154",
4
4
  "description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
5
5
  "keywords": [
6
6
  "camstack",