@camstack/addon-provider-tuya 0.2.123 → 0.2.124

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.mjs CHANGED
@@ -6196,7 +6196,7 @@ var ZodIssueCode = {
6196
6196
  var ZodFirstPartyTypeKind;
6197
6197
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6198
6198
  //#endregion
6199
- //#region ../types/dist/sleep-r3RWkGVx.mjs
6199
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
6200
6200
  /**
6201
6201
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6202
6202
  * window to float samples (D455).
@@ -10202,6 +10202,16 @@ var CompositionSchema = object({
10202
10202
  seen.add(feature.cap);
10203
10203
  });
10204
10204
  });
10205
+ var NodeColorIdSchema = _enum([
10206
+ "node-a",
10207
+ "node-b",
10208
+ "node-c",
10209
+ "node-d",
10210
+ "node-e",
10211
+ "node-f",
10212
+ "node-g",
10213
+ "node-h"
10214
+ ]);
10205
10215
  new Set([
10206
10216
  "track",
10207
10217
  "face",
@@ -19248,14 +19258,14 @@ var LlmProfileSchema = object({
19248
19258
  /** ConfigUISchema tree passed through untyped on the wire (the
19249
19259
  * notification-output `ConfigSchemaPassthrough` precedent at
19250
19260
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
19251
- var ConfigSchemaPassthrough$1 = unknown();
19261
+ var ConfigSchemaPassthrough$3 = unknown();
19252
19262
  var LlmProfileKindDescriptorSchema = object({
19253
19263
  kind: LlmProfileKindSchema,
19254
19264
  label: string(),
19255
19265
  icon: string(),
19256
19266
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19257
19267
  addonId: string(),
19258
- configSchema: ConfigSchemaPassthrough$1
19268
+ configSchema: ConfigSchemaPassthrough$3
19259
19269
  });
19260
19270
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
19261
19271
  var LlmDefaultSchema = object({
@@ -20376,7 +20386,7 @@ var TargetKindCapsSchema = object({
20376
20386
  * the union is large and not meant for runtime validation here; the exported
20377
20387
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
20378
20388
  */
20379
- var ConfigSchemaPassthrough = unknown();
20389
+ var ConfigSchemaPassthrough$2 = unknown();
20380
20390
  var TargetKindSchema = object({
20381
20391
  kind: string(),
20382
20392
  label: string(),
@@ -20413,7 +20423,7 @@ var TargetKindSchema = object({
20413
20423
  * its raster path, which is the safe default for an unknown image.
20414
20424
  */
20415
20425
  iconMediaType: string().optional(),
20416
- configSchema: ConfigSchemaPassthrough,
20426
+ configSchema: ConfigSchemaPassthrough$2,
20417
20427
  /**
20418
20428
  * The config keys that decide WHERE this kind's secrets are sent (server,
20419
20429
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23750,6 +23760,61 @@ var OauthIntegrationDescriptorSchema = object({
23750
23760
  });
23751
23761
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
23752
23762
  /**
23763
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23764
+ *
23765
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23766
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23767
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23768
+ * immutable after create.
23769
+ */
23770
+ var ConfigSchemaPassthrough$1 = unknown();
23771
+ var OidcConnectionSchema = object({
23772
+ id: string().min(1),
23773
+ displayName: string(),
23774
+ icon: string(),
23775
+ issuerUrl: string(),
23776
+ clientId: string(),
23777
+ /** Client id + secret present — never the secret value. */
23778
+ configured: boolean(),
23779
+ /**
23780
+ * Values for the connection form schema. `clientSecret` is a keychain
23781
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23782
+ */
23783
+ formValues: record(string(), unknown()).optional()
23784
+ });
23785
+ /**
23786
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23787
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23788
+ */
23789
+ var OidcConnectionUpdateInputSchema = object({
23790
+ id: string().min(1),
23791
+ displayName: string().min(1),
23792
+ icon: string().optional(),
23793
+ issuerUrl: string().optional(),
23794
+ clientId: string().optional(),
23795
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23796
+ redirectUri: string().optional(),
23797
+ scopes: string().optional(),
23798
+ usernameClaim: _enum([
23799
+ "preferred_username",
23800
+ "email",
23801
+ "sub"
23802
+ ]).optional()
23803
+ });
23804
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23805
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23806
+ displayName: string().min(1)
23807
+ }), object({ id: string() }), {
23808
+ kind: "mutation",
23809
+ auth: "admin"
23810
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23811
+ kind: "mutation",
23812
+ auth: "admin"
23813
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23814
+ kind: "mutation",
23815
+ auth: "admin"
23816
+ });
23817
+ /**
23753
23818
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23754
23819
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23755
23820
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -25106,24 +25171,69 @@ var RetrainFrameListSchema = object({
25106
25171
  /** What the page pre-selects — the native key frame when one survives. */
25107
25172
  autoPickMediaId: number().int().optional()
25108
25173
  });
