@camstack/addon-provider-reolink 1.2.181 → 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 +422 -139
  2. package/dist/addon.mjs +422 -139
  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()
@@ -37942,7 +38048,13 @@ var TopologyNodeSchema = object({
37942
38048
  })).readonly(),
37943
38049
  processes: array(TopologyProcessSchema).readonly(),
37944
38050
  categories: array(TopologyCategorySchema).readonly(),
37945
- rootPackage: TopologyRootPackageSchema.nullable()
38051
+ rootPackage: TopologyRootPackageSchema.nullable(),
38052
+ /**
38053
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
38054
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
38055
+ * for offline rows and when the hub cannot tell.
38056
+ */
38057
+ meshTransport: _enum(["tls", "clear"]).optional()
37946
38058
  });
37947
38059
  var CapUsageEdgeSchema = object({
37948
38060
  callerAddonId: string(),
@@ -38401,6 +38513,7 @@ var OsdNamedTemplateSchema = object({
38401
38513
  });
38402
38514
  /** Where a slot's value comes from. */
38403
38515
  var OsdSourceSchema = discriminatedUnion("kind", [
38516
+ object({ kind: literal("none") }),
38404
38517
  object({
38405
38518
  kind: literal("static"),
38406
38519
  text: string().max(64)
@@ -38527,6 +38640,13 @@ method(object({ deviceId: number().int() }), object({
38527
38640
  }), object({ success: literal(true) }), {
38528
38641
  kind: "mutation",
38529
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"
38530
38650
  }), method(object({
38531
38651
  sourceDeviceId: number().int(),
38532
38652
  targetDeviceId: number().int()
@@ -38958,7 +39078,15 @@ var GpuInfoSchema = object({
38958
39078
  name: string(),
38959
39079
  memoryMB: number().optional()
38960
39080
  });
38961
- 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
+ });
38962
39090
  var CoralInfoSchema = object({
38963
39091
  type: literal("coral-edgetpu"),
38964
39092
  bus: string().optional()
@@ -44205,9 +44333,11 @@ var zoneRulesCapability = {
44205
44333
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
44206
44334
  * manifest entry and nothing else.
44207
44335
  *
44208
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
44209
- * `notification-output` posture); `describe` concat-fans across providers.
44210
- * 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.
44211
44341
  *
44212
44342
  * Every cloud object a provider creates is tagged with the orchestrator's
44213
44343
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -44231,8 +44361,8 @@ var TrainingRegionOptionSchema = object({
44231
44361
  priceMultiplier: number().positive()
44232
44362
  });
44233
44363
  /**
44234
- * The provider's per-account settings, as the orchestrator reads them. They
44235
- * 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
44236
44366
  * depend on the user's account), never hard-coded in the orchestrator.
44237
44367
  */
44238
44368
  var TrainingProviderDefaultsSchema = object({
@@ -44243,9 +44373,44 @@ var TrainingProviderDefaultsSchema = object({
44243
44373
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
44244
44374
  failedDatasetGraceHours: number().nonnegative()
44245
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
+ });
44246
44406
  var TrainingProviderDescriptorSchema = object({
44247
44407
  addonId: string(),
44248
- /** `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. */
44249
44414
  kind: string(),
44250
44415
  label: string(),
44251
44416
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -44257,7 +44422,30 @@ var TrainingProviderDescriptorSchema = object({
44257
44422
  dataResidencyNote: string(),
44258
44423
  /** Credentials are present — never the values. */
44259
44424
  configured: boolean(),
44260
- 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()
44261
44449
  });
44262
44450
  var TrainingCredentialCheckSchema = object({
44263
44451
  ok: boolean(),
@@ -44309,20 +44497,33 @@ var TrainerSourceRefSchema = object({
44309
44497
  /** A commit sha (never a branch) — the job must be reproducible. */
44310
44498
  revision: string().regex(/^[0-9a-f]{7,64}$/)
44311
44499
  });
44500
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
44312
44501
  var JobRef = {
44313
- addonId: string(),
44502
+ entryId: string().min(1),
44314
44503
  jobKey: string().uuid()
44315
44504
  };
44316
44505
  var TrainingLogLineSchema = object({
44317
44506
  ts: number(),
44318
44507
  text: string()
44319
44508
  });
44320
- 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, {
44321
44522
  kind: "mutation",
44322
44523
  auth: "admin",
44323
44524
  timeoutMs: 3e4
44324
44525
  }), method(object({
44325
- addonId: string(),
44526
+ entryId: string().min(1),
44326
44527
  gpuType: string(),
44327
44528
  region: string(),
44328
44529
  datasetBytes: number().int().nonnegative(),
@@ -44388,7 +44589,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44388
44589
  kind: "mutation",
44389
44590
  auth: "admin",
44390
44591
  timeoutMs: 5 * 6e4
44391
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
44592
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
44392
44593
  auth: "admin",
44393
44594
  timeoutMs: 2 * 6e4
44394
44595
  });
@@ -44398,20 +44599,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44398
44599
  *
44399
44600
  * It owns what every provider must agree on, written once:
44400
44601
  *
44401
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
44402
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
44403
- * the export plan) and reaches this store through the five row methods
44404
- * below, so the Retrain page and the export did not change.
44405
44602
  * - **Jobs.** A persisted state machine, a reconcile loop against the
44406
44603
  * provider, a cost guard, a daily orphan sweep and the retention rules.
44407
44604
  * - **The return flow.** Verified artefacts → Model Studio
44408
44605
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
44409
44606
  * rollback. Nothing is ever registered automatically.
44410
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
+ *
44411
44612
  * Every method is `admin`.
44412
44613
  */
44413
- /** A version WITH its frame list — what the export and a job read. */
44414
- 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
+ });
44415
44627
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
44416
44628
  var TrainingBaseModelSchema = object({
44417
44629
  modelId: string(),
@@ -44429,9 +44641,13 @@ var TrainingPresetSchema = _enum([
44429
44641
  "thorough"
44430
44642
  ]);
44431
44643
  var TrainingJobRequestSchema = object({
44432
- datasetVersionId: string().min(1),
44433
- /** The `training-provider` addon that runs it. */
44434
- 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),
44435
44651
  gpuType: string().min(1),
44436
44652
  region: string(),
44437
44653
  baseModelId: string().min(1),
@@ -44490,6 +44706,7 @@ var TrainingJobPlanSchema = object({
44490
44706
  * result lives after the operator acted on it.
44491
44707
  */
44492
44708
  var TrainingJobStateSchema = _enum([
44709
+ "queued",
44493
44710
  "uploading",
44494
44711
  "submitted",
44495
44712
  "starting",
@@ -44543,6 +44760,11 @@ var TrainingJobSchema = object({
44543
44760
  createdAt: number(),
44544
44761
  updatedAt: number(),
44545
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),
44546
44768
  stage: TrainingStageSchema.nullable(),
44547
44769
  failure: object({
44548
44770
  reason: TrainingFailureReasonSchema,
@@ -44554,6 +44776,12 @@ var TrainingJobSchema = object({
44554
44776
  maxRuntimeSec: number().int().positive(),
44555
44777
  trainer: TrainerSourceRefSchema,
44556
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(),
44557
44785
  dataset: object({
44558
44786
  bytes: number().int(),
44559
44787
  sha256: string(),
@@ -44595,13 +44823,7 @@ var TrainingJobSchema = object({
44595
44823
  canary: TrainingCanarySchema.nullable()
44596
44824
  });
44597
44825
  var IdInput = object({ id: string().min(1) });
44598
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44599
- kind: "mutation",
44600
- auth: "admin"
44601
- }), 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() }), {
44602
- kind: "mutation",
44603
- auth: "admin"
44604
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44826
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44605
44827
  auth: "admin",
44606
44828
  timeoutMs: 6e4
44607
44829
  }), method(TrainingJobRequestSchema.extend({
@@ -44620,6 +44842,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44620
44842
  kind: "mutation",
44621
44843
  auth: "admin",
44622
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
44623
44863
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
44624
44864
  kind: "mutation",
44625
44865
  auth: "admin",
@@ -50204,6 +50444,36 @@ Object.freeze({
50204
50444
  addonId: null,
50205
50445
  access: "view"
50206
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
+ },
50207
50477
  "osd.getStatus": {
50208
50478
  capName: "osd",
50209
50479
  capScope: "device",
@@ -50276,6 +50546,12 @@ Object.freeze({
50276
50546
  addonId: null,
50277
50547
  access: "create"
50278
50548
  },
50549
+ "osdManager.setSlotCameraEnabled": {
50550
+ capName: "osd-manager",
50551
+ capScope: "system",
50552
+ addonId: null,
50553
+ access: "create"
50554
+ },
50279
50555
  "osdManager.upsertTemplate": {
50280
50556
  capName: "osd-manager",
50281
50557
  capScope: "system",
@@ -50414,12 +50690,6 @@ Object.freeze({
50414
50690
  addonId: null,
50415
50691
  access: "create"
50416
50692
  },
50417
- "pipelineAnalytics.createRetrainDatasetVersion": {
50418
- capName: "pipeline-analytics",
50419
- capScope: "device",
50420
- addonId: null,
50421
- access: "create"
50422
- },
50423
50693
  "pipelineAnalytics.deleteDeviceEvents": {
50424
50694
  capName: "pipeline-analytics",
50425
50695
  capScope: "device",
@@ -50432,12 +50702,6 @@ Object.freeze({
50432
50702
  addonId: null,
50433
50703
  access: "delete"
50434
50704
  },
50435
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
50436
- capName: "pipeline-analytics",
50437
- capScope: "device",
50438
- addonId: null,
50439
- access: "delete"
50440
- },
50441
50705
  "pipelineAnalytics.deleteTracks": {
50442
50706
  capName: "pipeline-analytics",
50443
50707
  capScope: "device",
@@ -50540,6 +50804,12 @@ Object.freeze({
50540
50804
  addonId: null,
50541
50805
  access: "view"
50542
50806
  },
50807
+ "pipelineAnalytics.getRetrainCorpusKpi": {
50808
+ capName: "pipeline-analytics",
50809
+ capScope: "device",
50810
+ addonId: null,
50811
+ access: "view"
50812
+ },
50543
50813
  "pipelineAnalytics.getRetrainExportUrl": {
50544
50814
  capName: "pipeline-analytics",
50545
50815
  capScope: "device",
@@ -50660,7 +50930,7 @@ Object.freeze({
50660
50930
  addonId: null,
50661
50931
  access: "view"
50662
50932
  },
50663
- "pipelineAnalytics.listRetrainDatasetVersions": {
50933
+ "pipelineAnalytics.listRetrainCorpusPage": {
50664
50934
  capName: "pipeline-analytics",
50665
50935
  capScope: "device",
50666
50936
  addonId: null,
@@ -50714,12 +50984,6 @@ Object.freeze({
50714
50984
  addonId: null,
50715
50985
  access: "create"
50716
50986
  },
50717
- "pipelineAnalytics.previewRetrainDataset": {
50718
- capName: "pipeline-analytics",
50719
- capScope: "device",
50720
- addonId: null,
50721
- access: "view"
50722
- },
50723
50987
  "pipelineAnalytics.proposeRetrainAnnotations": {
50724
50988
  capName: "pipeline-analytics",
50725
50989
  capScope: "device",
@@ -50798,6 +51062,12 @@ Object.freeze({
50798
51062
  addonId: null,
50799
51063
  access: "create"
50800
51064
  },
51065
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
51066
+ capName: "pipeline-analytics",
51067
+ capScope: "device",
51068
+ addonId: null,
51069
+ access: "view"
51070
+ },
50801
51071
  "pipelineAnalytics.restageRetrainTrack": {
50802
51072
  capName: "pipeline-analytics",
50803
51073
  capScope: "device",
@@ -50858,12 +51128,6 @@ Object.freeze({
50858
51128
  addonId: null,
50859
51129
  access: "create"
50860
51130
  },
50861
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
50862
- capName: "pipeline-analytics",
50863
- capScope: "device",
50864
- addonId: null,
50865
- access: "view"
50866
- },
50867
51131
  "pipelineAnalytics.wipeAllAnalytics": {
50868
51132
  capName: "pipeline-analytics",
50869
51133
  capScope: "device",
@@ -53258,18 +53522,6 @@ Object.freeze({
53258
53522
  addonId: null,
53259
53523
  access: "create"
53260
53524
  },
53261
- "training.findDatasetVersionIdByName": {
53262
- capName: "training",
53263
- capScope: "system",
53264
- addonId: null,
53265
- access: "view"
53266
- },
53267
- "training.getDatasetVersion": {
53268
- capName: "training",
53269
- capScope: "system",
53270
- addonId: null,
53271
- access: "view"
53272
- },
53273
53525
  "training.getJob": {
53274
53526
  capName: "training",
53275
53527
  capScope: "system",
@@ -53288,12 +53540,6 @@ Object.freeze({
53288
53540
  addonId: null,
53289
53541
  access: "view"
53290
53542
  },
53291
- "training.listDatasetVersions": {
53292
- capName: "training",
53293
- capScope: "system",
53294
- addonId: null,
53295
- access: "view"
53296
- },
53297
53543
  "training.listJobs": {
53298
53544
  capName: "training",
53299
53545
  capScope: "system",
@@ -53306,54 +53552,66 @@ Object.freeze({
53306
53552
  addonId: null,
53307
53553
  access: "view"
53308
53554
  },
53309
- "training.putDatasetVersion": {
53555
+ "training.registerResult": {
53310
53556
  capName: "training",
53311
53557
  capScope: "system",
53312
53558
  addonId: null,
53313
53559
  access: "create"
53314
53560
  },
53315
- "training.registerResult": {
53561
+ "training.rollbackCanary": {
53316
53562
  capName: "training",
53317
53563
  capScope: "system",
53318
53564
  addonId: null,
53319
53565
  access: "create"
53320
53566
  },
53321
- "training.removeDatasetVersion": {
53567
+ "training.startJob": {
53322
53568
  capName: "training",
53323
53569
  capScope: "system",
53324
53570
  addonId: null,
53325
- access: "delete"
53571
+ access: "create"
53326
53572
  },
53327
- "training.rollbackCanary": {
53573
+ "training.startJobBatch": {
53328
53574
  capName: "training",
53329
53575
  capScope: "system",
53330
53576
  addonId: null,
53331
53577
  access: "create"
53332
53578
  },
53333
- "training.startJob": {
53334
- capName: "training",
53579
+ "trainingProvider.cancelJob": {
53580
+ capName: "training-provider",
53335
53581
  capScope: "system",
53336
53582
  addonId: null,
53337
53583
  access: "create"
53338
53584
  },
53339
- "trainingProvider.cancelJob": {
53585
+ "trainingProvider.cleanupJob": {
53340
53586
  capName: "training-provider",
53341
53587
  capScope: "system",
53342
53588
  addonId: null,
53343
53589
  access: "create"
53344
53590
  },
53345
- "trainingProvider.cleanupJob": {
53591
+ "trainingProvider.createEntry": {
53346
53592
  capName: "training-provider",
53347
53593
  capScope: "system",
53348
53594
  addonId: null,
53349
53595
  access: "create"
53350
53596
  },
53597
+ "trainingProvider.deleteEntry": {
53598
+ capName: "training-provider",
53599
+ capScope: "system",
53600
+ addonId: null,
53601
+ access: "delete"
53602
+ },
53351
53603
  "trainingProvider.describe": {
53352
53604
  capName: "training-provider",
53353
53605
  capScope: "system",
53354
53606
  addonId: null,
53355
53607
  access: "view"
53356
53608
  },
53609
+ "trainingProvider.describeTypes": {
53610
+ capName: "training-provider",
53611
+ capScope: "system",
53612
+ addonId: null,
53613
+ access: "view"
53614
+ },
53357
53615
  "trainingProvider.estimateJob": {
53358
53616
  capName: "training-provider",
53359
53617
  capScope: "system",
@@ -53366,6 +53624,12 @@ Object.freeze({
53366
53624
  addonId: null,
53367
53625
  access: "view"
53368
53626
  },
53627
+ "trainingProvider.listEntries": {
53628
+ capName: "training-provider",
53629
+ capScope: "system",
53630
+ addonId: null,
53631
+ access: "view"
53632
+ },
53369
53633
  "trainingProvider.listJobEvents": {
53370
53634
  capName: "training-provider",
53371
53635
  capScope: "system",
@@ -53396,6 +53660,12 @@ Object.freeze({
53396
53660
  addonId: null,
53397
53661
  access: "create"
53398
53662
  },
53663
+ "trainingProvider.updateEntry": {
53664
+ capName: "training-provider",
53665
+ capScope: "system",
53666
+ addonId: null,
53667
+ access: "create"
53668
+ },
53399
53669
  "trainingProvider.uploadDataset": {
53400
53670
  capName: "training-provider",
53401
53671
  capScope: "system",
@@ -56754,6 +57024,11 @@ Object.freeze({
56754
57024
  form: "single",
56755
57025
  optional: false
56756
57026
  }],
57027
+ "osdManager.setSlotCameraEnabled": [{
57028
+ name: "deviceId",
57029
+ form: "single",
57030
+ optional: false
57031
+ }],
56757
57032
  "petFeeder.callPet": [{
56758
57033
  name: "deviceId",
56759
57034
  form: "single",
@@ -56974,6 +57249,11 @@ Object.freeze({
56974
57249
  form: "array",
56975
57250
  optional: false
56976
57251
  }],
57252
+ "pipelineAnalytics.listRetrainCorpusPage": [{
57253
+ name: "deviceIds",
57254
+ form: "array",
57255
+ optional: true
57256
+ }],
56977
57257
  "pipelineAnalytics.listRetrainStaging": [{
56978
57258
  name: "deviceIds",
56979
57259
  form: "array",
@@ -58083,6 +58363,7 @@ Object.freeze({
58083
58363
  });
58084
58364
  Object.freeze({
58085
58365
  "broker": "broker",
58366
+ "calendar-source": "calendar",
58086
58367
  "device-export": "device-export",
58087
58368
  "llm": "ai",
58088
58369
  "mesh-network": "mesh",
@@ -58568,6 +58849,8 @@ var STATE_SUMMARY_VARS = [
58568
58849
  [...RULE_TEXT],
58569
58850
  [...RULE_TEXT],
58570
58851
  [...RULE_TEXT],
58852
+ [...RULE_TEXT],
58853
+ [...RULE_TEXT],
58571
58854
  ([...RULE_TEXT], [...UPDATES]),
58572
58855
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
58573
58856
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),