@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.mjs CHANGED
@@ -5405,7 +5405,7 @@ var ZodIssueCode = {
5405
5405
  var ZodFirstPartyTypeKind;
5406
5406
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5407
5407
  //#endregion
5408
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5408
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5409
5409
  /**
5410
5410
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5411
5411
  * window to float samples (D455).
@@ -9463,6 +9463,16 @@ var CompositionSchema = object({
9463
9463
  seen.add(feature.cap);
9464
9464
  });
9465
9465
  });
9466
+ var NodeColorIdSchema = _enum([
9467
+ "node-a",
9468
+ "node-b",
9469
+ "node-c",
9470
+ "node-d",
9471
+ "node-e",
9472
+ "node-f",
9473
+ "node-g",
9474
+ "node-h"
9475
+ ]);
9466
9476
  new Set([
9467
9477
  "track",
9468
9478
  "face",
@@ -19176,14 +19186,14 @@ var LlmProfileSchema = object({
19176
19186
  /** ConfigUISchema tree passed through untyped on the wire (the
19177
19187
  * notification-output `ConfigSchemaPassthrough` precedent at
19178
19188
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
19179
- var ConfigSchemaPassthrough$1 = unknown();
19189
+ var ConfigSchemaPassthrough$3 = unknown();
19180
19190
  var LlmProfileKindDescriptorSchema = object({
19181
19191
  kind: LlmProfileKindSchema,
19182
19192
  label: string(),
19183
19193
  icon: string(),
19184
19194
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19185
19195
  addonId: string(),
19186
- configSchema: ConfigSchemaPassthrough$1
19196
+ configSchema: ConfigSchemaPassthrough$3
19187
19197
  });
19188
19198
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
19189
19199
  var LlmDefaultSchema = object({
@@ -20325,7 +20335,7 @@ var TargetKindCapsSchema = object({
20325
20335
  * the union is large and not meant for runtime validation here; the exported
20326
20336
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
20327
20337
  */
20328
- var ConfigSchemaPassthrough = unknown();
20338
+ var ConfigSchemaPassthrough$2 = unknown();
20329
20339
  var TargetKindSchema = object({
20330
20340
  kind: string(),
20331
20341
  label: string(),
@@ -20362,7 +20372,7 @@ var TargetKindSchema = object({
20362
20372
  * its raster path, which is the safe default for an unknown image.
20363
20373
  */
20364
20374
  iconMediaType: string().optional(),
20365
- configSchema: ConfigSchemaPassthrough,
20375
+ configSchema: ConfigSchemaPassthrough$2,
20366
20376
  /**
20367
20377
  * The config keys that decide WHERE this kind's secrets are sent (server,
20368
20378
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23699,6 +23709,61 @@ var OauthIntegrationDescriptorSchema = object({
23699
23709
  });
23700
23710
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
23701
23711
  /**
23712
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23713
+ *
23714
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23715
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23716
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23717
+ * immutable after create.
23718
+ */
23719
+ var ConfigSchemaPassthrough$1 = unknown();
23720
+ var OidcConnectionSchema = object({
23721
+ id: string().min(1),
23722
+ displayName: string(),
23723
+ icon: string(),
23724
+ issuerUrl: string(),
23725
+ clientId: string(),
23726
+ /** Client id + secret present — never the secret value. */
23727
+ configured: boolean(),
23728
+ /**
23729
+ * Values for the connection form schema. `clientSecret` is a keychain
23730
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23731
+ */
23732
+ formValues: record(string(), unknown()).optional()
23733
+ });
23734
+ /**
23735
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23736
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23737
+ */
23738
+ var OidcConnectionUpdateInputSchema = object({
23739
+ id: string().min(1),
23740
+ displayName: string().min(1),
23741
+ icon: string().optional(),
23742
+ issuerUrl: string().optional(),
23743
+ clientId: string().optional(),
23744
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23745
+ redirectUri: string().optional(),
23746
+ scopes: string().optional(),
23747
+ usernameClaim: _enum([
23748
+ "preferred_username",
23749
+ "email",
23750
+ "sub"
23751
+ ]).optional()
23752
+ });
23753
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23754
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23755
+ displayName: string().min(1)
23756
+ }), object({ id: string() }), {
23757
+ kind: "mutation",
23758
+ auth: "admin"
23759
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23760
+ kind: "mutation",
23761
+ auth: "admin"
23762
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23763
+ kind: "mutation",
23764
+ auth: "admin"
23765
+ });
23766
+ /**
23702
23767
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23703
23768
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23704
23769
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -25055,24 +25120,69 @@ var RetrainFrameListSchema = object({
25055
25120
  /** What the page pre-selects — the native key frame when one survives. */
25056
25121
  autoPickMediaId: number().int().optional()
25057
25122
  });
