@camstack/addon-provider-wyze 0.2.135 → 0.2.136

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
@@ -5409,7 +5409,7 @@ var ZodIssueCode = {
5409
5409
  var ZodFirstPartyTypeKind;
5410
5410
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5411
5411
  //#endregion
5412
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5412
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5413
5413
  /**
5414
5414
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5415
5415
  * window to float samples (D455).
@@ -9415,6 +9415,16 @@ var CompositionSchema = object({
9415
9415
  seen.add(feature.cap);
9416
9416
  });
9417
9417
  });
9418
+ var NodeColorIdSchema = _enum([
9419
+ "node-a",
9420
+ "node-b",
9421
+ "node-c",
9422
+ "node-d",
9423
+ "node-e",
9424
+ "node-f",
9425
+ "node-g",
9426
+ "node-h"
9427
+ ]);
9418
9428
  new Set([
9419
9429
  "track",
9420
9430
  "face",
@@ -18481,14 +18491,14 @@ var LlmProfileSchema = object({
18481
18491
  /** ConfigUISchema tree passed through untyped on the wire (the
18482
18492
  * notification-output `ConfigSchemaPassthrough` precedent at
18483
18493
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18484
- var ConfigSchemaPassthrough$1 = unknown();
18494
+ var ConfigSchemaPassthrough$3 = unknown();
18485
18495
  var LlmProfileKindDescriptorSchema = object({
18486
18496
  kind: LlmProfileKindSchema,
18487
18497
  label: string(),
18488
18498
  icon: string(),
18489
18499
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18490
18500
  addonId: string(),
18491
- configSchema: ConfigSchemaPassthrough$1
18501
+ configSchema: ConfigSchemaPassthrough$3
18492
18502
  });
18493
18503
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18494
18504
  var LlmDefaultSchema = object({
@@ -19609,7 +19619,7 @@ var TargetKindCapsSchema = object({
19609
19619
  * the union is large and not meant for runtime validation here; the exported
19610
19620
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19611
19621
  */
19612
- var ConfigSchemaPassthrough = unknown();
19622
+ var ConfigSchemaPassthrough$2 = unknown();
19613
19623
  var TargetKindSchema = object({
19614
19624
  kind: string(),
19615
19625
  label: string(),
@@ -19646,7 +19656,7 @@ var TargetKindSchema = object({
19646
19656
  * its raster path, which is the safe default for an unknown image.
19647
19657
  */
19648
19658
  iconMediaType: string().optional(),
19649
- configSchema: ConfigSchemaPassthrough,
19659
+ configSchema: ConfigSchemaPassthrough$2,
19650
19660
  /**
19651
19661
  * The config keys that decide WHERE this kind's secrets are sent (server,
19652
19662
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -22983,6 +22993,61 @@ var OauthIntegrationDescriptorSchema = object({
22983
22993
  });
22984
22994
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
22985
22995
  /**
22996
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
22997
+ *
22998
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
22999
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23000
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23001
+ * immutable after create.
23002
+ */
23003
+ var ConfigSchemaPassthrough$1 = unknown();
23004
+ var OidcConnectionSchema = object({
23005
+ id: string().min(1),
23006
+ displayName: string(),
23007
+ icon: string(),
23008
+ issuerUrl: string(),
23009
+ clientId: string(),
23010
+ /** Client id + secret present — never the secret value. */
23011
+ configured: boolean(),
23012
+ /**
23013
+ * Values for the connection form schema. `clientSecret` is a keychain
23014
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23015
+ */
23016
+ formValues: record(string(), unknown()).optional()
23017
+ });
23018
+ /**
23019
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23020
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23021
+ */
23022
+ var OidcConnectionUpdateInputSchema = object({
23023
+ id: string().min(1),
23024
+ displayName: string().min(1),
23025
+ icon: string().optional(),
23026
+ issuerUrl: string().optional(),
23027
+ clientId: string().optional(),
23028
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23029
+ redirectUri: string().optional(),
23030
+ scopes: string().optional(),
23031
+ usernameClaim: _enum([
23032
+ "preferred_username",
23033
+ "email",
23034
+ "sub"
23035
+ ]).optional()
23036
+ });
23037
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23038
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23039
+ displayName: string().min(1)
23040
+ }), object({ id: string() }), {
23041
+ kind: "mutation",
23042
+ auth: "admin"
23043
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23044
+ kind: "mutation",
23045
+ auth: "admin"
23046
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23047
+ kind: "mutation",
23048
+ auth: "admin"
23049
+ });
23050
+ /**
22986
23051
  * What started a camera's onboard motion (D672). `camera` is the camera's own
22987
23052
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
22988
23053
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24339,24 +24404,69 @@ var RetrainFrameListSchema = object({
24339
24404
  /** What the page pre-selects — the native key frame when one survives. */
24340
24405
  autoPickMediaId: number().int().optional()
24341
24406
  });
