@camstack/addon-provider-petkit 0.2.124 → 0.2.125

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
@@ -6479,7 +6479,7 @@ var ZodIssueCode = {
6479
6479
  var ZodFirstPartyTypeKind;
6480
6480
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6481
6481
  //#endregion
6482
- //#region ../types/dist/sleep-r3RWkGVx.mjs
6482
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
6483
6483
  /**
6484
6484
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6485
6485
  * window to float samples (D455).
@@ -10485,6 +10485,16 @@ var CompositionSchema = object({
10485
10485
  seen.add(feature.cap);
10486
10486
  });
10487
10487
  });
10488
+ var NodeColorIdSchema = _enum([
10489
+ "node-a",
10490
+ "node-b",
10491
+ "node-c",
10492
+ "node-d",
10493
+ "node-e",
10494
+ "node-f",
10495
+ "node-g",
10496
+ "node-h"
10497
+ ]);
10488
10498
  new Set([
10489
10499
  "track",
10490
10500
  "face",
@@ -19531,14 +19541,14 @@ var LlmProfileSchema = object({
19531
19541
  /** ConfigUISchema tree passed through untyped on the wire (the
19532
19542
  * notification-output `ConfigSchemaPassthrough` precedent at
19533
19543
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
19534
- var ConfigSchemaPassthrough$1 = unknown();
19544
+ var ConfigSchemaPassthrough$3 = unknown();
19535
19545
  var LlmProfileKindDescriptorSchema = object({
19536
19546
  kind: LlmProfileKindSchema,
19537
19547
  label: string(),
19538
19548
  icon: string(),
19539
19549
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19540
19550
  addonId: string(),
19541
- configSchema: ConfigSchemaPassthrough$1
19551
+ configSchema: ConfigSchemaPassthrough$3
19542
19552
  });
19543
19553
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
19544
19554
  var LlmDefaultSchema = object({
@@ -20659,7 +20669,7 @@ var TargetKindCapsSchema = object({
20659
20669
  * the union is large and not meant for runtime validation here; the exported
20660
20670
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
20661
20671
  */
20662
- var ConfigSchemaPassthrough = unknown();
20672
+ var ConfigSchemaPassthrough$2 = unknown();
20663
20673
  var TargetKindSchema = object({
20664
20674
  kind: string(),
20665
20675
  label: string(),
@@ -20696,7 +20706,7 @@ var TargetKindSchema = object({
20696
20706
  * its raster path, which is the safe default for an unknown image.
20697
20707
  */
20698
20708
  iconMediaType: string().optional(),
20699
- configSchema: ConfigSchemaPassthrough,
20709
+ configSchema: ConfigSchemaPassthrough$2,
20700
20710
  /**
20701
20711
  * The config keys that decide WHERE this kind's secrets are sent (server,
20702
20712
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -24033,6 +24043,61 @@ var OauthIntegrationDescriptorSchema = object({
24033
24043
  });
24034
24044
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
24035
24045
  /**
24046
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
24047
+ *
24048
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
24049
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
24050
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
24051
+ * immutable after create.
24052
+ */
24053
+ var ConfigSchemaPassthrough$1 = unknown();
24054
+ var OidcConnectionSchema = object({
24055
+ id: string().min(1),
24056
+ displayName: string(),
24057
+ icon: string(),
24058
+ issuerUrl: string(),
24059
+ clientId: string(),
24060
+ /** Client id + secret present — never the secret value. */
24061
+ configured: boolean(),
24062
+ /**
24063
+ * Values for the connection form schema. `clientSecret` is a keychain
24064
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
24065
+ */
24066
+ formValues: record(string(), unknown()).optional()
24067
+ });
24068
+ /**
24069
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
24070
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
24071
+ */
24072
+ var OidcConnectionUpdateInputSchema = object({
24073
+ id: string().min(1),
24074
+ displayName: string().min(1),
24075
+ icon: string().optional(),
24076
+ issuerUrl: string().optional(),
24077
+ clientId: string().optional(),
24078
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
24079
+ redirectUri: string().optional(),
24080
+ scopes: string().optional(),
24081
+ usernameClaim: _enum([
24082
+ "preferred_username",
24083
+ "email",
24084
+ "sub"
24085
+ ]).optional()
24086
+ });
24087
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
24088
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
24089
+ displayName: string().min(1)
24090
+ }), object({ id: string() }), {
24091
+ kind: "mutation",
24092
+ auth: "admin"
24093
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
24094
+ kind: "mutation",
24095
+ auth: "admin"
24096
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
24097
+ kind: "mutation",
24098
+ auth: "admin"
24099
+ });
24100
+ /**
24036
24101
  * What started a camera's onboard motion (D672). `camera` is the camera's own
24037
24102
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
24038
24103
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -25389,24 +25454,69 @@ var RetrainFrameListSchema = object({
25389
25454
  /** What the page pre-selects — the native key frame when one survives. */
25390
25455
  autoPickMediaId: number().int().optional()
25391
25456
  });
