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