24407
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24408
+ var RetrainFrameWorkStateSchema = _enum([
24409
+ "unannotated",
24410
+ "annotated",
24411
+ "complete"
24412
+ ]);
24413
+ /**
24414
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24415
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24416
+ */
24417
+ var RetrainCorpusFilterSchema = object({
24418
+ workState: RetrainFrameWorkStateSchema.optional(),
24419
+ deviceIds: array(number()).max(500).optional(),
24420
+ /** When set, only frames in this named collection. */
24421
+ collectionId: string().optional(),
24422
+ /** Frames that carry at least one saved annotation in one of these classes. */
24423
+ classes: array(RetrainMacroClassSchema).optional(),
24424
+ page: number().int().positive().default(1),
24425
+ pageSize: number().int().positive().max(100).default(50)
24426
+ });
24427
+ var RetrainCorpusPageSchema = object({
24428
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24429
+ total: number().int().nonnegative(),
24430
+ page: number().int().positive(),
24431
+ pageSize: number().int().positive()
24432
+ });
24433
+ var RetrainCorpusKpiCameraRowSchema = object({
24434
+ deviceId: number(),
24435
+ unannotated: number().int().nonnegative(),
24436
+ annotated: number().int().nonnegative(),
24437
+ complete: number().int().nonnegative(),
24438
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24439
+ * `null` when the corpus is empty (no ratio). */
24440
+ pctOfCorpus: number().min(0).max(1).nullable()
24441
+ });
24442
+ var RetrainCorpusKpiSchema = object({
24443
+ total: number().int().nonnegative(),
24444
+ unannotated: number().int().nonnegative(),
24445
+ annotated: number().int().nonnegative(),
24446
+ complete: number().int().nonnegative(),
24447
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24448
+ });
24342
24449
  /**
24343
24450
  * Which frames an annotated export carries. Every field narrows; an empty
24344
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24345
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24346
- * the primitive a version export uses; `batchId` re-selects what an earlier
24347
- * export carried (`exportedInBatch`).
24451
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24452
+ * download uses; `batchId` re-selects what an earlier export carried
24453
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24454
+ * resolves to `frameIds` at plan/start.
24348
24455
  */
24349
24456
  var RetrainExportFilterSchema = object({
24350
24457
  deviceIds: array(number()).optional(),
24351
24458
  frameIds: array(string()).max(2e4).optional(),
24352
24459
  /** Only frames in at least one of these named collections. */
24353
24460
  collectionIds: array(string()).max(200).optional(),
24354
- /** Exactly the frames of this dataset version (and its completeOnly). An
24355
- * unknown id selects nothing. */
24356
- datasetVersionId: string().optional(),
24461
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24462
+ collectionId: string().optional(),
24357
24463
  batchId: string().optional(),
24358
24464
  /** Only frames the operator marked complete (all subjects boxed). */
24359
- completeOnly: boolean().optional()
24465
+ completeOnly: boolean().optional(),
24466
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24467
+ workState: RetrainFrameWorkStateSchema.optional(),
24468
+ /** Frames with at least one saved annotation in one of these classes. */
24469
+ classes: array(RetrainMacroClassSchema).optional()
24360
24470
  });
24361
24471
  /**
24362
24472
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24556,8 +24666,7 @@ var RetrainDatasetStatsSchema = object({
24556
24666
  completeFrames: number().int()
24557
24667
  })).readonly()
24558
24668
  });
24559
- /** An immutable dataset version, without its frame list. */
24560
- var RetrainDatasetVersionSchema = object({
24669
+ object({
24561
24670
  id: string(),
24562
24671
  name: string(),
24563
24672
  createdAt: number(),
@@ -24565,22 +24674,33 @@ var RetrainDatasetVersionSchema = object({
24565
24674
  layout: RetrainExportLayoutSchema,
24566
24675
  completeOnly: boolean(),
24567
24676
  frameCount: number().int(),
24568
- /** sha256 of what the frames taught when the version was frozen. */
24569
24677
  annotationHash: string(),
24570
- /** The export manifest schema the version was cut under. */
24571
24678
  manifestSchema: string(),
24572
24679
  stats: RetrainDatasetStatsSchema
24573
24680
  });
24574
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24575
- kind: literal("created"),
24576
- version: RetrainDatasetVersionSchema
24681
+ /**
24682
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24683
+ * the training cap. Resolved here so plan/start and the annotated export share
24684
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24685
+ */
24686
+ var RetrainTrainingCorpusSelectionSchema = object({
24687
+ collectionIds: array(string()).min(1),
24688
+ workState: _enum([
24689
+ "complete",
24690
+ "annotated_or_complete",
24691
+ "any_annotated"
24692
+ ]).default("complete")
24693
+ });
24694
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24695
+ kind: literal("resolved"),
24696
+ frameIds: array(string()).max(2e4).readonly(),
24697
+ stats: RetrainDatasetStatsSchema,
24698
+ annotationHash: string(),
24699
+ layout: RetrainExportLayoutSchema
24577
24700
  }), object({
24578
24701
  kind: literal("refused"),
24579
- reason: _enum([
24580
- "empty-name",
24581
- "duplicate-name",
24582
- "no-frames"
24583
- ])
24702
+ reason: _enum(["unknown-collection", "no-frames"]),
24703
+ detail: string()
24584
24704
  })]);
