@camstack/addon-provider-dreame 0.2.131 → 0.2.132

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
@@ -58277,7 +58277,7 @@ var ZodIssueCode = {
58277
58277
  var ZodFirstPartyTypeKind;
58278
58278
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
58279
58279
  //#endregion
58280
- //#region ../types/dist/sleep-r3RWkGVx.mjs
58280
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
58281
58281
  /**
58282
58282
  * The audio chunk plane's byte format, and the ONE expansion from a coded
58283
58283
  * window to float samples (D455).
@@ -62283,6 +62283,16 @@ var CompositionSchema = object({
62283
62283
  seen.add(feature.cap);
62284
62284
  });
62285
62285
  });
62286
+ var NodeColorIdSchema = _enum([
62287
+ "node-a",
62288
+ "node-b",
62289
+ "node-c",
62290
+ "node-d",
62291
+ "node-e",
62292
+ "node-f",
62293
+ "node-g",
62294
+ "node-h"
62295
+ ]);
62286
62296
  new Set([
62287
62297
  "track",
62288
62298
  "face",
@@ -71341,14 +71351,14 @@ var LlmProfileSchema = object({
71341
71351
  /** ConfigUISchema tree passed through untyped on the wire (the
71342
71352
  * notification-output `ConfigSchemaPassthrough` precedent at
71343
71353
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
71344
- var ConfigSchemaPassthrough$1 = unknown();
71354
+ var ConfigSchemaPassthrough$3 = unknown();
71345
71355
  var LlmProfileKindDescriptorSchema = object({
71346
71356
  kind: LlmProfileKindSchema,
71347
71357
  label: string(),
71348
71358
  icon: string(),
71349
71359
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
71350
71360
  addonId: string(),
71351
- configSchema: ConfigSchemaPassthrough$1
71361
+ configSchema: ConfigSchemaPassthrough$3
71352
71362
  });
71353
71363
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
71354
71364
  var LlmDefaultSchema = object({
@@ -72469,7 +72479,7 @@ var TargetKindCapsSchema = object({
72469
72479
  * the union is large and not meant for runtime validation here; the exported
72470
72480
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
72471
72481
  */
72472
- var ConfigSchemaPassthrough = unknown();
72482
+ var ConfigSchemaPassthrough$2 = unknown();
72473
72483
  var TargetKindSchema = object({
72474
72484
  kind: string(),
72475
72485
  label: string(),
@@ -72506,7 +72516,7 @@ var TargetKindSchema = object({
72506
72516
  * its raster path, which is the safe default for an unknown image.
72507
72517
  */
72508
72518
  iconMediaType: string().optional(),
72509
- configSchema: ConfigSchemaPassthrough,
72519
+ configSchema: ConfigSchemaPassthrough$2,
72510
72520
  /**
72511
72521
  * The config keys that decide WHERE this kind's secrets are sent (server,
72512
72522
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -75843,6 +75853,61 @@ var OauthIntegrationDescriptorSchema = object({
75843
75853
  });
75844
75854
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
75845
75855
  /**
75856
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
75857
+ *
75858
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
75859
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
75860
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
75861
+ * immutable after create.
75862
+ */
75863
+ var ConfigSchemaPassthrough$1 = unknown();
75864
+ var OidcConnectionSchema = object({
75865
+ id: string().min(1),
75866
+ displayName: string(),
75867
+ icon: string(),
75868
+ issuerUrl: string(),
75869
+ clientId: string(),
75870
+ /** Client id + secret present — never the secret value. */
75871
+ configured: boolean(),
75872
+ /**
75873
+ * Values for the connection form schema. `clientSecret` is a keychain
75874
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
75875
+ */
75876
+ formValues: record(string(), unknown()).optional()
75877
+ });
75878
+ /**
75879
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
75880
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
75881
+ */
75882
+ var OidcConnectionUpdateInputSchema = object({
75883
+ id: string().min(1),
75884
+ displayName: string().min(1),
75885
+ icon: string().optional(),
75886
+ issuerUrl: string().optional(),
75887
+ clientId: string().optional(),
75888
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
75889
+ redirectUri: string().optional(),
75890
+ scopes: string().optional(),
75891
+ usernameClaim: _enum([
75892
+ "preferred_username",
75893
+ "email",
75894
+ "sub"
75895
+ ]).optional()
75896
+ });
75897
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
75898
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
75899
+ displayName: string().min(1)
75900
+ }), object({ id: string() }), {
75901
+ kind: "mutation",
75902
+ auth: "admin"
75903
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
75904
+ kind: "mutation",
75905
+ auth: "admin"
75906
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
75907
+ kind: "mutation",
75908
+ auth: "admin"
75909
+ });
75910
+ /**
75846
75911
  * What started a camera's onboard motion (D672). `camera` is the camera's own
75847
75912
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
75848
75913
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -77199,24 +77264,69 @@ var RetrainFrameListSchema = object({
77199
77264
  /** What the page pre-selects — the native key frame when one survives. */
77200
77265
  autoPickMediaId: number().int().optional()
77201
77266
  });
