@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.js CHANGED
@@ -58280,7 +58280,7 @@ var ZodIssueCode = {
58280
58280
  var ZodFirstPartyTypeKind;
58281
58281
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
58282
58282
  //#endregion
58283
- //#region ../types/dist/sleep-r3RWkGVx.mjs
58283
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
58284
58284
  /**
58285
58285
  * The audio chunk plane's byte format, and the ONE expansion from a coded
58286
58286
  * window to float samples (D455).
@@ -62286,6 +62286,16 @@ var CompositionSchema = object({
62286
62286
  seen.add(feature.cap);
62287
62287
  });
62288
62288
  });
62289
+ var NodeColorIdSchema = _enum([
62290
+ "node-a",
62291
+ "node-b",
62292
+ "node-c",
62293
+ "node-d",
62294
+ "node-e",
62295
+ "node-f",
62296
+ "node-g",
62297
+ "node-h"
62298
+ ]);
62289
62299
  new Set([
62290
62300
  "track",
62291
62301
  "face",
@@ -71344,14 +71354,14 @@ var LlmProfileSchema = object({
71344
71354
  /** ConfigUISchema tree passed through untyped on the wire (the
71345
71355
  * notification-output `ConfigSchemaPassthrough` precedent at
71346
71356
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
71347
- var ConfigSchemaPassthrough$1 = unknown();
71357
+ var ConfigSchemaPassthrough$3 = unknown();
71348
71358
  var LlmProfileKindDescriptorSchema = object({
71349
71359
  kind: LlmProfileKindSchema,
71350
71360
  label: string(),
71351
71361
  icon: string(),
71352
71362
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
71353
71363
  addonId: string(),
71354
- configSchema: ConfigSchemaPassthrough$1
71364
+ configSchema: ConfigSchemaPassthrough$3
71355
71365
  });
71356
71366
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
71357
71367
  var LlmDefaultSchema = object({
@@ -72472,7 +72482,7 @@ var TargetKindCapsSchema = object({
72472
72482
  * the union is large and not meant for runtime validation here; the exported
72473
72483
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
72474
72484
  */
72475
- var ConfigSchemaPassthrough = unknown();
72485
+ var ConfigSchemaPassthrough$2 = unknown();
72476
72486
  var TargetKindSchema = object({
72477
72487
  kind: string(),
72478
72488
  label: string(),
@@ -72509,7 +72519,7 @@ var TargetKindSchema = object({
72509
72519
  * its raster path, which is the safe default for an unknown image.
72510
72520
  */
72511
72521
  iconMediaType: string().optional(),
72512
- configSchema: ConfigSchemaPassthrough,
72522
+ configSchema: ConfigSchemaPassthrough$2,
72513
72523
  /**
72514
72524
  * The config keys that decide WHERE this kind's secrets are sent (server,
72515
72525
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -75846,6 +75856,61 @@ var OauthIntegrationDescriptorSchema = object({
75846
75856
  });
75847
75857
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
75848
75858
  /**
75859
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
75860
+ *
75861
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
75862
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
75863
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
75864
+ * immutable after create.
75865
+ */
75866
+ var ConfigSchemaPassthrough$1 = unknown();
75867
+ var OidcConnectionSchema = object({
75868
+ id: string().min(1),
75869
+ displayName: string(),
75870
+ icon: string(),
75871
+ issuerUrl: string(),
75872
+ clientId: string(),
75873
+ /** Client id + secret present — never the secret value. */
75874
+ configured: boolean(),
75875
+ /**
75876
+ * Values for the connection form schema. `clientSecret` is a keychain
75877
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
75878
+ */
75879
+ formValues: record(string(), unknown()).optional()
75880
+ });
75881
+ /**
75882
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
75883
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
75884
+ */
75885
+ var OidcConnectionUpdateInputSchema = object({
75886
+ id: string().min(1),
75887
+ displayName: string().min(1),
75888
+ icon: string().optional(),
75889
+ issuerUrl: string().optional(),
75890
+ clientId: string().optional(),
75891
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
75892
+ redirectUri: string().optional(),
75893
+ scopes: string().optional(),
75894
+ usernameClaim: _enum([
75895
+ "preferred_username",
75896
+ "email",
75897
+ "sub"
75898
+ ]).optional()
75899
+ });
75900
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
75901
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
75902
+ displayName: string().min(1)
75903
+ }), object({ id: string() }), {
75904
+ kind: "mutation",
75905
+ auth: "admin"
75906
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
75907
+ kind: "mutation",
75908
+ auth: "admin"
75909
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
75910
+ kind: "mutation",
75911
+ auth: "admin"
75912
+ });
75913
+ /**
75849
75914
  * What started a camera's onboard motion (D672). `camera` is the camera's own
75850
75915
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
75851
75916
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -77202,24 +77267,69 @@ var RetrainFrameListSchema = object({
77202
77267
  /** What the page pre-selects — the native key frame when one survives. */
77203
77268
  autoPickMediaId: number().int().optional()
77204
77269
  });
