@camstack/addon-provider-reolink 1.2.182 → 1.2.183

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 (3) hide show
  1. package/dist/addon.js +413 -138
  2. package/dist/addon.mjs +413 -138
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5413,7 +5413,7 @@ var ZodIssueCode = {
5413
5413
  var ZodFirstPartyTypeKind;
5414
5414
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5415
5415
  //#endregion
5416
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5416
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5417
5417
  /**
5418
5418
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5419
5419
  * window to float samples (D455).
@@ -9471,6 +9471,16 @@ var CompositionSchema = object({
9471
9471
  seen.add(feature.cap);
9472
9472
  });
9473
9473
  });
9474
+ var NodeColorIdSchema = _enum([
9475
+ "node-a",
9476
+ "node-b",
9477
+ "node-c",
9478
+ "node-d",
9479
+ "node-e",
9480
+ "node-f",
9481
+ "node-g",
9482
+ "node-h"
9483
+ ]);
9474
9484
  new Set([
9475
9485
  "track",
9476
9486
  "face",
@@ -19184,14 +19194,14 @@ var LlmProfileSchema = object({
19184
19194
  /** ConfigUISchema tree passed through untyped on the wire (the
19185
19195
  * notification-output `ConfigSchemaPassthrough` precedent at
19186
19196
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
19187
- var ConfigSchemaPassthrough$1 = unknown();
19197
+ var ConfigSchemaPassthrough$3 = unknown();
19188
19198
  var LlmProfileKindDescriptorSchema = object({
19189
19199
  kind: LlmProfileKindSchema,
19190
19200
  label: string(),
19191
19201
  icon: string(),
19192
19202
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19193
19203
  addonId: string(),
19194
- configSchema: ConfigSchemaPassthrough$1
19204
+ configSchema: ConfigSchemaPassthrough$3
19195
19205
  });
19196
19206
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
19197
19207
  var LlmDefaultSchema = object({
@@ -20333,7 +20343,7 @@ var TargetKindCapsSchema = object({
20333
20343
  * the union is large and not meant for runtime validation here; the exported
20334
20344
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
20335
20345
  */
20336
- var ConfigSchemaPassthrough = unknown();
20346
+ var ConfigSchemaPassthrough$2 = unknown();
20337
20347
  var TargetKindSchema = object({
20338
20348
  kind: string(),
20339
20349
  label: string(),
@@ -20370,7 +20380,7 @@ var TargetKindSchema = object({
20370
20380
  * its raster path, which is the safe default for an unknown image.
20371
20381
  */
20372
20382
  iconMediaType: string().optional(),
20373
- configSchema: ConfigSchemaPassthrough,
20383
+ configSchema: ConfigSchemaPassthrough$2,
20374
20384
  /**
20375
20385
  * The config keys that decide WHERE this kind's secrets are sent (server,
20376
20386
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23707,6 +23717,61 @@ var OauthIntegrationDescriptorSchema = object({
23707
23717
  });
23708
23718
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
23709
23719
  /**
23720
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23721
+ *
23722
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23723
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23724
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23725
+ * immutable after create.
23726
+ */
23727
+ var ConfigSchemaPassthrough$1 = unknown();
23728
+ var OidcConnectionSchema = object({
23729
+ id: string().min(1),
23730
+ displayName: string(),
23731
+ icon: string(),
23732
+ issuerUrl: string(),
23733
+ clientId: string(),
23734
+ /** Client id + secret present — never the secret value. */
23735
+ configured: boolean(),
23736
+ /**
23737
+ * Values for the connection form schema. `clientSecret` is a keychain
23738
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23739
+ */
23740
+ formValues: record(string(), unknown()).optional()
23741
+ });
23742
+ /**
23743
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23744
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23745
+ */
23746
+ var OidcConnectionUpdateInputSchema = object({
23747
+ id: string().min(1),
23748
+ displayName: string().min(1),
23749
+ icon: string().optional(),
23750
+ issuerUrl: string().optional(),
23751
+ clientId: string().optional(),
23752
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23753
+ redirectUri: string().optional(),
23754
+ scopes: string().optional(),
23755
+ usernameClaim: _enum([
23756
+ "preferred_username",
23757
+ "email",
23758
+ "sub"
23759
+ ]).optional()
23760
+ });
23761
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23762
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23763
+ displayName: string().min(1)
23764
+ }), object({ id: string() }), {
23765
+ kind: "mutation",
23766
+ auth: "admin"
23767
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23768
+ kind: "mutation",
23769
+ auth: "admin"
23770
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23771
+ kind: "mutation",
23772
+ auth: "admin"
23773
+ });
23774
+ /**
23710
23775
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23711
23776
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23712
23777
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -25063,24 +25128,69 @@ var RetrainFrameListSchema = object({
25063
25128
  /** What the page pre-selects — the native key frame when one survives. */
25064
25129
  autoPickMediaId: number().int().optional()
25065
25130
  });