24585
24705
  /** The outcome of a lifecycle move owned by the retrain page. */
24586
24706
  var RetrainTransitionResultSchema = object({
@@ -25287,6 +25407,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25287
25407
  }), array(RetrainTrackSchema).readonly(), {
25288
25408
  kind: "query",
25289
25409
  auth: "admin"
25410
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25411
+ kind: "query",
25412
+ auth: "admin"
25413
+ }), method(object({}), RetrainCorpusKpiSchema, {
25414
+ kind: "query",
25415
+ auth: "admin"
25290
25416
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25291
25417
  kind: "query",
25292
25418
  auth: "admin"
@@ -25382,36 +25508,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25382
25508
  kind: "mutation",
25383
25509
  auth: "admin",
25384
25510
  timeoutMs: 12e4
25385
- }), method(object({
25386
- selection: RetrainDatasetSelectionSchema,
25387
- completeOnly: boolean().optional()
25388
- }), RetrainDatasetStatsSchema, {
25389
- kind: "query",
25390
- auth: "admin"
25391
- }), method(object({
25392
- name: string().max(120),
25393
- selection: RetrainDatasetSelectionSchema,
25394
- layout: RetrainExportLayoutSchema,
25395
- completeOnly: boolean()
25396
- }), CreateRetrainDatasetVersionResultSchema, {
25397
- kind: "mutation",
25398
- auth: "admin",
25399
- timeoutMs: 12e4
25400
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25401
- kind: "query",
25402
- auth: "admin"
25403
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25404
- kind: "mutation",
25405
- auth: "admin"
25406
- }), method(object({ id: string() }), object({
25407
- found: boolean(),
25408
- annotationHash: string(),
25409
- matches: boolean(),
25410
- missingFrames: number().int()
25411
- }), {
25412
- kind: "query",
25413
- auth: "admin",
25414
- timeoutMs: 12e4
25415
25511
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25416
25512
  kind: "query",
25417
25513
  auth: "admin"
@@ -25438,6 +25534,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25438
25534
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25439
25535
  kind: "query",
25440
25536
  auth: "admin"
25537
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25538
+ kind: "query",
25539
+ auth: "admin",
25540
+ timeoutMs: 6e4
25441
25541
  }), method(object({
25442
25542
  id: string(),
25443
25543
  name: string().max(120)
@@ -26054,11 +26154,14 @@ var HardwareClassIdSchema = _enum([
26054
26154
  "intel-n-series",
26055
26155
  "apple-m-base",
26056
26156
  "apple-m-pro",
26157
+ "amd-phoenix",
26057
26158
  "unknown"
26058
26159
  ]);
26059
26160
  var AcceleratorKindSchema = _enum([
26060
26161
  "intel-npu",
26061
26162
  "intel-igpu",
26163
+ "amd-igpu",
26164
+ "amd-npu",
26062
26165
  "x86-cpu",
26063
26166
  "arm-cpu",
26064
26167
  "apple-ane",
@@ -27988,6 +28091,8 @@ var AgentPipelineSettingsSchema = object({
27988
28091
  * address is wrong (multi-homed host, NAT, custom interface).
27989
28092
  */
27990
28093
  reachableHost: string().optional(),
28094
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28095
+ color: NodeColorIdSchema.optional(),
27991
28096
  /**
27992
28097
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27993
28098
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28537,8 +28642,9 @@ method(object({
28537
28642
  auth: "admin"
28538
28643
  }), method(object({
28539
28644
  agentNodeId: string(),
28540
- reachableHost: string().nullable()
28541
- }), object({ success: literal(true) }), {
28645
+ reachableHost: string().nullable().optional(),
28646
+ color: NodeColorIdSchema.nullable().optional()
28647
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28542
28648
  kind: "mutation",
28543
28649
  auth: "admin"
28544
28650
  }), method(object({
@@ -31718,7 +31824,7 @@ var CustomActionInputSchema = object({
31718
31824
  action: string().min(1),
31719
31825
  input: unknown()
31720
31826
  });
31721
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31827
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31722
31828
  addonId: string(),
31723
31829
  limit: number().min(1).max(500).default(100),
31724
31830
  level: LogLevelSchema$2.optional()
@@ -36788,7 +36894,13 @@ var TopologyNodeSchema = object({
36788
36894
  })).readonly(),
36789
36895
  processes: array(TopologyProcessSchema).readonly(),
36790
36896
  categories: array(TopologyCategorySchema).readonly(),
36791
- rootPackage: TopologyRootPackageSchema.nullable()
36897
+ rootPackage: TopologyRootPackageSchema.nullable(),
36898
+ /**
36899
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
36900
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
36901
+ * for offline rows and when the hub cannot tell.
36902
+ */
36903
+ meshTransport: _enum(["tls", "clear"]).optional()
36792
36904
  });
36793
36905
  var CapUsageEdgeSchema = object({
36794
36906
  callerAddonId: string(),
@@ -37201,6 +37313,7 @@ var OsdNamedTemplateSchema = object({
37201
37313
  });
37202
37314
  /** Where a slot's value comes from. */
37203
37315
  var OsdSourceSchema = discriminatedUnion("kind", [
37316
+ object({ kind: literal("none") }),
37204
37317
  object({
37205
37318
  kind: literal("static"),
37206
37319
  text: string().max(64)
@@ -37327,6 +37440,13 @@ method(object({ deviceId: number().int() }), object({
37327
37440
  }), object({ success: literal(true) }), {
37328
37441
  kind: "mutation",
37329
37442
  auth: "admin"
37443
+ }), method(object({
37444
+ deviceId: number().int(),
37445
+ slotId: string().min(1),
37446
+ enabled: boolean()
37447
+ }), object({ success: literal(true) }), {
37448
+ kind: "mutation",
37449
+ auth: "admin"
37330
37450
  }), method(object({
37331
37451
  sourceDeviceId: number().int(),
37332
37452
  targetDeviceId: number().int()
@@ -37758,7 +37878,15 @@ var GpuInfoSchema = object({
37758
37878
  name: string(),
37759
37879
  memoryMB: number().optional()
37760
37880
  });
37761
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
37881
+ var NpuInfoSchema = object({
37882
+ type: _enum([
37883
+ "apple-ane",
37884
+ "intel-npu",
37885
+ "amd-xdna"
37886
+ ]),
37887
+ name: string().optional(),
37888
+ generation: _enum(["xdna1", "xdna2"]).optional()
37889
+ });
37762
37890
  var CoralInfoSchema = object({
37763
37891
  type: literal("coral-edgetpu"),
37764
37892
  bus: string().optional()
@@ -42501,9 +42629,11 @@ var zoneRulesCapability = {
42501
42629
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42502
42630
  * manifest entry and nothing else.
42503
42631
  *
42504
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
42505
- * `notification-output` posture); `describe` concat-fans across providers.
42506
- * Every method is `admin`: these spend money.
42632
+ * Collection of provider **types** (addons). Each addon owns zero or more
42633
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
42634
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
42635
+ * `entryId`; callers also pass the owning `addonId` as the collection
42636
+ * selector (broker posture). Every method is `admin`: these spend money.
42507
42637
  *
42508
42638
  * Every cloud object a provider creates is tagged with the orchestrator's
42509
42639
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42527,8 +42657,8 @@ var TrainingRegionOptionSchema = object({
42527
42657
  priceMultiplier: number().positive()
42528
42658
  });
42529
42659
  /**
42530
- * The provider's per-account settings, as the orchestrator reads them. They
42531
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
42660
+ * The provider's per-entry settings, as the orchestrator reads them. They
42661
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
42532
42662
  * depend on the user's account), never hard-coded in the orchestrator.
42533
42663
  */
42534
42664
  var TrainingProviderDefaultsSchema = object({
@@ -42539,9 +42669,44 @@ var TrainingProviderDefaultsSchema = object({
42539
42669
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
42540
42670
  failedDatasetGraceHours: number().nonnegative()
42541
42671
  });
42672
+ /**
42673
+ * Entry form schema for a provider type — same seam as notification
42674
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
42675
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
42676
+ */
42677
+ var ConfigSchemaPassthrough = unknown();
42678
+ /** One creatable provider type, for the Add-entry dialog. */
42679
+ var TrainingProviderTypeSchema = object({
42680
+ typeId: string(),
42681
+ label: string(),
42682
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
42683
+ iconAsset: string(),
42684
+ /** Owning `training-provider` addon — collection selector for createEntry. */
42685
+ addonId: string(),
42686
+ /**
42687
+ * Fields for one entry of this type (credentials + defaults). Absent on a
42688
+ * type that only needs a name. Password fields are keychain-backed on the
42689
+ * provider addon (`secretStatePaths`), not D634 plaintext.
42690
+ */
42691
+ configSchema: ConfigSchemaPassthrough.optional()
42692
+ });
42693
+ /** One configured account / workspace under a provider type. */
42694
+ var TrainingProviderEntrySchema = object({
42695
+ entryId: string(),
42696
+ typeId: string(),
42697
+ name: string(),
42698
+ addonId: string(),
42699
+ /** Credentials are present — never the values. */
42700
+ configured: boolean()
42701
+ });
42542
42702
  var TrainingProviderDescriptorSchema = object({
42543
42703
  addonId: string(),
42544
- /** `modal`, `runpod`, `fake`, … */
42704
+ entryId: string(),
42705
+ typeId: string(),
42706
+ /** Operator-chosen entry name. */
42707
+ name: string(),
42708
+ iconAsset: string(),
42709
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
42545
42710
  kind: string(),
42546
42711
  label: string(),
42547
42712
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -42553,7 +42718,30 @@ var TrainingProviderDescriptorSchema = object({
42553
42718
  dataResidencyNote: string(),
42554
42719
  /** Credentials are present — never the values. */
42555
42720
  configured: boolean(),
42556
- defaults: TrainingProviderDefaultsSchema
42721
+ defaults: TrainingProviderDefaultsSchema,
42722
+ /**
42723
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
42724
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
42725
+ * never plaintext. Same hydrate contract as settings forms (D789).
42726
+ */
42727
+ formValues: record(string(), unknown()).optional()
42728
+ });
42729
+ /**
42730
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
42731
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
42732
+ * `{ $secretClear: true }` clears it.
42733
+ */
42734
+ var TrainingProviderUpdateEntryInputSchema = object({
42735
+ entryId: string().min(1),
42736
+ name: string().min(1),
42737
+ tokenId: string().optional(),
42738
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
42739
+ environment: string().optional(),
42740
+ gpuType: string().optional(),
42741
+ region: string().optional(),
42742
+ costCapUsd: number().nonnegative().optional(),
42743
+ maxRuntimeSec: number().int().positive().optional(),
42744
+ failedDatasetGraceHours: number().nonnegative().optional()
42557
42745
  });
42558
42746
  var TrainingCredentialCheckSchema = object({
42559
42747
  ok: boolean(),
@@ -42605,20 +42793,33 @@ var TrainerSourceRefSchema = object({
42605
42793
  /** A commit sha (never a branch) — the job must be reproducible. */
42606
42794
  revision: string().regex(/^[0-9a-f]{7,64}$/)
42607
42795
  });
42796
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
42608
42797
  var JobRef = {
42609
- addonId: string(),
42798
+ entryId: string().min(1),
42610
42799
  jobKey: string().uuid()
42611
42800
  };
42612
42801
  var TrainingLogLineSchema = object({
42613
42802
  ts: number(),
42614
42803
  text: string()
42615
42804
  });
42616
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
42805
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
42806
+ typeId: string().min(1),
42807
+ name: string().min(1)
42808
+ }), object({ entryId: string() }), {
42809
+ kind: "mutation",
42810
+ auth: "admin"
42811
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
42812
+ kind: "mutation",
42813
+ auth: "admin"
42814
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
42815
+ kind: "mutation",
42816
+ auth: "admin"
42817
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
42617
42818
  kind: "mutation",
42618
42819
  auth: "admin",
42619
42820
  timeoutMs: 3e4
42620
42821
  }), method(object({
42621
- addonId: string(),
42822
+ entryId: string().min(1),
42622
42823
  gpuType: string(),
42623
42824
  region: string(),
42624
42825
  datasetBytes: number().int().nonnegative(),
@@ -42684,7 +42885,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42684
42885
  kind: "mutation",
42685
42886
  auth: "admin",
42686
42887
  timeoutMs: 5 * 6e4
42687
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
42888
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
42688
42889
  auth: "admin",
42689
42890
  timeoutMs: 2 * 6e4
42690
42891
  });
@@ -42694,20 +42895,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42694
42895
  *
42695
42896
  * It owns what every provider must agree on, written once:
42696
42897
  *
42697
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
42698
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
42699
- * the export plan) and reaches this store through the five row methods
42700
- * below, so the Retrain page and the export did not change.
42701
42898
  * - **Jobs.** A persisted state machine, a reconcile loop against the
42702
42899
  * provider, a cost guard, a daily orphan sweep and the retention rules.
42703
42900
  * - **The return flow.** Verified artefacts → Model Studio
42704
42901
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
42705
42902
  * rollback. Nothing is ever registered automatically.
42706
42903
  *
42904
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
42905
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
42906
+ * moment and snapshotted on the job. No frozen dataset version.
42907
+ *
42707
42908
  * Every method is `admin`.
42708
42909
  */
42709
- /** A version WITH its frame list — what the export and a job read. */
42710
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
42910
+ /**
42911
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
42912
+ * Frame ids are resolved at plan/start — never a frozen version id.
42913
+ */
42914
+ var TrainingCorpusSelectionSchema = object({
42915
+ collectionIds: array(string()).min(1),
42916
+ /** Default complete-only for v1 */
42917
+ workState: _enum([
42918
+ "complete",
42919
+ "annotated_or_complete",
42920
+ "any_annotated"
42921
+ ]).default("complete")
42922
+ });
42711
42923
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
42712
42924
  var TrainingBaseModelSchema = object({
42713
42925
  modelId: string(),
@@ -42725,9 +42937,13 @@ var TrainingPresetSchema = _enum([
42725
42937
  "thorough"
42726
42938
  ]);
42727
42939
  var TrainingJobRequestSchema = object({
42728
- datasetVersionId: string().min(1),
42729
- /** The `training-provider` addon that runs it. */
42730
- addonId: string().min(1),
42940
+ /** Live collection + work-state criteria; resolved at plan/start. */
42941
+ selection: TrainingCorpusSelectionSchema,
42942
+ /**
42943
+ * The provider **entry** that runs it (credentials + defaults).
42944
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
42945
+ */
42946
+ entryId: string().min(1),
42731
42947
  gpuType: string().min(1),
42732
42948
  region: string(),
42733
42949
  baseModelId: string().min(1),
@@ -42786,6 +43002,7 @@ var TrainingJobPlanSchema = object({
42786
43002
  * result lives after the operator acted on it.
42787
43003
  */
42788
43004
  var TrainingJobStateSchema = _enum([
43005
+ "queued",
42789
43006
  "uploading",
42790
43007
  "submitted",
42791
43008
  "starting",
@@ -42839,6 +43056,11 @@ var TrainingJobSchema = object({
42839
43056
  createdAt: number(),
42840
43057
  updatedAt: number(),
42841
43058
  state: TrainingJobStateSchema,
43059
+ /**
43060
+ * Shared by every job enqueued together via `startJobBatch`.
43061
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
43062
+ */
43063
+ batchId: string().nullable().default(null),
42842
43064
  stage: TrainingStageSchema.nullable(),
42843
43065
  failure: object({
42844
43066
  reason: TrainingFailureReasonSchema,
@@ -42850,6 +43072,12 @@ var TrainingJobSchema = object({
42850
43072
  maxRuntimeSec: number().int().positive(),
42851
43073
  trainer: TrainerSourceRefSchema,
42852
43074
  datasetLayout: RetrainExportLayoutSchema,
43075
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
43076
+ frameCount: number().int().nonnegative(),
43077
+ /** Resolved frame ids at start — the archive ships exactly these. */
43078
+ frameIds: array(string()).max(2e4).readonly(),
43079
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
43080
+ annotationHash: string(),
42853
43081
  dataset: object({
42854
43082
  bytes: number().int(),
42855
43083
  sha256: string(),
@@ -42891,13 +43119,7 @@ var TrainingJobSchema = object({
42891
43119
  canary: TrainingCanarySchema.nullable()
42892
43120
  });
42893
43121
  var IdInput = object({ id: string().min(1) });
42894
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42895
- kind: "mutation",
42896
- auth: "admin"
42897
- }), 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() }), {
42898
- kind: "mutation",
42899
- auth: "admin"
42900
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43122
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
42901
43123
  auth: "admin",
42902
43124
  timeoutMs: 6e4
42903
43125
  }), method(TrainingJobRequestSchema.extend({
@@ -42916,6 +43138,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42916
43138
  kind: "mutation",
42917
43139
  auth: "admin",
42918
43140
  timeoutMs: 12e4
43141
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
43142
+ baseModelIds: array(string().min(1)).min(1),
43143
+ name: string().min(1).max(120),
43144
+ maxCostUsd: number().positive(),
43145
+ maxRuntimeSec: number().int().positive(),
43146
+ idempotencyKey: string().min(8).max(80)
43147
+ }), discriminatedUnion("kind", [object({
43148
+ kind: literal("started"),
43149
+ batchId: string(),
43150
+ jobs: array(TrainingJobSchema).min(1).readonly()
43151
+ }), object({
43152
+ kind: literal("refused"),
43153
+ reason: TrainingRefusalReasonSchema,
43154
+ detail: string()
43155
+ })]), {
43156
+ kind: "mutation",
43157
+ auth: "admin",
43158
+ timeoutMs: 12e4
42919
43159
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
42920
43160
  kind: "mutation",
42921
43161
  auth: "admin",
@@ -48474,6 +48714,36 @@ Object.freeze({
48474
48714
  addonId: null,
48475
48715
  access: "view"
48476
48716
  },
48717
+ "oidcConnections.connectionFormSchema": {
48718
+ capName: "oidc-connections",
48719
+ capScope: "system",
48720
+ addonId: null,
48721
+ access: "view"
48722
+ },
48723
+ "oidcConnections.createConnection": {
48724
+ capName: "oidc-connections",
48725
+ capScope: "system",
48726
+ addonId: null,
48727
+ access: "create"
48728
+ },
48729
+ "oidcConnections.deleteConnection": {
48730
+ capName: "oidc-connections",
48731
+ capScope: "system",
48732
+ addonId: null,
48733
+ access: "delete"
48734
+ },
48735
+ "oidcConnections.listConnections": {
48736
+ capName: "oidc-connections",
48737
+ capScope: "system",
48738
+ addonId: null,
48739
+ access: "view"
48740
+ },
48741
+ "oidcConnections.updateConnection": {
48742
+ capName: "oidc-connections",
48743
+ capScope: "system",
48744
+ addonId: null,
48745
+ access: "create"
48746
+ },
48477
48747
  "osd.getStatus": {
48478
48748
  capName: "osd",
48479
48749
  capScope: "device",
@@ -48546,6 +48816,12 @@ Object.freeze({
48546
48816
  addonId: null,
48547
48817
  access: "create"
48548
48818
  },
48819
+ "osdManager.setSlotCameraEnabled": {
48820
+ capName: "osd-manager",
48821
+ capScope: "system",
48822
+ addonId: null,
48823
+ access: "create"
48824
+ },
48549
48825
  "osdManager.upsertTemplate": {
48550
48826
  capName: "osd-manager",
48551
48827
  capScope: "system",
@@ -48684,12 +48960,6 @@ Object.freeze({
48684
48960
  addonId: null,
48685
48961
  access: "create"
48686
48962
  },
48687
- "pipelineAnalytics.createRetrainDatasetVersion": {
48688
- capName: "pipeline-analytics",
48689
- capScope: "device",
48690
- addonId: null,
48691
- access: "create"
48692
- },
48693
48963
  "pipelineAnalytics.deleteDeviceEvents": {
48694
48964
  capName: "pipeline-analytics",
48695
48965
  capScope: "device",
@@ -48702,12 +48972,6 @@ Object.freeze({
48702
48972
  addonId: null,
48703
48973
  access: "delete"
48704
48974
  },
48705
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
48706
- capName: "pipeline-analytics",
48707
- capScope: "device",
48708
- addonId: null,
48709
- access: "delete"
48710
- },
48711
48975
  "pipelineAnalytics.deleteTracks": {
48712
48976
  capName: "pipeline-analytics",
48713
48977
  capScope: "device",
@@ -48810,6 +49074,12 @@ Object.freeze({
48810
49074
  addonId: null,
48811
49075
  access: "view"
48812
49076
  },
49077
+ "pipelineAnalytics.getRetrainCorpusKpi": {
49078
+ capName: "pipeline-analytics",
49079
+ capScope: "device",
49080
+ addonId: null,
49081
+ access: "view"
49082
+ },
48813
49083
  "pipelineAnalytics.getRetrainExportUrl": {
48814
49084
  capName: "pipeline-analytics",
48815
49085
  capScope: "device",
@@ -48930,7 +49200,7 @@ Object.freeze({
48930
49200
  addonId: null,
48931
49201
  access: "view"
48932
49202
  },
48933
- "pipelineAnalytics.listRetrainDatasetVersions": {
49203
+ "pipelineAnalytics.listRetrainCorpusPage": {
48934
49204
  capName: "pipeline-analytics",
48935
49205
  capScope: "device",
48936
49206
  addonId: null,
@@ -48984,12 +49254,6 @@ Object.freeze({
48984
49254
  addonId: null,
48985
49255
  access: "create"
48986
49256
  },
48987
- "pipelineAnalytics.previewRetrainDataset": {
48988
- capName: "pipeline-analytics",
48989
- capScope: "device",
48990
- addonId: null,
48991
- access: "view"
48992
- },
48993
49257
  "pipelineAnalytics.proposeRetrainAnnotations": {
48994
49258
  capName: "pipeline-analytics",
48995
49259
  capScope: "device",
@@ -49068,6 +49332,12 @@ Object.freeze({
49068
49332
  addonId: null,
49069
49333
  access: "create"
49070
49334
  },
49335
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
49336
+ capName: "pipeline-analytics",
49337
+ capScope: "device",
49338
+ addonId: null,
49339
+ access: "view"
49340
+ },
49071
49341
  "pipelineAnalytics.restageRetrainTrack": {
49072
49342
  capName: "pipeline-analytics",
49073
49343
  capScope: "device",
@@ -49128,12 +49398,6 @@ Object.freeze({
49128
49398
  addonId: null,
49129
49399
  access: "create"
49130
49400
  },
49131
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
49132
- capName: "pipeline-analytics",
49133
- capScope: "device",
49134
- addonId: null,
49135
- access: "view"
49136
- },
49137
49401
  "pipelineAnalytics.wipeAllAnalytics": {
49138
49402
  capName: "pipeline-analytics",
49139
49403
  capScope: "device",
@@ -51528,18 +51792,6 @@ Object.freeze({
51528
51792
  addonId: null,
51529
51793
  access: "create"
51530
51794
  },
51531
- "training.findDatasetVersionIdByName": {
51532
- capName: "training",
51533
- capScope: "system",
51534
- addonId: null,
51535
- access: "view"
51536
- },
51537
- "training.getDatasetVersion": {
51538
- capName: "training",
51539
- capScope: "system",
51540
- addonId: null,
51541
- access: "view"
51542
- },
51543
51795
  "training.getJob": {
51544
51796
  capName: "training",
51545
51797
  capScope: "system",
@@ -51558,12 +51810,6 @@ Object.freeze({
51558
51810
  addonId: null,
51559
51811
  access: "view"
51560
51812
  },
51561
- "training.listDatasetVersions": {
51562
- capName: "training",
51563
- capScope: "system",
51564
- addonId: null,
51565
- access: "view"
51566
- },
51567
51813
  "training.listJobs": {
51568
51814
  capName: "training",
51569
51815
  capScope: "system",
@@ -51576,54 +51822,66 @@ Object.freeze({
51576
51822
  addonId: null,
51577
51823
  access: "view"
51578
51824
  },
51579
- "training.putDatasetVersion": {
51825
+ "training.registerResult": {
51580
51826
  capName: "training",
51581
51827
  capScope: "system",
51582
51828
  addonId: null,
51583
51829
  access: "create"
51584
51830
  },
51585
- "training.registerResult": {
51831
+ "training.rollbackCanary": {
51586
51832
  capName: "training",
51587
51833
  capScope: "system",
51588
51834
  addonId: null,
51589
51835
  access: "create"
51590
51836
  },
51591
- "training.removeDatasetVersion": {
51837
+ "training.startJob": {
51592
51838
  capName: "training",
51593
51839
  capScope: "system",
51594
51840
  addonId: null,
51595
- access: "delete"
51841
+ access: "create"
51596
51842
  },
51597
- "training.rollbackCanary": {
51843
+ "training.startJobBatch": {
51598
51844
  capName: "training",
51599
51845
  capScope: "system",
51600
51846
  addonId: null,
51601
51847
  access: "create"
51602
51848
  },
51603
- "training.startJob": {
51604
- capName: "training",
51849
+ "trainingProvider.cancelJob": {
51850
+ capName: "training-provider",
51605
51851
  capScope: "system",
51606
51852
  addonId: null,
51607
51853
  access: "create"
51608
51854
  },
51609
- "trainingProvider.cancelJob": {
51855
+ "trainingProvider.cleanupJob": {
51610
51856
  capName: "training-provider",
51611
51857
  capScope: "system",
51612
51858
  addonId: null,
51613
51859
  access: "create"
51614
51860
  },
51615
- "trainingProvider.cleanupJob": {
51861
+ "trainingProvider.createEntry": {
51616
51862
  capName: "training-provider",
51617
51863
  capScope: "system",
51618
51864
  addonId: null,
51619
51865
  access: "create"
51620
51866
  },
51867
+ "trainingProvider.deleteEntry": {
51868
+ capName: "training-provider",
51869
+ capScope: "system",
51870
+ addonId: null,
51871
+ access: "delete"
51872
+ },
51621
51873
  "trainingProvider.describe": {
51622
51874
  capName: "training-provider",
51623
51875
  capScope: "system",
51624
51876
  addonId: null,
51625
51877
  access: "view"
51626
51878
  },
51879
+ "trainingProvider.describeTypes": {
51880
+ capName: "training-provider",
51881
+ capScope: "system",
51882
+ addonId: null,
51883
+ access: "view"
51884
+ },
51627
51885
  "trainingProvider.estimateJob": {
51628
51886
  capName: "training-provider",
51629
51887
  capScope: "system",
@@ -51636,6 +51894,12 @@ Object.freeze({
51636
51894
  addonId: null,
51637
51895
  access: "view"
51638
51896
  },
51897
+ "trainingProvider.listEntries": {
51898
+ capName: "training-provider",
51899
+ capScope: "system",
51900
+ addonId: null,
51901
+ access: "view"
51902
+ },
51639
51903
  "trainingProvider.listJobEvents": {
51640
51904
  capName: "training-provider",
51641
51905
  capScope: "system",
@@ -51666,6 +51930,12 @@ Object.freeze({
51666
51930
  addonId: null,
51667
51931
  access: "create"
51668
51932
  },
51933
+ "trainingProvider.updateEntry": {
51934
+ capName: "training-provider",
51935
+ capScope: "system",
51936
+ addonId: null,
51937
+ access: "create"
51938
+ },
51669
51939
  "trainingProvider.uploadDataset": {
51670
51940
  capName: "training-provider",
51671
51941
  capScope: "system",
@@ -54872,6 +55142,11 @@ Object.freeze({
54872
55142
  form: "single",
54873
55143
  optional: false
54874
55144
  }],
55145
+ "osdManager.setSlotCameraEnabled": [{
55146
+ name: "deviceId",
55147
+ form: "single",
55148
+ optional: false
55149
+ }],
54875
55150
  "petFeeder.callPet": [{
54876
55151
  name: "deviceId",
54877
55152
  form: "single",
@@ -55092,6 +55367,11 @@ Object.freeze({
55092
55367
  form: "array",
55093
55368
  optional: false
55094
55369
  }],
55370
+ "pipelineAnalytics.listRetrainCorpusPage": [{
55371
+ name: "deviceIds",
55372
+ form: "array",
55373
+ optional: true
55374
+ }],
55095
55375
  "pipelineAnalytics.listRetrainStaging": [{
55096
55376
  name: "deviceIds",
55097
55377
  form: "array",
@@ -56201,6 +56481,7 @@ Object.freeze({
56201
56481
  });
56202
56482
  Object.freeze({
56203
56483
  "broker": "broker",
56484
+ "calendar-source": "calendar",
56204
56485
  "device-export": "device-export",
56205
56486
  "llm": "ai",
56206
56487
  "mesh-network": "mesh",
@@ -56686,6 +56967,8 @@ var STATE_SUMMARY_VARS = [
56686
56967
  [...RULE_TEXT],
56687
56968
  [...RULE_TEXT],
56688
56969
  [...RULE_TEXT],
56970
+ [...RULE_TEXT],
56971
+ [...RULE_TEXT],
56689
56972
  ([...RULE_TEXT], [...UPDATES]),
56690
56973
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
56691
56974
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),