77267
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
77268
+ var RetrainFrameWorkStateSchema = _enum([
77269
+ "unannotated",
77270
+ "annotated",
77271
+ "complete"
77272
+ ]);
77273
+ /**
77274
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
77275
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
77276
+ */
77277
+ var RetrainCorpusFilterSchema = object({
77278
+ workState: RetrainFrameWorkStateSchema.optional(),
77279
+ deviceIds: array(number()).max(500).optional(),
77280
+ /** When set, only frames in this named collection. */
77281
+ collectionId: string().optional(),
77282
+ /** Frames that carry at least one saved annotation in one of these classes. */
77283
+ classes: array(RetrainMacroClassSchema).optional(),
77284
+ page: number().int().positive().default(1),
77285
+ pageSize: number().int().positive().max(100).default(50)
77286
+ });
77287
+ var RetrainCorpusPageSchema = object({
77288
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
77289
+ total: number().int().nonnegative(),
77290
+ page: number().int().positive(),
77291
+ pageSize: number().int().positive()
77292
+ });
77293
+ var RetrainCorpusKpiCameraRowSchema = object({
77294
+ deviceId: number(),
77295
+ unannotated: number().int().nonnegative(),
77296
+ annotated: number().int().nonnegative(),
77297
+ complete: number().int().nonnegative(),
77298
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
77299
+ * `null` when the corpus is empty (no ratio). */
77300
+ pctOfCorpus: number().min(0).max(1).nullable()
77301
+ });
77302
+ var RetrainCorpusKpiSchema = object({
77303
+ total: number().int().nonnegative(),
77304
+ unannotated: number().int().nonnegative(),
77305
+ annotated: number().int().nonnegative(),
77306
+ complete: number().int().nonnegative(),
77307
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
77308
+ });
77202
77309
  /**
77203
77310
  * Which frames an annotated export carries. Every field narrows; an empty
77204
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
77205
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
77206
- * the primitive a version export uses; `batchId` re-selects what an earlier
77207
- * export carried (`exportedInBatch`).
77311
+ * filter is every annotated copy. `frameIds` is the primitive a job or
77312
+ * download uses; `batchId` re-selects what an earlier export carried
77313
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
77314
+ * resolves to `frameIds` at plan/start.
77208
77315
  */
77209
77316
  var RetrainExportFilterSchema = object({
77210
77317
  deviceIds: array(number()).optional(),
77211
77318
  frameIds: array(string()).max(2e4).optional(),
77212
77319
  /** Only frames in at least one of these named collections. */
77213
77320
  collectionIds: array(string()).max(200).optional(),
77214
- /** Exactly the frames of this dataset version (and its completeOnly). An
77215
- * unknown id selects nothing. */
77216
- datasetVersionId: string().optional(),
77321
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
77322
+ collectionId: string().optional(),
77217
77323
  batchId: string().optional(),
77218
77324
  /** Only frames the operator marked complete (all subjects boxed). */
77219
- completeOnly: boolean().optional()
77325
+ completeOnly: boolean().optional(),
77326
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
77327
+ workState: RetrainFrameWorkStateSchema.optional(),
77328
+ /** Frames with at least one saved annotation in one of these classes. */
77329
+ classes: array(RetrainMacroClassSchema).optional()
77220
77330
  });
77221
77331
  /**
77222
77332
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -77416,8 +77526,7 @@ var RetrainDatasetStatsSchema = object({
77416
77526
  completeFrames: number().int()
77417
77527
  })).readonly()
77418
77528
  });
77419
- /** An immutable dataset version, without its frame list. */
77420
- var RetrainDatasetVersionSchema = object({
77529
+ object({
77421
77530
  id: string(),
77422
77531
  name: string(),
77423
77532
  createdAt: number(),
@@ -77425,22 +77534,33 @@ var RetrainDatasetVersionSchema = object({
77425
77534
  layout: RetrainExportLayoutSchema,
77426
77535
  completeOnly: boolean(),
77427
77536
  frameCount: number().int(),
77428
- /** sha256 of what the frames taught when the version was frozen. */
77429
77537
  annotationHash: string(),
77430
- /** The export manifest schema the version was cut under. */
77431
77538
  manifestSchema: string(),
77432
77539
  stats: RetrainDatasetStatsSchema
77433
77540
  });
77434
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
77435
- kind: literal("created"),
77436
- version: RetrainDatasetVersionSchema
77541
+ /**
77542
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
77543
+ * the training cap. Resolved here so plan/start and the annotated export share
77544
+ * one definition of "the frames" (`buildRetrainExportPlan`).
77545
+ */
77546
+ var RetrainTrainingCorpusSelectionSchema = object({
77547
+ collectionIds: array(string()).min(1),
77548
+ workState: _enum([
77549
+ "complete",
77550
+ "annotated_or_complete",
77551
+ "any_annotated"
77552
+ ]).default("complete")
77553
+ });
77554
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
77555
+ kind: literal("resolved"),
77556
+ frameIds: array(string()).max(2e4).readonly(),
77557
+ stats: RetrainDatasetStatsSchema,
77558
+ annotationHash: string(),
77559
+ layout: RetrainExportLayoutSchema
77437
77560
  }), object({
77438
77561
  kind: literal("refused"),
77439
- reason: _enum([
77440
- "empty-name",
77441
- "duplicate-name",
77442
- "no-frames"
77443
- ])
77562
+ reason: _enum(["unknown-collection", "no-frames"]),
77563
+ detail: string()
77444
77564
  })]);