25457
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
25458
+ var RetrainFrameWorkStateSchema = _enum([
25459
+ "unannotated",
25460
+ "annotated",
25461
+ "complete"
25462
+ ]);
25463
+ /**
25464
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
25465
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
25466
+ */
25467
+ var RetrainCorpusFilterSchema = object({
25468
+ workState: RetrainFrameWorkStateSchema.optional(),
25469
+ deviceIds: array(number()).max(500).optional(),
25470
+ /** When set, only frames in this named collection. */
25471
+ collectionId: string().optional(),
25472
+ /** Frames that carry at least one saved annotation in one of these classes. */
25473
+ classes: array(RetrainMacroClassSchema).optional(),
25474
+ page: number().int().positive().default(1),
25475
+ pageSize: number().int().positive().max(100).default(50)
25476
+ });
25477
+ var RetrainCorpusPageSchema = object({
25478
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
25479
+ total: number().int().nonnegative(),
25480
+ page: number().int().positive(),
25481
+ pageSize: number().int().positive()
25482
+ });
25483
+ var RetrainCorpusKpiCameraRowSchema = object({
25484
+ deviceId: number(),
25485
+ unannotated: number().int().nonnegative(),
25486
+ annotated: number().int().nonnegative(),
25487
+ complete: number().int().nonnegative(),
25488
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
25489
+ * `null` when the corpus is empty (no ratio). */
25490
+ pctOfCorpus: number().min(0).max(1).nullable()
25491
+ });
25492
+ var RetrainCorpusKpiSchema = object({
25493
+ total: number().int().nonnegative(),
25494
+ unannotated: number().int().nonnegative(),
25495
+ annotated: number().int().nonnegative(),
25496
+ complete: number().int().nonnegative(),
25497
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
25498
+ });
25392
25499
  /**
25393
25500
  * Which frames an annotated export carries. Every field narrows; an empty
25394
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
25395
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
25396
- * the primitive a version export uses; `batchId` re-selects what an earlier
25397
- * export carried (`exportedInBatch`).
25501
+ * filter is every annotated copy. `frameIds` is the primitive a job or
25502
+ * download uses; `batchId` re-selects what an earlier export carried
25503
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
25504
+ * resolves to `frameIds` at plan/start.
25398
25505
  */
25399
25506
  var RetrainExportFilterSchema = object({
25400
25507
  deviceIds: array(number()).optional(),
25401
25508
  frameIds: array(string()).max(2e4).optional(),
25402
25509
  /** Only frames in at least one of these named collections. */
25403
25510
  collectionIds: array(string()).max(200).optional(),
25404
- /** Exactly the frames of this dataset version (and its completeOnly). An
25405
- * unknown id selects nothing. */
25406
- datasetVersionId: string().optional(),
25511
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
25512
+ collectionId: string().optional(),
25407
25513
  batchId: string().optional(),
25408
25514
  /** Only frames the operator marked complete (all subjects boxed). */
25409
- completeOnly: boolean().optional()
25515
+ completeOnly: boolean().optional(),
25516
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
25517
+ workState: RetrainFrameWorkStateSchema.optional(),
25518
+ /** Frames with at least one saved annotation in one of these classes. */
25519
+ classes: array(RetrainMacroClassSchema).optional()
25410
25520
  });
25411
25521
  /**
25412
25522
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -25606,8 +25716,7 @@ var RetrainDatasetStatsSchema = object({
25606
25716
  completeFrames: number().int()
25607
25717
  })).readonly()
25608
25718
  });
25609
- /** An immutable dataset version, without its frame list. */
25610
- var RetrainDatasetVersionSchema = object({
25719
+ object({
25611
25720
  id: string(),
25612
25721
  name: string(),
25613
25722
  createdAt: number(),
@@ -25615,22 +25724,33 @@ var RetrainDatasetVersionSchema = object({
25615
25724
  layout: RetrainExportLayoutSchema,
25616
25725
  completeOnly: boolean(),
25617
25726
  frameCount: number().int(),
25618
- /** sha256 of what the frames taught when the version was frozen. */
25619
25727
  annotationHash: string(),
25620
- /** The export manifest schema the version was cut under. */
25621
25728
  manifestSchema: string(),
25622
25729
  stats: RetrainDatasetStatsSchema
25623
25730
  });
25624
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
25625
- kind: literal("created"),
25626
- version: RetrainDatasetVersionSchema
25731
+ /**
25732
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
25733
+ * the training cap. Resolved here so plan/start and the annotated export share
25734
+ * one definition of "the frames" (`buildRetrainExportPlan`).
25735
+ */
25736
+ var RetrainTrainingCorpusSelectionSchema = object({
25737
+ collectionIds: array(string()).min(1),
25738
+ workState: _enum([
25739
+ "complete",
25740
+ "annotated_or_complete",
25741
+ "any_annotated"
25742
+ ]).default("complete")
25743
+ });
25744
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
25745
+ kind: literal("resolved"),
25746
+ frameIds: array(string()).max(2e4).readonly(),
25747
+ stats: RetrainDatasetStatsSchema,
25748
+ annotationHash: string(),
25749
+ layout: RetrainExportLayoutSchema
25627
25750
  }), object({
25628
25751
  kind: literal("refused"),
25629
- reason: _enum([
25630
- "empty-name",
25631
- "duplicate-name",
25632
- "no-frames"
25633
- ])
25752
+ reason: _enum(["unknown-collection", "no-frames"]),
25753
+ detail: string()
25634
25754
  })]);