25174
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
25175
+ var RetrainFrameWorkStateSchema = _enum([
25176
+ "unannotated",
25177
+ "annotated",
25178
+ "complete"
25179
+ ]);
25180
+ /**
25181
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
25182
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
25183
+ */
25184
+ var RetrainCorpusFilterSchema = object({
25185
+ workState: RetrainFrameWorkStateSchema.optional(),
25186
+ deviceIds: array(number()).max(500).optional(),
25187
+ /** When set, only frames in this named collection. */
25188
+ collectionId: string().optional(),
25189
+ /** Frames that carry at least one saved annotation in one of these classes. */
25190
+ classes: array(RetrainMacroClassSchema).optional(),
25191
+ page: number().int().positive().default(1),
25192
+ pageSize: number().int().positive().max(100).default(50)
25193
+ });
25194
+ var RetrainCorpusPageSchema = object({
25195
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
25196
+ total: number().int().nonnegative(),
25197
+ page: number().int().positive(),
25198
+ pageSize: number().int().positive()
25199
+ });
25200
+ var RetrainCorpusKpiCameraRowSchema = object({
25201
+ deviceId: number(),
25202
+ unannotated: number().int().nonnegative(),
25203
+ annotated: number().int().nonnegative(),
25204
+ complete: number().int().nonnegative(),
25205
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
25206
+ * `null` when the corpus is empty (no ratio). */
25207
+ pctOfCorpus: number().min(0).max(1).nullable()
25208
+ });
25209
+ var RetrainCorpusKpiSchema = object({
25210
+ total: number().int().nonnegative(),
25211
+ unannotated: number().int().nonnegative(),
25212
+ annotated: number().int().nonnegative(),
25213
+ complete: number().int().nonnegative(),
25214
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
25215
+ });
25109
25216
  /**
25110
25217
  * Which frames an annotated export carries. Every field narrows; an empty
25111
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
25112
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
25113
- * the primitive a version export uses; `batchId` re-selects what an earlier
25114
- * export carried (`exportedInBatch`).
25218
+ * filter is every annotated copy. `frameIds` is the primitive a job or
25219
+ * download uses; `batchId` re-selects what an earlier export carried
25220
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
25221
+ * resolves to `frameIds` at plan/start.
25115
25222
  */
25116
25223
  var RetrainExportFilterSchema = object({
25117
25224
  deviceIds: array(number()).optional(),
25118
25225
  frameIds: array(string()).max(2e4).optional(),
25119
25226
  /** Only frames in at least one of these named collections. */
25120
25227
  collectionIds: array(string()).max(200).optional(),
25121
- /** Exactly the frames of this dataset version (and its completeOnly). An
25122
- * unknown id selects nothing. */
25123
- datasetVersionId: string().optional(),
25228
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
25229
+ collectionId: string().optional(),
25124
25230
  batchId: string().optional(),
25125
25231
  /** Only frames the operator marked complete (all subjects boxed). */
25126
- completeOnly: boolean().optional()
25232
+ completeOnly: boolean().optional(),
25233
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
25234
+ workState: RetrainFrameWorkStateSchema.optional(),
25235
+ /** Frames with at least one saved annotation in one of these classes. */
25236
+ classes: array(RetrainMacroClassSchema).optional()
25127
25237
  });
25128
25238
  /**
25129
25239
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -25323,8 +25433,7 @@ var RetrainDatasetStatsSchema = object({
25323
25433
  completeFrames: number().int()
25324
25434
  })).readonly()
25325
25435
  });
25326
- /** An immutable dataset version, without its frame list. */
25327
- var RetrainDatasetVersionSchema = object({
25436
+ object({
25328
25437
  id: string(),
25329
25438
  name: string(),
25330
25439
  createdAt: number(),
@@ -25332,22 +25441,33 @@ var RetrainDatasetVersionSchema = object({
25332
25441
  layout: RetrainExportLayoutSchema,
25333
25442
  completeOnly: boolean(),
25334
25443
  frameCount: number().int(),
25335
- /** sha256 of what the frames taught when the version was frozen. */
25336
25444
  annotationHash: string(),
25337
- /** The export manifest schema the version was cut under. */
25338
25445
  manifestSchema: string(),
25339
25446
  stats: RetrainDatasetStatsSchema
25340
25447
  });
25341
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
25342
- kind: literal("created"),
25343
- version: RetrainDatasetVersionSchema
25448
+ /**
25449
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
25450
+ * the training cap. Resolved here so plan/start and the annotated export share
25451
+ * one definition of "the frames" (`buildRetrainExportPlan`).
25452
+ */
25453
+ var RetrainTrainingCorpusSelectionSchema = object({
25454
+ collectionIds: array(string()).min(1),
25455
+ workState: _enum([
25456
+ "complete",
25457
+ "annotated_or_complete",
25458
+ "any_annotated"
25459
+ ]).default("complete")
25460
+ });
25461
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
25462
+ kind: literal("resolved"),
25463
+ frameIds: array(string()).max(2e4).readonly(),
25464
+ stats: RetrainDatasetStatsSchema,
25465
+ annotationHash: string(),
25466
+ layout: RetrainExportLayoutSchema
25344
25467
  }), object({
25345
25468
  kind: literal("refused"),
25346
- reason: _enum([
25347
- "empty-name",
25348
- "duplicate-name",
25349
- "no-frames"
25350
- ])
25469
+ reason: _enum(["unknown-collection", "no-frames"]),
25470
+ detail: string()
25351
25471
  })]);