25131
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
25132
+ var RetrainFrameWorkStateSchema = _enum([
25133
+ "unannotated",
25134
+ "annotated",
25135
+ "complete"
25136
+ ]);
25137
+ /**
25138
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
25139
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
25140
+ */
25141
+ var RetrainCorpusFilterSchema = object({
25142
+ workState: RetrainFrameWorkStateSchema.optional(),
25143
+ deviceIds: array(number()).max(500).optional(),
25144
+ /** When set, only frames in this named collection. */
25145
+ collectionId: string().optional(),
25146
+ /** Frames that carry at least one saved annotation in one of these classes. */
25147
+ classes: array(RetrainMacroClassSchema).optional(),
25148
+ page: number().int().positive().default(1),
25149
+ pageSize: number().int().positive().max(100).default(50)
25150
+ });
25151
+ var RetrainCorpusPageSchema = object({
25152
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
25153
+ total: number().int().nonnegative(),
25154
+ page: number().int().positive(),
25155
+ pageSize: number().int().positive()
25156
+ });
25157
+ var RetrainCorpusKpiCameraRowSchema = object({
25158
+ deviceId: number(),
25159
+ unannotated: number().int().nonnegative(),
25160
+ annotated: number().int().nonnegative(),
25161
+ complete: number().int().nonnegative(),
25162
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
25163
+ * `null` when the corpus is empty (no ratio). */
25164
+ pctOfCorpus: number().min(0).max(1).nullable()
25165
+ });
25166
+ var RetrainCorpusKpiSchema = object({
25167
+ total: number().int().nonnegative(),
25168
+ unannotated: number().int().nonnegative(),
25169
+ annotated: number().int().nonnegative(),
25170
+ complete: number().int().nonnegative(),
25171
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
25172
+ });
25066
25173
  /**
25067
25174
  * Which frames an annotated export carries. Every field narrows; an empty
25068
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
25069
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
25070
- * the primitive a version export uses; `batchId` re-selects what an earlier
25071
- * export carried (`exportedInBatch`).
25175
+ * filter is every annotated copy. `frameIds` is the primitive a job or
25176
+ * download uses; `batchId` re-selects what an earlier export carried
25177
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
25178
+ * resolves to `frameIds` at plan/start.
25072
25179
  */
25073
25180
  var RetrainExportFilterSchema = object({
25074
25181
  deviceIds: array(number()).optional(),
25075
25182
  frameIds: array(string()).max(2e4).optional(),
25076
25183
  /** Only frames in at least one of these named collections. */
25077
25184
  collectionIds: array(string()).max(200).optional(),
25078
- /** Exactly the frames of this dataset version (and its completeOnly). An
25079
- * unknown id selects nothing. */
25080
- datasetVersionId: string().optional(),
25185
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
25186
+ collectionId: string().optional(),
25081
25187
  batchId: string().optional(),
25082
25188
  /** Only frames the operator marked complete (all subjects boxed). */
25083
- completeOnly: boolean().optional()
25189
+ completeOnly: boolean().optional(),
25190
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
25191
+ workState: RetrainFrameWorkStateSchema.optional(),
25192
+ /** Frames with at least one saved annotation in one of these classes. */
25193
+ classes: array(RetrainMacroClassSchema).optional()
25084
25194
  });
25085
25195
  /**
25086
25196
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -25280,8 +25390,7 @@ var RetrainDatasetStatsSchema = object({
25280
25390
  completeFrames: number().int()
25281
25391
  })).readonly()
25282
25392
  });
25283
- /** An immutable dataset version, without its frame list. */
25284
- var RetrainDatasetVersionSchema = object({
25393
+ object({
25285
25394
  id: string(),
25286
25395
  name: string(),
25287
25396
  createdAt: number(),
@@ -25289,22 +25398,33 @@ var RetrainDatasetVersionSchema = object({
25289
25398
  layout: RetrainExportLayoutSchema,
25290
25399
  completeOnly: boolean(),
25291
25400
  frameCount: number().int(),
25292
- /** sha256 of what the frames taught when the version was frozen. */
25293
25401
  annotationHash: string(),
25294
- /** The export manifest schema the version was cut under. */
25295
25402
  manifestSchema: string(),
25296
25403
  stats: RetrainDatasetStatsSchema
25297
25404
  });
25298
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
25299
- kind: literal("created"),
25300
- version: RetrainDatasetVersionSchema
25405
+ /**
25406
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
25407
+ * the training cap. Resolved here so plan/start and the annotated export share
25408
+ * one definition of "the frames" (`buildRetrainExportPlan`).
25409
+ */
25410
+ var RetrainTrainingCorpusSelectionSchema = object({
25411
+ collectionIds: array(string()).min(1),
25412
+ workState: _enum([
25413
+ "complete",
25414
+ "annotated_or_complete",
25415
+ "any_annotated"
25416
+ ]).default("complete")
25417
+ });
25418
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
25419
+ kind: literal("resolved"),
25420
+ frameIds: array(string()).max(2e4).readonly(),
25421
+ stats: RetrainDatasetStatsSchema,
25422
+ annotationHash: string(),
25423
+ layout: RetrainExportLayoutSchema
25301
25424
  }), object({
25302
25425
  kind: literal("refused"),
25303
- reason: _enum([
25304
- "empty-name",
25305
- "duplicate-name",
25306
- "no-frames"
25307
- ])
25426
+ reason: _enum(["unknown-collection", "no-frames"]),
25427
+ detail: string()
25308
25428
  })]);