77270
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
77271
+ var RetrainFrameWorkStateSchema = _enum([
77272
+ "unannotated",
77273
+ "annotated",
77274
+ "complete"
77275
+ ]);
77276
+ /**
77277
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
77278
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
77279
+ */
77280
+ var RetrainCorpusFilterSchema = object({
77281
+ workState: RetrainFrameWorkStateSchema.optional(),
77282
+ deviceIds: array(number()).max(500).optional(),
77283
+ /** When set, only frames in this named collection. */
77284
+ collectionId: string().optional(),
77285
+ /** Frames that carry at least one saved annotation in one of these classes. */
77286
+ classes: array(RetrainMacroClassSchema).optional(),
77287
+ page: number().int().positive().default(1),
77288
+ pageSize: number().int().positive().max(100).default(50)
77289
+ });
77290
+ var RetrainCorpusPageSchema = object({
77291
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
77292
+ total: number().int().nonnegative(),
77293
+ page: number().int().positive(),
77294
+ pageSize: number().int().positive()
77295
+ });
77296
+ var RetrainCorpusKpiCameraRowSchema = object({
77297
+ deviceId: number(),
77298
+ unannotated: number().int().nonnegative(),
77299
+ annotated: number().int().nonnegative(),
77300
+ complete: number().int().nonnegative(),
77301
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
77302
+ * `null` when the corpus is empty (no ratio). */
77303
+ pctOfCorpus: number().min(0).max(1).nullable()
77304
+ });
77305
+ var RetrainCorpusKpiSchema = object({
77306
+ total: number().int().nonnegative(),
77307
+ unannotated: number().int().nonnegative(),
77308
+ annotated: number().int().nonnegative(),
77309
+ complete: number().int().nonnegative(),
77310
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
77311
+ });
77205
77312
  /**
77206
77313
  * Which frames an annotated export carries. Every field narrows; an empty
77207
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
77208
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
77209
- * the primitive a version export uses; `batchId` re-selects what an earlier
77210
- * export carried (`exportedInBatch`).
77314
+ * filter is every annotated copy. `frameIds` is the primitive a job or
77315
+ * download uses; `batchId` re-selects what an earlier export carried
77316
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
77317
+ * resolves to `frameIds` at plan/start.
77211
77318
  */
77212
77319
  var RetrainExportFilterSchema = object({
77213
77320
  deviceIds: array(number()).optional(),
77214
77321
  frameIds: array(string()).max(2e4).optional(),
77215
77322
  /** Only frames in at least one of these named collections. */
77216
77323
  collectionIds: array(string()).max(200).optional(),
77217
- /** Exactly the frames of this dataset version (and its completeOnly). An
77218
- * unknown id selects nothing. */
77219
- datasetVersionId: string().optional(),
77324
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
77325
+ collectionId: string().optional(),
77220
77326
  batchId: string().optional(),
77221
77327
  /** Only frames the operator marked complete (all subjects boxed). */
77222
- completeOnly: boolean().optional()
77328
+ completeOnly: boolean().optional(),
77329
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
77330
+ workState: RetrainFrameWorkStateSchema.optional(),
77331
+ /** Frames with at least one saved annotation in one of these classes. */
77332
+ classes: array(RetrainMacroClassSchema).optional()
77223
77333
  });
77224
77334
  /**
77225
77335
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -77419,8 +77529,7 @@ var RetrainDatasetStatsSchema = object({
77419
77529
  completeFrames: number().int()
77420
77530
  })).readonly()
77421
77531
  });
77422
- /** An immutable dataset version, without its frame list. */
77423
- var RetrainDatasetVersionSchema = object({
77532
+ object({
77424
77533
  id: string(),
77425
77534
  name: string(),
77426
77535
  createdAt: number(),
@@ -77428,22 +77537,33 @@ var RetrainDatasetVersionSchema = object({
77428
77537
  layout: RetrainExportLayoutSchema,
77429
77538
  completeOnly: boolean(),
77430
77539
  frameCount: number().int(),
77431
- /** sha256 of what the frames taught when the version was frozen. */
77432
77540
  annotationHash: string(),
77433
- /** The export manifest schema the version was cut under. */
77434
77541
  manifestSchema: string(),
77435
77542
  stats: RetrainDatasetStatsSchema
77436
77543
  });
77437
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
77438
- kind: literal("created"),
77439
- version: RetrainDatasetVersionSchema
77544
+ /**
77545
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
77546
+ * the training cap. Resolved here so plan/start and the annotated export share
77547
+ * one definition of "the frames" (`buildRetrainExportPlan`).
77548
+ */
77549
+ var RetrainTrainingCorpusSelectionSchema = object({
77550
+ collectionIds: array(string()).min(1),
77551
+ workState: _enum([
77552
+ "complete",
77553
+ "annotated_or_complete",
77554
+ "any_annotated"
77555
+ ]).default("complete")
77556
+ });
77557
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
77558
+ kind: literal("resolved"),
77559
+ frameIds: array(string()).max(2e4).readonly(),
77560
+ stats: RetrainDatasetStatsSchema,
77561
+ annotationHash: string(),
77562
+ layout: RetrainExportLayoutSchema
77440
77563
  }), object({
77441
77564
  kind: literal("refused"),
77442
- reason: _enum([
77443
- "empty-name",
77444
- "duplicate-name",
77445
- "no-frames"
77446
- ])
77565
+ reason: _enum(["unknown-collection", "no-frames"]),
77566
+ detail: string()
77447
77567
  })]);