25123
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
25124
+ var RetrainFrameWorkStateSchema = _enum([
25125
+ "unannotated",
25126
+ "annotated",
25127
+ "complete"
25128
+ ]);
25129
+ /**
25130
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
25131
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
25132
+ */
25133
+ var RetrainCorpusFilterSchema = object({
25134
+ workState: RetrainFrameWorkStateSchema.optional(),
25135
+ deviceIds: array(number()).max(500).optional(),
25136
+ /** When set, only frames in this named collection. */
25137
+ collectionId: string().optional(),
25138
+ /** Frames that carry at least one saved annotation in one of these classes. */
25139
+ classes: array(RetrainMacroClassSchema).optional(),
25140
+ page: number().int().positive().default(1),
25141
+ pageSize: number().int().positive().max(100).default(50)
25142
+ });
25143
+ var RetrainCorpusPageSchema = object({
25144
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
25145
+ total: number().int().nonnegative(),
25146
+ page: number().int().positive(),
25147
+ pageSize: number().int().positive()
25148
+ });
25149
+ var RetrainCorpusKpiCameraRowSchema = object({
25150
+ deviceId: number(),
25151
+ unannotated: number().int().nonnegative(),
25152
+ annotated: number().int().nonnegative(),
25153
+ complete: number().int().nonnegative(),
25154
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
25155
+ * `null` when the corpus is empty (no ratio). */
25156
+ pctOfCorpus: number().min(0).max(1).nullable()
25157
+ });
25158
+ var RetrainCorpusKpiSchema = object({
25159
+ total: number().int().nonnegative(),
25160
+ unannotated: number().int().nonnegative(),
25161
+ annotated: number().int().nonnegative(),
25162
+ complete: number().int().nonnegative(),
25163
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
25164
+ });
25058
25165
  /**
25059
25166
  * Which frames an annotated export carries. Every field narrows; an empty
25060
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
25061
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
25062
- * the primitive a version export uses; `batchId` re-selects what an earlier
25063
- * export carried (`exportedInBatch`).
25167
+ * filter is every annotated copy. `frameIds` is the primitive a job or
25168
+ * download uses; `batchId` re-selects what an earlier export carried
25169
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
25170
+ * resolves to `frameIds` at plan/start.
25064
25171
  */
25065
25172
  var RetrainExportFilterSchema = object({
25066
25173
  deviceIds: array(number()).optional(),
25067
25174
  frameIds: array(string()).max(2e4).optional(),
25068
25175
  /** Only frames in at least one of these named collections. */
25069
25176
  collectionIds: array(string()).max(200).optional(),
25070
- /** Exactly the frames of this dataset version (and its completeOnly). An
25071
- * unknown id selects nothing. */
25072
- datasetVersionId: string().optional(),
25177
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
25178
+ collectionId: string().optional(),
25073
25179
  batchId: string().optional(),
25074
25180
  /** Only frames the operator marked complete (all subjects boxed). */
25075
- completeOnly: boolean().optional()
25181
+ completeOnly: boolean().optional(),
25182
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
25183
+ workState: RetrainFrameWorkStateSchema.optional(),
25184
+ /** Frames with at least one saved annotation in one of these classes. */
25185
+ classes: array(RetrainMacroClassSchema).optional()
25076
25186
  });
25077
25187
  /**
25078
25188
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -25272,8 +25382,7 @@ var RetrainDatasetStatsSchema = object({
25272
25382
  completeFrames: number().int()
25273
25383
  })).readonly()
25274
25384
  });
25275
- /** An immutable dataset version, without its frame list. */
25276
- var RetrainDatasetVersionSchema = object({
25385
+ object({
25277
25386
  id: string(),
25278
25387
  name: string(),
25279
25388
  createdAt: number(),
@@ -25281,22 +25390,33 @@ var RetrainDatasetVersionSchema = object({
25281
25390
  layout: RetrainExportLayoutSchema,
25282
25391
  completeOnly: boolean(),
25283
25392
  frameCount: number().int(),
25284
- /** sha256 of what the frames taught when the version was frozen. */
25285
25393
  annotationHash: string(),
25286
- /** The export manifest schema the version was cut under. */
25287
25394
  manifestSchema: string(),
25288
25395
  stats: RetrainDatasetStatsSchema
25289
25396
  });
25290
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
25291
- kind: literal("created"),
25292
- version: RetrainDatasetVersionSchema
25397
+ /**
25398
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
25399
+ * the training cap. Resolved here so plan/start and the annotated export share
25400
+ * one definition of "the frames" (`buildRetrainExportPlan`).
25401
+ */
25402
+ var RetrainTrainingCorpusSelectionSchema = object({
25403
+ collectionIds: array(string()).min(1),
25404
+ workState: _enum([
25405
+ "complete",
25406
+ "annotated_or_complete",
25407
+ "any_annotated"
25408
+ ]).default("complete")
25409
+ });
25410
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
25411
+ kind: literal("resolved"),
25412
+ frameIds: array(string()).max(2e4).readonly(),
25413
+ stats: RetrainDatasetStatsSchema,
25414
+ annotationHash: string(),
25415
+ layout: RetrainExportLayoutSchema
25293
25416
  }), object({
25294
25417
  kind: literal("refused"),
25295
- reason: _enum([
25296
- "empty-name",
25297
- "duplicate-name",
25298
- "no-frames"
25299
- ])
25418
+ reason: _enum(["unknown-collection", "no-frames"]),
25419
+ detail: string()
25300
25420
  })]);