77445
77565
  /** The outcome of a lifecycle move owned by the retrain page. */
77446
77566
  var RetrainTransitionResultSchema = object({
@@ -78147,6 +78267,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
78147
78267
  }), array(RetrainTrackSchema).readonly(), {
78148
78268
  kind: "query",
78149
78269
  auth: "admin"
78270
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
78271
+ kind: "query",
78272
+ auth: "admin"
78273
+ }), method(object({}), RetrainCorpusKpiSchema, {
78274
+ kind: "query",
78275
+ auth: "admin"
78150
78276
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
78151
78277
  kind: "query",
78152
78278
  auth: "admin"
@@ -78242,36 +78368,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
78242
78368
  kind: "mutation",
78243
78369
  auth: "admin",
78244
78370
  timeoutMs: 12e4
78245
- }), method(object({
78246
- selection: RetrainDatasetSelectionSchema,
78247
- completeOnly: boolean().optional()
78248
- }), RetrainDatasetStatsSchema, {
78249
- kind: "query",
78250
- auth: "admin"
78251
- }), method(object({
78252
- name: string().max(120),
78253
- selection: RetrainDatasetSelectionSchema,
78254
- layout: RetrainExportLayoutSchema,
78255
- completeOnly: boolean()
78256
- }), CreateRetrainDatasetVersionResultSchema, {
78257
- kind: "mutation",
78258
- auth: "admin",
78259
- timeoutMs: 12e4
78260
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
78261
- kind: "query",
78262
- auth: "admin"
78263
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
78264
- kind: "mutation",
78265
- auth: "admin"
78266
- }), method(object({ id: string() }), object({
78267
- found: boolean(),
78268
- annotationHash: string(),
78269
- matches: boolean(),
78270
- missingFrames: number().int()
78271
- }), {
78272
- kind: "query",
78273
- auth: "admin",
78274
- timeoutMs: 12e4
78275
78371
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
78276
78372
  kind: "query",
78277
78373
  auth: "admin"
@@ -78298,6 +78394,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
78298
78394
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
78299
78395
  kind: "query",
78300
78396
  auth: "admin"
78397
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
78398
+ kind: "query",
78399
+ auth: "admin",
78400
+ timeoutMs: 6e4
78301
78401
  }), method(object({
78302
78402
  id: string(),
78303
78403
  name: string().max(120)
@@ -78914,11 +79014,14 @@ var HardwareClassIdSchema = _enum([
78914
79014
  "intel-n-series",
78915
79015
  "apple-m-base",
78916
79016
  "apple-m-pro",
79017
+ "amd-phoenix",
78917
79018
  "unknown"
78918
79019
  ]);
78919
79020
  var AcceleratorKindSchema = _enum([
78920
79021
  "intel-npu",
78921
79022
  "intel-igpu",
79023
+ "amd-igpu",
79024
+ "amd-npu",
78922
79025
  "x86-cpu",
78923
79026
  "arm-cpu",
78924
79027
  "apple-ane",
@@ -80848,6 +80951,8 @@ var AgentPipelineSettingsSchema = object({
80848
80951
  * address is wrong (multi-homed host, NAT, custom interface).
80849
80952
  */
80850
80953
  reachableHost: string().optional(),
80954
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
80955
+ color: NodeColorIdSchema.optional(),
80851
80956
  /**
80852
80957
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
80853
80958
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -81397,8 +81502,9 @@ method(object({
81397
81502
  auth: "admin"
81398
81503
  }), method(object({
81399
81504
  agentNodeId: string(),
81400
- reachableHost: string().nullable()
81401
- }), object({ success: literal(true) }), {
81505
+ reachableHost: string().nullable().optional(),
81506
+ color: NodeColorIdSchema.nullable().optional()
81507
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
81402
81508
  kind: "mutation",
81403
81509
  auth: "admin"
81404
81510
  }), method(object({
@@ -84474,7 +84580,7 @@ var CustomActionInputSchema = object({
84474
84580
  action: string().min(1),
84475
84581
  input: unknown()
84476
84582
  });
84477
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
84583
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
84478
84584
  addonId: string(),
84479
84585
  limit: number().min(1).max(500).default(100),
84480
84586
  level: LogLevelSchema$2.optional()
@@ -89709,7 +89815,13 @@ var TopologyNodeSchema = object({
89709
89815
  })).readonly(),
89710
89816
  processes: array(TopologyProcessSchema).readonly(),
89711
89817
  categories: array(TopologyCategorySchema).readonly(),
89712
- rootPackage: TopologyRootPackageSchema.nullable()
89818
+ rootPackage: TopologyRootPackageSchema.nullable(),
89819
+ /**
89820
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
89821
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
89822
+ * for offline rows and when the hub cannot tell.
89823
+ */
89824
+ meshTransport: _enum(["tls", "clear"]).optional()
89713
89825
  });
89714
89826
  var CapUsageEdgeSchema = object({
89715
89827
  callerAddonId: string(),
@@ -90122,6 +90234,7 @@ var OsdNamedTemplateSchema = object({
90122
90234
  });
90123
90235
  /** Where a slot's value comes from. */
90124
90236
  var OsdSourceSchema = discriminatedUnion("kind", [
90237
+ object({ kind: literal("none") }),
90125
90238
  object({
90126
90239
  kind: literal("static"),
90127
90240
  text: string().max(64)
@@ -90248,6 +90361,13 @@ method(object({ deviceId: number().int() }), object({
90248
90361
  }), object({ success: literal(true) }), {
90249
90362
  kind: "mutation",
90250
90363
  auth: "admin"
90364
+ }), method(object({
90365
+ deviceId: number().int(),
90366
+ slotId: string().min(1),
90367
+ enabled: boolean()
90368
+ }), object({ success: literal(true) }), {
90369
+ kind: "mutation",
90370
+ auth: "admin"
90251
90371
  }), method(object({
90252
90372
  sourceDeviceId: number().int(),
90253
90373
  targetDeviceId: number().int()
@@ -90679,7 +90799,15 @@ var GpuInfoSchema = object({
90679
90799
  name: string(),
90680
90800
  memoryMB: number().optional()
90681
90801
  });
90682
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
90802
+ var NpuInfoSchema = object({
90803
+ type: _enum([
90804
+ "apple-ane",
90805
+ "intel-npu",
90806
+ "amd-xdna"
90807
+ ]),
90808
+ name: string().optional(),
90809
+ generation: _enum(["xdna1", "xdna2"]).optional()
90810
+ });
90683
90811
  var CoralInfoSchema = object({
90684
90812
  type: literal("coral-edgetpu"),
90685
90813
  bus: string().optional()
@@ -95422,9 +95550,11 @@ var zoneRulesCapability = {
95422
95550
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
95423
95551
  * manifest entry and nothing else.
95424
95552
  *
95425
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
95426
- * `notification-output` posture); `describe` concat-fans across providers.
95427
- * Every method is `admin`: these spend money.
95553
+ * Collection of provider **types** (addons). Each addon owns zero or more
95554
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
95555
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
95556
+ * `entryId`; callers also pass the owning `addonId` as the collection
95557
+ * selector (broker posture). Every method is `admin`: these spend money.
95428
95558
  *
95429
95559
  * Every cloud object a provider creates is tagged with the orchestrator's
95430
95560
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -95448,8 +95578,8 @@ var TrainingRegionOptionSchema = object({
95448
95578
  priceMultiplier: number().positive()
95449
95579
  });
95450
95580
  /**
95451
- * The provider's per-account settings, as the orchestrator reads them. They
95452
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
95581
+ * The provider's per-entry settings, as the orchestrator reads them. They
95582
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
95453
95583
  * depend on the user's account), never hard-coded in the orchestrator.
95454
95584
  */
95455
95585
  var TrainingProviderDefaultsSchema = object({
@@ -95460,9 +95590,44 @@ var TrainingProviderDefaultsSchema = object({
95460
95590
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
95461
95591
  failedDatasetGraceHours: number().nonnegative()
95462
95592
  });
95593
+ /**
95594
+ * Entry form schema for a provider type — same seam as notification
95595
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
95596
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
95597
+ */
95598
+ var ConfigSchemaPassthrough = unknown();
95599
+ /** One creatable provider type, for the Add-entry dialog. */
95600
+ var TrainingProviderTypeSchema = object({
95601
+ typeId: string(),
95602
+ label: string(),
95603
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
95604
+ iconAsset: string(),
95605
+ /** Owning `training-provider` addon — collection selector for createEntry. */
95606
+ addonId: string(),
95607
+ /**
95608
+ * Fields for one entry of this type (credentials + defaults). Absent on a
95609
+ * type that only needs a name. Password fields are keychain-backed on the
95610
+ * provider addon (`secretStatePaths`), not D634 plaintext.
95611
+ */
95612
+ configSchema: ConfigSchemaPassthrough.optional()
95613
+ });
95614
+ /** One configured account / workspace under a provider type. */
95615
+ var TrainingProviderEntrySchema = object({
95616
+ entryId: string(),
95617
+ typeId: string(),
95618
+ name: string(),
95619
+ addonId: string(),
95620
+ /** Credentials are present — never the values. */
95621
+ configured: boolean()
95622
+ });
95463
95623
  var TrainingProviderDescriptorSchema = object({
95464
95624
  addonId: string(),
95465
- /** `modal`, `runpod`, `fake`, … */
95625
+ entryId: string(),
95626
+ typeId: string(),
95627
+ /** Operator-chosen entry name. */
95628
+ name: string(),
95629
+ iconAsset: string(),
95630
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
95466
95631
  kind: string(),
95467
95632
  label: string(),
95468
95633
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -95474,7 +95639,30 @@ var TrainingProviderDescriptorSchema = object({
95474
95639
  dataResidencyNote: string(),
95475
95640
  /** Credentials are present — never the values. */
95476
95641
  configured: boolean(),
95477
- defaults: TrainingProviderDefaultsSchema
95642
+ defaults: TrainingProviderDefaultsSchema,
95643
+ /**
95644
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
95645
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
95646
+ * never plaintext. Same hydrate contract as settings forms (D789).
95647
+ */
95648
+ formValues: record(string(), unknown()).optional()
95649
+ });
95650
+ /**
95651
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
95652
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
95653
+ * `{ $secretClear: true }` clears it.
95654
+ */
95655
+ var TrainingProviderUpdateEntryInputSchema = object({
95656
+ entryId: string().min(1),
95657
+ name: string().min(1),
95658
+ tokenId: string().optional(),
95659
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
95660
+ environment: string().optional(),
95661
+ gpuType: string().optional(),
95662
+ region: string().optional(),
95663
+ costCapUsd: number().nonnegative().optional(),
95664
+ maxRuntimeSec: number().int().positive().optional(),
95665
+ failedDatasetGraceHours: number().nonnegative().optional()
95478
95666
  });
95479
95667
  var TrainingCredentialCheckSchema = object({
95480
95668
  ok: boolean(),
@@ -95526,20 +95714,33 @@ var TrainerSourceRefSchema = object({
95526
95714
  /** A commit sha (never a branch) — the job must be reproducible. */
95527
95715
  revision: string().regex(/^[0-9a-f]{7,64}$/)
95528
95716
  });
95717
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
95529
95718
  var JobRef = {
95530
- addonId: string(),
95719
+ entryId: string().min(1),
95531
95720
  jobKey: string().uuid()
95532
95721
  };
95533
95722
  var TrainingLogLineSchema = object({
95534
95723
  ts: number(),
95535
95724
  text: string()
95536
95725
  });
95537
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
95726
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
95727
+ typeId: string().min(1),
95728
+ name: string().min(1)
95729
+ }), object({ entryId: string() }), {
95730
+ kind: "mutation",
95731
+ auth: "admin"
95732
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
95733
+ kind: "mutation",
95734
+ auth: "admin"
95735
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
95736
+ kind: "mutation",
95737
+ auth: "admin"
95738
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
95538
95739
  kind: "mutation",
95539
95740
  auth: "admin",
95540
95741
  timeoutMs: 3e4
95541
95742
  }), method(object({
95542
- addonId: string(),
95743
+ entryId: string().min(1),
95543
95744
  gpuType: string(),
95544
95745
  region: string(),
95545
95746
  datasetBytes: number().int().nonnegative(),
@@ -95605,7 +95806,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
95605
95806
  kind: "mutation",
95606
95807
  auth: "admin",
95607
95808
  timeoutMs: 5 * 6e4
95608
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
95809
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
95609
95810
  auth: "admin",
95610
95811
  timeoutMs: 2 * 6e4
95611
95812
  });
@@ -95615,20 +95816,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
95615
95816
  *
95616
95817
  * It owns what every provider must agree on, written once:
95617
95818
  *
95618
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
95619
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
95620
- * the export plan) and reaches this store through the five row methods
95621
- * below, so the Retrain page and the export did not change.
95622
95819
  * - **Jobs.** A persisted state machine, a reconcile loop against the
95623
95820
  * provider, a cost guard, a daily orphan sweep and the retention rules.
95624
95821
  * - **The return flow.** Verified artefacts → Model Studio
95625
95822
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
95626
95823
  * rollback. Nothing is ever registered automatically.
95627
95824
  *
95825
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
95826
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
95827
+ * moment and snapshotted on the job. No frozen dataset version.
95828
+ *
95628
95829
  * Every method is `admin`.
95629
95830
  */
95630
- /** A version WITH its frame list — what the export and a job read. */
95631
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
95831
+ /**
95832
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
95833
+ * Frame ids are resolved at plan/start — never a frozen version id.
95834
+ */
95835
+ var TrainingCorpusSelectionSchema = object({
95836
+ collectionIds: array(string()).min(1),
95837
+ /** Default complete-only for v1 */
95838
+ workState: _enum([
95839
+ "complete",
95840
+ "annotated_or_complete",
95841
+ "any_annotated"
95842
+ ]).default("complete")
95843
+ });
95632
95844
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
95633
95845
  var TrainingBaseModelSchema = object({
95634
95846
  modelId: string(),
@@ -95646,9 +95858,13 @@ var TrainingPresetSchema = _enum([
95646
95858
  "thorough"
95647
95859
  ]);
95648
95860
  var TrainingJobRequestSchema = object({
95649
- datasetVersionId: string().min(1),
95650
- /** The `training-provider` addon that runs it. */
95651
- addonId: string().min(1),
95861
+ /** Live collection + work-state criteria; resolved at plan/start. */
95862
+ selection: TrainingCorpusSelectionSchema,
95863
+ /**
95864
+ * The provider **entry** that runs it (credentials + defaults).
95865
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
95866
+ */
95867
+ entryId: string().min(1),
95652
95868
  gpuType: string().min(1),
95653
95869
  region: string(),
95654
95870
  baseModelId: string().min(1),
@@ -95707,6 +95923,7 @@ var TrainingJobPlanSchema = object({
95707
95923
  * result lives after the operator acted on it.
95708
95924
  */
95709
95925
  var TrainingJobStateSchema = _enum([
95926
+ "queued",
95710
95927
  "uploading",
95711
95928
  "submitted",
95712
95929
  "starting",
@@ -95760,6 +95977,11 @@ var TrainingJobSchema = object({
95760
95977
  createdAt: number(),
95761
95978
  updatedAt: number(),
95762
95979
  state: TrainingJobStateSchema,
95980
+ /**
95981
+ * Shared by every job enqueued together via `startJobBatch`.
95982
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
95983
+ */
95984
+ batchId: string().nullable().default(null),
95763
95985
  stage: TrainingStageSchema.nullable(),
95764
95986
  failure: object({
95765
95987
  reason: TrainingFailureReasonSchema,
@@ -95771,6 +95993,12 @@ var TrainingJobSchema = object({
95771
95993
  maxRuntimeSec: number().int().positive(),
95772
95994
  trainer: TrainerSourceRefSchema,
95773
95995
  datasetLayout: RetrainExportLayoutSchema,
95996
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
95997
+ frameCount: number().int().nonnegative(),
95998
+ /** Resolved frame ids at start — the archive ships exactly these. */
95999
+ frameIds: array(string()).max(2e4).readonly(),
96000
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
96001
+ annotationHash: string(),
95774
96002
  dataset: object({
95775
96003
  bytes: number().int(),
95776
96004
  sha256: string(),
@@ -95812,13 +96040,7 @@ var TrainingJobSchema = object({
95812
96040
  canary: TrainingCanarySchema.nullable()
95813
96041
  });
95814
96042
  var IdInput = object({ id: string().min(1) });
95815
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
95816
- kind: "mutation",
95817
- auth: "admin"
95818
- }), 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() }), {
95819
- kind: "mutation",
95820
- auth: "admin"
95821
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
96043
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
95822
96044
  auth: "admin",
95823
96045
  timeoutMs: 6e4
95824
96046
  }), method(TrainingJobRequestSchema.extend({
@@ -95837,6 +96059,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
95837
96059
  kind: "mutation",
95838
96060
  auth: "admin",
95839
96061
  timeoutMs: 12e4
96062
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
96063
+ baseModelIds: array(string().min(1)).min(1),
96064
+ name: string().min(1).max(120),
96065
+ maxCostUsd: number().positive(),
96066
+ maxRuntimeSec: number().int().positive(),
96067
+ idempotencyKey: string().min(8).max(80)
96068
+ }), discriminatedUnion("kind", [object({
96069
+ kind: literal("started"),
96070
+ batchId: string(),
96071
+ jobs: array(TrainingJobSchema).min(1).readonly()
96072
+ }), object({
96073
+ kind: literal("refused"),
96074
+ reason: TrainingRefusalReasonSchema,
96075
+ detail: string()
96076
+ })]), {
96077
+ kind: "mutation",
96078
+ auth: "admin",
96079
+ timeoutMs: 12e4
95840
96080
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
95841
96081
  kind: "mutation",
95842
96082
  auth: "admin",
@@ -101395,6 +101635,36 @@ Object.freeze({
101395
101635
  addonId: null,
101396
101636
  access: "view"
101397
101637
  },
101638
+ "oidcConnections.connectionFormSchema": {
101639
+ capName: "oidc-connections",
101640
+ capScope: "system",
101641
+ addonId: null,
101642
+ access: "view"
101643
+ },
101644
+ "oidcConnections.createConnection": {
101645
+ capName: "oidc-connections",
101646
+ capScope: "system",
101647
+ addonId: null,
101648
+ access: "create"
101649
+ },
101650
+ "oidcConnections.deleteConnection": {
101651
+ capName: "oidc-connections",
101652
+ capScope: "system",
101653
+ addonId: null,
101654
+ access: "delete"
101655
+ },
101656
+ "oidcConnections.listConnections": {
101657
+ capName: "oidc-connections",
101658
+ capScope: "system",
101659
+ addonId: null,
101660
+ access: "view"
101661
+ },
101662
+ "oidcConnections.updateConnection": {
101663
+ capName: "oidc-connections",
101664
+ capScope: "system",
101665
+ addonId: null,
101666
+ access: "create"
101667
+ },
101398
101668
  "osd.getStatus": {
101399
101669
  capName: "osd",
101400
101670
  capScope: "device",
@@ -101467,6 +101737,12 @@ Object.freeze({
101467
101737
  addonId: null,
101468
101738
  access: "create"
101469
101739
  },
101740
+ "osdManager.setSlotCameraEnabled": {
101741
+ capName: "osd-manager",
101742
+ capScope: "system",
101743
+ addonId: null,
101744
+ access: "create"
101745
+ },
101470
101746
  "osdManager.upsertTemplate": {
101471
101747
  capName: "osd-manager",
101472
101748
  capScope: "system",
@@ -101605,12 +101881,6 @@ Object.freeze({
101605
101881
  addonId: null,
101606
101882
  access: "create"
101607
101883
  },
101608
- "pipelineAnalytics.createRetrainDatasetVersion": {
101609
- capName: "pipeline-analytics",
101610
- capScope: "device",
101611
- addonId: null,
101612
- access: "create"
101613
- },
101614
101884
  "pipelineAnalytics.deleteDeviceEvents": {
101615
101885
  capName: "pipeline-analytics",
101616
101886
  capScope: "device",
@@ -101623,12 +101893,6 @@ Object.freeze({
101623
101893
  addonId: null,
101624
101894
  access: "delete"
101625
101895
  },
101626
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
101627
- capName: "pipeline-analytics",
101628
- capScope: "device",
101629
- addonId: null,
101630
- access: "delete"
101631
- },
101632
101896
  "pipelineAnalytics.deleteTracks": {
101633
101897
  capName: "pipeline-analytics",
101634
101898
  capScope: "device",
@@ -101731,6 +101995,12 @@ Object.freeze({
101731
101995
  addonId: null,
101732
101996
  access: "view"
101733
101997
  },
101998
+ "pipelineAnalytics.getRetrainCorpusKpi": {
101999
+ capName: "pipeline-analytics",
102000
+ capScope: "device",
102001
+ addonId: null,
102002
+ access: "view"
102003
+ },
101734
102004
  "pipelineAnalytics.getRetrainExportUrl": {
101735
102005
  capName: "pipeline-analytics",
101736
102006
  capScope: "device",
@@ -101851,7 +102121,7 @@ Object.freeze({
101851
102121
  addonId: null,
101852
102122
  access: "view"
101853
102123
  },
101854
- "pipelineAnalytics.listRetrainDatasetVersions": {
102124
+ "pipelineAnalytics.listRetrainCorpusPage": {
101855
102125
  capName: "pipeline-analytics",
101856
102126
  capScope: "device",
101857
102127
  addonId: null,
@@ -101905,12 +102175,6 @@ Object.freeze({
101905
102175
  addonId: null,
101906
102176
  access: "create"
101907
102177
  },
101908
- "pipelineAnalytics.previewRetrainDataset": {
101909
- capName: "pipeline-analytics",
101910
- capScope: "device",
101911
- addonId: null,
101912
- access: "view"
101913
- },
101914
102178
  "pipelineAnalytics.proposeRetrainAnnotations": {
101915
102179
  capName: "pipeline-analytics",
101916
102180
  capScope: "device",
@@ -101989,6 +102253,12 @@ Object.freeze({
101989
102253
  addonId: null,
101990
102254
  access: "create"
101991
102255
  },
102256
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
102257
+ capName: "pipeline-analytics",
102258
+ capScope: "device",
102259
+ addonId: null,
102260
+ access: "view"
102261
+ },
101992
102262
  "pipelineAnalytics.restageRetrainTrack": {
101993
102263
  capName: "pipeline-analytics",
101994
102264
  capScope: "device",
@@ -102049,12 +102319,6 @@ Object.freeze({
102049
102319
  addonId: null,
102050
102320
  access: "create"
102051
102321
  },
102052
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
102053
- capName: "pipeline-analytics",
102054
- capScope: "device",
102055
- addonId: null,
102056
- access: "view"
102057
- },
102058
102322
  "pipelineAnalytics.wipeAllAnalytics": {
102059
102323
  capName: "pipeline-analytics",
102060
102324
  capScope: "device",
@@ -104449,18 +104713,6 @@ Object.freeze({
104449
104713
  addonId: null,
104450
104714
  access: "create"
104451
104715
  },
104452
- "training.findDatasetVersionIdByName": {
104453
- capName: "training",
104454
- capScope: "system",
104455
- addonId: null,
104456
- access: "view"
104457
- },
104458
- "training.getDatasetVersion": {
104459
- capName: "training",
104460
- capScope: "system",
104461
- addonId: null,
104462
- access: "view"
104463
- },
104464
104716
  "training.getJob": {
104465
104717
  capName: "training",
104466
104718
  capScope: "system",
@@ -104479,12 +104731,6 @@ Object.freeze({
104479
104731
  addonId: null,
104480
104732
  access: "view"
104481
104733
  },
104482
- "training.listDatasetVersions": {
104483
- capName: "training",
104484
- capScope: "system",
104485
- addonId: null,
104486
- access: "view"
104487
- },
104488
104734
  "training.listJobs": {
104489
104735
  capName: "training",
104490
104736
  capScope: "system",
@@ -104497,54 +104743,66 @@ Object.freeze({
104497
104743
  addonId: null,
104498
104744
  access: "view"
104499
104745
  },
104500
- "training.putDatasetVersion": {
104746
+ "training.registerResult": {
104501
104747
  capName: "training",
104502
104748
  capScope: "system",
104503
104749
  addonId: null,
104504
104750
  access: "create"
104505
104751
  },
104506
- "training.registerResult": {
104752
+ "training.rollbackCanary": {
104507
104753
  capName: "training",
104508
104754
  capScope: "system",
104509
104755
  addonId: null,
104510
104756
  access: "create"
104511
104757
  },
104512
- "training.removeDatasetVersion": {
104758
+ "training.startJob": {
104513
104759
  capName: "training",
104514
104760
  capScope: "system",
104515
104761
  addonId: null,
104516
- access: "delete"
104762
+ access: "create"
104517
104763
  },
104518
- "training.rollbackCanary": {
104764
+ "training.startJobBatch": {
104519
104765
  capName: "training",
104520
104766
  capScope: "system",
104521
104767
  addonId: null,
104522
104768
  access: "create"
104523
104769
  },
104524
- "training.startJob": {
104525
- capName: "training",
104770
+ "trainingProvider.cancelJob": {
104771
+ capName: "training-provider",
104526
104772
  capScope: "system",
104527
104773
  addonId: null,
104528
104774
  access: "create"
104529
104775
  },
104530
- "trainingProvider.cancelJob": {
104776
+ "trainingProvider.cleanupJob": {
104531
104777
  capName: "training-provider",
104532
104778
  capScope: "system",
104533
104779
  addonId: null,
104534
104780
  access: "create"
104535
104781
  },
104536
- "trainingProvider.cleanupJob": {
104782
+ "trainingProvider.createEntry": {
104537
104783
  capName: "training-provider",
104538
104784
  capScope: "system",
104539
104785
  addonId: null,
104540
104786
  access: "create"
104541
104787
  },
104788
+ "trainingProvider.deleteEntry": {
104789
+ capName: "training-provider",
104790
+ capScope: "system",
104791
+ addonId: null,
104792
+ access: "delete"
104793
+ },
104542
104794
  "trainingProvider.describe": {
104543
104795
  capName: "training-provider",
104544
104796
  capScope: "system",
104545
104797
  addonId: null,
104546
104798
  access: "view"
104547
104799
  },
104800
+ "trainingProvider.describeTypes": {
104801
+ capName: "training-provider",
104802
+ capScope: "system",
104803
+ addonId: null,
104804
+ access: "view"
104805
+ },
104548
104806
  "trainingProvider.estimateJob": {
104549
104807
  capName: "training-provider",
104550
104808
  capScope: "system",
@@ -104557,6 +104815,12 @@ Object.freeze({
104557
104815
  addonId: null,
104558
104816
  access: "view"
104559
104817
  },
104818
+ "trainingProvider.listEntries": {
104819
+ capName: "training-provider",
104820
+ capScope: "system",
104821
+ addonId: null,
104822
+ access: "view"
104823
+ },
104560
104824
  "trainingProvider.listJobEvents": {
104561
104825
  capName: "training-provider",
104562
104826
  capScope: "system",
@@ -104587,6 +104851,12 @@ Object.freeze({
104587
104851
  addonId: null,
104588
104852
  access: "create"
104589
104853
  },
104854
+ "trainingProvider.updateEntry": {
104855
+ capName: "training-provider",
104856
+ capScope: "system",
104857
+ addonId: null,
104858
+ access: "create"
104859
+ },
104590
104860
  "trainingProvider.uploadDataset": {
104591
104861
  capName: "training-provider",
104592
104862
  capScope: "system",
@@ -107793,6 +108063,11 @@ Object.freeze({
107793
108063
  form: "single",
107794
108064
  optional: false
107795
108065
  }],
108066
+ "osdManager.setSlotCameraEnabled": [{
108067
+ name: "deviceId",
108068
+ form: "single",
108069
+ optional: false
108070
+ }],
107796
108071
  "petFeeder.callPet": [{
107797
108072
  name: "deviceId",
107798
108073
  form: "single",
@@ -108013,6 +108288,11 @@ Object.freeze({
108013
108288
  form: "array",
108014
108289
  optional: false
108015
108290
  }],
108291
+ "pipelineAnalytics.listRetrainCorpusPage": [{
108292
+ name: "deviceIds",
108293
+ form: "array",
108294
+ optional: true
108295
+ }],
108016
108296
  "pipelineAnalytics.listRetrainStaging": [{
108017
108297
  name: "deviceIds",
108018
108298
  form: "array",
@@ -109122,6 +109402,7 @@ Object.freeze({
109122
109402
  });
109123
109403
  Object.freeze({
109124
109404
  "broker": "broker",
109405
+ "calendar-source": "calendar",
109125
109406
  "device-export": "device-export",
109126
109407
  "llm": "ai",
109127
109408
  "mesh-network": "mesh",
@@ -109607,6 +109888,8 @@ var STATE_SUMMARY_VARS = [
109607
109888
  [...RULE_TEXT],
109608
109889
  [...RULE_TEXT],
109609
109890
  [...RULE_TEXT],
109891
+ [...RULE_TEXT],
109892
+ [...RULE_TEXT],
109610
109893
  ([...RULE_TEXT], [...UPDATES]),
109611
109894
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
109612
109895
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),