77448
77568
  /** The outcome of a lifecycle move owned by the retrain page. */
77449
77569
  var RetrainTransitionResultSchema = object({
@@ -78150,6 +78270,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
78150
78270
  }), array(RetrainTrackSchema).readonly(), {
78151
78271
  kind: "query",
78152
78272
  auth: "admin"
78273
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
78274
+ kind: "query",
78275
+ auth: "admin"
78276
+ }), method(object({}), RetrainCorpusKpiSchema, {
78277
+ kind: "query",
78278
+ auth: "admin"
78153
78279
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
78154
78280
  kind: "query",
78155
78281
  auth: "admin"
@@ -78245,36 +78371,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
78245
78371
  kind: "mutation",
78246
78372
  auth: "admin",
78247
78373
  timeoutMs: 12e4
78248
- }), method(object({
78249
- selection: RetrainDatasetSelectionSchema,
78250
- completeOnly: boolean().optional()
78251
- }), RetrainDatasetStatsSchema, {
78252
- kind: "query",
78253
- auth: "admin"
78254
- }), method(object({
78255
- name: string().max(120),
78256
- selection: RetrainDatasetSelectionSchema,
78257
- layout: RetrainExportLayoutSchema,
78258
- completeOnly: boolean()
78259
- }), CreateRetrainDatasetVersionResultSchema, {
78260
- kind: "mutation",
78261
- auth: "admin",
78262
- timeoutMs: 12e4
78263
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
78264
- kind: "query",
78265
- auth: "admin"
78266
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
78267
- kind: "mutation",
78268
- auth: "admin"
78269
- }), method(object({ id: string() }), object({
78270
- found: boolean(),
78271
- annotationHash: string(),
78272
- matches: boolean(),
78273
- missingFrames: number().int()
78274
- }), {
78275
- kind: "query",
78276
- auth: "admin",
78277
- timeoutMs: 12e4
78278
78374
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
78279
78375
  kind: "query",
78280
78376
  auth: "admin"
@@ -78301,6 +78397,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
78301
78397
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
78302
78398
  kind: "query",
78303
78399
  auth: "admin"
78400
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
78401
+ kind: "query",
78402
+ auth: "admin",
78403
+ timeoutMs: 6e4
78304
78404
  }), method(object({
78305
78405
  id: string(),
78306
78406
  name: string().max(120)
@@ -78917,11 +79017,14 @@ var HardwareClassIdSchema = _enum([
78917
79017
  "intel-n-series",
78918
79018
  "apple-m-base",
78919
79019
  "apple-m-pro",
79020
+ "amd-phoenix",
78920
79021
  "unknown"
78921
79022
  ]);
78922
79023
  var AcceleratorKindSchema = _enum([
78923
79024
  "intel-npu",
78924
79025
  "intel-igpu",
79026
+ "amd-igpu",
79027
+ "amd-npu",
78925
79028
  "x86-cpu",
78926
79029
  "arm-cpu",
78927
79030
  "apple-ane",
@@ -80851,6 +80954,8 @@ var AgentPipelineSettingsSchema = object({
80851
80954
  * address is wrong (multi-homed host, NAT, custom interface).
80852
80955
  */
80853
80956
  reachableHost: string().optional(),
80957
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
80958
+ color: NodeColorIdSchema.optional(),
80854
80959
  /**
80855
80960
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
80856
80961
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -81400,8 +81505,9 @@ method(object({
81400
81505
  auth: "admin"
81401
81506
  }), method(object({
81402
81507
  agentNodeId: string(),
81403
- reachableHost: string().nullable()
81404
- }), object({ success: literal(true) }), {
81508
+ reachableHost: string().nullable().optional(),
81509
+ color: NodeColorIdSchema.nullable().optional()
81510
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
81405
81511
  kind: "mutation",
81406
81512
  auth: "admin"
81407
81513
  }), method(object({
@@ -84477,7 +84583,7 @@ var CustomActionInputSchema = object({
84477
84583
  action: string().min(1),
84478
84584
  input: unknown()
84479
84585
  });
84480
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
84586
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
84481
84587
  addonId: string(),
84482
84588
  limit: number().min(1).max(500).default(100),
84483
84589
  level: LogLevelSchema$2.optional()
@@ -89712,7 +89818,13 @@ var TopologyNodeSchema = object({
89712
89818
  })).readonly(),
89713
89819
  processes: array(TopologyProcessSchema).readonly(),
89714
89820
  categories: array(TopologyCategorySchema).readonly(),
89715
- rootPackage: TopologyRootPackageSchema.nullable()
89821
+ rootPackage: TopologyRootPackageSchema.nullable(),
89822
+ /**
89823
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
89824
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
89825
+ * for offline rows and when the hub cannot tell.
89826
+ */
89827
+ meshTransport: _enum(["tls", "clear"]).optional()
89716
89828
  });
89717
89829
  var CapUsageEdgeSchema = object({
89718
89830
  callerAddonId: string(),
@@ -90125,6 +90237,7 @@ var OsdNamedTemplateSchema = object({
90125
90237
  });
90126
90238
  /** Where a slot's value comes from. */
90127
90239
  var OsdSourceSchema = discriminatedUnion("kind", [
90240
+ object({ kind: literal("none") }),
90128
90241
  object({
90129
90242
  kind: literal("static"),
90130
90243
  text: string().max(64)
@@ -90251,6 +90364,13 @@ method(object({ deviceId: number().int() }), object({
90251
90364
  }), object({ success: literal(true) }), {
90252
90365
  kind: "mutation",
90253
90366
  auth: "admin"
90367
+ }), method(object({
90368
+ deviceId: number().int(),
90369
+ slotId: string().min(1),
90370
+ enabled: boolean()
90371
+ }), object({ success: literal(true) }), {
90372
+ kind: "mutation",
90373
+ auth: "admin"
90254
90374
  }), method(object({
90255
90375
  sourceDeviceId: number().int(),
90256
90376
  targetDeviceId: number().int()
@@ -90682,7 +90802,15 @@ var GpuInfoSchema = object({
90682
90802
  name: string(),
90683
90803
  memoryMB: number().optional()
90684
90804
  });
90685
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
90805
+ var NpuInfoSchema = object({
90806
+ type: _enum([
90807
+ "apple-ane",
90808
+ "intel-npu",
90809
+ "amd-xdna"
90810
+ ]),
90811
+ name: string().optional(),
90812
+ generation: _enum(["xdna1", "xdna2"]).optional()
90813
+ });
90686
90814
  var CoralInfoSchema = object({
90687
90815
  type: literal("coral-edgetpu"),
90688
90816
  bus: string().optional()
@@ -95425,9 +95553,11 @@ var zoneRulesCapability = {
95425
95553
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
95426
95554
  * manifest entry and nothing else.
95427
95555
  *
95428
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
95429
- * `notification-output` posture); `describe` concat-fans across providers.
95430
- * Every method is `admin`: these spend money.
95556
+ * Collection of provider **types** (addons). Each addon owns zero or more
95557
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
95558
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
95559
+ * `entryId`; callers also pass the owning `addonId` as the collection
95560
+ * selector (broker posture). Every method is `admin`: these spend money.
95431
95561
  *
95432
95562
  * Every cloud object a provider creates is tagged with the orchestrator's
95433
95563
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -95451,8 +95581,8 @@ var TrainingRegionOptionSchema = object({
95451
95581
  priceMultiplier: number().positive()
95452
95582
  });
95453
95583
  /**
95454
- * The provider's per-account settings, as the orchestrator reads them. They
95455
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
95584
+ * The provider's per-entry settings, as the orchestrator reads them. They
95585
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
95456
95586
  * depend on the user's account), never hard-coded in the orchestrator.
95457
95587
  */
95458
95588
  var TrainingProviderDefaultsSchema = object({
@@ -95463,9 +95593,44 @@ var TrainingProviderDefaultsSchema = object({
95463
95593
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
95464
95594
  failedDatasetGraceHours: number().nonnegative()
95465
95595
  });
95596
+ /**
95597
+ * Entry form schema for a provider type — same seam as notification
95598
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
95599
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
95600
+ */
95601
+ var ConfigSchemaPassthrough = unknown();
95602
+ /** One creatable provider type, for the Add-entry dialog. */
95603
+ var TrainingProviderTypeSchema = object({
95604
+ typeId: string(),
95605
+ label: string(),
95606
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
95607
+ iconAsset: string(),
95608
+ /** Owning `training-provider` addon — collection selector for createEntry. */
95609
+ addonId: string(),
95610
+ /**
95611
+ * Fields for one entry of this type (credentials + defaults). Absent on a
95612
+ * type that only needs a name. Password fields are keychain-backed on the
95613
+ * provider addon (`secretStatePaths`), not D634 plaintext.
95614
+ */
95615
+ configSchema: ConfigSchemaPassthrough.optional()
95616
+ });
95617
+ /** One configured account / workspace under a provider type. */
95618
+ var TrainingProviderEntrySchema = object({
95619
+ entryId: string(),
95620
+ typeId: string(),
95621
+ name: string(),
95622
+ addonId: string(),
95623
+ /** Credentials are present — never the values. */
95624
+ configured: boolean()
95625
+ });
95466
95626
  var TrainingProviderDescriptorSchema = object({
95467
95627
  addonId: string(),
95468
- /** `modal`, `runpod`, `fake`, … */
95628
+ entryId: string(),
95629
+ typeId: string(),
95630
+ /** Operator-chosen entry name. */
95631
+ name: string(),
95632
+ iconAsset: string(),
95633
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
95469
95634
  kind: string(),
95470
95635
  label: string(),
95471
95636
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -95477,7 +95642,30 @@ var TrainingProviderDescriptorSchema = object({
95477
95642
  dataResidencyNote: string(),
95478
95643
  /** Credentials are present — never the values. */
95479
95644
  configured: boolean(),
95480
- defaults: TrainingProviderDefaultsSchema
95645
+ defaults: TrainingProviderDefaultsSchema,
95646
+ /**
95647
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
95648
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
95649
+ * never plaintext. Same hydrate contract as settings forms (D789).
95650
+ */
95651
+ formValues: record(string(), unknown()).optional()
95652
+ });
95653
+ /**
95654
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
95655
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
95656
+ * `{ $secretClear: true }` clears it.
95657
+ */
95658
+ var TrainingProviderUpdateEntryInputSchema = object({
95659
+ entryId: string().min(1),
95660
+ name: string().min(1),
95661
+ tokenId: string().optional(),
95662
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
95663
+ environment: string().optional(),
95664
+ gpuType: string().optional(),
95665
+ region: string().optional(),
95666
+ costCapUsd: number().nonnegative().optional(),
95667
+ maxRuntimeSec: number().int().positive().optional(),
95668
+ failedDatasetGraceHours: number().nonnegative().optional()
95481
95669
  });
95482
95670
  var TrainingCredentialCheckSchema = object({
95483
95671
  ok: boolean(),
@@ -95529,20 +95717,33 @@ var TrainerSourceRefSchema = object({
95529
95717
  /** A commit sha (never a branch) — the job must be reproducible. */
95530
95718
  revision: string().regex(/^[0-9a-f]{7,64}$/)
95531
95719
  });
95720
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
95532
95721
  var JobRef = {
95533
- addonId: string(),
95722
+ entryId: string().min(1),
95534
95723
  jobKey: string().uuid()
95535
95724
  };
95536
95725
  var TrainingLogLineSchema = object({
95537
95726
  ts: number(),
95538
95727
  text: string()
95539
95728
  });
95540
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
95729
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
95730
+ typeId: string().min(1),
95731
+ name: string().min(1)
95732
+ }), object({ entryId: string() }), {
95733
+ kind: "mutation",
95734
+ auth: "admin"
95735
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
95736
+ kind: "mutation",
95737
+ auth: "admin"
95738
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
95739
+ kind: "mutation",
95740
+ auth: "admin"
95741
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
95541
95742
  kind: "mutation",
95542
95743
  auth: "admin",
95543
95744
  timeoutMs: 3e4
95544
95745
  }), method(object({
95545
- addonId: string(),
95746
+ entryId: string().min(1),
95546
95747
  gpuType: string(),
95547
95748
  region: string(),
95548
95749
  datasetBytes: number().int().nonnegative(),
@@ -95608,7 +95809,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
95608
95809
  kind: "mutation",
95609
95810
  auth: "admin",
95610
95811
  timeoutMs: 5 * 6e4
95611
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
95812
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
95612
95813
  auth: "admin",
95613
95814
  timeoutMs: 2 * 6e4
95614
95815
  });
@@ -95618,20 +95819,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
95618
95819
  *
95619
95820
  * It owns what every provider must agree on, written once:
95620
95821
  *
95621
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
95622
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
95623
- * the export plan) and reaches this store through the five row methods
95624
- * below, so the Retrain page and the export did not change.
95625
95822
  * - **Jobs.** A persisted state machine, a reconcile loop against the
95626
95823
  * provider, a cost guard, a daily orphan sweep and the retention rules.
95627
95824
  * - **The return flow.** Verified artefacts → Model Studio
95628
95825
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
95629
95826
  * rollback. Nothing is ever registered automatically.
95630
95827
  *
95828
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
95829
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
95830
+ * moment and snapshotted on the job. No frozen dataset version.
95831
+ *
95631
95832
  * Every method is `admin`.
95632
95833
  */
95633
- /** A version WITH its frame list — what the export and a job read. */
95634
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
95834
+ /**
95835
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
95836
+ * Frame ids are resolved at plan/start — never a frozen version id.
95837
+ */
95838
+ var TrainingCorpusSelectionSchema = object({
95839
+ collectionIds: array(string()).min(1),
95840
+ /** Default complete-only for v1 */
95841
+ workState: _enum([
95842
+ "complete",
95843
+ "annotated_or_complete",
95844
+ "any_annotated"
95845
+ ]).default("complete")
95846
+ });
95635
95847
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
95636
95848
  var TrainingBaseModelSchema = object({
95637
95849
  modelId: string(),
@@ -95649,9 +95861,13 @@ var TrainingPresetSchema = _enum([
95649
95861
  "thorough"
95650
95862
  ]);
95651
95863
  var TrainingJobRequestSchema = object({
95652
- datasetVersionId: string().min(1),
95653
- /** The `training-provider` addon that runs it. */
95654
- addonId: string().min(1),
95864
+ /** Live collection + work-state criteria; resolved at plan/start. */
95865
+ selection: TrainingCorpusSelectionSchema,
95866
+ /**
95867
+ * The provider **entry** that runs it (credentials + defaults).
95868
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
95869
+ */
95870
+ entryId: string().min(1),
95655
95871
  gpuType: string().min(1),
95656
95872
  region: string(),
95657
95873
  baseModelId: string().min(1),
@@ -95710,6 +95926,7 @@ var TrainingJobPlanSchema = object({
95710
95926
  * result lives after the operator acted on it.
95711
95927
  */
95712
95928
  var TrainingJobStateSchema = _enum([
95929
+ "queued",
95713
95930
  "uploading",
95714
95931
  "submitted",
95715
95932
  "starting",
@@ -95763,6 +95980,11 @@ var TrainingJobSchema = object({
95763
95980
  createdAt: number(),
95764
95981
  updatedAt: number(),
95765
95982
  state: TrainingJobStateSchema,
95983
+ /**
95984
+ * Shared by every job enqueued together via `startJobBatch`.
95985
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
95986
+ */
95987
+ batchId: string().nullable().default(null),
95766
95988
  stage: TrainingStageSchema.nullable(),
95767
95989
  failure: object({
95768
95990
  reason: TrainingFailureReasonSchema,
@@ -95774,6 +95996,12 @@ var TrainingJobSchema = object({
95774
95996
  maxRuntimeSec: number().int().positive(),
95775
95997
  trainer: TrainerSourceRefSchema,
95776
95998
  datasetLayout: RetrainExportLayoutSchema,
95999
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
96000
+ frameCount: number().int().nonnegative(),
96001
+ /** Resolved frame ids at start — the archive ships exactly these. */
96002
+ frameIds: array(string()).max(2e4).readonly(),
96003
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
96004
+ annotationHash: string(),
95777
96005
  dataset: object({
95778
96006
  bytes: number().int(),
95779
96007
  sha256: string(),
@@ -95815,13 +96043,7 @@ var TrainingJobSchema = object({
95815
96043
  canary: TrainingCanarySchema.nullable()
95816
96044
  });
95817
96045
  var IdInput = object({ id: string().min(1) });
95818
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
95819
- kind: "mutation",
95820
- auth: "admin"
95821
- }), 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() }), {
95822
- kind: "mutation",
95823
- auth: "admin"
95824
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
96046
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
95825
96047
  auth: "admin",
95826
96048
  timeoutMs: 6e4
95827
96049
  }), method(TrainingJobRequestSchema.extend({
@@ -95840,6 +96062,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
95840
96062
  kind: "mutation",
95841
96063
  auth: "admin",
95842
96064
  timeoutMs: 12e4
96065
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
96066
+ baseModelIds: array(string().min(1)).min(1),
96067
+ name: string().min(1).max(120),
96068
+ maxCostUsd: number().positive(),
96069
+ maxRuntimeSec: number().int().positive(),
96070
+ idempotencyKey: string().min(8).max(80)
96071
+ }), discriminatedUnion("kind", [object({
96072
+ kind: literal("started"),
96073
+ batchId: string(),
96074
+ jobs: array(TrainingJobSchema).min(1).readonly()
96075
+ }), object({
96076
+ kind: literal("refused"),
96077
+ reason: TrainingRefusalReasonSchema,
96078
+ detail: string()
96079
+ })]), {
96080
+ kind: "mutation",
96081
+ auth: "admin",
96082
+ timeoutMs: 12e4
95843
96083
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
95844
96084
  kind: "mutation",
95845
96085
  auth: "admin",
@@ -101398,6 +101638,36 @@ Object.freeze({
101398
101638
  addonId: null,
101399
101639
  access: "view"
101400
101640
  },
101641
+ "oidcConnections.connectionFormSchema": {
101642
+ capName: "oidc-connections",
101643
+ capScope: "system",
101644
+ addonId: null,
101645
+ access: "view"
101646
+ },
101647
+ "oidcConnections.createConnection": {
101648
+ capName: "oidc-connections",
101649
+ capScope: "system",
101650
+ addonId: null,
101651
+ access: "create"
101652
+ },
101653
+ "oidcConnections.deleteConnection": {
101654
+ capName: "oidc-connections",
101655
+ capScope: "system",
101656
+ addonId: null,
101657
+ access: "delete"
101658
+ },
101659
+ "oidcConnections.listConnections": {
101660
+ capName: "oidc-connections",
101661
+ capScope: "system",
101662
+ addonId: null,
101663
+ access: "view"
101664
+ },
101665
+ "oidcConnections.updateConnection": {
101666
+ capName: "oidc-connections",
101667
+ capScope: "system",
101668
+ addonId: null,
101669
+ access: "create"
101670
+ },
101401
101671
  "osd.getStatus": {
101402
101672
  capName: "osd",
101403
101673
  capScope: "device",
@@ -101470,6 +101740,12 @@ Object.freeze({
101470
101740
  addonId: null,
101471
101741
  access: "create"
101472
101742
  },
101743
+ "osdManager.setSlotCameraEnabled": {
101744
+ capName: "osd-manager",
101745
+ capScope: "system",
101746
+ addonId: null,
101747
+ access: "create"
101748
+ },
101473
101749
  "osdManager.upsertTemplate": {
101474
101750
  capName: "osd-manager",
101475
101751
  capScope: "system",
@@ -101608,12 +101884,6 @@ Object.freeze({
101608
101884
  addonId: null,
101609
101885
  access: "create"
101610
101886
  },
101611
- "pipelineAnalytics.createRetrainDatasetVersion": {
101612
- capName: "pipeline-analytics",
101613
- capScope: "device",
101614
- addonId: null,
101615
- access: "create"
101616
- },
101617
101887
  "pipelineAnalytics.deleteDeviceEvents": {
101618
101888
  capName: "pipeline-analytics",
101619
101889
  capScope: "device",
@@ -101626,12 +101896,6 @@ Object.freeze({
101626
101896
  addonId: null,
101627
101897
  access: "delete"
101628
101898
  },
101629
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
101630
- capName: "pipeline-analytics",
101631
- capScope: "device",
101632
- addonId: null,
101633
- access: "delete"
101634
- },
101635
101899
  "pipelineAnalytics.deleteTracks": {
101636
101900
  capName: "pipeline-analytics",
101637
101901
  capScope: "device",
@@ -101734,6 +101998,12 @@ Object.freeze({
101734
101998
  addonId: null,
101735
101999
  access: "view"
101736
102000
  },
102001
+ "pipelineAnalytics.getRetrainCorpusKpi": {
102002
+ capName: "pipeline-analytics",
102003
+ capScope: "device",
102004
+ addonId: null,
102005
+ access: "view"
102006
+ },
101737
102007
  "pipelineAnalytics.getRetrainExportUrl": {
101738
102008
  capName: "pipeline-analytics",
101739
102009
  capScope: "device",
@@ -101854,7 +102124,7 @@ Object.freeze({
101854
102124
  addonId: null,
101855
102125
  access: "view"
101856
102126
  },
101857
- "pipelineAnalytics.listRetrainDatasetVersions": {
102127
+ "pipelineAnalytics.listRetrainCorpusPage": {
101858
102128
  capName: "pipeline-analytics",
101859
102129
  capScope: "device",
101860
102130
  addonId: null,
@@ -101908,12 +102178,6 @@ Object.freeze({
101908
102178
  addonId: null,
101909
102179
  access: "create"
101910
102180
  },
101911
- "pipelineAnalytics.previewRetrainDataset": {
101912
- capName: "pipeline-analytics",
101913
- capScope: "device",
101914
- addonId: null,
101915
- access: "view"
101916
- },
101917
102181
  "pipelineAnalytics.proposeRetrainAnnotations": {
101918
102182
  capName: "pipeline-analytics",
101919
102183
  capScope: "device",
@@ -101992,6 +102256,12 @@ Object.freeze({
101992
102256
  addonId: null,
101993
102257
  access: "create"
101994
102258
  },
102259
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
102260
+ capName: "pipeline-analytics",
102261
+ capScope: "device",
102262
+ addonId: null,
102263
+ access: "view"
102264
+ },
101995
102265
  "pipelineAnalytics.restageRetrainTrack": {
101996
102266
  capName: "pipeline-analytics",
101997
102267
  capScope: "device",
@@ -102052,12 +102322,6 @@ Object.freeze({
102052
102322
  addonId: null,
102053
102323
  access: "create"
102054
102324
  },
102055
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
102056
- capName: "pipeline-analytics",
102057
- capScope: "device",
102058
- addonId: null,
102059
- access: "view"
102060
- },
102061
102325
  "pipelineAnalytics.wipeAllAnalytics": {
102062
102326
  capName: "pipeline-analytics",
102063
102327
  capScope: "device",
@@ -104452,18 +104716,6 @@ Object.freeze({
104452
104716
  addonId: null,
104453
104717
  access: "create"
104454
104718
  },
104455
- "training.findDatasetVersionIdByName": {
104456
- capName: "training",
104457
- capScope: "system",
104458
- addonId: null,
104459
- access: "view"
104460
- },
104461
- "training.getDatasetVersion": {
104462
- capName: "training",
104463
- capScope: "system",
104464
- addonId: null,
104465
- access: "view"
104466
- },
104467
104719
  "training.getJob": {
104468
104720
  capName: "training",
104469
104721
  capScope: "system",
@@ -104482,12 +104734,6 @@ Object.freeze({
104482
104734
  addonId: null,
104483
104735
  access: "view"
104484
104736
  },
104485
- "training.listDatasetVersions": {
104486
- capName: "training",
104487
- capScope: "system",
104488
- addonId: null,
104489
- access: "view"
104490
- },
104491
104737
  "training.listJobs": {
104492
104738
  capName: "training",
104493
104739
  capScope: "system",
@@ -104500,54 +104746,66 @@ Object.freeze({
104500
104746
  addonId: null,
104501
104747
  access: "view"
104502
104748
  },
104503
- "training.putDatasetVersion": {
104749
+ "training.registerResult": {
104504
104750
  capName: "training",
104505
104751
  capScope: "system",
104506
104752
  addonId: null,
104507
104753
  access: "create"
104508
104754
  },
104509
- "training.registerResult": {
104755
+ "training.rollbackCanary": {
104510
104756
  capName: "training",
104511
104757
  capScope: "system",
104512
104758
  addonId: null,
104513
104759
  access: "create"
104514
104760
  },
104515
- "training.removeDatasetVersion": {
104761
+ "training.startJob": {
104516
104762
  capName: "training",
104517
104763
  capScope: "system",
104518
104764
  addonId: null,
104519
- access: "delete"
104765
+ access: "create"
104520
104766
  },
104521
- "training.rollbackCanary": {
104767
+ "training.startJobBatch": {
104522
104768
  capName: "training",
104523
104769
  capScope: "system",
104524
104770
  addonId: null,
104525
104771
  access: "create"
104526
104772
  },
104527
- "training.startJob": {
104528
- capName: "training",
104773
+ "trainingProvider.cancelJob": {
104774
+ capName: "training-provider",
104529
104775
  capScope: "system",
104530
104776
  addonId: null,
104531
104777
  access: "create"
104532
104778
  },
104533
- "trainingProvider.cancelJob": {
104779
+ "trainingProvider.cleanupJob": {
104534
104780
  capName: "training-provider",
104535
104781
  capScope: "system",
104536
104782
  addonId: null,
104537
104783
  access: "create"
104538
104784
  },
104539
- "trainingProvider.cleanupJob": {
104785
+ "trainingProvider.createEntry": {
104540
104786
  capName: "training-provider",
104541
104787
  capScope: "system",
104542
104788
  addonId: null,
104543
104789
  access: "create"
104544
104790
  },
104791
+ "trainingProvider.deleteEntry": {
104792
+ capName: "training-provider",
104793
+ capScope: "system",
104794
+ addonId: null,
104795
+ access: "delete"
104796
+ },
104545
104797
  "trainingProvider.describe": {
104546
104798
  capName: "training-provider",
104547
104799
  capScope: "system",
104548
104800
  addonId: null,
104549
104801
  access: "view"
104550
104802
  },
104803
+ "trainingProvider.describeTypes": {
104804
+ capName: "training-provider",
104805
+ capScope: "system",
104806
+ addonId: null,
104807
+ access: "view"
104808
+ },
104551
104809
  "trainingProvider.estimateJob": {
104552
104810
  capName: "training-provider",
104553
104811
  capScope: "system",
@@ -104560,6 +104818,12 @@ Object.freeze({
104560
104818
  addonId: null,
104561
104819
  access: "view"
104562
104820
  },
104821
+ "trainingProvider.listEntries": {
104822
+ capName: "training-provider",
104823
+ capScope: "system",
104824
+ addonId: null,
104825
+ access: "view"
104826
+ },
104563
104827
  "trainingProvider.listJobEvents": {
104564
104828
  capName: "training-provider",
104565
104829
  capScope: "system",
@@ -104590,6 +104854,12 @@ Object.freeze({
104590
104854
  addonId: null,
104591
104855
  access: "create"
104592
104856
  },
104857
+ "trainingProvider.updateEntry": {
104858
+ capName: "training-provider",
104859
+ capScope: "system",
104860
+ addonId: null,
104861
+ access: "create"
104862
+ },
104593
104863
  "trainingProvider.uploadDataset": {
104594
104864
  capName: "training-provider",
104595
104865
  capScope: "system",
@@ -107796,6 +108066,11 @@ Object.freeze({
107796
108066
  form: "single",
107797
108067
  optional: false
107798
108068
  }],
108069
+ "osdManager.setSlotCameraEnabled": [{
108070
+ name: "deviceId",
108071
+ form: "single",
108072
+ optional: false
108073
+ }],
107799
108074
  "petFeeder.callPet": [{
107800
108075
  name: "deviceId",
107801
108076
  form: "single",
@@ -108016,6 +108291,11 @@ Object.freeze({
108016
108291
  form: "array",
108017
108292
  optional: false
108018
108293
  }],
108294
+ "pipelineAnalytics.listRetrainCorpusPage": [{
108295
+ name: "deviceIds",
108296
+ form: "array",
108297
+ optional: true
108298
+ }],
108019
108299
  "pipelineAnalytics.listRetrainStaging": [{
108020
108300
  name: "deviceIds",
108021
108301
  form: "array",
@@ -109125,6 +109405,7 @@ Object.freeze({
109125
109405
  });
109126
109406
  Object.freeze({
109127
109407
  "broker": "broker",
109408
+ "calendar-source": "calendar",
109128
109409
  "device-export": "device-export",
109129
109410
  "llm": "ai",
109130
109411
  "mesh-network": "mesh",
@@ -109610,6 +109891,8 @@ var STATE_SUMMARY_VARS = [
109610
109891
  [...RULE_TEXT],
109611
109892
  [...RULE_TEXT],
109612
109893
  [...RULE_TEXT],
109894
+ [...RULE_TEXT],
109895
+ [...RULE_TEXT],
109613
109896
  ([...RULE_TEXT], [...UPDATES]),
109614
109897
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
109615
109898
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),