25635
25755
  /** The outcome of a lifecycle move owned by the retrain page. */
25636
25756
  var RetrainTransitionResultSchema = object({
@@ -26337,6 +26457,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26337
26457
  }), array(RetrainTrackSchema).readonly(), {
26338
26458
  kind: "query",
26339
26459
  auth: "admin"
26460
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
26461
+ kind: "query",
26462
+ auth: "admin"
26463
+ }), method(object({}), RetrainCorpusKpiSchema, {
26464
+ kind: "query",
26465
+ auth: "admin"
26340
26466
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
26341
26467
  kind: "query",
26342
26468
  auth: "admin"
@@ -26432,36 +26558,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26432
26558
  kind: "mutation",
26433
26559
  auth: "admin",
26434
26560
  timeoutMs: 12e4
26435
- }), method(object({
26436
- selection: RetrainDatasetSelectionSchema,
26437
- completeOnly: boolean().optional()
26438
- }), RetrainDatasetStatsSchema, {
26439
- kind: "query",
26440
- auth: "admin"
26441
- }), method(object({
26442
- name: string().max(120),
26443
- selection: RetrainDatasetSelectionSchema,
26444
- layout: RetrainExportLayoutSchema,
26445
- completeOnly: boolean()
26446
- }), CreateRetrainDatasetVersionResultSchema, {
26447
- kind: "mutation",
26448
- auth: "admin",
26449
- timeoutMs: 12e4
26450
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
26451
- kind: "query",
26452
- auth: "admin"
26453
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
26454
- kind: "mutation",
26455
- auth: "admin"
26456
- }), method(object({ id: string() }), object({
26457
- found: boolean(),
26458
- annotationHash: string(),
26459
- matches: boolean(),
26460
- missingFrames: number().int()
26461
- }), {
26462
- kind: "query",
26463
- auth: "admin",
26464
- timeoutMs: 12e4
26465
26561
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
26466
26562
  kind: "query",
26467
26563
  auth: "admin"
@@ -26488,6 +26584,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26488
26584
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
26489
26585
  kind: "query",
26490
26586
  auth: "admin"
26587
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
26588
+ kind: "query",
26589
+ auth: "admin",
26590
+ timeoutMs: 6e4
26491
26591
  }), method(object({
26492
26592
  id: string(),
26493
26593
  name: string().max(120)
@@ -27104,11 +27204,14 @@ var HardwareClassIdSchema = _enum([
27104
27204
  "intel-n-series",
27105
27205
  "apple-m-base",
27106
27206
  "apple-m-pro",
27207
+ "amd-phoenix",
27107
27208
  "unknown"
27108
27209
  ]);
27109
27210
  var AcceleratorKindSchema = _enum([
27110
27211
  "intel-npu",
27111
27212
  "intel-igpu",
27213
+ "amd-igpu",
27214
+ "amd-npu",
27112
27215
  "x86-cpu",
27113
27216
  "arm-cpu",
27114
27217
  "apple-ane",
@@ -29038,6 +29141,8 @@ var AgentPipelineSettingsSchema = object({
29038
29141
  * address is wrong (multi-homed host, NAT, custom interface).
29039
29142
  */
29040
29143
  reachableHost: string().optional(),
29144
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
29145
+ color: NodeColorIdSchema.optional(),
29041
29146
  /**
29042
29147
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
29043
29148
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -29587,8 +29692,9 @@ method(object({
29587
29692
  auth: "admin"
29588
29693
  }), method(object({
29589
29694
  agentNodeId: string(),
29590
- reachableHost: string().nullable()
29591
- }), object({ success: literal(true) }), {
29695
+ reachableHost: string().nullable().optional(),
29696
+ color: NodeColorIdSchema.nullable().optional()
29697
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
29592
29698
  kind: "mutation",
29593
29699
  auth: "admin"
29594
29700
  }), method(object({
@@ -32664,7 +32770,7 @@ var CustomActionInputSchema = object({
32664
32770
  action: string().min(1),
32665
32771
  input: unknown()
32666
32772
  });
32667
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32773
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32668
32774
  addonId: string(),
32669
32775
  limit: number().min(1).max(500).default(100),
32670
32776
  level: LogLevelSchema$2.optional()
@@ -37734,7 +37840,13 @@ var TopologyNodeSchema = object({
37734
37840
  })).readonly(),
37735
37841
  processes: array(TopologyProcessSchema).readonly(),
37736
37842
  categories: array(TopologyCategorySchema).readonly(),
37737
- rootPackage: TopologyRootPackageSchema.nullable()
37843
+ rootPackage: TopologyRootPackageSchema.nullable(),
37844
+ /**
37845
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
37846
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
37847
+ * for offline rows and when the hub cannot tell.
37848
+ */
37849
+ meshTransport: _enum(["tls", "clear"]).optional()
37738
37850
  });
37739
37851
  var CapUsageEdgeSchema = object({
37740
37852
  callerAddonId: string(),
@@ -38147,6 +38259,7 @@ var OsdNamedTemplateSchema = object({
38147
38259
  });
38148
38260
  /** Where a slot's value comes from. */
38149
38261
  var OsdSourceSchema = discriminatedUnion("kind", [
38262
+ object({ kind: literal("none") }),
38150
38263
  object({
38151
38264
  kind: literal("static"),
38152
38265
  text: string().max(64)
@@ -38273,6 +38386,13 @@ method(object({ deviceId: number().int() }), object({
38273
38386
  }), object({ success: literal(true) }), {
38274
38387
  kind: "mutation",
38275
38388
  auth: "admin"
38389
+ }), method(object({
38390
+ deviceId: number().int(),
38391
+ slotId: string().min(1),
38392
+ enabled: boolean()
38393
+ }), object({ success: literal(true) }), {
38394
+ kind: "mutation",
38395
+ auth: "admin"
38276
38396
  }), method(object({
38277
38397
  sourceDeviceId: number().int(),
38278
38398
  targetDeviceId: number().int()
@@ -38704,7 +38824,15 @@ var GpuInfoSchema = object({
38704
38824
  name: string(),
38705
38825
  memoryMB: number().optional()
38706
38826
  });
38707
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
38827
+ var NpuInfoSchema = object({
38828
+ type: _enum([
38829
+ "apple-ane",
38830
+ "intel-npu",
38831
+ "amd-xdna"
38832
+ ]),
38833
+ name: string().optional(),
38834
+ generation: _enum(["xdna1", "xdna2"]).optional()
38835
+ });
38708
38836
  var CoralInfoSchema = object({
38709
38837
  type: literal("coral-edgetpu"),
38710
38838
  bus: string().optional()
@@ -43447,9 +43575,11 @@ var zoneRulesCapability = {
43447
43575
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
43448
43576
  * manifest entry and nothing else.
43449
43577
  *
43450
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
43451
- * `notification-output` posture); `describe` concat-fans across providers.
43452
- * Every method is `admin`: these spend money.
43578
+ * Collection of provider **types** (addons). Each addon owns zero or more
43579
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
43580
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
43581
+ * `entryId`; callers also pass the owning `addonId` as the collection
43582
+ * selector (broker posture). Every method is `admin`: these spend money.
43453
43583
  *
43454
43584
  * Every cloud object a provider creates is tagged with the orchestrator's
43455
43585
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -43473,8 +43603,8 @@ var TrainingRegionOptionSchema = object({
43473
43603
  priceMultiplier: number().positive()
43474
43604
  });
43475
43605
  /**
43476
- * The provider's per-account settings, as the orchestrator reads them. They
43477
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
43606
+ * The provider's per-entry settings, as the orchestrator reads them. They
43607
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
43478
43608
  * depend on the user's account), never hard-coded in the orchestrator.
43479
43609
  */
43480
43610
  var TrainingProviderDefaultsSchema = object({
@@ -43485,9 +43615,44 @@ var TrainingProviderDefaultsSchema = object({
43485
43615
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
43486
43616
  failedDatasetGraceHours: number().nonnegative()
43487
43617
  });
43618
+ /**
43619
+ * Entry form schema for a provider type — same seam as notification
43620
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
43621
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
43622
+ */
43623
+ var ConfigSchemaPassthrough = unknown();
43624
+ /** One creatable provider type, for the Add-entry dialog. */
43625
+ var TrainingProviderTypeSchema = object({
43626
+ typeId: string(),
43627
+ label: string(),
43628
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
43629
+ iconAsset: string(),
43630
+ /** Owning `training-provider` addon — collection selector for createEntry. */
43631
+ addonId: string(),
43632
+ /**
43633
+ * Fields for one entry of this type (credentials + defaults). Absent on a
43634
+ * type that only needs a name. Password fields are keychain-backed on the
43635
+ * provider addon (`secretStatePaths`), not D634 plaintext.
43636
+ */
43637
+ configSchema: ConfigSchemaPassthrough.optional()
43638
+ });
43639
+ /** One configured account / workspace under a provider type. */
43640
+ var TrainingProviderEntrySchema = object({
43641
+ entryId: string(),
43642
+ typeId: string(),
43643
+ name: string(),
43644
+ addonId: string(),
43645
+ /** Credentials are present — never the values. */
43646
+ configured: boolean()
43647
+ });
43488
43648
  var TrainingProviderDescriptorSchema = object({
43489
43649
  addonId: string(),
43490
- /** `modal`, `runpod`, `fake`, … */
43650
+ entryId: string(),
43651
+ typeId: string(),
43652
+ /** Operator-chosen entry name. */
43653
+ name: string(),
43654
+ iconAsset: string(),
43655
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
43491
43656
  kind: string(),
43492
43657
  label: string(),
43493
43658
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43499,7 +43664,30 @@ var TrainingProviderDescriptorSchema = object({
43499
43664
  dataResidencyNote: string(),
43500
43665
  /** Credentials are present — never the values. */
43501
43666
  configured: boolean(),
43502
- defaults: TrainingProviderDefaultsSchema
43667
+ defaults: TrainingProviderDefaultsSchema,
43668
+ /**
43669
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
43670
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
43671
+ * never plaintext. Same hydrate contract as settings forms (D789).
43672
+ */
43673
+ formValues: record(string(), unknown()).optional()
43674
+ });
43675
+ /**
43676
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
43677
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
43678
+ * `{ $secretClear: true }` clears it.
43679
+ */
43680
+ var TrainingProviderUpdateEntryInputSchema = object({
43681
+ entryId: string().min(1),
43682
+ name: string().min(1),
43683
+ tokenId: string().optional(),
43684
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
43685
+ environment: string().optional(),
43686
+ gpuType: string().optional(),
43687
+ region: string().optional(),
43688
+ costCapUsd: number().nonnegative().optional(),
43689
+ maxRuntimeSec: number().int().positive().optional(),
43690
+ failedDatasetGraceHours: number().nonnegative().optional()
43503
43691
  });
43504
43692
  var TrainingCredentialCheckSchema = object({
43505
43693
  ok: boolean(),
@@ -43551,20 +43739,33 @@ var TrainerSourceRefSchema = object({
43551
43739
  /** A commit sha (never a branch) — the job must be reproducible. */
43552
43740
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43553
43741
  });
43742
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43554
43743
  var JobRef = {
43555
- addonId: string(),
43744
+ entryId: string().min(1),
43556
43745
  jobKey: string().uuid()
43557
43746
  };
43558
43747
  var TrainingLogLineSchema = object({
43559
43748
  ts: number(),
43560
43749
  text: string()
43561
43750
  });
43562
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
43751
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
43752
+ typeId: string().min(1),
43753
+ name: string().min(1)
43754
+ }), object({ entryId: string() }), {
43755
+ kind: "mutation",
43756
+ auth: "admin"
43757
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
43758
+ kind: "mutation",
43759
+ auth: "admin"
43760
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
43761
+ kind: "mutation",
43762
+ auth: "admin"
43763
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
43563
43764
  kind: "mutation",
43564
43765
  auth: "admin",
43565
43766
  timeoutMs: 3e4
43566
43767
  }), method(object({
43567
- addonId: string(),
43768
+ entryId: string().min(1),
43568
43769
  gpuType: string(),
43569
43770
  region: string(),
43570
43771
  datasetBytes: number().int().nonnegative(),
@@ -43630,7 +43831,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43630
43831
  kind: "mutation",
43631
43832
  auth: "admin",
43632
43833
  timeoutMs: 5 * 6e4
43633
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
43834
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
43634
43835
  auth: "admin",
43635
43836
  timeoutMs: 2 * 6e4
43636
43837
  });
@@ -43640,20 +43841,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43640
43841
  *
43641
43842
  * It owns what every provider must agree on, written once:
43642
43843
  *
43643
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
43644
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
43645
- * the export plan) and reaches this store through the five row methods
43646
- * below, so the Retrain page and the export did not change.
43647
43844
  * - **Jobs.** A persisted state machine, a reconcile loop against the
43648
43845
  * provider, a cost guard, a daily orphan sweep and the retention rules.
43649
43846
  * - **The return flow.** Verified artefacts → Model Studio
43650
43847
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
43651
43848
  * rollback. Nothing is ever registered automatically.
43652
43849
  *
43850
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
43851
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
43852
+ * moment and snapshotted on the job. No frozen dataset version.
43853
+ *
43653
43854
  * Every method is `admin`.
43654
43855
  */
43655
- /** A version WITH its frame list — what the export and a job read. */
43656
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
43856
+ /**
43857
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
43858
+ * Frame ids are resolved at plan/start — never a frozen version id.
43859
+ */
43860
+ var TrainingCorpusSelectionSchema = object({
43861
+ collectionIds: array(string()).min(1),
43862
+ /** Default complete-only for v1 */
43863
+ workState: _enum([
43864
+ "complete",
43865
+ "annotated_or_complete",
43866
+ "any_annotated"
43867
+ ]).default("complete")
43868
+ });
43657
43869
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
43658
43870
  var TrainingBaseModelSchema = object({
43659
43871
  modelId: string(),
@@ -43671,9 +43883,13 @@ var TrainingPresetSchema = _enum([
43671
43883
  "thorough"
43672
43884
  ]);
43673
43885
  var TrainingJobRequestSchema = object({
43674
- datasetVersionId: string().min(1),
43675
- /** The `training-provider` addon that runs it. */
43676
- addonId: string().min(1),
43886
+ /** Live collection + work-state criteria; resolved at plan/start. */
43887
+ selection: TrainingCorpusSelectionSchema,
43888
+ /**
43889
+ * The provider **entry** that runs it (credentials + defaults).
43890
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
43891
+ */
43892
+ entryId: string().min(1),
43677
43893
  gpuType: string().min(1),
43678
43894
  region: string(),
43679
43895
  baseModelId: string().min(1),
@@ -43732,6 +43948,7 @@ var TrainingJobPlanSchema = object({
43732
43948
  * result lives after the operator acted on it.
43733
43949
  */
43734
43950
  var TrainingJobStateSchema = _enum([
43951
+ "queued",
43735
43952
  "uploading",
43736
43953
  "submitted",
43737
43954
  "starting",
@@ -43785,6 +44002,11 @@ var TrainingJobSchema = object({
43785
44002
  createdAt: number(),
43786
44003
  updatedAt: number(),
43787
44004
  state: TrainingJobStateSchema,
44005
+ /**
44006
+ * Shared by every job enqueued together via `startJobBatch`.
44007
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
44008
+ */
44009
+ batchId: string().nullable().default(null),
43788
44010
  stage: TrainingStageSchema.nullable(),
43789
44011
  failure: object({
43790
44012
  reason: TrainingFailureReasonSchema,
@@ -43796,6 +44018,12 @@ var TrainingJobSchema = object({
43796
44018
  maxRuntimeSec: number().int().positive(),
43797
44019
  trainer: TrainerSourceRefSchema,
43798
44020
  datasetLayout: RetrainExportLayoutSchema,
44021
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
44022
+ frameCount: number().int().nonnegative(),
44023
+ /** Resolved frame ids at start — the archive ships exactly these. */
44024
+ frameIds: array(string()).max(2e4).readonly(),
44025
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
44026
+ annotationHash: string(),
43799
44027
  dataset: object({
43800
44028
  bytes: number().int(),
43801
44029
  sha256: string(),
@@ -43837,13 +44065,7 @@ var TrainingJobSchema = object({
43837
44065
  canary: TrainingCanarySchema.nullable()
43838
44066
  });
43839
44067
  var IdInput = object({ id: string().min(1) });
43840
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43841
- kind: "mutation",
43842
- auth: "admin"
43843
- }), 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() }), {
43844
- kind: "mutation",
43845
- auth: "admin"
43846
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44068
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43847
44069
  auth: "admin",
43848
44070
  timeoutMs: 6e4
43849
44071
  }), method(TrainingJobRequestSchema.extend({
@@ -43862,6 +44084,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43862
44084
  kind: "mutation",
43863
44085
  auth: "admin",
43864
44086
  timeoutMs: 12e4
44087
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
44088
+ baseModelIds: array(string().min(1)).min(1),
44089
+ name: string().min(1).max(120),
44090
+ maxCostUsd: number().positive(),
44091
+ maxRuntimeSec: number().int().positive(),
44092
+ idempotencyKey: string().min(8).max(80)
44093
+ }), discriminatedUnion("kind", [object({
44094
+ kind: literal("started"),
44095
+ batchId: string(),
44096
+ jobs: array(TrainingJobSchema).min(1).readonly()
44097
+ }), object({
44098
+ kind: literal("refused"),
44099
+ reason: TrainingRefusalReasonSchema,
44100
+ detail: string()
44101
+ })]), {
44102
+ kind: "mutation",
44103
+ auth: "admin",
44104
+ timeoutMs: 12e4
43865
44105
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
43866
44106
  kind: "mutation",
43867
44107
  auth: "admin",
@@ -49420,6 +49660,36 @@ Object.freeze({
49420
49660
  addonId: null,
49421
49661
  access: "view"
49422
49662
  },
49663
+ "oidcConnections.connectionFormSchema": {
49664
+ capName: "oidc-connections",
49665
+ capScope: "system",
49666
+ addonId: null,
49667
+ access: "view"
49668
+ },
49669
+ "oidcConnections.createConnection": {
49670
+ capName: "oidc-connections",
49671
+ capScope: "system",
49672
+ addonId: null,
49673
+ access: "create"
49674
+ },
49675
+ "oidcConnections.deleteConnection": {
49676
+ capName: "oidc-connections",
49677
+ capScope: "system",
49678
+ addonId: null,
49679
+ access: "delete"
49680
+ },
49681
+ "oidcConnections.listConnections": {
49682
+ capName: "oidc-connections",
49683
+ capScope: "system",
49684
+ addonId: null,
49685
+ access: "view"
49686
+ },
49687
+ "oidcConnections.updateConnection": {
49688
+ capName: "oidc-connections",
49689
+ capScope: "system",
49690
+ addonId: null,
49691
+ access: "create"
49692
+ },
49423
49693
  "osd.getStatus": {
49424
49694
  capName: "osd",
49425
49695
  capScope: "device",
@@ -49492,6 +49762,12 @@ Object.freeze({
49492
49762
  addonId: null,
49493
49763
  access: "create"
49494
49764
  },
49765
+ "osdManager.setSlotCameraEnabled": {
49766
+ capName: "osd-manager",
49767
+ capScope: "system",
49768
+ addonId: null,
49769
+ access: "create"
49770
+ },
49495
49771
  "osdManager.upsertTemplate": {
49496
49772
  capName: "osd-manager",
49497
49773
  capScope: "system",
@@ -49630,12 +49906,6 @@ Object.freeze({
49630
49906
  addonId: null,
49631
49907
  access: "create"
49632
49908
  },
49633
- "pipelineAnalytics.createRetrainDatasetVersion": {
49634
- capName: "pipeline-analytics",
49635
- capScope: "device",
49636
- addonId: null,
49637
- access: "create"
49638
- },
49639
49909
  "pipelineAnalytics.deleteDeviceEvents": {
49640
49910
  capName: "pipeline-analytics",
49641
49911
  capScope: "device",
@@ -49648,12 +49918,6 @@ Object.freeze({
49648
49918
  addonId: null,
49649
49919
  access: "delete"
49650
49920
  },
49651
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
49652
- capName: "pipeline-analytics",
49653
- capScope: "device",
49654
- addonId: null,
49655
- access: "delete"
49656
- },
49657
49921
  "pipelineAnalytics.deleteTracks": {
49658
49922
  capName: "pipeline-analytics",
49659
49923
  capScope: "device",
@@ -49756,6 +50020,12 @@ Object.freeze({
49756
50020
  addonId: null,
49757
50021
  access: "view"
49758
50022
  },
50023
+ "pipelineAnalytics.getRetrainCorpusKpi": {
50024
+ capName: "pipeline-analytics",
50025
+ capScope: "device",
50026
+ addonId: null,
50027
+ access: "view"
50028
+ },
49759
50029
  "pipelineAnalytics.getRetrainExportUrl": {
49760
50030
  capName: "pipeline-analytics",
49761
50031
  capScope: "device",
@@ -49876,7 +50146,7 @@ Object.freeze({
49876
50146
  addonId: null,
49877
50147
  access: "view"
49878
50148
  },
49879
- "pipelineAnalytics.listRetrainDatasetVersions": {
50149
+ "pipelineAnalytics.listRetrainCorpusPage": {
49880
50150
  capName: "pipeline-analytics",
49881
50151
  capScope: "device",
49882
50152
  addonId: null,
@@ -49930,12 +50200,6 @@ Object.freeze({
49930
50200
  addonId: null,
49931
50201
  access: "create"
49932
50202
  },
49933
- "pipelineAnalytics.previewRetrainDataset": {
49934
- capName: "pipeline-analytics",
49935
- capScope: "device",
49936
- addonId: null,
49937
- access: "view"
49938
- },
49939
50203
  "pipelineAnalytics.proposeRetrainAnnotations": {
49940
50204
  capName: "pipeline-analytics",
49941
50205
  capScope: "device",
@@ -50014,6 +50278,12 @@ Object.freeze({
50014
50278
  addonId: null,
50015
50279
  access: "create"
50016
50280
  },
50281
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
50282
+ capName: "pipeline-analytics",
50283
+ capScope: "device",
50284
+ addonId: null,
50285
+ access: "view"
50286
+ },
50017
50287
  "pipelineAnalytics.restageRetrainTrack": {
50018
50288
  capName: "pipeline-analytics",
50019
50289
  capScope: "device",
@@ -50074,12 +50344,6 @@ Object.freeze({
50074
50344
  addonId: null,
50075
50345
  access: "create"
50076
50346
  },
50077
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
50078
- capName: "pipeline-analytics",
50079
- capScope: "device",
50080
- addonId: null,
50081
- access: "view"
50082
- },
50083
50347
  "pipelineAnalytics.wipeAllAnalytics": {
50084
50348
  capName: "pipeline-analytics",
50085
50349
  capScope: "device",
@@ -52474,18 +52738,6 @@ Object.freeze({
52474
52738
  addonId: null,
52475
52739
  access: "create"
52476
52740
  },
52477
- "training.findDatasetVersionIdByName": {
52478
- capName: "training",
52479
- capScope: "system",
52480
- addonId: null,
52481
- access: "view"
52482
- },
52483
- "training.getDatasetVersion": {
52484
- capName: "training",
52485
- capScope: "system",
52486
- addonId: null,
52487
- access: "view"
52488
- },
52489
52741
  "training.getJob": {
52490
52742
  capName: "training",
52491
52743
  capScope: "system",
@@ -52504,12 +52756,6 @@ Object.freeze({
52504
52756
  addonId: null,
52505
52757
  access: "view"
52506
52758
  },
52507
- "training.listDatasetVersions": {
52508
- capName: "training",
52509
- capScope: "system",
52510
- addonId: null,
52511
- access: "view"
52512
- },
52513
52759
  "training.listJobs": {
52514
52760
  capName: "training",
52515
52761
  capScope: "system",
@@ -52522,54 +52768,66 @@ Object.freeze({
52522
52768
  addonId: null,
52523
52769
  access: "view"
52524
52770
  },
52525
- "training.putDatasetVersion": {
52771
+ "training.registerResult": {
52526
52772
  capName: "training",
52527
52773
  capScope: "system",
52528
52774
  addonId: null,
52529
52775
  access: "create"
52530
52776
  },
52531
- "training.registerResult": {
52777
+ "training.rollbackCanary": {
52532
52778
  capName: "training",
52533
52779
  capScope: "system",
52534
52780
  addonId: null,
52535
52781
  access: "create"
52536
52782
  },
52537
- "training.removeDatasetVersion": {
52783
+ "training.startJob": {
52538
52784
  capName: "training",
52539
52785
  capScope: "system",
52540
52786
  addonId: null,
52541
- access: "delete"
52787
+ access: "create"
52542
52788
  },
52543
- "training.rollbackCanary": {
52789
+ "training.startJobBatch": {
52544
52790
  capName: "training",
52545
52791
  capScope: "system",
52546
52792
  addonId: null,
52547
52793
  access: "create"
52548
52794
  },
52549
- "training.startJob": {
52550
- capName: "training",
52795
+ "trainingProvider.cancelJob": {
52796
+ capName: "training-provider",
52551
52797
  capScope: "system",
52552
52798
  addonId: null,
52553
52799
  access: "create"
52554
52800
  },
52555
- "trainingProvider.cancelJob": {
52801
+ "trainingProvider.cleanupJob": {
52556
52802
  capName: "training-provider",
52557
52803
  capScope: "system",
52558
52804
  addonId: null,
52559
52805
  access: "create"
52560
52806
  },
52561
- "trainingProvider.cleanupJob": {
52807
+ "trainingProvider.createEntry": {
52562
52808
  capName: "training-provider",
52563
52809
  capScope: "system",
52564
52810
  addonId: null,
52565
52811
  access: "create"
52566
52812
  },
52813
+ "trainingProvider.deleteEntry": {
52814
+ capName: "training-provider",
52815
+ capScope: "system",
52816
+ addonId: null,
52817
+ access: "delete"
52818
+ },
52567
52819
  "trainingProvider.describe": {
52568
52820
  capName: "training-provider",
52569
52821
  capScope: "system",
52570
52822
  addonId: null,
52571
52823
  access: "view"
52572
52824
  },
52825
+ "trainingProvider.describeTypes": {
52826
+ capName: "training-provider",
52827
+ capScope: "system",
52828
+ addonId: null,
52829
+ access: "view"
52830
+ },
52573
52831
  "trainingProvider.estimateJob": {
52574
52832
  capName: "training-provider",
52575
52833
  capScope: "system",
@@ -52582,6 +52840,12 @@ Object.freeze({
52582
52840
  addonId: null,
52583
52841
  access: "view"
52584
52842
  },
52843
+ "trainingProvider.listEntries": {
52844
+ capName: "training-provider",
52845
+ capScope: "system",
52846
+ addonId: null,
52847
+ access: "view"
52848
+ },
52585
52849
  "trainingProvider.listJobEvents": {
52586
52850
  capName: "training-provider",
52587
52851
  capScope: "system",
@@ -52612,6 +52876,12 @@ Object.freeze({
52612
52876
  addonId: null,
52613
52877
  access: "create"
52614
52878
  },
52879
+ "trainingProvider.updateEntry": {
52880
+ capName: "training-provider",
52881
+ capScope: "system",
52882
+ addonId: null,
52883
+ access: "create"
52884
+ },
52615
52885
  "trainingProvider.uploadDataset": {
52616
52886
  capName: "training-provider",
52617
52887
  capScope: "system",
@@ -55818,6 +56088,11 @@ Object.freeze({
55818
56088
  form: "single",
55819
56089
  optional: false
55820
56090
  }],
56091
+ "osdManager.setSlotCameraEnabled": [{
56092
+ name: "deviceId",
56093
+ form: "single",
56094
+ optional: false
56095
+ }],
55821
56096
  "petFeeder.callPet": [{
55822
56097
  name: "deviceId",
55823
56098
  form: "single",
@@ -56038,6 +56313,11 @@ Object.freeze({
56038
56313
  form: "array",
56039
56314
  optional: false
56040
56315
  }],
56316
+ "pipelineAnalytics.listRetrainCorpusPage": [{
56317
+ name: "deviceIds",
56318
+ form: "array",
56319
+ optional: true
56320
+ }],
56041
56321
  "pipelineAnalytics.listRetrainStaging": [{
56042
56322
  name: "deviceIds",
56043
56323
  form: "array",
@@ -57147,6 +57427,7 @@ Object.freeze({
57147
57427
  });
57148
57428
  Object.freeze({
57149
57429
  "broker": "broker",
57430
+ "calendar-source": "calendar",
57150
57431
  "device-export": "device-export",
57151
57432
  "llm": "ai",
57152
57433
  "mesh-network": "mesh",
@@ -57632,6 +57913,8 @@ var STATE_SUMMARY_VARS = [
57632
57913
  [...RULE_TEXT],
57633
57914
  [...RULE_TEXT],
57634
57915
  [...RULE_TEXT],
57916
+ [...RULE_TEXT],
57917
+ [...RULE_TEXT],
57635
57918
  ([...RULE_TEXT], [...UPDATES]),
57636
57919
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
57637
57920
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),