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