25352
25472
  /** The outcome of a lifecycle move owned by the retrain page. */
25353
25473
  var RetrainTransitionResultSchema = object({
@@ -26054,6 +26174,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26054
26174
  }), array(RetrainTrackSchema).readonly(), {
26055
26175
  kind: "query",
26056
26176
  auth: "admin"
26177
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
26178
+ kind: "query",
26179
+ auth: "admin"
26180
+ }), method(object({}), RetrainCorpusKpiSchema, {
26181
+ kind: "query",
26182
+ auth: "admin"
26057
26183
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
26058
26184
  kind: "query",
26059
26185
  auth: "admin"
@@ -26149,36 +26275,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26149
26275
  kind: "mutation",
26150
26276
  auth: "admin",
26151
26277
  timeoutMs: 12e4
26152
- }), method(object({
26153
- selection: RetrainDatasetSelectionSchema,
26154
- completeOnly: boolean().optional()
26155
- }), RetrainDatasetStatsSchema, {
26156
- kind: "query",
26157
- auth: "admin"
26158
- }), method(object({
26159
- name: string().max(120),
26160
- selection: RetrainDatasetSelectionSchema,
26161
- layout: RetrainExportLayoutSchema,
26162
- completeOnly: boolean()
26163
- }), CreateRetrainDatasetVersionResultSchema, {
26164
- kind: "mutation",
26165
- auth: "admin",
26166
- timeoutMs: 12e4
26167
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
26168
- kind: "query",
26169
- auth: "admin"
26170
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
26171
- kind: "mutation",
26172
- auth: "admin"
26173
- }), method(object({ id: string() }), object({
26174
- found: boolean(),
26175
- annotationHash: string(),
26176
- matches: boolean(),
26177
- missingFrames: number().int()
26178
- }), {
26179
- kind: "query",
26180
- auth: "admin",
26181
- timeoutMs: 12e4
26182
26278
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
26183
26279
  kind: "query",
26184
26280
  auth: "admin"
@@ -26205,6 +26301,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26205
26301
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
26206
26302
  kind: "query",
26207
26303
  auth: "admin"
26304
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
26305
+ kind: "query",
26306
+ auth: "admin",
26307
+ timeoutMs: 6e4
26208
26308
  }), method(object({
26209
26309
  id: string(),
26210
26310
  name: string().max(120)
@@ -26821,11 +26921,14 @@ var HardwareClassIdSchema = _enum([
26821
26921
  "intel-n-series",
26822
26922
  "apple-m-base",
26823
26923
  "apple-m-pro",
26924
+ "amd-phoenix",
26824
26925
  "unknown"
26825
26926
  ]);
26826
26927
  var AcceleratorKindSchema = _enum([
26827
26928
  "intel-npu",
26828
26929
  "intel-igpu",
26930
+ "amd-igpu",
26931
+ "amd-npu",
26829
26932
  "x86-cpu",
26830
26933
  "arm-cpu",
26831
26934
  "apple-ane",
@@ -28755,6 +28858,8 @@ var AgentPipelineSettingsSchema = object({
28755
28858
  * address is wrong (multi-homed host, NAT, custom interface).
28756
28859
  */
28757
28860
  reachableHost: string().optional(),
28861
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28862
+ color: NodeColorIdSchema.optional(),
28758
28863
  /**
28759
28864
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28760
28865
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -29304,8 +29409,9 @@ method(object({
29304
29409
  auth: "admin"
29305
29410
  }), method(object({
29306
29411
  agentNodeId: string(),
29307
- reachableHost: string().nullable()
29308
- }), object({ success: literal(true) }), {
29412
+ reachableHost: string().nullable().optional(),
29413
+ color: NodeColorIdSchema.nullable().optional()
29414
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
29309
29415
  kind: "mutation",
29310
29416
  auth: "admin"
29311
29417
  }), method(object({
@@ -32381,7 +32487,7 @@ var CustomActionInputSchema = object({
32381
32487
  action: string().min(1),
32382
32488
  input: unknown()
32383
32489
  });
32384
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32490
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32385
32491
  addonId: string(),
32386
32492
  limit: number().min(1).max(500).default(100),
32387
32493
  level: LogLevelSchema$2.optional()
@@ -37451,7 +37557,13 @@ var TopologyNodeSchema = object({
37451
37557
  })).readonly(),
37452
37558
  processes: array(TopologyProcessSchema).readonly(),
37453
37559
  categories: array(TopologyCategorySchema).readonly(),
37454
- rootPackage: TopologyRootPackageSchema.nullable()
37560
+ rootPackage: TopologyRootPackageSchema.nullable(),
37561
+ /**
37562
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
37563
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
37564
+ * for offline rows and when the hub cannot tell.
37565
+ */
37566
+ meshTransport: _enum(["tls", "clear"]).optional()
37455
37567
  });
37456
37568
  var CapUsageEdgeSchema = object({
37457
37569
  callerAddonId: string(),
@@ -37864,6 +37976,7 @@ var OsdNamedTemplateSchema = object({
37864
37976
  });
37865
37977
  /** Where a slot's value comes from. */
37866
37978
  var OsdSourceSchema = discriminatedUnion("kind", [
37979
+ object({ kind: literal("none") }),
37867
37980
  object({
37868
37981
  kind: literal("static"),
37869
37982
  text: string().max(64)
@@ -37990,6 +38103,13 @@ method(object({ deviceId: number().int() }), object({
37990
38103
  }), object({ success: literal(true) }), {
37991
38104
  kind: "mutation",
37992
38105
  auth: "admin"
38106
+ }), method(object({
38107
+ deviceId: number().int(),
38108
+ slotId: string().min(1),
38109
+ enabled: boolean()
38110
+ }), object({ success: literal(true) }), {
38111
+ kind: "mutation",
38112
+ auth: "admin"
37993
38113
  }), method(object({
37994
38114
  sourceDeviceId: number().int(),
37995
38115
  targetDeviceId: number().int()
@@ -38421,7 +38541,15 @@ var GpuInfoSchema = object({
38421
38541
  name: string(),
38422
38542
  memoryMB: number().optional()
38423
38543
  });
38424
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
38544
+ var NpuInfoSchema = object({
38545
+ type: _enum([
38546
+ "apple-ane",
38547
+ "intel-npu",
38548
+ "amd-xdna"
38549
+ ]),
38550
+ name: string().optional(),
38551
+ generation: _enum(["xdna1", "xdna2"]).optional()
38552
+ });
38425
38553
  var CoralInfoSchema = object({
38426
38554
  type: literal("coral-edgetpu"),
38427
38555
  bus: string().optional()
@@ -43164,9 +43292,11 @@ var zoneRulesCapability = {
43164
43292
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
43165
43293
  * manifest entry and nothing else.
43166
43294
  *
43167
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
43168
- * `notification-output` posture); `describe` concat-fans across providers.
43169
- * Every method is `admin`: these spend money.
43295
+ * Collection of provider **types** (addons). Each addon owns zero or more
43296
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
43297
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
43298
+ * `entryId`; callers also pass the owning `addonId` as the collection
43299
+ * selector (broker posture). Every method is `admin`: these spend money.
43170
43300
  *
43171
43301
  * Every cloud object a provider creates is tagged with the orchestrator's
43172
43302
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -43190,8 +43320,8 @@ var TrainingRegionOptionSchema = object({
43190
43320
  priceMultiplier: number().positive()
43191
43321
  });
43192
43322
  /**
43193
- * The provider's per-account settings, as the orchestrator reads them. They
43194
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
43323
+ * The provider's per-entry settings, as the orchestrator reads them. They
43324
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
43195
43325
  * depend on the user's account), never hard-coded in the orchestrator.
43196
43326
  */
43197
43327
  var TrainingProviderDefaultsSchema = object({
@@ -43202,9 +43332,44 @@ var TrainingProviderDefaultsSchema = object({
43202
43332
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
43203
43333
  failedDatasetGraceHours: number().nonnegative()
43204
43334
  });
43335
+ /**
43336
+ * Entry form schema for a provider type — same seam as notification
43337
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
43338
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
43339
+ */
43340
+ var ConfigSchemaPassthrough = unknown();
43341
+ /** One creatable provider type, for the Add-entry dialog. */
43342
+ var TrainingProviderTypeSchema = object({
43343
+ typeId: string(),
43344
+ label: string(),
43345
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
43346
+ iconAsset: string(),
43347
+ /** Owning `training-provider` addon — collection selector for createEntry. */
43348
+ addonId: string(),
43349
+ /**
43350
+ * Fields for one entry of this type (credentials + defaults). Absent on a
43351
+ * type that only needs a name. Password fields are keychain-backed on the
43352
+ * provider addon (`secretStatePaths`), not D634 plaintext.
43353
+ */
43354
+ configSchema: ConfigSchemaPassthrough.optional()
43355
+ });
43356
+ /** One configured account / workspace under a provider type. */
43357
+ var TrainingProviderEntrySchema = object({
43358
+ entryId: string(),
43359
+ typeId: string(),
43360
+ name: string(),
43361
+ addonId: string(),
43362
+ /** Credentials are present — never the values. */
43363
+ configured: boolean()
43364
+ });
43205
43365
  var TrainingProviderDescriptorSchema = object({
43206
43366
  addonId: string(),
43207
- /** `modal`, `runpod`, `fake`, … */
43367
+ entryId: string(),
43368
+ typeId: string(),
43369
+ /** Operator-chosen entry name. */
43370
+ name: string(),
43371
+ iconAsset: string(),
43372
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
43208
43373
  kind: string(),
43209
43374
  label: string(),
43210
43375
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43216,7 +43381,30 @@ var TrainingProviderDescriptorSchema = object({
43216
43381
  dataResidencyNote: string(),
43217
43382
  /** Credentials are present — never the values. */
43218
43383
  configured: boolean(),
43219
- defaults: TrainingProviderDefaultsSchema
43384
+ defaults: TrainingProviderDefaultsSchema,
43385
+ /**
43386
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
43387
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
43388
+ * never plaintext. Same hydrate contract as settings forms (D789).
43389
+ */
43390
+ formValues: record(string(), unknown()).optional()
43391
+ });
43392
+ /**
43393
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
43394
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
43395
+ * `{ $secretClear: true }` clears it.
43396
+ */
43397
+ var TrainingProviderUpdateEntryInputSchema = object({
43398
+ entryId: string().min(1),
43399
+ name: string().min(1),
43400
+ tokenId: string().optional(),
43401
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
43402
+ environment: string().optional(),
43403
+ gpuType: string().optional(),
43404
+ region: string().optional(),
43405
+ costCapUsd: number().nonnegative().optional(),
43406
+ maxRuntimeSec: number().int().positive().optional(),
43407
+ failedDatasetGraceHours: number().nonnegative().optional()
43220
43408
  });
43221
43409
  var TrainingCredentialCheckSchema = object({
43222
43410
  ok: boolean(),
@@ -43268,20 +43456,33 @@ var TrainerSourceRefSchema = object({
43268
43456
  /** A commit sha (never a branch) — the job must be reproducible. */
43269
43457
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43270
43458
  });
43459
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43271
43460
  var JobRef = {
43272
- addonId: string(),
43461
+ entryId: string().min(1),
43273
43462
  jobKey: string().uuid()
43274
43463
  };
43275
43464
  var TrainingLogLineSchema = object({
43276
43465
  ts: number(),
43277
43466
  text: string()
43278
43467
  });
43279
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
43468
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
43469
+ typeId: string().min(1),
43470
+ name: string().min(1)
43471
+ }), object({ entryId: string() }), {
43472
+ kind: "mutation",
43473
+ auth: "admin"
43474
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
43475
+ kind: "mutation",
43476
+ auth: "admin"
43477
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
43478
+ kind: "mutation",
43479
+ auth: "admin"
43480
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
43280
43481
  kind: "mutation",
43281
43482
  auth: "admin",
43282
43483
  timeoutMs: 3e4
43283
43484
  }), method(object({
43284
- addonId: string(),
43485
+ entryId: string().min(1),
43285
43486
  gpuType: string(),
43286
43487
  region: string(),
43287
43488
  datasetBytes: number().int().nonnegative(),
@@ -43347,7 +43548,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43347
43548
  kind: "mutation",
43348
43549
  auth: "admin",
43349
43550
  timeoutMs: 5 * 6e4
43350
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
43551
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
43351
43552
  auth: "admin",
43352
43553
  timeoutMs: 2 * 6e4
43353
43554
  });
@@ -43357,20 +43558,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43357
43558
  *
43358
43559
  * It owns what every provider must agree on, written once:
43359
43560
  *
43360
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
43361
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
43362
- * the export plan) and reaches this store through the five row methods
43363
- * below, so the Retrain page and the export did not change.
43364
43561
  * - **Jobs.** A persisted state machine, a reconcile loop against the
43365
43562
  * provider, a cost guard, a daily orphan sweep and the retention rules.
43366
43563
  * - **The return flow.** Verified artefacts → Model Studio
43367
43564
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
43368
43565
  * rollback. Nothing is ever registered automatically.
43369
43566
  *
43567
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
43568
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
43569
+ * moment and snapshotted on the job. No frozen dataset version.
43570
+ *
43370
43571
  * Every method is `admin`.
43371
43572
  */
43372
- /** A version WITH its frame list — what the export and a job read. */
43373
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
43573
+ /**
43574
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
43575
+ * Frame ids are resolved at plan/start — never a frozen version id.
43576
+ */
43577
+ var TrainingCorpusSelectionSchema = object({
43578
+ collectionIds: array(string()).min(1),
43579
+ /** Default complete-only for v1 */
43580
+ workState: _enum([
43581
+ "complete",
43582
+ "annotated_or_complete",
43583
+ "any_annotated"
43584
+ ]).default("complete")
43585
+ });
43374
43586
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
43375
43587
  var TrainingBaseModelSchema = object({
43376
43588
  modelId: string(),
@@ -43388,9 +43600,13 @@ var TrainingPresetSchema = _enum([
43388
43600
  "thorough"
43389
43601
  ]);
43390
43602
  var TrainingJobRequestSchema = object({
43391
- datasetVersionId: string().min(1),
43392
- /** The `training-provider` addon that runs it. */
43393
- addonId: string().min(1),
43603
+ /** Live collection + work-state criteria; resolved at plan/start. */
43604
+ selection: TrainingCorpusSelectionSchema,
43605
+ /**
43606
+ * The provider **entry** that runs it (credentials + defaults).
43607
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
43608
+ */
43609
+ entryId: string().min(1),
43394
43610
  gpuType: string().min(1),
43395
43611
  region: string(),
43396
43612
  baseModelId: string().min(1),
@@ -43449,6 +43665,7 @@ var TrainingJobPlanSchema = object({
43449
43665
  * result lives after the operator acted on it.
43450
43666
  */
43451
43667
  var TrainingJobStateSchema = _enum([
43668
+ "queued",
43452
43669
  "uploading",
43453
43670
  "submitted",
43454
43671
  "starting",
@@ -43502,6 +43719,11 @@ var TrainingJobSchema = object({
43502
43719
  createdAt: number(),
43503
43720
  updatedAt: number(),
43504
43721
  state: TrainingJobStateSchema,
43722
+ /**
43723
+ * Shared by every job enqueued together via `startJobBatch`.
43724
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
43725
+ */
43726
+ batchId: string().nullable().default(null),
43505
43727
  stage: TrainingStageSchema.nullable(),
43506
43728
  failure: object({
43507
43729
  reason: TrainingFailureReasonSchema,
@@ -43513,6 +43735,12 @@ var TrainingJobSchema = object({
43513
43735
  maxRuntimeSec: number().int().positive(),
43514
43736
  trainer: TrainerSourceRefSchema,
43515
43737
  datasetLayout: RetrainExportLayoutSchema,
43738
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
43739
+ frameCount: number().int().nonnegative(),
43740
+ /** Resolved frame ids at start — the archive ships exactly these. */
43741
+ frameIds: array(string()).max(2e4).readonly(),
43742
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
43743
+ annotationHash: string(),
43516
43744
  dataset: object({
43517
43745
  bytes: number().int(),
43518
43746
  sha256: string(),
@@ -43554,13 +43782,7 @@ var TrainingJobSchema = object({
43554
43782
  canary: TrainingCanarySchema.nullable()
43555
43783
  });
43556
43784
  var IdInput = object({ id: string().min(1) });
43557
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43558
- kind: "mutation",
43559
- auth: "admin"
43560
- }), 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() }), {
43561
- kind: "mutation",
43562
- auth: "admin"
43563
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43785
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43564
43786
  auth: "admin",
43565
43787
  timeoutMs: 6e4
43566
43788
  }), method(TrainingJobRequestSchema.extend({
@@ -43579,6 +43801,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43579
43801
  kind: "mutation",
43580
43802
  auth: "admin",
43581
43803
  timeoutMs: 12e4
43804
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
43805
+ baseModelIds: array(string().min(1)).min(1),
43806
+ name: string().min(1).max(120),
43807
+ maxCostUsd: number().positive(),
43808
+ maxRuntimeSec: number().int().positive(),
43809
+ idempotencyKey: string().min(8).max(80)
43810
+ }), discriminatedUnion("kind", [object({
43811
+ kind: literal("started"),
43812
+ batchId: string(),
43813
+ jobs: array(TrainingJobSchema).min(1).readonly()
43814
+ }), object({
43815
+ kind: literal("refused"),
43816
+ reason: TrainingRefusalReasonSchema,
43817
+ detail: string()
43818
+ })]), {
43819
+ kind: "mutation",
43820
+ auth: "admin",
43821
+ timeoutMs: 12e4
43582
43822
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
43583
43823
  kind: "mutation",
43584
43824
  auth: "admin",
@@ -49137,6 +49377,36 @@ Object.freeze({
49137
49377
  addonId: null,
49138
49378
  access: "view"
49139
49379
  },
49380
+ "oidcConnections.connectionFormSchema": {
49381
+ capName: "oidc-connections",
49382
+ capScope: "system",
49383
+ addonId: null,
49384
+ access: "view"
49385
+ },
49386
+ "oidcConnections.createConnection": {
49387
+ capName: "oidc-connections",
49388
+ capScope: "system",
49389
+ addonId: null,
49390
+ access: "create"
49391
+ },
49392
+ "oidcConnections.deleteConnection": {
49393
+ capName: "oidc-connections",
49394
+ capScope: "system",
49395
+ addonId: null,
49396
+ access: "delete"
49397
+ },
49398
+ "oidcConnections.listConnections": {
49399
+ capName: "oidc-connections",
49400
+ capScope: "system",
49401
+ addonId: null,
49402
+ access: "view"
49403
+ },
49404
+ "oidcConnections.updateConnection": {
49405
+ capName: "oidc-connections",
49406
+ capScope: "system",
49407
+ addonId: null,
49408
+ access: "create"
49409
+ },
49140
49410
  "osd.getStatus": {
49141
49411
  capName: "osd",
49142
49412
  capScope: "device",
@@ -49209,6 +49479,12 @@ Object.freeze({
49209
49479
  addonId: null,
49210
49480
  access: "create"
49211
49481
  },
49482
+ "osdManager.setSlotCameraEnabled": {
49483
+ capName: "osd-manager",
49484
+ capScope: "system",
49485
+ addonId: null,
49486
+ access: "create"
49487
+ },
49212
49488
  "osdManager.upsertTemplate": {
49213
49489
  capName: "osd-manager",
49214
49490
  capScope: "system",
@@ -49347,12 +49623,6 @@ Object.freeze({
49347
49623
  addonId: null,
49348
49624
  access: "create"
49349
49625
  },
49350
- "pipelineAnalytics.createRetrainDatasetVersion": {
49351
- capName: "pipeline-analytics",
49352
- capScope: "device",
49353
- addonId: null,
49354
- access: "create"
49355
- },
49356
49626
  "pipelineAnalytics.deleteDeviceEvents": {
49357
49627
  capName: "pipeline-analytics",
49358
49628
  capScope: "device",
@@ -49365,12 +49635,6 @@ Object.freeze({
49365
49635
  addonId: null,
49366
49636
  access: "delete"
49367
49637
  },
49368
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
49369
- capName: "pipeline-analytics",
49370
- capScope: "device",
49371
- addonId: null,
49372
- access: "delete"
49373
- },
49374
49638
  "pipelineAnalytics.deleteTracks": {
49375
49639
  capName: "pipeline-analytics",
49376
49640
  capScope: "device",
@@ -49473,6 +49737,12 @@ Object.freeze({
49473
49737
  addonId: null,
49474
49738
  access: "view"
49475
49739
  },
49740
+ "pipelineAnalytics.getRetrainCorpusKpi": {
49741
+ capName: "pipeline-analytics",
49742
+ capScope: "device",
49743
+ addonId: null,
49744
+ access: "view"
49745
+ },
49476
49746
  "pipelineAnalytics.getRetrainExportUrl": {
49477
49747
  capName: "pipeline-analytics",
49478
49748
  capScope: "device",
@@ -49593,7 +49863,7 @@ Object.freeze({
49593
49863
  addonId: null,
49594
49864
  access: "view"
49595
49865
  },
49596
- "pipelineAnalytics.listRetrainDatasetVersions": {
49866
+ "pipelineAnalytics.listRetrainCorpusPage": {
49597
49867
  capName: "pipeline-analytics",
49598
49868
  capScope: "device",
49599
49869
  addonId: null,
@@ -49647,12 +49917,6 @@ Object.freeze({
49647
49917
  addonId: null,
49648
49918
  access: "create"
49649
49919
  },
49650
- "pipelineAnalytics.previewRetrainDataset": {
49651
- capName: "pipeline-analytics",
49652
- capScope: "device",
49653
- addonId: null,
49654
- access: "view"
49655
- },
49656
49920
  "pipelineAnalytics.proposeRetrainAnnotations": {
49657
49921
  capName: "pipeline-analytics",
49658
49922
  capScope: "device",
@@ -49731,6 +49995,12 @@ Object.freeze({
49731
49995
  addonId: null,
49732
49996
  access: "create"
49733
49997
  },
49998
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
49999
+ capName: "pipeline-analytics",
50000
+ capScope: "device",
50001
+ addonId: null,
50002
+ access: "view"
50003
+ },
49734
50004
  "pipelineAnalytics.restageRetrainTrack": {
49735
50005
  capName: "pipeline-analytics",
49736
50006
  capScope: "device",
@@ -49791,12 +50061,6 @@ Object.freeze({
49791
50061
  addonId: null,
49792
50062
  access: "create"
49793
50063
  },
49794
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
49795
- capName: "pipeline-analytics",
49796
- capScope: "device",
49797
- addonId: null,
49798
- access: "view"
49799
- },
49800
50064
  "pipelineAnalytics.wipeAllAnalytics": {
49801
50065
  capName: "pipeline-analytics",
49802
50066
  capScope: "device",
@@ -52191,18 +52455,6 @@ Object.freeze({
52191
52455
  addonId: null,
52192
52456
  access: "create"
52193
52457
  },
52194
- "training.findDatasetVersionIdByName": {
52195
- capName: "training",
52196
- capScope: "system",
52197
- addonId: null,
52198
- access: "view"
52199
- },
52200
- "training.getDatasetVersion": {
52201
- capName: "training",
52202
- capScope: "system",
52203
- addonId: null,
52204
- access: "view"
52205
- },
52206
52458
  "training.getJob": {
52207
52459
  capName: "training",
52208
52460
  capScope: "system",
@@ -52221,12 +52473,6 @@ Object.freeze({
52221
52473
  addonId: null,
52222
52474
  access: "view"
52223
52475
  },
52224
- "training.listDatasetVersions": {
52225
- capName: "training",
52226
- capScope: "system",
52227
- addonId: null,
52228
- access: "view"
52229
- },
52230
52476
  "training.listJobs": {
52231
52477
  capName: "training",
52232
52478
  capScope: "system",
@@ -52239,54 +52485,66 @@ Object.freeze({
52239
52485
  addonId: null,
52240
52486
  access: "view"
52241
52487
  },
52242
- "training.putDatasetVersion": {
52488
+ "training.registerResult": {
52243
52489
  capName: "training",
52244
52490
  capScope: "system",
52245
52491
  addonId: null,
52246
52492
  access: "create"
52247
52493
  },
52248
- "training.registerResult": {
52494
+ "training.rollbackCanary": {
52249
52495
  capName: "training",
52250
52496
  capScope: "system",
52251
52497
  addonId: null,
52252
52498
  access: "create"
52253
52499
  },
52254
- "training.removeDatasetVersion": {
52500
+ "training.startJob": {
52255
52501
  capName: "training",
52256
52502
  capScope: "system",
52257
52503
  addonId: null,
52258
- access: "delete"
52504
+ access: "create"
52259
52505
  },
52260
- "training.rollbackCanary": {
52506
+ "training.startJobBatch": {
52261
52507
  capName: "training",
52262
52508
  capScope: "system",
52263
52509
  addonId: null,
52264
52510
  access: "create"
52265
52511
  },
52266
- "training.startJob": {
52267
- capName: "training",
52512
+ "trainingProvider.cancelJob": {
52513
+ capName: "training-provider",
52268
52514
  capScope: "system",
52269
52515
  addonId: null,
52270
52516
  access: "create"
52271
52517
  },
52272
- "trainingProvider.cancelJob": {
52518
+ "trainingProvider.cleanupJob": {
52273
52519
  capName: "training-provider",
52274
52520
  capScope: "system",
52275
52521
  addonId: null,
52276
52522
  access: "create"
52277
52523
  },
52278
- "trainingProvider.cleanupJob": {
52524
+ "trainingProvider.createEntry": {
52279
52525
  capName: "training-provider",
52280
52526
  capScope: "system",
52281
52527
  addonId: null,
52282
52528
  access: "create"
52283
52529
  },
52530
+ "trainingProvider.deleteEntry": {
52531
+ capName: "training-provider",
52532
+ capScope: "system",
52533
+ addonId: null,
52534
+ access: "delete"
52535
+ },
52284
52536
  "trainingProvider.describe": {
52285
52537
  capName: "training-provider",
52286
52538
  capScope: "system",
52287
52539
  addonId: null,
52288
52540
  access: "view"
52289
52541
  },
52542
+ "trainingProvider.describeTypes": {
52543
+ capName: "training-provider",
52544
+ capScope: "system",
52545
+ addonId: null,
52546
+ access: "view"
52547
+ },
52290
52548
  "trainingProvider.estimateJob": {
52291
52549
  capName: "training-provider",
52292
52550
  capScope: "system",
@@ -52299,6 +52557,12 @@ Object.freeze({
52299
52557
  addonId: null,
52300
52558
  access: "view"
52301
52559
  },
52560
+ "trainingProvider.listEntries": {
52561
+ capName: "training-provider",
52562
+ capScope: "system",
52563
+ addonId: null,
52564
+ access: "view"
52565
+ },
52302
52566
  "trainingProvider.listJobEvents": {
52303
52567
  capName: "training-provider",
52304
52568
  capScope: "system",
@@ -52329,6 +52593,12 @@ Object.freeze({
52329
52593
  addonId: null,
52330
52594
  access: "create"
52331
52595
  },
52596
+ "trainingProvider.updateEntry": {
52597
+ capName: "training-provider",
52598
+ capScope: "system",
52599
+ addonId: null,
52600
+ access: "create"
52601
+ },
52332
52602
  "trainingProvider.uploadDataset": {
52333
52603
  capName: "training-provider",
52334
52604
  capScope: "system",
@@ -55535,6 +55805,11 @@ Object.freeze({
55535
55805
  form: "single",
55536
55806
  optional: false
55537
55807
  }],
55808
+ "osdManager.setSlotCameraEnabled": [{
55809
+ name: "deviceId",
55810
+ form: "single",
55811
+ optional: false
55812
+ }],
55538
55813
  "petFeeder.callPet": [{
55539
55814
  name: "deviceId",
55540
55815
  form: "single",
@@ -55755,6 +56030,11 @@ Object.freeze({
55755
56030
  form: "array",
55756
56031
  optional: false
55757
56032
  }],
56033
+ "pipelineAnalytics.listRetrainCorpusPage": [{
56034
+ name: "deviceIds",
56035
+ form: "array",
56036
+ optional: true
56037
+ }],
55758
56038
  "pipelineAnalytics.listRetrainStaging": [{
55759
56039
  name: "deviceIds",
55760
56040
  form: "array",
@@ -56864,6 +57144,7 @@ Object.freeze({
56864
57144
  });
56865
57145
  Object.freeze({
56866
57146
  "broker": "broker",
57147
+ "calendar-source": "calendar",
56867
57148
  "device-export": "device-export",
56868
57149
  "llm": "ai",
56869
57150
  "mesh-network": "mesh",
@@ -57349,6 +57630,8 @@ var STATE_SUMMARY_VARS = [
57349
57630
  [...RULE_TEXT],
57350
57631
  [...RULE_TEXT],
57351
57632
  [...RULE_TEXT],
57633
+ [...RULE_TEXT],
57634
+ [...RULE_TEXT],
57352
57635
  ([...RULE_TEXT], [...UPDATES]),
57353
57636
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
57354
57637
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),