25309
25429
  /** The outcome of a lifecycle move owned by the retrain page. */
25310
25430
  var RetrainTransitionResultSchema = object({
@@ -26011,6 +26131,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26011
26131
  }), array(RetrainTrackSchema).readonly(), {
26012
26132
  kind: "query",
26013
26133
  auth: "admin"
26134
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
26135
+ kind: "query",
26136
+ auth: "admin"
26137
+ }), method(object({}), RetrainCorpusKpiSchema, {
26138
+ kind: "query",
26139
+ auth: "admin"
26014
26140
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
26015
26141
  kind: "query",
26016
26142
  auth: "admin"
@@ -26106,36 +26232,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26106
26232
  kind: "mutation",
26107
26233
  auth: "admin",
26108
26234
  timeoutMs: 12e4
26109
- }), method(object({
26110
- selection: RetrainDatasetSelectionSchema,
26111
- completeOnly: boolean().optional()
26112
- }), RetrainDatasetStatsSchema, {
26113
- kind: "query",
26114
- auth: "admin"
26115
- }), method(object({
26116
- name: string().max(120),
26117
- selection: RetrainDatasetSelectionSchema,
26118
- layout: RetrainExportLayoutSchema,
26119
- completeOnly: boolean()
26120
- }), CreateRetrainDatasetVersionResultSchema, {
26121
- kind: "mutation",
26122
- auth: "admin",
26123
- timeoutMs: 12e4
26124
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
26125
- kind: "query",
26126
- auth: "admin"
26127
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
26128
- kind: "mutation",
26129
- auth: "admin"
26130
- }), method(object({ id: string() }), object({
26131
- found: boolean(),
26132
- annotationHash: string(),
26133
- matches: boolean(),
26134
- missingFrames: number().int()
26135
- }), {
26136
- kind: "query",
26137
- auth: "admin",
26138
- timeoutMs: 12e4
26139
26235
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
26140
26236
  kind: "query",
26141
26237
  auth: "admin"
@@ -26162,6 +26258,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26162
26258
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
26163
26259
  kind: "query",
26164
26260
  auth: "admin"
26261
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
26262
+ kind: "query",
26263
+ auth: "admin",
26264
+ timeoutMs: 6e4
26165
26265
  }), method(object({
26166
26266
  id: string(),
26167
26267
  name: string().max(120)
@@ -26778,11 +26878,14 @@ var HardwareClassIdSchema = _enum([
26778
26878
  "intel-n-series",
26779
26879
  "apple-m-base",
26780
26880
  "apple-m-pro",
26881
+ "amd-phoenix",
26781
26882
  "unknown"
26782
26883
  ]);
26783
26884
  var AcceleratorKindSchema = _enum([
26784
26885
  "intel-npu",
26785
26886
  "intel-igpu",
26887
+ "amd-igpu",
26888
+ "amd-npu",
26786
26889
  "x86-cpu",
26787
26890
  "arm-cpu",
26788
26891
  "apple-ane",
@@ -28712,6 +28815,8 @@ var AgentPipelineSettingsSchema = object({
28712
28815
  * address is wrong (multi-homed host, NAT, custom interface).
28713
28816
  */
28714
28817
  reachableHost: string().optional(),
28818
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28819
+ color: NodeColorIdSchema.optional(),
28715
28820
  /**
28716
28821
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28717
28822
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -29261,8 +29366,9 @@ method(object({
29261
29366
  auth: "admin"
29262
29367
  }), method(object({
29263
29368
  agentNodeId: string(),
29264
- reachableHost: string().nullable()
29265
- }), object({ success: literal(true) }), {
29369
+ reachableHost: string().nullable().optional(),
29370
+ color: NodeColorIdSchema.nullable().optional()
29371
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
29266
29372
  kind: "mutation",
29267
29373
  auth: "admin"
29268
29374
  }), method(object({
@@ -32860,7 +32966,7 @@ var CustomActionInputSchema = object({
32860
32966
  action: string().min(1),
32861
32967
  input: unknown()
32862
32968
  });
32863
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32969
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32864
32970
  addonId: string(),
32865
32971
  limit: number().min(1).max(500).default(100),
32866
32972
  level: LogLevelSchema$2.optional()
@@ -38407,6 +38513,7 @@ var OsdNamedTemplateSchema = object({
38407
38513
  });
38408
38514
  /** Where a slot's value comes from. */
38409
38515
  var OsdSourceSchema = discriminatedUnion("kind", [
38516
+ object({ kind: literal("none") }),
38410
38517
  object({
38411
38518
  kind: literal("static"),
38412
38519
  text: string().max(64)
@@ -38533,6 +38640,13 @@ method(object({ deviceId: number().int() }), object({
38533
38640
  }), object({ success: literal(true) }), {
38534
38641
  kind: "mutation",
38535
38642
  auth: "admin"
38643
+ }), method(object({
38644
+ deviceId: number().int(),
38645
+ slotId: string().min(1),
38646
+ enabled: boolean()
38647
+ }), object({ success: literal(true) }), {
38648
+ kind: "mutation",
38649
+ auth: "admin"
38536
38650
  }), method(object({
38537
38651
  sourceDeviceId: number().int(),
38538
38652
  targetDeviceId: number().int()
@@ -38964,7 +39078,15 @@ var GpuInfoSchema = object({
38964
39078
  name: string(),
38965
39079
  memoryMB: number().optional()
38966
39080
  });
38967
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
39081
+ var NpuInfoSchema = object({
39082
+ type: _enum([
39083
+ "apple-ane",
39084
+ "intel-npu",
39085
+ "amd-xdna"
39086
+ ]),
39087
+ name: string().optional(),
39088
+ generation: _enum(["xdna1", "xdna2"]).optional()
39089
+ });
38968
39090
  var CoralInfoSchema = object({
38969
39091
  type: literal("coral-edgetpu"),
38970
39092
  bus: string().optional()
@@ -44211,9 +44333,11 @@ var zoneRulesCapability = {
44211
44333
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
44212
44334
  * manifest entry and nothing else.
44213
44335
  *
44214
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
44215
- * `notification-output` posture); `describe` concat-fans across providers.
44216
- * Every method is `admin`: these spend money.
44336
+ * Collection of provider **types** (addons). Each addon owns zero or more
44337
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
44338
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
44339
+ * `entryId`; callers also pass the owning `addonId` as the collection
44340
+ * selector (broker posture). Every method is `admin`: these spend money.
44217
44341
  *
44218
44342
  * Every cloud object a provider creates is tagged with the orchestrator's
44219
44343
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -44237,8 +44361,8 @@ var TrainingRegionOptionSchema = object({
44237
44361
  priceMultiplier: number().positive()
44238
44362
  });
44239
44363
  /**
44240
- * The provider's per-account settings, as the orchestrator reads them. They
44241
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
44364
+ * The provider's per-entry settings, as the orchestrator reads them. They
44365
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
44242
44366
  * depend on the user's account), never hard-coded in the orchestrator.
44243
44367
  */
44244
44368
  var TrainingProviderDefaultsSchema = object({
@@ -44249,9 +44373,44 @@ var TrainingProviderDefaultsSchema = object({
44249
44373
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
44250
44374
  failedDatasetGraceHours: number().nonnegative()
44251
44375
  });
44376
+ /**
44377
+ * Entry form schema for a provider type — same seam as notification
44378
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
44379
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
44380
+ */
44381
+ var ConfigSchemaPassthrough = unknown();
44382
+ /** One creatable provider type, for the Add-entry dialog. */
44383
+ var TrainingProviderTypeSchema = object({
44384
+ typeId: string(),
44385
+ label: string(),
44386
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
44387
+ iconAsset: string(),
44388
+ /** Owning `training-provider` addon — collection selector for createEntry. */
44389
+ addonId: string(),
44390
+ /**
44391
+ * Fields for one entry of this type (credentials + defaults). Absent on a
44392
+ * type that only needs a name. Password fields are keychain-backed on the
44393
+ * provider addon (`secretStatePaths`), not D634 plaintext.
44394
+ */
44395
+ configSchema: ConfigSchemaPassthrough.optional()
44396
+ });
44397
+ /** One configured account / workspace under a provider type. */
44398
+ var TrainingProviderEntrySchema = object({
44399
+ entryId: string(),
44400
+ typeId: string(),
44401
+ name: string(),
44402
+ addonId: string(),
44403
+ /** Credentials are present — never the values. */
44404
+ configured: boolean()
44405
+ });
44252
44406
  var TrainingProviderDescriptorSchema = object({
44253
44407
  addonId: string(),
44254
- /** `modal`, `runpod`, `fake`, … */
44408
+ entryId: string(),
44409
+ typeId: string(),
44410
+ /** Operator-chosen entry name. */
44411
+ name: string(),
44412
+ iconAsset: string(),
44413
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
44255
44414
  kind: string(),
44256
44415
  label: string(),
44257
44416
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -44263,7 +44422,30 @@ var TrainingProviderDescriptorSchema = object({
44263
44422
  dataResidencyNote: string(),
44264
44423
  /** Credentials are present — never the values. */
44265
44424
  configured: boolean(),
44266
- defaults: TrainingProviderDefaultsSchema
44425
+ defaults: TrainingProviderDefaultsSchema,
44426
+ /**
44427
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
44428
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
44429
+ * never plaintext. Same hydrate contract as settings forms (D789).
44430
+ */
44431
+ formValues: record(string(), unknown()).optional()
44432
+ });
44433
+ /**
44434
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
44435
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
44436
+ * `{ $secretClear: true }` clears it.
44437
+ */
44438
+ var TrainingProviderUpdateEntryInputSchema = object({
44439
+ entryId: string().min(1),
44440
+ name: string().min(1),
44441
+ tokenId: string().optional(),
44442
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
44443
+ environment: string().optional(),
44444
+ gpuType: string().optional(),
44445
+ region: string().optional(),
44446
+ costCapUsd: number().nonnegative().optional(),
44447
+ maxRuntimeSec: number().int().positive().optional(),
44448
+ failedDatasetGraceHours: number().nonnegative().optional()
44267
44449
  });
44268
44450
  var TrainingCredentialCheckSchema = object({
44269
44451
  ok: boolean(),
@@ -44315,20 +44497,33 @@ var TrainerSourceRefSchema = object({
44315
44497
  /** A commit sha (never a branch) — the job must be reproducible. */
44316
44498
  revision: string().regex(/^[0-9a-f]{7,64}$/)
44317
44499
  });
44500
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
44318
44501
  var JobRef = {
44319
- addonId: string(),
44502
+ entryId: string().min(1),
44320
44503
  jobKey: string().uuid()
44321
44504
  };
44322
44505
  var TrainingLogLineSchema = object({
44323
44506
  ts: number(),
44324
44507
  text: string()
44325
44508
  });
44326
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
44509
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
44510
+ typeId: string().min(1),
44511
+ name: string().min(1)
44512
+ }), object({ entryId: string() }), {
44513
+ kind: "mutation",
44514
+ auth: "admin"
44515
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
44516
+ kind: "mutation",
44517
+ auth: "admin"
44518
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
44519
+ kind: "mutation",
44520
+ auth: "admin"
44521
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
44327
44522
  kind: "mutation",
44328
44523
  auth: "admin",
44329
44524
  timeoutMs: 3e4
44330
44525
  }), method(object({
44331
- addonId: string(),
44526
+ entryId: string().min(1),
44332
44527
  gpuType: string(),
44333
44528
  region: string(),
44334
44529
  datasetBytes: number().int().nonnegative(),
@@ -44394,7 +44589,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44394
44589
  kind: "mutation",
44395
44590
  auth: "admin",
44396
44591
  timeoutMs: 5 * 6e4
44397
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
44592
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
44398
44593
  auth: "admin",
44399
44594
  timeoutMs: 2 * 6e4
44400
44595
  });
@@ -44404,20 +44599,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44404
44599
  *
44405
44600
  * It owns what every provider must agree on, written once:
44406
44601
  *
44407
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
44408
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
44409
- * the export plan) and reaches this store through the five row methods
44410
- * below, so the Retrain page and the export did not change.
44411
44602
  * - **Jobs.** A persisted state machine, a reconcile loop against the
44412
44603
  * provider, a cost guard, a daily orphan sweep and the retention rules.
44413
44604
  * - **The return flow.** Verified artefacts → Model Studio
44414
44605
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
44415
44606
  * rollback. Nothing is ever registered automatically.
44416
44607
  *
44608
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
44609
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
44610
+ * moment and snapshotted on the job. No frozen dataset version.
44611
+ *
44417
44612
  * Every method is `admin`.
44418
44613
  */
44419
- /** A version WITH its frame list — what the export and a job read. */
44420
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
44614
+ /**
44615
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
44616
+ * Frame ids are resolved at plan/start — never a frozen version id.
44617
+ */
44618
+ var TrainingCorpusSelectionSchema = object({
44619
+ collectionIds: array(string()).min(1),
44620
+ /** Default complete-only for v1 */
44621
+ workState: _enum([
44622
+ "complete",
44623
+ "annotated_or_complete",
44624
+ "any_annotated"
44625
+ ]).default("complete")
44626
+ });
44421
44627
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
44422
44628
  var TrainingBaseModelSchema = object({
44423
44629
  modelId: string(),
@@ -44435,9 +44641,13 @@ var TrainingPresetSchema = _enum([
44435
44641
  "thorough"
44436
44642
  ]);
44437
44643
  var TrainingJobRequestSchema = object({
44438
- datasetVersionId: string().min(1),
44439
- /** The `training-provider` addon that runs it. */
44440
- addonId: string().min(1),
44644
+ /** Live collection + work-state criteria; resolved at plan/start. */
44645
+ selection: TrainingCorpusSelectionSchema,
44646
+ /**
44647
+ * The provider **entry** that runs it (credentials + defaults).
44648
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
44649
+ */
44650
+ entryId: string().min(1),
44441
44651
  gpuType: string().min(1),
44442
44652
  region: string(),
44443
44653
  baseModelId: string().min(1),
@@ -44496,6 +44706,7 @@ var TrainingJobPlanSchema = object({
44496
44706
  * result lives after the operator acted on it.
44497
44707
  */
44498
44708
  var TrainingJobStateSchema = _enum([
44709
+ "queued",
44499
44710
  "uploading",
44500
44711
  "submitted",
44501
44712
  "starting",
@@ -44549,6 +44760,11 @@ var TrainingJobSchema = object({
44549
44760
  createdAt: number(),
44550
44761
  updatedAt: number(),
44551
44762
  state: TrainingJobStateSchema,
44763
+ /**
44764
+ * Shared by every job enqueued together via `startJobBatch`.
44765
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
44766
+ */
44767
+ batchId: string().nullable().default(null),
44552
44768
  stage: TrainingStageSchema.nullable(),
44553
44769
  failure: object({
44554
44770
  reason: TrainingFailureReasonSchema,
@@ -44560,6 +44776,12 @@ var TrainingJobSchema = object({
44560
44776
  maxRuntimeSec: number().int().positive(),
44561
44777
  trainer: TrainerSourceRefSchema,
44562
44778
  datasetLayout: RetrainExportLayoutSchema,
44779
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
44780
+ frameCount: number().int().nonnegative(),
44781
+ /** Resolved frame ids at start — the archive ships exactly these. */
44782
+ frameIds: array(string()).max(2e4).readonly(),
44783
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
44784
+ annotationHash: string(),
44563
44785
  dataset: object({
44564
44786
  bytes: number().int(),
44565
44787
  sha256: string(),
@@ -44601,13 +44823,7 @@ var TrainingJobSchema = object({
44601
44823
  canary: TrainingCanarySchema.nullable()
44602
44824
  });
44603
44825
  var IdInput = object({ id: string().min(1) });
44604
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44605
- kind: "mutation",
44606
- auth: "admin"
44607
- }), method(IdInput, TrainingDatasetVersionRowSchema.nullable(), { auth: "admin" }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), object({ id: string().nullable() }), { auth: "admin" }), method(IdInput, object({ removed: boolean() }), {
44608
- kind: "mutation",
44609
- auth: "admin"
44610
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44826
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44611
44827
  auth: "admin",
44612
44828
  timeoutMs: 6e4
44613
44829
  }), method(TrainingJobRequestSchema.extend({
@@ -44626,6 +44842,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44626
44842
  kind: "mutation",
44627
44843
  auth: "admin",
44628
44844
  timeoutMs: 12e4
44845
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
44846
+ baseModelIds: array(string().min(1)).min(1),
44847
+ name: string().min(1).max(120),
44848
+ maxCostUsd: number().positive(),
44849
+ maxRuntimeSec: number().int().positive(),
44850
+ idempotencyKey: string().min(8).max(80)
44851
+ }), discriminatedUnion("kind", [object({
44852
+ kind: literal("started"),
44853
+ batchId: string(),
44854
+ jobs: array(TrainingJobSchema).min(1).readonly()
44855
+ }), object({
44856
+ kind: literal("refused"),
44857
+ reason: TrainingRefusalReasonSchema,
44858
+ detail: string()
44859
+ })]), {
44860
+ kind: "mutation",
44861
+ auth: "admin",
44862
+ timeoutMs: 12e4
44629
44863
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
44630
44864
  kind: "mutation",
44631
44865
  auth: "admin",
@@ -50210,6 +50444,36 @@ Object.freeze({
50210
50444
  addonId: null,
50211
50445
  access: "view"
50212
50446
  },
50447
+ "oidcConnections.connectionFormSchema": {
50448
+ capName: "oidc-connections",
50449
+ capScope: "system",
50450
+ addonId: null,
50451
+ access: "view"
50452
+ },
50453
+ "oidcConnections.createConnection": {
50454
+ capName: "oidc-connections",
50455
+ capScope: "system",
50456
+ addonId: null,
50457
+ access: "create"
50458
+ },
50459
+ "oidcConnections.deleteConnection": {
50460
+ capName: "oidc-connections",
50461
+ capScope: "system",
50462
+ addonId: null,
50463
+ access: "delete"
50464
+ },
50465
+ "oidcConnections.listConnections": {
50466
+ capName: "oidc-connections",
50467
+ capScope: "system",
50468
+ addonId: null,
50469
+ access: "view"
50470
+ },
50471
+ "oidcConnections.updateConnection": {
50472
+ capName: "oidc-connections",
50473
+ capScope: "system",
50474
+ addonId: null,
50475
+ access: "create"
50476
+ },
50213
50477
  "osd.getStatus": {
50214
50478
  capName: "osd",
50215
50479
  capScope: "device",
@@ -50282,6 +50546,12 @@ Object.freeze({
50282
50546
  addonId: null,
50283
50547
  access: "create"
50284
50548
  },
50549
+ "osdManager.setSlotCameraEnabled": {
50550
+ capName: "osd-manager",
50551
+ capScope: "system",
50552
+ addonId: null,
50553
+ access: "create"
50554
+ },
50285
50555
  "osdManager.upsertTemplate": {
50286
50556
  capName: "osd-manager",
50287
50557
  capScope: "system",
@@ -50420,12 +50690,6 @@ Object.freeze({
50420
50690
  addonId: null,
50421
50691
  access: "create"
50422
50692
  },
50423
- "pipelineAnalytics.createRetrainDatasetVersion": {
50424
- capName: "pipeline-analytics",
50425
- capScope: "device",
50426
- addonId: null,
50427
- access: "create"
50428
- },
50429
50693
  "pipelineAnalytics.deleteDeviceEvents": {
50430
50694
  capName: "pipeline-analytics",
50431
50695
  capScope: "device",
@@ -50438,12 +50702,6 @@ Object.freeze({
50438
50702
  addonId: null,
50439
50703
  access: "delete"
50440
50704
  },
50441
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
50442
- capName: "pipeline-analytics",
50443
- capScope: "device",
50444
- addonId: null,
50445
- access: "delete"
50446
- },
50447
50705
  "pipelineAnalytics.deleteTracks": {
50448
50706
  capName: "pipeline-analytics",
50449
50707
  capScope: "device",
@@ -50546,6 +50804,12 @@ Object.freeze({
50546
50804
  addonId: null,
50547
50805
  access: "view"
50548
50806
  },
50807
+ "pipelineAnalytics.getRetrainCorpusKpi": {
50808
+ capName: "pipeline-analytics",
50809
+ capScope: "device",
50810
+ addonId: null,
50811
+ access: "view"
50812
+ },
50549
50813
  "pipelineAnalytics.getRetrainExportUrl": {
50550
50814
  capName: "pipeline-analytics",
50551
50815
  capScope: "device",
@@ -50666,7 +50930,7 @@ Object.freeze({
50666
50930
  addonId: null,
50667
50931
  access: "view"
50668
50932
  },
50669
- "pipelineAnalytics.listRetrainDatasetVersions": {
50933
+ "pipelineAnalytics.listRetrainCorpusPage": {
50670
50934
  capName: "pipeline-analytics",
50671
50935
  capScope: "device",
50672
50936
  addonId: null,
@@ -50720,12 +50984,6 @@ Object.freeze({
50720
50984
  addonId: null,
50721
50985
  access: "create"
50722
50986
  },
50723
- "pipelineAnalytics.previewRetrainDataset": {
50724
- capName: "pipeline-analytics",
50725
- capScope: "device",
50726
- addonId: null,
50727
- access: "view"
50728
- },
50729
50987
  "pipelineAnalytics.proposeRetrainAnnotations": {
50730
50988
  capName: "pipeline-analytics",
50731
50989
  capScope: "device",
@@ -50804,6 +51062,12 @@ Object.freeze({
50804
51062
  addonId: null,
50805
51063
  access: "create"
50806
51064
  },
51065
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
51066
+ capName: "pipeline-analytics",
51067
+ capScope: "device",
51068
+ addonId: null,
51069
+ access: "view"
51070
+ },
50807
51071
  "pipelineAnalytics.restageRetrainTrack": {
50808
51072
  capName: "pipeline-analytics",
50809
51073
  capScope: "device",
@@ -50864,12 +51128,6 @@ Object.freeze({
50864
51128
  addonId: null,
50865
51129
  access: "create"
50866
51130
  },
50867
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
50868
- capName: "pipeline-analytics",
50869
- capScope: "device",
50870
- addonId: null,
50871
- access: "view"
50872
- },
50873
51131
  "pipelineAnalytics.wipeAllAnalytics": {
50874
51132
  capName: "pipeline-analytics",
50875
51133
  capScope: "device",
@@ -53264,18 +53522,6 @@ Object.freeze({
53264
53522
  addonId: null,
53265
53523
  access: "create"
53266
53524
  },
53267
- "training.findDatasetVersionIdByName": {
53268
- capName: "training",
53269
- capScope: "system",
53270
- addonId: null,
53271
- access: "view"
53272
- },
53273
- "training.getDatasetVersion": {
53274
- capName: "training",
53275
- capScope: "system",
53276
- addonId: null,
53277
- access: "view"
53278
- },
53279
53525
  "training.getJob": {
53280
53526
  capName: "training",
53281
53527
  capScope: "system",
@@ -53294,12 +53540,6 @@ Object.freeze({
53294
53540
  addonId: null,
53295
53541
  access: "view"
53296
53542
  },
53297
- "training.listDatasetVersions": {
53298
- capName: "training",
53299
- capScope: "system",
53300
- addonId: null,
53301
- access: "view"
53302
- },
53303
53543
  "training.listJobs": {
53304
53544
  capName: "training",
53305
53545
  capScope: "system",
@@ -53312,54 +53552,66 @@ Object.freeze({
53312
53552
  addonId: null,
53313
53553
  access: "view"
53314
53554
  },
53315
- "training.putDatasetVersion": {
53555
+ "training.registerResult": {
53316
53556
  capName: "training",
53317
53557
  capScope: "system",
53318
53558
  addonId: null,
53319
53559
  access: "create"
53320
53560
  },
53321
- "training.registerResult": {
53561
+ "training.rollbackCanary": {
53322
53562
  capName: "training",
53323
53563
  capScope: "system",
53324
53564
  addonId: null,
53325
53565
  access: "create"
53326
53566
  },
53327
- "training.removeDatasetVersion": {
53567
+ "training.startJob": {
53328
53568
  capName: "training",
53329
53569
  capScope: "system",
53330
53570
  addonId: null,
53331
- access: "delete"
53571
+ access: "create"
53332
53572
  },
53333
- "training.rollbackCanary": {
53573
+ "training.startJobBatch": {
53334
53574
  capName: "training",
53335
53575
  capScope: "system",
53336
53576
  addonId: null,
53337
53577
  access: "create"
53338
53578
  },
53339
- "training.startJob": {
53340
- capName: "training",
53579
+ "trainingProvider.cancelJob": {
53580
+ capName: "training-provider",
53341
53581
  capScope: "system",
53342
53582
  addonId: null,
53343
53583
  access: "create"
53344
53584
  },
53345
- "trainingProvider.cancelJob": {
53585
+ "trainingProvider.cleanupJob": {
53346
53586
  capName: "training-provider",
53347
53587
  capScope: "system",
53348
53588
  addonId: null,
53349
53589
  access: "create"
53350
53590
  },
53351
- "trainingProvider.cleanupJob": {
53591
+ "trainingProvider.createEntry": {
53352
53592
  capName: "training-provider",
53353
53593
  capScope: "system",
53354
53594
  addonId: null,
53355
53595
  access: "create"
53356
53596
  },
53597
+ "trainingProvider.deleteEntry": {
53598
+ capName: "training-provider",
53599
+ capScope: "system",
53600
+ addonId: null,
53601
+ access: "delete"
53602
+ },
53357
53603
  "trainingProvider.describe": {
53358
53604
  capName: "training-provider",
53359
53605
  capScope: "system",
53360
53606
  addonId: null,
53361
53607
  access: "view"
53362
53608
  },
53609
+ "trainingProvider.describeTypes": {
53610
+ capName: "training-provider",
53611
+ capScope: "system",
53612
+ addonId: null,
53613
+ access: "view"
53614
+ },
53363
53615
  "trainingProvider.estimateJob": {
53364
53616
  capName: "training-provider",
53365
53617
  capScope: "system",
@@ -53372,6 +53624,12 @@ Object.freeze({
53372
53624
  addonId: null,
53373
53625
  access: "view"
53374
53626
  },
53627
+ "trainingProvider.listEntries": {
53628
+ capName: "training-provider",
53629
+ capScope: "system",
53630
+ addonId: null,
53631
+ access: "view"
53632
+ },
53375
53633
  "trainingProvider.listJobEvents": {
53376
53634
  capName: "training-provider",
53377
53635
  capScope: "system",
@@ -53402,6 +53660,12 @@ Object.freeze({
53402
53660
  addonId: null,
53403
53661
  access: "create"
53404
53662
  },
53663
+ "trainingProvider.updateEntry": {
53664
+ capName: "training-provider",
53665
+ capScope: "system",
53666
+ addonId: null,
53667
+ access: "create"
53668
+ },
53405
53669
  "trainingProvider.uploadDataset": {
53406
53670
  capName: "training-provider",
53407
53671
  capScope: "system",
@@ -56760,6 +57024,11 @@ Object.freeze({
56760
57024
  form: "single",
56761
57025
  optional: false
56762
57026
  }],
57027
+ "osdManager.setSlotCameraEnabled": [{
57028
+ name: "deviceId",
57029
+ form: "single",
57030
+ optional: false
57031
+ }],
56763
57032
  "petFeeder.callPet": [{
56764
57033
  name: "deviceId",
56765
57034
  form: "single",
@@ -56980,6 +57249,11 @@ Object.freeze({
56980
57249
  form: "array",
56981
57250
  optional: false
56982
57251
  }],
57252
+ "pipelineAnalytics.listRetrainCorpusPage": [{
57253
+ name: "deviceIds",
57254
+ form: "array",
57255
+ optional: true
57256
+ }],
56983
57257
  "pipelineAnalytics.listRetrainStaging": [{
56984
57258
  name: "deviceIds",
56985
57259
  form: "array",
@@ -58089,6 +58363,7 @@ Object.freeze({
58089
58363
  });
58090
58364
  Object.freeze({
58091
58365
  "broker": "broker",
58366
+ "calendar-source": "calendar",
58092
58367
  "device-export": "device-export",
58093
58368
  "llm": "ai",
58094
58369
  "mesh-network": "mesh",