25301
25421
  /** The outcome of a lifecycle move owned by the retrain page. */
25302
25422
  var RetrainTransitionResultSchema = object({
@@ -26003,6 +26123,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26003
26123
  }), array(RetrainTrackSchema).readonly(), {
26004
26124
  kind: "query",
26005
26125
  auth: "admin"
26126
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
26127
+ kind: "query",
26128
+ auth: "admin"
26129
+ }), method(object({}), RetrainCorpusKpiSchema, {
26130
+ kind: "query",
26131
+ auth: "admin"
26006
26132
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
26007
26133
  kind: "query",
26008
26134
  auth: "admin"
@@ -26098,36 +26224,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26098
26224
  kind: "mutation",
26099
26225
  auth: "admin",
26100
26226
  timeoutMs: 12e4
26101
- }), method(object({
26102
- selection: RetrainDatasetSelectionSchema,
26103
- completeOnly: boolean().optional()
26104
- }), RetrainDatasetStatsSchema, {
26105
- kind: "query",
26106
- auth: "admin"
26107
- }), method(object({
26108
- name: string().max(120),
26109
- selection: RetrainDatasetSelectionSchema,
26110
- layout: RetrainExportLayoutSchema,
26111
- completeOnly: boolean()
26112
- }), CreateRetrainDatasetVersionResultSchema, {
26113
- kind: "mutation",
26114
- auth: "admin",
26115
- timeoutMs: 12e4
26116
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
26117
- kind: "query",
26118
- auth: "admin"
26119
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
26120
- kind: "mutation",
26121
- auth: "admin"
26122
- }), method(object({ id: string() }), object({
26123
- found: boolean(),
26124
- annotationHash: string(),
26125
- matches: boolean(),
26126
- missingFrames: number().int()
26127
- }), {
26128
- kind: "query",
26129
- auth: "admin",
26130
- timeoutMs: 12e4
26131
26227
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
26132
26228
  kind: "query",
26133
26229
  auth: "admin"
@@ -26154,6 +26250,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26154
26250
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
26155
26251
  kind: "query",
26156
26252
  auth: "admin"
26253
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
26254
+ kind: "query",
26255
+ auth: "admin",
26256
+ timeoutMs: 6e4
26157
26257
  }), method(object({
26158
26258
  id: string(),
26159
26259
  name: string().max(120)
@@ -26770,11 +26870,14 @@ var HardwareClassIdSchema = _enum([
26770
26870
  "intel-n-series",
26771
26871
  "apple-m-base",
26772
26872
  "apple-m-pro",
26873
+ "amd-phoenix",
26773
26874
  "unknown"
26774
26875
  ]);
26775
26876
  var AcceleratorKindSchema = _enum([
26776
26877
  "intel-npu",
26777
26878
  "intel-igpu",
26879
+ "amd-igpu",
26880
+ "amd-npu",
26778
26881
  "x86-cpu",
26779
26882
  "arm-cpu",
26780
26883
  "apple-ane",
@@ -28704,6 +28807,8 @@ var AgentPipelineSettingsSchema = object({
28704
28807
  * address is wrong (multi-homed host, NAT, custom interface).
28705
28808
  */
28706
28809
  reachableHost: string().optional(),
28810
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28811
+ color: NodeColorIdSchema.optional(),
28707
28812
  /**
28708
28813
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28709
28814
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -29253,8 +29358,9 @@ method(object({
29253
29358
  auth: "admin"
29254
29359
  }), method(object({
29255
29360
  agentNodeId: string(),
29256
- reachableHost: string().nullable()
29257
- }), object({ success: literal(true) }), {
29361
+ reachableHost: string().nullable().optional(),
29362
+ color: NodeColorIdSchema.nullable().optional()
29363
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
29258
29364
  kind: "mutation",
29259
29365
  auth: "admin"
29260
29366
  }), method(object({
@@ -32852,7 +32958,7 @@ var CustomActionInputSchema = object({
32852
32958
  action: string().min(1),
32853
32959
  input: unknown()
32854
32960
  });
32855
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32961
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32856
32962
  addonId: string(),
32857
32963
  limit: number().min(1).max(500).default(100),
32858
32964
  level: LogLevelSchema$2.optional()
@@ -38399,6 +38505,7 @@ var OsdNamedTemplateSchema = object({
38399
38505
  });
38400
38506
  /** Where a slot's value comes from. */
38401
38507
  var OsdSourceSchema = discriminatedUnion("kind", [
38508
+ object({ kind: literal("none") }),
38402
38509
  object({
38403
38510
  kind: literal("static"),
38404
38511
  text: string().max(64)
@@ -38525,6 +38632,13 @@ method(object({ deviceId: number().int() }), object({
38525
38632
  }), object({ success: literal(true) }), {
38526
38633
  kind: "mutation",
38527
38634
  auth: "admin"
38635
+ }), method(object({
38636
+ deviceId: number().int(),
38637
+ slotId: string().min(1),
38638
+ enabled: boolean()
38639
+ }), object({ success: literal(true) }), {
38640
+ kind: "mutation",
38641
+ auth: "admin"
38528
38642
  }), method(object({
38529
38643
  sourceDeviceId: number().int(),
38530
38644
  targetDeviceId: number().int()
@@ -38956,7 +39070,15 @@ var GpuInfoSchema = object({
38956
39070
  name: string(),
38957
39071
  memoryMB: number().optional()
38958
39072
  });
38959
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
39073
+ var NpuInfoSchema = object({
39074
+ type: _enum([
39075
+ "apple-ane",
39076
+ "intel-npu",
39077
+ "amd-xdna"
39078
+ ]),
39079
+ name: string().optional(),
39080
+ generation: _enum(["xdna1", "xdna2"]).optional()
39081
+ });
38960
39082
  var CoralInfoSchema = object({
38961
39083
  type: literal("coral-edgetpu"),
38962
39084
  bus: string().optional()
@@ -44203,9 +44325,11 @@ var zoneRulesCapability = {
44203
44325
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
44204
44326
  * manifest entry and nothing else.
44205
44327
  *
44206
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
44207
- * `notification-output` posture); `describe` concat-fans across providers.
44208
- * Every method is `admin`: these spend money.
44328
+ * Collection of provider **types** (addons). Each addon owns zero or more
44329
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
44330
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
44331
+ * `entryId`; callers also pass the owning `addonId` as the collection
44332
+ * selector (broker posture). Every method is `admin`: these spend money.
44209
44333
  *
44210
44334
  * Every cloud object a provider creates is tagged with the orchestrator's
44211
44335
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -44229,8 +44353,8 @@ var TrainingRegionOptionSchema = object({
44229
44353
  priceMultiplier: number().positive()
44230
44354
  });
44231
44355
  /**
44232
- * The provider's per-account settings, as the orchestrator reads them. They
44233
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
44356
+ * The provider's per-entry settings, as the orchestrator reads them. They
44357
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
44234
44358
  * depend on the user's account), never hard-coded in the orchestrator.
44235
44359
  */
44236
44360
  var TrainingProviderDefaultsSchema = object({
@@ -44241,9 +44365,44 @@ var TrainingProviderDefaultsSchema = object({
44241
44365
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
44242
44366
  failedDatasetGraceHours: number().nonnegative()
44243
44367
  });
44368
+ /**
44369
+ * Entry form schema for a provider type — same seam as notification
44370
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
44371
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
44372
+ */
44373
+ var ConfigSchemaPassthrough = unknown();
44374
+ /** One creatable provider type, for the Add-entry dialog. */
44375
+ var TrainingProviderTypeSchema = object({
44376
+ typeId: string(),
44377
+ label: string(),
44378
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
44379
+ iconAsset: string(),
44380
+ /** Owning `training-provider` addon — collection selector for createEntry. */
44381
+ addonId: string(),
44382
+ /**
44383
+ * Fields for one entry of this type (credentials + defaults). Absent on a
44384
+ * type that only needs a name. Password fields are keychain-backed on the
44385
+ * provider addon (`secretStatePaths`), not D634 plaintext.
44386
+ */
44387
+ configSchema: ConfigSchemaPassthrough.optional()
44388
+ });
44389
+ /** One configured account / workspace under a provider type. */
44390
+ var TrainingProviderEntrySchema = object({
44391
+ entryId: string(),
44392
+ typeId: string(),
44393
+ name: string(),
44394
+ addonId: string(),
44395
+ /** Credentials are present — never the values. */
44396
+ configured: boolean()
44397
+ });
44244
44398
  var TrainingProviderDescriptorSchema = object({
44245
44399
  addonId: string(),
44246
- /** `modal`, `runpod`, `fake`, … */
44400
+ entryId: string(),
44401
+ typeId: string(),
44402
+ /** Operator-chosen entry name. */
44403
+ name: string(),
44404
+ iconAsset: string(),
44405
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
44247
44406
  kind: string(),
44248
44407
  label: string(),
44249
44408
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -44255,7 +44414,30 @@ var TrainingProviderDescriptorSchema = object({
44255
44414
  dataResidencyNote: string(),
44256
44415
  /** Credentials are present — never the values. */
44257
44416
  configured: boolean(),
44258
- defaults: TrainingProviderDefaultsSchema
44417
+ defaults: TrainingProviderDefaultsSchema,
44418
+ /**
44419
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
44420
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
44421
+ * never plaintext. Same hydrate contract as settings forms (D789).
44422
+ */
44423
+ formValues: record(string(), unknown()).optional()
44424
+ });
44425
+ /**
44426
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
44427
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
44428
+ * `{ $secretClear: true }` clears it.
44429
+ */
44430
+ var TrainingProviderUpdateEntryInputSchema = object({
44431
+ entryId: string().min(1),
44432
+ name: string().min(1),
44433
+ tokenId: string().optional(),
44434
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
44435
+ environment: string().optional(),
44436
+ gpuType: string().optional(),
44437
+ region: string().optional(),
44438
+ costCapUsd: number().nonnegative().optional(),
44439
+ maxRuntimeSec: number().int().positive().optional(),
44440
+ failedDatasetGraceHours: number().nonnegative().optional()
44259
44441
  });
44260
44442
  var TrainingCredentialCheckSchema = object({
44261
44443
  ok: boolean(),
@@ -44307,20 +44489,33 @@ var TrainerSourceRefSchema = object({
44307
44489
  /** A commit sha (never a branch) — the job must be reproducible. */
44308
44490
  revision: string().regex(/^[0-9a-f]{7,64}$/)
44309
44491
  });
44492
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
44310
44493
  var JobRef = {
44311
- addonId: string(),
44494
+ entryId: string().min(1),
44312
44495
  jobKey: string().uuid()
44313
44496
  };
44314
44497
  var TrainingLogLineSchema = object({
44315
44498
  ts: number(),
44316
44499
  text: string()
44317
44500
  });
44318
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
44501
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
44502
+ typeId: string().min(1),
44503
+ name: string().min(1)
44504
+ }), object({ entryId: string() }), {
44505
+ kind: "mutation",
44506
+ auth: "admin"
44507
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
44508
+ kind: "mutation",
44509
+ auth: "admin"
44510
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
44511
+ kind: "mutation",
44512
+ auth: "admin"
44513
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
44319
44514
  kind: "mutation",
44320
44515
  auth: "admin",
44321
44516
  timeoutMs: 3e4
44322
44517
  }), method(object({
44323
- addonId: string(),
44518
+ entryId: string().min(1),
44324
44519
  gpuType: string(),
44325
44520
  region: string(),
44326
44521
  datasetBytes: number().int().nonnegative(),
@@ -44386,7 +44581,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44386
44581
  kind: "mutation",
44387
44582
  auth: "admin",
44388
44583
  timeoutMs: 5 * 6e4
44389
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
44584
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
44390
44585
  auth: "admin",
44391
44586
  timeoutMs: 2 * 6e4
44392
44587
  });
@@ -44396,20 +44591,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44396
44591
  *
44397
44592
  * It owns what every provider must agree on, written once:
44398
44593
  *
44399
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
44400
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
44401
- * the export plan) and reaches this store through the five row methods
44402
- * below, so the Retrain page and the export did not change.
44403
44594
  * - **Jobs.** A persisted state machine, a reconcile loop against the
44404
44595
  * provider, a cost guard, a daily orphan sweep and the retention rules.
44405
44596
  * - **The return flow.** Verified artefacts → Model Studio
44406
44597
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
44407
44598
  * rollback. Nothing is ever registered automatically.
44408
44599
  *
44600
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
44601
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
44602
+ * moment and snapshotted on the job. No frozen dataset version.
44603
+ *
44409
44604
  * Every method is `admin`.
44410
44605
  */
44411
- /** A version WITH its frame list — what the export and a job read. */
44412
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
44606
+ /**
44607
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
44608
+ * Frame ids are resolved at plan/start — never a frozen version id.
44609
+ */
44610
+ var TrainingCorpusSelectionSchema = object({
44611
+ collectionIds: array(string()).min(1),
44612
+ /** Default complete-only for v1 */
44613
+ workState: _enum([
44614
+ "complete",
44615
+ "annotated_or_complete",
44616
+ "any_annotated"
44617
+ ]).default("complete")
44618
+ });
44413
44619
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
44414
44620
  var TrainingBaseModelSchema = object({
44415
44621
  modelId: string(),
@@ -44427,9 +44633,13 @@ var TrainingPresetSchema = _enum([
44427
44633
  "thorough"
44428
44634
  ]);
44429
44635
  var TrainingJobRequestSchema = object({
44430
- datasetVersionId: string().min(1),
44431
- /** The `training-provider` addon that runs it. */
44432
- addonId: string().min(1),
44636
+ /** Live collection + work-state criteria; resolved at plan/start. */
44637
+ selection: TrainingCorpusSelectionSchema,
44638
+ /**
44639
+ * The provider **entry** that runs it (credentials + defaults).
44640
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
44641
+ */
44642
+ entryId: string().min(1),
44433
44643
  gpuType: string().min(1),
44434
44644
  region: string(),
44435
44645
  baseModelId: string().min(1),
@@ -44488,6 +44698,7 @@ var TrainingJobPlanSchema = object({
44488
44698
  * result lives after the operator acted on it.
44489
44699
  */
44490
44700
  var TrainingJobStateSchema = _enum([
44701
+ "queued",
44491
44702
  "uploading",
44492
44703
  "submitted",
44493
44704
  "starting",
@@ -44541,6 +44752,11 @@ var TrainingJobSchema = object({
44541
44752
  createdAt: number(),
44542
44753
  updatedAt: number(),
44543
44754
  state: TrainingJobStateSchema,
44755
+ /**
44756
+ * Shared by every job enqueued together via `startJobBatch`.
44757
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
44758
+ */
44759
+ batchId: string().nullable().default(null),
44544
44760
  stage: TrainingStageSchema.nullable(),
44545
44761
  failure: object({
44546
44762
  reason: TrainingFailureReasonSchema,
@@ -44552,6 +44768,12 @@ var TrainingJobSchema = object({
44552
44768
  maxRuntimeSec: number().int().positive(),
44553
44769
  trainer: TrainerSourceRefSchema,
44554
44770
  datasetLayout: RetrainExportLayoutSchema,
44771
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
44772
+ frameCount: number().int().nonnegative(),
44773
+ /** Resolved frame ids at start — the archive ships exactly these. */
44774
+ frameIds: array(string()).max(2e4).readonly(),
44775
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
44776
+ annotationHash: string(),
44555
44777
  dataset: object({
44556
44778
  bytes: number().int(),
44557
44779
  sha256: string(),
@@ -44593,13 +44815,7 @@ var TrainingJobSchema = object({
44593
44815
  canary: TrainingCanarySchema.nullable()
44594
44816
  });
44595
44817
  var IdInput = object({ id: string().min(1) });
44596
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44597
- kind: "mutation",
44598
- auth: "admin"
44599
- }), 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() }), {
44600
- kind: "mutation",
44601
- auth: "admin"
44602
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44818
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44603
44819
  auth: "admin",
44604
44820
  timeoutMs: 6e4
44605
44821
  }), method(TrainingJobRequestSchema.extend({
@@ -44618,6 +44834,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44618
44834
  kind: "mutation",
44619
44835
  auth: "admin",
44620
44836
  timeoutMs: 12e4
44837
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
44838
+ baseModelIds: array(string().min(1)).min(1),
44839
+ name: string().min(1).max(120),
44840
+ maxCostUsd: number().positive(),
44841
+ maxRuntimeSec: number().int().positive(),
44842
+ idempotencyKey: string().min(8).max(80)
44843
+ }), discriminatedUnion("kind", [object({
44844
+ kind: literal("started"),
44845
+ batchId: string(),
44846
+ jobs: array(TrainingJobSchema).min(1).readonly()
44847
+ }), object({
44848
+ kind: literal("refused"),
44849
+ reason: TrainingRefusalReasonSchema,
44850
+ detail: string()
44851
+ })]), {
44852
+ kind: "mutation",
44853
+ auth: "admin",
44854
+ timeoutMs: 12e4
44621
44855
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
44622
44856
  kind: "mutation",
44623
44857
  auth: "admin",
@@ -50202,6 +50436,36 @@ Object.freeze({
50202
50436
  addonId: null,
50203
50437
  access: "view"
50204
50438
  },
50439
+ "oidcConnections.connectionFormSchema": {
50440
+ capName: "oidc-connections",
50441
+ capScope: "system",
50442
+ addonId: null,
50443
+ access: "view"
50444
+ },
50445
+ "oidcConnections.createConnection": {
50446
+ capName: "oidc-connections",
50447
+ capScope: "system",
50448
+ addonId: null,
50449
+ access: "create"
50450
+ },
50451
+ "oidcConnections.deleteConnection": {
50452
+ capName: "oidc-connections",
50453
+ capScope: "system",
50454
+ addonId: null,
50455
+ access: "delete"
50456
+ },
50457
+ "oidcConnections.listConnections": {
50458
+ capName: "oidc-connections",
50459
+ capScope: "system",
50460
+ addonId: null,
50461
+ access: "view"
50462
+ },
50463
+ "oidcConnections.updateConnection": {
50464
+ capName: "oidc-connections",
50465
+ capScope: "system",
50466
+ addonId: null,
50467
+ access: "create"
50468
+ },
50205
50469
  "osd.getStatus": {
50206
50470
  capName: "osd",
50207
50471
  capScope: "device",
@@ -50274,6 +50538,12 @@ Object.freeze({
50274
50538
  addonId: null,
50275
50539
  access: "create"
50276
50540
  },
50541
+ "osdManager.setSlotCameraEnabled": {
50542
+ capName: "osd-manager",
50543
+ capScope: "system",
50544
+ addonId: null,
50545
+ access: "create"
50546
+ },
50277
50547
  "osdManager.upsertTemplate": {
50278
50548
  capName: "osd-manager",
50279
50549
  capScope: "system",
@@ -50412,12 +50682,6 @@ Object.freeze({
50412
50682
  addonId: null,
50413
50683
  access: "create"
50414
50684
  },
50415
- "pipelineAnalytics.createRetrainDatasetVersion": {
50416
- capName: "pipeline-analytics",
50417
- capScope: "device",
50418
- addonId: null,
50419
- access: "create"
50420
- },
50421
50685
  "pipelineAnalytics.deleteDeviceEvents": {
50422
50686
  capName: "pipeline-analytics",
50423
50687
  capScope: "device",
@@ -50430,12 +50694,6 @@ Object.freeze({
50430
50694
  addonId: null,
50431
50695
  access: "delete"
50432
50696
  },
50433
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
50434
- capName: "pipeline-analytics",
50435
- capScope: "device",
50436
- addonId: null,
50437
- access: "delete"
50438
- },
50439
50697
  "pipelineAnalytics.deleteTracks": {
50440
50698
  capName: "pipeline-analytics",
50441
50699
  capScope: "device",
@@ -50538,6 +50796,12 @@ Object.freeze({
50538
50796
  addonId: null,
50539
50797
  access: "view"
50540
50798
  },
50799
+ "pipelineAnalytics.getRetrainCorpusKpi": {
50800
+ capName: "pipeline-analytics",
50801
+ capScope: "device",
50802
+ addonId: null,
50803
+ access: "view"
50804
+ },
50541
50805
  "pipelineAnalytics.getRetrainExportUrl": {
50542
50806
  capName: "pipeline-analytics",
50543
50807
  capScope: "device",
@@ -50658,7 +50922,7 @@ Object.freeze({
50658
50922
  addonId: null,
50659
50923
  access: "view"
50660
50924
  },
50661
- "pipelineAnalytics.listRetrainDatasetVersions": {
50925
+ "pipelineAnalytics.listRetrainCorpusPage": {
50662
50926
  capName: "pipeline-analytics",
50663
50927
  capScope: "device",
50664
50928
  addonId: null,
@@ -50712,12 +50976,6 @@ Object.freeze({
50712
50976
  addonId: null,
50713
50977
  access: "create"
50714
50978
  },
50715
- "pipelineAnalytics.previewRetrainDataset": {
50716
- capName: "pipeline-analytics",
50717
- capScope: "device",
50718
- addonId: null,
50719
- access: "view"
50720
- },
50721
50979
  "pipelineAnalytics.proposeRetrainAnnotations": {
50722
50980
  capName: "pipeline-analytics",
50723
50981
  capScope: "device",
@@ -50796,6 +51054,12 @@ Object.freeze({
50796
51054
  addonId: null,
50797
51055
  access: "create"
50798
51056
  },
51057
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
51058
+ capName: "pipeline-analytics",
51059
+ capScope: "device",
51060
+ addonId: null,
51061
+ access: "view"
51062
+ },
50799
51063
  "pipelineAnalytics.restageRetrainTrack": {
50800
51064
  capName: "pipeline-analytics",
50801
51065
  capScope: "device",
@@ -50856,12 +51120,6 @@ Object.freeze({
50856
51120
  addonId: null,
50857
51121
  access: "create"
50858
51122
  },
50859
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
50860
- capName: "pipeline-analytics",
50861
- capScope: "device",
50862
- addonId: null,
50863
- access: "view"
50864
- },
50865
51123
  "pipelineAnalytics.wipeAllAnalytics": {
50866
51124
  capName: "pipeline-analytics",
50867
51125
  capScope: "device",
@@ -53256,18 +53514,6 @@ Object.freeze({
53256
53514
  addonId: null,
53257
53515
  access: "create"
53258
53516
  },
53259
- "training.findDatasetVersionIdByName": {
53260
- capName: "training",
53261
- capScope: "system",
53262
- addonId: null,
53263
- access: "view"
53264
- },
53265
- "training.getDatasetVersion": {
53266
- capName: "training",
53267
- capScope: "system",
53268
- addonId: null,
53269
- access: "view"
53270
- },
53271
53517
  "training.getJob": {
53272
53518
  capName: "training",
53273
53519
  capScope: "system",
@@ -53286,12 +53532,6 @@ Object.freeze({
53286
53532
  addonId: null,
53287
53533
  access: "view"
53288
53534
  },
53289
- "training.listDatasetVersions": {
53290
- capName: "training",
53291
- capScope: "system",
53292
- addonId: null,
53293
- access: "view"
53294
- },
53295
53535
  "training.listJobs": {
53296
53536
  capName: "training",
53297
53537
  capScope: "system",
@@ -53304,54 +53544,66 @@ Object.freeze({
53304
53544
  addonId: null,
53305
53545
  access: "view"
53306
53546
  },
53307
- "training.putDatasetVersion": {
53547
+ "training.registerResult": {
53308
53548
  capName: "training",
53309
53549
  capScope: "system",
53310
53550
  addonId: null,
53311
53551
  access: "create"
53312
53552
  },
53313
- "training.registerResult": {
53553
+ "training.rollbackCanary": {
53314
53554
  capName: "training",
53315
53555
  capScope: "system",
53316
53556
  addonId: null,
53317
53557
  access: "create"
53318
53558
  },
53319
- "training.removeDatasetVersion": {
53559
+ "training.startJob": {
53320
53560
  capName: "training",
53321
53561
  capScope: "system",
53322
53562
  addonId: null,
53323
- access: "delete"
53563
+ access: "create"
53324
53564
  },
53325
- "training.rollbackCanary": {
53565
+ "training.startJobBatch": {
53326
53566
  capName: "training",
53327
53567
  capScope: "system",
53328
53568
  addonId: null,
53329
53569
  access: "create"
53330
53570
  },
53331
- "training.startJob": {
53332
- capName: "training",
53571
+ "trainingProvider.cancelJob": {
53572
+ capName: "training-provider",
53333
53573
  capScope: "system",
53334
53574
  addonId: null,
53335
53575
  access: "create"
53336
53576
  },
53337
- "trainingProvider.cancelJob": {
53577
+ "trainingProvider.cleanupJob": {
53338
53578
  capName: "training-provider",
53339
53579
  capScope: "system",
53340
53580
  addonId: null,
53341
53581
  access: "create"
53342
53582
  },
53343
- "trainingProvider.cleanupJob": {
53583
+ "trainingProvider.createEntry": {
53344
53584
  capName: "training-provider",
53345
53585
  capScope: "system",
53346
53586
  addonId: null,
53347
53587
  access: "create"
53348
53588
  },
53589
+ "trainingProvider.deleteEntry": {
53590
+ capName: "training-provider",
53591
+ capScope: "system",
53592
+ addonId: null,
53593
+ access: "delete"
53594
+ },
53349
53595
  "trainingProvider.describe": {
53350
53596
  capName: "training-provider",
53351
53597
  capScope: "system",
53352
53598
  addonId: null,
53353
53599
  access: "view"
53354
53600
  },
53601
+ "trainingProvider.describeTypes": {
53602
+ capName: "training-provider",
53603
+ capScope: "system",
53604
+ addonId: null,
53605
+ access: "view"
53606
+ },
53355
53607
  "trainingProvider.estimateJob": {
53356
53608
  capName: "training-provider",
53357
53609
  capScope: "system",
@@ -53364,6 +53616,12 @@ Object.freeze({
53364
53616
  addonId: null,
53365
53617
  access: "view"
53366
53618
  },
53619
+ "trainingProvider.listEntries": {
53620
+ capName: "training-provider",
53621
+ capScope: "system",
53622
+ addonId: null,
53623
+ access: "view"
53624
+ },
53367
53625
  "trainingProvider.listJobEvents": {
53368
53626
  capName: "training-provider",
53369
53627
  capScope: "system",
@@ -53394,6 +53652,12 @@ Object.freeze({
53394
53652
  addonId: null,
53395
53653
  access: "create"
53396
53654
  },
53655
+ "trainingProvider.updateEntry": {
53656
+ capName: "training-provider",
53657
+ capScope: "system",
53658
+ addonId: null,
53659
+ access: "create"
53660
+ },
53397
53661
  "trainingProvider.uploadDataset": {
53398
53662
  capName: "training-provider",
53399
53663
  capScope: "system",
@@ -56752,6 +57016,11 @@ Object.freeze({
56752
57016
  form: "single",
56753
57017
  optional: false
56754
57018
  }],
57019
+ "osdManager.setSlotCameraEnabled": [{
57020
+ name: "deviceId",
57021
+ form: "single",
57022
+ optional: false
57023
+ }],
56755
57024
  "petFeeder.callPet": [{
56756
57025
  name: "deviceId",
56757
57026
  form: "single",
@@ -56972,6 +57241,11 @@ Object.freeze({
56972
57241
  form: "array",
56973
57242
  optional: false
56974
57243
  }],
57244
+ "pipelineAnalytics.listRetrainCorpusPage": [{
57245
+ name: "deviceIds",
57246
+ form: "array",
57247
+ optional: true
57248
+ }],
56975
57249
  "pipelineAnalytics.listRetrainStaging": [{
56976
57250
  name: "deviceIds",
56977
57251
  form: "array",
@@ -58081,6 +58355,7 @@ Object.freeze({
58081
58355
  });
58082
58356
  Object.freeze({
58083
58357
  "broker": "broker",
58358
+ "calendar-source": "calendar",
58084
58359
  "device-export": "device-export",
58085
58360
  "llm": "ai",
58086
58361
  "mesh-network": "mesh",